Releases: opennextjs/opennextjs-cloudflare
@opennextjs/[email protected]
Minor Changes
-
#499
5037f57Thanks @vicb! - Refactor the codebase for consistencyBREAKING CHANGE
Overrides:
Overrides now live in
@opennextjs/cloudflare/overridesand some files have been renamed.- Incremental cache overrides:
@opennextjs/cloudflare/overrides/incremental-cache/... - Tag cache overrides:
@opennextjs/cloudflare/overrides/tag-cache/... - Queue overrides:
@opennextjs/cloudflare/overrides/queue/...
For example the KV incremental cache override can be imported as
@opennextjs/cloudflare/overrides/incremental-cache/kv-incremental-cache.Environment variables and bindings name changes:
NEXT_CACHE_WORKERS_KV->NEXT_INC_CACHE_KVNEXT_CACHE_R2_...->NEXT_INC_CACHE_R2_...NEXT_CACHE_D1->NEXT_TAG_CACHE_D1NEXT_CACHE_DO_...->NEXT_TAG_CACHE_DO_...NEXT_CACHE_DO_REVALIDATION->NEXT_CACHE_DO_QUEUENEXT_CACHE_REVALIDATION_WORKER->WORKER_SELF_REFERENCE
Other:
NEXT_CACHE_D1_TAGS_TABLEandNEXT_CACHE_D1_REVALIDATIONS_TABLEhave been dropped.
The tables have a fixed namestagsandrevalidations. - Incremental cache overrides:
-
#479
0c93e8bThanks @james-elicx! - feat: commands for cli actionsThe OpenNext Cloudflare CLI now uses the following commands;
build: build the applicationpopulateCache: populate either the local or remote cachepreview: populate the local cache and start a dev serverdeploy: populate the remote cache and deploy to production
-
#490
00f6071Thanks @vicb! - Drop the deprecated kvCache in favor of kv-cache
Patch Changes
-
#487
0702d2eThanks @james-elicx! - feat: support passing the wrangler environment when populating the cache -
#480
e0ec01dThanks @conico974! - fix deduplication for memory queue and add some log -
#481
9b0db4dThanks @conico974! - fixres.revalidatenot working in page router api route -
#484
6ce5643Thanks @conico974! - Add sharding replication for the Durable Object Tag Cache -
#470
2650043Thanks @conico974! - feat: add a sharded SQLite Durable object implementation for the tag cache -
#485
ced7d46Thanks @conico974! - add an option for disabling sqlite on the durable object queue -
#460
60171f5Thanks @conico974! - feat: durable object de-duping revalidation queue -
#436
86c0139Thanks @james-elicx! - feat: auto-populating d1 cache data -
#464
acfc7f3Thanks @conico974! - Implement next mode for d1 tag cache that will reduce write -
#486
25a8f4cThanks @conico974! - auto create table for D1NextModeTagCache -
#443
54508ffThanks @james-elicx! - feat: r2 adapter for the incremental cache -
#491
e9dc621Thanks @vicb! - Serve/cdn-cgi/image/...images in dev
@opennextjs/[email protected]
@opennextjs/[email protected]
@opennextjs/[email protected]
Patch Changes
-
#445
6a389feThanks @james-elicx! - fix: deployed worker unable to invoke itself in memory queueIn deployments, Cloudflare Workers are unable to invoke workers on the same account via fetch, and the recommended way to call a worker is to use a service binding. This change switches to use service bindings for the memory queue to avoid issues with worker-to-worker subrequests.
To continue using the memory queue, add a service binding to your wrangler config for the binding
NEXT_CACHE_REVALIDATION_WORKER.{ "services": [ { "binding": "NEXT_CACHE_REVALIDATION_WORKER", "service": "<WORKER_NAME>" } ] }
@opennextjs/[email protected]
Patch Changes
- #441
4966779Thanks @conico974! - Fix forInvariant: renderHTML should not be called in minimal mode
@opennextjs/[email protected]
Patch Changes
-
#431
9ad6714Thanks @HyperKiko! - fix pages api routesfixed pages api routes by inlining a dynamic require in the
NodeModuleLoaderclass
@opennextjs/[email protected]
@opennextjs/[email protected]
Patch Changes
-
#412
58b200fThanks @dario-piotrowicz! - adddefineCloudflareConfigutilitythis change adds a new
defineCloudflareConfigutility that developers can use in theiropen-next.config.ts
file to easily generate a configuration compatible with the adapterExample usage:
// open-next.config.ts import { defineCloudflareConfig } from "@opennextjs/cloudflare"; import kvIncrementalCache from "@opennextjs/cloudflare/kv-cache"; export default defineCloudflareConfig({ incrementalCache: kvIncrementalCache, });
@opennextjs/[email protected]
@opennextjs/[email protected]
Patch Changes
-
#320
ff2dd55Thanks @james-elicx! - feat: d1 adapter for the tag cache -
#409
a604c85Thanks @dario-piotrowicz! - make sure that instrumentation files workcurrently instrumentation files
in applications built using the adapter are ignored, the changes here
make sure that those are instead properly included in the applications -
#410
d30424bThanks @dario-piotrowicz! - removeevalcalls introduced bydepdwrapped functionsSome dependencies of Next.js (
raw-bodyandsend) usedepdto deprecate some of their functions,
depdusesevalto generate a deprecated version of such functions, this causesevalwarnings in
the terminal even if these functions are never called, the changes here by patching the depdwrapfunction
function so that it still retains the same type of behavior but without usingeval -
#404
12d385dThanks @dario-piotrowicz! - fix incorrect (sync)getCloudflareContexterror messagecurrently
getCloudflareContextrun in sync mode at the top level of a not static route
gives a misleading error message saying that the function needs to be run in a not static
route, the changes here correct this error message clarifying that the problem actually is