1830 Commits

Author SHA1 Message Date
Niklas Mischkulnig ec2b319781 [backport] Bump @swc/helpers (#96885)
Backport https://github.com/vercel/next.js/pull/96720
2026-08-07 13:31:53 -07:00
Vercel Release Bot f5c81a82c1 Upgrade React from 0f42eac2-20260730 to cbb046ab-20260731 (#96434)
Co-authored-by: next-js-bot[bot] <279046576+next-js-bot[bot]@users.noreply.github.com>
2026-07-31 15:27:34 -04:00
Sebastian "Sebbie" Silbermann be7048ef91 Update @types/react and @types/react-dom to latest (#96419) 2026-07-31 11:29:57 -04:00
Vercel Release Bot a49f1c97e6 Upgrade React from 6cb4322d-20260729 to 0f42eac2-20260730 (#96402)
Co-authored-by: next-js-bot[bot] <279046576+next-js-bot[bot]@users.noreply.github.com>
2026-07-30 17:21:07 -04:00
Vercel Release Bot 5f5e4773bb Upgrade React from 1724e9ce-20260729 to 6cb4322d-20260729 (#96389) 2026-07-30 17:49:17 +00:00
Vercel Release Bot 769d9e6e03 Upgrade React from 96fcba90-20260728 to 1724e9ce-20260729 (#96355)
Co-authored-by: next-js-bot[bot] <279046576+next-js-bot[bot]@users.noreply.github.com>
2026-07-30 13:51:10 +00:00
Joseph 5cdcbbb05b Bump postcss to 8.5.23 (#96107)
Note that https://github.com/advisories/GHSA-6g55-p6wh-862q does not
affect Next.js users unless they build from untrusted source code (which
would have more severe security implications). We're merging this to
reduce noise from security scanners.

- 8.5.21 is 50h+ old so it can be installed
- 8.5.22 is still under 48h - valid at 2026-07-24 08:48:15 UTC 

Closes: https://github.com/vercel/next.js/issues/96349
2026-07-29 18:22:56 -04:00
dan faa3bdf7f1 Bump @types/node to 20.17.7 to fix findSourceMap type (#96321)
Fixes
https://github.com/vercel/next.js/pull/96198#discussion_r3666434724.

Bumps the pinned `@types/node` version to `20.17.7` to get an upstream
fix for `findSourceMap` type.

Also regenerates the pnpm patch due to a conflict.

I upgraded by just a patch because I'm not sure if we rely on being on
an old version here.

## Test Plan

`findSourceMap` now shows correct types.

<img width="694" height="335" alt="Screenshot 2026-07-29 at 01 02 48"
src="https://github.com/user-attachments/assets/cfe740e0-b8bf-4edc-ac27-698f926feb32"
/>
2026-07-29 01:28:48 +01:00
Vercel Release Bot 9ce6d48cd4 Upgrade React from 756fdd47-20260727 to 96fcba90-20260728 (#96306)
Co-authored-by: next-js-bot[bot] <279046576+next-js-bot[bot]@users.noreply.github.com>
2026-07-28 15:19:38 -04:00
Vercel Release Bot 8399ee9150 Upgrade React from 28cd4bb0-20260723 to 756fdd47-20260727 (#96270)
Co-authored-by: next-js-bot[bot] <279046576+next-js-bot[bot]@users.noreply.github.com>
2026-07-27 15:57:43 -04:00
Sebastian "Sebbie" Silbermann 5d6a82e021 Replace vendored http-proxy with httpxy (#96060)
[`httpxy`](https://github.com/unjs/httpxy) is a faster and actively
maintained variant of `http-proxy`. It also doesn't need any manual
patches to avoid security vulnerabilities in Next.js.

`httpxy` is used by Nuxt and maintained by the Nitro team.
2026-07-27 10:25:54 -04:00
Hendrik Liebau 59cc6420a3 Add a benchmark for dev Cache Components validation on a worker thread (#96152)
This adds `bench/dev-validation/`, wired as `pnpm bench:dev-validation`,
which measures how much dev-mode Cache Components validation contends
for the dev server's event loop during rapid navigation, and how much
running it on a worker thread relieves that. It toggles
`experimental.devValidationWorker` (added in the previous commit) to A/B
the two configurations on the same build. Until the worker
implementation lands the flag is inert and the A/B shows no delta.

The fixture generates one route per family (`client`, `server`,
`sprite`), each nested several layout segments deep under a `(routes)`
route group. Validation renders a combined payload at every URL depth,
so a deeper route means more validation work per navigation, which
mirrors a realistically deep app rather than a single flat segment. The
runner clicks a family's `<Link>` repeatedly, since navigating to the
current route re-renders and re-validates it on every click. The routes
carry no `instant` config because dev validation applies to page
segments by default at the warning level. The three families isolate the
client prerender, the Flight re-encode plus owner-stack work, and the
Flight payload size, respectively.

The signal is browser-observed TTFB taken from Playwright's own network
timing, because it includes the time a request waits for the event loop
while validation monopolizes it. We deliberately do not use the CLI's
logged request durations: the dev server starts that clock inside the
request handler, after the loop has already yielded to the request, so
the queue wait is invisible to it.

The runner prints each configuration's absolute TTFB (p50/p95/max) side
by side rather than a ratio. The time the worker frees is the validation
render's CPU, which is bounded, route-dependent, and does no IO, so a
ratio would overstate a win that does not scale with total request time.
Because the clicks are back-to-back the numbers are a worst case —
navigations that land inside the validation window — and the `max` tail
is the honest headline: it is the main-thread stall the worker removes.
2026-07-25 07:21:03 +02:00
Vercel Release Bot 6c6d1632e1 Upgrade React from 711c445b-20260722 to 28cd4bb0-20260723 (#96100)
Co-authored-by: next-js-bot[bot] <279046576+next-js-bot[bot]@users.noreply.github.com>
2026-07-23 23:34:32 +02:00
dan 5f688d274a [Bench] Add client-trace attribution pass and document metrics to render-pipeline (#95828)
Added a bunch of stuff to the bench.

---

**New metrics in the HTTP benchmark**
- Report TTFB per route (time to first body byte), next to total
latency.
- Report each route's document size, how many bytes are inline Flight
payload, and the Flight share.

**New script: `pnpm bench:render-pipeline:client`**
- Loads each route in Chrome with tracing and 4x CPU throttling, and
breaks down where client time goes: evaluating chunks, evaluating inline
Flight scripts, compiling, background parsing, GC, time to hydration,
and blocking time before hydration.
- Also prints FCP/LCP/DOMContentLoaded/load from the same trace, and JS
transferred vs parsed.
- Off by default, separate from the timing benchmark, since tracing
perturbs timing.
- Hydration time comes from a small client component added to the
fixture root layout that calls `performance.mark`.

**Bug fixes**
- The benchmark was replacing the fixture's `next.config.js` with an
empty one during runs.
- If the port was already taken, the benchmark could silently measure
whatever server was already running there. Both scripts now refuse to
start if something is already on the port.
- A server that died on startup used to look like a slow server; now it
errors immediately.
- One failed request used to abort the whole run and throw away all
results. Now it costs one sample and gets counted in `errors`.
- Killing an already-dead server used to hang the script.
- Bad flags now error upfront instead of crashing at the end.

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-23 09:26:03 +02:00
Vercel Release Bot 99cf207aea Upgrade React from 81e442ea-20260721 to 711c445b-20260722 (#96066)
Co-authored-by: next-js-bot[bot] <279046576+next-js-bot[bot]@users.noreply.github.com>
2026-07-22 17:41:18 +00:00
Vercel Release Bot cee9824aa5 Upgrade React from 172742b4-20260716 to 81e442ea-20260721 (#96016)
Co-authored-by: next-js-bot[bot] <279046576+next-js-bot[bot]@users.noreply.github.com>
2026-07-21 17:25:13 +00:00
Vercel Release Bot c246ba9f07 Upgrade React from 7023f501-20260714 to 172742b4-20260716 (#95901)
Co-authored-by: next-js-bot[bot] <279046576+next-js-bot[bot]@users.noreply.github.com>
2026-07-20 01:23:55 +02:00
Vercel Release Bot 8de1af952e Upgrade React from 5123b063-20260708 to 7023f501-20260714 (#95782)
Co-authored-by: next-js-bot[bot] <279046576+next-js-bot[bot]@users.noreply.github.com>
2026-07-14 21:43:09 +02:00
Vercel Release Bot 90dd06c240 Upgrade React from df4bd1b4-20260708 to 5123b063-20260708 (#95642)
Co-authored-by: next-js-bot[bot] <279046576+next-js-bot[bot]@users.noreply.github.com>
2026-07-09 21:45:06 +02:00
Vercel Release Bot 216c900597 Upgrade React from 12a4baec-20260707 to df4bd1b4-20260708 (#95612)
Co-authored-by: next-js-bot[bot] <279046576+next-js-bot[bot]@users.noreply.github.com>
2026-07-09 10:37:34 +02:00
Vercel Release Bot b4b909bc9b Upgrade React from 23def8fd-20260706 to 12a4baec-20260707 (#95581)
Co-authored-by: next-js-bot[bot] <279046576+next-js-bot[bot]@users.noreply.github.com>
2026-07-08 09:23:22 +02:00
Sebastian "Sebbie" Silbermann f656c597c6 [fragment-scroll] Enable new scroll handler by default (#95378) 2026-07-06 18:39:07 +00:00
Vercel Release Bot 36b0a4c855 Upgrade React from 3508aee6-20260702 to 23def8fd-20260706 (#95532)
Co-authored-by: next-js-bot[bot] <279046576+next-js-bot[bot]@users.noreply.github.com>
2026-07-06 20:11:34 +02:00
Jude Gao 0240fd39a5 evals: fix false-negative regex checks with the agentic LLM judge (#95440)
Fixes false-negative regex assertions — observed rejecting correct
solutions in recent eval runs — by grading those specific checks with
`@vercel/agent-eval`'s agentic LLM judge instead. Only the assertions
with demonstrated false negatives change; every deterministic check
stays.

- `agent-034-async-cookies`: `/await\s+cookies\s*\(\s*\)/` only matched
the naive `await cookies()` and rejected the correct (arguably better)
`await Promise.all([cookies(), headers()])` — observed failing most runs
of a strong model — and the no-sync-call lookbehind wrongly flagged the
bare `cookies()` inside the array. The four await-mechanics tests
collapse into one judge criterion: the promises must actually be awaited
before use, in any correct form. The theme-cookie and Accept-Language
content checks stay regex.
- `agent-030-app-router-migration-hard`: the home-page test rejected
solutions that didn't match one exact shape (e.g. data fetching
extracted to a helper means no literal `fetch(` in `page.tsx`). Its body
becomes one judge criterion (async Server Component, fetches during
server render, no `getServerSideProps`); the file-existence check and
the other seven tests stay deterministic.

The judge is pinned to **`claude-haiku-4-5`** in the generated
experiment configs — a cheap fixed grader, identical for every run
regardless of the model under test. Each criterion states the
requirement semantically, includes one reference solution to ground the
small grader, and fixes the standard of judgment (runtime correctness,
not style) — no enumerated failure modes, so the judge stays flexible
about equivalent forms.

Supporting changes: bumps `@vercel/agent-eval` `0.9.5` → `1.3.0` (ships
the judge runtime) and adapts `run-evals.js` to the 1.3 CLI (`run
baseline agents-md --force`; `--dry` maps to `status`); generated
experiments now run through the Vercel AI Gateway so `vc env pull` is
the only credential setup; converted fixtures exclude `EVAL.ts` from
tsconfig (the `@vercel/agent-eval/eval` import has no type declarations
— vercel-labs/agent-eval#166 — and `next build` type-checks the fixture,
so experiments running `scripts: ['build']` would otherwise fail on it,
same reason `EVAL.tsx` was already excluded). Not converted: `agent-040`
(already redesigned upstream in #94578) and `agent-041` (no diagnosed
false negative in the report).

Verified end-to-end from this repo: converted `agent-034` with codegen
`claude-sonnet-4-5` via the AI Gateway in a Vercel sandbox, judge pinned
to `claude-haiku-4-5` — passes, with the judge clause executing
in-sandbox.

**Running it:**

```bash
pnpm install                 # picks up @vercel/agent-eval 1.3.0
pnpm --filter=next build     # pnpm eval packs the locally built next
vc env pull .env.local       # the only credential: sandbox + AI Gateway (codegen and judge)

pnpm eval agent-034-async-cookies         # baseline + AGENTS.md variants
pnpm eval agent-034-async-cookies --dry   # preview only
```

<!-- NEXT_JS_LLM_PR -->
2026-07-06 12:27:32 -04:00
Sebastian "Sebbie" Silbermann d3169de7e5 Collect modules with browser variants statically (#95200)
Instead of hardcoding the list, we now automatically detect any
`.browser` sibling and create a compiler alias for that module.

Together with a linting rule, we'll ensure no future regressions are
handled automatically (detection of conditional require and missing
.browser sibling).

This isn't the smoothest DX yet. Ideally we'd generate the list at
Next.js compile time (i.e. before publishing) to avoid having to rerun a
script (I'll follow-up). Generating the list during build time (next dev
or next build) is just another tiny cost users would have to pay.
2026-07-03 08:45:23 +02:00
Vercel Release Bot d1268a9084 Upgrade React from ec0fca31-20260701 to 3508aee6-20260702 (#95410)
Co-authored-by: next-js-bot[bot] <279046576+next-js-bot[bot]@users.noreply.github.com>
2026-07-02 20:43:11 +02:00
Sebastian "Sebbie" Silbermann 7443e117dc [cd] Replace the release package with our own GitHub release creation (#95352) 2026-07-02 09:07:26 +00:00
Vercel Release Bot a25865f151 Upgrade React from 92f4fda3-20260629 to ec0fca31-20260701 (#95368)
Co-authored-by: next-js-bot[bot] <279046576+next-js-bot[bot]@users.noreply.github.com>
2026-07-01 21:14:15 +02:00
Vercel Release Bot a84bfcf4be Upgrade React from 68631c04-20260626 to 92f4fda3-20260629 (#95282)
Co-authored-by: next-js-bot[bot] <279046576+next-js-bot[bot]@users.noreply.github.com>
2026-06-30 20:10:45 +00:00
Benjamin Woodruff c518402e07 [ci] update relay-compiler to 21.0.1 (#95217)
We need to upgrade this because the ancient version of relay-compiler
that we were using didn't support arm64.
2026-06-30 01:27:24 +00:00
Vercel Release Bot 19b41eea62 Upgrade React from 247fbb45-20260622 to 68631c04-20260626 (#95211)
Co-authored-by: next-js-bot[bot] <279046576+next-js-bot[bot]@users.noreply.github.com>
2026-06-29 17:40:23 +02:00
Vercel Release Bot f0d1956c83 Upgrade React from b1786c31-20260618 to 247fbb45-20260622 (#95063)
Co-authored-by: next-js-bot[bot] <279046576+next-js-bot[bot]@users.noreply.github.com>
2026-06-22 20:51:19 +02:00
Sebastian "Sebbie" Silbermann 2aba93f005 [scripts] Write pnpm overrides for pnpm projects in pack/patch helpers (#94747) 2026-06-22 17:12:14 +02:00
Benjamin Woodruff 7cb54ace75 [ci] Update playwright to 1.61.0 (#94871)
[Playwright v1.61.0 adds support for
ubuntu-26.04](https://github.com/microsoft/playwright/releases/tag/v1.61.0).
When Lindsey created our arm64 runners (see
https://github.com/vercel/next.js/pull/94870), [he picked the
ubuntu-26.04
image](https://vercel.slack.com/archives/C01LN7C5QR5/p1781608258610389?thread_ts=1781118174.353839&cid=C01LN7C5QR5)
(which is technically still [in
preview](https://github.com/actions/runner-images#available-images), but
IMO that's fine).
2026-06-18 21:39:11 +00:00
Vercel Release Bot 7be5e2cd47 Upgrade React from ad78e251-20260616 to b1786c31-20260618 (#94951)
Co-authored-by: next-js-bot[bot] <279046576+next-js-bot[bot]@users.noreply.github.com>
2026-06-18 21:48:46 +02:00
Sebastian "Sebbie" Silbermann 618957c166 [cd] More robust publish pipeline (#94622) 2026-06-17 19:44:59 +02:00
Vercel Release Bot f90e8bd21a Upgrade React from d9158919-20260615 to ad78e251-20260616 (#94867)
Co-authored-by: next-js-bot[bot] <279046576+next-js-bot[bot]@users.noreply.github.com>
Co-authored-by: Sebastian Sebbie Silbermann <sebastian.silbermann@vercel.com>
2026-06-17 15:19:35 +02:00
Vercel Release Bot 13460abb18 Upgrade React from 43bcbf80-20260603 to d9158919-20260615 (#94826) 2026-06-16 15:52:01 +02:00
Vercel Release Bot 84f9247617 Upgrade React from f0dfee38-20260529 to 43bcbf80-20260603 (#94440)
[diff
facebook/react@f0dfee38...43bcbf80](https://github.com/facebook/react/compare/f0dfee38...43bcbf80)

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

- https://github.com/facebook/react/pull/36586
- https://github.com/facebook/react/pull/36603
- https://github.com/facebook/react/pull/36585
- https://github.com/facebook/react/pull/36580
- https://github.com/facebook/react/pull/36584
- https://github.com/facebook/react/pull/36583
- https://github.com/facebook/react/pull/36576
- https://github.com/facebook/react/pull/36575
- https://github.com/facebook/react/pull/36574

</details>

---------

Co-authored-by: next-js-bot[bot] <279046576+next-js-bot[bot]@users.noreply.github.com>
Co-authored-by: Josh Story <gnoff@storyposted.com>
2026-06-05 08:11:55 -07:00
Tim Neutkens 735d6a68dd Update vendored lodash to 4.18.1 (#94473)
### What?

Updates the vendored lodash dependency from `4.17.23` to `4.18.1` and
regenerates the compiled `jsonwebtoken` and `babel-packages` bundles.

### Why?

Next.js currently ships lodash `4.17.23` inside `dist/compiled`, which
triggers security scanners for CVE-2026-4800 / GHSA-r5fr-rjxr-66jc.
Consumers cannot override these vendored compiled copies.

Fixes #94449.

### How?

Bumped the root lodash pin and lockfile resolution, installed the
patched package, and reran the focused ncc tasks for the affected
compiled sources.

### Verification

- `pnpm --filter=next build`
- `grep -oE '4\.17\.[0-9]+'
packages/next/dist/compiled/jsonwebtoken/index.js
packages/next/dist/compiled/babel-packages/packages-bundle.js` produced
no matches
- `grep -oE '4\.18\.[0-9]+'
packages/next/dist/compiled/jsonwebtoken/index.js
packages/next/dist/compiled/babel-packages/packages-bundle.js` reported
`4.18.1` for both files
- `node -e "const
jwt=require('./packages/next/dist/compiled/jsonwebtoken'); const
token=jwt.sign({sub:'94449'}, 'secret'); const decoded=jwt.verify(token,
'secret'); if (decoded.sub !== '94449') throw new Error('jsonwebtoken
roundtrip failed'); console.log('jsonwebtoken roundtrip ok')"`
- `node -e "const
bundle=require('./packages/next/dist/compiled/babel-packages'); if
(typeof bundle.presetEnv !== 'function') throw new Error('presetEnv
export missing'); console.log('babel-packages export ok')"`

<!-- NEXT_JS_LLM_PR -->
2026-06-05 14:36:00 +02:00
Vercel Release Bot 3c06b5b389 Upgrade React from c0cd4d5d-20260527 to f0dfee38-20260529 (#94245)
[diff
facebook/react@c0cd4d5d...f0dfee38](https://github.com/facebook/react/compare/c0cd4d5d...f0dfee38)

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

- https://github.com/facebook/react/pull/36570
- https://github.com/facebook/react/pull/36558
- https://github.com/facebook/react/pull/36516
- https://github.com/facebook/react/pull/36551

</details>

---------

Co-authored-by: next-js-bot[bot] <279046576+next-js-bot[bot]@users.noreply.github.com>
2026-06-03 07:49:14 +00:00
Joseph 867227352b chore: lint-language output only warnings and errors (#94261)
The lint-language script is too verbose, it prints "no issues found" for
all files it touches.
2026-06-02 10:07:28 +02:00
Vercel Release Bot 2944e65df3 Upgrade React from 75b0945b-20260526 to c0cd4d5d-20260527 (#94161)
[diff
facebook/react@75b0945b...c0cd4d5d](https://github.com/facebook/react/compare/75b0945b...c0cd4d5d)

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

- https://github.com/facebook/react/pull/36328
- https://github.com/facebook/react/pull/36542
- https://github.com/facebook/react/pull/36544

</details>

---------

Co-authored-by: next-js-bot[bot] <279046576+next-js-bot[bot]@users.noreply.github.com>
2026-05-27 18:22:18 +00:00
Niklas Mischkulnig d6d392a492 Upgrade ast-grep (#94150)
It wasn't properly analyzing async closures:
https://github.com/vercel/next.js/blob/67d5f9615a6abb14dc2a06737c2810e2c6b6f7b0/.config/ast-grep/rule-tests/no-map-async-cell-test.yml#L34
2026-05-27 12:55:05 +02:00
Vercel Release Bot 242ae6818e Upgrade React from d5736f09-20260507 to 75b0945b-20260526 (#94131)
Co-authored-by: next-js-bot[bot] <279046576+next-js-bot[bot]@users.noreply.github.com>
2026-05-26 21:43:07 +02:00
Vercel Release Bot 51713ddca8 Upgrade React from dd453071-20260506 to d5736f09-20260507 (#93702)
[diff
facebook/react@dd453071...d5736f09](https://github.com/facebook/react/compare/dd453071...d5736f09)

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

- https://github.com/facebook/react/pull/36386

</details>

---------

Co-authored-by: next-js-bot[bot] <279046576+next-js-bot[bot]@users.noreply.github.com>
2026-05-13 11:46:54 -04:00
Janka Uryga f3458b86a6 fix: GNU xargs warns about incompatible --replace/--max-args (#93821)
we were invoking

```
xargs --null -n1 -I'{}' ...
```
to tell xargs that we want to:
- use 1 argument per invocation (`-n1`)
- `{}` is the placeholder (`-I'{}'`)

but it seems like `-I'{}'` already implies `-n1`. BSD xargs doesn't
care, but GNU xargs warns about it, so we get this in CI (e.g.
[here](https://github.com/vercel/next.js/actions/runs/25789455488/job/75751231855?pr=93801#step:36:54)):
```
xargs: warning: options --max-args and --replace/-I/-i are mutually exclusive, ignoring previous --max-args value
```

seems like both GNU and BSD xargs are happy if we just drop the `-n1`
and only use `-I{}`.
2026-05-13 13:14:32 +00:00
Hendrik Liebau 7c6f9e71f9 Patch playwright-core to resolve _finishedPromise on requestFailed (#93802) 2026-05-13 13:46:53 +02:00
Tim Neutkens 8141dcf12e Convert test/integration to isolated tests (#93247)
### What?

Converts every test under `test/integration/` to an isolated test
running through `nextTestSetup` (under `test/e2e/`, `test/production/`,
`test/development/`, or `test/unit/`), then deletes `test/integration/`
along with the legacy CI orchestration that was specific to it.

- `test/integration/` removed entirely (~327 test suites)
- New isolated suites added across the existing folders:
  - `test/e2e/` — 175
  - `test/production/` — 130
  - `test/development/` — 43
  - `test/unit/` — 1
- `.github/workflows/build_and_test.yml` and `run-tests.js` no longer
have any `integration` branches
- `nextTestSetup` gained a `baseUrl` option on `next.browser()` so a
small number of tests that drive their own proxy/static-export server
can keep using `next.browser(...)` instead of importing `next-webdriver`
directly

### Why?

`test/integration/` predated `nextTestSetup` and ran tests directly
against the source checkout via custom helpers (`launchApp`,
`nextBuild`, `nextStart`, `runNextCommand`, `webdriver`, `fetchViaHTTP`,
…). Each suite hand-rolled its own dev/start/build orchestration,
fixture mutation, and process management.

The isolated test model used by the rest of the repo gives each suite an
isolated working directory containing a packed `next.tgz` install, a
uniform `next.start()` / `next.build()` / `next.fetch()` /
`next.browser()` API, and the same lifecycle for dev, start, and deploy
modes — so a single set of assertions covers all three. Deploy-mode
skips and per-feature gates are expressed declaratively
(`skipDeployment`, `disableAutoSkewProtection`, `if (skipped) return`)
instead of branching on `process.env`.

Removing `test/integration/` lets us:

- Delete the bespoke orchestration code in the CI workflow and
`run-tests.js`
- Run every converted suite consistently in dev, start, and deploy modes
(where applicable)
- Reproduce every test locally with the same `pnpm
test-{dev,start}-{turbo,webpack}` commands; no separate `integration`
path
- Open the door to running `test/production` against deployments in the
future (the converted suites already declare `skipDeployment` so they
can be flipped on)

### How?

Mechanical conversion per suite, with targeted clean-ups:

1. **Per-suite conversion.** Each
`test/integration/<name>/test/index.test.{js,ts}` was rewritten into a
single `<name>.test.ts` under the right folder based on what the
original exercised:
   - `launchApp` / dev-only assertions → `test/development/`
- `nextBuild` + `nextStart` / start-only assertions → `test/production/`
   - Both → `test/e2e/`
- The one pure jsdom render check (`link-without-router`) → `test/unit/`

2. **API mapping.** Custom helpers were replaced by `nextTestSetup`
equivalents: `launchApp` → `next.start()`, `nextBuild` → `next.build()`,
`runNextCommand` → `next.runCommand`, `fetchViaHTTP` → `next.fetch`,
`webdriver(...)` → `next.browser(...)`. Fixture mutations switched from
raw `fs.writeFile`/`fs.rename` to `next.patchFile` (with the 3-arg
`runWithTempContent` callback when the change has a defined scope) and
`next.deleteFile`.

3. **Deploy-mode handling.** Suites that can't run in deploy mode (use
`patchFile` / `next.build()` / depend on local CLI output) declare
`skipDeployment: true` and early-return on the `skipped` boolean. Suites
where Vercel's edge mutates URLs (`&dpl=`, immutable assets) declare
`disableAutoSkewProtection: true`.

4. **`next.browser({ baseUrl })`.** A handful of tests
(`prerender-export`, `cdn-cache-busting`, `preload-viewport`, both
`react-virtualized` suites) need to drive a separate server (a
static-export server or an `http-proxy` instance) rather than the
Next.js process. Instead of importing `next-webdriver` directly, those
tests now pass `{ baseUrl: <port|url> }` to `next.browser()`. For the
proxy cases, the proxy was moved into `server.js` inside the fixture and
`http-proxy` declared via the `dependencies` option of `nextTestSetup`,
so the test runs with a fully isolated dependency graph.

5. **CI clean-up.** With `test/integration` gone, the `test
integration*` jobs and `integration-tests-manifest`-related logic in
`.github/workflows/build_and_test.yml` were removed, and `run-tests.js`
no longer has the `integration` test-folder branch.

6. **Validation.** The PR was iterated against multiple full CI runs;
the remaining failures on the latest run are pre-existing flakes
(segment-cache 60s `act` timeouts in turbopack-prod) or transient
infrastructure issues unrelated to the conversion.
2026-05-11 13:55:47 +02:00
Vercel Release Bot bab166a0d2 Upgrade React from f4e0d4ed-20260429 to dd453071-20260506 (#93547)
Co-authored-by: next-js-bot[bot] <279046576+next-js-bot[bot]@users.noreply.github.com>
2026-05-06 18:19:56 +00:00