Releases: cloudflare/next-on-pages
@cloudflare/[email protected]
Patch Changes
-
0b1af18: add assertions for making sure that the required
setupDevBindings
options are provided -
bb18e8a: fix: ensure Durable Object stub proxies fetch Durable Objects and not their containing Worker
Previously, calling
DurableObjectStub#fetch()
would dispatch afetch
event to the Worker containing the target Durable Object, not the Durable Object itself. This change ensures thefetch
event is dispatched directly to the Durable Object. -
3dd1f20: indent
setupDevBindings
warnings -
519c6cc: add
databaseId
variant for D1s to thesetupDevBindings
D1 binding typeD1 databases can only be referenced by their ID and not name, the current implementation
wrongly accepts the database name and uses it as the database id, in order to amend this
without introducing a breaking change we add a variant of the D1 binding type that accepts
adatabaseId
field instead of thedatabaseName
for the binding and we present a warning
to users if thedatabaseName
is used instead.When a better more stable/clear API will be decided for D1 bindings we can revisit this API.
-
05b6256: remove the invalid stringification of var bindings in
next-dev
-
bb18e8a: chore: bump to
[email protected]
[email protected]
@cloudflare/[email protected]
Patch Changes
- ea73acc: fix variables not getting recorded correctly in
next-dev
@cloudflare/[email protected]
Patch Changes
- f07ea9b: Update the
next-dev
'ssetupDevBindings
API and remove the module's__experimental__
prefix
[email protected]
Patch Changes
-
ed9a4ac: remove the no-longer-necessary
no-app-not-found-runtime
rule in a backward compatible manner -
72426c2: update
no-unsupported-configs
with new configs optionsin the
no-unsupported-configs
rule handle the following new options:- logging
- optimizePackageImports
- ppr (Partial Prerendering)
- serverActions
@cloudflare/[email protected]
Patch Changes
-
a4efc7b: ignore invalid
_error
functions in the App routerIn the App router, error boundaries are implemented as client components (see: https://nextjs.org/docs/app/api-reference/file-conventions/error),
meaning that they should not produce server side logic.The Vercel build process can however generate
_error.func
lambdas (as they are useful in the
Vercel network I'd assume), through experimentation we've seen that those do not seem to be
necessary when building the application with next-on-pages so they should be safe to ignore.The changes here make such invalid
_error.func
lambdas (if present) ignored (as they would otherwise
cause the next-on-pages build process to fail) -
352bf4b: Make route matching check handle better trailing slashes
Currently having
trailingSlash
set totrue
in thenext.config.js
file
results in some routes not being correctly handled, this fix addresses such
issue
[email protected]
@cloudflare/[email protected]
Patch Changes
-
8fe72f1: make CLI arguments parsing more flexible
prior to this change the CLI arguments parsing was not too flexible and forced a specific style
For instance the only way to provide an argument for the
outdir
option was to pass it using=
as in:-o=./my-dir
or
--outdir=./my-dir
these changes make the CLI arguments parsing more flexible and don't enforce a specific style
(--outdir ./my-dir
now also works as you'd expect it to) -
20d0e0d: Fix
_not-found
functions only for applications using the App RouterIn #418 we introduced a workaround
that would delete invalid (nodejs)_not-found
functions during the build processAlthough the workaround is valid for applications using the App Router it is not
for applications only using the Pages Router, so make sure that it is only applied
when the former is used
[email protected]
@cloudflare/[email protected]
Patch Changes
-
61d0a2f: print warning in case developers are using a different package manager to run @cloudflare/next-on-pages
-
1e73555: Fix route intercepts causing 404s for the non-intercepted route.
-
1e73555: Fix route intercept modals not getting all the parameters for a route.
-
b7f9225: improve unhelpful error message (so that instead of
[object Object]
it prints the actual error message) -
bc216b4: Improved support for newer version of Next.js with the suspense cache through trying to handle soft/implicit tags properly
-
8ece962: fix external middleware rewrites
Currently Middleware rewrites (
NextResponse.rewrite()
) assume that the rewrite destination
is on the same host as the application, meaning that the following operations would work as intended:NextResponse.rewrite(new URL('/rewrite-dest', request.url));
while something like this would not:
return NextResponse.rewrite( new URL('https://my-customer-rewrite-site.come/rewrite-dest', request.url), );
Remove such assumption and allow such external rewrites to take place (as they do on Vercel)
-
bc216b4: Fix old version of Next.js not updating a cache entry properly due to not receving the correct shape they expected.