Commit Graph

1925 Commits

Author SHA1 Message Date
James Anderson d7e8bc5f53 chore: add script for targetted e2e (#2439) 2026-06-30 19:56:06 +00:00
James Anderson 328f01b09d fix(app-router): support styled-jsx from next (#2341)
* fix(app-router): support styled-jsx from next

* fix(app-router): preserve styled jsx refresh

* test(app-router): exercise styled jsx compiler

* fix(app-router): keep styled jsx refresh server-safe

* fix(app-router): keep styled jsx refresh server-safe

* test(app-router): cover server-safe styled jsx dev

* fix(app-router): detect styled jsx syntax variants

* fix(app-router): scope styled jsx detection

* fix(app-router): parse styled jsx attributes

* fix(app-router): delegate styled jsx detection

* fix(app-router): preserve vinext-only style builds

* fix(app-router): detect styled jsx with AST

* fix(app-router): prefer Next styled jsx runtime

* fix(app-router): skip styled-jsx transforms in dependencies
2026-06-30 20:54:17 +01:00
James Anderson 8df2344e77 fix(css): preserve Sass partial asset URLs (#2338)
* fix(css): preserve Sass partial asset URLs

* fix(css): preserve Sass use namespaces

* fix(css): match Sass namespace derivation
2026-06-30 20:31:49 +01:00
James Anderson 49945a9e05 fix(link): reuse full prefetch loading shells (#2332)
* fix(link): reuse full prefetch loading shells

* fix(link): share loading shell prefetch ownership
2026-06-30 19:34:50 +01:00
Yunfei He c1672a1acb test(routing): cover optional catch-all root with empty params (#2436)
* test(routing): cover optional catch-all root with empty params

Add a regression test for a ROOT-level optional catch-all page
pages/[[...markdownPath]].js whose getStaticPaths emits the empty-params
entry { markdownPath: [] } (the react.dev shape). Verifies the dev server
serves the root / HTML, the /_next/data/<id>/index.json endpoint, a
non-root concrete path, and a 404 for unlisted paths under fallback:false.

The existing optional catch-all test only covers a non-root subpath; this
guards the empty-params-at-root case, which routes through the trie's
0-segment optional catch-all match (route-trie.ts) and the empty-array
path normalization (route-pattern.ts / pages-page-data.ts).

* test(routing): tighten optional catch-all root coverage

---------

Co-authored-by: James <james@eli.cx>
2026-06-30 18:31:56 +01:00
James Anderson 6a787de547 feat(benchmarks): add local profile tooling (#2432) 2026-06-30 16:06:13 +00:00
James Anderson 427e0ef154 fix(dev): seed Cloudflare Pages Router worker deps (#2430)
* fix(dev): seed Cloudflare Pages Router worker deps

* fix(dev): include external store selector dep

* fix(dev): guard optional worker optimizer dep

* Revert "fix(dev): guard optional worker optimizer dep"

This reverts commit 65530f1d0c.

* fix(dev): suppress optional worker optimizer warning

* fix(dev): harden optional optimizer warning filter
2026-06-30 12:26:16 +01:00
James Anderson b0de1af028 fix(cloudflare): support Sentry request errors on Workers (#2425)
* fix(cloudflare): support sentry request errors on workers

* fix(cloudflare): avoid worker conditions in node pages builds

* test(cloudflare): run sentry worker e2es in ci

* test(cloudflare): cover sentry render errors

* test(cloudflare): mirror sentry next setup in fixtures

* update lockfile

* update lockfile

* test(cloudflare): cover sentry client instrumentation
2026-06-30 10:58:04 +01:00
James Anderson f4a96c993b fix(pages): preload initial dev stylesheets (#2423)
* fix(pages): preload initial dev stylesheets

* fix(pages): keep dev module path encoder internal

* fix(pages): harden dev stylesheet parity

* fix(pages): preserve hybrid app HMR

* fix(pages): preserve CSS resource query imports
2026-06-30 10:10:16 +01:00
James Anderson b5aded498a fix(cloudflare): allow pages deploy without custom worker (#2429) 2026-06-30 08:21:47 +00:00
James Anderson c02f30484b fix(pages): route dotted dynamic paths in dev (#2424)
* fix(pages): route dotted dynamic paths in dev

* fix(pages): preserve i18n dotted dynamic routes

* chore(pages): clarify dotted route preflight

* chore(pages): share dev hostname parsing

* chore(pages): reuse dev request origin
2026-06-30 09:19:27 +01:00
Arnold K 53da079f86 fix: use normalizePathSeparators in formatAppFilePath for Windows compatibility (#2426) 2026-06-30 07:53:52 +00:00
Jerry Zhao c54614f2ed refactor(app-router): build discoverSiblingInterceptingRoutes paths with path.posix (#2306) 2026-06-30 08:49:53 +01:00
Jerry Zhao 7de1edf79d refactor(app-router): descend collectInterceptingPages with path.posix.join (#2307) 2026-06-30 08:49:46 +01:00
Jerry Zhao 795d56873e fix(routing): use normalizePathSeparators(path.relative) instead of path.posix.relative (#2308) 2026-06-30 08:49:36 +01:00
Nathan Nguyen c8aef02dcd test(fonts): mock google font files in unit tests (#2412)
The font self-hosting unit tests depended on live Google Fonts CSS and font file requests. When the CSS fetch hit a recoverable network error, the plugin correctly skipped _vinext injection for offline fallback, but the test expected self-hosted output.

Mock both fonts.googleapis.com CSS and fonts.gstatic.com font binaries for the self-hosting assertions. The offline fallback behavior remains covered by the explicit network-error test.
2026-06-29 21:27:49 +01:00
Nathan Nguyen 2a26a309a0 fix(ci): skip create-next-app deploy on forks (#2414) 2026-06-29 21:27:37 +01:00
dependabot[bot] 31109c4b1b chore(deps): bump actions/cache/save from 6.0.0 to 6.1.0 (#2421)
Bumps [actions/cache/save](https://github.com/actions/cache) from 6.0.0 to 6.1.0.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/2c8a9bd7457de244a408f35966fab2fb45fda9c8...55cc8345863c7cc4c66a329aec7e433d2d1c52a9)

---
updated-dependencies:
- dependency-name: actions/cache/save
  dependency-version: 6.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-29 21:27:26 +01:00
dependabot[bot] fdd80b4263 chore(deps): bump actions/cache/restore from 6.0.0 to 6.1.0 (#2419)
Bumps [actions/cache/restore](https://github.com/actions/cache) from 6.0.0 to 6.1.0.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/2c8a9bd7457de244a408f35966fab2fb45fda9c8...55cc8345863c7cc4c66a329aec7e433d2d1c52a9)

---
updated-dependencies:
- dependency-name: actions/cache/restore
  dependency-version: 6.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-29 21:27:17 +01:00
dependabot[bot] f0338b7f59 chore(deps): bump actions/cache from 6.0.0 to 6.1.0 (#2420)
Bumps [actions/cache](https://github.com/actions/cache) from 6.0.0 to 6.1.0.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/2c8a9bd7457de244a408f35966fab2fb45fda9c8...55cc8345863c7cc4c66a329aec7e433d2d1c52a9)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-version: 6.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-29 21:27:09 +01:00
James Anderson 91148ac05f ci: deploy CNA smoke with vinext cloudflare CLI (#2422) 2026-06-29 21:26:45 +01:00
James Anderson bf8ba93d4c fix(test): mark app trailing slash ISR fixture private (#2417) 2026-06-29 18:54:36 +00:00
github-actions[bot] a399fc55e2 chore: version packages (#2293)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@vinext/cloudflare@0.2.0 vinext@0.2.0
2026-06-29 19:46:44 +01:00
James Anderson bcd4e44d96 feat(build): support prerender vite config (#2415)
* feat(build): support prerender vite config

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

* fix(cloudflare): export prerender deploy helper

* fix(cloudflare): avoid redundant prerender config load

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

* feat(cloudflare): add unified worker entry

* chore(web): use unified worker entry

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

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

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

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

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

Reuse the shared app-router hydration helper before setting the canary and clicking the recovery link. The test still exercises the real browser click path, but no longer races client hydration.
2026-06-29 17:44:28 +01:00
Nathan Nguyen 8ad5e5be32 fix(ci): resolve setup-vp version from catalog (#2406)
* fix(ci): resolve setup-vp version from catalog

* ci: retry app-router e2e

* fix(ci): avoid heredoc in setup version resolver

* fix(ci): anchor setup resolver to workspace root

* chore: rerun ci

* chore: rerun ci
2026-06-29 17:44:05 +01:00
Nathan Nguyen 23ed801656 fix(e2e): stabilize nav regression suspense window (#2408)
* fix(e2e): stabilize nav regression suspense window

* test(e2e): strengthen nav regression flake guard
2026-06-29 16:57:29 +01:00
Boy Steven 94ea837cfc fix(init): only detect pnpm approve-builds failures from pnpm-specific output (#2404) 2026-06-29 15:41:24 +01:00
Boy Steven 0a9eb33a50 docs(nextjs-compat): refresh resolved OpenNext tracking (#2403) 2026-06-29 15:37:57 +01:00
James Anderson 31e87439df fix(pages-router): retain prefetched SSG data (#2366)
* fix(pages-router): retain prefetched SSG data

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

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

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

* chore: avoid exporting middleware matcher helper type

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

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

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

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

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

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

* Fix pages data prefetch CI regressions

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

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

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

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

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

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

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

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

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

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

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

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

* fix(navigation): balance history restore snapshots

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

* fix(cache): parse prerender cache metadata marker

* test(cache): cover prerender metadata done marker

* fix(cache): preserve static committed stale time

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

* fix(router): retain committed client cache state

* fix(router): publish client cache after commit

* fix(router): gate hydration cache publication

* fix(router): guard late client cache publication

* fix(router): isolate client cache parity coverage

* fix(router): preserve authoritative navigation commits

* fix(router): preserve committed navigation streams
2026-06-28 22:01:58 +00:00
James Anderson 89ab891bb1 fix(build): keep dynamic third-party imports bare in published dist (#2395)
The published `dist/shims/link.js` baked an absolute build-machine path into
the lazy Pages Router import:

    loadRouter: async () =>
      (await import("/<build-host>/node_modules/.pnpm/next@.../next/router.js"))

That path only exists on the machine that built vinext, so every consumer (and
CI) build fails with:

    [UNRESOLVED_IMPORT] Could not resolve '/.../next/router.js'

Root cause: #2279 replaced `deps.skipNodeModulesBundle: true` with a
`deps.neverBundle` predicate that keys off the *resolved* id
(`id.includes("node_modules")`). Rolldown resolves a dynamic `import()` literal
to an absolute path *before* `neverBundle` runs, so the bare specifier is lost
for dynamic imports (static imports were unaffected).

Restore the pre-#2279 behaviour by externalizing on the *unresolved* bare
specifier via `inputOptions.external`, so dynamic imports stay bare like static
ones. First-party `vinext`/`@vinext/*` self-imports and the `alwaysBundle`
packages (`am-i-vibing`, `process-ancestry`) are excluded so they keep being
bundled/relative-rewritten.

Verified the emitted `dist` is byte-identical to the current build except the
single fixed `next/router` line, and the `am-i-vibing` bundle is unchanged.
2026-06-28 22:43:13 +01:00
MaxtuneLee c602026b6d fix(app-router): normalize trailing slash in implicit cache tags (#2390)
* fix(app-router): normalize trailing slash in implicit cache tags for revalidatePath

* docs: remove unnecessary comments

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

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

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

---------

Co-authored-by: James Anderson <james@eli.cx>
2026-06-28 19:30:38 +00:00
Yunfei He 91c9c18f6e perf(plugins): skip dynamic-request AST parse for static-import-only modules — 5000-route build −21% (#2392) 2026-06-28 19:55:29 +01:00