Added a check for spotlight v1.x.x to not load sentry sdk >= v8
Before opening this PR:
- [x] I added a Changeset Entry with
pnpm changeset:add - [x] I referenced issues that this PR addresses
Added a check for sentry integration in Spotlight, for v1.x.x to load only if -
- no browser sdk found.
- browser sdk with version <= 7.x.x
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 | Jul 19, 2024 1:14pm |
hey @Lms24
- Updated the code based on review comments.
- Also update windowWithSentry type as well similar to - https://github.com/getsentry/spotlight/pull/402/files because we are not able to get the version of SDK using just the legacyCarrier for v > 8.6.0
@Shubhdeep12 thanks a lot for making the changes! I think this looks good but I just had a revelation:
The plan for the v2 release is to merge v2_dev into main once we go stable. Before this merge, we'll branch off a v1 branch from main to which we can theoretically apply patches if we need to create v1 patches in the future. v2 development will continue on main.
With this in mind, we don't necessarily want this commit in the history for v2, but only for v1.So I suggest we wait with merging until v2 is stable and only then merge it into the v1 branch. Does that make sense to you?
I'm targeting Monday for v2 stable by the way so the wait shouldn't be too long 🤞
Sounds great! @Lms24
The main reason for this patch was for the users who were getting confused and were trying to use the spotlight with sentry v8. We can wait and merge it in v1 branch.
Yup, that makes sense, as I said, I think the change is a good idea! Also, waiting for stable gives us the additional bonus that people will feel less sceptical about updating to a stable version than to an alpha version.
Is this still relevant @Lms24 and @Shubhdeep12?
Yup, still relevant. Should go into 1.x (feel free to adjust as you see fit!)
Is there a strong reason for us to support 1.x branch and do hotfixes for that?
Is there a strong reason for us to support 1.x branch and do hotfixes for that?
All new fixes and features will be added to 2.x(main branch) only.
This specific fix is only added for the users using spotlight v 1.x with sentry sdk v >=8.x because there was a breaking change in sentry js sdk v8.x, which spotlight 1.x doesn't support.
This specific fix is only added for the users using spotlight v 1.x with sentry sdk v >=8.x because there was a breaking change in sentry js sdk v8.x, which spotlight 1.x doesn't support.
Understand this part. Asking if there's anyone out there relying on v1.x or a good reason for us to maintain v1.x (otherwise I'll just close this PR and do not support v1)
@BYK Seems like v1 is still used by a lot of people. If it's not too much work, I'd vote we merge this and cut a final v1 release to let people know about the need to update to v2 if they use a v8 JS SDK. No strong feelings though, I'll let you make the call.
Closing as we are not planning to backdate support. No reason to stick with Spotlight 1.x at this point.