- 03 Feb, 2026 16 commits
-
-
nextjs-bot authored
-
Niklas Mischkulnig authored
```js class X { [Symbol.for('nodejs.util.inspect.custom')] () { ... } } ``` -
JJ Kasper authored
x-ref: [slack thread](https://vercel.slack.com/archives/C04KC8A53T7/p1770151130656569?thread_ts=1770107873.440639&cid=C04KC8A53T7)
-
Rhys Evans authored
Co-authored-by:Joseph <joseph.chamochumbi@vercel.com>
-
Jam Balaya authored
## Summary Remove the deprecated [with-recoil](https://github.com/vercel/next.js/tree/canary/examples/with-recoil) example and update the examples manifest accordingly Chores: - Delete the examples/with-recoil directory and its contents - Remove the with-recoil entry from test/turbopack-dev-examples-manifest.json ## Why? [Recoil](https://github.com/facebookexperimental/Recoil) was archived by the owner on Jan 2, 2025. ## Adding or Updating Examples - [x] The "examples guidelines" are followed from our contributing doc https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md - [x] Make sure the linting passes by running `pnpm build && pnpm lint`. See https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md cc: @samcx Co-authored-by:
Joseph <joseph.chamochumbi@vercel.com>
-
Niklas Mischkulnig authored
We use `vc deploy -f`, so the build cache is never read anyway.
-
nextjs-bot authored
-
JJ Kasper authored
This is just an exploration into a deferred entries hook in `next.config` to allow waiting to build specific entries until all other entries have processed allowing external discovery of assets from compilation that can be used in building these deferred entries. x-ref: [slack thread](https://vercel.slack.com/archives/C09125LC4AX/p1767991281352189?thread_ts=1766951034.768869&cid=C09125LC4AX)
-
Jude Gao authored
Fixes #89240 The `agents-md` codemod failed on Windows because it assumed forward slashes in file paths. This caused the doc tree builder to skip files, resulting in an empty index being injected into `AGENTS.md`. The path handling code used string operations like `.split('/')` and `.endsWith('/index.mdx')` which don't work with Windows backslashes. Now uses regex patterns that match both separators: `/[/\\]/` for splitting and `!/[/\\]index\.mdx$/` for filtering. Also normalizes all paths to forward slashes in the output. While here, switched from `execSync` to `execa` for git commands. This is the pattern already used elsewhere in the codemod package (`upgrade.ts`, `handle-package.ts`) and passes arguments as an array instead of shell string interpolation. Tests were replaced with e2e tests that run the full CLI and include a cross-platform path normalization test case. -
zoomdong authored
Support https://webpack.js.org/configuration/output/#outputchunkloadingglobal for turbopack Runtime code. In utoo case, we need to support the iframe apps or micro frontend apps. If the master apps and slave apps both use turbopack to build, it will cause the variable `globalThis.TURBOPACK` conflict. More details refer to: https://github.com/utooland/utoo/issues/2526
-
JJ Kasper authored
This renames the variable for clarity as we've had issues with unit mismatch with this constant specifically. Also fixes usage which was working accidentally because we converted it to a negative unit which is always in the past. x-ref: [slack thread](https://vercel.slack.com/archives/C02K2HCH5V4/p1770137071766599?thread_ts=1769515738.350369&cid=C02K2HCH5V4)
-
nextjs-bot authored
-
nextjs-bot authored
-
nextjs-bot authored
-
Niklas Mischkulnig authored
Closes PACK-6536 - with deployment id available: a header contains the process.env.NEXT_DEPLOYMENT_ID , the client knows its dpl id already, so we can use that already - with deployment id unavailable: a response field contains the BUILD_ID, keep the existing logic of storing the build id in the browser It's unfortunate that we have to keep the BUILD_ID response field approach as a fallback, but oh well. This has the benefit that we won't need the build id anymore when the deployment id is available. If you use `output:export` and set `config.deploymentId` (i.e. enable skew protection) you are still expected to set these headers. --- - [x] Fallback behavior for when there is no deployment id - [ ] Run deployment tests
-
Joseph 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? Updated `docs/01-app/02-guides/package-bundling.mdx` to use multi-package manager syntax for `next experimental-analyze` commands. ### Why? To clarify the correct way to run `next experimental-analyze` with different package managers (npx, yarn, pnpm), preventing common mistakes like using `pnpx` instead of `pnpm next` for local binary execution. ### How? Added `yarn next experimental-analyze` and `pnpm next experimental-analyze` alternatives to the `npx next experimental-analyze` code blocks in Step 1 and Step 4. Closes NEXT- Fixes # --> --- [Slack Thread](https://vercel.slack.com/archives/C046HAU4H7F/p1770024460553639?thread_ts=1770024460.553639&cid=C046HAU4H7F) <a href="https://cursor.com/background-agent?bcId=bc-9b5e5ceb-78cf-5495-953e-53c04d01399c"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img alt="Open in Cursor" width="131" height="28" src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a> <a href="https://cursor.com/agents?id=bc-9b5e5ceb-78cf-5495-953e-53c04d01399c"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a> --------- Co-authored-by:
Cursor Agent <cursoragent@cursor.com>
-
- 02 Feb, 2026 11 commits
-
-
nextjs-bot authored
-
Hendrik Liebau authored
Follow-up to #89407. Disables Server Function logging for `'use cache'` functions called from the client. The logging output for these Server Functions needs more work to be useful. Currently it shows internal details like `$$RSC_SERVER_CACHE_0` instead of the actual function name, as well as the encoded bound args promise.
-
JJ Kasper authored
Partial revert of https://github.com/vercel/next.js/pull/89269 the additional tracing is still necessary for webpack so this re-adds that and removes the silent failing to register require-hook. E2E deploy tests run https://github.com/vercel/next.js/actions/runs/21599777917
-
Hendrik Liebau authored
Restores Server Function logging to be enabled by default during development, as originally implemented in #88277. The change to opt-in in #89321 was overly conservative. The implicit default in #88277 was an intentional design decision. Users can still opt out via `next.config.js`: ```js module.exports = { logging: { serverFunctions: false, }, } ``` For `'use cache'` Server Functions called from the client, the logging still needs more work. We'll disable it for those in a follow-up PR rather than gating the entire feature. Also fixes a pre-existing error where `'verbose'` from the deprecated `experimental.browserDebugInfoInTerminal` config wasn't properly normalized to `logging.browserToTerminal`. This was now surfaced because the default `logging` value object was not typed as `LoggingConfig`. <!-- 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 # --> -
Jan Amann authored
I noticed the snippets were slightly broken when copying them to an app. <!-- 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 # --> Co-authored-by:
Joseph <joseph.chamochumbi@vercel.com>
-
Pavan Shinde 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.
-
Hendrik Liebau authored
Server Function logging (#88277) is now opt-in, consistent with how fetch logging works. This reduces noise in development logs by default. Additionally, for `'use cache'` Server Functions called from the client, the logging needs more work to be useful. Keeping it opt-in avoids exposing incomplete functionality by default. Server Function logging can be enabled in `next.config.js`: ```js module.exports = { logging: { serverFunctions: true, }, } ``` -
Niklas Mischkulnig authored
looking for a better name...
-
Tobias Koppers authored
### What? Move the error printing logic to turbo_tasks and add test cases for it
-
- 31 Jan, 2026 2 commits
-
-
nextjs-bot authored
-
Benjamin Woodruff authored
Reverts vercel/next.js#89099 Apparently this did not solve the user's memory leak issue: https://github.com/vercel/next.js/issues/89091#issuecomment-3826050800
-
- 30 Jan, 2026 11 commits
-
-
Suhaib authored
## What? This PR adds support for detecting `@typescript/native-preview` as an alternative TypeScript compiler. When installed, Next.js will no longer automatically install the `typescript` package. ## Why? Fixes #88580 Users who want to use `@typescript/native-preview` (a Go-based native TypeScript compiler) should not be forced to also install the JavaScript-based `typescript` package. This is especially relevant for projects using `next.config.ts` where TypeScript support is provided by Node.js native TS or SWC. ## How? 1. Added `hasNativeTypeScriptPreview()` function to detect if `@typescript/native-preview` is installed 2. Modified the dependency check logic in `verifyTypeScriptSetup()` to skip auto-installing `typescript` when the native preview is present 3. Added an informative log message to notify users that some TypeScript features (like type checking during build) require the standard `typescript` package 4. Added e2e test to verify the behavior ## Test Plan - Added new e2e test at `test/e2e/app-dir/typescript-native-preview/` - The test verifies: - Detection message is shown - `typescript` is not auto-installed - The app still works (SWC/Turbopack handles compilation)
-
Benjamin Woodruff authored
Disclaimer: This PR is entirely claude+opencode generated. - Crate name said `next-swc-napi`, which was confusing, because this has a lot more than swc bindings nowdays. - The crate name didn't match the directory name, which often confused agents. This does not change the npm package name, as that would likely have a much larger blast radius, and could break more things, to a point where it may not be worth it.
-
nextjs-bot authored
-
Hendrik Liebau authored
[flakiness metric](https://app.datadoghq.com/ci/test/runs?query=test_level%3Atest%20%40git.repository.id%3A%22github.com%2Fvercel%2Fnext.js%22%20%40test.name%3A%22browser-log-forwarding%20verbose%20level%20should%20forward%20all%20logs%20to%20terminal%22%20%40test.type%3A%22nextjs%22%20%40test.status%3Afail&agg_m=count&agg_m_source=base&agg_t=count&fromUser=false&index=citest&start=1769207121512&end=1769811921512&paused=false) The test frequently failed because it snapshot-asserted on the forwarded browser logs before the final debug message was forwarded. This is because the initial assertion inside the `retry` block would pass because it falsely matched the debug message inside the error code frame (line 11): ``` [browser] browser error: this is an error message at Page.useEffect (app/page.tsx:10:13) 8 | console.info('browser info: this is an info message') 9 | console.warn('browser warn: this is a warning message') > 10 | console.error('browser error: this is an error message') | ^ 11 | console.debug('browser debug: this is a debug message') 12 | }, []) 13 | (app/page.tsx:10:13) ``` By adding the `[browser] ` prefix to all expected log messages, we ensure that the test only passes when the actual log messages are forwarded, and not when they appear inside code frames. <!-- 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 # -->
-
Hendrik Liebau authored
The server actions transform, which handles the `'use cache'` directive, was not being applied to `node_modules` when imported from route handlers. This caused `'use cache'` functions from dependencies to fail with errors like `"cacheLife() can only be called inside a 'use cache' function"``. The issue was that the `AppRoute` context used `internal_custom_rules` for its foreign code module options, which did not include the server actions transform. This is inconsistent with `AppRSC` (App Router pages), which correctly uses `foreign_next_server_rules` that includes the transform. The fix extends `foreign_next_server_rules` with `internal_custom_rules` and uses it for the foreign code context in `AppRoute`, matching the pattern used by `AppRSC`.
-
nextjs-bot authored
-
Niklas Mischkulnig authored
`test/e2e/middleware-redirects` has 404s on the data route
-
JJ Kasper authored
This test is also very flakey so adds it to the manifest as well
-
nextjs-bot authored
-
Luke Sandberg authored
Improve consistency of how Flag typed fields are handled in the macro to more structurally prevent bugs like what was fixed in #89228 (#89255) # Fix inconsistencies in flag handling ## What? This PR refactors the task flags bitfield implementation to properly separate flags by category (meta vs data) during serialization and deserialization. It also regularizes the way accessors are generated to try to prevent future bugs like what was fixed in #89228
-
Vercel Release Bot authored
This auto-generated PR updates the production integration test manifest used when testing Rspack.
-