1762 Commits

Author SHA1 Message Date
Hendrik Liebau ffc4f29682 [backport] Patch playwright-core to resolve _finishedPromise on requestFailed (#93920)
Backports:

- #93802
2026-05-18 18:44:07 +02:00
Sebastian "Sebbie" Silbermann 28739286a8 [16.x] Avoid consuming cyclic models multiple times (#75)
* Avoid consuming cyclic models multiple times

* make types-and-precompiled work
2026-04-08 11:18:58 -07:00
nextjs-bot 668f8e3a60 Upgrade React from c80a0750-20260312 to 3f0b9e61-20260317 (#91522) 2026-03-17 22:37:18 +01:00
nextjs-bot 41a2ff65d7 Upgrade React from 5e9eedb5-20260312 to c80a0750-20260312 (#91324) 2026-03-17 15:27:22 +00:00
Sebastian "Sebbie" Silbermann 672b02b270 [next-playwright] Use unique cookie values for instant navigation testing lock (#91250)
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-03-16 21:07:56 +00:00
Andrew Clark a65c3c86e7 Hydrate page loads during instant navigation testing (#91207)
Previously, MPA page loads (reload, anchor navigation) while the instant
navigation lock was held would skip hydration entirely and hard-reload
when the lock released. This meant the page was non-interactive during
the locked period and tests couldn't assert on the hydrated React tree.

Now the page actually hydrates from the static shell. The server injects
a script that fetches the static RSC payload, and the client uses
createFromFetch with allowPartialStream so React can hydrate without
erroring on the incomplete Suspense boundaries. When the lock is
released, a soft refresh fetches the dynamic data (falling back to hard
reload if the router hasn't initialized yet).

Also refactors the cookie protocol to encode the lock state as a JSON
array (`[0]` = pending, `[1, null]` = captured MPA, `[1, {}]` = captured
SPA) for better integration with the devtools UI. This is somewhat
entangled with the hydration changes so they're grouped together, but
can be reviewed as atomic commits.
2026-03-12 19:03:05 -04:00
nextjs-bot bd04a076a7 Upgrade React from 46103596-20260305 to 5e9eedb5-20260312 (#91272) 2026-03-12 19:27:49 +00:00
Benjamin Woodruff 1eab3361c7 fix: Use a pnpm preinstall script to fix catch-22 in next binary creation (#91016)
We've had a longstanding issue where you'd have to run `pnpm i` _twice_ on a fresh checkout because `pnpm` wouldn't set up binary symlinks until after the binary exists, but the binary wouldn't exist until after `pnpm build` was done:

https://github.com/vercel/next.js/blob/canary/.github/workflows/build_reusable.yml#L303-L311

This solves that problem using a pnpm preinstall script that creates stub binaries for these files if they don't exist yet (because we haven't run `pnpm build`).

## Test Plan

```
git clean -fxd
pnpm i
pnpm build
pnpm test-start test/e2e/app-dir/next-image/
pnpm test-start-turbo test/e2e/app-dir/next-image/
```

I tested this both locally and inside of a fresh ubuntu VM.

Running `pnpm next` after `pnpm i` but before `pnpm build` gives a helpful error message:

<img width="946" height="125" alt="Screenshot 2026-03-06 at 9 37 14 PM" src="https://github.com/user-attachments/assets/4517e8bd-60ca-44f2-a34c-f7f3ec56c634" />
2026-03-10 11:21:15 -07:00
nextjs-bot d843c9f113 Upgrade React from 3bc2d414-20260304 to 46103596-20260305 (#90989) 2026-03-06 22:00:47 +00:00
Jude Gao a6f9167c2d Bump Node heap limit for lint-no-typescript to avoid OOM in CI (#90996)
The `lint` job in CI has been hitting `FATAL ERROR: Ineffective
mark-compacts near heap limit Allocation failed - JavaScript heap out of
memory` during `lint-eslint`.

`lint-no-typescript` runs `prettier-check`, `lint-eslint .`, and
`lint-language` in parallel via `run-p`. The `lint-eslint` script uses
`eslint.cli.config.mjs` which enables type-checked rules with
`parserOptions.project: true` — the config comment itself notes this
"needs a lot of memory". Node's default heap limit caps around ~2-4GB
regardless of available system memory, which isn't enough when the
type-aware parser loads the full monorepo project graph.

This sets `NODE_OPTIONS="--max-old-space-size=8192"` on the
`lint-no-typescript` script via `cross-env`. The env var inherits into
all three `run-p` children, giving eslint the headroom it needs without
touching CI workflow files.
2026-03-06 12:05:41 -08:00
Jude Gao 0921733a94 [Evals] Standardize Evals in Next.js (#90883)
Fixtures now live next to the code they test, like e2e. `pnpm eval
<name>` packs the local `next` build, generates baseline + agents-md
experiment configs on the fly, and runs both in a sandbox. The agents-md
variant drops an `AGENTS.md` that points the agent at the bundled docs
in `node_modules/next/dist/docs/` — comparing the two variants tells you
whether shipping a doc actually changes agent behavior.

`run-evals.js` mirrors `run-tests.js`: pack once, pass the tarball path
to the child via `NEXT_EVAL_TARBALL` env, forward flags. We only pack
`next`, not the whole workspace — the sandbox is remote Linux, so a
local `@next/swc` darwin binary wouldn't run there anyway; the sandbox
downloads the right one at runtime. The experiment config uses `sandbox:
'auto'`, which picks Vercel sandboxes when credentials are present and
falls back to local Docker otherwise, so external contributors can run
the same evals with just Docker + `ANTHROPIC_API_KEY`.

`experiments/` is generated fresh each run and gitignored so we don't
maintain N committed config files that differ by one line. Fixture code
is excluded from eslint since it's deliberately imperfect code for
agents to fix, and `EVAL.ts` uses vitest rather than jest. Fixture
`package.json` files use `"next": "^16"` rather than a pinned canary so
agents reading `package.json` to infer capabilities aren't misled by a
stale version string; the tarball install overlays it regardless.

next-evals-oss stays as the full benchmark runner for nextjs.org/evals;
it'll pull fixtures from here instead of keeping its own copy.
2026-03-06 12:05:36 -05:00
Shu Ding dc57cde301 Update @vercel/og and satori vendors (#90933)
The new `@vercel/og` and `satori` include many improvements:
- 2~20x faster image generation (`ImageResponse` API) by using Sharp for
rasterization, and optimized Satori core
- Better CSS/SVG coverage:
  - https://github.com/vercel/satori/issues/736
  - https://github.com/vercel/satori/pull/734
  - https://github.com/vercel/satori/pull/733
  - https://github.com/vercel/satori/pull/732
  - https://github.com/vercel/satori/issues/728
  - https://github.com/vercel/satori/issues/724
  - https://github.com/vercel/satori/pull/717
  - https://github.com/vercel/satori/pull/718
  - https://github.com/vercel/satori/pull/719
- Updated layout engine (https://github.com/vercel/satori/pull/689):
  - Support for `box-sizing`
  - Support for `display: contents`
  - Support for `position: static`
  - Support for `align-content: space-evenly`
  - Better support for `position: absolute`
  - Support for percentage values for `gap`
- Noto Sans → Geist Sans
2026-03-05 18:26:21 +00:00
nextjs-bot 2c52ea2e7b Upgrade React from 4cc5b7a9-20260303 to 3bc2d414-20260304 (#90876) 2026-03-05 10:08:46 +01:00
nextjs-bot eab44ed58b Upgrade React from 98ce535f-20260226 to 4cc5b7a9-20260303 (#90827) 2026-03-03 18:11:56 +01:00
Tobias Koppers de1add2539 Remove unused turbo-tasks items and add lint check (#90801)
### What?

Adds a lint script (`scripts/check-unused-turbo-tasks.mjs`) that detects
unused `#[turbo_tasks::function]`, `#[turbo_tasks::value]`, and
`#[turbo_tasks::value_trait]` definitions across the Rust codebase, and
removes all currently unused items.

### Why?

Dead turbo-tasks definitions add compilation overhead (each generates
trait impls, registrations, etc.) and make the codebase harder to
navigate. A lint check prevents regressions.

### How?

**New script** (`scripts/check-unused-turbo-tasks.mjs`):
1. Discovers all `.rs` files in `turbopack/crates/` and `crates/`
(excluding `turbo-tasks-macros-tests`)
2. Parses three kinds of turbo-tasks annotations:
- `#[turbo_tasks::function]` → extracts `fn` name + context (free,
inherent impl, trait impl, trait default)
   - `#[turbo_tasks::value]` → extracts `struct`/`enum` name
   - `#[turbo_tasks::value_trait]` → extracts `trait` name
3. Scans all files for identifier references, excluding definition sites
4. Reports any name that has no external references

The script is added to the `pnpm lint` command (runs in parallel with
other checks).

**Removed 23 unused items** across 18 files:

| Kind | Count | Examples |
|------|-------|---------|
| `value` (struct/enum) | 9 | `OutputAssetsWithAvailability`,
`ModuleNameMap`, `OptionModuleIds`, `LockedVersions`,
`AssetContentSnapshot` |
| `function` | 14 | `client_env`, `next_js_file`, `convert_path`,
`is_hot_module_replacement_enabled`,
`any_content_changed_of_output_asset` |

Also cleaned up imports that became unused after the removals.
2026-03-03 12:01:45 +01:00
Sebastian "Sebbie" Silbermann 75988e4331 [devtools] Bump React Compiler version to latest experimental (#90763) 2026-03-02 17:08:08 +01:00
nextjs-bot cf007f5945 Upgrade React from c0060cf2-20260224 to 98ce535f-20260226 (#90605) 2026-02-26 17:12:41 +00:00
Sebastian "Sebbie" Silbermann a8de0a0044 Enable experimental.reactDebugChannel by default (#90310)
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-02-26 16:00:47 +01:00
Benjamin Woodruff ef970c06fb Turbopack: Move turbopack out of pnpm build and into a pnpm build-all command (#90543)
#89819 has been causing a lot of pain for me, because I often have already compiled a version of Turbopack, usually with a custom profile or set of flags, and then I want to just compile the JS bits, but there's no way for me to do it without also recompiling Turbopack again, because the `maybe-build-native` doesn't understand my custom-built binary.

This reverts the behavior of `pnpm build`, but adds a `pnpm build-all` command for people who want this automatic compilation behavior (e.g. agents?).
2026-02-25 15:16:18 -08:00
Niklas Mischkulnig 14ac25b975 Bump Turborepo to 2.8.11 (#90530)
<!-- 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 #

-->
2026-02-25 23:28:38 +01:00
nextjs-bot aaabdcd773 Upgrade React from ab18f33d-20260220 to c0060cf2-20260224 (#90452) 2026-02-24 17:21:10 +00:00
Niklas Mischkulnig 351a67529b Bump Turborepo to 2.8.9 (#90079) 2026-02-23 10:24:49 +01:00
nextjs-bot 9ed3cb3523 Upgrade React from 2ba30655-20260219 to ab18f33d-20260220 (#90279) 2026-02-20 20:01:41 -08:00
Sebastian "Sebbie" Silbermann cd27e54989 Upgrade React from 4842fbea-20260217 to 2ba30655-20260219 (#90211)
Co-authored-by: nextjs-bot <it+nextjs-bot@vercel.com>
2026-02-19 17:36:59 -08:00
Niklas Mischkulnig 445d880ef9 test: Don't run integration tests twice for Turbopack (#83335)
This should reduce some duplicate CI jobs.
This split existed to support separate dev/prod manifests for skipping tests. That's not needed anymore, so we can just switch to the Webpack setup. This manual partitioning of `integration` tests into dev vs prod was brittle anyway
We still need this setup for rspack though
2026-02-18 18:57:16 +01:00
nextjs-bot 4cc1d4afca Upgrade React from 6066c782-20260212 to 4842fbea-20260217 (#90144) 2026-02-18 16:58:00 +00:00
Jimmy Lai 663c9151cf bench: render-pipeline benchmarks and stress routes (2/8) (#89863)
## Summary

Benchmark infrastructure for measuring render pipeline performance.

- **render-pipeline benchmark** (`bench/render-pipeline/`):
`benchmark.ts` for profiling render paths, `analyze-profiles.ts` for CPU
profile analysis
- **Stress routes** (`bench/basic-app/app/streaming/`): light, medium,
heavy, bulk, wide, chunkstorm variants for different streaming load
profiles
- **Basic app harness**: `benchmark.sh` runner script, `next.config.js`
- **Minimal server**: `bench/next-minimal-server/bin/minimal-server.js`
- **Docs**: `bench/BENCHMARKING.md` guide
- **Config**: eslint exclusion for bench paths, package.json bench
scripts

## Test plan

- [ ] No runtime behavior changes
- [ ] Benchmark scripts are standalone tooling

---------

Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2026-02-17 09:40:26 +01:00
nextjs-bot 190f5077ea Upgrade React from 272441a9-20260209 to 6066c782-20260212 (#89923) 2026-02-12 21:16:45 +00:00
Sebastian "Sebbie" Silbermann 3dafc76fc1 [fragment-scroll] Add experimental.appNewScrollHandler (#83107)
Just plumbing and enabling that flag in the experimental shards. The flag will enable our Layout router to use Fragment refs for scroll restoration. Implementation will be done in a follow-up.
2026-02-12 14:54:38 +01:00
nextjs-bot cc68574b8d Upgrade React from 2dd9b7cf-20260208 to 272441a9-20260209 (#89722)
[diff
facebook/react@2dd9b7cf...272441a9](https://github.com/facebook/react/compare/2dd9b7cf...272441a9)

<details>
<summary>React upstream changes</summary>

- https://github.com/facebook/react/pull/35731
- https://github.com/facebook/react/pull/35730

</details>
2026-02-09 20:27:07 +01:00
nextjs-bot ec38eb3483 Upgrade React from 95ffd6cd-20260205 to 2dd9b7cf-20260208 (#89681)
[diff
facebook/react@95ffd6cd...2dd9b7cf](https://github.com/facebook/react/compare/95ffd6cd...2dd9b7cf)

<details>
<summary>React upstream changes</summary>

- https://github.com/facebook/react/pull/35724
- https://github.com/facebook/react/pull/35711
- https://github.com/facebook/react/pull/35710
- https://github.com/facebook/react/pull/35708
- https://github.com/facebook/react/pull/35705
- https://github.com/facebook/react/pull/35700

</details>
2026-02-08 21:02:30 +01:00
Maikel van Dort 355d4484e5 fix: deprecated util._extend (#89614)
### What?

Fix deprecated warning: "Use Object.assign instead of deprecated
util._extend" from http-proxy (which hasn't been updated for 5 years)

### Why?

### How?

Fixes #74460
In favour of https://github.com/vercel/next.js/pull/81544 (which didn't
use a patch, but manually updated the compiled version)
2026-02-06 23:45:46 +00:00
nextjs-bot 6aeef8eb89 Upgrade React from 3e00319b-20260203 to 95ffd6cd-20260205 (#89550) 2026-02-05 19:26:39 +00:00
nextjs-bot 2f2a71d6f5 Upgrade React from b1533b03-20260203 to 3e00319b-20260203 (#89449) 2026-02-03 17:03:22 +00:00
nextjs-bot e01160ff57 Upgrade React from ed4bd540-20260202 to b1533b03-20260203 (#89444) 2026-02-03 16:59:14 +01:00
nextjs-bot ba30f2d955 Upgrade React from da641178-20260129 to ed4bd540-20260202 (#89401) 2026-02-03 14:58:56 +01:00
nextjs-bot 3422590d05 Upgrade React from 230772f9-20260128 to da641178-20260129 (#89301) 2026-01-30 18:25:11 +01:00
Sebastian "Sebbie" Silbermann a6f4399441 Ensures browserslist doesn't issue outdated warnings for baseline-browser-mapping (#89287) 2026-01-30 17:36:47 +01:00
Lucian Buzzo a5a92931d1 Upgrade tar used to extract SWC binary (#89158)
Co-authored-by: Sebastian Sebbie Silbermann <sebastian.silbermann@vercel.com>
2026-01-29 18:31:37 +01:00
nextjs-bot 54ac195aba Upgrade React from 10680271-20260126 to 230772f9-20260128 (#89250) 2026-01-29 17:14:57 +00:00
Sebastian "Sebbie" Silbermann 742a0674ce React types update (#89110)
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-01-28 22:16:54 +01:00
Sebastian "Sebbie" Silbermann a04499797e Re-enable types-and-precompiled (#89070) 2026-01-26 23:19:43 +00:00
nextjs-bot 8d88235c6d Upgrade React from b546603b-20260121 to 24d8716e-20260123 (#88963) 2026-01-23 19:55:27 +00:00
nextjs-bot 7026785ff1 Upgrade React from d2908752-20260119 to b546603b-20260121 (#88860) 2026-01-21 21:18:49 +01:00
nextjs-bot 9e33529b38 Upgrade React from 41b3e9a6-20260119 to d2908752-20260119 (#88774)
[diff
facebook/react@41b3e9a6...d2908752](https://github.com/facebook/react/compare/41b3e9a6...d2908752)

<details>
<summary>React upstream changes</summary>

- https://github.com/facebook/react/pull/35567
- https://github.com/facebook/react/pull/35566
- https://github.com/facebook/react/pull/35565
- https://github.com/facebook/react/pull/35564
- https://github.com/facebook/react/pull/35559
- https://github.com/facebook/react/pull/35556

</details>
2026-01-20 02:30:45 +00:00
Sebastian "Sebbie" Silbermann a77fd58c96 Upgrade React from bef88f7c-20260116 to 41b3e9a6-20260119 (#88756)
Co-authored-by: nextjs-bot <it+nextjs-bot@vercel.com>
2026-01-19 21:44:49 +01:00
nextjs-bot 52b2a9c60b Upgrade React from 4a3d993e-20260114 to bef88f7c-20260116 (#88649) 2026-01-16 17:13:07 +00:00
nextjs-bot 2f046d90fa Upgrade React from 3e1abcc8-20260113 to 4a3d993e-20260114 (#88547) 2026-01-14 16:41:56 +00:00
nextjs-bot b6cf4ea235 Upgrade React from 65eec428-20251218 to 3e1abcc8-20260113 (#88530) 2026-01-14 10:41:13 +00:00
Hendrik Liebau dd625fbf68 Remove lerna bootstrap from the clean script in package.json (#88527)
In #87188 we upgraded lerna to v9 which no longer supports/requires the
`lerna bootstrap` command. This commit removes it from the `clean`
script in the root package.json to avoid errors when running `pnpm
clean`.

[More
info](https://lerna.js.org/docs/legacy-package-management#replacing-your-usage-of-lerna-bootstraplerna-link)
2026-01-14 10:20:38 +00:00