Skip to content

Commit b4f0df7

Browse files
authored
Merge branch 'opennextjs:main' into ts6
2 parents f2d15d0 + 7820ad0 commit b4f0df7

50 files changed

Lines changed: 2750 additions & 1537 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.changeset/five-gifts-hope.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
"@opennextjs/cloudflare": patch
3+
---
4+
5+
Fix Turbopack external module resolution by dynamically discovering external imports at build time.
6+
7+
When packages are listed in `serverExternalPackages`, Turbopack externalizes them via `externalImport()` which uses dynamic `await import(id)`. The bundler (ESBuild) can't statically analyze `import(id)` with a variable, so these modules aren't included in the worker bundle.
8+
9+
This patch:
10+
11+
- Discovers hashed Turbopack external module mappings from `.next/node_modules/` symlinks (e.g. `shiki-43d062b67f27bbdc``shiki`)
12+
- Scans traced chunk files for bare external imports (e.g. `externalImport("shiki")`) and subpath imports (e.g. `shiki/engine/javascript`)
13+
- Generates explicit `switch/case` entries so the bundler can statically resolve and include these modules

.changeset/fix-dynamic-requires-suffix-collision.md

Lines changed: 0 additions & 9 deletions
This file was deleted.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
"@opennextjs/cloudflare": patch
3+
---
4+
5+
fix: exclude unsupported Next.js 16 releases from peer dependencies.
6+
7+
The previous range allowed Next.js 16.0.0 through 16.2.2 without a peer dependency warning because `>=16.2.3` was already covered by `>=15.5.15`.
8+
9+
The range now explicitly supports Next.js 15.5.15 and above in the 15.x line, and Next.js 16.2.3 and above in the 16.x line.

.changeset/green-zebras-know.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@opennextjs/cloudflare": patch
3+
---
4+
5+
fix: reuse sharded tag data when filling the regional cache.
6+
7+
The sharded tag cache miss path already reads tag data from the Durable Object before answering the request. Reuse that fetched data when populating the regional cache so a shard miss does not immediately trigger a second identical Durable Object read.

.changeset/red-yaks-go.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
"@opennextjs/cloudflare": patch
3+
---
4+
5+
fix: regression where getEnvFromPlatformProxy received wrong options type
6+
7+
This fixes a regression introduced in [32ba91a](https://github.com/opennextjs/opennextjs-cloudflare/commit/32ba91a6d3fa6b9a8b2cd5a8c973c3b3eb1108f0) where `getEnvFromPlatformProxy` call sites passed `OpenNextConfig` even though the function expects Wrangler `GetPlatformProxyOptions`.
8+
9+
The fix restores the pre-[32ba91a](https://github.com/opennextjs/opennextjs-cloudflare/commit/32ba91a6d3fa6b9a8b2cd5a8c973c3b3eb1108f0) argument shape by passing `{ configPath, environment }` from CLI arguments, so env resolution follows the selected Wrangler config/environment.

create-cloudflare/next/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
"cf-typegen": "wrangler types --env-interface CloudflareEnv ./cloudflare-env.d.ts"
1414
},
1515
"dependencies": {
16-
"@opennextjs/cloudflare": "^1.17.1",
17-
"next": "16.1.5",
16+
"@opennextjs/cloudflare": "^1.19.1",
17+
"next": "16.2.3",
1818
"react": "19.1.5",
1919
"react-dom": "19.1.5"
2020
},

examples/bugs/gh-119/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"cf-typegen": "wrangler types --env-interface CloudflareEnv"
1515
},
1616
"dependencies": {
17-
"next": "15.5.10",
17+
"next": "15.5.15",
1818
"react-dom": "^18.3.1",
1919
"react": "^18.3.1"
2020
},

examples/bugs/gh-219/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"nanoid": "^5.0.9",
2929
"next-auth": "^4.24.11",
3030
"next-themes": "^0.4.4",
31-
"next": "15.5.10",
31+
"next": "15.5.15",
3232
"qrcode.react": "^4.2.0",
3333
"react-dom": "^19.0.4",
3434
"react-hook-form": "^7.54.2",

examples/bugs/gh-223/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"dependencies": {
1717
"@aws-sdk/client-s3": "^3.971.0",
1818
"@aws-sdk/s3-request-presigner": "^3.971.0",
19-
"next": "15.5.10",
19+
"next": "15.5.15",
2020
"react": "^19.0.4",
2121
"react-dom": "^19.0.4"
2222
},
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { revalidateTag } from "next/cache";
2+
3+
export const dynamic = "force-dynamic";
4+
5+
export async function GET() {
6+
// Revalidate with expire:10 to mark the tag as stale immediately and set expiry to 10 seconds later
7+
revalidateTag("revalidate-stale", { expire: 10 });
8+
9+
return new Response("ok");
10+
}

0 commit comments

Comments
 (0)