-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prepare for Svelte 5 support #10318
Comments
Added this to the v8 milestone. Might be worth to just expose the componentTrackingPreprocessor going forward and remove withSentryConfig again. I have the feeling this is not gonna play well with SvelteKit and I wanna stay away from such a general wrapper. |
👋 Svelte maintainer here - if you have any questions regarding how to adapt the SDK to Svelte 5, let me know. Ideally Svelte 5 provides the public APIs you need to achieve what you want. |
@dummdidumm thanks a lot! Are you planning on exposing a way of getting the component name in |
What do you need the component name for? |
For a component mount and update time tracking utility we export from our Svelte SDK. We have some automatism around this (which we'll also rework in our next SDK major version) but this utility used to automatically obtain the component name without users having to specify it in Svelte 3 and 4. If this is no longer possible in Svelte 5, that's fine, I was just wondering because I'll soon start reworking this feature for Svelte 5 support. |
Out of curiosity: how does this work for other frameworks? E.g. how do you obtain that name from React? Do they provide it? Or is there just no way and devs have to do something else there? |
@dummdidumm Other frameworks often don't have this API at all and people have to add it manually. React has an API for this but it needs build-time config. We built a feature in our bundler plugins to annotate components: getsentry/sentry-javascript-bundler-plugins#468 |
I just merged #11807 which auto-closed this issue. We'll make a new beta release for v8 of our SDK on Monday which will ship with support for Svelte 5 (compatible with the latest Svelte 5 preview)! |
I am testing out Svelte 5 and discovered this error message:
The only package I see importing from
@Lms24, would you like a separate issue opened for this, or do you want to do something else? |
@happycollision did you try out Svelte 5 with version 8.0.0 RC or beta of the If you don't want to upgrade to a preview build, you're in luck: We're releasing |
Hah. I guess that’s the deal, then. All I did was check that I was on latest, not beta. |
Yup, we just released 8.0.0 - would love to hear if things work for you when you get a chance to upgrade :) |
Important
Svelte 5 is not yet stable. We can't bump peer dependencies before it goes stable because we can't guarantee support yet. This issue serves as a collection of things we need to do for Svelte 5 support at this time. We can do some preparations beforehand but we won't guarantee support.
Problem Statement
Our
@sentry/svelte
SDK is not fully compatible with Svelte 5. This has two reasonstype: "module"
andexports
inpackage.json
current_component
internal API (this was risky to use in the first place but yeah here we are...)Solution Brainstorm
Tried a quick update today but the blocker here is that we also need to upgrade Jest or switch to vitest.
Tasks
package.json
config for Svelte 5 support #10311closes #10275
closes #10276
The text was updated successfully, but these errors were encountered: