Commit Graph

26 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
Zack Tanner e296bcb812 [tests]: remove unnecessary skipDeployment flags (#92423)
These tests won't ever be run in a deployed environment, so this removes
`skipDeployment` so it's easier to grok which tests are intentionally
disabled because they don't work when deployed.
2026-04-06 14:30:07 -07:00
Sebastian "Sebbie" Silbermann 7d98e0b534 [test] Include error code in Redbox snapshot (#90497) 2026-02-26 11:01:25 +00: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
Sebastian "Sebbie" Silbermann 8ea7d4bb35 [dev-overlay] Move error.name to label (#78198) 2025-04-25 11:00:58 +02:00
Sebastian "Sebbie" Silbermann b9d65b8afe [test] Assert on all errors in Redbox matchers (#77907) 2025-04-10 10:00:42 +02:00
Sebastian "Sebbie" Silbermann 855670e836 [dev-overlay] Remove "Unhandled Runtime Error" label (#77484) 2025-03-25 14:10:35 -07:00
Sebastian "Sebbie" Silbermann 7bac0c49e5 [test] Use new Redbox matchers in app/ dynamic-error-trace (#76783) 2025-03-04 11:01:08 +01: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
Sebastian "Sebbie" Silbermann 848c22977b Stop sourcemapping function names (#74085) 2024-12-19 20:54:35 +01:00
Andrew Clark 0b1eaf1298 Rename variables in LayoutRouter for clarity (#73826)
LayoutRouter has changed significantly since it was originally written
and the structure has become harder to follow. One thing I always find
confusing whenever I'm reading this code is that some of the values
correspond the the *parent* segment, while others correspond to the
*current* segment. So this moves the code around a bit and updates the
names so it's clearer which parts belong to which segments.

While working on this, I noticed a funny thing about how loading
boundaries work that was made more obvious by the revised naming. I've
left a TODO comment to follow up on whether this was intentional.
2024-12-12 10:44:59 -05:00
Jiachi Liu 74b09dd026 Remove ignore for anonymous stack frame (#73610) 2024-12-09 22:36:18 +01:00
Sebastian "Sebbie" Silbermann 81f6cb4b80 Ensure Issue Overlay sourcemaps externals in Turbopack (#73439)
Closes https://linear.app/vercel/issue/NDX-473/
2024-12-04 10:11:19 +01:00
Jiachi Liu 064970e083 feat: stitch errors with react owner stack (#70393) 2024-10-23 19:28:03 +02:00
Vercel Release Bot cad01db9d2 Upgrade React from cd22717c-20241013 to 77b637d6-20241016 (#71391)
Co-authored-by: eps1lon <sebastian.silbermann@vercel.com>
2024-10-17 09:48:02 +00:00
Vercel Release Bot 2f7a48fa4d Upgrade React from 2d16326d-20240930 to 70fb1363-20241010 (#71118)
Co-authored-by: eps1lon <sebastian.silbermann@vercel.com>
2024-10-11 17:03:27 +00:00
Sebastian Silbermann da0c46900c Update React from 6230622a1a-20240610 to 3208e73e-20240730 (#68330)
Co-authored-by: Hendrik Liebau <mail@hendrik-liebau.de>
2024-07-30 22:55:39 +02:00
JJ Kasper c039891908 Revert "Update React from 6230622a1a-20240610 to 76002254-20240724 (#68149)" (#68300)
This seems to be causing an crash on vercel-site for our [one of our
top-level
pages](https://vercel-site-git-update-next-v15-0-0-canary-89.vercel.sh/ai)

Reverts https://github.com/vercel/next.js/pull/68149
2024-07-30 10:19:57 +02:00
Sebastian Silbermann 67a1fb892c Update React from 6230622a1a-20240610 to 76002254-20240724 (#68149) 2024-07-29 07:19:45 +00:00
JJ Kasper 24a811f3c8 Downgrade React from dfd30974ab-20240613 to 6230622a1a-20240610 2024-07-24 10:24:23 +02:00
Sebastian Silbermann 668f8edb0e Update React from 6230622a1a-20240610 to dfd30974ab-20240613 (#66711) 2024-07-23 10:54:10 +02:00
Sebastian Silbermann fe8d953e2d Replace hasRedbox() (#67025)
...with `assertHasRedbox` and `assertNoRedbox`.

`hasRedbox()` has a hardcoded timeout of 5s that is only required for
the negative assertion.
Instead, we now have dedicated assertions for the positive
(`assertHasRedbox`) and negative case (`assertNoRedbox`).
The negative assertion still has the hardcoded timeout.
But the positive assertion just retries until we find the Redbox.

This speeds up tests using the positive assertion.
Removing `hasRedbox` also uncovered some unused expressions e.g. `await
hasRedbox(browser)`.
These expressions probably wanted to use `expect(await
hasRedbox(browser)).toBe(true)
2024-06-20 10:37:32 +02:00
Wyatt Johnson c6320ed87a Replace createNextDescribe with nextTestSetup (#64817)
<!-- 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 #

-->

I took some time and [wrote a
codemod](https://gist.github.com/wyattjoh/0d4464427506cb02062a4729ca906b62)
that replaces the old usage of the `createNextDescribe` with the new
`nextTestSetup`. You'll likely have to turn on hiding of whitespace in
order to review, but this should primarily introduce no changes to the
test structure other than using the new mechanism now.

Closes NEXT-3178
2024-04-25 12:06:12 -06:00
Jiachi Liu 8d28d5954e test: rename node_modules_bak to node_modules (#62066)
We switched to `pnpm` for testing instead of `yarn` for e2e tests
containing customized node_modules packages, it works with
`node_modules` folder before. Rename the existing `node_modules_bak`
hack to make it easy to test with.

Previously we use `yarn` but it will clean `node_modules` folder so we
have to use another script to copy packages, it's not a required thing
now so we can test package from node_modules directly without renaming
folders locally

Closes NEXT-2496
2024-02-15 00:42:35 +01:00
Jiachi Liu 18322d2d77 test: add test for logging trace of dynamic = error (#61811)
Add test that we can log the error trace when we found invalid dynamic
usage when `dynamic = "error"`


![image](https://github.com/vercel/next.js/assets/4800338/e6710019-ab94-42e8-81b2-6362f828cf35)


Closes NEXT-2402
Closes NEXT-2383
2024-02-08 16:53:43 +01:00