Uh oh!
There was an error while loading. Please reload this page.
fix(v10/server-utils): Stop shipping orchestrion bundler plugins as production dependencies - #23667
Merged
Merged
Conversation
…roduction dependencies Backport of: #22443
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit c10ca96. Configure here.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Contributor
size-limit report 📦
|
andreiborza
marked this pull request as ready for review
August 27, 2026 12:18
andreiborza
requested review from
chargome and s1gr1d
and removed request for
a teamAugust 27, 2026 12:18
Uh oh!
There was an error while loading. Please reload this page.
chargome
approved these changes
Aug 27, 2026
Uh oh!
There was an error while loading. Please reload this page.
46 tasks
lifefloating added a commit
to llm-ring/lmring
that referenced
this pull request
Aug 31, 2026
- update all minor/patch versions across workspace - pin @sentry/nextjs to ~10.71.0: 10.72.0 vendored @apm-js-collab/code-transformer-bundler-plugins with a rollup CJS import.meta.url shim that crashes under DOM-emulated vitest environments (ERR_INVALID_URL_SCHEME via document.baseURI); upstream fix tracked in getsentry/sentry-javascript#23667
This was referenced Sep 2, 2026
s1gr1d added a commit
that referenced
this pull request
Sep 2, 2026
Since 10.72.0, importing `@sentry/nextjs` on the server crashes when a `document` global exists. jsdom and happy-dom define one while tests run in Node (#23789, introduced by #23667). What went wrong: 1. `@sentry/server-utils` now bundles the code-transformer plugin, compiled from ESM to CJS. Rollup replaces `import.meta.url` with a snippet that assumes "a `document` global means a browser". This is now fixed by always emitting the Node form, since this package only runs in Node. 2. The Next.js server entry re-exports `withSentryConfig`, so just importing the SDK ran the bundler plugin's module-scope code. The plugins now load lazily when the build config actually runs. Build behavior is unchanged (still synchronous, Next.js webpack configs can't be async), but importing the SDK no longer touches them. This also removes the `WebAssembly.compile()` call behind the Cloudflare cold-start errors (reference - but needs to be verified [#22794](#22794)) Fixes#23789
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Backport of: #22443
Closes: #23611
@sentry/server-utilsshipped the orchestrion bundler plugins and a full JavaScript parser toolchain (meriyah, esquery, astring, source-map) as production dependencies, so every consumer of@sentry/nodeinstalled roughly 5 MB of code that no runtime path reaches unless they opt into diagnostics-channel injection. The orchestrion runtime chain is now compiled into this package's own build, and all@apm-js-collab/*packages plus meriyah become devDependencies. Production dependencies are down to@sentry/conventionsand@sentry/core.Differences to the original PR
packages/server-utils/src/orchestrion/runtime/register.ts: keptRegisterDiagnosticsChannelInjectionOptionsand the optional parameter onregisterDiagnosticsChannelInjection(), now deprecated and ignored. The original deletes both; on v10 the option is reachable through the publicexperimentalUseDiagnosticsChannelInjection(options), so removing it would be a compile error for anyone passingtracingHooksDir.packages/node/src/sdk/experimentalUseDiagnosticsChannelInjection.ts: same reason, the optional parameter stays.packages/server-utils/src/orchestrion/runtime/register.ts: kept v10's loader-thread guard (isMainThread/parentPort), which landed after the v10 branch point and is not in the original.packages/nextjs/src/config/withSentryConfig/getFinalConfigObjectUtils.tsandgetFinalConfigObject.ts: removedmaybeAddOutputFileTracingIncludesplus its tests inpackages/nextjs/test/config/withSentryConfig.test.ts. That@vercel/nftforce-include is a v10-only workaround for meriyah'smodule-syncexports map (meriyah.mjsmissing at runtime in Next.js "standalone" builds since 10.59.0 (server-utils → meriyah not fully traced by nft) #23034), which bundling removes.developnever carried it, so this brings both branches to the same state.