- 09 Jan, 2025 31 commits
-
-
vercel-release-bot authored
-
Jiachi Liu authored
-
Benjamin Woodruff 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 # -->
-
Sebastian Markbåge authored
This has the View Transitions fix for CSS modules.
-
Jiachi Liu authored
### What Refactor the code that responsible for global client error handling, since they could touch shared state so they shouldn't be forked in new error overlay as hooks or utils. Hence I deleted the forked ones, and move the existing used ones to the `/errors/` to avoid getting duplicated.
-
Jiachi Liu authored
-
Benjamin Woodruff 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 # -->
-
Benjamin Woodruff 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 # -->
-
Jude Gao authored
Adding a `DevToolsIndicator` to the bottom left corner of the screen, replacing the old `ErrorIndicator` and `StaticIndicator`. This PR brings us 80% of the way to our goal. The remaining tasks are marked with TODOs. https://github.com/user-attachments/assets/40061638-7184-4051-85ec-ec6e80ca5102
-
Vercel Release Bot authored
-
Benjamin Woodruff authored
On Linux we must either compress or strip debuginfo, otherwise the debug tarball will be >2GiB, and pnpm (it's actually a node/libuv bug) has issues with files larger than 2GiB. As far as I can tell Rust can generate line numbers for backtraces with zlib-compressed debuginfo, but not with newer zstd-compressed debuginfo.
-
Hendrik Liebau authored
Based on #74691 we can now also show numerical values for configured experimental features: <img width="393" alt="numbers" src="https://github.com/user-attachments/assets/77309353-1319-4806-89e2-0ba1841e341a" />
-
Benjamin Woodruff authored
-
Luis Alvarez D authored
I checked that the encryption key is now being used as the hash_salt. I'm not sure about how to add a test for this behavior so let me know about any suggestions there. (I tried looking for tests that would use the functions up the call tree without any luck)
-
Hendrik Liebau authored
When printing the configured experimental features of the Next.js config, we are currently not discriminating `true` from `false` values. This is especially confusing when disabling an experimental feature that is enabled by default. In this case it appears in the output as if the feature was enabled. By using `✓` and `⨯` for boolean feature flags (and `·` for others), users can now clearly see whether a configured feature is enabled or disabled. **Before:** <img width="377" alt="before" src="https://github.com/user-attachments/assets/9cb75c1a-910d-48d2-ba1e-048213523e5f" /> **After:** <img width="377" alt="after" src="https://github.com/user-attachments/assets/9975366d-b8fd-48ef-83e3-44fbad633f48" />
-
Vercel Release Bot authored
-
Andrew Clark authored
This implements background revalidation of partial segment entries in the client Segment Cache. Until this PR, entries were never replaced in the Segment Cache, they were only evicted upon becoming stale, or if the LRU overflowed. But there are cases where we'll want to replace an existing entry with a new one; for example, if the current segment has more dynamic holes than the new one. Most commonly this happens when multiple fetching strategies are mixed within the same app. For example: when a shared layout belongs to both a PPR-enabled route and a non-PPR enabled route, the layout data might be omitted when prefetching the non-PPR enabled route, if it's wrapped in a loading boundary. But that shouldn't prevent it from being included when prefetching the route that has PPR enabled. (*Another example is when a shared layout is prefetched both on viewport entry and also via `<Link prefetch={true}>`. A viewport prefetch will only include the static data, but `prefetch={true}` includes both the static and the dynamic.* *`<Link prefetch={true}>` is not yet implemented by the Segment Cache but it will use a similar background revalidation strategy as the one implemented in this PR.*) -
Andrew Clark authored
Adds an internal test utility for e2e testing of requests initiated by the Next.js Router, such as prefetches and navigations. Calls the given async function then intercepts any router requests that are initiated as a result. It will then wait for all the requests to complete before exiting. Inspired by the React `act` API. I generally dislike early testing abstractions, but getting all the details right for intercepting the requests with Playwright ended up being non-trivial enough that I relented and extracted it to a separate module, in the `e2e/app-dir/segment-cache` folder. I'll hold off moving it to somewhere even more generic until it's proven to be useful. Example: ```js // Asserts that rendering a link results in a prefetch response that // contains some expected substring await act(async () => { await revealLink() }, { includes: 'subset of linked page content' }) ``` A few goals here: - As much as possible, avoid coupling to internal implementation details. For example, it will check for the presence of the "rsc" header to determine if a request was initiated by the router, but that's about it. - No timers, no race conditions. It works by intercepting the requests at the Playwright network layer. There should be no long pauses when running the tests, and if an assertion fails, it should fail quickly. - Account for Next.js's internal bandwidth throttling. The router does not initiate more than a fixed number of requests at a time, so every time a request is fulfilled, it has the potential to unblock more prefetches. So we must wait a task to check for additional requests. This is similar to what React's `act` implementation does to account for asynchronous rendering tasks. -
Andrew Clark authored
Follow-up to #73960. We should no longer check if PPR is enabled when determining whether to use the Segment Cache or the old client cache.
-
Donny/강동윤 authored
### What? Add a check for recursive IIFE. ### Why? Turbopack miscompiles recursive IIFEs because it does not check if IIFE recurses. ### How? Closes https://github.com/vercel/next.js/issues/74190
-
Sebastian "Sebbie" Silbermann authored
Co-authored-by:Jiwon Choi <devjiwonchoi@gmail.com>
-
Jiachi Liu authored
-
Jiachi Liu authored
-
Jiachi Liu authored
Follow up on #74647 , do not log this changes during dev
-
Benjamin Woodruff authored
This removes the `local` opt-out from `EsmExports`.
-
Donny/강동윤 authored
### What? Support inline string for `RcStr`. Most of the code is copied from https://github.com/dudykr/ddbase/tree/67c7cec871073f5c8c93d030d40fb8226170797f/crates/hstr/src (I own the code) ### Why? To see at the perf difference. #### Command: `ddt profile instruments run -t Memory -- $(which node) $(which pnpm) build-turbopack` - Old: <img width="1840" alt="image" src="https://github.com/user-attachments/assets/e9946dcf-7509-42ed-8648-6f6589de6313" /> - New: <img width="1840" alt="image" src="https://github.com/user-attachments/assets/08ea782e-9c66-4537-94a3-9f63956aa11a" /> ### How?
-
Jiwon Choi authored
This PR added a docs link button. It parses whitelisted URLs from error messages and links to the first one.  Closes NDX-574 Closes NDX-603
-
Zack Tanner authored
This is meant to provide a warning when a `notFound` page is triggered by an unmatched parallel route, but was erroneously triggering for deliberate `notFound()` cases as well. This adjusts the warning to only occur when `missingSlots` has items in the set which will only be the case when a missing non-children slot triggers the `notFound()` Fixes #74642
-
Benjamin Woodruff authored
refactor(turbo-tasks): Add common traits (TaskInput, NonLocalValue, etc) to `either::Either<L, R>` (#74198) I ended up abandoning https://github.com/vercel/next.js/pull/74108, but the `Either` trait implementations in there seemed nice-to-have, so I'm publishing them here instead.
-
Tobias Koppers authored
### What? This improves the performance. In cases where nodes have 500-1000 entries of one kind, this slows down iteration of the others. This change improves this worse case.
-
Benjamin Woodruff authored
Allows a few more `turbo_tasks::value`s to implement `NonLocalValue`, making them safe for use with local tasks.
-
- 08 Jan, 2025 9 commits
-
-
JJ Kasper authored
This just removes some remaining code from removed flying shuttle experiment.
-
Tobias Koppers authored
### What? File is outdated and we don't have a CI check that verifies that...
-
vercel-release-bot authored
-
JJ Kasper authored
Aims to speed up CI by avoiding checking npm registry un-necessarily for every test run since we mostly hard code our test package versions when the version matters.
-
JJ Kasper authored
These internal APIs should not be necessary so removing them to avoid confusion/un-necessary APIs from being used. x-ref: [slack thread](https://vercel.slack.com/archives/C0861RLN3AP/p1736181537629329?thread_ts=1736180335.833419&cid=C0861RLN3AP)
-
Jiachi Liu authored
### What We're suffering from local dev that every time the `*.test.ts` files are resolved with the local tsconfig.json, which was intended to be handled by the root tsconfig.json in the Next.js monorepo as they require to resolve the utils alias. By leveraing the `NEXT_PRIVATE_SKIP_CANARY_CHECK` flag which is renamed to `NEXT_PRIVATE_LOCAL_DEV` for our development. This only happen in local development in our monorepo, not in development of users or any other situations. ### Benefits This helps us to always write the tests with correct type hints especially for the rare cheerio or playwright interface APIs with our testing suite
-
Sebastian "Sebbie" Silbermann authored
Co-authored-by:Zack Tanner <1939140+ztanner@users.noreply.github.com>
-
Lee Robinson authored
Oops.
-
Lee Robinson authored
This documents how to build Single-Page Applications with Next.js. --------- Co-authored-by:
Delba de Oliveira <32464864+delbaoliveira@users.noreply.github.com> Co-authored-by:
Rich Haines <hello@richardhaines.dev>
-