Releases: opennextjs/opennextjs-cloudflare
Release list
@opennextjs/cloudflare@1.20.6
Patch Changes
-
#1378
7a990e7Thanks @vicb! - Bump Next to 16.3.4 and@opennextjs/awsto 4.1.4See details at https://github.com/opennextjs/opennextjs-aws/releases/tag/v4.1.4
@opennextjs/cloudflare@1.20.5
Patch Changes
-
#1374
64a69ecThanks @conico974! - chore: bump@opennextjs/awsto 4.1.3See details at https://github.com/opennextjs/opennextjs-aws/releases/tag/v4.1.3
@opennextjs/cloudflare@1.20.4
Patch Changes
-
#1365
bf52109Thanks @vicb! - chore: bump@opennextjs/awsto 4.1.2See details at https://github.com/opennextjs/opennextjs-aws/releases/tag/v4.1.2
@opennextjs/cloudflare@1.20.3
Patch Changes
-
#1361
8c31fbcThanks @vicb! - chore: bump@opennextjs/awsto 4.1.1See details at https://github.com/opennextjs/opennextjs-aws/releases/tag/v4.1.1
-
#1359
65e4487Thanks @vicb! - chore: bump the Next.js peer dependency to 15.5.24 / 16.3.3 -
#1359
65e4487Thanks @vicb! - fix: patch the Turbopack wasm helpers that Next.js 16.3 emits in the chunksUntil Next.js 16.2 the Turbopack wasm loaders were named
loadWebAssemblyand
loadWebAssemblyModulefunctions living in[turbopack]_runtime.js, which the adapter rewrote to
resolve the chunk through a staticimport(). Next.js 16.3 emits them on demand in the chunks
instead ([turbopack-wasm]/node/loadWasm.ts), so the existing patch silently stopped matching and
WebAssembly.compileStreaming- which workerd does not implement - survived into the Worker.Every wasm backed import then threw
TypeError: WebAssembly.compileStreaming is not a functionat
runtime, most visibly breaking Prisma with theworkerdclient runtime.The chunks emitted by Turbopack are now patched as well, for both the server and the Node.js
middleware bundles. -
#1309
56dfaccThanks @ScienHAC! - feature: support Node.js middleware (proxy.ts)Next.js 16 replaces
middleware.tswithproxy.tswhich always runs on the Node.js runtime.The Node.js middleware is now bundled into a Workers compatible
middleware/handler.mjs:
the OpenNext config manifests are inlined at build time (as for the edge middleware) and the
middleware compiled by Next.js is statically bundled instead of being loaded from the
filesystem at runtime (workerd can not access the filesystem nor load modules at runtime).The support is experimental and requires the
nodejs_compatcompatibility flag. -
#1359
65e4487Thanks @vicb! - fix: do not load the instrumentation hook from the Node.js middleware bundleNext.js 16.3 registers the instrumentation hook from the middleware itself when the middleware
does not run on the edge runtime, by dynamically requiring.next/server/instrumentation.js.
workerd does not support dynamic requires so every request handled by the Node.js middleware
(proxy.ts) failed withDynamic require of ".next/server/instrumentation.js" is not supported.The guard Next.js uses (
process.env.NEXT_RUNTIME !== "edge") is inlined by Next.js when it
compiles the middleware, so it can not be eliminated when the middleware is re-bundled. The loader
is stubbed out instead, which matches the edge runtime behaviour: the server function - which
shares the isolate - keeps registering the hook.
@opennextjs/cloudflare@1.20.2
Patch Changes
-
#1312
38ea40bThanks @james-elicx! - fix: handle encoded middleware and cache paths safelyUpgrade
@opennextjs/awsto prevent encoded paths from bypassing middleware matching or selecting partially decoded cache entries. -
#1313
766eee9Thanks @james-elicx! - chore: bump the Next.js peer dependency to 15.5.21 / 16.2.11 -
#1306
97ef330Thanks @james-elicx! - fix: normalize Windows paths when patching the Turbopack runtimeEnsure traced Turbopack chunks are included in the generated runtime loaders when builds run on Windows.
@opennextjs/cloudflare@1.20.1
Patch Changes
-
#1297
780a21cThanks @james-elicx! - fix: disable response compression for skew protection API requestsAvoid truncated compressed Cloudflare API responses causing worker version lookups to fail during deployment.
@opennextjs/cloudflare@1.20.0
Minor Changes
-
#1290
46c50fcThanks @james-elicx! - feature: add opt-in batch upload viarclonefor fast R2 cache population.Key Changes:
-
Optional
rcloneUpload: Install the optionalrclone.jspeer dependency and pass--rcloneto opt in torclonebased batch uploads.R2_ACCESS_KEY_IDR2_SECRET_ACCESS_KEYCF_ACCOUNT_ID
-
Explicit Opt-in: The existing worker-based population path remains the default.
rcloneis only loaded when--rcloneis used for a remote cache. -
Clear Errors: The CLI reports missing credentials or a missing
rclone.jsinstallation when the option is used.
Usage:
Install
rclone.js, then add the secrets in a.env/.dev.varsfile in your project root:pnpm add rclone.js pnpm approve-builds # select rclone.js pnpm rebuild rclone.js R2_ACCESS_KEY_ID=your_key R2_SECRET_ACCESS_KEY=your_secret CF_ACCOUNT_ID=your_account opennextjs-cloudflare deploy --rcloneYou can also set the environment variables for CI builds.
Notes:
- You can follow documentation https://developers.cloudflare.com/r2/api/tokens/ for creating API tokens with appropriate permissions for R2 access.
rclonemay not be supported on all platforms.
-
Patch Changes
-
#1289
eef243fThanks @thatssoheil! - fix: spread SQLite bindings in BucketCachePurge alarm so tag purges runBucketCachePurge.alarm()passed its tag bindings toSqlStorage.execas a
single array.exec(query, ...bindings)is variadic over its bindings, so for a
multi-tagDELETE ... WHERE tag IN (?, ?, …)the binding count (1) disagreed
with the placeholder count (N) andexecthrew "Wrong number of parameter
bindings" on every flush. On-demandrevalidateTagpurges therefore never
reached the Cloudflare cache, and withbypassTagCacheOnCacheHitenabled pages
served stale until the ISR TTL expired.Spread the bindings, normalise the
INSERTto the same variadic form, and
tighten the drain loop's guard fromwhile (tags.length >= 0)(which never
exits via the condition) towhile (tags.length > 0). -
#1291
51439b1Thanks @james-elicx! - fix: disable response compression when provisioning R2 cache bucketsAvoid truncated compressed Cloudflare API responses causing R2 cache bucket provisioning to fail.
@opennextjs/cloudflare@1.19.11
Patch Changes
-
#1270
802047eThanks @alex-all3dp! - fix: skip non-upload-triggered worker versions when building skew-protection deployment mappingWorker versions created by metadata-only operations (e.g. Cloudflare API secret updates) do not include the static assets bundle. Previously, such versions could become the "latest" target in the skew-protection mapping, causing
/_next/static/*requests to return 404 on past deployments. Versions are now filtered to those withworkers/triggered_byin{upload, version_upload}.Closes #1230
@opennextjs/cloudflare@1.19.10
Patch Changes
-
#1261
780dd4fThanks @vicb! - Allow populating R2 when the domain is protected by Cloudflare AccessYou need to:
- create a "Service Auth" policy for "open-next-cache-populate..workers.dev"
- add an "Include" rule for "Any Access Service Token" or for a given service token ("Service Token")
- populate the env variables CLOUDFLARE_ACCESS_CLIENT_ID and CLOUDFLARE_ACCESS_CLIENT_SECRET
@opennextjs/cloudflare@1.19.9
Patch Changes
- #1259
3b35c6eThanks @vicb! - chore: bump Next.js to 15.5.18 / 16.2.6 and @opennextjs/aws to 4.0.2