Skip to content

Conversation

@Lms24
Copy link
Member

@Lms24 Lms24 commented Jan 24, 2024

This PR adjusts the package.json of @sentry/svelte to support Svelte 5. Similarly to SvelteKit 2, we now need to declare the package as type: "module" and set the exports property.

Important: I purposefully didn't yet bump peer dependencies. Svelte 5 is still in preview and we shouldn't commit to officially supporting it. Everything we do now is only preparation work.

As far as my testing goes, I didn't find backwards compatibility issues with Svelte 4 or SvelteKit.

@Lms24 Lms24 changed the title ref(svelte): Prepare package.json entry points for Svelte 5 support ref(svelte): Prepare package.json config for Svelte 5 support Jan 24, 2024
@Lms24 Lms24 marked this pull request as draft January 24, 2024 13:11
@Lms24
Copy link
Member Author

Lms24 commented Jan 24, 2024

argh this breaks our jest test b/c of type: module 🥲

will revisit one we figured jest out

Copy link
Member

@AbhiPrasad AbhiPrasad left a comment

Choose a reason for hiding this comment

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

We're going to have a bunch of jest issues with esm in general - we might want to migrate some stuff to vitest as a result.

"types": "./build/types/index.d.ts", might cause problems for some users setups, if we use package.json exports we need index.d.cts and index.d.mts (different types for esm and cjs). This is a pain though, so we can try to avoid it.

@Lms24 Lms24 force-pushed the lms/ref-svelte-pkgjson-exports branch from f4227b8 to 48d6fcc Compare April 25, 2024 15:17
@Lms24
Copy link
Member Author

Lms24 commented Apr 26, 2024

Superseded by #11807, no longer necessary after our v8 ESM package.json chagnes

@Lms24 Lms24 closed this Apr 26, 2024
@Lms24 Lms24 deleted the lms/ref-svelte-pkgjson-exports branch December 3, 2024 09:31
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