- 14 Jan, 2026 20 commits
-
-
nextjs-bot authored
-
Vercel Release Bot authored
This auto-generated PR updates the development integration test manifest used when testing Rspack.
-
Vercel Release Bot authored
This auto-generated PR updates the production integration test manifest used when testing Rspack.
-
Luke Sandberg authored
# Optimize issue filtering in Next.js and Turbopack ## What? This PR introduces an `IssueFilter` system to control which issues are reported based on severity and location ## Why? To improve performance, we shouldn't spend time formatting issues that will never be displayed to a user. ## How? - Added `IssueFilter` to control which issues are displayed based on severity and location - Created a specialized `InNodeModules` context condition for better readability - Implemented `warnings_and_foreign_errors()` filter that shows: - Warnings and errors from application code - Only errors from node_modules - Applied the filter throughout Next.js and Turbopack's issue reporting system - Refactored issue collection to filter early rather than collecting everything first
-
Karl Horky authored
-
Benjamin Woodruff authored
It used to be that a cell could contain a transmuted representation. This was a hack for the previous limited generic support that I removed in https://github.com/vercel/next.js/pull/70817. Clean this up! `Repr` and `T` are always the same type!
-
Andrew Clark authored
Based on: - #87991 --- The Mutable type was used by an earlier implementation of App Router when the reducer used to run during React's render phase. It was used to prevent certain operations from running multiple times if an update was reapplied by React. Now that router "reducer" actions run outside React's render phase, we no longer need this indirection — we can compute the next state object directly. Most of the Mutable-related logic was deleted in previous PRs; this finishes the migration by inlining handleMutable into its callers.
-
nextjs-bot authored
-
Andrew Clark authored
Instead of storing old sibling CacheNodes in the CacheNode tree, thisPR puts them into a separate BFCache, backed by the same data structure and LRU that's used by the prefetch cache.
-
Tim Neutkens authored
## Description This PR adds dedicated documentation pages for `useSearchParams` and `useParams` hooks in the Pages Router documentation. ### Changes - Added `docs/02-pages/04-api-reference/03-functions/use-search-params.mdx` - Added `docs/02-pages/04-api-reference/03-functions/use-params.mdx` ### Why Both `useSearchParams` and `useParams` from `next/navigation` work in the Pages Router, but this was not well documented. The only mention was a brief note in the App Router docs and a migration section in the Pages Router `useRouter` docs. ### What's Documented For both hooks: - Basic usage with the fallback UI pattern for handling `null` during pre-rendering - Return values and behavior differences from App Router - Usage with `getServerSideProps` (where params are immediately available) - Examples for sharing components between App Router and Pages Router For `useParams` specifically: - Comparison with `router.query` (which includes both dynamic params and query string params) ### Related Test The existing test at `test/e2e/app-dir/params-hooks-compat` validates that these hooks work in both routers.
-
Jiachi Liu authored
-
Niklas Mischkulnig authored
-
nextjs-bot authored
-
Hendrik Liebau authored
In #87188 we upgraded lerna to v9 which no longer supports/requires the `lerna bootstrap` command. This commit removes it from the `clean` script in the root package.json to avoid errors when running `pnpm clean`. [More info](https://lerna.js.org/docs/legacy-package-management#replacing-your-usage-of-lerna-bootstraplerna-link)
-
Tim Neutkens authored
## Summary Fixes #88316 Route handlers (API routes) were generating bloated `client-reference-manifest.js` files containing unrelated client components from pages when using Webpack. This was caused by the manifest merging logic in `flight-manifest-plugin.ts` which inherited manifests from all parent path segments. ### Changes - Modified `flight-manifest-plugin.ts` to detect route handlers (`/route$` pattern) - Route handlers now only get their own group's manifest, skipping parent manifest inheritance - Pages continue to inherit manifests from parent layouts as before ### Why this works Route handlers: - Don't render React components - Return `Response` objects, not JSX - Don't need client component references from parent layouts/pages Turbopack already handles this correctly by doing targeted module graph traversal per entry. This fix aligns Webpack's behavior. ## Test Plan Added test suite `test/production/app-dir/route-handler-manifest-size/`: - Verifies pure route handlers don't include unrelated page client components - Verifies pages still include their client components - Verifies route handlers with direct client imports don't get page components - Tests pass for both Webpack and Turbopack
-
Niklas Mischkulnig authored
-
nextjs-bot authored
-
Niklas Mischkulnig authored
-
nextjs-bot authored
-
Tobias Koppers authored
### What? Fixes a edge case in production chunking performance where many dynamic imports (like https://app.unpkg.com/lucide-react@0.562.0/files/dist/esm/dynamicIconImports.js) causes builds to become very slow under specific scenarios.
-
- 13 Jan, 2026 15 commits
-
-
nextjs-bot authored
-
Tobias Koppers authored
<!-- Thanks for opening a PR! Your contribution is much appreciated. To make sure your PR is handled as smoothly as possible we request that you follow the checklist sections below. Choose the right checklist for the change(s) that you're making: ## For Contributors ### Improving Documentation - Run `pnpm prettier-fix` to fix formatting issues before opening the PR. - Read the Docs Contribution Guide to ensure your contribution follows the docs guidelines: https://nextjs.org/docs/community/contribution-guide ### Fixing a bug - Related issues linked using `fixes #number` - Tests added. See: https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ### Adding a feature - Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. (A discussion must be opened, see https://github.com/vercel/next.js/discussions/new?category=ideas) - Related issues/discussions are linked using `fixes #number` - e2e tests added (https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) - Documentation added - Telemetry added. In case of a feature if it's used or not. - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ## For Maintainers - Minimal description (aim for explaining to someone not on the team to understand the PR) - When linking to a Slack thread, you might want to share details of the conclusion - Link both the Linear (Fixes NEXT-xxx) and the GitHub issues - Add review comments if necessary to explain to the reviewer the logic behind a change ### What? ### Why? ### How? Closes NEXT- Fixes # -->
-
Niklas Mischkulnig authored
Addresses the comments on this PR: https://github.com/vercel/next.js/pull/88474#discussion_r2687626329 "Merge when ready" had striked again This did actually find another violation
-
Niklas Mischkulnig authored
<!-- Thanks for opening a PR! Your contribution is much appreciated. To make sure your PR is handled as smoothly as possible we request that you follow the checklist sections below. Choose the right checklist for the change(s) that you're making: ## For Contributors ### Improving Documentation - Run `pnpm prettier-fix` to fix formatting issues before opening the PR. - Read the Docs Contribution Guide to ensure your contribution follows the docs guidelines: https://nextjs.org/docs/community/contribution-guide ### Fixing a bug - Related issues linked using `fixes #number` - Tests added. See: https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ### Adding a feature - Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. (A discussion must be opened, see https://github.com/vercel/next.js/discussions/new?category=ideas) - Related issues/discussions are linked using `fixes #number` - e2e tests added (https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) - Documentation added - Telemetry added. In case of a feature if it's used or not. - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ## For Maintainers - Minimal description (aim for explaining to someone not on the team to understand the PR) - When linking to a Slack thread, you might want to share details of the conclusion - Link both the Linear (Fixes NEXT-xxx) and the GitHub issues - Add review comments if necessary to explain to the reviewer the logic behind a change ### What? ### Why? ### How? Closes NEXT- Fixes # -->
-
Benjamin Woodruff authored
I deleted the code that used this a long time ago in https://github.com/vercel/next.js/pull/70817 The rational for why I deleted the uses of this code is here (generics in turbo-tasks would be nice, but this implementation was too limited to be worth the complexity): https://github.com/vercel/turborepo/pull/8843#issuecomment-2253158412
-
Niklas Mischkulnig authored
<!-- Thanks for opening a PR! Your contribution is much appreciated. To make sure your PR is handled as smoothly as possible we request that you follow the checklist sections below. Choose the right checklist for the change(s) that you're making: ## For Contributors ### Improving Documentation - Run `pnpm prettier-fix` to fix formatting issues before opening the PR. - Read the Docs Contribution Guide to ensure your contribution follows the docs guidelines: https://nextjs.org/docs/community/contribution-guide ### Fixing a bug - Related issues linked using `fixes #number` - Tests added. See: https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ### Adding a feature - Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. (A discussion must be opened, see https://github.com/vercel/next.js/discussions/new?category=ideas) - Related issues/discussions are linked using `fixes #number` - e2e tests added (https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) - Documentation added - Telemetry added. In case of a feature if it's used or not. - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ## For Maintainers - Minimal description (aim for explaining to someone not on the team to understand the PR) - When linking to a Slack thread, you might want to share details of the conclusion - Link both the Linear (Fixes NEXT-xxx) and the GitHub issues - Add review comments if necessary to explain to the reviewer the logic behind a change ### What? ### Why? ### How? Closes NEXT- Fixes # -->
-
Tobias Koppers authored
### What? Replaces `is_reference_used` with `unused_references` and uses the new keyed invalidation. This avoid having a `is_reference_used` for each reference in the application
-
Niklas Mischkulnig authored
This causes nondeterministic cell order
-
Benjamin Woodruff authored
In theory, `parse_quote` is really nice because it lets you use type safety to assert more things about proc macro code. However, it does invoke the syn parser, so there's probably some cost. I had Claude find and remove trivial uses of `parse_quote`. There are still more uses, but they're not as easy to remove (e.g. because we need the real type, not just a `TokenStream`, and the type is annoying to construct by hand).
-
Tobias Koppers authored
### What? Previously cells could either be unchanged or changed. This falls short when updating Maps or Sets. We can't have a dependency on a single key of a map or set. The workaround for this was to create an "selector" turbo-tasks which picks the value and copies it into a new cell. This allows more granular invalidation. But it also creates a lot of extra tasks. And changing the map/set does invalidate all these selector tasks, which causes a lot of invalidation work. This change adds support for dependencies on certain keys of cells. On write side a turbo-tasks value need to opt-in into that behavior via `cell = "keyed"`. This changes the `cell` method to compare the new value key-by-key and report the changed keys to the backend. On read side the Vc need to be read via `.get(key).await?` or `.contains_key(key).await?`, which returns only the value resp. existance of the key and adds a dependency only to that key. With this approach the "selector" tasks can be avoided, while maintaining the same level of invalidation. ### How? On implementation side we only track the hash of the key for size reasons. A dependency has an additional field `key: Option<u64>` which represents the key depending on. When updating a cell we have a new optional argument `updated_key_hashes: Option<SmallVec<[u64; 2]>>` where the updates keys can be provided. The new `CellMode` (cell = "keyed") fills that.
-
Niklas Mischkulnig authored
Closes #88174 With musl (i.e. Alpine), the system memory allocator can cause catastrophic slowdowns - https://medium.com/p/stop-using-alpine-images-b51d12b0fde2 - https://nickb.dev/blog/default-musl-allocator-considered-harmful-to-performance/ We were seeing it cause a 10x slowdown, simply using mimalloc fixes this. <img width="612" height="1091" alt="Bildschirmfoto 2026-01-12 um 15 00 29" src="https://github.com/user-attachments/assets/8de6dea3-012b-4c73-94e3-284d478bd7ef" /> <img width="1888" height="687" alt="Bildschirmfoto 2026-01-12 um 15 35 15" src="https://github.com/user-attachments/assets/d594d3ef-ae9b-468a-b022-032f1cf967e1" />
-
Niklas Mischkulnig authored
Otherwise there are stray sourceMappingURL comments in the middle of the chunks.
-
Hendrik Liebau authored
It's more useful and efficient to run all tests and report all failures instead of aborting on the first failure. This way, developers get a complete picture of what needs to be fixed in a single run, and don't have to go through multiple iterations of fixing one failure at a time.
-
nextjs-bot authored
-
Zack Tanner authored
…vious builds (#86554)" This reverts commit 3bbb2e61. Need to investigate some upstream constraints before we land this in a stable release.
-
- 12 Jan, 2026 5 commits
-
-
nextjs-bot authored
-
Benjamin Woodruff authored
I added this as an option in https://github.com/vercel/next.js/pull/81818 as a solution for users with corporate firewalls that MITM TLS traffic. Reqwest 0.13.x now uses `rustls-platform-verifier` by default, which doesn't have the tradeoffs that `rustls-native-certs` had. We should now pick up and work with system certs by default, and we no longer depend on shipping our own blob of trusted PKI roots! (though wasmer still pulls this in...) This PR was generated with Opus + OpenCode, but there was a ton of manual iteration to get it working on CI. ### TLS Provider `reqwest` now defaults to `aws-lc-rs` instead of `ring`. This causes a few problems: - On Windows, this requires cmake and NASM. There's a prebuilt NASM blob we can use, but it still appears to need cmake. We could install this in CI, but I don't want to make Windows development any more complicated than it already is. - On Linux, there are issues with it picking up the wrong glibc version in our CI: https://github.com/aws/aws-lc-rs/issues/673 We just use this for fetching Google Fonts, so it's not worth it: Fall back to using `ring` on these platforms. ### CI Testing Manually triggered a build-and-release job so that it tries to build for the whole platform matrix: https://github.com/vercel/next.js/actions/runs/20936098900 ### Manual Testing Followed the test plan in https://github.com/vercel/next.js/pull/81818 
-
Vercel Release Bot authored
This auto-generated PR updates the development integration test manifest used when testing Rspack.
-
Vercel Release Bot authored
This auto-generated PR updates the production integration test manifest used when testing Rspack.
-
Brooke authored
Reverts vercel/next.js#88012
-