rsnext/packages/next/compiled
Nate Wienert 97b964a18f
feat(react-dev-overlay): export getErrorByType and add preventDisplay prop (#34237)
Report full parsed runtime errors over error bus, accepts preventDisplay prop to avoid showing error messages inline, while still reporting errors over the bus.

Basically, we want to handle the parsed error/stack differently in Next Live, showing a modal that sits above the content and allows users to report the issue to us. We want to have that stack trace in the issue report, so I added a new event `unhandled-error-full`.

The `preventDisplay` prop then just lets us output our own modal instead of showing the error inline, but still renders the `<RuntimeErrors />` component so it can fetch the stack and report it over the bus.

This isn't *beautiful* code per-se, but I think doing it really right would require a pretty intense re-structure of this module. I think ideally we'd have export a function to fetch of the stack that we can just expose separately - that fetch currently happens in a sub-sub-component (DevOverlay > Errors > RuntimeError). But that re-write is pretty high effort, would still require much of what we do here anyway, and would just to get a slightly less awkward API in a not very high-use area. So leaving it as-is for now, happy to revisit though if we want.

## Feature

- [x] Related issues linked using `fixes #number`

Fixes an issue with Next Live #290.

## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`


Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-02-18 21:09:09 +00:00
..
@babel/runtime Pre-compile more dependencies continued (#32679) 2021-12-21 16:13:45 +01:00
@hapi/accept Pre-compile more dependencies (#32627) 2021-12-20 14:01:35 +01:00
@napi-rs/triples Pre-compile more dependencies continued (#32679) 2021-12-21 16:13:45 +01:00
@next/react-dev-overlay feat(react-dev-overlay): export getErrorByType and add preventDisplay prop (#34237) 2022-02-18 21:09:09 +00:00
@peculiar/webcrypto Update to latest ncc and ensure caniuse-lite data is external (#32064) 2021-12-08 10:41:35 -06:00
@vercel/nft Bump nft to 0.17.5 (#34190) 2022-02-10 17:14:11 +00:00
abort-controller web runtime: add AbortController & AbortSignal (#32089) 2021-12-21 17:12:53 +00:00
acorn Pre-compile more dependencies (#32627) 2021-12-20 14:01:35 +01:00
amphtml-validator Update to latest version of amphtml-validator (#33967) 2022-02-03 20:33:38 -06:00
arg Update to latest ncc and ensure caniuse-lite data is external (#32064) 2021-12-08 10:41:35 -06:00
assert Pre-compile more dependencies (#32627) 2021-12-20 14:01:35 +01:00
async-retry Update to latest ncc and ensure caniuse-lite data is external (#32064) 2021-12-08 10:41:35 -06:00
async-sema Update to latest ncc and ensure caniuse-lite data is external (#32064) 2021-12-08 10:41:35 -06:00
babel Pre-compile more dependencies continued (#32679) 2021-12-21 16:13:45 +01:00
babel-packages Pre-compile more dependencies continued (#32679) 2021-12-21 16:13:45 +01:00
browserify-zlib Pre-compile more dependencies (#32627) 2021-12-20 14:01:35 +01:00
browserslist Ensure browserslist extends works properly (#33890) 2022-02-02 13:23:51 -06:00
buffer Pre-compile more dependencies (#32627) 2021-12-20 14:01:35 +01:00
chalk Fix issue with escape-string-regexp in IE11 (#32708) 2022-01-03 11:41:50 -06:00
ci-info Update to latest ncc and ensure caniuse-lite data is external (#32064) 2021-12-08 10:41:35 -06:00
cli-select Update to latest ncc and ensure caniuse-lite data is external (#32064) 2021-12-08 10:41:35 -06:00
comment-json Update to latest ncc and ensure caniuse-lite data is external (#32064) 2021-12-08 10:41:35 -06:00
compression Update to latest ncc and ensure caniuse-lite data is external (#32064) 2021-12-08 10:41:35 -06:00
conf Update to latest ncc and ensure caniuse-lite data is external (#32064) 2021-12-08 10:41:35 -06:00
constants-browserify Pre-compile more dependencies (#32627) 2021-12-20 14:01:35 +01:00
content-disposition Update to latest ncc and ensure caniuse-lite data is external (#32064) 2021-12-08 10:41:35 -06:00
content-type Update to latest ncc and ensure caniuse-lite data is external (#32064) 2021-12-08 10:41:35 -06:00
cookie Update to latest ncc and ensure caniuse-lite data is external (#32064) 2021-12-08 10:41:35 -06:00
cross-spawn Update to latest ncc and ensure caniuse-lite data is external (#32064) 2021-12-08 10:41:35 -06:00
crypto-browserify Pre-compile more dependencies (#32627) 2021-12-20 14:01:35 +01:00
cssnano-simple Pre-compile more dependencies (#32627) 2021-12-20 14:01:35 +01:00
debug Update to latest ncc and ensure caniuse-lite data is external (#32064) 2021-12-08 10:41:35 -06:00
devalue Update to latest ncc and ensure caniuse-lite data is external (#32064) 2021-12-08 10:41:35 -06:00
domain-browser Pre-compile more dependencies (#32627) 2021-12-20 14:01:35 +01:00
etag Pre-compile more dependencies (#32627) 2021-12-20 14:01:35 +01:00
events Pre-compile more dependencies (#32627) 2021-12-20 14:01:35 +01:00
find-cache-dir Update to latest ncc and ensure caniuse-lite data is external (#32064) 2021-12-08 10:41:35 -06:00
find-up Pre-compile more dependencies (#32627) 2021-12-20 14:01:35 +01:00
formdata-node Update to latest ncc and ensure caniuse-lite data is external (#32064) 2021-12-08 10:41:35 -06:00
fresh Update to latest ncc and ensure caniuse-lite data is external (#32064) 2021-12-08 10:41:35 -06:00
get-orientation Pre-compile more dependencies (#32627) 2021-12-20 14:01:35 +01:00
glob Update to latest ncc and ensure caniuse-lite data is external (#32064) 2021-12-08 10:41:35 -06:00
gzip-size Update to latest ncc and ensure caniuse-lite data is external (#32064) 2021-12-08 10:41:35 -06:00
http-proxy Update to latest ncc and ensure caniuse-lite data is external (#32064) 2021-12-08 10:41:35 -06:00
https-browserify Pre-compile more dependencies (#32627) 2021-12-20 14:01:35 +01:00
icss-utils Update to latest ncc and ensure caniuse-lite data is external (#32064) 2021-12-08 10:41:35 -06:00
ignore-loader Update to latest ncc and ensure caniuse-lite data is external (#32064) 2021-12-08 10:41:35 -06:00
image-size Pre-compile more dependencies (#32627) 2021-12-20 14:01:35 +01:00
is-animated Update to latest ncc and ensure caniuse-lite data is external (#32064) 2021-12-08 10:41:35 -06:00
is-docker Update to latest ncc and ensure caniuse-lite data is external (#32064) 2021-12-08 10:41:35 -06:00
is-wsl Update to latest ncc and ensure caniuse-lite data is external (#32064) 2021-12-08 10:41:35 -06:00
jest-worker Update main field for nccd jest-worker (#33465) 2022-01-19 10:11:14 -06:00
json5 Update to latest ncc and ensure caniuse-lite data is external (#32064) 2021-12-08 10:41:35 -06:00
jsonwebtoken Update to latest ncc and ensure caniuse-lite data is external (#32064) 2021-12-08 10:41:35 -06:00
loader-utils2 Update to latest ncc and ensure caniuse-lite data is external (#32064) 2021-12-08 10:41:35 -06:00
loader-utils3 Update to latest ncc and ensure caniuse-lite data is external (#32064) 2021-12-08 10:41:35 -06:00
lodash.curry Update to latest ncc and ensure caniuse-lite data is external (#32064) 2021-12-08 10:41:35 -06:00
lru-cache Update to latest ncc and ensure caniuse-lite data is external (#32064) 2021-12-08 10:41:35 -06:00
micromatch Update to latest ncc and ensure caniuse-lite data is external (#32064) 2021-12-08 10:41:35 -06:00
mini-css-extract-plugin Update to latest ncc and ensure caniuse-lite data is external (#32064) 2021-12-08 10:41:35 -06:00
nanoid chore(deps): upgrade postcss (#33142) 2022-01-13 16:06:38 +00:00
native-url Update to latest ncc and ensure caniuse-lite data is external (#32064) 2021-12-08 10:41:35 -06:00
neo-async Update to latest ncc and ensure caniuse-lite data is external (#32064) 2021-12-08 10:41:35 -06:00
node-fetch Update other instances of node-fetch (#33617) 2022-01-24 16:18:39 -06:00
node-html-parser Pre-compile more dependencies continued (#32679) 2021-12-21 16:13:45 +01:00
ora Remove un-needed test dependency (#32616) 2022-01-03 10:08:30 -06:00
os-browserify Pre-compile more dependencies (#32627) 2021-12-20 14:01:35 +01:00
p-limit Pre-compile more dependencies (#32627) 2021-12-20 14:01:35 +01:00
path-browserify Pre-compile more dependencies (#32627) 2021-12-20 14:01:35 +01:00
postcss-flexbugs-fixes Update to latest ncc and ensure caniuse-lite data is external (#32064) 2021-12-08 10:41:35 -06:00
postcss-modules-extract-imports Update to latest ncc and ensure caniuse-lite data is external (#32064) 2021-12-08 10:41:35 -06:00
postcss-modules-local-by-default Update to latest ncc and ensure caniuse-lite data is external (#32064) 2021-12-08 10:41:35 -06:00
postcss-modules-scope Update to latest ncc and ensure caniuse-lite data is external (#32064) 2021-12-08 10:41:35 -06:00
postcss-modules-values Update to latest ncc and ensure caniuse-lite data is external (#32064) 2021-12-08 10:41:35 -06:00
postcss-preset-env Pre-compile more dependencies continued (#32679) 2021-12-21 16:13:45 +01:00
postcss-safe-parser chore(deps): upgrade postcss (#33142) 2022-01-13 16:06:38 +00:00
postcss-scss chore(deps): upgrade postcss (#33142) 2022-01-13 16:06:38 +00:00
postcss-value-parser Update to latest ncc and ensure caniuse-lite data is external (#32064) 2021-12-08 10:41:35 -06:00
process Pre-compile more dependencies (#32627) 2021-12-20 14:01:35 +01:00
punycode Ensure setImmediate and punycode are polyfilled (#32768) 2022-01-03 13:31:23 -06:00
querystring-es3 Pre-compile more dependencies (#32627) 2021-12-20 14:01:35 +01:00
raw-body Pre-compile more dependencies (#32627) 2021-12-20 14:01:35 +01:00
react-is Pre-compile more dependencies (#32742) 2022-01-17 15:17:22 +00:00
react-server-dom-webpack Upgrade React alpha and experimental dependencies to latest (#31039) 2021-11-06 12:08:03 +00:00
regenerator-runtime Pre-compile more dependencies continued (#32679) 2021-12-21 16:13:45 +01:00
sass-loader feat: allow node-sass@7 as peer dependency (#34107) 2022-02-11 15:14:09 -06:00
schema-utils2 Update to latest ncc and ensure caniuse-lite data is external (#32064) 2021-12-08 10:41:35 -06:00
schema-utils3 Update to latest ncc and ensure caniuse-lite data is external (#32064) 2021-12-08 10:41:35 -06:00
semver Update to latest ncc and ensure caniuse-lite data is external (#32064) 2021-12-08 10:41:35 -06:00
send Pre-compile more dependencies (#32627) 2021-12-20 14:01:35 +01:00
setimmediate Ensure setImmediate and punycode are polyfilled (#32768) 2022-01-03 13:31:23 -06:00
source-map Update to latest ncc and ensure caniuse-lite data is external (#32064) 2021-12-08 10:41:35 -06:00
stream-browserify Pre-compile more dependencies (#32742) 2022-01-17 15:17:22 +00:00
stream-http Pre-compile more dependencies (#32627) 2021-12-20 14:01:35 +01:00
string-hash Update to latest ncc and ensure caniuse-lite data is external (#32064) 2021-12-08 10:41:35 -06:00
string_decoder Pre-compile more dependencies (#32627) 2021-12-20 14:01:35 +01:00
strip-ansi Update to latest ncc and ensure caniuse-lite data is external (#32064) 2021-12-08 10:41:35 -06:00
terser Update Terser to v5.10.0, fix minification issues (#33045) 2022-02-04 21:33:10 +00:00
text-table Update to latest ncc and ensure caniuse-lite data is external (#32064) 2021-12-08 10:41:35 -06:00
timers-browserify Ensure setImmediate and punycode are polyfilled (#32768) 2022-01-03 13:31:23 -06:00
tty-browserify Pre-compile more dependencies (#32627) 2021-12-20 14:01:35 +01:00
ua-parser-js Update to latest ncc and ensure caniuse-lite data is external (#32064) 2021-12-08 10:41:35 -06:00
unistore Update to latest ncc and ensure caniuse-lite data is external (#32064) 2021-12-08 10:41:35 -06:00
util Pre-compile more dependencies (#32627) 2021-12-20 14:01:35 +01:00
uuid Update to latest ncc and ensure caniuse-lite data is external (#32064) 2021-12-08 10:41:35 -06:00
vm-browserify Pre-compile more dependencies (#32627) 2021-12-20 14:01:35 +01:00
watchpack Bump @vercel/nft to 0.17.2 (#33048) 2022-01-06 00:01:37 +00:00
web-streams-polyfill Update to latest ncc and ensure caniuse-lite data is external (#32064) 2021-12-08 10:41:35 -06:00
web-vitals Update to latest ncc and ensure caniuse-lite data is external (#32064) 2021-12-08 10:41:35 -06:00
webpack update webpack (#34477) 2022-02-17 08:59:56 -06:00
webpack-sources1 Update to latest ncc and ensure caniuse-lite data is external (#32064) 2021-12-08 10:41:35 -06:00
webpack-sources3 update webpack (#33207) 2022-01-12 16:46:59 +00:00
ws Update to latest ncc and ensure caniuse-lite data is external (#32064) 2021-12-08 10:41:35 -06:00