- 18 Feb, 2025 12 commits
-
-
vercel-release-bot authored
-
Jiachi Liu authored
### What When streaming metadata is enabled, the whole metadata result is under the suspense boundary and will be streamed to client if it takes some time. Right now we only had the metadata itself rendered under the suspense boundary. But we also need to deal with the errors, when there're errors of `notFound()` or `redirect()` it should still be thrown to trigger the proper error boundary. One special case needs to be taken care of is when we passing down the error caught during metadata from RSC layer to client layer, the `digest` property will be lost as it's not serialized by React now. Hence we also send both of the error itself and its digest to client and let client compose them when both present. In this way we can keep the original error digest of `notFound` and `redirect` navigation errors. We don't have this case in non-streaming metadata as the metatdata resolving was all done on the RSC side. When streaming metadata is disabled, we should not re-throw the errors on client, let everything works like before in the blocking way. The metadata re-throw strategy is called `StreamingMetadataOutlet` in the code, reviewers can focus on that. Closes NDX-847
-
Hendrik Liebau authored
Apparently the HMR changes in the one dev test are affecting the others, or vice versa. So we put them in sandboxes to hopefully avoid the resulting flakiness.
-
Sam Ko authored
## Why? Adding an `Error Overlay` area (will add label as well) so we can start tracking issues with the new Error Overlay.
-
Sebastian "Sebbie" Silbermann authored
-
Benjamin Woodruff authored
Tested by commenting out the turbopack upload bits (since I don't want to risk messing up that dataset) and running: ``` TURBOYET_KV_REST_API_TOKEN="..." TURBOYET_KV_REST_API_URL="..." node .github/actions/upload-turboyet-data/dist/index.js ``` I got the API token from the areweturboyet deployment in the vercel dashboard. I think it's fine and easiest to just use the same KV database for both bundlers with different key prefixes.
-
Jiwon Choi authored
### Why? The overlay seemed too low when the content was long since it had both `padding` and `top` values. Adjust to have only the `top` and preserve the `padding` value. ### Before https://github.com/user-attachments/assets/e2172a7b-1275-4647-88e2-7b91fc4c8d98 ### After https://github.com/user-attachments/assets/182cfa7b-d532-4bb7-aa0c-69911720b370 Closes NDX-845
-
Donny/강동윤 authored
### What? Simplify `minify()` of turbopack. `swc::Compiler` is not required for the minification, considering that we are not using the minification API of it. ### Why? It has some tiny overheads, and it disturbs future refactoring for source maps.
-
Jiachi Liu authored
-
Donny/강동윤 authored
### What? ChangeLog: https://github.com/swc-project/swc/compare/swc_core%40v13.1.0...swc_core%40v14.0.0 ### Why? To keep in sync ### How?
-
Tim Neutkens authored
## What? Improves the check for browser sourcemaps by reading all sourcemap files from the `.next/static` folder instead of trying to locate a specific value. The sensitive value that is being checked should not exist in any of the sourcemap files so it's safer to check them all. This also ensures that if for example the underlying bundling heuristics change the check will still fail. In this case it was failing on the path with Turbopack, instead of on the value. This ensures it checks the value. <!-- 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:
Sebastian "Sebbie" Silbermann <sebastian.silbermann@vercel.com>
-
Tim Neutkens authored
## What? This test is already passing with Turbopack, updating the manifest. <!-- 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 # -->
-
- 17 Feb, 2025 23 commits
-
-
vercel-release-bot authored
-
Hendrik Liebau authored
This PR is a follow-up to #76100 that enables on-demand revalidation via an API route in development mode. This is accomplished by implementing three changes: 1. We need to forward the user cookies, including the `__next_hmr_refresh_hash__` value, which is required to generate the same cache key _during_ the revalidation as _before_ and, more importantly, _after_ the revalidation. Otherwise the revalidated cache entries will use a different cache key (without the refresh hash), and on subsequent page reload, the stale cached data would still be shown (using the cache key with refresh hash). 2. When checking if a `revalidate()` call succeeded, we allow `200` responses in general, and only check the `'x-nextjs-cache'` header for `404` response. This matches the historic intent of the feature. ([x-ref-1](https://github.com/vercel/next.js/pull/36108/files#diff-8d464ed8b3d6ed08deabeaa05180900c38f8943d75368798861d1734103512fcR338-R342), [x-ref-2](https://github.com/vercel/next.js/pull/34826/files#diff-8d464ed8b3d6ed08deabeaa05180900c38f8943d75368798861d1734103512fcR318-R324)). 3. The `isOnDemandRevalidate` status is now also set for non-`isSSG` pages, based on the `'x-prerender-revalidate'` header. This matches the logic in the incremental cache handler, which enables cache revalidation in dev mode when using `unstable_cache`.
-
Niklas Mischkulnig authored
- Every `EcmascriptChunkItem` already had a `chunking_context()` getter via the `ChunkItem` supertrait. - Produce less turbo tasks for `chunk_item.id()` - In the future, we really want to move `chunking_context.chunk_item_id()` to the module graph, (or split it out and instead pass a `Vc<ModuleIdStrategy>`). That is however a refactoring we don't need to do right now. This showed up in the traces, but overall it doesn't seem to have an effect on perf. Before:  After: 
-
Jiwon Choi authored
test: replace explicit `padding-bottom` with `devIndicators: false` for scroll position testing (#76105) ### Why? There were explicit `paddingBottom: 60` set to fixtures due to the dev indicator blocking the scroll position. Since an option to disable it was added at https://github.com/vercel/next.js/pull/76079, this PR replaced them with `devIndicators: false`. x-ref: https://github.com/vercel/next.js/pull/76077#discussion_r1957164641
-
Sebastian "Sebbie" Silbermann authored
-
Jiwon Choi authored
### Why? Since the dev indicator is visible by default, there could be a case where a user might want to disable it. However, the indicator needs to be brought back if there is an error since it's tied to the error overlay. ### What? Added an option `devIndicators: false` to disable the dev indicator. ### Success Criteria - [x] Does it hide the indicator when there is no error? - [x] Does it show the indicator when there is an error? - [x] Does it show the error overlay when there is an error? Closes NDX-840
-
Tim Neutkens authored
## What? Ensures the updated matcher output works. Both outputs are functionally correct. <!-- 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 # -->
-
Sebastian "Sebbie" Silbermann authored
-
Tim Neutkens authored
## What? For edge we generate everything in the `middleware-manifest.json` (should be renamed edge-manifest tbh, but it's not for legacy reasons). This change to the tests makes sure the right thing is checked in the directory output, that `.html` and `.rsc` are written. <!-- 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 # -->
-
Hendrik Liebau authored
Default cache handlers should be allowed and not trigger a build error.
-
conico974 authored
### What? When doing an On Demand revalidation (with `res.revalidate` or using `x-prerender-revalidate` header ), `use cache` entry will never get revalidated ### Why? It should behave the same as the fetch cache or `unstable_cache` ### How? We force revalidation of `use cache` entry when doing an on demand revalidation --------- Co-authored-by:Hendrik Liebau <mail@hendrik-liebau.de>
-
Sebastian "Sebbie" Silbermann authored
-
Janka Uryga authored
### What - Fixes an issue where `after()` in an edge page would not run if the request was cancelled/aborted - Unskips the `runs callbacks if redirect() was called` test which was disabled to not block other things ### Background This was initially hit in #75882, during which the `runs callbacks if redirect() was called` test started failing when using experimental react + turbo in dev mode. Turns out that this happenws because something got slower and we weren't finishing the redirect response in time, i.e. before the browser disconnected and started loading the page it got redirected to. It's relevant that the response didn't finish streaming, because in `edge`, we use that as the trigger to start running `after()` callbacks. In particular, we instrument the response stream using `trackStreamConsumed`. The problem was that this function didn't handle the stream being cancelled, which is what happens when a request is aborted mid-streaming, so `after()` never ended up executing. This PR fixes that and adds some tests for cancellation and interrupted streaming.
-
Sebastian "Sebbie" Silbermann authored
-
Niklas Mischkulnig authored
Run `EsmAssetReference::code_generation` without cells/turbo tasks. ``` testing against 0293c96cf32 canary 71d8bfcc 14.8gb 529.67s user 81.57s system 883% cpu 1:09.18 total mischnic/codegen-fewer-tasks 72eba1ead2 14.8gb 533.13s user 82.01s system 874% cpu 1:10.32 total mischnic/codegen-fewer-tasks don't store twice 14.6gb 529.85s user 82.35s system 875% cpu 1:09.90 total mischnic/codegen-esm-asset 14.2gb 528.69s user 81.37s system 881% cpu 1:09.17 total ```
-
Xiaoyi authored
Co-authored-by:Sebastian Sebbie Silbermann <sebastian.silbermann@vercel.com>
-
Sebastian "Sebbie" Silbermann authored
-
Donny/강동윤 authored
### What? - Do not run react compiler for files in `node_modules`. - When the react compiler is not enabled, just disable Babel. ### Why? We were stripping TypeScript and JSX using Babel when the React Compiler was enabled. We don't have to, and we should not.
-
Jiwon Choi authored
### What? This PR uses the `devIndicators.position` option to set the position of the dev indicator. The default option is changed from `"bottom-right"` to `"bottom-left"` to sync the previous dev indicator behavior, but have covered backward compatibility for the default position of old overlay's build activity indicator. ### Success Criteria - [x] Does setting `buildActivityPosition` correctly set the dev indicator position? - [x] Does setting the `position` correctly set the dev indicator position? - [x] Does it default to `"bottom-left"`? - [x] Does the dev indicator popover display properly based on the `position`? Backwards Compatible: > Are there any breaking changes? - [x] Is the position `"bottom-right"` on the old overlay if the user hasn't set the `position`? - [x] Is the position `"bottom-right"` on the old overlay if the user hasn't set the `buildActivityPosition`? - [x] Does the position follow the `position` option? - [x] Does the position follow the `buildActivityPosition` option? https://github.com/user-attachments/assets/a5dba705-1b9d-4470-80e6-1952b22c2f46 Closes NDX-838
-
Hendrik Liebau authored
Follow-up for #74674 When running `pnpm next build` or `pnpm next dev` with a test app in the Next.js repo, we patch the app's `tsconfig.json` to exclude the test files from the program, because those are already covered by the root `tsconfig.json`. The code to suppress logging this action had a bug where we tried to remove the action from the list of `requiredActions` even if it wasn't added, resulting in the following runtime error: ``` Cannot read properties of undefined (reading 'includes') ``` This could happen when the `requiredActions` array was empty but the `suggestedActions` array was not.
-
Jiwon Choi authored
### Why? Since the `buildActivity` is deprecated at #76067, `buildActivityPosition` may also be deprecated. However, we are planning to preserve the option to position the dev indicator. Therefore, this PR adds a new option `position` and deprecates and aliases the `buildActivityPosition` to `position`. ### Success Criteria Deprecation: - [x] Does using `buildActivityPosition` show a deprecation warning? - [x] Does `buildActivityPosition` have a deprecation in JSDoc? Alias: > Is it backward compatible with the old overlay? - [x] Does setting `buildActivityPosition` correctly set the build activity indicator position? - [x] Does it warn if `buildActivityPosition` is set instead of `position`? - [x] Does `buildActivityPosition` supersede `position` value to prevent breaking change? - [x] Does setting the `position` correctly set the build activity indicator position? ### Follow Up In the following PRs, we will add the behavior for `position` to adjust the dev indicator's position. After removing the old overlay's sources, we can remove any logic that `buildActivityPosition` was holding for the old overlay and make it fully an alias for backwards compatibility. Closes NDX-837
-
Jiwon Choi authored
### Why? Since the new dev indicator supersedes the existing `appIsrStatus` (Static Route Indicator) and `buildActivity` (Compilation Indicator), deprecate them before we fully remove the old overlay. ### Follow Up After removing the old overlay's sources, we can remove any logic that `appIsrStatus ` and `buildActivity` were holding for the old overlay. Closes NDX-836
-
Jiwon Choi authored
-
- 16 Feb, 2025 2 commits
-
-
vercel-release-bot authored
-
Jiachi Liu authored
### What For PPR deployment we shouldn't disbale the PPR config inside of Next.js but let infra determine when to pass down the PPR cache. If we disable it inside Next.js it could lead to other error when the infra tries to get the cache in dynamic-resume.
-
- 15 Feb, 2025 2 commits
-
-
vercel-release-bot authored
-
Sebastian "Sebbie" Silbermann authored
-
- 14 Feb, 2025 1 commit
-
-
vercel-release-bot authored
-