mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
### What Polish the UX based on the feedbacks from @sambecker * Fix the font that still use mono * Align the color, to use red for the warnings * Give the title to build error * Only highlight the nextjs doc url as link ### After vs Before #### Runtime Error <img width="335" alt="image" src="https://github.com/vercel/next.js/assets/4800338/64f2f692-1eae-41db-9287-046aff9ba112"> <img width="335" alt="image" src="https://github.com/vercel/next.js/assets/4800338/2d4bad15-745e-4083-ba57-8968c0f321c2"> #### Build Error <img width="335" alt="image" src="https://github.com/vercel/next.js/assets/4800338/ecfc3883-4522-40c6-b042-6d85e7ea970e"> <img width="335" alt="image" src="https://github.com/vercel/next.js/assets/4800338/bbf37ec5-b639-4b95-a87f-9911182e431c"> Closes NEXT-2958
132 lines
4.6 KiB
Plaintext
132 lines
4.6 KiB
Plaintext
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
exports[`ReactRefreshLogBox default boundaries 1`] = `
|
|
"FunctionDefault.js (1:51) @ FunctionDefault
|
|
|
|
> 1 | export default function FunctionDefault() { throw new Error('no'); }
|
|
| ^"
|
|
`;
|
|
|
|
exports[`ReactRefreshLogBox default conversion to class component (1) 1`] = `
|
|
"Child.js (4:11) @ ClickCount.render
|
|
|
|
2 | export default class ClickCount extends Component {
|
|
3 | render() {
|
|
> 4 | throw new Error()
|
|
| ^
|
|
5 | }
|
|
6 | }"
|
|
`;
|
|
|
|
exports[`ReactRefreshLogBox default css syntax errors 1`] = `
|
|
"./index.module.css:1:1
|
|
Syntax error: Selector "button" is not pure (pure selectors must contain at least one local class or id)
|
|
|
|
> 1 | button {}
|
|
| ^"
|
|
`;
|
|
|
|
exports[`ReactRefreshLogBox default logbox: anchors links in error messages 1`] = `"Error: end https://nextjs.org"`;
|
|
|
|
exports[`ReactRefreshLogBox default logbox: anchors links in error messages 2`] = `"https://nextjs.org/"`;
|
|
|
|
exports[`ReactRefreshLogBox default logbox: anchors links in error messages 3`] = `"Error: https://nextjs.org start"`;
|
|
|
|
exports[`ReactRefreshLogBox default logbox: anchors links in error messages 4`] = `"https://nextjs.org/"`;
|
|
|
|
exports[`ReactRefreshLogBox default logbox: anchors links in error messages 5`] = `"Error: middle https://nextjs.org end"`;
|
|
|
|
exports[`ReactRefreshLogBox default logbox: anchors links in error messages 6`] = `"https://nextjs.org/"`;
|
|
|
|
exports[`ReactRefreshLogBox default logbox: anchors links in error messages 8`] = `"https://nextjs.org/"`;
|
|
|
|
exports[`ReactRefreshLogBox default logbox: anchors links in error messages 10`] = `"https://nextjs.org/"`;
|
|
|
|
exports[`ReactRefreshLogBox default module init error not shown 1`] = `
|
|
"index.js (3:7) @ eval
|
|
|
|
1 | // top offset for snapshot
|
|
2 | import * as React from 'react';
|
|
> 3 | throw new Error('no')
|
|
| ^
|
|
4 | class ClassDefault extends React.Component {
|
|
5 | render() {
|
|
6 | return <h1>Default Export</h1>;"
|
|
`;
|
|
|
|
exports[`ReactRefreshLogBox default should strip whitespace correctly with newline 1`] = `
|
|
"index.js (8:27) @ onClick
|
|
|
|
6 |
|
|
7 | <a onClick={() => {
|
|
> 8 | throw new Error('idk')
|
|
| ^
|
|
9 | }}>
|
|
10 | click me
|
|
11 | </a>"
|
|
`;
|
|
|
|
exports[`ReactRefreshLogBox turbo boundaries 1`] = `
|
|
"FunctionDefault.js (1:51) @ FunctionDefault
|
|
|
|
> 1 | export default function FunctionDefault() { throw new Error('no'); }
|
|
| ^"
|
|
`;
|
|
|
|
exports[`ReactRefreshLogBox turbo conversion to class component (1) 1`] = `
|
|
"Child.js (4:11) @ ClickCount.render
|
|
|
|
2 | export default class ClickCount extends Component {
|
|
3 | render() {
|
|
> 4 | throw new Error()
|
|
| ^
|
|
5 | }
|
|
6 | }"
|
|
`;
|
|
|
|
exports[`ReactRefreshLogBox turbo css syntax errors 1`] = `
|
|
"./index.module.css
|
|
Parsing css source code failed
|
|
Selector is not pure (pure selectors must contain at least one local class or id), (lightningcss, Selector(button, specificity = 0x1))"
|
|
`;
|
|
|
|
exports[`ReactRefreshLogBox turbo logbox: anchors links in error messages 1`] = `"Error: end https://nextjs.org"`;
|
|
|
|
exports[`ReactRefreshLogBox turbo logbox: anchors links in error messages 2`] = `"https://nextjs.org/"`;
|
|
|
|
exports[`ReactRefreshLogBox turbo logbox: anchors links in error messages 3`] = `"Error: https://nextjs.org start"`;
|
|
|
|
exports[`ReactRefreshLogBox turbo logbox: anchors links in error messages 4`] = `"https://nextjs.org/"`;
|
|
|
|
exports[`ReactRefreshLogBox turbo logbox: anchors links in error messages 5`] = `"Error: middle https://nextjs.org end"`;
|
|
|
|
exports[`ReactRefreshLogBox turbo logbox: anchors links in error messages 6`] = `"https://nextjs.org/"`;
|
|
|
|
exports[`ReactRefreshLogBox turbo logbox: anchors links in error messages 8`] = `"https://nextjs.org/"`;
|
|
|
|
exports[`ReactRefreshLogBox turbo logbox: anchors links in error messages 10`] = `"https://nextjs.org/"`;
|
|
|
|
exports[`ReactRefreshLogBox turbo module init error not shown 1`] = `
|
|
"index.js (3:7) @ <unknown>
|
|
|
|
1 | // top offset for snapshot
|
|
2 | import * as React from 'react';
|
|
> 3 | throw new Error('no')
|
|
| ^
|
|
4 | class ClassDefault extends React.Component {
|
|
5 | render() {
|
|
6 | return <h1>Default Export</h1>;"
|
|
`;
|
|
|
|
exports[`ReactRefreshLogBox turbo should strip whitespace correctly with newline 1`] = `
|
|
"index.js (8:27) @ onClick
|
|
|
|
6 |
|
|
7 | <a onClick={() => {
|
|
> 8 | throw new Error('idk')
|
|
| ^
|
|
9 | }}>
|
|
10 | click me
|
|
11 | </a>"
|
|
`;
|