Commit Graph

1143 Commits

Author SHA1 Message Date
James Anderson bcd4e44d96 feat(build): support prerender vite config (#2415)
* feat(build): support prerender vite config

* feat(init): offer prerender config opt-in

* fix(cloudflare): export prerender deploy helper

* fix(cloudflare): avoid redundant prerender config load

* fix(build): quiet adapter fallback warnings
2026-06-29 19:16:08 +01:00
James Anderson a3910e7aa9 feat(cloudflare): add unified worker entry (#2416)
* feat(cloudflare): add default pages router worker entry

* feat(cloudflare): add unified worker entry

* chore(web): use unified worker entry

* chore(examples): use built-in workers-cache entry

* chore(examples): keep hackernews on app router entry

* chore(cloudflare): rename unified entry to fetch handler

* chore(cloudflare): keep pages entry source helper test-local
2026-06-29 17:33:51 +00:00
James Anderson 0a48f0f7fb feat(cloudflare): move deploy command to cloudflare package (#2405)
* feat(cloudflare): move deploy command to cloudflare package

* fix(cloudflare): expose deploy cli bin
2026-06-29 16:47:28 +00:00
Nathan Nguyen 25f3d09332 test(e2e): wait for hydration before dev overlay recovery click (#2410)
The dev overlay recovery spec armed its reload canary after only confirming that the navigation runtime existed. That was not enough to prove the app-router client tree had hydrated the Link handler, so CI could occasionally follow the anchor as a hard navigation before the soft-nav path was ready.

Reuse the shared app-router hydration helper before setting the canary and clicking the recovery link. The test still exercises the real browser click path, but no longer races client hydration.
2026-06-29 17:44:28 +01:00
Nathan Nguyen 23ed801656 fix(e2e): stabilize nav regression suspense window (#2408)
* fix(e2e): stabilize nav regression suspense window

* test(e2e): strengthen nav regression flake guard
2026-06-29 16:57:29 +01:00
Boy Steven 0a9eb33a50 docs(nextjs-compat): refresh resolved OpenNext tracking (#2403) 2026-06-29 15:37:57 +01:00
James Anderson 31e87439df fix(pages-router): retain prefetched SSG data (#2366)
* fix(pages-router): retain prefetched SSG data

* fix(pages-router): align SSG export detection

* fix(pages-router): skip data prefetch for non-SSG routes

* fix(pages-router): align data navigation with Next.js

* chore: avoid exporting middleware matcher helper type

* fix(pages-router): preserve client navigation effects

* fix(pages-router): preserve query rewrite history timing

* fix(pages-router): keep data fetch startup synchronous

* fix(pages-router): keep superseded data fetches alive

* fix(pages-router): skip nonmatching redirect matcher awaits

* fix(pages-router): reuse middleware SSR prefetch data

* Fix pages data prefetch CI regressions

* fix(pages-router): evict middleware prefetch cache
2026-06-29 14:52:35 +01:00
James Anderson 4f5ab7b46b fix(pages): pass req res to document initial props (#2402) 2026-06-29 12:17:13 +01:00
James Anderson 69e0051cf7 fix(pages): expose parsed cookies on request objects (#2401) 2026-06-29 11:29:35 +01:00
James Anderson 6cbe7cdd18 fix(ci): handle npm-pinned deploy fixtures (#2400) 2026-06-29 11:12:05 +01:00
Nathan Nguyen 4a88a9c9e9 fix(ci): avoid loading commit diffs in benchmark validation (#2397)
The trusted benchmark publisher validates measuredAt by fetching commit metadata with gh api. Using the repository commit endpoint also returns commit diff files and stats, which can exceed Node's default child process output buffer for large merge commits.

Fetch the raw Git commit object instead, which still exposes committer.date without diff payloads. Update the validator tests to expect the lighter Git Database endpoint and response shape.
2026-06-29 09:55:55 +01:00
James Anderson 011349b858 fix(app-router): match generated params case-insensitively (#2351)
* fix(app-router): match generated params case-insensitively

* test(app-router): preserve requested static param casing
2026-06-28 23:14:14 +00:00
James Anderson 56772ed310 fix(build): resolve framework-owned SWC helpers (#2357)
* fix(build): resolve framework-owned SWC helpers

* fix(test): preserve shared node_modules during deploy prepare
2026-06-29 00:11:42 +01:00
James Anderson 8fccb026e5 fix(app-router): honor basePath opt-out rewrites (#2362)
* fix(app-router): honor basepath opt-out rewrites

* fix(app-router): preserve basePath opt-out redirects

* fix(app-router): harden basePath opt-out routing

* fix(app-router): admit basePath middleware requests

* fix(app-router): reject untouched basePath misses

* fix(app-router): scope pages fallback rewrites
2026-06-29 00:11:29 +01:00
James Anderson 0ea90fdbaa fix(app-router): preserve layouts across soft navigation (#2316)
* test(app-router): reproduce server layout identity reset

* fix(app-router): preserve soft navigation layout identity

* test(app-router): model bfcache identities in reducer fixtures

* fix(app-router): refresh layouts after revalidating actions

* fix(navigation): balance history restore snapshots

* fix(app-router): refresh layout elements during HMR commits
2026-06-28 23:07:55 +00:00
James Anderson 18e618c53e fix(app-router): preserve primary parallel route slot (#2347)
* fix(app-router): preserve primary parallel route slot

* test(app-router): match parallel default layout parity

* fix(app-router): prefer nearest parallel children owner

* fix(app-router): preserve mounted slot state after HMR

* test(app-router): wait for selected parallel slot before HMR
2026-06-28 22:59:48 +00:00
James Anderson f67f872b88 fix(app-router): preserve named parallel slot state (#2246)
* fix(app-router): preserve named layout segments

* fix(app-router): preserve named slots on replace

* fix(app-router): preserve named slots through hmr

* fix(app-router): settle named slot review races

* fix(app-router): reject superseded hmr payloads

* fix(app-router): preserve committed named segments

* fix(app-router): resolve intercepted named slot segments

* fix(app-router): preserve unmatched named segments

* fix(app-router): prioritize navigation over pending hmr

* fix(app-router): keep navigation authority over hmr

* fix(app-router): preserve hmr authority for stale lanes

* fix(app-router): preserve page segment marker
2026-06-28 22:35:23 +00:00
James Anderson ad14e9b039 fix(app-router): avoid repeated hover prefetches (#2396)
* fix(app-router): avoid repeated hover prefetches

* fix(app-router): floor prefetch fallback stale time
2026-06-28 23:24:30 +01:00
James Anderson f0ba7b4afe fix(app-router): reuse committed client cache payloads (#2251)
* fix(app-router): seed client navigation cache

* fix(cache): parse prerender cache metadata marker

* test(cache): cover prerender metadata done marker

* fix(cache): preserve static committed stale time

* fix(link): honor dynamic stale time for auto prefetches

* fix(router): retain committed client cache state

* fix(router): publish client cache after commit

* fix(router): gate hydration cache publication

* fix(router): guard late client cache publication

* fix(router): isolate client cache parity coverage

* fix(router): preserve authoritative navigation commits

* fix(router): preserve committed navigation streams
2026-06-28 22:01:58 +00:00
MaxtuneLee c602026b6d fix(app-router): normalize trailing slash in implicit cache tags (#2390)
* fix(app-router): normalize trailing slash in implicit cache tags for revalidatePath

* docs: remove unnecessary comments

* style: format files
2026-06-28 20:50:18 +01:00
Yunfei He 2b61f3fd29 perf(metadata): cache scanMetadataFiles to skip the redundant 2nd per-build app-tree walk (#2394)
* perf(metadata): cache the per-build app metadata-file scan

* fix(metadata): invalidate cache on opengraph/twitter alt-text sidecars

scanMetadataFiles folds `*.alt.txt` sidecars into a static social image
route's altFilePath via an existsSync probe, but isMetadataRouteFile did
not treat them as route files. With the new per-appDir scan cache, adding
or removing an alt sidecar in dev no longer triggered invalidation, so
the cached scan kept a stale altFilePath. Match the sidecars in the dev
invalidation predicate so the metadata cache clears and re-scans.

---------

Co-authored-by: James Anderson <james@eli.cx>
2026-06-28 19:30:38 +00:00
Nathan Nguyen 9382007bce test(perf): pin benchmark validator repository in fork CI (#2387)
Benchmark validator tests mock GitHub API paths for cloudflare/vinext, but fork CI sets GITHUB_REPOSITORY to the fork owner.

Pin the spawned validator process to cloudflare/vinext so the test remains hermetic across upstream and fork push runs.
2026-06-28 16:51:31 +01:00
James Anderson da086c0d65 Revert flaky "fix(link): start viewport prefetches immediately" (#2386)
This reverts commit 06775d3694.
2026-06-27 00:23:40 +01:00
James Anderson 13c093926c fix(test): stop autoscroll fixture servers correctly (#2384) 2026-06-26 23:03:46 +01:00
James Anderson 1593d4ce93 fix(app-router): scroll past existing hoisted styles (#2356)
* fix(app-router): scroll past existing hoisted styles

* test(app-router): restore document descriptor
2026-06-26 21:46:01 +01:00
James Anderson 9faa43e148 fix(app-router): include page segment in flight state (#2359)
* fix(app-router): include page segment in flight state

* fix(app-router): keep page marker internal
2026-06-26 21:44:20 +01:00
James Anderson a21667fd09 fix(app-router): discover nested leaf slot routes (#2350)
* fix(app-router): discover nested leaf slot routes

* test(routing): align nested leaf slot expectation

* test(routing): assert nested leaf route match

* fix(app-router): scope nested leaf slot discovery
2026-06-26 21:42:15 +01:00
James Anderson cab6622ce8 fix(app-router): restore intercepted history slots (#2363)
* fix(app-router): restore intercepted history slots

* fix(app-router): scope interception restore proof
2026-06-26 21:41:12 +01:00
James Anderson 7cad67080e fix(server): restore client trace metadata parity (#2371)
* fix(server): restore client trace metadata parity

* fix(server): use recorded spans for trace metadata

* test(server): cover active trace metadata spans

* fix(server): fail open for trace metadata propagation

* docs(server): clarify trace metadata lifecycle
2026-06-26 21:40:19 +01:00
James Anderson 4edd1e1b1c fix(css): support namespace CSS Module imports (#2345)
* fix(css): support namespace CSS Module imports

* fix(css): preserve CSS Module query semantics

* fix(css): parse JavaScript components as JSX

* fix(css): harden CSS Module import compatibility

* fix(css): order compiled MDX compatibility last
2026-06-26 21:39:12 +01:00
James Anderson 06775d3694 fix(link): start viewport prefetches immediately (#2229)
* fix(link): start viewport prefetches immediately

* fix(navigation): skip client prefetches for bots
2026-06-26 20:38:28 +00:00
James Anderson 737532aaa8 fix(app-router): preserve interception across middleware rewrites (#2342) 2026-06-26 21:36:48 +01:00
James Anderson e4f5a0e56b fix(app-router): honor global not found opt-in (#2340)
* fix(app-router): honor global not found opt-in

* fix(app-router): render default global 404 standalone

* test(app-router): avoid fixture workspace lockfile entry

* test(app-router): keep fixture esm outside workspace

* fix(app-router): add default global 404 shell

* test(app-router): cover client not found boundary

* fix(app-router): gate global not found discovery
2026-06-26 21:34:25 +01:00
James Anderson 5c1e870ace fix(router): honor middleware app rewrites for page links (#2339)
* fix(router): honor middleware app rewrites for page links

* fix(router): preserve masked page data targets

* fix(router): keep non-middleware data fetch timing

* docs(router): explain middleware data handoff invariants
2026-06-26 21:33:23 +01:00
James Anderson 0c18c9f20a fix(app-router): replay prerendered preload headers (#2333)
* fix(app-router): replay prerendered preload headers

* fix(app-router): retain preload headers during ISR

* fix(app-router): reuse ISR font preload snapshot
2026-06-26 21:32:22 +01:00
James Anderson 859a0aac15 fix(app-router): bind layout-only children defaults (#2335)
* fix(app-router): bind layout-only children defaults

* fix(app-router): preserve standalone slot owners

* fix(app-router): ghost fallback catch-all owners
2026-06-26 21:31:02 +01:00
James Anderson 592a50b76d fix(test): pin deploy suite init to node (#2383) 2026-06-26 20:26:04 +00:00
James Anderson 50e2385986 fix(form): match Next.js navigation parity (#2245)
* fix(form): match Next.js navigation parity

* fix(form): block dangerous navigation schemes

* fix(form): address Pages navigation review

* fix(form): preserve native and hard navigation fallbacks
2026-06-26 19:56:06 +00:00
James Anderson 70c500bf65 fix(app-router): scope static params across parallel routes (#2317)
* fix(app-router): scope static params across parallel routes

* fix(app-router): collect static params from parallel layouts

* style(app-router): format parallel route fixtures

* fix(app-router): scope parallel segment params
2026-06-26 20:52:20 +01:00
James Anderson feb27e8422 fix(client): isolate Pages Router module graph (#2380)
* fix(client): isolate Pages Router module graph

* fix(client): trim hybrid route ownership graph

* fix(router): preserve document-only hard navigation
2026-06-26 20:52:13 +01:00
James Anderson 4bc2dd3235 fix(image): match App Router deploy parity (#2310)
* fix(image): restore app router deploy parity

* test(image): expect configured optimizer widths

* fix(image): match responsive width selection
2026-06-26 20:36:27 +01:00
James Anderson c5bd7b33c2 fix(app-router): skip prefetches for bots (#2323)
* fix(app-router): skip prefetches for bots

* fix(link): scope bot suppression to app prefetch

* fix(app-router): skip form prefetches for bots
2026-06-26 19:59:29 +01:00
James Anderson 77d67a98c4 fix(cache): bypass unstable cache in draft mode (#2319)
* fix(cache): bypass unstable cache in draft mode

* fix(cache): preserve draft state during action rerenders
2026-06-26 19:58:36 +01:00
James Anderson 89036154cc fix(pages-router): unify client asset bootstrap (#2378)
* fix(pages-router): hydrate worker-backed dev pages

* refactor(pages-router): unify client asset bootstrap

* fix(app): preinitialize bootstrap dependencies

* test(app): distinguish preinit scripts from bootstrap

* fix(app): root-anchor bootstrap preinit modules

* test(app): cover bootstrap preinitialization in browsers

* fix(app): share client assets with nested SSR modules

* test(app): verify bootstrap preinit CSP nonces

* test(app): serve CSP nonce in worker fixture

* fix(test): read CSP script nonce property

* fix(cloudflare): emit client assets beside final workers

* fix(build): resolve pages client assets from source

* fix(app): register client assets in ssr graph

* fix(pages-router): harden client bootstrap resolution

* fix(build): emit client assets for node outputs

* fix(build): package client assets in standalone output

* test(app): reference worker nonce fixture explicitly

* fix(build): preserve client assets across environments

* refactor(build): unify client asset outputs

* fix(build): stabilize custom client asset outputs

* fix(build): finalize client assets after app builds

* fix(build): reuse client assets in hybrid builds

* fix(build): scope hybrid client assets metadata

* test(e2e): colocate Cloudflare worker fixture
2026-06-26 19:48:26 +01:00
James Anderson 41185327f3 fix(cli): respect Vite dev server config (#2379)
* fix(cli): respect Vite dev server config

* docs(cli): clarify Vite config hook ordering
2026-06-26 18:46:25 +01:00
James Anderson 25a3c26f7a feat(init): scaffold for cloudflare and node (#2279)
* feat(init): select deployment platform

* refactor(init): AST-update deployment config

* feat(init): configure Cloudflare cache and images

* fix(init): avoid backtracking in config updates

* fix(init): cover packaged Cloudflare setup

* ci: allow Cloudflare init smoke builds

* ci: fix packaged Cloudflare dependency install

* test(e2e): isolate browser fixture servers

* chore: allow Windows taskkill binary

* fix(init): configure Cloudflare image adapter

* fix(init): address platform setup review

* fix(init): address cache setup review

* fix(init): hide workers cache option

* fix(init): align generated config indentation

* fix(init): validate cloudflare setup before mutation

* fix(init): preserve additive config syntax

* fix(init): tidy interactive prompt spacing

* fix(images): rename Cloudflare optimizer builder

* refactor(images): remove draft name migration

* fix(init): install dependencies after setup

* fix(init): clarify setup recovery steps

* fix(init): ignore Wrangler state for Cloudflare

* fix lockfile
2026-06-26 17:09:19 +01:00
James Anderson 42c3e24b40 fix(test): name trailing slash ISR fixture (#2376) 2026-06-26 13:58:53 +00:00
James Anderson da179857dc fix(app-router): render templates with children only (#2322)
* fix(app-router): render templates with children only

* test(app-router): correct server template navigation parity

* LGTM: template fix matches Next.js

Co-authored-by: james-elicx <james-elicx@users.noreply.github.com>

* chore(test): remove fixture symlink noise

* LGTM: template fix matches Next.js

Co-authored-by: james-elicx <james-elicx@users.noreply.github.com>

* fix(app-router): preserve template children-only fix

---------

Co-authored-by: ask-bonk[bot] <ask-bonk[bot]@users.noreply.github.com>
Co-authored-by: james-elicx <james-elicx@users.noreply.github.com>
2026-06-26 14:51:46 +01:00
James Anderson 618cd66b30 fix(app-router): align static dynamic params parity (#2321)
* fix(app-router): align static dynamic params parity

* fix(app-router): preserve dynamic error fallback params

* chore(test): format force-static fixture
2026-06-26 14:45:37 +01:00
James Anderson 427609f5e0 fix(app-router): avoid probing client references (#2313) 2026-06-26 14:44:29 +01:00