Commit Graph

14 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
Sebastian "Sebbie" Silbermann 5f25885874 [devtools] Show AggregateError.errors in the error overlay (#91835) 2026-03-27 07:21:19 -07:00
Sebastian "Sebbie" Silbermann d1d2912ec3 [devtools] Add support for error causes in the dev overlay (#90108) 2026-02-17 23:33:11 +00:00
Sebastian "Sebbie" Silbermann 0b58a32c45 [test] assert* -> waitFor* when the util is not instant (#85450) 2025-10-30 14:44:08 +01:00
Sebastian "Sebbie" Silbermann 53e104259d Revert "Fix flakey overlay feedback test" (#84819) 2025-10-13 17:19:48 +02:00
Sebastian "Sebbie" Silbermann ad90a67439 [test] Assert on stable error codes (#84671)
Fixes
```
DevErrorOverlay › sends feedback when clicking not helpful button

    expect(received).toEqual(expected) // deep equality

    - Expected  - 1
    + Received  + 1

      Array [
    -   "/__nextjs_error_feedback?errorCode=E794&wasHelpful=false",
    +   "/__nextjs_error_feedback?errorCode=E209&wasHelpful=false",
      ]
```

--
https://github.com/vercel/next.js/actions/runs/18360913450/job/52306369449#step:34:793
2025-10-09 00:20:13 -07:00
JJ Kasper 5bb25f9bf4 Fix flakey overlay feedback test (#84662)
x-ref:
https://github.com/vercel/next.js/actions/runs/18360376124/job/52302677520?pr=84500
2025-10-08 16:31:17 -07:00
Jiwon Choi 1dda5b668b [Breaking] Remove deprecated sync access to Dynamic APIs (#84179)
This PR removes the deprecated sync access to Dynamic APIs.

- Removed UnsafeUnwrapped* types.
- Replaced `as unknown as UnsafeUnwrapped ` type casts to `as any` for
dev warning.
- Removed tests that expected sync access to not error.
- Removed `UntrackedExotic` functions.
- Modified tests that were accidentally doing sync access.
- Updated warnings to emphasize that it is a Promise and must be
awaited.
- Removed paragraph that states access is allowed from
`errors/sync-dynamic-apis.mdx`.

---------

Co-authored-by: Josh Story <story@hey.com>
2025-09-27 22:44:45 +02:00
Jiachi Liu e578335fbf [devtool] fix overlay styles are missing (#83721) 2025-09-12 15:46:08 +02:00
Sebastian "Sebbie" Silbermann 933463cb78 [test] Move error-overlay-layout to e2e tests (#83372) 2025-09-03 17:43:37 +02:00
Hendrik Liebau 4b66771895 Remove deprecated legacyBehavior and passHref prop from Link component (#83003)
The `legacyBehavior` prop of the `Link` component has been deprecated
since #77473. For Next.js 16, we're finally removing support for it.
Consequently, we're also removing support for the `passHref` prop, which
was only useful in conjunction with the `legacyBehavior` prop.

A [codemod is
available](https://nextjs.org/docs/app/guides/upgrading/codemods#new-link)
to help you automatically upgrade your codebase.

reverts #77473

---------

Co-authored-by: Sebastian Sebbie Silbermann <sebastian.silbermann@vercel.com>
2025-08-26 14:04:27 +02:00
Jude Gao ef42b84e34 [dev-overlay] use absolute font src url (#76229)
Fix font loading from a non-root URL:

Repro:
```
pnpm next dev test/development/app-dir/owner-stack/
```
and Visit http://localhost:3000/browser/uncaught

Shows
```
GET /browser/__nextjs_font/geist-latin.woff2 404 in 330ms
```
2025-02-19 17:42:57 -05:00
Jude Gao 483a6b0cc6 Exclude .test. files from using error code plugin (#73868)
I forgot to exclude `.test.` files from the next error code plugin. This
caused a bunch of errors codes from test files to pollute `errors.json`.
I added a filter to exclude the test files and then reset `errors.json`.
2024-12-12 19:08:08 -05:00
Jude Gao 306d4bda68 feat: error code (#73332)
This update introduces a custom `swc-plugin` for Next.js that appends a
non-enumerable `__NEXT_ERROR_CODE` property to all `Error` instances,
enabling anonymous telemetry while keeping error codes hidden from
console logs. The plugin manages error codes through an append-only
`/packages/next/errors.json` file, which is automatically updated during
the `pnpm build` process using a two-pass system to ensure consistent
error mapping, even during concurrent builds.
2024-12-11 11:30:28 -05:00