- 03 Mar, 2025 24 commits
-
-
vercel-release-bot authored
-
vercel-release-bot authored
-
Will Binns-Smith authored
This adds a snapshot for rspack to this test. It also mentions rspack instead of webpack when failing with build errors. Test Plan: `pnpm test-start-rspack test/e2e/app-dir/use-cache-unknown-cache-kind/use-cache-unknown-cache-kind.test.ts`
-
Sebastian "Sebbie" Silbermann authored
-
Sam Ko authored
## Why? Re-organizing some information across internal Slack channels.
-
Benjamin Woodruff authored
Without this, you'll have to wait up to 600 seconds after merging a manifest update and waiting for the upload CI job to run, which leads to some confusion. This should make it near-instant. Calls the endpoint defined here: https://github.com/vercel/areweturboyet/pull/20 This needs the `TURBOYET_TOKEN` secret to be configured on the repository. (Thanks @timneutkens) Tested by running it here: https://github.com/vercel/next.js/actions/runs/13635362971/job/38112680086 
-
Sebastian "Sebbie" Silbermann authored
-
Jiachi Liu authored
### What We discoved an issue that fetch new URL with static assets in Pages API on edge runtime were failing. Located the issue was an introduced in #66534 where we changed the layer of Pages API with edge runtime entries into API layer, where it actually should be another separate layer like middleware. The quick fix is using middleware bundle layer for Pages API edge functions, but middleware is server-only layer which Pages API is not yet, since it doesn't bundle everything and picking up the `react-server` condition. So we have to create a new layer `apiEdge` to minimize the behavior changes and also fix the bug. The test suite was disabled due to node-fetch blocker, but we now we can enable it. Closes NDX-941 Fixes #74385 [slack-ref](https://vercel.slack.com/archives/C07CGAA2RS6/p1740868643335099)
-
Lihao Wang authored
Upon reading the documentation, I found the demo TypeScript code in server components section is missing a close brace. So adding it back to fix the issue. Thanks for reviewing! <!-- 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>
-
Will Binns-Smith authored
Currently we only replace the first occurrence with `String.prototype.replace()`. This uses `replaceAll` to replace all occurrences. Test Plan: See next PR in this stack for use. -
Tobias Koppers authored
Turbopack: inline minify into code generation and make it a plain function instead of a turbo tasks function (#76628) ### What? This avoids celling the input code for minification and passes is directly to magnification
-
Janka Uryga authored
Reverts vercel/next.js#74989
-
Tobias Koppers authored
Because of eventual consistency
-
Hendrik Liebau authored
Reduces the main chunk's size for a hello world app ~from 60.2 kB to 51.6 kB~ from 53.5 kB to 45.6 kB (after #76622 got merged). In the past we were a bit sloppy with using modules from `src/server` also in universally used modules (server & browser). This led to code ending up in browser chunks that's only meant for the server, e.g. async local storage modules. We did have already quite a few conditional requires with `typeof window` checks for those modules, but not everywhere. This is fixed in this PR. And shared modules are also moved out of `src/server` into either `src/shared/lib` or `src/client`. A simple smoke test is added to ensure we don't regress here, at least for a simple hello world app. A better verification might be some kind of linter rule though. In addition, we don't remove the `typeof window` SWC optimization for Next.js modules anymore (which is still done for other `node_modules`, see #62051), to ensure that guarded code becomes dead code and is eliminated. Ideally, SWC would take care of the DCE solely by using `typeof window` checks, without needing to manually split modules and dynamically requiring them, which is very tedious and we'd like to avoid. But this is currently not the case. Another option worth exploring is using the ESM modules from `next/dist/esm` in hopes of yielding better DCE results.
-
Sebastian "Sebbie" Silbermann 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 ### What? ### Why? ### How? Closes NEXT- Fixes # -->
-
rauno authored
This PR implements robust keyboard navigation for the Dev Tools dropdown menu, and its nested overlays that appear. Full list of changes: - Use enum state `open` for making sure only one overlay can be open at a time - Implement proper focus trapping through `useFocusTrap` to make sure focus can never leave the trap - Fixed bugs related to focusing items in the menu - Focused index in the menu is retained when closing a nested overlay - Move all overlay-related logic to `DevToolsInfo` _Note: We should follow up with an assessment of ARIA attributes on all these surfaces_ https://github.com/user-attachments/assets/66a36359-1265-40dd-82cc-1032dfdcff28 Closes NDX-927
-
Sebastian "Sebbie" Silbermann authored
-
Tobias Koppers authored
### What? Compute module batches and refactor chunking to work on the batches graph instead of the modules graph With many pages we run into the problem that each page has a lot of modules, even if the total amount of modules is not super high. This multiples the number of edges needed in our graph. To reduce that, group modules to module batches and module batches to batch groups and query information on these batches resp. batch groups to reduce the work needed. A module batch will be formed from modules that are always used in a specific execution order. A batch group will be formed from module batches that are in the same chunk groups. Usually we work with module batches in a certain order and a unordered list of batch groups. We query information from the batch group and sort the results based on the order of module batches.
-
Sebastian "Sebbie" Silbermann authored
-
Sebastian "Sebbie" Silbermann authored
-
Tim Neutkens authored
## What? Reuse the same code as is checked in page.js, making them consistent and dropping an additional dependency which also makes it easier to run while testing. <!-- 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
-
Donny/강동윤 authored
### What? Still look for effects even if a private property exists. ### Why? It's valid ECMAScript input. ### How? Closes https://github.com/vercel/next.js/issues/75938
-
- 01 Mar, 2025 7 commits
-
-
vercel-release-bot authored
-
Hendrik Liebau authored
-
Jiachi Liu authored
### What streaming meatdata is fully enabled now, we don't need to pass down an extra flag through render options
-
Zack Tanner authored
On client navigations, rendering does not start at the root, it starts at the common layout down. As a result the existing heuristic to only render the `<StreamingMetadata />` component once won't work, as `children` will likely appear for parallel routes within the subtree. (In other words: `children` is only useful as a heuristic for root renders). As a result, metadata will get duplicated on client navigation if parallel routes match that page (this is because we iterate over all parallel routes, and conditionally render `<StreamingMetadata />` based on the flawed heuristic above) Since the metadata tree is accumulated and only rendered once, ideally it should never be rendered in `createComponentTree`. Or if it is, we need to ensure it’s never rendered more than once, as it would contain the same contents twice. This PR: - On client navs, ensures that we only render `<StreamingMetadata />` once as part of the `rscHead`, rather than per parallel route segment: [5e3686a](https://github.com/vercel/next.js/pull/76692/commits/5e3686ac55c0020ab843e8a2648f180ad9f33ca6) - On the client, we make sure to prioritize the `head` node corresponding with the root page slot ("children"). Otherwise we might not render `<StreamingMetadata />` at all, since the current heuristic would have early-returned for a parallel route that _didn't_ change as part of the navigation (eg the case where a slot doesn't match, and keeps rendering the previous node): [7364e6e](https://github.com/vercel/next.js/pull/76692/commits/7364e6e008dfb99b454267ff6a7b4a080a9f3d08)
-
Jiwon Choi 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 ### What? ### Why? ### How? Closes NEXT- Fixes # -->
-
Lee Robinson authored
These function the same, but the updated version looks cleaner.
-
Josh Story authored
Dev mode reports static/dynamic behavior using a heuristic when dynamicIO is enabled. The heuristic previously incorrectly marked routes as dynamic when they were in fact static as a consequence of refactoring metadata to support streaming. This update adjust the heuristic to not incorrectly assume dynamic in these situations. The root cause is that errors in `onError` cannot be assumed to be valid if the render has already aborted Closes NAR-112
-
- 28 Feb, 2025 9 commits
-
-
vercel-release-bot authored
-
Will Binns-Smith authored
Test Plan: `pnpm test-dev-rspack test/development/acceptance/server-component-compiler-errors-in-pages.test.ts` passes
-
Will Binns-Smith authored
This restricts rspack to only be used with canary builds, and updates the plugin’s readme to note this, along with its experimental state. Test Plan: Made a custom build with a `__NEXT_VERSION` of `15.2.0` and verified builds failed with the canary-only message. --------- Co-authored-by:Zack Tanner <1939140+ztanner@users.noreply.github.com>
-
Benjamin Woodruff authored
fix(CI): Upload to areweturboyet immediately after a manifest is updated, not only on a fixed cron schedule (#76688) I don't have a good way to test this without merging it first.
-
Vercel Release Bot authored
This auto-generated PR updates the production integration test manifest used when testing Turbopack.
-
Vercel Release Bot authored
This auto-generated PR updates the development integration test manifest used when testing Turbopack.
-
Hendrik Liebau authored
For pages router ISR pages, we are showing the revalidate times in the build output tree view, e.g.: ``` Route (pages) Size First Load JS ┌ ○ /404 190 B 92.6 kB └ ● /my-isr-page (ISR: 300 Seconds) 291 B 92.7 kB ``` For app router pages, this info is currently missing. With this PR, we're not only adding the revalidate times for app router routes, but also showing the expire times as well. Those may be configured in the Next.js config [`expireTime`](https://nextjs.org/docs/app/api-reference/config/next-config-js/expireTime), or via [cache profiles](https://nextjs.org/docs/app/api-reference/functions/cacheLife) in `"use cache"` functions. Both values are moved into separate `Revalidate` and `Expire` columns and are shown in a human-readable format. **After:** <img width="708" alt="two columns" src="https://github.com/user-attachments/assets/3d6dff7b-7df1-43b2-ae33-802227a3cf88" /> **Before:** <img width="788" alt="before" src="https://github.com/user-attachments/assets/19d5bc2c-c39f-4d44-97e0-ddcb72de3d82" /> closes NAR-96
-
Hendrik Liebau authored
For the `stale-while-revalidate` value in the `cache-control` response header, Next.js currently uses the configured [`expireTime`](https://nextjs.org/docs/app/api-reference/config/next-config-js/expireTime), which applies to all routes, and defaults to one year. With the introduction of `"use cache"` and granular [cache lifetimes](https://nextjs.org/docs/app/api-reference/functions/cacheLife), users can now set expire times per route — based on the minimum expire time of all cached functions used by that route. This PR updates the `stale-while-revalidate` value to reflect the route's cache lifetime, using the difference between the minimum expire time and the minimum revalidate time. If no explicit expire time is defined in cache profiles, the globally configured `expireTime` is used. Additionally, the collected expire time is added to the prerender manifest as `initialExpireSeconds` (and `fallbackExpire`), analogous to `initialRevalidateSeconds` (or `fallbackRevalidate`). closes NAR-100
-
Jiachi Liu authored
### What Static metadata manifest file should be prefixed with `basePath` when it's specified, as all the requests are sent to the routes under `/<basePath>/*`, it should also show the correct url in the html Fixes #56687 Closes NEXT-2707
-