Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/create-next-app/wrangler.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "node_modules/wrangler/config-schema.json",
"main": ".open-next/worker.js",
"name": "create-next-app",
"compatibility_date": "2024-12-30",
"compatibility_date": "2026-04-15",
"compatibility_flags": ["nodejs_compat", "global_fetch_strictly_public"],
"assets": {
"directory": ".open-next/assets",
Expand Down
2 changes: 1 addition & 1 deletion examples/e2e/app-pages-router/wrangler.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "node_modules/wrangler/config-schema.json",
"main": ".open-next/worker.js",
"name": "app-pages-router",
"compatibility_date": "2024-12-30",
"compatibility_date": "2026-04-15",
"compatibility_flags": ["nodejs_compat", "global_fetch_strictly_public"],
"assets": {
"directory": ".open-next/assets",
Expand Down
2 changes: 1 addition & 1 deletion examples/e2e/app-router/wrangler.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "node_modules/wrangler/config-schema.json",
"main": ".open-next/worker.js",
"name": "app-router",
"compatibility_date": "2024-12-30",
"compatibility_date": "2026-04-15",
"compatibility_flags": ["nodejs_compat", "global_fetch_strictly_public"],
"assets": {
"directory": ".open-next/assets",
Expand Down
2 changes: 1 addition & 1 deletion examples/e2e/experimental/wrangler.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "node_modules/wrangler/config-schema.json",
"main": ".open-next/worker.js",
"name": "experimental",
"compatibility_date": "2024-12-30",
"compatibility_date": "2026-04-15",
"compatibility_flags": ["nodejs_compat", "global_fetch_strictly_public"],
"assets": {
"directory": ".open-next/assets",
Expand Down
2 changes: 1 addition & 1 deletion examples/e2e/pages-router/wrangler.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "node_modules/wrangler/config-schema.json",
"main": ".open-next/worker.js",
"name": "pages-router",
"compatibility_date": "2024-12-30",
"compatibility_date": "2026-04-15",
"compatibility_flags": ["nodejs_compat", "global_fetch_strictly_public"],
"assets": {
"directory": ".open-next/assets",
Expand Down
2 changes: 1 addition & 1 deletion examples/middleware/wrangler.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "node_modules/wrangler/config-schema.json",
"main": ".open-next/worker.js",
"name": "middleware",
"compatibility_date": "2024-12-30",
"compatibility_date": "2026-04-15",
"compatibility_flags": ["nodejs_compat", "global_fetch_strictly_public"],
"assets": {
"directory": ".open-next/assets",
Expand Down
2 changes: 1 addition & 1 deletion examples/next-partial-prerendering/wrangler.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "node_modules/wrangler/config-schema.json",
"main": ".open-next/worker.js",
"name": "next-partial-prerendering",
"compatibility_date": "2024-12-30",
"compatibility_date": "2026-04-15",
"compatibility_flags": ["nodejs_compat", "global_fetch_strictly_public"],
"assets": {
"directory": ".open-next/assets",
Expand Down
2 changes: 1 addition & 1 deletion examples/overrides/d1-tag-next/wrangler.e2e.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "node_modules/wrangler/config-schema.json",
"main": ".open-next/worker.js",
"name": "ssg-app",
"compatibility_date": "2025-02-04",
"compatibility_date": "2026-04-15",
"compatibility_flags": ["nodejs_compat", "global_fetch_strictly_public"],
"assets": {
"directory": ".open-next/assets",
Expand Down
2 changes: 1 addition & 1 deletion examples/overrides/kv-tag-next/wrangler.e2e.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "node_modules/wrangler/config-schema.json",
"main": ".open-next/worker.js",
"name": "ssg-app",
"compatibility_date": "2025-02-04",
"compatibility_date": "2026-04-15",
"compatibility_flags": ["nodejs_compat", "global_fetch_strictly_public"],
"assets": {
"directory": ".open-next/assets",
Expand Down
2 changes: 1 addition & 1 deletion examples/overrides/memory-queue/wrangler.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "node_modules/wrangler/config-schema.json",
"main": ".open-next/worker.js",
"name": "memory-queue",
"compatibility_date": "2025-02-04",
"compatibility_date": "2026-04-15",
"compatibility_flags": ["nodejs_compat", "global_fetch_strictly_public"],
"assets": {
"directory": ".open-next/assets",
Expand Down
2 changes: 1 addition & 1 deletion examples/overrides/r2-incremental-cache/wrangler.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "node_modules/wrangler/config-schema.json",
"main": ".open-next/worker.js",
"name": "r2-incremental-cache",
"compatibility_date": "2025-02-04",
"compatibility_date": "2026-04-15",
"compatibility_flags": ["nodejs_compat", "global_fetch_strictly_public"],
"assets": {
"directory": ".open-next/assets",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "node_modules/wrangler/config-schema.json",
"main": ".open-next/worker.js",
"name": "static-assets-incremental-cache",
"compatibility_date": "2025-02-04",
"compatibility_date": "2026-04-15",
"compatibility_flags": ["nodejs_compat", "global_fetch_strictly_public"],
"assets": {
"directory": ".open-next/assets",
Expand Down
2 changes: 1 addition & 1 deletion examples/playground14/wrangler.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "node_modules/wrangler/config-schema.json",
"main": "worker.ts",
"name": "playground14",
"compatibility_date": "2024-12-30",
"compatibility_date": "2026-04-15",
"compatibility_flags": ["nodejs_compat", "global_fetch_strictly_public"],
"assets": {
"directory": ".open-next/assets",
Expand Down
2 changes: 1 addition & 1 deletion examples/playground15/wrangler.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "node_modules/wrangler/config-schema.json",
"main": ".open-next/worker.js",
"name": "playground15",
"compatibility_date": "2025-09-15",
"compatibility_date": "2026-04-15",
"compatibility_flags": ["nodejs_compat", "global_fetch_strictly_public", "enable_request_signal"],
"assets": {
"directory": ".open-next/assets",
Expand Down
2 changes: 1 addition & 1 deletion examples/playground16/wrangler.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "node_modules/wrangler/config-schema.json",
"main": ".open-next/worker.js",
"name": "playground16",
"compatibility_date": "2025-09-15",
"compatibility_date": "2026-04-15",
"compatibility_flags": ["nodejs_compat", "global_fetch_strictly_public", "enable_request_signal"],
"assets": {
"directory": ".open-next/assets",
Expand Down
2 changes: 1 addition & 1 deletion examples/prisma/wrangler.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "node_modules/wrangler/config-schema.json",
"main": ".open-next/worker.js",
"name": "api",
"compatibility_date": "2024-12-30",
"compatibility_date": "2026-04-15",
"compatibility_flags": ["nodejs_compat", "global_fetch_strictly_public"],
"assets": {
"directory": ".open-next/assets",
Expand Down
2 changes: 1 addition & 1 deletion examples/ssg-app/wrangler.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "node_modules/wrangler/config-schema.json",
"main": ".open-next/worker.js",
"name": "ssg-app",
"compatibility_date": "2025-02-04",
"compatibility_date": "2026-04-15",
"compatibility_flags": ["nodejs_compat", "global_fetch_strictly_public"],
"assets": {
"directory": ".open-next/assets",
Expand Down
2 changes: 1 addition & 1 deletion examples/vercel-blog-starter/wrangler.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "node_modules/wrangler/config-schema.json",
"main": ".open-next/worker.js",
"name": "vercel-blog-starter-on-workers",
"compatibility_date": "2024-12-30",
"compatibility_date": "2026-04-15",
"compatibility_flags": ["nodejs_compat", "global_fetch_strictly_public"],
"assets": {
"directory": ".open-next/assets",
Expand Down
14 changes: 14 additions & 0 deletions packages/cloudflare/src/cli/build/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,20 @@ export async function build(
const { aws, cloudflare } = getVersion();
logger.info(`@opennextjs/cloudflare version: ${cloudflare}`);
logger.info(`@opennextjs/aws version: ${aws}`);
if (wranglerConfig.compatibility_date) {
const sixMonthsAgoMs = Date.now() - 6 * 30 * 24 * 60 * 60 * 1000;
const compatDateMs = new Date(wranglerConfig.compatibility_date).getTime();
if (!isNaN(compatDateMs)) {
const dateMessage = `workerd compatibility_date: ${wranglerConfig.compatibility_date}`;
if (compatDateMs < sixMonthsAgoMs) {
logger.warn(
`${dateMessage}, consider updating your wrangler config to a more recent date to benefit from the latest features and fixes.`
);
} else {
logger.info(`${dateMessage}`);
}
}
}

// Clean the output directory before building the Next app.
buildHelper.initOutputDir(options);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export function findWranglerConfig(appDir: string): string | undefined {
*/
export async function createWranglerConfigFile(
projectDir: string,
defaultCompatDate = "2026-02-01"
defaultCompatDate = "2026-04-15"
): Promise<{ cachingEnabled: boolean }> {
const workerName = getWorkerName(projectDir);
const compatibilityDate = (await getLatestCompatDate()) ?? defaultCompatDate;
Expand Down
Loading
Loading