Skip to content

Commit 9c3b797

Browse files
Version Packages (#1358)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 65e4487 commit 9c3b797

7 files changed

Lines changed: 48 additions & 59 deletions

File tree

.changeset/chatty-bars-bathe.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

.changeset/clean-banks-like.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/nervous-moons-hide.md

Lines changed: 0 additions & 17 deletions
This file was deleted.

.changeset/proxy-node-middleware.md

Lines changed: 0 additions & 14 deletions
This file was deleted.

.changeset/rude-hoops-clap.md

Lines changed: 0 additions & 15 deletions
This file was deleted.

packages/cloudflare/CHANGELOG.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,52 @@
11
# @opennextjs/cloudflare
22

3+
## 1.20.3
4+
5+
### Patch Changes
6+
7+
- [#1361](https://github.com/opennextjs/opennextjs-cloudflare/pull/1361) [`8c31fbc`](https://github.com/opennextjs/opennextjs-cloudflare/commit/8c31fbcd197d30b940354233cbff091264be7a58) Thanks [@vicb](https://github.com/vicb)! - chore: bump `@opennextjs/aws` to 4.1.1
8+
9+
See details at <https://github.com/opennextjs/opennextjs-aws/releases/tag/v4.1.1>
10+
11+
- [#1359](https://github.com/opennextjs/opennextjs-cloudflare/pull/1359) [`65e4487`](https://github.com/opennextjs/opennextjs-cloudflare/commit/65e44874d881f8ed6e0324c90e0ba43744c3b26c) Thanks [@vicb](https://github.com/vicb)! - chore: bump the Next.js peer dependency to 15.5.24 / 16.3.3
12+
13+
- [#1359](https://github.com/opennextjs/opennextjs-cloudflare/pull/1359) [`65e4487`](https://github.com/opennextjs/opennextjs-cloudflare/commit/65e44874d881f8ed6e0324c90e0ba43744c3b26c) Thanks [@vicb](https://github.com/vicb)! - fix: patch the Turbopack wasm helpers that Next.js 16.3 emits in the chunks
14+
15+
Until Next.js 16.2 the Turbopack wasm loaders were named `loadWebAssembly` and
16+
`loadWebAssemblyModule` functions living in `[turbopack]_runtime.js`, which the adapter rewrote to
17+
resolve the chunk through a static `import()`. Next.js 16.3 emits them on demand in the chunks
18+
instead (`[turbopack-wasm]/node/loadWasm.ts`), so the existing patch silently stopped matching and
19+
`WebAssembly.compileStreaming` - which workerd does not implement - survived into the Worker.
20+
21+
Every wasm backed import then threw `TypeError: WebAssembly.compileStreaming is not a function` at
22+
runtime, most visibly breaking Prisma with the `workerd` client runtime.
23+
24+
The chunks emitted by Turbopack are now patched as well, for both the server and the Node.js
25+
middleware bundles.
26+
27+
- [#1309](https://github.com/opennextjs/opennextjs-cloudflare/pull/1309) [`56dfacc`](https://github.com/opennextjs/opennextjs-cloudflare/commit/56dfacc1cdeb6422eb59b23dcc80dc844e5f2529) Thanks [@ScienHAC](https://github.com/ScienHAC)! - feature: support Node.js middleware (`proxy.ts`)
28+
29+
Next.js 16 replaces `middleware.ts` with `proxy.ts` which always runs on the Node.js runtime.
30+
31+
The Node.js middleware is now bundled into a Workers compatible `middleware/handler.mjs`:
32+
the OpenNext config manifests are inlined at build time (as for the edge middleware) and the
33+
middleware compiled by Next.js is statically bundled instead of being loaded from the
34+
filesystem at runtime (workerd can not access the filesystem nor load modules at runtime).
35+
36+
The support is experimental and requires the `nodejs_compat` compatibility flag.
37+
38+
- [#1359](https://github.com/opennextjs/opennextjs-cloudflare/pull/1359) [`65e4487`](https://github.com/opennextjs/opennextjs-cloudflare/commit/65e44874d881f8ed6e0324c90e0ba43744c3b26c) Thanks [@vicb](https://github.com/vicb)! - fix: do not load the instrumentation hook from the Node.js middleware bundle
39+
40+
Next.js 16.3 registers the instrumentation hook from the middleware itself when the middleware
41+
does not run on the edge runtime, by dynamically requiring `.next/server/instrumentation.js`.
42+
workerd does not support dynamic requires so every request handled by the Node.js middleware
43+
(`proxy.ts`) failed with `Dynamic require of ".next/server/instrumentation.js" is not supported`.
44+
45+
The guard Next.js uses (`process.env.NEXT_RUNTIME !== "edge"`) is inlined by Next.js when it
46+
compiles the middleware, so it can not be eliminated when the middleware is re-bundled. The loader
47+
is stubbed out instead, which matches the edge runtime behaviour: the server function - which
48+
shares the isolate - keeps registering the hook.
49+
350
## 1.20.2
451

552
### Patch Changes

packages/cloudflare/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@opennextjs/cloudflare",
33
"description": "Cloudflare builder for next apps",
4-
"version": "1.20.2",
4+
"version": "1.20.3",
55
"type": "module",
66
"scripts": {
77
"clean": "rimraf dist",

0 commit comments

Comments
 (0)