Skip to content

test(e2e): Assert Next.js Cloudflare worker bundle stays free of orchestrion bundler plugins - #23910

Merged
s1gr1d merged 2 commits into
v10from
sig/v10-cloudflare-bundle-orchestrion-e2e
Sep 2, 2026
Merged

test(e2e): Assert Next.js Cloudflare worker bundle stays free of orchestrion bundler plugins#23910
s1gr1d merged 2 commits into
v10from
sig/v10-cloudflare-bundle-orchestrion-e2e

Conversation

@s1gr1d

@s1gr1d s1gr1d commented Sep 2, 2026

Copy link
Copy Markdown
Member

Adds one test to the nextjs-16-cf-workers e2e app. After the OpenNext build, it scans every script in .open-next/ (except static assets) and fails if the orchestrion bundler plugins show up, naming the offending files.

The plugins are build-time-only, but they used to get compiled into the worker bundle, where an unawaited WebAssembly.compile() crashed every cold start. The bundle check is deterministic, unlike waiting for an error to not appear.

The below issue is fixed in #23906 already, this PR is just adding the verification.
Closes #22794

@s1gr1d
s1gr1d requested review from a team as code owners September 2, 2026 09:15
@s1gr1d
s1gr1d requested review from mydea and nicohrubec and removed request for a team September 2, 2026 09:15
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 27.76 kB added added
@sentry/browser - with treeshaking flags 26.2 kB added added
@sentry/browser (incl. Tracing) 46.64 kB added added
@sentry/browser (incl. Tracing + Span Streaming) 48.42 kB added added
@sentry/browser (incl. Tracing, Profiling) 51.39 kB added added
@sentry/browser (incl. Tracing, Replay) 85.9 kB added added
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 75.52 kB added added
@sentry/browser (incl. Tracing, Replay with Canvas) 90.62 kB added added
@sentry/browser (incl. Tracing, Replay, Feedback) 103.27 kB added added
@sentry/browser (incl. Feedback) 44.94 kB added added
@sentry/browser (incl. sendFeedback) 32.56 kB added added
@sentry/browser (incl. FeedbackAsync) 37.69 kB added added
@sentry/browser (incl. Metrics) 28.85 kB added added
@sentry/browser (incl. Logs) 29.07 kB added added
@sentry/browser (incl. Metrics & Logs) 29.77 kB added added
@sentry/react 29.57 kB added added
@sentry/react (incl. Tracing) 48.9 kB added added
@sentry/vue 33.19 kB added added
@sentry/vue (incl. Tracing) 48.61 kB added added
@sentry/svelte 27.79 kB added added
CDN Bundle 30.15 kB added added
CDN Bundle (incl. Tracing) 48.6 kB added added
CDN Bundle (incl. Logs, Metrics) 31.73 kB added added
CDN Bundle (incl. Tracing, Logs, Metrics) 49.9 kB added added
CDN Bundle (incl. Replay, Logs, Metrics) 71.02 kB added added
CDN Bundle (incl. Tracing, Replay) 86.12 kB added added
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 87.43 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) 91.92 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 93.2 kB added added
CDN Bundle - uncompressed 89.89 kB added added
CDN Bundle (incl. Tracing) - uncompressed 146.87 kB added added
CDN Bundle (incl. Logs, Metrics) - uncompressed 94.6 kB added added
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 150.85 kB added added
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 219.43 kB added added
CDN Bundle (incl. Tracing, Replay) - uncompressed 266.17 kB added added
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 270.14 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 279.87 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 283.83 kB added added
@sentry/nextjs (client) 51.44 kB added added
@sentry/sveltekit (client) 47.06 kB added added
@sentry/core/server 80.61 kB added added
@sentry/core/browser 66.77 kB added added
@sentry/node-core 63.28 kB added added
@sentry/node 125.8 kB added added
@sentry/node (incl. diagnostics channel injection) 169.89 kB added added
@sentry/node/import (ESM hook with diagnostics-channel injection) 166 B added added
@sentry/node/light 51.45 kB added added
@sentry/node - without tracing 74.97 kB added added
@sentry/aws-serverless 84.23 kB added added
@sentry/cloudflare (withSentry) - minified 202.61 kB added added
@sentry/cloudflare (withSentry) 498.9 kB added added

@s1gr1d
s1gr1d force-pushed the sig/v10-cloudflare-bundle-orchestrion-e2e branch from cadae49 to dff6e13 Compare September 2, 2026 09:42
@s1gr1d
s1gr1d enabled auto-merge (squash) September 2, 2026 12:10
@s1gr1d
s1gr1d merged commit f44df80 into v10 Sep 2, 2026
40 checks passed
@s1gr1d
s1gr1d deleted the sig/v10-cloudflare-bundle-orchestrion-e2e branch September 2, 2026 12:24
s1gr1d added a commit that referenced this pull request Sep 3, 2026
…a.url shim (#23935)

This is just adding the tests of the v10 PRs to make sure we don't have
a regression.

Ported tests of two v10 PRs:
- #23910
- #23906





One test caught a real problem: the `@sentry/server-utils` CJS build
still replaced `import.meta.url` with a snippet that assumes "a
`document` global means a browser", crashing under jsdom.

```
"AssertionError: expected [Function] to not throw an error but 'TypeError [ERR_INVALID_URL_SCHEME]: T…' was thrown"
```

The v10 lazy-loading fix needs no porting: on v11, `withSentryConfig`
lives in the separate `@sentry/nextjs/config` export, so importing the
SDK never reaches the bundler plugins.


Fixes #23789
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.

2 participants