Conversation
nextjs-16 gets variants for Bun, Deno and Cloudflare Workers (OpenNext) and replaces `nextjs-16-bun` and `nextjs-16-cf-workers`. Bun, Cloudflare and Cloudflare with the latest Next.js are required jobs, as the two old apps were. Deno is optional. - Bun and Deno run `next start` on the same build as Node.js. The server config adds the integrations of `@sentry/bun` and `@sentry/deno` that replace the Node.js instrumentation these runtimes do not trigger. The e2e README now describes this, and that `variants` run as required jobs. - Cloudflare builds with `opennextjs-cloudflare` and wraps the Worker in `worker.ts` with `withSentry` from `@sentry/nextjs/cloudflare`. `pg-cloudflare` is in `serverExternalPackages`, because OpenNext copies the `workerd` build of a package only when that list has the package. - The app does not depend on `@opentelemetry/api` directly, because the OpenNext middleware bundle can not load an installed copy. `/api/otel-context` uses the copy of Next.js. - The mock AI server runs in the Playwright global setup instead of the app, because a Worker can not start a `node:http` server. Thus the OpenAI test runs on every runtime. - Tests branch on `getRuntime()` where the runtimes differ (segment origin and attributes, middleware spans in the request segment of the Worker, fetch span attributes). They skip what a runtime can not do: Node.js runtime metrics on Workers, and `pg` spans on Bun and Workers, which have no runtime module hook. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
size-limit report 📦
|
This branch has not been deployed
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 free
to 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.
Folds
nextjs-16-bunandnextjs-16-cf-workersinto runtime variants ofnextjs-16, so one suite runs on Node.js, Bun, Deno and Cloudflare Workers (OpenNext). Bun, Cloudflare and Cloudflare with the latest Next.js are required jobs, as the two old apps were. Deno is new and optional.Not obvious from the diff:
instrumentation.tson Bun and Deno too, so the app callsinit()of@sentry/nextjsthere and adds the request isolation andfetchintegrations of@sentry/bunand@sentry/deno. The e2e README now says this, and thatvariantsrun as required jobs.node:httpserver. The OpenAI test now also runs on Workers.@opentelemetry/apidirectly. When the package is at the top ofnode_modules, the OpenNext build of the Node.js middleware fails to resolve it, because OpenNext bundles its ESM build but copies only its CommonJS build. npm puts it there for every app with@sentry/nextjs, so this OpenNext bug also hits npm users with aproxy.ts.pg-cloudflareis inserverExternalPackages, because OpenNext copies theworkerdbuild of a package only for the packages in that list.Fixes #24830
🤖 Generated with Claude Code