Skip to content

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

Merged
timfish merged 10 commits into
getsentry:developfrom
EmileBrunelle:chore/bundler-plugins-magic-string-1
Sep 29, 2026
Merged

timfish merged 10 commits into
getsentry:developfrom
EmileBrunelle:chore/bundler-plugins-magic-string-1

Conversation

@EmileBrunelle

@EmileBrunelle EmileBrunelle commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

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
@mydea
mydea requested review from Lms24 and timfish September 29, 2026 11:40
@timfish timfish self-assigned this Sep 29, 2026
@timfish
timfish enabled auto-merge (squash) September 29, 2026 12:31
@s1gr1d s1gr1d added the external PR from an external contributor label Sep 29, 2026
Comment thread packages/bundler-plugins/package.json
# Conflicts:
#	packages/bundler-plugins/package.json
#	yarn.lock
@timfish
timfish merged commit 21bc772 into getsentry:develop Sep 29, 2026
297 checks passed
nicohrubec pushed a commit that referenced this pull request Sep 29, 2026
This PR adds the external contributor to the CHANGELOG.md file, so that
they are credited for their contribution. See #24768

Co-authored-by: timfish <1150298+timfish@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external PR from an external contributor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants