Commit Graph

1503 Commits

Author SHA1 Message Date
Nathan Nguyen 10b5086f4d fix(app-router): align router autoscroll with Next (#2004)
* fix(app-router): align router autoscroll with Next

App Router navigation could diverge from Next.js router autoscroll semantics around hydration timing, loading-shell same-page search navigations, and routes whose first committed node is React-hoisted into head. That broke the upstream router-autoscroll deploy-suite because the client marked hydration too early, static loading-shell templates were not usable for navigation, and the fallback scroll path masked the old-handler hoisted-head behavior.

The fix moves the Next-compatible hydration marker into a passive effect, wires production hydrateRoot error callbacks to match Next's implicit root-boundary and recoverable-error handling, lets authoritative loading-shell templates drive static route optimistic payloads, and skips fallback document scrolling when the committed document only exposes a React-hoisted head resource. The ported tests cover the upstream router-autoscroll behavior plus focused unit boundaries for prefetch mode, optimistic routing, head-resource detection, and hydrateRoot callbacks.

* fix(app-router): hoisted-head scroll fallback is per-intent, not global head scan

* test(app-router): add full-chain scroll intent integration test

* fix(app-router): match legacy scroll focus parity

* fix(app-router): preserve latest scroll navigation intent

* fix(app-router): scope scroll and error recovery

* fix(app-router): gate navigation failure recovery

* fix(app-router): match navigation failure handling

* fix(app-router): align scroll completion parity

* fix(app-router): retain latest failure target

* fix(app-router): preserve route error boundaries

* fix(app-router): clear discarded failure targets

* fix(app-router): align failure recovery boundaries

* fix(app-router): disarm refused recovery targets

* fix(app-router): preserve failure target ownership

* fix(app-router): match boundary recovery parity

---------

Co-authored-by: James <james@eli.cx>
2026-06-14 23:59:28 +01:00
Xplod13 2b67523e9e fix(server): strip HTTP/2 pseudo-headers before building Headers (#2021)
## Summary
- Drop RFC 7540 §8.1.2.1 pseudo-headers (`:method`, `:authority`, `:path`,
  `:scheme`) before constructing WHATWG `Headers` from Node's `req.headers`.
- Fixed at every `Headers`-from-`req.headers` site: the Pages Router
  middleware snapshot (index.ts), the edge API request builder
  (api-handler.ts), and the shared `appendWebHeader` helper used by
  `nodeToWebRequest` (prod-server.ts).
- Also excluded pseudo-headers from the `reportRequestError` header metadata
  in both api-handler.ts and dev-server.ts so error reports reflect real
  request headers only.
- Added a regression unit test driving `nodeToWebRequest` with a fake HTTP/2
  request.

## Root Cause
Over HTTP/2, Node's `http2` server exposes the request pseudo-headers as
`:`-prefixed keys on `req.headers`. The WHATWG `Headers`
constructor/`append`/`set` reject any header name containing `:`
(`TypeError: Headers.set: ":method" is an invalid header name`), so building a
`Headers` object directly from `req.headers` threw and returned a 500 on every
HTTP/2 request. Per RFC 7540 §8.1.2.1, pseudo-headers must not be treated as
regular header fields, so they are stripped at each construction site.

## References
- Issue: cloudflare/vinext#2013
- RFC 7540 §8.1.2.1 (HTTP/2 pseudo-header fields)
- Node `http2` request `:`-prefixed headers; WHATWG Fetch `Headers` name validation

## Verification
- `node -e "new Headers({':method':'GET'})"` → throws (repro).
- `CI=true pnpm test tests/http2-pseudo-headers.test.ts` → red before fix,
  green after.
- `CI=true npx vp check` on all changed files → pass (format + lint + types).

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-14 23:34:22 +01:00
Nathan Nguyen 1b3a35606e refactor(navigation): drop V0 suffix from planner types (#2008)
The navigation planner's public and internal types were suffixed `V0`
(RouteSnapshotV0, NavigationDecisionV0, FlightResultV0, and 19 others).
The suffix implied a versioning scheme that never materialized — there is
no V1, and the schema-version concerns it hinted at are carried explicitly
elsewhere (NAVIGATION_TRACE_SCHEMA_VERSION, CACHE_PROOF_MODEL_SCHEMA_VERSION).
The bare suffix was pure noise at every call site.

Rename all 22 `…V0` planner types to their unsuffixed names across the
planner, the browser state/entry/action modules, and the planner test
suite. Pure mechanical rename: no behavior change, all 295 planner and
browser-entry tests pass unchanged.
2026-06-14 23:32:10 +01:00
Xplod13 201f4a64dc fix(shims): guard AsyncLocalStorage construction for browser bundles (#2020)
## Summary
- Guard `getOrCreateAls` so it no longer calls `new AsyncLocalStorage()`
  unconditionally; when the runtime does not expose a usable constructor it
  falls back to a no-op store instead of throwing.
- Add a `NoopAsyncLocalStorage` whose `getStore()` returns `undefined`, mirroring
  Next.js' `FakeAsyncLocalStorage` and this repo's `async-hooks-stub.ts`.
- Preserve the cross-bundle singleton behavior (`Symbol.for` + `??=`).

## Root Cause
In browser/client bundles `node:async_hooks` can resolve to a stub without a
usable `AsyncLocalStorage` constructor (e.g. Vite's `__vite-browser-external`).
`getOrCreateAls` ran `new AsyncLocalStorage()` at module-eval time, throwing
`TypeError: AsyncLocalStorage is not a constructor`. Because many client-reachable
shims (request-context, headers, cache, …) call this helper on import, the whole
client bundle died and hydration crashed. Checking
`typeof AsyncLocalStorage === "function"` before constructing, with a no-op
fallback, matches Next.js' availability guard.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-14 23:31:38 +01:00
Xplod13 37e839e2f1 fix(prerender): surface thrown generateStaticParams/getStaticPaths errors (#2017)
The build-time prerender proxies that fetch the static-params (App Router)
and pages-static-paths (Pages Router) endpoints treated every non-ok
response identically: they logged a misleading "stale or missing prerender
secret" warning and returned the no-params sentinel, discarding the response
body. But the endpoint returns 404 for the genuine disabled/secret case and
500 (with the real error in its JSON body) when the user's
generateStaticParams/getStaticPaths throws. Swallowing the 500 silently
dropped the route from prerendering and let the default-mode build "succeed"
while shipping an app missing pre-rendered pages, blaming a non-existent
secret problem.

Branch on status: a 500 throws the real error (parsed from the body). App
Router's existing per-route collector turns it into a "Failed to call
generateStaticParams(): ..." error; the Pages Router getStaticPaths call is
now wrapped to produce the same per-route error instead of crashing. Non-500
responses keep the warn-and-skip path, so the legitimate secret/disabled case
is unchanged. This matches Next.js, which fails the build with the real error.

Fixes #1982

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-14 23:28:37 +01:00
Nathan Nguyen 47b38a91f3 fix(app-router): recover SSR shell render errors via __next_error__ document (#1908)
* fix(plugin): resolve vinext/shims/* package subpaths to local shim files

Runtime helper modules embedded into generated entries import vinext's
own shims by package subpath (e.g. `vinext/shims/headers`), while source
checkouts alias userland `next/*` imports to the local shim files. The
two specifiers resolved to different module instances, so request-scoped
singleton state (navigation context, headers) split between the source
shim copy and the package export copy.

The violated invariant is that every shim module must be a per-request
singleton regardless of import specifier. Resolve `vinext/shims/*`
through the same plugin path as the `next/*` aliases so both forms land
on the local shim files.

Exercised by the SSR shell-error recovery browser spec, whose fixture
imports vinext from the source checkout and depends on shared
navigation state across both import forms.

* fix(app-router): recover SSR shell render errors via __next_error__ document

When the HTML (Fizz) render rejects during SSR, vinext re-rendered a
server-side global-error page whose flight payload encodes the error
tree. For an app without a custom global-error.tsx that meant the
default error card with no path back to the real page: an SSR-phase-only
throw (e.g. a client component using the "throw to opt out of server
rendering" pattern) left the browser stuck on the card even though the
client render would succeed.

The violated expectation is Next.js's shell-error semantics: a failed
HTML shell is served as the default `__next_error__` error document
carrying the ORIGINAL flight payload and the bootstrap module, and the
browser re-renders the real tree from that payload with createRoot
instead of hydrating. Local error.tsx boundaries still win — they ship
inside the flight payload and catch the re-thrown error client-side.

handleSsr now resolves to that recovery document instead of rejecting,
but only when both hold:
- the error did not originate in the RSC render (no string `digest`),
  so flight errors, redirect()/notFound(), and server-component throws
  keep driving the existing rejection-based boundary machinery, and
- the app has no custom global-error.tsx (the generated entry knows at
  build time and threads hasCustomGlobalError through dispatch/render
  options); apps with one keep the server-rendered boundary re-render.

The browser entry switches from hydrateRoot to createRoot when the
document root carries id="__next_error__", dropping the error-shell
styles first.

Covered by the new ssr-error-shell-recovery browser spec (recovery to
real content, local error.tsx for SSR-only and unconditional client
throws) and the existing tests/nextjs-compat/global-error.test.ts
boundary-semantics suite.

* refactor(review): address PR 1908 non-blocking notes

- Add static prerender no-boundary recovery regression test to
  ssr-error-shell-recovery.browser.spec.ts
- Document broad __next_error__ browser marker in app-browser-entry.ts
- Extract stripJsExtension to utils/path.ts and wire into all shim
  resolution sites (vinext/shims/* + react-server shims)

Non-functional: targeted regression coverage + code documentation
+ minor resolver hardening per reviewer feedback.

* refactor(review): clarify shell recovery assumptions

* fix(ssr): cancel abandoned prerender streams

* refactor(ssr): clarify error shell root options

* fix(isr): recover shell errors during regeneration

* fix(ssr): scope client recovery to marked shells

* fix(plugin): explicitly filter vinext shim subpaths

* fix(plugin): retain null-prefixed shim resolution

* test(nextjs-compat): cover no-boundary shell recovery fallback

An unconditional client throw during SSR shell recovery without a local error boundary must still land on the default global-error card. Without a regression test, a future change could tear down the recovery shell and leave a blank document.\n\nAdd a production browser case that exercises the no-boundary route and asserts the default error UI after the client re-render throws again.

* fix(app-router): preserve shell recovery error semantics

* test(app-router): harden shell recovery cache semantics

* fix(app-router): mark global error responses uncacheable

* test(app-router): align error response status expectations

* fix(build): preserve null-prefixed og resolution

* fix(cache): delegate cache header cleanup to adapters

---------

Co-authored-by: James <james@eli.cx>
2026-06-14 22:28:25 +00:00
Nathan Nguyen b7ef466742 fix(pages): preserve app props for GSSP requests (#1996)
* fix(pages): preserve app props for gssp requests

* docs(pages): update _next/data comment to reflect full props envelope

* fix(pages-router): preserve _app.getInitialProps during stale ISR regeneration

Stale ISR background regeneration called getStaticProps directly and rendered
HTML and __NEXT_DATA__ with only the page's pageProps, dropping app-level
props from _app.getInitialProps. The foreground path already loads
_app.getInitialProps first and merges its props, but the background
regeneration path skipped that step.

Extract a shared loadPagesAppInitialRenderProps helper from the production
foreground path and reuse it during background regeneration in both
pages-page-data.ts and dev-server.ts. This ensures regenerated pages carry the
same full props envelope as the original render.

Add a regression test in tests/pages-page-data.test.ts.

* fix(pages-router): skip _app.getInitialProps on ISR cache hits

The foreground render path ran _app.getInitialProps before consulting the
ISR cache, so fresh and stale cache hits executed userland App data code
even though the cached HTML was returned verbatim. That wasted work on the
hot path and ran side-effecting App code whose result the cached response
never reflected.

The eager App initial-props load happened up front, ahead of the HIT and
STALE short-circuits. Defer it until the request will actually render:
load it lazily inside the getServerSideProps / getStaticProps /
getInitialProps branches, after the cache short-circuits return.
Stale-while-revalidate already re-runs it inside the regeneration closure,
so regenerated HTML still carries app-level props. The dev SSR handler and
the production page-data resolver are updated in lockstep to preserve
dev/prod parity.

Tests cover the fresh-HIT skip and the stale foreground-skip vs
regeneration-run split at the page-data resolver boundary.

* refactor(pages-router): extract dev App getInitialProps loader into a tested helper

The dev SSR handler ran _app.getInitialProps inside an inline closure that
mutated captured pageProps/renderProps and read res directly, so its lazy
load-only-on-render behavior could only be covered by a heavyweight
integration test that vi.doMock'd the isr-cache and file-matcher modules —
a mock cascade with little signal.

Move the decision into loadDevAppInitialProps in pages-get-initial-props.ts.
It takes the App component, req/res, and an injected AppTree builder (keeping
React out of the module) and returns a discriminated result —
skip / response-sent / render — that the caller applies. The dev-server
closure is now thin glue: build the React tree, delegate, apply the result.

Adds focused unit tests that drive the helper through its real boundary
(genuine getInitialProps functions, plain req/res inputs) — no module mocks:
the skip path, App/page prop merging, pageProps normalization, the
response-sent short-circuit, and the router/ctx wiring passed to userland.

* fix(pages): preserve app props across data requests

* fix(pages): preserve fallback cache expiry

* fix(pages): preserve dev app context during ISR

* fix(pages): hydrate middleware rewrite fallbacks

* fix(pages): retarget middleware data rewrites

* fix(pages): preserve rewrite query on navigation

* fix(pages): finalize rewrite navigation state

* fix(pages): resolve rewrite data targets consistently

* fix(pages): await static props during regeneration

* fix(pages): preserve original query in resolved url

* Revert "fix(pages): await static props during regeneration"

This reverts commit cbdcdf65cd.

* test(app): cover rewrite params in app search

---------

Co-authored-by: James <james@eli.cx>
2026-06-14 20:17:05 +01:00
James Anderson 4821d247b0 fix(pages): preserve module identity with deployment ids (#2012) 2026-06-14 19:45:38 +01:00
Xplod13 5e37596183 fix(routing): re-encode trailing-slash Location for non-Latin-1 paths (#2011)
normalizeTrailingSlash built the redirect Location from the already
percent-decoded pathname. A character above U+00FF (e.g. a CJK slug or
emoji under trailingSlash:true) made the Headers constructor throw
'Cannot convert argument to a ByteString', caught by the outer handler
and surfaced as a 500 instead of a 308. Latin-1 characters such as
spaces did not throw but produced a malformed, un-percent-encoded
Location.

Percent-encode the redirect target before building the response,
encoding every character that is invalid raw in an RFC 3986 path while
preserving existing %xx escapes and / delimiters so already-encoded
delimiters like %23 are not double-encoded.

Fixes #1979

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-14 19:18:25 +01:00
James Anderson e1958ae3fa fix(router): share Pages Router context across chunks (#2010) 2026-06-14 16:15:23 +01:00
Jerry Zhao de9d03a846 test(shims): normalize expected og shim path for Windows (#2006) 2026-06-14 00:45:25 +01:00
Nathan Nguyen 930e03c449 fix(ppr): gate fallback shells until request-time resume is supported (#1716)
* fix(app-router): prerender cacheComponents root-param fallback shells

PR 1 of 4: core model + build integration.
Model: app-ppr-fallback-shell, pregenerated-concrete-paths, prerender-manifest
Build: prerender/run-prerender fallback shell artifact generation
Tests: createAppPprFallbackShells, pregenerated-concrete-paths core

* feat(ppr): add fallback shell payload identity

* feat(ppr): safely serve fallback shell cache entries

* refactor(ppr): extract fallback shell render pipeline and dedupe getViteMajorVersion

* fix(ppr): restore safe-serving CI checks

The safe-serving branch failed CI because a client-side server-only guard rejected valid 'use server' action modules, a fallback-shell dependency cast no longer matched its helper type, apps/web lost the Cloudflare cache adapter source path during typecheck, and Knip could not resolve the documented Cloudflare cache adapter subpaths.

The server-only guard now reads the directive prologue and skips top-level 'use server' modules, fallback-shell regeneration passes an explicit typed dependency object, apps/web gets the workspace Cloudflare cache path, the Cloudflare package exports explicit adapter subpaths, Knip uses a relative source import in the dispatch unit test, and the readiness test awaits the actual cache-ready promise.

* fix(ppr): guard fallback shell reads for queries

* fix(ppr): normalize pregenerated concrete paths

* fix(ppr): address review comments on fallback shell serving and react runtime check

* fix(ci): restore knip ignores for unlisted binaries and prune dependencies

* fix(ppr): restrict bracket check in fallback detection to legacy manifests

* fix(ppr): prefer stable ESM react-dom/static.edge before CJS fallback

The loadStaticPrerender dev-mode path hard-codes react-dom's internal
CJS file layout (cjs/react-dom-server.edge.development.js). A React
upgrade could silently break fallback-shell rendering in dev without
affecting production because the function never tried the stable ESM
entry in development.

Change the order so that react-dom/static.edge is attempted first in
all environments. Only fall back to the CJS path when the ESM entry
does not export prerender() and we are in a development runtime. This
lets future React dev builds that expose prerender() from the ESM entry
work automatically, and it surfaces the CJS-path failure only when the
stable path is genuinely unavailable.

Also handle the CJS default-export interop shape that Node.js ESM
produces when dynamically importing a CommonJS module.

* refactor(ppr): address four review cleanup items

1. Remove redundant double-normalization in seed-cache.ts
   addPregeneratedConcretePath already normalizes internally, so the
   call-site normalizePregeneratedPathname() was redundant. Dropping it
   gives a single source of truth for pathname normalization.

2. Lazily construct FallbackShellRenderDeps in tryServePprFallbackShell
   Extract the large FallbackShellRenderDeps object into a top-level
   buildFallbackShellRenderDeps helper. The closure in the probe loop
   now just delegates, so the heavy object is only created when a STALE
   entry actually triggers regeneration, not on every HIT probe.

3. Add dev-only warning for legacy bracket heuristic
   When isFallbackShellArtifactPath falls back to the bracket substring
   scan (route.fallback === undefined), emit a console.warn in dev so
   developers know a legacy manifest is being used and concrete URLs
   with literal brackets may be misclassified.

4. Update pregenerated-concrete-paths.test.ts to colon notation
   The production manifest writer uses colon notation (/:slug) for the
   route field, but the test fixtures used bracket notation (/[slug]).
   Update the fixtures so the test format matches production, exercising
   the real key format that the safe-serving guard depends on.

* test(ppr): compact fallback shell dispatch fixtures

* refactor(ppr): name fallback shell render phases

* refactor(app-router): deduplicate PPR fallback shell and app page cache render paths

* fix(ppr): avoid serving incomplete fallback shells

* chore: drop redundant cloudflare cache aliases

* fix(ppr): track fallback navigation hooks

* test(ppr): render navigation hook probes

* test(ppr): type navigation hook probes

* refactor(ppr): remove unused shell regeneration path

* refactor(ppr): remove unused shell result type

* fix(ppr): safely gate fallback shell prerendering

* fix(ppr): keep fallback shell gate internal

* fix(ppr): mark generated dynamic fallback shells

* test(ppr): align fallback fixture and search params

---------

Co-authored-by: James <james@eli.cx>
2026-06-14 00:44:54 +01:00
Nathan Nguyen b5619c19f9 refactor(navigation): route prefetch reuse through planner (#1962)
* refactor(navigation): route prefetch reuse through planner

Navigation cache reuse decisions were still split across the browser executor, which made visited-response reuse, prefetch consumption, and optimistic shell attempts hard to verify at the control-plane boundary.

Move the reuse decision table into navigationPlanner with typed candidate facts, keep cache reads and React effects in the executor, and preserve silent stale-prefetch eviction for navigation probes.

* refactor(navigation): exercise visited cache miss planning

Visited response cache misses were represented in the planner API, but the browser executor still returned before invoking that classifier when the entry was absent or intentionally bypassed.

That made the missing-candidate branch planner-owned in tests but executor-local in production. The executor now builds candidate facts for both present and missing states, asks the planner for the decision, and keeps cache mutation in the executor as the effect boundary.

* fix(navigation): avoid prefetch probes on visited cache hits

Visited-response reuse should stay on the soft-navigation fast path without touching the prefetch cache. The planner extraction accidentally computed prefetch availability before deciding to reuse a visited response, so stale prefetch entries could be silently evicted on a path that previously left them untouched.

Add a planner prefetch-probe decision and have the browser executor consult it before reading the prefetch cache. This keeps cache mutation in the executor while making the no-probe condition explicit and tested.

* fix(navigation): preserve prefetch fallback behavior

* fix(navigation): keep slot mismatch probe behavior

---------

Co-authored-by: James <james@eli.cx>
2026-06-13 22:12:34 +01:00
Nathan Nguyen 4baf85ad5e fix(router): restore pages scroll traversal state (#1999)
* fix(router): restore pages scroll traversal state

* fix(router): preserve pages component identity across HTML fallback

Pages Router HTML fallback could import the module URL from fetched __NEXT_DATA__ even when the generated page loader already existed. In Vite chunk graphs that can evaluate a duplicate page or router module, same-route param navigations remounted the page and lost listener state before routeChangeComplete.

Store the router wrapper component types on the shared browser runtime singleton, prefer registered page loaders on the HTML fallback path, and resolve navigation at the root commit boundary that Next.js awaits instead of waiting for passive effects. Non-DOM document mocks still resolve immediately so unit harnesses do not masquerade as real browser commits.

Validated with the upstream reload-scroll-backforward-restoration deploy suite and the local router-events and scroll-restoration regressions.

* test(router): simulate pages router commits in shims tests

* fix(router): move Pages Router readiness into shared runtime state

Move the pagesRouterReady bit into PagesRouterRuntimeState so duplicated
next/router module instances (client entry + page chunks) observe the same
readiness value. The initial value is still computed from
shouldDeferInitialPagesRouterReady() once per document.

Also tighten the scroll-restoration e2e fixture so routeChangeComplete
assertions cannot pass from stale page state, and add a regression test
that simulates two evaluated router instances on a deferred-ready page.

* fix(router): early-exit scroll restoration when target unreachable, document useRouter fallback

Addresses ask-bonk review feedback on PR #1999:

- restorePagesRouterScrollPosition now breaks early when window.scrollY
  stops changing across frames, avoiding the full 60-frame budget when
  the saved scroll position exceeds the rendered page height.
- useRouter() fallback path now has an explanatory comment documenting
  the non-reactive singleton return is intentional for split-chunk compat.

* fix(router): harden scroll restoration settling

---------

Co-authored-by: James <james@eli.cx>
2026-06-13 22:11:18 +01:00
Nathan Nguyen d1a80cd668 fix(app-router): preserve front redirects through fallback route handlers (#2000)
* fix(app-router): preserve front redirects through fallback route handlers

* test(e2e): assert single bootstrap hydration in front-redirect test

* chore: remove dead stripDeploymentIdQuery export

* fix(app-router): handle cancelled bootstrap streams

* docs(app-router): clarify bootstrap recovery

* test(e2e): tolerate dangling fixture symlink

* test(e2e): run front redirect regression in CI

* fix(app-router): always hide internal RSC queries

* fix(app-router): preserve visible hydration URL

* test(e2e): scope visible URL regression

* refactor(app-router): trim front redirect residue

* test(e2e): group fixture setup command

* test(e2e): tighten front redirect assertions

* fix(app-router): preserve ordinary route handler URLs

* fix(app-router): normalize edge route handler URLs

* docs(app-router): explain route URL parity

* fix(app-router): preserve Node RSC request URLs

* fix(app-router): normalize route handler RSC paths

* fix(app-router): forward RSC tokens through rewrites

---------

Co-authored-by: James <james@eli.cx>
2026-06-13 22:08:02 +01:00
Nathan Nguyen 3253aafd77 fix(pages-router): pass rewrite URL to edge API requests (#1998)
* fix(pages-router): pass rewrite URL to edge API requests

* fix(pages-router): preserve edge API request URL parity

* fix(pages-router): configure edge API NextRequest

* fix(pages-router): preserve edge API locale config

* fix(pages-router): preserve edge request metadata

* fix(pages-router): align edge API URL formatting

* fix(pages-router): match API locale casing

* fix(pages-router): match domain locales by locale

* docs(pages-router): clarify edge API basePath parity

* test(deploy): expect metadata-preserving URL clone

* docs(pages-router): note basePath rewrite parity

---------

Co-authored-by: James <james@eli.cx>
2026-06-13 22:05:31 +01:00
Nathan Nguyen dabcb55e63 fix(app-router): expose active source page on window.next (#1995)
* fix(app-router): expose active source page on window.next

App Router pages did not update window.next.__internal_src_page, so Next.js-compatible tooling and deploy tests could not observe the active source page on initial render or client transitions.

The payload only exposed URL route IDs, which drop route groups and bracketed dynamic segment names. The fix carries a source-page metadata field from the app route's filesystem segments, reads it from committed browser router state, and mirrors it onto window.next like Next.js does.

Adds regression coverage for route-group and dynamic source-page encoding plus the window.next writer contract ported from the upstream app-dir test.

* fix(app-router): preserve source page across boundary renders

* fix(app-router): tolerate malformed source page metadata

* fix(app-router): preserve intercepted fallback source page

* fix(app-router): omit unknown boundary source page

---------

Co-authored-by: James <james@eli.cx>
2026-06-13 21:59:39 +01:00
James Anderson 5ace0db7ac fix(deploy): preserve app module identity with deployment ids (#2005) 2026-06-13 12:06:36 +01:00
James Anderson 3d9639510e fix(build): honour experimental.lightningCssFeatures include/exclude (#1498) (#1664)
vinext silently ignored `experimental.lightningCssFeatures` because the
options were never plumbed into Vite's CSS pipeline. `light-dark()` and
other modern CSS features were still lowered to polyfills even when the
user explicitly listed them under `exclude`.

Resolve `experimental.useLightningcss` and convert the dash-case feature
names from `experimental.lightningCssFeatures` into the numeric bitmask
expected by lightningcss (mirroring Next.js's `featureNamesToMask` in
`packages/next/src/build/webpack/loaders/lightningcss-loader/src/loader.ts`
and `crates/next-core/src/next_config.rs`). When `useLightningcss` is on,
forward `transformer: 'lightningcss'` plus the resolved `include`/`exclude`
masks to Vite's `css.lightningcss` bridge.

Adds a regression test that builds a fixture with
`exclude: ['light-dark']` and asserts the function survives untouched in
the emitted CSS, plus an inverse `include: ['light-dark']` case and unit
coverage for the feature-name → bitmask helper.

Ported from Next.js:
test/e2e/app-dir/experimental-lightningcss-features/experimental-lightningcss-features.test.ts
2026-06-13 00:39:58 +00:00
James Anderson cd181cc755 chore: add codex to gitignore (#1992) 2026-06-13 00:39:29 +00:00
James Anderson eef22e07a8 fix(pages-router): block fallback shell for crawler UAs on prerender (#1543) (#1663)
* fix(pages-router): block fallback shell for crawler UAs on prerender (#1543)

When `getStaticPaths` returns `fallback: true` and an unlisted path is hit
by a known bot/crawler, vinext was serving the `Loading...` shell so the
crawler indexed the fallback HTML instead of the real page. Mirror Next.js
`pages-handler.ts` and flip `isFallback` to false for bot User-Agents so
the request renders synchronously with real props.

- Add `isBotUserAgent` helper (DOM + HTML bot regex) in `utils/html-limited-bots.ts`,
  matching Next.js `shared/lib/router/utils/is-bot.ts`.
- Plumb `userAgent` + `htmlLimitedBots` into `resolvePagesPageData` and
  flip the fallback bit when the UA matches.
- Apply the same flip in the dev `createSSRHandler` for parity.
- Targeted unit + integration regression tests covering Googlebot,
  Bingbot, DuckDuckBot, YandexBot, facebookexternalhit, and a normal
  Chrome UA control. Ported from `.nextjs-ref/test/e2e/prerender-crawler.test.ts`.

Refs #1543.

* fix(pages-router): preserve array user-agent bot detection
2026-06-13 00:35:28 +00:00
Jared Stowell 6ad04e246d perf: skip unnecessary import parsing (#1991)
* perf(optimize-imports): skip unnecessary import parsing

* fix(optimize-imports): keep parsing edge static imports

* Update packages/vinext/src/plugins/optimize-imports.ts

Co-authored-by: ask-bonk[bot] <249159057+ask-bonk[bot]@users.noreply.github.com>

---------

Co-authored-by: ask-bonk[bot] <249159057+ask-bonk[bot]@users.noreply.github.com>
2026-06-13 01:30:08 +01:00
James Anderson ca34394865 fix(app-router): fold typeof window before resolution (#1956)
* fix(app-router): fold typeof window before resolution

* fix(build): respect window bindings during folding

* fix(build): handle typeof window environment edge cases
2026-06-13 01:24:34 +01:00
James Anderson bf41ee49dd fix(image): prevent optimizer cache-key amplification (#1944)
* fix(image): validate optimizer parameters

* fix(image): close optimizer amplification aliases

* fix(image): validate pure app dev requests

* fix(image): address optimizer review findings
2026-06-13 01:10:12 +01:00
James Anderson 24d3dfcf00 fix(pages): harden cookie parsing (#1947)
* fix(pages): harden cookie parsing

* fix(pages): preserve cookie object compatibility

* fix(shims): distinguish edge cookie parser

* refactor(cookies): dedupe header parsing
2026-06-13 00:57:45 +01:00
James Anderson c023fc3810 fix(actions): bound Flight payload graph validation (#1942) 2026-06-13 00:56:57 +01:00
James Anderson 04db457691 fix(deploy): prevent Windows shell injection (#1946)
* fix(deploy): avoid Windows shell invocation

* fix(deploy): preserve long Wrangler env names
2026-06-13 00:47:15 +01:00
James Anderson d7447d8d88 test(compat): classify runtime cli-output deploy suite (#1954)
* test(compat): exclude runtime cli output deploy suite

* style: format deploy manifest test

* test(compat): simplify deploy suite exclusion

* test(compat): skip deploy case by title

* test(compat): satisfy deploy manifest lint
2026-06-13 00:30:07 +01:00
James Anderson 70ee909adf fix(app-router): support extensionless variable imports (#1958)
* fix(app-router): support extensionless variable imports

* fix(build): harden extensionless dynamic imports

* fix(build): align variable import resolution

* fix(build): cover dynamic import contexts

* fix(build): scope variable import contexts

* fix(build): avoid comment parser backtracking
2026-06-13 00:22:22 +01:00
James Anderson b50af3e39d fix(link): preserve basePath hash navigation (#1952)
* fix(link): preserve relative hash navigation with basePath

* fix(link): remove stale relative href resolution
2026-06-13 00:15:49 +01:00
James Anderson b3d407a6fd fix(headers): prioritize config cache headers for metadata assets (#1953)
* fix(headers): prioritize config cache headers for metadata assets

* test(headers): guard metadata header precedence

* style: format metadata header fix
2026-06-13 00:14:59 +01:00
James Anderson a84a038fe6 fix(config): share CommonJS module fallback (#1990)
* fix(config): share CommonJS module fallback

* fix(config): harden CommonJS retry detection
2026-06-13 00:13:22 +01:00
James Anderson a155fdf997 fix(deploy): improve deployment id parity (#1949)
* fix(deploy): improve deployment id parity

* test(router): isolate deployment prefetch globals

* fix(deploy): restrict asset tokens to managed files
2026-06-13 00:10:42 +01:00
James Anderson 5e19a2dd38 fix(config): honor resolve extensions and improve webpack config processing (#1959)
* fix(config): honor resolve extensions

* fix(config): preserve resolve extension semantics

* fix(config): preserve resolve extensions fallback

* fix(config): preserve resolver environment semantics

* fix(config): treat Vite preview as production
2026-06-12 22:55:06 +00:00
James Anderson 3ba2528c14 fix(app-router): preserve page notFound precedence during metadata failure (#1957) 2026-06-12 23:18:27 +01:00
James Anderson 075919357e fix(router): hard navigate Pages links to App routes (#1960)
* fix(router): hard navigate pages links to app routes

* fix(router): normalize localized app route detection
2026-06-12 22:45:19 +01:00
James Anderson 222f18b0d9 fix(css): load local CommonJS PostCSS plugins (#1961)
* fix(css): load local CommonJS PostCSS plugins

* fix(css): avoid temporary PostCSS plugin copies
2026-06-12 22:42:33 +01:00
James Anderson 9e3cf90583 test(e2e): disable hash fixture query prefetch (#1948) 2026-06-12 13:04:10 +00:00
Nathan Nguyen da26f42d7a refactor(router): classify server-action results and RSC navigation errors in planner (#1901)
* feat(router): classify server-action results and RSC navigation errors in planner

The navigation executor in app-browser-entry.ts performed ad-hoc compatibility
checks for server action responses using two separate helpers:
resolveServerActionRedirectCompatibilityHardNavigationTarget and
resolveRscCompatibilityNavigationDecision. These checks were scattered in
the executor and mixed decision logic with side effects (clearClientNavigationCaches,
performHardNavigation).

This change introduces two pure classifiers in the navigation planner:

- classifyServerActionResult: decides whether a server action response should
  hard-navigate (due to build skew) or proceed. For redirect responses, it
  returns the redirect href with appropriate history mode (assign for push,
  replace for replace). For non-redirect RSC responses, it reloads currentHref.
  A null clientCompatibilityId is treated as always compatible.

- classifyRscNavigationError: always hard-navigates to currentHref on any
  RSC navigation error, providing a NavigationTrace for observability.

Both classifiers produce typed DecisionV0 shapes with NavigationTrace entries,
making the planner the single semantic authority for all navigation outcomes.

The executor is updated to call these classifiers instead of the ad-hoc
helpers, and the now-unused imports are removed.

Test coverage: 9 new tests for classifyServerActionResult covering all 7
branches, and 1 test for classifyRscNavigationError.

* refactor(router): address review concerns on classifyServerActionResult planner

Three non-blocking concerns raised in code review:

1. compatibilityDecision.hardNavigationTarget was silently discarded in
   classifyServerActionResult without explanation. The helper computes a URL
   from responseUrl (the RSC action endpoint), which is wrong for user-visible
   navigation — the authoritative targets are actionRedirectHref and currentHref.
   Add a comment explaining the intentional discard.

2. The server action callback in app-browser-entry.ts computed the response
   content-type twice via separate raw string operations. Hoist the check
   into fetchResponseIsRsc so both consumers (classifyServerActionResult input
   and the non-RSC redirect guard) share one derived value.

3. The planner's decision dispatch was inlined in the executor, making it
   untestable without browser globals. Extract applyServerActionResultDecision
   into app-browser-action-result.ts and add an executor-level regression test
   that drives it with vi.fn() mocks — covering redirect push/replace, no-redirect
   reload, and proceed paths against the live classifyServerActionResult output.

* refactor(router): move applyServerActionResultDecision to dedicated navigation module

* refactor(router): remove old server-action redirect compatibility helper

Remove resolveServerActionRedirectCompatibilityHardNavigationTarget from
app-browser-action-result.ts and its tests. The planner's
classifyServerActionResult is now the single semantic authority for
server-action navigation decisions.

Add a wiring regression test that exercises the real browser-entry seam:
a synthetic Response has its facts extracted (content-type, redirect
headers, compatibility ID, response URL) and passed to the planner,
pinning the extraction boundary that app-browser-entry.ts performs at
runtime.

* refactor(router): extract server-action fact collector and remove stale helper

Extract  as the single pure boundary between
raw browser response data and the narrow facts expected by the navigation
planner. This removes the duplication where the wiring test had to hand-copy
the same extraction logic.

- Add  to .
- Use it in  so the inline normalisation disappears.
- Delete ; its logic is
  now folded into the helper's  field.
- Update tests to target the helper directly and assert the end-to-end
  wiring through the planner.

* fix(router): address server action planner review

---------

Co-authored-by: James <james@eli.cx>
2026-06-12 13:13:46 +01:00
Nathan Nguyen ba6ea6f6f8 fix(shims): add useUntrackedPathname hook for error boundary parity (#1933)
* feat(shims): add useUntrackedPathname hook for error boundary parity

Next.js upstream provides a useUntrackedPathname() hook
(packages/next/src/client/components/navigation-untracked.ts) that is
used by the unstable_catchError error boundary. Unlike usePathname(),
useUntrackedPathname():

- Returns null during the missing-params shell prerender (instead of "/")
- Does not register the pathname as a tracked render dependency, avoiding
  unnecessary re-renders of the error boundary

This commit:
1. Adds useUntrackedPathname() to packages/vinext/src/shims/navigation.ts
2. Switches packages/vinext/src/shims/error.tsx to use it
3. Adds unit tests covering server, client snapshot, and Pages Router paths

Refs:
- Next.js source: https://github.com/vercel/next.js/blob/v16.2.6/packages/next/src/client/components/navigation-untracked.ts
- Issue: https://github.com/cloudflare/vinext/issues/1920

* refactor(shims): move useUntrackedPathname to internal module

Address code review feedback on PR 1933:

- Move useUntrackedPathname from public next/navigation API to
  internal/navigation-untracked.ts to prevent public surface leak.

- Change server no-context fallback from null to '/' to match
  usePathname() semantics. Document that null is reserved for
  future missing-params shell detection.

- Update error.tsx to import from the internal module.

- Update shims tests to import from internal module and expect
  '/' for no-context SSR.

- Add integration test for unstable_catchError boundary contract:
  getDerivedStateFromProps clears errors on pathname changes and
  retains them when pathname stays the same.

* fix(shims): gate untracked pathname render snapshot with active count

Address second round of code review feedback on PR 1933:

- Gate client render snapshot with navigationSnapshotActiveCount > 0
  so the hook returns the pending URL only during active transitions.
  After commit, falls back to cached pathname so user pushState/
  replaceState calls are immediately reflected.

- Import getNavigationContext() from navigation.ts instead of
  duplicating the global accessor / hydration context logic.

- Add inverse test: provider snapshot present but inactive
  (navigationSnapshotActiveCount === 0) returns committed pathname,
  not stale provider value.

* test(shims): type-safe unstable_catchError boundary contract test

Export _CatchError, _CatchErrorInternalState, _CatchErrorProps,
_CatchErrorState, and _UserProps from error.tsx with @internal
annotations so tests can reference them without as-unknown-as
assertions.

Rewrite the getDerivedStateFromProps integration test to use
imported types instead of inline type assertions.

* chore: format with vp fmt

* fix(shims): keep _CatchError and underscore types local in error.tsx

Address review feedback: exporting _CatchError and underscore types from
next/error widened the public shim surface. Revert them to local types
and use structural typing in tests instead.

- Make _CatchError, _UserProps, _CatchErrorState, _CatchErrorProps, and
  _CatchErrorInternalState local again (non-exported).
- Update the getDerivedStateFromProps integration test to use structural
  as-unknown-as assertions instead of importing internal types.

* refactor(shims): extract shared Pages Router accessor to internal helper

Create packages/vinext/src/shims/internal/pages-router-accessor.ts
with getPagesNavigationContext() and PagesNavigationContext type.

Import from it in both navigation.ts and navigation-untracked.ts
instead of duplicating the Symbol lookup and error handling. This
prevents the string key and the accessor shape from drifting across
modules if a third consumer is added later.

router.ts still writes the global accessor directly using Symbol.for
as before.

* fix(shims): move pages-router-accessor import to top of navigation.ts

Move the import from the middle of the file to the top import block
and remove the unused PagesNavigationContext type import. Fixes
eslint no-unused-vars and import/first errors.

* ci: trigger rebuild

* refactor(shims): reuse navigation render snapshot hook

---------

Co-authored-by: James <james@eli.cx>
2026-06-12 12:06:47 +01:00
Divanshu Chauhan cd921ab709 perf: cache fs probes and precompute route sort keys in scan/deploy paths (#1930)
* perf(routing): precompute route precedence before sorting

`compareRoutes` re-parsed every pattern on each comparison, so a sort
called `routePrecedence` ~2·log n times per route instead of once. Replace
it with `sortRoutes`, which scores each pattern once into a Map and sorts
by (score, pattern.localeCompare). The localeCompare tiebreaker already
guarantees a total order, so ordering is byte-identical; this just removes
the redundant re-parsing on every route scan (dev re-scans on file change,
plus the pages/api and app-graph builds).

* perf(app-router): cache convention-file probes per route-graph scan

`buildAppRouteGraph` walks the appDir→leaf chain separately for every
route (layouts, templates, errors, boundaries, slots), each step probing
up to 4 extensions per convention file via `existsSync`. Shared ancestor
directories — the `app/` root above all — were re-stat'd once per
descendant route, so a scan cost roughly routes × depth × conventions ×
extensions syscalls.

Memoize `findFile` through a `WeakMap<ValidFileMatcher, Map>` keyed by a
per-scan matcher clone created in `buildAppRouteGraph`. Results are
immutable within one scan, so no invalidation is needed: the cache lives
exactly as long as the scan and is GC'd afterward. The fresh per-scan key
also keeps overlapping scans isolated, and the `null` not-found outcome is
cached too. Probe results are identical to the previous direct `existsSync`
calls.

* perf(deploy): single tree walk for detection and reuse parsed package.json

`analyzeProject` walked the app/ tree twice — once in `detectISR` and again
in `detectMDX` — and `detectNativeModules` re-read and re-parsed
package.json that `detectProject` had already parsed into `allDeps`.

Merge the two walkers into one `scanTreeForDetection(dir, { isr, mdx })`
that evaluates both predicates per entry with each flag short-circuiting
independently, extract the next.config MDX check into `detectMDXFromConfig`,
and add `resolveProjectDir` for the shared root/`src` precedence. Pass the
already-merged `allDeps` into `detectNativeModules`. Detection semantics are
unchanged: same files visited, same patterns tested, same booleans out.
2026-06-12 11:51:43 +01:00
Nathan Nguyen 79d78b0cce chore: standardize prod-build project commands in playwright.config.ts (#1932)
Replace error TS5058: The specified path does not exist: '../../../packages/vinext/tsconfig.json'. with
~/packages/vinext$ vp pack ⊘ cache disabled
ℹ entry: src/cache.ts, src/check.ts, src/cli-args.ts, src/cli.ts, src/deploy.ts, src/index.ts, src/init.ts, src/typegen.ts, src/build/assets-ignore.ts, src/build/clean-output.ts, src/build/client-build-config.ts, src/build/css-url-assets.ts, src/build/inline-css.ts, src/build/layout-classification-types.ts, src/build/layout-classification.ts, src/build/next-client-runtime-manifests.ts, src/build/nitro-route-rules.ts, src/build/precompress.ts, src/build/prerender.ts, src/build/report.ts, src/build/route-classification-injector.ts, src/build/route-classification-manifest.ts, src/build/run-prerender.ts, src/build/server-manifest.ts, src/build/ssr-manifest.ts, src/build/standalone.ts, src/build/static-export.ts, src/cache/cache-adapters-virtual.ts, src/client/empty-module.ts, src/client/instrumentation-client-inject.ts, src/client/instrumentation-client-state.ts, src/client/instrumentation-client.ts, src/client/navigation-runtime.ts, src/client/pages-router-link-navigation.ts, src/client/validate-module-path.ts, src/client/vinext-next-data.ts, src/client/window-next.ts, src/cloudflare/index.ts, src/cloudflare/tpr.ts, src/config/config-matchers.ts, src/config/dotenv.ts, src/config/next-config.ts, src/config/tsconfig-paths.ts, src/routing/app-route-graph.ts, src/routing/app-router.ts, src/routing/file-matcher.ts, src/routing/pages-router.ts, src/routing/route-matching.ts, src/routing/route-pattern.ts, src/routing/route-trie.ts, src/routing/route-validation.ts, src/routing/utils.ts, src/entries/app-browser-entry.ts, src/entries/app-rsc-entry.ts, src/entries/app-rsc-manifest.ts, src/entries/app-ssr-entry.ts, src/entries/pages-client-entry.ts, src/entries/pages-entry-helpers.ts, src/entries/pages-server-entry.ts, src/entries/runtime-entry-module.ts, src/plugins/ast-utils.ts, src/plugins/async-hooks-stub.ts, src/plugins/client-reference-dedup.ts, src/plugins/css-data-url.ts, src/plugins/dynamic-preload-metadata.ts, src/plugins/fonts.ts, src/plugins/import-meta-url.ts, src/plugins/instrumentation-client.ts, src/plugins/middleware-server-only.ts, src/plugins/og-assets.ts, src/plugins/optimize-imports.ts, src/plugins/postcss.ts, src/plugins/remove-console.ts, src/plugins/require-context.ts, src/plugins/rsc-client-reference-loaders.ts, src/plugins/rsc-client-shim-excludes.ts, src/plugins/sass.ts, src/plugins/server-externals-manifest.ts, src/plugins/strip-server-exports.ts, src/plugins/wasm-module-import.ts, src/shims/amp.ts, src/shims/app-router-scroll-state.ts, src/shims/app-router-scroll.tsx, src/shims/app.tsx, src/shims/before-interactive-context.tsx, src/shims/cache-for-request.ts, src/shims/cache-runtime.ts, src/shims/cache.ts, src/shims/cdn-cache.ts, src/shims/client-hook-error.ts, src/shims/client-locale.ts, src/shims/client-only.ts, src/shims/compat-router.ts, src/shims/config.ts, src/shims/constants.ts, src/shims/default-global-error.tsx, src/shims/default-not-found.tsx, src/shims/document.tsx, src/shims/dynamic-preload-chunks.tsx, src/shims/dynamic.ts, src/shims/error-boundary.tsx, src/shims/error.tsx, src/shims/fetch-cache.ts, src/shims/font-google-base.ts, src/shims/font-google.ts, src/shims/font-local.ts, src/shims/font-utils.ts, src/shims/form.tsx, src/shims/hash-scroll.ts, src/shims/head-state.ts, src/shims/head.ts, src/shims/headers.ts, src/shims/i18n-context.ts, src/shims/i18n-state.ts, src/shims/image-config.ts, src/shims/image.tsx, src/shims/layout-segment-context.tsx, src/shims/legacy-image.tsx, src/shims/link-prefetch.ts, src/shims/link.tsx, src/shims/metadata.tsx, src/shims/navigation-state.ts, src/shims/navigation.react-server.ts, src/shims/navigation.ts, src/shims/offline.ts, src/shims/og.tsx, src/shims/pages-router-runtime.ts, src/shims/ppr-fallback-shell.ts, src/shims/readonly-url-search-params.ts, src/shims/request-context.ts, src/shims/request-state-types.ts, src/shims/root-params.ts, src/shims/router-state.ts, src/shims/router.ts, src/shims/script-nonce-context.tsx, src/shims/script.tsx, src/shims/server-only.ts, src/shims/server.ts, src/shims/slot.tsx, src/shims/thenable-params.ts, src/shims/unified-request-context.ts, src/shims/unrecognized-action-error.ts, src/shims/url-safety.ts, src/shims/url-utils.ts, src/shims/use-merged-ref.ts, src/shims/web-vitals.ts, src/server/api-handler.ts, src/server/app-bfcache-id.ts, src/server/app-browser-action-result.ts, src/server/app-browser-client-reuse-manifest.ts, src/server/app-browser-entry.ts, src/server/app-browser-error.ts, src/server/app-browser-history-controller.ts, src/server/app-browser-hydration.ts, src/server/app-browser-interception-context.ts, src/server/app-browser-mpa-navigation.ts, src/server/app-browser-navigation-controller.ts, src/server/app-browser-popstate.ts, src/server/app-browser-rsc-redirect.ts, src/server/app-browser-state.ts, src/server/app-browser-stream.ts, src/server/app-browser-visible-commit.ts, src/server/app-client-reference-preloader.ts, src/server/app-elements-wire.ts, src/server/app-elements.ts, src/server/app-fallback-renderer.ts, src/server/app-history-state.ts, src/server/app-hook-warning-suppression.ts, src/server/app-inline-css-client.ts, src/server/app-interception-context-header.ts, src/server/app-layout-param-observation.ts, src/server/app-middleware.ts, src/server/app-mounted-slots-header.ts, src/server/app-optimistic-routing.ts, src/server/app-page-boundary-render.ts, src/server/app-page-boundary.ts, src/server/app-page-cache.ts, src/server/app-page-dispatch.ts, src/server/app-page-element-builder.ts, src/server/app-page-execution.ts, src/server/app-page-head.ts, src/server/app-page-method.ts, src/server/app-page-params.ts, src/server/app-page-probe.ts, src/server/app-page-render-identity.ts, src/server/app-page-render-observation.ts, src/server/app-page-render.ts, src/server/app-page-request.ts, src/server/app-page-response.ts, src/server/app-page-route-wiring.tsx, src/server/app-page-search-params-observation.ts, src/server/app-page-segment-state.ts, src/server/app-page-stream.ts, src/server/app-pages-bridge.ts, src/server/app-post-middleware-context.ts, src/server/app-ppr-fallback-shell.ts, src/server/app-prerender-endpoints.ts, src/server/app-prerender-static-params.ts, src/server/app-render-dependency.tsx, src/server/app-request-context.ts, src/server/app-route-handler-cache.ts, src/server/app-route-handler-dispatch.ts, src/server/app-route-handler-execution.ts, src/server/app-route-handler-policy.ts, src/server/app-route-handler-response.ts, src/server/app-route-handler-runtime.ts, src/server/app-route-module-loader.ts, src/server/app-router-entry.ts, src/server/app-rsc-cache-busting.ts, src/server/app-rsc-embedded-chunks.ts, src/server/app-rsc-error-handler.ts, src/server/app-rsc-errors.ts, src/server/app-rsc-handler.ts, src/server/app-rsc-render-mode.ts, src/server/app-rsc-request-normalization.ts, src/server/app-rsc-response-finalizer.ts, src/server/app-rsc-route-matching.ts, src/server/app-segment-config.ts, src/server/app-server-action-execution.ts, src/server/app-ssr-entry.ts, src/server/app-ssr-error-meta.ts, src/server/app-ssr-stream.ts, src/server/app-static-generation.ts, src/server/app-visited-response-cache.ts, src/server/artifact-compatibility.ts, src/server/cache-control.ts, src/server/cache-headers.ts, src/server/cache-proof.ts, src/server/client-reuse-manifest.ts, src/server/client-trace-metadata.ts, src/server/cookie-utils.ts, src/server/csp.ts, src/server/default-global-error-module.ts, src/server/default-not-found-module.ts, src/server/dev-error-overlay-store.ts, src/server/dev-error-overlay.tsx, src/server/dev-initial-server-error.ts, src/server/dev-lockfile.ts, src/server/dev-module-runner.ts, src/server/dev-origin-check.ts, src/server/dev-route-files.ts, src/server/dev-server.ts, src/server/dev-stack-sourcemap-endpoint.ts, src/server/dev-stack-sourcemap.ts, src/server/document-initial-head.ts, src/server/edge-api-runtime.ts, src/server/file-based-metadata.ts, src/server/headers.ts, src/server/html.ts, src/server/http-error-responses.ts, src/server/image-optimization.ts, src/server/implicit-tags.ts, src/server/instrumentation-runtime.ts, src/server/instrumentation.ts, src/server/isr-cache.ts, src/server/isr-decision.ts, src/server/metadata-route-build-data.ts, src/server/metadata-route-response.ts, src/server/metadata-routes.ts, src/server/middleware-matcher.ts, src/server/middleware-request-headers.ts, src/server/middleware-response-headers.ts, src/server/middleware-runtime.ts, src/server/middleware.ts, src/server/navigation-planner.ts, src/server/navigation-trace.ts, src/server/next-error-digest.ts, src/server/normalize-path.ts, src/server/otel-tracer-extension.ts, src/server/pages-api-route.ts, src/server/pages-asset-tags.ts, src/server/pages-body-parser-config.ts, src/server/pages-data-route.ts, src/server/pages-default-404.ts, src/server/pages-document-initial-props.ts, src/server/pages-get-initial-props.ts, src/server/pages-i18n.ts, src/server/pages-media-type.ts, src/server/pages-node-compat.ts, src/server/pages-page-data.ts, src/server/pages-page-handler.ts, src/server/pages-page-method.ts, src/server/pages-page-response.ts, src/server/pages-readiness.ts, src/server/pages-request-pipeline.ts, src/server/pages-revalidate.ts, src/server/pages-serializable-props.ts, src/server/pregenerated-concrete-paths.ts, src/server/prerender-route-params.ts, src/server/prerender-work-unit-setup.ts, src/server/prod-server.ts, src/server/proxy-trust.ts, src/server/request-log.ts, src/server/request-pipeline.ts, src/server/rsc-stream-hints.ts, src/server/seed-cache.ts, src/server/server-action-not-found.ts, src/server/server-globals.ts, src/server/skip-cache-proof.ts, src/server/socket-error-backstop.ts, src/server/static-file-cache.ts, src/server/static-layout-client-reuse-proof.ts, src/server/streaming-metadata.ts, src/server/worker-utils.ts, src/utils/asset-prefix.ts, src/utils/base-path.ts, src/utils/cache-control-metadata.ts, src/utils/client-build-manifest.ts, src/utils/client-entry-manifest.ts, src/utils/client-runtime-metadata.ts, src/utils/compare.ts, src/utils/dev-error-recovery-event.ts, src/utils/domain-locale.ts, src/utils/encode-cache-tag.ts, src/utils/error-cause.ts, src/utils/hash.ts, src/utils/html-limited-bots.ts, src/utils/lazy-chunks.ts, src/utils/manifest-paths.ts, src/utils/mdx-scan.ts, src/utils/navigation-signal.ts, src/utils/number.ts, src/utils/path.ts, src/utils/prerender-output-paths.ts, src/utils/project.ts, src/utils/promise.ts, src/utils/public-routes.ts, src/utils/query.ts, src/utils/record.ts, src/utils/regex.ts, src/utils/safe-json-file.ts, src/utils/sorted-array.ts, src/utils/text-stream.ts, src/utils/vinext-root.ts, src/utils/vite-version.ts, src/build/google-fonts/build-url.ts, src/build/google-fonts/fallback-metrics.ts, src/build/google-fonts/font-metadata.ts, src/build/google-fonts/get-axes.ts, src/build/google-fonts/sort-variants.ts, src/build/google-fonts/validate.ts, src/shims/internal/als-registry.ts, src/shims/internal/api-utils.ts, src/shims/internal/app-route-detection.ts, src/shims/internal/app-router-context.ts, src/shims/internal/cookie-serialize.ts, src/shims/internal/cookies.ts, src/shims/internal/link-status-registry.ts, src/shims/internal/make-hanging-promise.ts, src/shims/internal/pages-data-fetch-dedup.ts, src/shims/internal/pages-data-target.ts, src/shims/internal/pages-data-url.ts, src/shims/internal/parse-cookie-header.ts, src/shims/internal/route-pattern-for-warning.ts, src/shims/internal/router-context.ts, src/shims/internal/utils.ts, src/shims/internal/work-unit-async-storage.ts
ℹ target: node22.0.0
ℹ tsconfig: tsconfig.json
ℹ Build start
ℹ Cleaning 736 files
ℹ Granting execute permission to dist/cli.js
ℹ dist/index.js                                           104.22 kB │ gzip: 26.12 kB
ℹ dist/shims/navigation.js                                 67.62 kB │ gzip: 16.87 kB
ℹ dist/routing/app-route-graph.js                          59.75 kB │ gzip: 14.51 kB
ℹ dist/shims/router.js                                     55.70 kB │ gzip: 14.83 kB
ℹ dist/server/app-browser-entry.js                         53.69 kB │ gzip: 11.83 kB
ℹ dist/server/dev-error-overlay.js                         45.33 kB │ gzip: 10.72 kB
ℹ dist/server/prod-server.js                               44.54 kB │ gzip: 12.46 kB
ℹ dist/config/next-config.js                               41.77 kB │ gzip: 13.01 kB
ℹ dist/server/dev-server.js                                40.31 kB │ gzip:  9.69 kB
ℹ dist/config/config-matchers.js                           38.47 kB │ gzip: 12.36 kB
ℹ dist/deploy.js                                           38.45 kB │ gzip: 11.53 kB
ℹ dist/entries/app-rsc-entry.js                            36.62 kB │ gzip:  9.31 kB
ℹ dist/build/prerender.js                                  36.17 kB │ gzip:  9.45 kB
ℹ dist/check.js                                            35.06 kB │ gzip: 10.01 kB
ℹ dist/server/app-server-action-execution.js               32.42 kB │ gzip:  7.65 kB
ℹ dist/shims/metadata.js                                   31.86 kB │ gzip:  7.14 kB
ℹ dist/shims/cache.js                                      30.74 kB │ gzip:  9.04 kB
ℹ dist/plugins/fonts.js                                    30.73 kB │ gzip:  9.33 kB
ℹ dist/shims/fetch-cache.js                                28.38 kB │ gzip:  7.76 kB
ℹ dist/server/navigation-planner.js                        28.04 kB │ gzip:  5.52 kB
ℹ dist/server/cache-proof.js                               27.73 kB │ gzip:  5.76 kB
ℹ dist/shims/headers.js                                    27.63 kB │ gzip:  7.75 kB
ℹ dist/server/app-page-dispatch.js                         27.24 kB │ gzip:  6.20 kB
ℹ dist/cli.js                                              26.01 kB │ gzip:  7.96 kB
ℹ dist/shims/link.js                                       25.90 kB │ gzip:  7.08 kB
ℹ dist/server/app-page-route-wiring.js                     24.02 kB │ gzip:  4.81 kB
ℹ dist/server/app-page-render.js                           23.08 kB │ gzip:  5.49 kB
ℹ dist/shims/server.js                                     22.28 kB │ gzip:  6.87 kB
ℹ dist/build/report.js                                     20.84 kB │ gzip:  5.66 kB
ℹ dist/cloudflare/tpr.js                                   20.37 kB │ gzip:  6.76 kB
ℹ dist/shims/cache-runtime.js                              20.19 kB │ gzip:  6.45 kB
ℹ dist/server/request-pipeline.js                          19.80 kB │ gzip:  6.40 kB
ℹ dist/plugins/optimize-imports.js                         19.75 kB │ gzip:  5.46 kB
ℹ dist/server/app-elements-wire.js                         19.54 kB │ gzip:  4.57 kB
ℹ dist/server/app-browser-state.js                         19.06 kB │ gzip:  4.59 kB
ℹ dist/entries/pages-server-entry.js                       18.37 kB │ gzip:  5.09 kB
ℹ dist/shims/image.js                                      17.87 kB │ gzip:  5.31 kB
ℹ dist/server/file-based-metadata.js                       17.80 kB │ gzip:  4.08 kB
ℹ dist/server/app-browser-navigation-controller.js         17.72 kB │ gzip:  4.10 kB
ℹ dist/server/app-rsc-handler.js                           17.28 kB │ gzip:  4.29 kB
ℹ dist/server/dev-stack-sourcemap.js                       17.27 kB │ gzip:  4.62 kB
ℹ dist/server/metadata-routes.js                           17.19 kB │ gzip:  4.66 kB
ℹ dist/server/app-ssr-stream.js                            16.86 kB │ gzip:  5.41 kB
ℹ dist/plugins/dynamic-preload-metadata.js                 16.32 kB │ gzip:  3.96 kB
ℹ dist/server/pages-page-handler.js                        16.10 kB │ gzip:  4.22 kB
ℹ dist/server/app-page-cache.js                            14.52 kB │ gzip:  3.28 kB
ℹ dist/server/app-page-execution.js                        13.76 kB │ gzip:  4.25 kB
ℹ dist/shims/head.js                                       13.65 kB │ gzip:  4.89 kB
ℹ dist/entries/app-rsc-manifest.js                         13.52 kB │ gzip:  3.02 kB
ℹ dist/server/pages-page-response.js                       13.46 kB │ gzip:  4.44 kB
ℹ dist/server/app-ssr-entry.js                             13.39 kB │ gzip:  4.32 kB
ℹ dist/server/pages-page-data.js                           13.39 kB │ gzip:  3.97 kB
ℹ dist/shims/script.js                                     13.00 kB │ gzip:  4.03 kB
ℹ dist/plugins/import-meta-url.js                          12.53 kB │ gzip:  3.29 kB
ℹ dist/plugins/sass.js                                     12.45 kB │ gzip:  4.76 kB
ℹ dist/server/isr-cache.js                                 12.32 kB │ gzip:  4.45 kB
ℹ dist/shims/font-google-base.js                           12.12 kB │ gzip:  4.06 kB
ℹ dist/server/app-page-boundary-render.js                  11.97 kB │ gzip:  2.88 kB
ℹ dist/server/app-page-probe.js                            11.67 kB │ gzip:  3.83 kB
ℹ dist/shims/form.js                                       11.06 kB │ gzip:  3.51 kB
ℹ dist/server/pages-request-pipeline.js                    10.92 kB │ gzip:  2.97 kB
ℹ dist/server/app-rsc-cache-busting.js                     10.79 kB │ gzip:  2.97 kB
ℹ dist/shims/slot.js                                       10.73 kB │ gzip:  2.92 kB
ℹ dist/server/app-page-head.js                             10.70 kB │ gzip:  2.78 kB
ℹ dist/build/client-build-config.js                        10.50 kB │ gzip:  4.10 kB
ℹ dist/server/app-browser-history-controller.js            10.18 kB │ gzip:  2.51 kB
ℹ dist/server/app-page-element-builder.js                  10.16 kB │ gzip:  3.14 kB
ℹ dist/server/app-browser-visible-commit.js                 9.72 kB │ gzip:  2.23 kB
ℹ dist/shims/error-boundary.js                              9.70 kB │ gzip:  2.05 kB
ℹ dist/server/middleware-runtime.js                         9.64 kB │ gzip:  2.77 kB
ℹ dist/server/app-history-state.js                          9.60 kB │ gzip:  2.29 kB
ℹ dist/typegen.js                                           9.46 kB │ gzip:  2.85 kB
ℹ dist/server/client-reuse-manifest.js                      9.39 kB │ gzip:  2.41 kB
ℹ dist/server/api-handler.js                                9.12 kB │ gzip:  3.23 kB
ℹ dist/build/css-url-assets.js                              8.98 kB │ gzip:  3.46 kB
ℹ dist/server/metadata-route-response.js                    8.92 kB │ gzip:  2.48 kB
ℹ dist/server/app-route-handler-runtime.js                  8.82 kB │ gzip:  2.39 kB
ℹ dist/server/image-optimization.js                         8.71 kB │ gzip:  3.09 kB
ℹ dist/server/app-optimistic-routing.js                     8.69 kB │ gzip:  2.37 kB
ℹ dist/server/app-page-request.js                           8.57 kB │ gzip:  2.19 kB
ℹ dist/init.js                                              8.57 kB │ gzip:  3.07 kB
ℹ dist/build/standalone.js                                  8.41 kB │ gzip:  2.58 kB
ℹ dist/server/socket-error-backstop.js                      8.35 kB │ gzip:  3.49 kB
ℹ dist/build/run-prerender.js                               8.35 kB │ gzip:  3.04 kB
ℹ dist/server/pages-i18n.js                                 8.29 kB │ gzip:  2.92 kB
ℹ dist/plugins/og-assets.js                                 8.25 kB │ gzip:  3.22 kB
ℹ dist/routing/utils.js                                     8.09 kB │ gzip:  3.05 kB
ℹ dist/client/navigation-runtime.js                         8.09 kB │ gzip:  2.08 kB
ℹ dist/server/headers.js                                    7.98 kB │ gzip:  2.88 kB
ℹ dist/server/pages-node-compat.js                          7.96 kB │ gzip:  2.53 kB
ℹ dist/server/static-file-cache.js                          7.80 kB │ gzip:  3.11 kB
ℹ dist/shims/font-local.js                                  7.77 kB │ gzip:  2.69 kB
ℹ dist/server/app-layout-param-observation.js               7.75 kB │ gzip:  1.88 kB
ℹ dist/server/skip-cache-proof.js                           7.73 kB │ gzip:  1.94 kB
ℹ dist/plugins/client-reference-dedup.js                    7.73 kB │ gzip:  2.40 kB
ℹ dist/shims/dynamic.js                                     7.72 kB │ gzip:  2.21 kB
ℹ dist/shims/constants.js                                   7.65 kB │ gzip:  2.38 kB
ℹ dist/routing/route-pattern.js                             7.47 kB │ gzip:  2.10 kB
ℹ dist/utils/project.js                                     7.00 kB │ gzip:  2.40 kB
ℹ dist/entries/pages-client-entry.js                        6.75 kB │ gzip:  2.70 kB
ℹ dist/server/app-middleware.js                             6.70 kB │ gzip:  1.82 kB
ℹ dist/server/app-route-handler-response.js                 6.68 kB │ gzip:  2.22 kB
ℹ dist/server/app-route-handler-dispatch.js                 6.66 kB │ gzip:  1.76 kB
ℹ dist/shims/thenable-params.js                             6.50 kB │ gzip:  1.56 kB
ℹ dist/server/pages-data-route.js                           6.38 kB │ gzip:  2.39 kB
ℹ dist/server/dev-origin-check.js                           6.28 kB │ gzip:  2.24 kB
ℹ dist/server/dev-lockfile.js                               6.23 kB │ gzip:  2.57 kB
ℹ dist/shims/url-utils.js                                   6.20 kB │ gzip:  2.18 kB
ℹ dist/plugins/remove-console.js                            6.13 kB │ gzip:  2.27 kB
ℹ dist/server/app-page-stream.js                            6.08 kB │ gzip:  2.24 kB
ℹ dist/server/app-page-response.js                          5.99 kB │ gzip:  1.51 kB
ℹ dist/build/route-classification-manifest.js               5.96 kB │ gzip:  2.26 kB
ℹ dist/server/app-route-handler-execution.js                5.93 kB │ gzip:  1.61 kB
ℹ dist/server/app-page-boundary.js                          5.88 kB │ gzip:  1.70 kB
ℹ dist/utils/asset-prefix.js                                5.79 kB │ gzip:  2.18 kB
ℹ dist/server/seed-cache.js                                 5.72 kB │ gzip:  2.06 kB
ℹ dist/plugins/require-context.js                           5.68 kB │ gzip:  1.98 kB
ℹ dist/server/metadata-route-build-data.js                  5.67 kB │ gzip:  1.54 kB
ℹ dist/config/tsconfig-paths.js                             5.63 kB │ gzip:  2.04 kB
ℹ dist/routing/pages-router.js                              5.58 kB │ gzip:  1.69 kB
ℹ dist/shims/ppr-fallback-shell.js                          5.58 kB │ gzip:  1.42 kB
ℹ dist/server/pages-document-initial-props.js               5.56 kB │ gzip:  2.19 kB
ℹ dist/server/pages-asset-tags.js                           5.54 kB │ gzip:  2.16 kB
ℹ dist/server/instrumentation.js                            5.52 kB │ gzip:  2.13 kB
ℹ dist/shims/default-global-error.js                        5.51 kB │ gzip:  1.90 kB
ℹ dist/server/app-fallback-renderer.js                      5.46 kB │ gzip:  1.29 kB
ℹ dist/server/prerender-route-params.js                     5.31 kB │ gzip:  1.47 kB
ℹ dist/utils/query.js                                       5.29 kB │ gzip:  1.79 kB
ℹ dist/server/app-rsc-route-matching.js                     5.02 kB │ gzip:  1.55 kB
ℹ dist/routing/route-validation.js                          4.95 kB │ gzip:  1.61 kB
ℹ dist/utils/lazy-chunks.js                                 4.91 kB │ gzip:  1.90 kB
ℹ dist/server/otel-tracer-extension.js                      4.71 kB │ gzip:  1.82 kB
ℹ dist/server/artifact-compatibility.js                     4.64 kB │ gzip:  1.11 kB
ℹ dist/server/middleware.js                                 4.61 kB │ gzip:  1.95 kB
ℹ dist/server/app-segment-config.js                         4.58 kB │ gzip:  1.33 kB
ℹ dist/shims/app-router-scroll.js                           4.57 kB │ gzip:  1.58 kB
ℹ dist/server/app-browser-action-result.js                  4.53 kB │ gzip:  1.61 kB
ℹ dist/routing/file-matcher.js                              4.48 kB │ gzip:  1.75 kB
ℹ dist/server/middleware-matcher.js                         4.42 kB │ gzip:  1.45 kB
ℹ dist/shims/cdn-cache.js                                   4.35 kB │ gzip:  1.86 kB
ℹ dist/build/precompress.js                                 4.32 kB │ gzip:  1.93 kB
ℹ dist/server/app-rsc-request-normalization.js              4.19 kB │ gzip:  1.71 kB
ℹ dist/routing/route-trie.js                                4.15 kB │ gzip:  1.40 kB
ℹ dist/shims/error.js                                       4.05 kB │ gzip:  1.61 kB
ℹ dist/build/layout-classification.js                       3.99 kB │ gzip:  1.60 kB
ℹ dist/shims/font-utils.js                                  3.94 kB │ gzip:  1.52 kB
ℹ dist/cli-args.js                                          3.94 kB │ gzip:  1.37 kB
ℹ dist/utils/client-runtime-metadata.js                     3.87 kB │ gzip:  1.40 kB
ℹ dist/shims/internal/pages-data-target.js                  3.80 kB │ gzip:  1.73 kB
ℹ dist/utils/client-build-manifest.js                       3.80 kB │ gzip:  1.17 kB
ℹ dist/server/app-prerender-endpoints.js                    3.80 kB │ gzip:  1.16 kB
ℹ dist/utils/manifest-paths.js                              3.73 kB │ gzip:  1.25 kB
ℹ dist/server/http-error-responses.js                       3.72 kB │ gzip:  1.45 kB
ℹ dist/server/app-browser-client-reuse-manifest.js          3.71 kB │ gzip:  1.19 kB
ℹ dist/plugins/middleware-server-only.js                    3.67 kB │ gzip:  1.59 kB
ℹ dist/server/app-route-handler-cache.js                    3.65 kB │ gzip:  1.14 kB
ℹ dist/server/worker-utils.js                               3.63 kB │ gzip:  1.35 kB
ℹ dist/build/route-classification-injector.js               3.55 kB │ gzip:  1.18 kB
ℹ dist/server/dev-module-runner.js                          3.53 kB │ gzip:  1.55 kB
ℹ dist/build/ssr-manifest.js                                3.45 kB │ gzip:  1.05 kB
ℹ dist/server/app-route-handler-policy.js                   3.41 kB │ gzip:  1.08 kB
ℹ dist/server/app-prerender-static-params.js                3.40 kB │ gzip:  1.20 kB
ℹ dist/plugins/postcss.js                                   3.39 kB │ gzip:  1.31 kB
ℹ dist/server/pregenerated-concrete-paths.js                3.38 kB │ gzip:  1.30 kB
ℹ dist/build/google-fonts/validate.js                       3.38 kB │ gzip:  1.12 kB
ℹ dist/server/pages-serializable-props.js                   3.37 kB │ gzip:  1.35 kB
ℹ dist/server/server-action-not-found.js                    3.31 kB │ gzip:  1.17 kB
ℹ dist/server/app-ppr-fallback-shell.js                     3.31 kB │ gzip:  1.10 kB
ℹ dist/utils/error-cause.js                                 3.25 kB │ gzip:  1.56 kB
ℹ dist/server/isr-decision.js                               3.25 kB │ gzip:  1.12 kB
ℹ dist/server/app-page-segment-state.js                     3.21 kB │ gzip:  0.86 kB
ℹ dist/server/normalize-path.js                             3.21 kB │ gzip:  1.33 kB
ℹ dist/shims/document.js                                    3.18 kB │ gzip:  1.47 kB
ℹ dist/plugins/server-externals-manifest.js                 3.16 kB │ gzip:  1.43 kB
ℹ dist/build/nitro-route-rules.js                           3.15 kB │ gzip:  1.30 kB
ℹ dist/shims/unified-request-context.js                     3.14 kB │ gzip:  1.29 kB
ℹ dist/shims/image-config.js                                3.14 kB │ gzip:  1.38 kB
ℹ dist/server/app-browser-stream.js                         3.13 kB │ gzip:  1.11 kB
ℹ dist/server/middleware-request-headers.js                 3.13 kB │ gzip:  0.97 kB
ℹ dist/server/client-trace-metadata.js                      3.09 kB │ gzip:  1.33 kB
ℹ dist/server/pages-body-parser-config.js                   3.05 kB │ gzip:  1.34 kB
ℹ dist/shims/url-safety.js                                  3.04 kB │ gzip:  1.41 kB
ℹ dist/server/app-mounted-slots-header.js                   3.03 kB │ gzip:  1.45 kB
ℹ dist/shims/internal/app-route-detection.js                3.02 kB │ gzip:  1.22 kB
ℹ dist/shims/dynamic-preload-chunks.js                      3.00 kB │ gzip:  1.35 kB
ℹ dist/shims/internal/pages-data-fetch-dedup.js             2.99 kB │ gzip:  1.44 kB
ℹ dist/client/instrumentation-client-inject.js              2.98 kB │ gzip:  1.22 kB
ℹ dist/utils/domain-locale.js                               2.94 kB │ gzip:  0.93 kB
ℹ dist/server/pages-api-route.js                            2.92 kB │ gzip:  1.02 kB
ℹ dist/shims/internal/pages-data-url.js                     2.91 kB │ gzip:  1.33 kB
ℹ dist/server/proxy-trust.js                                2.89 kB │ gzip:  1.17 kB
ℹ dist/config/dotenv.js                                     2.87 kB │ gzip:  1.35 kB
ℹ dist/server/cache-control.js                              2.82 kB │ gzip:  1.19 kB
ℹ dist/server/pages-default-404.js                          2.81 kB │ gzip:  1.42 kB
ℹ dist/server/app-rsc-errors.js                             2.76 kB │ gzip:  1.21 kB
ℹ dist/entries/app-browser-entry.js                         2.76 kB │ gzip:  1.05 kB
ℹ dist/plugins/css-data-url.js                              2.75 kB │ gzip:  1.35 kB
ℹ dist/cache/cache-adapters-virtual.js                      2.73 kB │ gzip:  1.08 kB
ℹ dist/server/dev-route-files.js                            2.71 kB │ gzip:  0.94 kB
ℹ dist/server/app-page-render-observation.js                2.69 kB │ gzip:  0.83 kB
ℹ dist/build/assets-ignore.js                               2.61 kB │ gzip:  1.32 kB
ℹ dist/server/navigation-trace.js                           2.60 kB │ gzip:  0.94 kB
ℹ dist/shims/default-not-found.js                           2.58 kB │ gzip:  1.22 kB
ℹ dist/server/app-pages-bridge.js                           2.53 kB │ gzip:  0.94 kB
ℹ dist/shims/cache-for-request.js                           2.42 kB │ gzip:  1.04 kB
ℹ dist/server/app-browser-interception-context.js           2.40 kB │ gzip:  0.70 kB
ℹ dist/plugins/strip-server-exports.js                      2.36 kB │ gzip:  0.99 kB
ℹ dist/server/pages-get-initial-props.js                    2.36 kB │ gzip:  0.76 kB
ℹ dist/plugins/ast-utils.js                                 2.35 kB │ gzip:  0.78 kB
ℹ dist/shims/internal/als-registry.js                       2.33 kB │ gzip:  1.11 kB
ℹ dist/shims/navigation-state.js                            2.31 kB │ gzip:  0.88 kB
ℹ dist/server/app-rsc-response-finalizer.js                 2.25 kB │ gzip:  0.92 kB
ℹ dist/routing/app-router.js                                2.25 kB │ gzip:  0.86 kB
ℹ dist/server/app-browser-rsc-redirect.js                   2.24 kB │ gzip:  0.68 kB
ℹ dist/build/google-fonts/fallback-metrics.js               2.18 kB │ gzip:  0.81 kB
ℹ dist/shims/internal/cookie-serialize.js                   2.16 kB │ gzip:  1.04 kB
ℹ dist/shims/navigation.react-server.js                     2.16 kB │ gzip:  0.59 kB
ℹ dist/server/app-router-entry.js                           2.15 kB │ gzip:  0.85 kB
ℹ dist/server/app-ssr-error-meta.js                         2.11 kB │ gzip:  0.84 kB
ℹ dist/server/app-browser-popstate.js                       2.11 kB │ gzip:  0.75 kB
ℹ dist/server/csp.js                                        2.10 kB │ gzip:  0.71 kB
ℹ dist/utils/text-stream.js                                 2.08 kB │ gzip:  0.92 kB
ℹ dist/server/app-elements.js                               1.98 kB │ gzip:  0.66 kB
ℹ dist/server/app-interception-context-header.js            1.98 kB │ gzip:  1.02 kB
ℹ dist/client/window-next.js                                1.96 kB │ gzip:  0.92 kB
ℹ dist/client/vinext-next-data.js                           1.94 kB │ gzip:  0.77 kB
ℹ dist/server/app-page-render-identity.js                   1.93 kB │ gzip:  0.60 kB
ℹ dist/plugins/rsc-client-reference-loaders.js              1.92 kB │ gzip:  0.85 kB
ℹ dist/utils/hash.js                                        1.92 kB │ gzip:  1.00 kB
ℹ dist/build/inline-css.js                                  1.90 kB │ gzip:  0.79 kB
ℹ dist/server/dev-error-overlay-store.js                    1.89 kB │ gzip:  0.68 kB
ℹ dist/shims/internal/make-hanging-promise.js               1.89 kB │ gzip:  0.82 kB
ℹ dist/server/html.js                                       1.85 kB │ gzip:  0.92 kB
ℹ dist/server/app-client-reference-preloader.js             1.83 kB │ gzip:  0.59 kB
ℹ dist/build/static-export.js                               1.82 kB │ gzip:  0.71 kB
ℹ dist/shims/internal/link-status-registry.js               1.81 kB │ gzip:  0.71 kB
ℹ dist/shims/app.js                                         1.81 kB │ gzip:  0.87 kB
ℹ dist/shims/link-prefetch.js                               1.80 kB │ gzip:  0.74 kB
ℹ dist/server/app-page-params.js                            1.79 kB │ gzip:  0.57 kB
ℹ dist/shims/internal/route-pattern-for-warning.js          1.76 kB │ gzip:  0.88 kB
ℹ dist/shims/request-context.js                             1.76 kB │ gzip:  0.77 kB
ℹ dist/utils/base-path.js                                   1.73 kB │ gzip:  0.75 kB
ℹ dist/plugins/wasm-module-import.js                        1.72 kB │ gzip:  0.88 kB
ℹ dist/build/google-fonts/get-axes.js                       1.69 kB │ gzip:  0.70 kB
ℹ dist/server/request-log.js                                1.69 kB │ gzip:  0.76 kB
ℹ dist/server/app-browser-mpa-navigation.js                 1.68 kB │ gzip:  0.63 kB
ℹ dist/server/implicit-tags.js                              1.67 kB │ gzip:  0.65 kB
ℹ dist/entries/runtime-entry-module.js                      1.66 kB │ gzip:  0.76 kB
ℹ dist/shims/layout-segment-context.js                      1.66 kB │ gzip:  0.76 kB
ℹ dist/utils/encode-cache-tag.js                            1.65 kB │ gzip:  0.93 kB
ℹ dist/plugins/instrumentation-client.js                    1.64 kB │ gzip:  0.69 kB
ℹ dist/shims/unrecognized-action-error.js                   1.63 kB │ gzip:  0.77 kB
ℹ dist/build/next-client-runtime-manifests.js               1.62 kB │ gzip:  0.56 kB
ℹ dist/routing/route-matching.js                            1.60 kB │ gzip:  0.75 kB
ℹ dist/server/server-globals.js                             1.58 kB │ gzip:  0.70 kB
ℹ dist/shims/internal/app-router-context.js                 1.58 kB │ gzip:  0.62 kB
ℹ dist/shims/legacy-image.js                                1.56 kB │ gzip:  0.70 kB
ℹ dist/server/next-error-digest.js                          1.55 kB │ gzip:  0.72 kB
ℹ dist/shims/app-router-scroll-state.js                     1.54 kB │ gzip:  0.49 kB
ℹ dist/server/instrumentation-runtime.js                    1.54 kB │ gzip:  0.72 kB
ℹ dist/server/app-render-dependency.js                      1.53 kB │ gzip:  0.54 kB
ℹ dist/utils/vite-version.js                                1.49 kB │ gzip:  0.75 kB
ℹ dist/shims/router-state.js                                1.48 kB │ gzip:  0.68 kB
ℹ dist/utils/client-entry-manifest.js                       1.46 kB │ gzip:  0.52 kB
ℹ dist/server/app-rsc-render-mode.js                        1.45 kB │ gzip:  0.44 kB
ℹ dist/shims/og.js                                          1.45 kB │ gzip:  0.71 kB
ℹ dist/server/static-layout-client-reuse-proof.js           1.42 kB │ gzip:  0.47 kB
ℹ dist/server/app-inline-css-client.js                      1.42 kB │ gzip:  0.58 kB
ℹ dist/server/middleware-response-headers.js                1.41 kB │ gzip:  0.66 kB
ℹ dist/server/document-initial-head.js                      1.41 kB │ gzip:  0.70 kB
ℹ dist/shims/i18n-context.js                                1.41 kB │ gzip:  0.47 kB
ℹ dist/server/rsc-stream-hints.js                           1.39 kB │ gzip:  0.65 kB
ℹ dist/plugins/async-hooks-stub.js                          1.38 kB │ gzip:  0.70 kB
ℹ dist/server/app-static-generation.js                      1.36 kB │ gzip:  0.62 kB
ℹ dist/shims/i18n-state.js                                  1.34 kB │ gzip:  0.65 kB
ℹ dist/server/app-page-method.js                            1.33 kB │ gzip:  0.53 kB
ℹ dist/shims/head-state.js                                  1.27 kB │ gzip:  0.51 kB
ℹ dist/utils/vinext-root.js                                 1.27 kB │ gzip:  0.62 kB
ℹ dist/shims/hash-scroll.js                                 1.26 kB │ gzip:  0.53 kB
ℹ dist/build/google-fonts/build-url.js                      1.24 kB │ gzip:  0.57 kB
ℹ dist/utils/mdx-scan.js                                    1.21 kB │ gzip:  0.63 kB
ℹ dist/server/app-route-module-loader.js                    1.20 kB │ gzip:  0.54 kB
ℹ dist/server/pages-revalidate.js                           1.19 kB │ gzip:  0.60 kB
ℹ dist/utils/public-routes.js                               1.19 kB │ gzip:  0.53 kB
ℹ dist/shims/root-params.js                                 1.16 kB │ gzip:  0.51 kB
ℹ dist/server/app-rsc-embedded-chunks.js                    1.16 kB │ gzip:  0.53 kB
ℹ dist/server/dev-initial-server-error.js                   1.07 kB │ gzip:  0.51 kB
ℹ dist/server/app-post-middleware-context.js                1.06 kB │ gzip:  0.55 kB
ℹ dist/server/app-request-context.js                        1.06 kB │ gzip:  0.52 kB
ℹ dist/build/clean-output.js                                1.05 kB │ gzip:  0.43 kB
ℹ dist/shims/script-nonce-context.js                        1.05 kB │ gzip:  0.38 kB
ℹ dist/server/prerender-work-unit-setup.js                  1.05 kB │ gzip:  0.57 kB
ℹ dist/plugins/rsc-client-shim-excludes.js                  1.03 kB │ gzip:  0.49 kB
ℹ dist/shims/pages-router-runtime.js                        1.02 kB │ gzip:  0.46 kB
ℹ dist/server/app-browser-hydration.js                      0.99 kB │ gzip:  0.45 kB
ℹ dist/server/default-not-found-module.js                   0.99 kB │ gzip:  0.56 kB
ℹ dist/shims/compat-router.js                               0.97 kB │ gzip:  0.49 kB
ℹ dist/server/default-global-error-module.js                0.97 kB │ gzip:  0.55 kB
ℹ dist/entries/app-ssr-entry.js                             0.95 kB │ gzip:  0.53 kB
ℹ dist/shims/use-merged-ref.js                              0.95 kB │ gzip:  0.37 kB
ℹ dist/server/app-rsc-error-handler.js                      0.91 kB │ gzip:  0.49 kB
ℹ dist/shims/internal/parse-cookie-header.js                0.89 kB │ gzip:  0.52 kB
ℹ dist/server/app-visited-response-cache.js                 0.88 kB │ gzip:  0.39 kB
ℹ dist/utils/path.js                                        0.85 kB │ gzip:  0.53 kB
ℹ dist/client/validate-module-path.js                       0.84 kB │ gzip:  0.47 kB
ℹ dist/shims/readonly-url-search-params.js                  0.83 kB │ gzip:  0.38 kB
ℹ dist/server/app-page-search-params-observation.js         0.82 kB │ gzip:  0.36 kB
ℹ dist/server/pages-media-type.js                           0.82 kB │ gzip:  0.46 kB
ℹ dist/utils/html-limited-bots.js                           0.81 kB │ gzip:  0.48 kB
ℹ dist/server/pages-readiness.js                            0.80 kB │ gzip:  0.36 kB
ℹ dist/build/server-manifest.js                             0.79 kB │ gzip:  0.44 kB
ℹ dist/server/app-browser-error.js                          0.77 kB │ gzip:  0.34 kB
ℹ dist/shims/client-hook-error.js                           0.75 kB │ gzip:  0.41 kB
ℹ dist/shims/internal/work-unit-async-storage.js            0.75 kB │ gzip:  0.41 kB
ℹ dist/client/instrumentation-client-state.js               0.74 kB │ gzip:  0.28 kB
ℹ dist/server/cookie-utils.js                               0.73 kB │ gzip:  0.44 kB
ℹ dist/utils/safe-json-file.js                              0.70 kB │ gzip:  0.45 kB
ℹ dist/utils/prerender-output-paths.js                      0.69 kB │ gzip:  0.33 kB
ℹ dist/server/pages-page-method.js                          0.67 kB │ gzip:  0.37 kB
ℹ dist/shims/client-locale.js                               0.66 kB │ gzip:  0.35 kB
ℹ dist/shims/internal/utils.js                              0.66 kB │ gzip:  0.34 kB
ℹ dist/shims/web-vitals.js                                  0.61 kB │ gzip:  0.28 kB
ℹ dist/server/cache-headers.js                              0.60 kB │ gzip:  0.27 kB
ℹ dist/shims/amp.js                                         0.50 kB │ gzip:  0.30 kB
ℹ dist/shims/config.js                                      0.50 kB │ gzip:  0.29 kB
ℹ dist/utils/navigation-signal.js                           0.48 kB │ gzip:  0.29 kB
ℹ dist/utils/sorted-array.js                                0.48 kB │ gzip:  0.27 kB
ℹ dist/build/google-fonts/sort-variants.js                  0.46 kB │ gzip:  0.25 kB
ℹ dist/server/app-hook-warning-suppression.js               0.46 kB │ gzip:  0.29 kB
ℹ dist/utils/cache-control-metadata.js                      0.45 kB │ gzip:  0.25 kB
ℹ dist/client/instrumentation-client.js                     0.43 kB │ gzip:  0.18 kB
ℹ dist/shims/offline.js                                     0.43 kB │ gzip:  0.30 kB
ℹ dist/client/pages-router-link-navigation.js               0.42 kB │ gzip:  0.24 kB
ℹ dist/server/streaming-metadata.js                         0.34 kB │ gzip:  0.21 kB
ℹ dist/shims/internal/router-context.js                     0.33 kB │ gzip:  0.22 kB
ℹ dist/shims/before-interactive-context.js                  0.31 kB │ gzip:  0.18 kB
ℹ dist/shims/font-google.js                                 0.28 kB │ gzip:  0.15 kB
ℹ dist/utils/promise.js                                     0.24 kB │ gzip:  0.17 kB
ℹ dist/utils/number.js                                      0.20 kB │ gzip:  0.15 kB
ℹ dist/server/dev-stack-sourcemap-endpoint.js               0.19 kB │ gzip:  0.16 kB
ℹ dist/build/google-fonts/font-metadata.js                  0.19 kB │ gzip:  0.14 kB
ℹ dist/utils/compare.js                                     0.19 kB │ gzip:  0.14 kB
ℹ dist/server/app-bfcache-id.js                             0.18 kB │ gzip:  0.13 kB
ℹ dist/server/edge-api-runtime.js                           0.18 kB │ gzip:  0.15 kB
ℹ dist/utils/record.js                                      0.18 kB │ gzip:  0.16 kB
ℹ dist/utils/dev-error-recovery-event.js                    0.17 kB │ gzip:  0.14 kB
ℹ dist/utils/regex.js                                       0.15 kB │ gzip:  0.15 kB
ℹ dist/cloudflare/index.js                                  0.14 kB │ gzip:  0.12 kB
ℹ dist/shims/internal/cookies.js                            0.11 kB │ gzip:  0.08 kB
ℹ dist/cache.js                                             0.09 kB │ gzip:  0.08 kB
ℹ dist/entries/pages-entry-helpers.js                       0.09 kB │ gzip:  0.09 kB
ℹ dist/build/layout-classification-types.js                 0.01 kB │ gzip:  0.03 kB
ℹ dist/client/empty-module.js                               0.01 kB │ gzip:  0.03 kB
ℹ dist/shims/client-only.js                                 0.01 kB │ gzip:  0.03 kB
ℹ dist/shims/internal/api-utils.js                          0.01 kB │ gzip:  0.03 kB
ℹ dist/shims/request-state-types.js                         0.01 kB │ gzip:  0.03 kB
ℹ dist/shims/server-only.js                                 0.01 kB │ gzip:  0.03 kB
ℹ dist/build/google-fonts/font-data.js                    358.51 kB │ gzip: 24.18 kB
ℹ dist/build/google-fonts/fallback-metrics-data.js        103.01 kB │ gzip: 23.28 kB
ℹ dist/cloudflare/src/cache/kv-data-adapter.runtime.js     15.65 kB │ gzip:  5.30 kB
ℹ dist/cloudflare/src/cache/cdn-adapter.runtime.js          4.23 kB │ gzip:  1.96 kB
ℹ dist/cloudflare/src/utils/cache-control-metadata.js       0.82 kB │ gzip:  0.42 kB
ℹ dist/shims/navigation.d.ts                               28.82 kB │ gzip:  8.69 kB
ℹ dist/config/next-config.d.ts                             23.30 kB │ gzip:  8.14 kB
ℹ dist/server/cache-proof.d.ts                             16.27 kB │ gzip:  3.06 kB
ℹ dist/shims/cache.d.ts                                    15.81 kB │ gzip:  5.09 kB
ℹ dist/routing/app-route-graph.d.ts                        15.25 kB │ gzip:  4.52 kB
ℹ dist/config/config-matchers.d.ts                         12.18 kB │ gzip:  4.64 kB
ℹ dist/server/request-pipeline.d.ts                        11.14 kB │ gzip:  4.08 kB
ℹ dist/shims/headers.d.ts                                  11.11 kB │ gzip:  3.91 kB
ℹ dist/server/app-server-action-execution.d.ts             10.63 kB │ gzip:  3.33 kB
ℹ dist/shims/server.d.ts                                   10.54 kB │ gzip:  3.45 kB
ℹ dist/server/app-elements-wire.d.ts                        9.41 kB │ gzip:  2.53 kB
ℹ dist/server/pages-page-data.d.ts                          8.87 kB │ gzip:  3.05 kB
ℹ dist/shims/metadata.d.ts                                  8.62 kB │ gzip:  2.51 kB
ℹ dist/deploy.d.ts                                          8.54 kB │ gzip:  3.07 kB
ℹ dist/server/prod-server.d.ts                              8.47 kB │ gzip:  3.41 kB
ℹ dist/build/prerender.d.ts                                 8.13 kB │ gzip:  3.08 kB
ℹ dist/server/app-page-dispatch.d.ts                        8.07 kB │ gzip:  2.43 kB
ℹ dist/shims/router.d.ts                                    8.04 kB │ gzip:  2.77 kB
ℹ dist/build/client-build-config.d.ts                       7.81 kB │ gzip:  2.96 kB
ℹ dist/server/app-page-route-wiring.d.ts                    7.81 kB │ gzip:  2.11 kB
ℹ dist/server/navigation-planner.d.ts                       7.79 kB │ gzip:  1.99 kB
ℹ dist/server/headers.d.ts                                  7.73 kB │ gzip:  2.76 kB
ℹ dist/shims/constants.d.ts                                 7.54 kB │ gzip:  2.10 kB
ℹ dist/server/app-browser-state.d.ts                        7.37 kB │ gzip:  1.76 kB
ℹ dist/server/app-page-stream.d.ts                          7.26 kB │ gzip:  2.36 kB
ℹ dist/server/app-page-request.d.ts                         7.20 kB │ gzip:  1.57 kB
ℹ dist/client/window-next.d.ts                              7.12 kB │ gzip:  2.64 kB
ℹ dist/server/app-page-execution.d.ts                       6.96 kB │ gzip:  2.67 kB
ℹ dist/server/app-rsc-handler.d.ts                          6.86 kB │ gzip:  2.12 kB
ℹ dist/server/isr-cache.d.ts                                6.67 kB │ gzip:  2.56 kB
ℹ dist/server/app-page-probe.d.ts                           6.66 kB │ gzip:  2.57 kB
ℹ dist/shims/error-boundary.d.ts                            6.37 kB │ gzip:  1.16 kB
ℹ dist/server/pages-page-response.d.ts                      6.24 kB │ gzip:  2.54 kB
ℹ dist/server/client-reuse-manifest.d.ts                    6.04 kB │ gzip:  1.49 kB
ℹ dist/shims/fetch-cache.d.ts                               6.03 kB │ gzip:  2.26 kB
ℹ dist/server/app-page-boundary.d.ts                        5.88 kB │ gzip:  1.41 kB
ℹ dist/build/report.d.ts                                    5.77 kB │ gzip:  2.23 kB
ℹ dist/server/app-page-cache.d.ts                           5.63 kB │ gzip:  1.42 kB
ℹ dist/server/app-page-element-builder.d.ts                 5.59 kB │ gzip:  1.81 kB
ℹ dist/server/image-optimization.d.ts                       5.56 kB │ gzip:  2.22 kB
ℹ dist/server/pages-data-route.d.ts                         5.54 kB │ gzip:  2.08 kB
ℹ dist/shims/cdn-cache.d.ts                                 5.48 kB │ gzip:  2.17 kB
ℹ dist/server/pages-page-handler.d.ts                       5.41 kB │ gzip:  1.94 kB
ℹ dist/server/app-browser-history-controller.d.ts           5.35 kB │ gzip:  1.78 kB
ℹ dist/server/metadata-routes.d.ts                          5.34 kB │ gzip:  1.78 kB
ℹ dist/server/app-fallback-renderer.d.ts                    5.30 kB │ gzip:  1.80 kB
ℹ dist/server/app-browser-navigation-controller.d.ts        5.21 kB │ gzip:  1.60 kB
ℹ dist/plugins/fonts.d.ts                                   5.19 kB │ gzip:  2.31 kB
ℹ dist/server/pages-request-pipeline.d.ts                   5.05 kB │ gzip:  1.86 kB
ℹ dist/shims/link.d.ts                                      5.01 kB │ gzip:  1.52 kB
ℹ dist/utils/asset-prefix.d.ts                              5.00 kB │ gzip:  1.93 kB
ℹ dist/server/dev-lockfile.d.ts                             4.90 kB │ gzip:  2.01 kB
ℹ dist/server/app-page-render.d.ts                          4.84 kB │ gzip:  1.63 kB
ℹ dist/server/pages-document-initial-props.d.ts             4.76 kB │ gzip:  1.68 kB
ℹ dist/server/pages-i18n.d.ts                               4.73 kB │ gzip:  1.83 kB
ℹ dist/routing/utils.d.ts                                   4.59 kB │ gzip:  1.83 kB
ℹ dist/index.d.ts                                           4.54 kB │ gzip:  1.83 kB
ℹ dist/entries/app-rsc-entry.d.ts                           4.36 kB │ gzip:  1.97 kB
ℹ dist/server/app-page-boundary-render.d.ts                 4.31 kB │ gzip:  1.41 kB
ℹ dist/client/navigation-runtime.d.ts                       4.29 kB │ gzip:  1.51 kB
ℹ dist/server/http-error-responses.d.ts                     4.18 kB │ gzip:  1.73 kB
ℹ dist/shims/cache-runtime.d.ts                             4.13 kB │ gzip:  1.77 kB
ℹ dist/server/app-history-state.d.ts                        3.97 kB │ gzip:  1.14 kB
ℹ dist/shims/document.d.ts                                  3.94 kB │ gzip:  1.66 kB
ℹ dist/server/app-rsc-cache-busting.d.ts                    3.86 kB │ gzip:  1.27 kB
ℹ dist/shims/unified-request-context.d.ts                   3.82 kB │ gzip:  1.40 kB
ℹ dist/server/instrumentation.d.ts                          3.79 kB │ gzip:  1.48 kB
ℹ dist/server/isr-decision.d.ts                             3.79 kB │ gzip:  1.47 kB
ℹ dist/check.d.ts                                           3.72 kB │ gzip:  1.69 kB
ℹ dist/server/app-route-handler-execution.d.ts              3.71 kB │ gzip:  1.30 kB
ℹ dist/server/pages-asset-tags.d.ts                         3.70 kB │ gzip:  1.57 kB
ℹ dist/shims/head.d.ts                                      3.69 kB │ gzip:  1.65 kB
ℹ dist/server/middleware.d.ts                               3.67 kB │ gzip:  1.56 kB
ℹ dist/server/navigation-trace.d.ts                         3.56 kB │ gzip:  1.15 kB
ℹ dist/cloudflare/tpr.d.ts                                  3.43 kB │ gzip:  1.59 kB
ℹ dist/server/app-ssr-stream.d.ts                           3.33 kB │ gzip:  1.41 kB
ℹ dist/server/pages-api-route.d.ts                          3.31 kB │ gzip:  1.43 kB
ℹ dist/init.d.ts                                            3.31 kB │ gzip:  1.46 kB
ℹ dist/server/artifact-compatibility.d.ts                   3.28 kB │ gzip:  0.76 kB
ℹ dist/server/app-rsc-request-normalization.d.ts            3.27 kB │ gzip:  1.46 kB
ℹ dist/shims/font-google-base.d.ts                          3.22 kB │ gzip:  1.35 kB
ℹ dist/server/app-rsc-route-matching.d.ts                   3.21 kB │ gzip:  1.18 kB
ℹ dist/routing/route-pattern.d.ts                           3.20 kB │ gzip:  1.20 kB
ℹ dist/server/app-browser-visible-commit.d.ts               3.17 kB │ gzip:  0.86 kB
ℹ dist/server/skip-cache-proof.d.ts                         3.13 kB │ gzip:  0.78 kB
ℹ dist/utils/lazy-chunks.d.ts                               3.02 kB │ gzip:  1.33 kB
ℹ dist/server/middleware-runtime.d.ts                       3.02 kB │ gzip:  1.23 kB
ℹ dist/shims/internal/pages-data-target.d.ts                3.01 kB │ gzip:  1.44 kB
ℹ dist/server/app-browser-action-result.d.ts                3.00 kB │ gzip:  0.96 kB
ℹ dist/plugins/sass.d.ts                                    3.00 kB │ gzip:  1.39 kB
ℹ dist/build/layout-classification.d.ts                     2.95 kB │ gzip:  1.16 kB
ℹ dist/server/app-page-response.d.ts                        2.94 kB │ gzip:  0.99 kB
ℹ dist/server/app-page-head.d.ts                            2.89 kB │ gzip:  0.83 kB
ℹ dist/utils/project.d.ts                                   2.88 kB │ gzip:  1.25 kB
ℹ dist/server/dev-origin-check.d.ts                         2.86 kB │ gzip:  1.20 kB
ℹ dist/build/route-classification-manifest.d.ts             2.85 kB │ gzip:  1.21 kB
ℹ dist/shims/internal/pages-data-fetch-dedup.d.ts           2.72 kB │ gzip:  1.33 kB
ℹ dist/server/pages-default-404.d.ts                        2.72 kB │ gzip:  1.34 kB
ℹ dist/shims/url-utils.d.ts                                 2.69 kB │ gzip:  1.06 kB
ℹ dist/utils/query.d.ts                                     2.64 kB │ gzip:  1.17 kB
ℹ dist/plugins/middleware-server-only.d.ts                  2.63 kB │ gzip:  1.23 kB
ℹ dist/server/dev-server.d.ts                               2.61 kB │ gzip:  1.21 kB
ℹ dist/server/static-file-cache.d.ts                        2.60 kB │ gzip:  1.23 kB
ℹ dist/cache/cache-adapters-virtual.d.ts                    2.59 kB │ gzip:  1.14 kB
ℹ dist/shims/font-utils.d.ts                                2.57 kB │ gzip:  1.01 kB
ℹ dist/routing/file-matcher.d.ts                            2.54 kB │ gzip:  1.04 kB
ℹ dist/server/app-route-handler-policy.d.ts                 2.52 kB │ gzip:  0.72 kB
ℹ dist/server/app-route-handler-runtime.d.ts                2.45 kB │ gzip:  0.99 kB
ℹ dist/server/pages-body-parser-config.d.ts                 2.41 kB │ gzip:  1.14 kB
ℹ dist/server/app-layout-param-observation.d.ts             2.40 kB │ gzip:  0.81 kB
ℹ dist/entries/app-rsc-manifest.d.ts                        2.40 kB │ gzip:  1.09 kB
ℹ dist/shims/request-context.d.ts                           2.37 kB │ gzip:  1.02 kB
ℹ dist/server/app-route-module-loader.d.ts                  2.36 kB │ gzip:  1.07 kB
ℹ dist/server/dev-error-overlay.d.ts                        2.32 kB │ gzip:  0.76 kB
ℹ dist/server/pages-node-compat.d.ts                        2.29 kB │ gzip:  0.91 kB
ℹ dist/plugins/og-assets.d.ts                               2.29 kB │ gzip:  1.11 kB
ℹ dist/server/otel-tracer-extension.d.ts                    2.28 kB │ gzip:  1.03 kB
ℹ dist/routing/route-trie.d.ts                              2.26 kB │ gzip:  1.07 kB
ℹ dist/shims/slot.d.ts                                      2.25 kB │ gzip:  0.81 kB
ℹ dist/server/app-route-handler-cache.d.ts                  2.23 kB │ gzip:  0.79 kB
ℹ dist/server/instrumentation-runtime.d.ts                  2.22 kB │ gzip:  1.08 kB
ℹ dist/server/cache-control.d.ts                            2.20 kB │ gzip:  1.03 kB
ℹ dist/shims/internal/link-status-registry.d.ts             2.19 kB │ gzip:  0.95 kB
ℹ dist/server/app-pages-bridge.d.ts                         2.16 kB │ gzip:  0.95 kB
ℹ dist/build/nitro-route-rules.d.ts                         2.14 kB │ gzip:  0.95 kB
ℹ dist/shims/internal/pages-data-url.d.ts                   2.14 kB │ gzip:  0.98 kB
ℹ dist/build/run-prerender.d.ts                             2.13 kB │ gzip:  1.00 kB
ℹ dist/config/dotenv.d.ts                                   2.13 kB │ gzip:  1.10 kB
ℹ dist/server/app-ssr-entry.d.ts                            2.12 kB │ gzip:  1.07 kB
ℹ dist/routing/pages-router.d.ts                            2.04 kB │ gzip:  0.85 kB
ℹ dist/server/app-optimistic-routing.d.ts                   2.02 kB │ gzip:  0.53 kB
ℹ dist/server/app-route-handler-dispatch.d.ts               2.02 kB │ gzip:  0.79 kB
ℹ dist/server/app-mounted-slots-header.d.ts                 2.02 kB │ gzip:  1.06 kB
ℹ dist/shims/cache-for-request.d.ts                         2.01 kB │ gzip:  0.88 kB
ℹ dist/build/static-export.d.ts                             1.99 kB │ gzip:  0.75 kB
ℹ dist/server/app-elements.d.ts                             1.98 kB │ gzip:  0.60 kB
ℹ dist/shims/internal/cookie-serialize.d.ts                 1.97 kB │ gzip:  0.95 kB
ℹ dist/build/layout-classification-types.d.ts               1.96 kB │ gzip:  0.86 kB
ℹ dist/client/instrumentation-client-inject.d.ts            1.95 kB │ gzip:  0.89 kB
ℹ dist/server/next-error-digest.d.ts                        1.94 kB │ gzip:  0.89 kB
ℹ dist/server/normalize-path.d.ts                           1.91 kB │ gzip:  0.90 kB
ℹ dist/plugins/optimize-imports.d.ts                        1.91 kB │ gzip:  0.93 kB
ℹ dist/utils/client-runtime-metadata.d.ts                   1.91 kB │ gzip:  0.90 kB
ℹ dist/shims/script.d.ts                                    1.86 kB │ gzip:  0.88 kB
ℹ dist/shims/navigation.react-server.d.ts                   1.86 kB │ gzip:  0.54 kB
ℹ dist/server/pregenerated-concrete-paths.d.ts              1.81 kB │ gzip:  0.82 kB
ℹ dist/shims/image.d.ts                                     1.81 kB │ gzip:  0.83 kB
ℹ dist/shims/image-config.d.ts                              1.80 kB │ gzip:  0.87 kB
ℹ dist/shims/internal/app-route-detection.d.ts              1.80 kB │ gzip:  0.92 kB
ℹ dist/shims/ppr-fallback-shell.d.ts                        1.80 kB │ gzip:  0.55 kB
ℹ dist/shims/url-safety.d.ts                                1.79 kB │ gzip:  0.90 kB
ℹ dist/server/dev-stack-sourcemap.d.ts                      1.77 kB │ gzip:  0.62 kB
ℹ dist/server/app-middleware.d.ts                           1.77 kB │ gzip:  0.72 kB
ℹ dist/utils/manifest-paths.d.ts                            1.76 kB │ gzip:  0.82 kB
ℹ dist/server/socket-error-backstop.d.ts                    1.76 kB │ gzip:  0.91 kB
ℹ dist/server/prerender-route-params.d.ts                   1.76 kB │ gzip:  0.47 kB
ℹ dist/server/proxy-trust.d.ts                              1.73 kB │ gzip:  0.84 kB
ℹ dist/build/assets-ignore.d.ts                             1.72 kB │ gzip:  0.92 kB
ℹ dist/server/app-segment-config.d.ts                       1.68 kB │ gzip:  0.66 kB
ℹ dist/server/pages-page-method.d.ts                        1.67 kB │ gzip:  0.85 kB
ℹ dist/server/app-interception-context-header.d.ts          1.65 kB │ gzip:  0.91 kB
ℹ dist/server/app-route-handler-response.d.ts               1.62 kB │ gzip:  0.52 kB
ℹ dist/shims/unrecognized-action-error.d.ts                 1.58 kB │ gzip:  0.74 kB
ℹ dist/shims/before-interactive-context.d.ts                1.56 kB │ gzip:  0.71 kB
ℹ dist/plugins/client-reference-dedup.d.ts                  1.55 kB │ gzip:  0.74 kB
ℹ dist/server/app-rsc-response-finalizer.d.ts               1.54 kB │ gzip:  0.78 kB
ℹ dist/server/app-page-render-observation.d.ts              1.54 kB │ gzip:  0.50 kB
ℹ dist/shims/link-prefetch.d.ts                             1.53 kB │ gzip:  0.54 kB
ℹ dist/server/pages-readiness.d.ts                          1.51 kB │ gzip:  0.77 kB
ℹ dist/utils/encode-cache-tag.d.ts                          1.49 kB │ gzip:  0.86 kB
ℹ dist/server/dev-error-overlay-store.d.ts                  1.49 kB │ gzip:  0.53 kB
ℹ dist/server/client-trace-metadata.d.ts                    1.48 kB │ gzip:  0.63 kB
ℹ dist/server/app-prerender-static-params.d.ts              1.46 kB │ gzip:  0.67 kB
ℹ dist/build/css-url-assets.d.ts                            1.46 kB │ gzip:  0.77 kB
ℹ dist/server/file-based-metadata.d.ts                      1.45 kB │ gzip:  0.66 kB
ℹ dist/server/app-browser-hydration.d.ts                    1.43 kB │ gzip:  0.51 kB
ℹ dist/server/html.d.ts                                     1.41 kB │ gzip:  0.71 kB
ℹ dist/client/vinext-next-data.d.ts                         1.39 kB │ gzip:  0.62 kB
ℹ dist/shims/internal/route-pattern-for-warning.d.ts        1.39 kB │ gzip:  0.73 kB
ℹ dist/utils/text-stream.d.ts                               1.37 kB │ gzip:  0.73 kB
ℹ dist/shims/internal/work-unit-async-storage.d.ts          1.37 kB │ gzip:  0.55 kB
ℹ dist/utils/base-path.d.ts                                 1.36 kB │ gzip:  0.60 kB
ℹ dist/utils/domain-locale.d.ts                             1.35 kB │ gzip:  0.57 kB
ℹ dist/shims/internal/utils.d.ts                            1.34 kB │ gzip:  0.61 kB
ℹ dist/build/precompress.d.ts                               1.33 kB │ gzip:  0.68 kB
ℹ dist/routing/app-router.d.ts                              1.31 kB │ gzip:  0.55 kB
ℹ dist/server/server-action-not-found.d.ts                  1.31 kB │ gzip:  0.59 kB
ℹ dist/server/app-browser-popstate.d.ts                     1.31 kB │ gzip:  0.48 kB
ℹ dist/server/app-browser-stream.d.ts                       1.30 kB │ gzip:  0.60 kB
ℹ dist/shims/font-local.d.ts                                1.29 kB │ gzip:  0.59 kB
ℹ dist/shims/internal/app-router-context.d.ts               1.24 kB │ gzip:  0.47 kB
ℹ dist/shims/legacy-image.d.ts                              1.24 kB │ gzip:  0.55 kB
ℹ dist/shims/layout-segment-context.d.ts                    1.24 kB │ gzip:  0.55 kB
ℹ dist/server/app-browser-rsc-redirect.d.ts                 1.23 kB │ gzip:  0.41 kB
ℹ dist/shims/default-global-error.d.ts                      1.22 kB │ gzip:  0.66 kB
ℹ dist/server/seed-cache.d.ts                               1.22 kB │ gzip:  0.64 kB
ℹ dist/server/app-browser-interception-context.d.ts         1.21 kB │ gzip:  0.51 kB
ℹ dist/shims/app.d.ts                                       1.20 kB │ gzip:  0.50 kB
ℹ dist/build/route-classification-injector.d.ts             1.19 kB │ gzip:  0.55 kB
ℹ dist/shims/navigation-state.d.ts                          1.19 kB │ gzip:  0.50 kB
ℹ dist/server/dev-module-runner.d.ts                        1.18 kB │ gzip:  0.62 kB
ℹ dist/utils/hash.d.ts                                      1.17 kB │ gzip:  0.65 kB
ℹ dist/plugins/postcss.d.ts                                 1.17 kB │ gzip:  0.61 kB
ℹ dist/shims/dynamic.d.ts                                   1.17 kB │ gzip:  0.54 kB
ℹ dist/server/pages-serializable-props.d.ts                 1.13 kB │ gzip:  0.56 kB
ℹ dist/entries/runtime-entry-module.d.ts                    1.13 kB │ gzip:  0.58 kB
ℹ dist/cli-args.d.ts                                        1.12 kB │ gzip:  0.57 kB
ℹ dist/entries/app-browser-entry.d.ts                       1.10 kB │ gzip:  0.58 kB
ℹ dist/plugins/server-externals-manifest.d.ts               1.09 kB │ gzip:  0.61 kB
ℹ dist/utils/vinext-root.d.ts                               1.07 kB │ gzip:  0.53 kB
ℹ dist/server/app-rsc-errors.d.ts                           1.05 kB │ gzip:  0.45 kB
ℹ dist/build/standalone.d.ts                                1.05 kB │ gzip:  0.53 kB
ℹ dist/utils/client-build-manifest.d.ts                     1.04 kB │ gzip:  0.30 kB
ℹ dist/server/app-rsc-render-mode.d.ts                      1.03 kB │ gzip:  0.38 kB
ℹ dist/server/metadata-route-build-data.d.ts                1.02 kB │ gzip:  0.41 kB
ℹ dist/shims/router-state.d.ts                              1.01 kB │ gzip:  0.53 kB
ℹ dist/shims/form.d.ts                                      0.99 kB │ gzip:  0.56 kB
ℹ dist/server/app-visited-response-cache.d.ts               0.97 kB │ gzip:  0.38 kB
ℹ dist/shims/error.d.ts                                     0.97 kB │ gzip:  0.53 kB
ℹ dist/server/app-render-dependency.d.ts                    0.97 kB │ gzip:  0.35 kB
ℹ dist/server/request-log.d.ts                              0.97 kB │ gzip:  0.53 kB
ℹ dist/server/default-not-found-module.d.ts                 0.94 kB │ gzip:  0.56 kB
ℹ dist/server/app-ppr-fallback-shell.d.ts                   0.94 kB │ gzip:  0.32 kB
ℹ dist/shims/config.d.ts                                    0.94 kB │ gzip:  0.45 kB
ℹ dist/routing/route-matching.d.ts                          0.93 kB │ gzip:  0.49 kB
ℹ dist/server/default-global-error-module.d.ts              0.92 kB │ gzip:  0.55 kB
ℹ dist/shims/request-state-types.d.ts                       0.89 kB │ gzip:  0.29 kB
ℹ dist/server/app-request-context.d.ts                      0.88 kB │ gzip:  0.48 kB
ℹ dist/server/app-page-render-identity.d.ts                 0.87 kB │ gzip:  0.33 kB
ℹ dist/shims/app-router-scroll-state.d.ts                   0.86 kB │ gzip:  0.28 kB
ℹ dist/plugins/ast-utils.d.ts                               0.85 kB │ gzip:  0.37 kB
ℹ dist/shims/thenable-params.d.ts                           0.84 kB │ gzip:  0.45 kB
ℹ dist/config/tsconfig-paths.d.ts                           0.84 kB │ gzip:  0.43 kB
ℹ dist/server/static-layout-client-reuse-proof.d.ts         0.83 kB │ gzip:  0.31 kB
ℹ dist/server/app-rsc-error-handler.d.ts                    0.82 kB │ gzip:  0.46 kB
ℹ dist/server/app-static-generation.d.ts                    0.78 kB │ gzip:  0.31 kB
ℹ dist/plugins/async-hooks-stub.d.ts                        0.78 kB │ gzip:  0.45 kB
ℹ dist/utils/client-entry-manifest.d.ts                     0.78 kB │ gzip:  0.29 kB
ℹ dist/server/app-prerender-endpoints.d.ts                  0.77 kB │ gzip:  0.38 kB
ℹ dist/server/csp.d.ts                                      0.76 kB │ gzip:  0.26 kB
ℹ dist/shims/root-params.…
2026-06-12 11:48:04 +01:00
James Anderson ae5c72ec13 fix(shims): match next/error RSC diagnostic (#1939)
* fix(shims): match next error RSC diagnostic

* test(app-router): run catch-error e2e in CI

* revert: avoid dedicated catch-error CI job
2026-06-12 10:46:46 +00:00
Nathan Nguyen 5ac620c2d0 fix(cache): honor fetch opt-outs and force-dynamic revalidate parity (#1907)
* fix(cache): honor fetch opt-outs in app page output

App Router fetches that explicitly opt out of caching could still leave the rendered page eligible for static output, while dynamic = "force-dynamic" was lowered to fetchCache = "force-no-store" and overrode explicit per-fetch cache/revalidate options.

The cache decision was conflating route-level dynamic rendering with a hard segment fetchCache mode. Next.js treats force-dynamic as a default no-store mode only for fetches without explicit cache or revalidate config, and marks explicit uncached fetches as dynamic for the surrounding render.

Mark explicit uncached fetch decisions through the existing dynamic usage signal, keep force-dynamic as a separate per-request fetch default, and preserve Response.url when reconstructing cached fetch responses.

* fix(cache): correct revalidate:false and Response.url semantics

- Split revalidate: false out of the no-store path; it now caches
  indefinitely (INFINITE_CACHE) matching upstream patch-fetch.ts.
- Store actual response.url (freshResp.url / response.url) in cached
  fetch entries instead of the input request URL.
- Remove markUncachedFetchForPageOutput() from the auth-header fallback
  so it matches upstream's autoNoCache path and does not mark pages
  dynamic.
- Update tests to reflect correct revalidate: false caching behavior
  and add a test for redirect-style response URLs.

* fix(app-router): resolve target route dynamic config during intercepts and revalidation

Prevents the outer route's force-dynamic default from leaking into
interception source routes and ISR revalidation targets.

- app-rsc-entry.ts: expose __resolveRouteDynamicConfig
- app-page-dispatch.ts: pass resolveRouteDynamicConfig to dispatch,
  sync currentForceDynamicFetchDefault when the render target changes
- app-page-dispatch.test.ts: 4 tests covering intercept + revalidation
  paths for both lost and leaked defaults

* fix(app-router): sync fetchCache and force-dynamic default during action redirects/re-renders

* fix(cache): treat revalidate:false as non-explicit for force-dynamic parity

Upstream patch-fetch.ts computes noFetchConfigAndForceDynamic using
!currentFetchRevalidate (truthiness), so revalidate: false is treated
as 'no fetch revalidate config' and force-dynamic wins. vinext's
hasExplicitRevalidateValue() previously returned true for false,
blocking the force-dynamic no-store default and causing the fetch to
cache for 1 year instead.

Update hasExplicitRevalidateValue to exclude false (and 0) from the
explicit set, aligning with upstream's truthiness check. Add a parity
test covering force-dynamic + next.revalidate: false.

* fix(cache): split revalidate predicates for force-dynamic vs segment defaults

The previous fix to hasExplicitRevalidateValue() treated false and 0 as
non-explicit, which matched upstream's force-dynamic truthiness check
but broke segment cache defaults: default-cache would override
revalidate: 0 to force-cache, and default-no-store would override
revalidate: false to no-store.

Split into two helpers:
- hasExplicitRevalidateValue(): any defined value is explicit (for
  segment defaults where 0 and false are explicit opt-outs)
- isFalsyRevalidate(): false and 0 are falsy (for force-dynamic's
  noFetchConfigAndForceDynamic parity check)

Add parity tests for default-cache + revalidate: 0 and
default-no-store + revalidate: false.

* refactor(cache): extract ONE_YEAR_SECONDS and cover only-no-store revalidate:false

* fix(cache): keep dynamic fetch observations for auth bypass and cache-key fallback

Restore recordDynamicFetchObservation in the auth-header safety bypass so
auth-keyed fetches still downgrade the page output to fresh render, and
revert the cache-key-generation fallback to a plain observation so an
internal limitation (oversized/unserializable body) does not mark the
whole page dynamic. Lock in force-dynamic vs explicit segment fetchCache
precedence with a test.

* docs(cache): note deliberate no-cache dynamic-marking divergence from upstream

* fix(route-handler): apply segment fetchCache and force-dynamic fetch default to route handler dispatch

Route handlers never called setCurrentFetchCacheMode /
setCurrentForceDynamicFetchDefault, so a force-dynamic route handler did
not get the per-request no-store fetch default that page dispatch applies,
and an explicit fetchCache export on a route handler module was ignored.

Upstream's app-route module copies userland.fetchCache into the work store
and sets workStore.forceDynamic for dynamic = "force-dynamic", which
patch-fetch turns into a no-store default for fetches without explicit
cache config — for route handlers as well as pages. Mirror that in
dispatchAppRouteHandler and re-apply the state inside the background
regeneration request context.

* fix(fetch-cache): tolerate cached entries missing url and document revalidate:false cacheability

* fix(fetch-cache): fall back to the request URL for cached entries missing url

Reconstructing Response.url from the fetch input preserves the
pre-existing guarantee for legacy/foreign cache entries instead of
degrading to "". Also document why the intercept dispatch deliberately
does not save/restore fetch defaults around buildPageElement.

* docs(fetch-cache): note cached responses now join body-stream cleanup

* docs(fetch-cache): note explicit segment fetchCache beats force-dynamic default

* test(fetch-cache): pin tags-only fetch to no-store under force-dynamic

* docs(fetch-cache): document auth-bypass precedence and test no-store + auth

- Note at the auth-safety bypass that explicit no-store/no-cache/revalidate: 0
  takes the stronger branch first and fully marks the page dynamic; the bypass
  only covers implicitly-cacheable auth-keyed fetches.
- Add a test locking in that explicit no-store with auth headers routes through
  markUncachedFetchForPageOutput rather than the softer auth bypass.
- Clarify in dispatchAppRouteHandler that the fetch-cache setters are new
  wiring for route handlers, not a mirror of a pre-existing pattern.

* test(route-handler): lock no-store fetch bailing ISR for revalidating handlers

A route handler with revalidate = 60 that performs
fetch(url, { cache: "no-store" }) must skip its ISR cache write and be
marked known-dynamic, now that the patched fetch's explicit no-store
branch calls markDynamicUsage() (upstream patch-fetch parity). Exercises
the real fetch-cache shim and the real headers-shim dynamic-usage pair,
matching the app-route-handler-dispatch wiring.

---------

Co-authored-by: James <james@eli.cx>
2026-06-12 11:44:28 +01:00
James Anderson e9b0f68658 feat(web): expose latest compatibility failures (#1941) 2026-06-12 10:37:54 +00:00
Nathan Nguyen e018a08708 fix(pages-router): restore scroll across reload history traversal (#1905)
* fix(pages-router): restore scroll across reload history traversal

Pages Router pages with experimental.scrollRestoration currently expose window.next.router before the popstate runtime is installed and only keep Vinext scroll coordinates in the in-memory history state. After a reload, a back or forward traversal can run before the runtime is ready and has no durable scroll snapshot for the target history entry.

The violated invariant is that the Pages Router owns browser scroll restoration whenever the Next.js scroll restoration flag is enabled, with one stable history key per entry and routeChangeComplete emitted after the new page commits.

Resolve the Next.js config flag into process.env.__NEXT_SCROLL_RESTORATION, install the Pages Router runtime during next/router evaluation, persist Next-style sessionStorage scroll snapshots per history key, and render navigations through a stable commit boundary before emitting routeChangeComplete.

Regression coverage ports Next.js reload-scroll-backforward-restoration and verifies manual restoration plus exact scroll positions across reload, back, and forward traversal.

* fix(pages-router): sequence routeChangeComplete after scroll restoration and settle on render failures

* fix(router): guard against missing window.history in stampInitialHistoryState

* fix(router): defer hash scroll until after routeChangeComplete

Move hash scrolling out of renderPagesRouterElement's commit callback
and into the post-routeChangeComplete path, matching Next.js ordering:
x/y restoration happens during render commit, hash scrolling happens
after the completion event.

Also fix E2E test expectRouteChangeComplete to use one-shot event
listeners instead of checking for stale text, and add listener cleanup
to the fixture to prevent accumulation.

* fix(test): remove post-push deadlock and throw on missing events in E2E helper

expectRouteChangeComplete() now throws if window.next.router.events is
absent instead of silently resolving. Remove the redundant
expectRouteChangeComplete call after pushWithPagesRouter in the third
test — the awaited router.push already resolves after routeChangeComplete,
so registering a listener after it would deadlock.

* fix(test): replace as any casts with type-safe window.next narrowing in E2E scroll tests

* fix(router): narrow renderPagesRouterElement scroll param, drop dead hash branch

* fix(router): reset x/y scroll on hash routes before routeChangeComplete and cancel pending render on supersede

- Pass {x:0, y:0} through commit boundary for all scrollable
  navigations, not just hash-less ones (hash scroll deferred to after
  routeChangeComplete as before).
- Cancel pending render-commit Promise when a newer navigation starts,
  preventing hang when the first root.render() commit is dropped by
  React re-reconciliation.
- Add regression tests for both edge cases.

* fix(router): use SSR-safe layout effect in commit boundary and pin shallow scroll ordering

Address bonk review on #1905:
- swap the commit boundary's raw useLayoutEffect for the SSR-safe
  useNonWarningLayoutEffect pattern from shims/image.tsx so Pages Router
  SSR renders no longer log React's useLayoutEffect warning
- document that the default-noop commit boundary intentionally also wraps
  SSR and initial hydration
- document the intentional shallow-scroll-before-routeChangeComplete
  ordering and add a unit test pinning it

* fix(router): keep history-state scroll restore on popstate when scrollRestoration flag is off

Without experimental.scrollRestoration, popstate must still honour the
__vinext_scrollX/Y saved into history state on push, since a soft popstate
re-renders content the browser's native restoration can't position. Also
document why the popstate-time sessionStorage snapshot depends on
history.scrollRestoration = "manual".

* fix(router): guard render-commit canceller against late commits from superseded trees

* fix(router): defer current-history-key commit until beforePopState allows navigation

When beforePopState cancels a popstate the app stays on the previous
history entry, but _currentHistoryKey had already been updated to the
target key, skewing subsequent scroll-position bookkeeping. Move the
key commit below the beforePopState early-return, matching the
deliberate deferral of _lastPathnameAndSearch.

* chore(router): note intentional eager scroll snapshot; fix fixture link increment

- Document that the outgoing-entry scroll snapshot is deliberately written
  before the beforePopState gate: on cancellation the app stays on
  currentKey, so the saved value remains that entry's live scroll.
- Coerce id to a number in the pages-scroll-restoration fixture Link so
  the href increments numerically instead of string-concatenating.

* fix(router): keep manual scroll restoration opt-in Pages-Router-only

Gate installManualScrollRestoration on the document not being an App
Router one (window.next.appDir === true): with the now-global
__NEXT_SCROLL_RESTORATION define, an App Router app that value-imports
next/router for compat would otherwise have its native browser scroll
restoration disabled at module eval. Upstream only flips
history.scrollRestoration inside the Pages Router constructor, which
never runs on App Router documents.

Also document the hash-only popstate path discarding the per-entry
__next_scroll_<key> snapshot as intentional upstream parity (change()'s
onlyAHashChange branch passes null to this.set and only scrollToHash
runs), and add unit coverage for both behaviors.

* ci: run pages-scroll-restoration E2E project in the CI matrix

Add the missing E2E matrix entry so the ported Next.js regression spec
(reload-scroll-backforward-restoration.spec.ts) actually executes in CI,
matching the shape of the sibling single-shard Pages Router entries.

Also document why the soft-popstate scroll fallback differs between
manual restoration on ({ x: 0, y: 0 }) and off (null -> native auto
restoration handles unstamped entries), per review.

* refactor(router): fold App Router gate into manualScrollRestoration constant

The popstate handler's sessionStorage save/read branches gated on the
module-level constant, which lacked the window.next?.appDir check that
installManualScrollRestoration used, leaving those branches relying
solely on the __N state filter to stay inert on App Router documents.
Fold the appDir check into the constant so every consumer is
Pages-Router-only by the same gate; the App Router bootstrap stamps
window.next.appDir before any client module evaluates, so the
module-eval-time check is reliable.

* test(pages-scroll-restoration): default getServerSideProps id to string "0"

Route params always arrive as strings, so the numeric 0 fallback was
inconsistent with the string values the component relies on
(Number(id) + 1 href, id === "error" check). Default to "0" for type
consistency.

* test(pages-scroll-restoration): align fixture deps and vinext import with pages-basic

Import vinext via the workspace package name instead of reaching into
dist by relative path, and declare the same react/react-dom/vinext
dependencies as the other fixtures so the fixture is self-describing
and the pnpm-lock.yaml importer entry is populated.

* fix(router): snapshot outgoing scroll on hash-only pushes

Upstream Next.js snapshots the outgoing entry's scroll into
__next_scroll_<key> inside Router.push() itself, before change()'s
onlyAHashChange short-circuit, so hash-only pushes still capture the
departed entry's position. Our hash-only push branch returned before
saveScrollPosition() ran, so a later back-popstate to that entry
restored {x: 0, y: 0} instead of the position the user had reached.

Save the outgoing scroll before updateHistory mints the new key,
matching the full-navigation push path and upstream ordering.

* docs(router): clarify manual scroll-target fallback chain precedence

* test(shims): tag scrollRestoration App Router test as eval-order guard

* docs(router): note missing-snapshot fallback intent at forcedScroll default

---------

Co-authored-by: James <james@eli.cx>
2026-06-12 11:31:33 +01:00
github-actions[bot] 91c169a8fc chore: version packages (#1875)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@vinext/cloudflare@0.1.1 vinext@0.1.2
2026-06-12 10:30:11 +00:00
Nathan Nguyen fd1023321b fix(router): support experimental gesture push (#1909)
* fix(router): support experimental gesture push

Vinext did not expose useRouter().experimental_gesturePush when Next.js apps enabled experimental.gestureTransition. Upstream gesture-transition fixtures call the method inside a held async transition, so the target route never became visible before the canonical router.push completed.

The fix resolves the config flag into the same __NEXT_GESTURE_TRANSITION define used by Next.js, exposes the optional router method only under that flag, and lets gesture navigation use the existing RSC navigation pipeline with an immediate approved visible commit. The ported e2e fixture preserves the upstream held-transition flow and target/static/dynamic assertions.

* test(router): update navigate mock assertions to expect default transition commit mode

* fix(router): address ask-bonk review comments on gesture push

- track scheduled app router navigation in experimental_gesturePush for
  parity with push/replace, so a refresh() issued in the same task skips
  its redundant re-fetch
- document the synchronous visible-commit mode's null pendingRouterState
  invariant in the browser navigation controller
- add a unit test asserting experimental_gesturePush is only attached
  when the __NEXT_GESTURE_TRANSITION define is set

* style(tests): fix formatting in shims.test.ts

* docs(router): clarify gesture push normalization and flushSync commit paths

* test(router): fix unbound-method lint in shims test and document gesture spec coverage

* docs(router): clarify gesture define boolean form and spec held-state rationale

* docs(test): note gestureTransition is fixture-wide for the gesture spec only

* fix(router): no-op experimental_gesturePush before the navigation runtime is ready

Upstream gesturePush early-returns when getCurrentAppRouterState() is null,
so a gesture dispatched before hydration is a no-op. Previously vinext fell
through navigateClientSide's non-runtime branch and performed a real history
push. Guard on the runtime's navigate function (the same readiness check
navigateClientSide uses) and document that the un-awaited
void navigateClientSide(...) deliberately matches push/replace's
fire-and-forget rejection shape.

* docs(router): note gesturePush guard/dispatch runtime reads have no TOCTOU window

* docs(test): document gesture fixture's double-navigation divergence from upstream

---------

Co-authored-by: James <james@eli.cx>
2026-06-12 03:14:24 +01:00
Divanshu Chauhan 2da6991234 perf(server): eliminate redundant per-request parsing in the request pipeline (#1929)
* perf(server): make requestContextFromRequest cookies/query lazy

Cookies and query are consumed only by has/missing condition evaluation,
which most apps never configure. Defer parseCookies and searchParams to
lazy memoized getters so they run at most once and only when read.
Tighten RequestContext fields to readonly to lock in the read-only
contract. Mirrors the existing headersContextFromRequest pattern.

Refs #1911

* perf(server): hoist pathname split out of metadata route loop

handleMetadataRouteRequest iterates every registered metadata route and
matchMetadataRoute re-split the invariant cleanPathname for each dynamic
route, allocating O(routes) arrays per request. Compute the split once via
a memoizing closure; apps with no dynamic metadata routes never split.

Refs #1911

* perf(server): hoist constant header sets in prod-server

omitHeadersCaseInsensitive rebuilt a lowercased Set from a constant literal
array on every static-file response. Hoist the two constant sets to module
scope as ReadonlySet<string> and take them precomputed, dropping the
per-response map and allocation.

Refs #1911
2026-06-12 00:52:04 +01:00
James Anderson d3bbc4d558 test(e2e): close page before temp prod server in remaining specs (#1928)
Same latent race fixed for inline-css.browser.spec.ts in #1927: the
temp production server was closed during teardown while the page was
still open, so idle-scheduled requests (e.g. Link prefetches via
requestIdleCallback) could hit the closed port and log
ERR_CONNECTION_REFUSED — which the consoleErrors fixture turns into a
flaky failure. Close the page first in hash-rsc-requests and
client-reference-runtime-map too.
2026-06-11 23:31:23 +00:00