Skip to content

feat: Make Spotlight compatible with Sentry SDK version 8 - #386

Merged
Lms24 merged 13 commits into
v2-devfrom
lms/ref-new-integration
Apr 3, 2024
Merged

Lms24 merged 13 commits into
v2-devfrom
lms/ref-new-integration

Conversation

@Lms24

@Lms24 Lms24 commented Mar 28, 2024 •

Copy link
Copy Markdown
Member

This PR makes spotlight compatible with version 8 of the Sentry JS SDK:

  • Convert the old class-based v7 integration into a function-based integration (Integration interface is no longer compatible w/ v7 < 7.99.0)
  • Add extra logic to enable SDK integrations if no DSN is provided
  • Update e2e and demo apps to v8 alpha versions

This PR is directed against v2-dev. Once SDK v8 goes stable, we'll make a stable spotlight release.

This is a breaking change because the browser SDK integration is no longer compatible with the v7 SDK versions below 7.99.0. So users will be able to use the SDK with >=7.99.0 or 8.x.

ref #387

@vercel

vercel Bot commented Mar 28, 2024 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
spotlightjs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 2, 2024 1:35pm

@Lms24
Lms24 force-pushed the lms/ref-new-integration branch from 1e92860 to d56007d Compare March 28, 2024 10:37
@Lms24 Lms24 self-assigned this Mar 28, 2024
@Lms24
Lms24 changed the base branch from main to v2-dev March 28, 2024 15:37
@Lms24 Lms24 changed the title feat(overlay): Make Spotlight compatible with Sentry SDK version 8 feat: Make Spotlight compatible with Sentry SDK version 8 Mar 28, 2024
@Lms24
Lms24 marked this pull request as ready for review March 28, 2024 16:19
@Lms24
Lms24 requested a review from HazAT March 28, 2024 16:20
"name": "@spotlightjs/astro",
"description": "Add spotlight to your Astro toolbar, for better debugging.",
"version": "1.0.19",
"version": "2.0.0-alpha.0",

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Usually, this step would happen in the "Prepare Publish" workflow but changesets handles pre-releases a bit differently. In the hope of not having to do too many, for now I opted to just carry out the chagneset pre-release preparations manually and I'll publish directly from v2-dev once this is merged. Should work 🤞

Comment thread MIGRATION.md Outdated

Here's what you need to do to update to version 2:

- Ensure that you use a version 8 of your `@sentry/<sdk>` SDKs

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would propose to support v7.99.0+ (https://github.com/getsentry/sentry-javascript/blob/v7/CHANGELOG.md#7990) which should work, and makes it easier for people to update. That version should have stuff that we need to make this work, I believe?

@Lms24 Lms24 Apr 2, 2024 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could probably even go down to 7.96.0 (https://github.com/getsentry/sentry-javascript/blob/v7/CHANGELOG.md#7960) where we started exposing the functional integrations in browser.

Or we set it to 7.100.0 where we exposed the integrations in node. Probably the safer choice just to be sure the functionality is available everywhere.

@Lms24 Lms24 Apr 2, 2024 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could probably even go down to 7.96.0

oh nvm, 7.97.0 it is (missed that the 7.96.0 release was incomplete)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update: 7.97 doesn't yet support afterAllSetup. 7.99.0 does, so trying this next

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, we now require 7.99.0 or greater 👍

Comment thread demos/astro-playground/astro.config.mjs Resolved

This branch was successfully deployed

1 active deployment
Preview — c43f0074 Deployed Apr 2, 2024 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants