Commit Graph

85 Commits

Author SHA1 Message Date
Jiwon Choi d7aa66c345 Remove generated error codes (#97687)
### Why?

Should come up with better solution that does not block PRs with git
conflict

x-ref:
https://vercel.slack.com/archives/C02CDC2ALJH/p1785263902728189?thread_ts=1785263687.502649&cid=C02CDC2ALJH

### How?

- Delete `errors.json`, the error-code SWC plugin, generated WASM, merge
driver, and validation/build tooling.
- Stop attaching error codes to server-rendering digests, redboxes, and
telemetry; native `Error.code` and `Error.name` remain available where
applicable.
- Remove the development-overlay error feedback UI, middleware, and
telemetry event that depended on stable codes.
- Update fixtures, snapshots, and guidance for code-free errors and
numeric-only digests.

<!-- NEXT_JS_LLM -->
2026-08-21 22:45:12 +02:00
Will Binns-Smith 8b7b6fea86 Turbopack tests: remove assertions that duplicate webpack results (#95688)
We forked test assertions in places in the early days of merging
Turbopack. Now that we more closely align, a bunch of these had the
exact same assertions. Fold them into one.
2026-07-10 12:11:26 -07:00
Benjamin Woodruff c06894aea9 Turbopack: Fix log box test on react 18 (#95078) 2026-06-23 05:38:20 +00:00
Sam Poder e169a26fdf [turbopack] Sort modules in files by path not ID (#95065)
Sorting-by-ID was flagged as bad for g-zipping:

> This sorts by chunk item id.
> Tobias has been saying that this is bad, because it gzips worse
> We should be sort by path, so that similar modules stay together. E.g.
if you have many similar icon modules
> Sorting by chunk item results in random order

Switched to sorting by path!
2026-06-22 15:34:18 -07:00
Niklas Mischkulnig 9b8a7a1055 Turbopack: improve issue printing colors (#94858)
1. Align the code highlight marker color with the issue severity
2. Make the issue title colored
3. Prefix issues with `Warning` or `Error`


<img width="1383" height="862" alt="Bildschirmfoto 2026-06-16 um 18 59
03"
src="https://github.com/user-attachments/assets/f98c606d-4ea8-40c2-836d-e395f1df904c"
/>


<img width="1039" height="450" alt="Bildschirmfoto 2026-06-16 um 19 03
39"
src="https://github.com/user-attachments/assets/2747f914-0587-4178-a87d-344f24715c96"
/>



<details>
<summary>Old</summary>

<img width="1267" height="745" alt="Bildschirmfoto 2026-06-16 um 17 04
35"
src="https://github.com/user-attachments/assets/837739ff-82f7-4ea2-8767-ca7d866a8570"
/>

</details>
2026-06-16 21:29:37 +02:00
Cong-Cong Pan eacb749030 chore: upgrade next-rspack to rspack 2.0 (#92222)
## Summary
- upgrade `@rspack/core` to `2.0.0-rc.0`
- sync the in-tree next rspack Rust binding/toolchain with newer rspack
releases
- align Next server runtime selection so `NEXT_RSPACK` uses the
turbo-like app runtime path
- include missing compiled `@next/react-refresh-utils` output in
`ncc-compiled`

## What is done
- `@next/rspack` Rust binding builds locally
- `packages/next` builds locally
- rspack-related tests are running and have been reduced to deeper
runtime compatibility failures

## Rspack test investigation
Latest checked CI run: `build-and-test` run `27129243230` at head
`484e7bf1b30655a9f94d0855b9e00774b4b38cd0`.

Confirmed Rspack / webpack parity gaps:
-
`test/e2e/edge-runtime-configurable-guards/edge-runtime-configurable-guards.test.ts`:
Rspack does not expose the webpack parser hooks used by
`MiddlewarePlugin`. The current Rspack path falls back to SWC analysis
in `finishModules`, which can report diagnostics but cannot apply the
parser-time transforms that wrap `eval` / `new Function`, track
`InnerGraph` usage for used vs unused dynamic code, or apply
`unstable_allowDynamic` with webpack parity. Dev therefore misses the
expected dynamic-code runtime warnings and also reports false
`process.cwd` Edge warnings from Next internals; prod fails
allowed/unused dynamic-code cases.
-
`test/development/middleware-overrides-node.js-api/middleware-overrides-node.js-api.test.ts`:
same parser-hook limitation. Webpack can observe that `process.cwd` is
overwritten before use, while the Rspack SWC fallback statically flags
`process.cwd` as an unsupported Edge Node API.
- `test/production/css-features/css-compilation.test.ts`: the CSS is
minified and prefixed as expected, but the Rspack lightningcss path
currently does not expose/control source map generation the way this
test expects, so emitted CSS has no `sourceMappingURL` comment or `.map`
file to assert.
- `test/e2e/app-dir/server-source-maps/server-source-maps.test.ts`:
invalid source maps are not handled with the same graceful diagnostic as
webpack/Node source-map handling. Rspack logs the raw `webpack-internal`
frame for the damaged map case instead of surfacing the expected
`Invalid source map. Only conformant source maps...` message with the
cause.
-
`test/e2e/app-dir/parallel-routes-revalidation/parallel-routes-revalidation.test.ts`:
raw CI output observed a dev-mode timeout waiting for `networkidle`
after refresh/back/forward lazy fetching. This was not the final
structured failure in the latest run, but it remains a Rspack dev parity
follow-up around router cache lazy fetches and network settling.
- `test/e2e/middleware-src/middleware-src.test.ts`: after the test adds
root middleware files, Rspack dev still lets `src/middleware`
participate; the expected behavior is that only the root middleware
runs.
- `test/e2e/env-config/env-config.test.ts`: changing `.env` logs `Reload
env:` but the client keeps the previous `NEXT_PUBLIC_` value, pointing
at an Rspack dev env invalidation/HMR gap.
-
`test/e2e/app-dir/use-cache-without-experimental-flag/use-cache-without-experimental-flag.test.ts`:
after enabling the `useCache` flag, the dev server does not finish
restarting, pointing at build-error recovery/restart parity.
-
`test/development/app-dir/server-navigation-error/server-navigation-error.test.ts`:
middleware navigation-error cases hit `ERR_CONNECTION_REFUSED`,
consistent with the Rspack dev server exiting or restarting unexpectedly
during those error flows.
- `test/e2e/opentelemetry/instrumentation/opentelemetry.test.ts`: the
custom-server dev process exits before the SDK handle is initialized,
then cleanup fails on `shutdown`; this needs follow-up in Rspack
dev/custom-server startup.
- `test/e2e/next-image-new/app-dir/app-dir.test.ts`: after toggling
image source, `onLoadingComplete` still reports the previous image
dimensions/source, pointing at an Rspack dev image/HMR or asset
invalidation parity issue.
- `test/e2e/node-cli-args/node-cli-args.test.ts`: on Node `20.19.x`,
`node --experimental-network-inspection` resolves instead of rejecting.
This looks like a Node-version behavior change rather than an Rspack
compiler issue.

Not attributed to this Rspack upgrade:
-
`test/e2e/app-dir/instant-navigation-testing-api/instant-navigation-testing-api.test.ts`
was marked by `scripts/pr-status.js` as a known flaky test across
branches.
-
`test/production/app-dir/build-output-prerender/build-output-prerender.test.ts`
ran in the webpack prod job and only differs by prerender error ordering
in the inline snapshot.


<!-- NEXT_JS_LLM_PR -->

---------

Co-authored-by: Benjamin Woodruff <benjamin.woodruff@vercel.com>
2026-06-15 23:19:53 +00:00
Tim Neutkens 4588a73542 Convert tests using createNext -> nextTestSetup (#93767)
## What?

Converts existing `createNext()` usage into `nextTestSetup()`. 

`createNext()` was the setup step we had before `nextTestSetup()` was
added.

This PR focused on the simple conversion cases. There will be a
follow-up to complete the last few.

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-12 13:16:31 +02:00
Maxime COLIN 4945b6e295 chore: bump postcss to 8.5.10 (#93288) 2026-04-29 15:16:45 +02:00
Hendrik Liebau d2e6b6c0e4 Preserve __NEXT_ERROR_CODE across the /_error page handoff (#93183)
When SSR fails in development — whether the failing page is in the App Router or the Pages Router — Next.js falls back to rendering the Pages Router `/_error` page and serializes the original error into `__NEXT_DATA__.err`. The client bootstrap in `packages/next/src/client/ index.tsx` later re-throws a fresh `new Error(initialErr.message)` so that the dev overlay picks it up. The error-code SWC plugin stamps that new `Error` with the generic code mapped to `%s` in `errors.json` because the message argument is an identifier, not a statically-known string, which is how the overlay ended up showing the wrong code for errors like `UseCacheTimeoutError`.

The pipeline has two problems on the way to the overlay. First, `errorToJSON` in `packages/next/src/server/render.tsx` only copies the error's standard fields (`name`, `source`, `message`, `stack`, `digest`) into `__NEXT_DATA__.err`, so the real `__NEXT_ERROR_CODE` attached to the thrown error never reaches the client. Second, the subsequent rewrap in `getServerError` at `packages/next/src/server/dev/node-stack- frames.ts` creates yet another `new Error(...)` that the plugin stamps with the same generic code, clobbering anything the caller might have set on the rewrapped instance.

This change plumbs the code through. `errorToJSON` now also emits `__NEXT_ERROR_CODE` using `extractNextErrorCode` so the value survives JSON serialization into `__NEXT_DATA__.err`; the type in `packages/next/src/shared/lib/utils.ts` is updated to match. Both rewrap sites — the client bootstrap and `getServerError` — copy the code from the source error onto the fresh `Error` via `Object.defineProperty` with `enumerable: false` and `configurable: true`, matching how the plugin itself stores the property, which overrides the generic code the plugin stamped on the rewrapped instance. The `use-cache-hanging` e2e test snapshot is updated from `E394` to `E236` now that the real code surfaces in the dev overlay.
2026-04-27 18:53:19 +02:00
Tobias Koppers 1287f9a027 Turbopack: show specific SWC error messages as error titles (#91022)
### What?

Changes Turbopack's error overlay to show specific SWC diagnostic
messages as the error title instead of generic messages like "Parsing
ecmascript source code failed" or "Ecmascript file had an error".

### Why?

Previously, all SWC parse/analysis errors in Turbopack showed a generic
title (e.g. "Parsing ecmascript source code failed") in the redbox
header, with the actual specific error message buried in the description
below the code frame. This made it harder for developers to quickly
understand what went wrong.

**Before:**
```
Parsing ecmascript source code failed
> 1 | export default () => <div/
    |                           ^
Expected '>', got '<eof>'
```

**After:**
```
Expected '>', got '<eof>'
> 1 | export default () => <div/
    |                           ^
Parsing ecmascript source code failed
```

### How?

**Core change** in
`turbopack/crates/turbopack-swc-utils/src/emitter.rs`:

When the `IssueEmitter` has a `self.title` set (the generic title like
"Parsing ecmascript source code failed"), the SWC diagnostic message is
now used as the issue title, and the generic title is demoted to the
description. When `self.title` is not set, the existing behavior is
preserved (first line of message becomes title, rest becomes
description).

**Test updates** across ~15 test files:

Updated all `isTurbopack` branches in test expectations to reflect the
swapped title/description. Only Turbopack-specific branches were
modified; webpack and rspack expectations are unchanged.

**New test suite** (`test/development/app-dir/ecmascript-error-title/`):

Dedicated tests verifying that both syntax errors (e.g. `Expected '>',
got '<eof>'`) and analysis errors (e.g. `the name 'Table' is defined
multiple times`) show the specific SWC message as the redbox title.

**Turbopack snapshot updates:**

4 snapshot files renamed to reflect new titles (e.g. `Parsing ecmascript
source code failed-*.txt` → `Expression expected-*.txt`).

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-03-09 08:00:37 +01:00
Sebastian "Sebbie" Silbermann cdba5ef07a Missing React 18 error codes (#90593)
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-02-26 15:09:59 +00:00
Sebastian "Sebbie" Silbermann 7d98e0b534 [test] Include error code in Redbox snapshot (#90497) 2026-02-26 11:01:25 +00:00
Sebastian "Sebbie" Silbermann 5c24c44440 [test] Remove getStackFramesContent (#90571) 2026-02-26 10:39:51 +01:00
Jiachi Liu 8cfdcacf37 Log browser error and warnings in terminal (#88352) 2026-01-16 15:10:24 +01:00
Cong-Cong Pan affb52dafc chore: update rspack 1.6.5 (#86853)
update @next/rspack-core version to 1.0.2 and update the snapshot

other changes:

- packages/next/src/build/webpack-config.ts
Adjusted configuration to account for differences in default node config
between Rspack and Webpack.

- packages/next/src/shared/lib/format-webpack-messages.ts
Added a fallback to moduleIdentifier in cases where Rspack does not
correctly populate moduleName.
2025-12-17 05:07:52 +00:00
Cong-Cong Pan ed41ac1a74 chore: upgrade rspack 1.6.0 (#84210)
1. Fixed the incremental update bug in buildChunkGraph.
2. Fixed a bug in Rspack's built-in CssChunkingPlugin.

For detailed release information, please see
https://github.com/web-infra-dev/rspack/releases.

Note: All the faulty Rspack test cases on GitHub, from what I can see,
either time out or also produce errors in Rspack version 1.5.0.

---------

Co-authored-by: Benjamin Woodruff <benjamin.woodruff@vercel.com>
2025-11-06 01:29:04 +00:00
Sebastian "Sebbie" Silbermann 0b58a32c45 [test] assert* -> waitFor* when the util is not instant (#85450) 2025-10-30 14:44:08 +01:00
Tobias Koppers 3567c153b3 Turbopack: improve module evaluation name (#84633)
### What?

We can use the demangled name directly, which is much easier and applies to more cases.
2025-10-20 14:03:50 -07:00
Benjamin Woodruff c1967707ab Turbopack: Use more robust logic for absolute and percent-encoded URLs in source maps received from loaders (#84255)
Co-authored-by: Sebastian Sebbie Silbermann <sebastian.silbermann@vercel.com>
2025-09-29 21:17:18 +00:00
Cong-Cong Pan 5712c05c55 fix(Rspack): resolve HMR unresponsiveness or unexpected full reload & update dev snapshot (#83480)
This commit addresses the bugs where Hot Module Replacement (HMR) was
not functioning correctly in Rspack mode. Component edits would often
result in no update or a full page reload instead of a fast,
state-preserving refresh.

This commit implements a new, custom React Refresh plugin and runtime
specifically for Rspack, which correctly orchestrates the HMR lifecycle.
2025-09-16 01:26:36 +00:00
Hendrik Liebau b1e2dc2ad5 [test] Update snapshots for Rspack + React 18 (#83712)
After fixing the workflow config for Rspack in #83677, we're now running
more Rspack tests with React 18 on the `canary` branch. A few snapshot
tests now need to be updated because of that. The special cases are the
same as what we already had for Turbopack + React 18.
2025-09-12 08:58:03 +00:00
Niklas Mischkulnig 4a2b2e61c5 Bump swc to v36 (#82886)
<!-- 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 #

-->
2025-08-21 23:41:16 +02:00
Niklas Mischkulnig 5bbd5ddf82 Turbopack: improve Lightning CSS error handling (#82561)
Don't return the `Result:Err`, but turn into an issue and return `Unparseable`

Also fixes the location translation: Lightning CSS uses 1-based columns, while Turbopack uses 0-based column indices.
2025-08-12 13:12:17 +02:00
Tobias Koppers 825753a284 Turbopack: name the module factory function (#73553)
### What?

In development give the module factory a useful name, so it's clear in stack traces that this is the module evaluation part of the execution.

This also fixes some bugs with the stack trace parser, which seems to struggle if function names contain brackets. The automatically inferred function name would be the module id, which contains brackets.
2025-08-02 10:15:24 -07:00
Sebastian "Sebbie" Silbermann 4618e3d902 Hide <anonymous> stackframes if sandwiched between two ignore-listed frames (#81067) 2025-07-14 11:41:04 +02:00
Sebastian "Sebbie" Silbermann 8d78992557 [sourcemaps] Ignore-list sources whose sourcemaps ignore-list everything (#81231)
webpack-only at the moment since I have no easy stack to test this on in Turbopack until we sourcemap the Turbopack runtime.

This applies the same heuristic Chrome uses. For sources whose associated sourcemap ignores everyone of its sources, we ignore-list that source even if we didn't find a mapping. This is similar to other common heuristic where the closest mapping is used when no exact mapping exists.
2025-07-04 21:23:50 +02:00
Sebastian "Sebbie" Silbermann c12c9c1f78 [test] Keep Playwright stackframes out of tests (#81240) 2025-07-04 10:24:02 +02:00
Sebastian "Sebbie" Silbermann 7ed2d23ae5 [devtools] Omit line/col numbers for anonymous sources (#81223) 2025-07-03 15:23:27 +02:00
Luke Sandberg 8ba3a99a10 [turbopack] Add user friendly names to trace labels (#80388)
# Enhance Layer Names with User-Friendly Descriptions

This PR improves the developer experience by enhancing layer names in Turbopack with user-friendly descriptions. Instead of just using internal identifiers like "app-client" or "app-rsc", the PR adds descriptive names like "Client Component Browser" or "Server Component" that better communicate the purpose of each layer to developers.

Key changes:
- Created a new `LayerName` struct that contains both the internal name and an optional user-friendly description
- Updated all layer references throughout the codebase to use this new structure
- Changed error message text from "Example import trace(s)" to "Import trace(s)" for more simplicty

These changes make error messages and debugging information more intuitive, helping developers better understand which part of the application is experiencing issues.
2025-06-26 00:10:04 -07:00
Donny/강동윤 7e310f8d2a fix(turbopack): Improve error message for PURE selector error (#80068)
### What?

Use CSS string for CSS errors instead of Rust debug representation, and remove `lightningcss` text from the error message.

### Why?

We don't need them.
2025-06-12 22:44:36 +00:00
Luke Sandberg 19e8e3c3c2 Revert "Revert "[turbopack] Compute Import Traces for Issues"" (#80220)
Reverts vercel/next.js#80215 which was a revert of vercel/next.js#79351

Closes PACK-4105
2025-06-07 15:28:07 -07:00
Luke Sandberg 0d2e80554a Revert "[turbopack] Compute Import Traces for Issues" (#80215)
Reverts vercel/next.js#79351

See https://github.com/vercel/next.js/actions/runs/15474422003/job/43570614813#step:34:1556
2025-06-05 13:44:39 -07:00
Luke Sandberg 7a66008cae [turbopack] Compute Import Traces for Issues (#79351)
When turbopack reports an issue, compute a set of import-traces for that file so the user can better understand the context of the issue and trivially answer questions like:

* Why is this file included at all?
* Why does next think this is a client-component?

To do this we leverage the `SingleModuleGraph` and use the `astar` algorithm from `petgraph` to compute the shortest path to a root module.  This isn't the most optimal approach but should be sufficient since we don't anticipate this being a performance issue.

A complex part of this is that the module-graph tracks the relationships between _modules_ but Issues are associated with _files_.  While modules are also associated with files this is a many-to-one relationship.  This is why we might report _multiple_ traces for a single issue and also why a single file might appear multiple times in a trace.

## Open formatting questions

* how should we represent paths from other 'filesystems'?
    - for disk filesystems i could compute relative paths to the root of the current directory? the `[project]` filesystem?  For now i just use the filesystem name as a hypothetically cromulent root.


## Alternatives

The main alternative investigated was associating  Issues with `Modules` by collecting them during graph construction. This unfortunately proved to be a non-trivial performance regression and so it was abandoned.  The core problem is that we would need to introduce additional `OperationVc` and task roots to simply `collect` the issues.  This also wouldn't eliminate the duplicate traces issue, and instead we might end up reporting duplicate issues instead.

## Performance
TODO

Closes PACK-4105
2025-06-05 11:21:11 -07:00
Zack Tanner a74a58721a fix React 18 test failures (#80119)
Fixes failing assertions related to the forked React 18 tests.

[x-ref](https://github.com/vercel/next.js/actions/runs/15417191195/job/43385564776#step:34:533)
2025-06-03 16:00:18 -07:00
Sebastian "Sebbie" Silbermann 8ea7d4bb35 [dev-overlay] Move error.name to label (#78198) 2025-04-25 11:00:58 +02:00
Sebastian "Sebbie" Silbermann c334056eeb [dev-overlay] Add dedicated label for recoverable errors (#78186) 2025-04-16 09:49:35 +02:00
Sebastian "Sebbie" Silbermann b9d65b8afe [test] Assert on all errors in Redbox matchers (#77907) 2025-04-10 10:00:42 +02:00
Tim Neutkens 6e51845ac4 Rename process.env.TURBOPACK to process.env.IS_TURBOPACK_TEST for tests (#77892)
Preparation for removing `process.env.TURBOPACK` being added to
Turbopack tests. That way we can properly test `next start` without
`process.env.TURBOPACK` being set.

<!-- 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 #

-->
2025-04-07 14:07:55 +02:00
Jiachi Liu 324a854f24 Revert "[dev-overlay] Fix error dialog resizing logic" (#77849)
Reverts vercel/next.js#77830

This was breaking the react 18.3 tests, where the toggling stack frames
is not working in 18.3. Possibly broken by the ref related changes.

x-ref:
https://github.com/vercel/next.js/actions/runs/14274082641/job/40015934515
2025-04-04 16:44:32 -07:00
Jiachi Liu 65c3c8450b [test] temporarily disable flaky test for react 18 (#77848)
temporarily disable the react 18 tests for toggling the frames, it's not
a quick fix so I'll follow up in another PR.
2025-04-04 15:32:12 -07:00
Sebastian "Sebbie" Silbermann 2601eb716d [test] Update stale snapshots (#77680) 2025-04-01 15:07:40 +02:00
Tobias Koppers 5ad7b1f86c Turbopack: fix side effects optimization bug (#77640)
### What?

the local fragment need to reference evaluation references

So if importing local exports of a module that is flagged as side effect free it potentially need to run the side effects of imports (if they are not flagged as side effect free).
2025-04-01 10:41:03 +02:00
Sebastian "Sebbie" Silbermann 855670e836 [dev-overlay] Remove "Unhandled Runtime Error" label (#77484) 2025-03-25 14:10:35 -07:00
Jiachi Liu bbf542631c [test] consolidate hmr test for react 18.3 (#76975)
Update flaky 18.3 test

x-ref:
https://github.com/vercel/next.js/actions/runs/13770136279/job/38509693811
2025-03-11 12:39:18 +01:00
Sebastian "Sebbie" Silbermann 059c255c37 [dev-overlay] Always show relative paths (#76742) 2025-03-04 09:32:17 +00:00
Sebastian "Sebbie" Silbermann 58d328a0cf [test] Use new Redbox matchers in pages/ ReactRefreshLogBox (#76391) 2025-02-23 15:07:41 +01:00
Sebastian "Sebbie" Silbermann c5a09d6637 Add toDisplayRedbox and toDisplayCollapsedRedbox snapshot matcher (#73621) 2025-02-19 00:49:29 +01:00
Zack Tanner 1c85b755b5 [DevOverlay]: enable by default (#75882)
- `newDevOverlay: true` by default (enables experimental React builds on
canary until owner stacks progress further)
- `run-tests` now sets the env var for tests that were relying on it for
forking behavior
- PPR runners now run with the flag disabled to help catch regressions
in the old overlay until we remove it
- Fixed a number of tests that had outdated snapshots or missed forking
behavior because they weren't running in CI
- Disabled a test that was failing in Turbopack + Experimental React
that is unrelated to the overlay (see:
https://github.com/vercel/next.js/pull/75989)

---------

Co-authored-by: devjiwonchoi <devjiwonchoi@gmail.com>
2025-02-13 10:57:32 -08:00
Jude Gao 2aa2eaadc3 dev error overlay: async boundary for original stack frame call (#75718) 2025-02-10 14:47:45 -05:00
Jiwon Choi baa4f787d2 [DevOverlay] Align old and new overlay (#74935)
Enable the new UI for the CI testings of existing redbox tests.

There are several changes made to let the test pass, including
backporting changes to the old UI or removing one from the new, and are
as follows:

- Added back `|` after line number in code frame
([link](https://github.com/vercel/next.js/pull/74935#discussion_r1925725941))
- Removed unnecessary `@` in Terminal component
([link](https://github.com/vercel/next.js/pull/74935#discussion_r1925727156))
- Set open overlay default value to `true` in Pages Router
([link](https://github.com/vercel/next.js/pull/74935#discussion_r1925728104))
- Backport displaying the first first-party call stack frame to the
CallStack component
([link](https://github.com/vercel/next.js/pull/74935#discussion_r1925731313))
- Move the devTools component back to the error boundary
([link](https://github.com/vercel/next.js/pull/74935#discussion_r1925732706))
- Was moved out at
https://github.com/vercel/next.js/pull/74999#discussion_r1922998021

Closes NDX-674
Closes NDX-687
2025-01-24 06:53:32 +09:00