Repository navigation
Version adapter routing for Pages API routes - #97366
timneutkens wants to merge 1 commit into
Conversation
Stats from current PR✅ No significant changes detected📊 All Metrics📖 Metrics GlossaryDev Server Metrics:
Build Metrics:
Change Thresholds:
⚡ Dev Server
📦 Dev Server (Webpack) (Legacy)📦 Dev Server (Webpack)
⚡ Production Builds
📦 Production Builds (Webpack) (Legacy)📦 Production Builds (Webpack)
📦 Bundle SizesBundle Sizes⚡ TurbopackClient Main Bundles
Server Middleware
Build DetailsBuild Manifests
Build Cache
📦 WebpackClient Main Bundles
Polyfills
Pages
Server Edge SSR
Middleware
Build DetailsBuild Manifests
Build Cache
🔄 Shared (bundler-independent)Runtimes
📎 Tarball URLCommit: 826dd19 |
Failing test suitesCommit: f696914 | About building and testing Next.js
Expand output● i18n-app-pages-domain-routing › keeps Pages Router domain locale handling ● i18n-app-pages-domain-routing › routes a proxy locale rewrite to a dynamic App page
Expand output● lazy-dynamic-imports › does not parse a dynamic import target before activation
Expand output● i18n-app-pages-domain-routing › keeps Pages Router domain locale handling ● i18n-app-pages-domain-routing › routes a proxy locale rewrite to a dynamic App page
Expand output● i18n-app-pages-domain-routing › keeps Pages Router domain locale handling ● i18n-app-pages-domain-routing › routes a proxy locale rewrite to a dynamic App page
Expand output● i18n-app-pages-domain-routing › keeps Pages Router domain locale handling ● i18n-app-pages-domain-routing › routes a proxy locale rewrite to a dynamic App page
Expand output● i18n-app-pages-domain-routing › keeps Pages Router domain locale handling ● i18n-app-pages-domain-routing › routes a proxy locale rewrite to a dynamic App page
Expand output● i18n-app-pages-domain-routing › keeps Pages Router domain locale handling ● i18n-app-pages-domain-routing › routes a proxy locale rewrite to a dynamic App page |
5fb0bda to
07478e8
Compare
07478e8 to
826dd19
Compare
826dd19 to
fa9c071
Compare
fa9c071 to
c87031a
Compare
## Summary Fix hybrid App Router and Pages Router projects using Pages i18n so explicit or rewritten locale segments remain available to App Router route matching, while Pages routes continue using locale-normalized paths. The built-in filesystem matcher now carries each route owner through `RouteKind`, avoids duplicate App routes being treated as Pages routes in production, and preserves literal App path parameters through the router server, direct route-module invocation, and static export paths. The same ownership information is maintained by the development bundler. Adds regression coverage for domain locales, proxy rewrites, exact and dynamic App pages, catch-all parameters, route handlers, inferred default locales, and Pages routes. Adapter-generated routing metadata is intentionally handled in the follow-up layers #97366 and #97500. Closes #86048 ## Verification - `pnpm build-all` - `NEXT_TEST_PREFER_OFFLINE=1 pnpm test-start-webpack test/e2e/app-dir/i18n-app-pages-domain-routing/i18n-app-pages-domain-routing.test.ts` (9 passed) - Prettier and ESLint checks on all changed files <!-- NEXT_JS_LLM -->
c87031a to
f696914
Compare
Summary
Introduce routing manifest v2 for the adapter build-complete contract and restore canonical routing for dynamic Pages API routes in i18n applications.
routing.version: 2for normal and static-export builds, and document that unversioned manifests have implicit v1 semantics./api, withoutnextLocale, while ordinary dynamic Pages routes remain localized.This PR intentionally depends on adapter-vercel #103 being released and synced into the Vercel builder first. An old adapter receiving routing manifest v2 is unsupported; rollout order is the compatibility mechanism for that pairing.
Verification
pnpm --filter=next buildNEXT_TEST_PREFER_OFFLINE=1 pnpm test test/production/adapter-config-i18n test/production/adapter-config(3 suites passed, 6 tests passed, 1 skipped)