Commit c3faaeb
test(nextjs): Run nextjs-16 on Bun, Deno and Cloudflare
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>1 parent 2ac09b0 commit c3faaeb
132 files changed
Lines changed: 251 additions & 2385 deletions
File tree
- dev-packages/e2e-tests
- test-applications
- nextjs-16-bun
- app
- (nested-layout)
- nested-layout
- [dynamic]
- api/endpoint-behind-middleware
- nested-rsc-error/[param]
- pageload-tracing
- parameterized
- [one]
- beep
- [two]
- static
- route-handler/[xoxo]
- edge
- node
- streaming-rsc-error/[param]
- third-party-filter
- tests
- nextjs-16-cf-workers
- app
- (nested-layout)
- nested-layout
- [dynamic]
- api
- endpoint-behind-middleware
- test-success
- isr-test
- [product]
- static
- metrics
- route-handler
- nested-rsc-error/[param]
- non-isr-test/[item]
- pageload-tracing
- parameterized
- [one]
- beep
- [two]
- static
- prefetching
- to-be-prefetched
- redirect
- destination
- origin
- route-handler/[xoxo]
- edge
- node
- streaming-rsc-error/[param]
- public
- tests
- nextjs-16
- app
- api
- d1
- openai
- otel-context
- test-error
- propagation
- test-outgoing-fetch-external-disallowed
- check
- test-outgoing-fetch
- check
- tests
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
140 | | - | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
141 | 142 | | |
142 | 143 | | |
143 | 144 | | |
144 | 145 | | |
145 | 146 | | |
146 | 147 | | |
147 | 148 | | |
148 | | - | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
149 | 153 | | |
150 | 154 | | |
151 | 155 | | |
| |||
Lines changed: 0 additions & 44 deletions
This file was deleted.
Lines changed: 0 additions & 12 deletions
This file was deleted.
Lines changed: 0 additions & 12 deletions
This file was deleted.
Lines changed: 0 additions & 15 deletions
This file was deleted.
Lines changed: 0 additions & 12 deletions
This file was deleted.
Lines changed: 0 additions & 11 deletions
This file was deleted.
dev-packages/e2e-tests/test-applications/nextjs-16-bun/app/api/endpoint-behind-middleware/route.ts
Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 0 additions & 23 deletions
This file was deleted.
Lines changed: 0 additions & 7 deletions
This file was deleted.
0 commit comments