- 24 Oct, 2025 3 commits
-
-
nextjs-bot authored
-
Wyatt Johnson authored
### What? Adds depth-aware parameter resolution to `resolveParallelRouteParams` by migrating from simplified parallel route segments to LoaderTree structure. ### Why? Dynamic and intercepted parameters in parallel routes were not being correctly extracted when used at nested depths. The previous implementation didn't account for: - Route nesting level when matching pathname segments to parameters - Route groups (which don't affect depth) vs interception routes (which do) - Embedded parameters that need resolution before depth calculation This caused incorrect behavior in real-world scenarios like: - Nested parallel routes at different depths - Interception routes with parallel routes - ISR/generateStaticParams with complex routing structures ### How? 1. **LoaderTree Integration**: Migrated from `ParallelRouteSegment[]` to LoaderTree structure for accurate routing hierarchy representation 2. **Depth Tracking**: Recursively traverse LoaderTree to calculate depth, accounting for: - Static segments (increment depth) - Dynamic segments (increment depth) - Route groups `()` - don't increment depth - Interception routes `(.)` `(..)` `(...)` - do increment depth 3. **Smart Parameter Extraction**: - Check if pathname segment at calculated depth is a placeholder - Only extract if segment is known (not `[paramName]`) - Resolve embedded params before extraction 4. **Comprehensive Tests**: Added test coverage for: - Dynamic params at various depths - Route groups vs interception routes - Catchall/optional-catchall with depth - Complex nested scenarios Fixes #85251
-
Joseph authored
-
- 23 Oct, 2025 5 commits
-
-
nextjs-bot authored
-
Joseph authored
Bringing back some info lost when next lint was removed, and accounting for `isolatedDevBuild` in v16 --------- Co-authored-by:Ismael <ismael@vercel.com>
-
Arnab Sen authored
Updated command to install babel-plugin-react-compiler as a devDependency instead of as a dependency, mirroring React's instructions - https://react.dev/learn/react-compiler/installation
-
Joseph authored
Co-authored-by:
Rich Haines <hello@richardhaines.dev> Co-authored-by:
vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
-
Joseph authored
We do mention how to enable this feature, but a little note can go a long way, specially highlighting that it is opt-in
-
- 22 Oct, 2025 11 commits
-
-
nextjs-bot authored
-
Joseph authored
Just a couple of mistakes
-
Jiwon Choi authored
Proxy runtime defaults to nodejs and does not allow runtime config since https://github.com/vercel/next.js/pull/85139
-
Wyatt Johnson authored
-
Joseph authored
- [x] Update Error
-
Joseph authored
Further precision to revalidateTag signature, and escape hatch for route handlers w/ immediate revalidation
-
Joseph authored
-
Joseph authored
-
Joseph authored
-
Joseph authored
update the create-next-app options and prompts
-
nextjs-bot authored
-
- 21 Oct, 2025 21 commits
-
-
nextjs-bot authored
-
nextjs-bot authored
-
Jiachi Liu authored
-
Niklas Mischkulnig authored
This PR is the initiative of deprecating the edge runtime. Proxy will default to Node.js runtime, and will not allow runtime config. If the users want to use the edge runtime, they should stay on the Middleware, though we recommend starting the migration. --------- Co-authored-by:
devjiwonchoi <devjiwonchoi@gmail.com> Co-authored-by:
JJ Kasper <jj@jjsweb.site>
-
Zack Tanner authored
Previously we were only showing this during navigations when caches are bypassed. We want to make it clearer that you are in this state and dev might not work as intended while caches are disabled. This will show the cache bypass status on initial load and will reset the next time a router action occurs that doesn't bypass cache. https://github.com/user-attachments/assets/f82a98c6-b5be-44d0-ba86-e4f7ca7010e4
-
Zack Tanner authored
Fixes an issue that reproduces due to a combination of the log forwarding logic alongside logging out an explicit element. We can add this back in the future once our log forwarding library properly ignores non-enumerable properties.
-
Andrew Clark authored
Makes it more clear that `<Suspense>` and "use cache" are separate approaches for fixing the error, not requirements. <img width="969" height="711" alt="Screenshot 2025-10-21 at 3 09 57 PM" src="https://github.com/user-attachments/assets/34bd2efc-9fee-4aba-82eb-6b395663d765" />
-
Joseph authored
Co-authored-by:
Ismael <ismael@vercel.com> Co-authored-by:
Jiachi Liu <inbox@huozhi.im>
-
Jiwon Choi authored
`--turbopack` flag is not needed for v16 upgrade. --------- Co-authored-by:vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
-
Jiwon Choi authored
When running `next-lint-to-eslint-cli` and ESLint version lower than 9, upgrade to `^9` to ensure full Flat config support.
-
Andrew Clark authored
Follow-up to #85155. Made a mistake in the context-passing logic.
-
Jiwon Choi authored
Improve invalid Proxy/Middleware export error message to: ``` > Build error occurred Error: The file "./proxy.ts" must export a function, either as a default export or as a named "proxy" export. This function is what Next.js runs for every request handled by this proxy (previously called middleware). Why this happens: - You are migrating from `middleware` to `proxy`, but haven't updated the exported function. - The file exists but doesn't export a function. - The export is not a function (e.g., an object or constant). - There's a syntax error preventing the export from being recognized. To fix it: - Ensure this file has either a default or "proxy" function export. Learn more: https://nextjs.org/docs/messages/middleware-to-proxy ``` Turbopack: ``` Error: Turbopack build failed with 1 errors: ./proxy.ts Proxy is missing expected function export name This function is what Next.js runs for every request handled by this proxy (previously called middleware). Why this happens: - You are migrating from `middleware` to `proxy`, but haven't updated the exported function. - The file exists but doesn't export a function. - The export is not a function (e.g., an object or constant). - There's a syntax error preventing the export from being recognized. To fix it: - Ensure this file has either a default or "proxy" function export. Learn more: https://nextjs.org/docs/messages/middleware-to-proxy ``` Closes NEXT-4741
-
Luke Sandberg authored
Improve deobfuscation of 'imported module identifier' and attempt to deobfuscate error messages logged by the server. Before ``` ⨯ TypeError: (0 , __TURBOPACK__imported__module__$5b$project$5d2f$examples$2f$with$2d$turbopack$2f$app$2f$foo$2e$ts__$5b$app$2d$rsc$5d$__$28$ecmascript$29$__.foo) is not a function at Page (app/page.tsx:5:6) 3 | export default function Page() { 4 | /** @ts-ignore */ > 5 | foo(); | ^ 6 | return <h1>Hello, Next.js!</h1>; 7 | } 8 | { ``` after ``` ⨯ TypeError: {imported module ./examples/with-turbopack/app/foo.ts}.foo is not a function at Page (app/page.tsx:5:6) 3 | export default function Page() { 4 | /** @ts-ignore */ > 5 | foo(); | ^ 6 | return <h1>Hello, Next.js!</h1>; 7 | } 8 | { ``` Similarly in devtools before:  after  This is definitely an improvement but i am not sure i put the deobfuscation logic in the best place for the console case. Happy for feedback -
Philippe Serhal authored
### What? These config keys were recently soft-renamed with forward compatibility on the _resolved_ config object: - `experimental.proxyPrefetch` → `experimental.middlewarePrefetch` - `experimental.externalProxyRewritesResolve` → `experimental.externalMiddlewareRewritesResolve` - `skipProxyUrlNormalize` → `skipMiddlewareUrlNormalize` But there was no backwards compatibility on the resolved, which is (arguably) an undocumented breaking change. ### Why? This avoids introducing a last-minute breaking change for providers and other integrations that read the the `.next/` build output files (which is necessary until we all move to the upcoming [Adapter API](https://github.com/vercel/next.js/discussions/77740). ### How? When a new `proxy` config key is set but the old `middleware` name is not, copy the value to the old name on the *resolved* config object. This also adds test coverage for both the existing forward compat (old→new) and the new backwards compat (new→old). Co-authored-by:
JJ Kasper <jj@jjsweb.site>
-
Andrew Clark authored
The content needs to be updated, too, but for now this just fixes the link and title so it matches the updated error message in #85087.
-
Joseph authored
Removed on v16
-
Sebastian Markbåge authored
This allows React DevTools to show a name for this which doesn't have a url like the fetches. Also, don't set startTime for client resume fetch. The start time for this data didn't start on the server as an MPA nav. The start of the fetch actually is a waterfall and should be shown as such.
-
Niklas Mischkulnig authored
preallocate hashmaps
-
Niklas Mischkulnig authored
Allow `export type ... from "...";`
-
Sebastian Markbåge authored
Follow up to #85158. We shouldn't assign a display name to internal one because now that wins over the one we actually want.
-
Zack Tanner authored
Moves this flag out of experimental so that custom `use cache` handlers can be configured alongside the cache components release.
-