- 09 Aug, 2025 3 commits
-
-
nextjs-bot authored
-
nextjs-bot authored
-
Maia Teegarden authored
-
- 08 Aug, 2025 15 commits
-
-
nextjs-bot authored
-
Iakhub Seitasanov authored
regression introduced in https://github.com/vercel/next.js/pull/67166/files#diff-907b7be0cfc75bd37773e5ebc38d1deffa40861b8ac1cde92e4992e284a1ee59R1324 <!-- 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 ### Adding or Updating Examples - The "examples guidelines" are followed from our contributing doc https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md - Make sure the linting passes by running `pnpm build && pnpm lint`. See https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md ### 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:
JJ Kasper <jj@jjsweb.site>
-
JJ Kasper authored
This adds some additional API surface for `build-complete` adapter hook. Wiring up prerenders and additional configs.
-
Jimmy Lai authored
docs: update revalidatePath, revalidateTag docs to be more consistent + highlight res.revalidate case (#82479) - uses invalidate instead of revalidate to make more explicit the revalidatePath, revalidateTag behavior - highlights that eager revalidation can still happen with the pages router method <!-- 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 ### Adding or Updating Examples - The "examples guidelines" are followed from our contributing doc https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md - Make sure the linting passes by running `pnpm build && pnpm lint`. See https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md ### 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 # -->
-
Vercel Release Bot authored
This auto-generated PR updates the development integration test manifest used when testing Rspack.
-
Benjamin Woodruff authored
Devcontainers support custom `Dockerfile`s, but it seems like it's more recommended to use a base image with "features" on top: https://containers.dev/implementors/features/ Features get applied after the `Dockerfile`, so e.g. if we're installing `rust` with a feature, then we can't install things that depend on `rust` (e.g. `cargo-nextest`: https://nexte.st/) in the `Dockerfile`. So you're forced to do things with features instead, which can specify dependencies and ordering requirements. I removed a bunch of comments that were left over from the template. People wishing to update this file should refer to the https://aka.ms/devcontainer.json link at the top of the file. Also added a lockfile for the features, generated with: ``` devcontainer upgrade --workspace-folder=. ``` **Note:** The `base.Dockerfile` here was entirely unused. ### Testing ``` podman stop --all && podman rm --all # replace podman with docker if you're using docker devcontainer up --workspace-folder=. devcontainer exec --workspace-folder=. zsh ```
-
Jude Gao authored
The issue was that DOM bots with PPR-enabled routes were being forced to use BLOCKING_STATIC_RENDER mode, which prevented them from using the fallback cache lookup mechanism. This caused them to generate new content with isRevalidating: true, which blocks postponed data and triggers the Math.random() static generation bailout error. For HTML bots, they keep using BLOCKING_STATIC_RENDER because SSG was turned off for them and won't see the SSG bailout error. For DOM bots, they should behave like a normal user. Fixes NAR-273
-
Jiachi Liu authored
-
Kit Foster 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 ### Adding or Updating Examples - The "examples guidelines" are followed from our contributing doc https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md - Make sure the linting passes by running `pnpm build && pnpm lint`. See https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md ### 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 ### How? Closes NEXT- Fixes # --> ### What? Add the `path` field to the App Router https://nextjs.org/docs/app/api-reference/components/image and Pages Router https://nextjs.org/docs/pages/api-reference/components/image docs. This field is valid for both, and currently it's use is hidden in the code. ### Why? Allow people to find and use the field as it is useful for prefixing the `/_next/image` path. --------- Co-authored-by:
Steven <steven@ceriously.com>
-
Tobias Koppers authored
### What? Refactors the side effects optimization. * Gets rid of the `<module evaluation>` and the `<exports>` module. * Only two modules: `<local>` and the facade. * The local module has all the evaluation side effects and local exports. * The facade reexports the local module and all reexports of the module. * `require()` and `import *` will resolve to the facade module * `import "..."` will resolve to the locals * `import { x } from "..."` will follow reexports and finally imports from a locals module -
Tobias Koppers authored
### What? Add more test cases for the side effects optimization that are currently broken Closes https://github.com/vercel/next.js/pull/82411
-
Tobias Koppers authored
### What? Split the existing big `basic` test case into smaller test cases to make it easier to figure out problems
-
Tobias Koppers authored
### What? enable side effects optimization by default in all but 2 test cases
-
Joseph authored
Follow up for: https://github.com/vercel/next.js/issues/74730
-
Benjamin Woodruff authored
## Goal With three different bundlers, we're often forced to duplicate next.js-specific logic and configuration across two or three different bundlers. E.g. https://github.com/SyMind/next-rspack-binding/ would cause us to duplicate our current externals logic across all three. To help, we'd like to have a shared crate that can be used in a few different ways: - Via turbopack (which is itself called through native napi bindings) - Via direct native napi bindings to JS for webpack - Via wasm bindings to JS for webpack [*(note: ideally these would be replaced with napi's recent wasm support, but it doesn't make sense to do that until after the napi v3 migration is done)*](https://napi.rs/blog/announce-v3#webassembly) - Via Rspack (we'd build a custom binary) The wasm bindings (in their current state) and Rspack cannot (or should not) depend on `turbo-tasks`. However, all of the current `next-*` crates depend on `turbo-tasks`. This introduces a `next-taskless` crate for code that can be isolated from performing IO and that does not need to depend on `turbo-tasks`. Code in this crate can be used from wasm or Rspack. ## This PR As a proof-of-concept, this deduplicates our next.js entrypoint templating logic across webpack and Turbopack. It's a large function that doesn't need to directly depend on file IO. Some path manipulation had to be moved out of `turbo-tasks-fs` to support this, so that code is in `turbo-unix-path`. I'm happy to accept different bikeshedded crate names. ## Testing Tested wasm with: ``` pnpm i pnpm swc-build-wasm --target nodejs pnpm build NODE_TEST_MODE=start NEXT_TEST_WASM=true NEXT_SKIP_NATIVE_POSTINSTALL=1 NEXT_TEST_PREFER_OFFLINE=1 node run-tests.js test/production/pages-dir/production/test/index.test.ts ``` Tested turbopack with: ``` pnpm i pnpm swc-build-native pnpm build pnpm test-start-turbo test/production/pages-dir/production/test/index.test.ts ``` Tested webpack with: ``` pnpm i pnpm swc-build-native pnpm build pnpm test-start test/production/pages-dir/production/test/index.test.ts ```
-
- 07 Aug, 2025 11 commits
-
-
nextjs-bot authored
-
JJ Kasper authored
As discussed we can move these tests to run on canary release instead of on every PR. x-ref: [slack thread](https://vercel.slack.com/archives/C02CDC2ALJH/p1754522330101839?thread_ts=1754493332.436339&cid=C02CDC2ALJH)
-
Jiachi Liu authored
-
Josh Story authored
Prior to this change on every navigation we would validate that the initial static shell satisified the rules of cache components. This offers more protection as you edit pages but it slows down navigations and we are already concerned with dev speed and the extra CPU contention can potenially hide or exacerbate other performance characteristics you might notice in dev. So for now we will only validate a page on initial load. This means that if you are trying to debug a page's static shell suitability you will need to refresh the page not just navigate to and from it.
-
Vercel Release Bot authored
This auto-generated PR updates the production integration test manifest used when testing Rspack.
-
Niklas Mischkulnig authored
Showed up in an ast-grep search for `&$$$.clone()`
-
Vercel Release Bot authored
This auto-generated PR updates the development integration test manifest used when testing Rspack.
-
Niklas Mischkulnig authored
-
Maia Teegarden authored
Before: Cron runs would open a Draft PR if they happened to run before deployment tests finished. Once deployment tests completed, the system would either open a PR and immediately close it (if tests failed) or open it as ready for review (if tests passed). After: Both cron runs and new releases will open Draft PRs. Once deployment tests run and pass, these PRs will be marked as ready for review. If tests fail, the PRs remain as drafts. Related PRS: https://github.com/vercel/v0/pull/12992 https://github.com/vercel/front/pull/50036
-
Joseph authored
Complement to: https://github.com/vercel/next.js/issues/82379 Also adding corrections to other sections
-
Andrew Clark authored
Removes the param values from the router tree sent by the server during a client-side prefetch. This increases the cacheability of prefetch responses because if the response does not include a certain param in the component data, it can be reused for all possible values of that param. Previously this was not possible because even if the components did not reference a param, it was included in the router tree regardless. This does not affect the router tree sent during dynamic navigations, or during initial render. We should remove the param values from those responses, too, both for consistency and to increase the cacheability of HTML fallback responses. That work will land in future PRs.
-
- 06 Aug, 2025 11 commits
-
-
nextjs-bot authored
-
Zack Tanner authored
This PR fixes an infinite loop bug that occurred when using `cacheLife({ stale: 0 })` with `clientSegmentCache`. When the server returned a stale time of 0 seconds, cache entries would have `staleAt = Date.now()`, making them immediately stale. The cache would evict these entries on the same tick they were created, triggering continuous refetch requests. The fix updates the minimum stale time to be 30s, in the event that the server sends a low value. The rationale being that a value lower than 30s here would render prefetching ineffective. This prevents the immediate eviction while still respecting the server's intent for very short-lived cache entries. Closes NAR-269 -
Andrew Clark authored
Small update to #82383. Instead of using a special symbol to represent the "virtual" segments that get inserted into the loader tree for parallel routes, we can represent them like route groups, since they serve the same purpose. That will allow us to remove a special case in the param parsing logic, since we have to skip groups regardless; both will be skipped by the same check.
-
zoomdong authored
When use externalType: `global` or `script` under utoopack(turbopack only use esm or cjs external): like externalType is global , and the external package is react. The generate external module code like: ```ts 263: ((__turbopack_context__) => { "use strict"; const mod = globalThis["react"]; __turbopack_context__.n(mod); }), ``` The real function of runtime code `__turbopack_context__.n` is `exportNamespace`, its code as follows: ```ts module.exports = module.namespaceObject = namespace ``` And when we import the module as following: ```ts import react from "react"; console.log(react.version); ``` it will be bundled as: ```ts var __TURBOPACK__imported__module__263__ = __turbopack_context__.i(263); console.log(__TURBOPACK__imported__module__263__["default"]); ``` The `__turbopack_context__i` is esmImport, it will return the module when the module contains `namespaceObject` without `interopEsm`: ```ts function esmImport() { const module = getOrInstantiateModuleFromParent(id, this.m) // any ES module has to have `module.namespaceObject` defined. if (module.namespaceObject) return module.namespaceObject return interopEsm(); } ``` So the following case if we use a react umd module(which doesn't have a `default export`) as our external package, code `console.log(__TURBOPACK__imported__module__263__["default"]);` will output `undefined`(which webpack can output the right version). I just change export wrapper the externalType: global and script here(which now only consumed by utoopack), so the esmImport will execute `interopEsm` function here to make our code work fine. We test the case under utoopack and here is our pr: https://github.com/umijs/mako/pull/2097/files. --------- Co-authored-by:Niklas Mischkulnig <4586894+mischnic@users.noreply.github.com>
-
Vercel Release Bot authored
This auto-generated PR updates the production integration test manifest used when testing Rspack.
-
Joseph authored
Closes: https://linear.app/vercel/issue/DOC-4862/tailwind-css-modules --------- Co-authored-by:
Rich Haines <hello@richardhaines.dev>
-
Janka Uryga authored
Closes NAR-262
-
Janka Uryga authored
`unstable_isUnrecognizedActionError` is a new API that lets user code check if a server action call failed because the action id wasn't recognized by the server. This usually happens as a result of version skew between client and server. Example usage: ```ts try { await myServerAction(); } catch (err) { if (unstable_isUnrecognizedActionError(err)) { // The client is from a different deployment than the server. // Reloading the page will fix this mismatch. window.alert("Please refresh the page and try again"); return; } } ``` It can also be used to create a special error boundary, like we do in the tests added here. Note that this API is not a complete solution to this problem, as it doesn't allow handling failures for MPA actions (sent without JS). We might add a more complete API for this in the future to address that. -
Jiwon Choi authored
Rspack `testing for test/development/tsconfig-path-reloading` is failing often these days. Noticed `test/development/jsconfig-path-reloading` is already in the manifest of the "failed" section. - [Failed CI](https://github.com/vercel/next.js/actions/runs/16671025870/job/47187245042?pr=81396#step:34:504) - [DataDog](https://app.datadoghq.com/ci/test/runs?query=test_level%3Atest%20%40test.service%3Anextjs%20%40test.status%3Afail%20%40test.name%3A%28%22tsconfig-path-reloading%20tsconfig%20added%20after%20starting%20dev%20should%20automatically%20fast%20refresh%20content%20when%20path%20is%20added%20without%20error%22%20OR%20%22tsconfig-path-reloading%20tsconfig%20should%20automatically%20fast%20refresh%20content%20when%20path%20is%20added%20without%20error%22%29&agg_m=count&agg_m_source=base&agg_t=count¤tTab=overview&eventStack=&fromUser=false&index=citest&start=1753875198762&end=1754479998762&paused=false)
-
Andrew Clark authored
This will be used to roll out an internal implementation change; it won't ever be a user-facing configuration. The plan is to remove it as soon as the feature is properly tested.
-