Skip to content

chore(bundler-plugins): Allow magic-string 1.x - #24768

Open
EmileBrunelle wants to merge 5 commits into
getsentry:developfrom
EmileBrunelle:chore/bundler-plugins-magic-string-1
Open

EmileBrunelle wants to merge 5 commits into
getsentry:developfrom
EmileBrunelle:chore/bundler-plugins-magic-string-1

Conversation

@EmileBrunelle

@EmileBrunelle EmileBrunelle commented Sep 25, 2026 •

Copy link
Copy Markdown

Follow-up to #19510 / #19520: @sentry/bundler-plugins pins magic-string to ~0.30.8, so apps whose other tooling already moved to 1.x (e.g. vitest) install two copies.

This widens the range to ~0.30.8 || ^1.0.0 instead of forcing 1.x. Apps get whichever copy they already have. That matters because @sentry/nextjs itself still brings 0.30 through @rollup/plugin-commonjs, so a hard ^1 would create the duplicate this is meant to remove. ~ stays on the 0.30 side, as #19520 intended.

1.0.0's only breaking change is ESM-only packaging (no top-level await, no API changes up to 1.4.2). The package's engines field is already the require(esm) floor, so the CJS build works with both. I checked the 1.x side by require()-ing build/cjs from a plain .cjs script and running the component-annotation transform, on Node 20.19.0, 22.12.0, 22.13.0 and 24. The only difference: Node 22.12.x prints Node's require(esm) ExperimentalWarning once at build time. 22.13.0+ and 20.19.0 print nothing.

@sentry/svelte, @sentry/sveltekit and @sentry/cloudflare have the same engines floor and still use ~0.30. I'm happy to send the same change for them separately.

EmileBrunelle and others added 4 commits September 25, 2026 19:23
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…leBrunelle/sentry-javascript into chore/bundler-plugins-magic-string-1
@EmileBrunelle EmileBrunelle changed the title chore(bundler-plugins): Bump magic-string to ^1.4.2 chore(bundler-plugins): Allow magic-string 1.x Sep 25, 2026

This branch has not been deployed

No deployments
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.

1 participant