Unverified Commit 7ed2d23a authored by Sebastian "Sebbie" Silbermann's avatar Sebastian "Sebbie" Silbermann Committed by GitHub

[devtools] Omit line/col numbers for anonymous sources (#81223)

parent c2826156
......@@ -64,3 +64,15 @@ export const NoSource: Story = {
frame,
},
}
export const AnonymousSource: Story = {
args: {
frame: {
...frame,
originalStackFrame: {
...frame.originalStackFrame,
file: '<anonymous>',
},
},
},
}
......@@ -158,7 +158,9 @@ export function getFrameSource(frame: StackFrame): string {
}
if (!isWebpackInternalResource(frame.file) && frame.lineNumber != null) {
if (str) {
// We don't need line and column numbers for anonymous sources because
// there's no entrypoint for the location anyway.
if (str && frame.file !== '<anonymous>') {
if (frame.column != null) {
str += ` (${frame.lineNumber}:${frame.column})`
} else {
......
......@@ -531,9 +531,9 @@ describe('ReactRefreshLogBox app', () => {
| ^",
"stack": [
"Index.useCallback[boom] index.js (5:11)",
"UtilityScript.evaluate <anonymous> (236:17)",
"UtilityScript.<anonymous> <anonymous> (1:44)",
"button <anonymous> (0:0)",
"UtilityScript.evaluate <anonymous>",
"UtilityScript.<anonymous> <anonymous>",
"button <anonymous>",
"Index index.js (9:7)",
"Page index.js (9:30)",
],
......@@ -550,9 +550,9 @@ describe('ReactRefreshLogBox app', () => {
| ^",
"stack": [
"Index.useCallback[boom] index.js (5:11)",
"UtilityScript.evaluate <anonymous> (236:17)",
"UtilityScript.<anonymous> <anonymous> (1:44)",
"button <anonymous> (0:0)",
"UtilityScript.evaluate <anonymous>",
"UtilityScript.<anonymous> <anonymous>",
"button <anonymous>",
"Index index.js (9:7)",
"Page app/page.js (4:10)",
],
......@@ -614,9 +614,9 @@ describe('ReactRefreshLogBox app', () => {
| ^",
"stack": [
"Index.useCallback[boom] index.js (5:11)",
"UtilityScript.evaluate <anonymous> (236:17)",
"UtilityScript.<anonymous> <anonymous> (1:44)",
"button <anonymous> (0:0)",
"UtilityScript.evaluate <anonymous>",
"UtilityScript.<anonymous> <anonymous>",
"button <anonymous>",
"Index index.js (9:7)",
"Page index.js (9:30)",
],
......@@ -633,9 +633,9 @@ describe('ReactRefreshLogBox app', () => {
| ^",
"stack": [
"Index.useCallback[boom] index.js (5:11)",
"UtilityScript.evaluate <anonymous> (236:17)",
"UtilityScript.<anonymous> <anonymous> (1:44)",
"button <anonymous> (0:0)",
"UtilityScript.evaluate <anonymous>",
"UtilityScript.<anonymous> <anonymous>",
"button <anonymous>",
"Index index.js (9:7)",
"Page app/page.js (4:10)",
],
......@@ -696,9 +696,9 @@ describe('ReactRefreshLogBox app', () => {
| ^",
"stack": [
"Index.useCallback[boom] index.js (5:11)",
"UtilityScript.evaluate <anonymous> (236:17)",
"UtilityScript.<anonymous> <anonymous> (1:44)",
"button <anonymous> (0:0)",
"UtilityScript.evaluate <anonymous>",
"UtilityScript.<anonymous> <anonymous>",
"button <anonymous>",
"Index index.js (9:7)",
"Page index.js (9:30)",
],
......@@ -715,9 +715,9 @@ describe('ReactRefreshLogBox app', () => {
| ^",
"stack": [
"Index.useCallback[boom] index.js (5:11)",
"UtilityScript.evaluate <anonymous> (236:17)",
"UtilityScript.<anonymous> <anonymous> (1:44)",
"button <anonymous> (0:0)",
"UtilityScript.evaluate <anonymous>",
"UtilityScript.<anonymous> <anonymous>",
"button <anonymous>",
"Index index.js (9:7)",
"Page app/page.js (4:10)",
],
......@@ -778,9 +778,9 @@ describe('ReactRefreshLogBox app', () => {
| ^",
"stack": [
"Index.useCallback[boom] index.js (5:11)",
"UtilityScript.evaluate <anonymous> (236:17)",
"UtilityScript.<anonymous> <anonymous> (1:44)",
"button <anonymous> (0:0)",
"UtilityScript.evaluate <anonymous>",
"UtilityScript.<anonymous> <anonymous>",
"button <anonymous>",
"Index index.js (9:7)",
"Page index.js (9:30)",
],
......@@ -797,9 +797,9 @@ describe('ReactRefreshLogBox app', () => {
| ^",
"stack": [
"Index.useCallback[boom] index.js (5:11)",
"UtilityScript.evaluate <anonymous> (236:17)",
"UtilityScript.<anonymous> <anonymous> (1:44)",
"button <anonymous> (0:0)",
"UtilityScript.evaluate <anonymous>",
"UtilityScript.<anonymous> <anonymous>",
"button <anonymous>",
"Index index.js (9:7)",
"Page app/page.js (4:10)",
],
......@@ -973,7 +973,7 @@ describe('ReactRefreshLogBox app', () => {
| ^",
"stack": [
"{default export} index.js (3:11)",
"Set.forEach <anonymous> (0:0)",
"Set.forEach <anonymous>",
"<FIXME-file-protocol>",
"<FIXME-file-protocol>",
"Page app/page.js (2:1)",
......@@ -1078,7 +1078,7 @@ describe('ReactRefreshLogBox app', () => {
| ^",
"stack": [
"Index index.js (2:44)",
"Set.forEach <anonymous> (0:0)",
"Set.forEach <anonymous>",
"<FIXME-file-protocol>",
"<FIXME-file-protocol>",
"Page index.js (16:8)",
......@@ -1549,7 +1549,7 @@ export default function Home() {
| ^",
"stack": [
"serverAction app/actions.ts (4:9)",
"form <anonymous> (0:0)",
"form <anonymous>",
"Home app/page.js (7:7)",
],
}
......@@ -1597,7 +1597,7 @@ export default function Home() {
| ^",
"stack": [
"serverAction app/actions.ts (4:9)",
"form <anonymous> (0:0)",
"form <anonymous>",
"Home app/page.js (6:7)",
],
}
......
......@@ -296,9 +296,9 @@ describe('Error recovery app', () => {
| ^",
"stack": [
"Index.useCallback[increment] index.js (7:11)",
"UtilityScript.evaluate <anonymous> (236:17)",
"UtilityScript.<anonymous> <anonymous> (1:44)",
"button <anonymous> (0:0)",
"UtilityScript.evaluate <anonymous>",
"UtilityScript.<anonymous> <anonymous>",
"button <anonymous>",
"Index index.js (12:7)",
"Page index.js (10:6)",
],
......@@ -315,9 +315,9 @@ describe('Error recovery app', () => {
| ^",
"stack": [
"Index.useCallback[increment] index.js (7:11)",
"UtilityScript.evaluate <anonymous> (236:17)",
"UtilityScript.<anonymous> <anonymous> (1:44)",
"button <anonymous> (0:0)",
"UtilityScript.evaluate <anonymous>",
"UtilityScript.<anonymous> <anonymous>",
"button <anonymous>",
"Index index.js (12:7)",
"Page app/page.js (4:10)",
],
......@@ -491,7 +491,7 @@ describe('Error recovery app', () => {
| ^",
"stack": [
"Child child.js (3:9)",
"Set.forEach <anonymous> (0:0)",
"Set.forEach <anonymous>",
"<FIXME-file-protocol>",
"<FIXME-file-protocol>",
"Index index.js (6:7)",
......@@ -749,7 +749,7 @@ describe('Error recovery app', () => {
| ^",
"stack": [
"Foo Foo.js (3:3)",
"Set.forEach <anonymous> (0:0)",
"Set.forEach <anonymous>",
"<FIXME-file-protocol>",
"<FIXME-file-protocol>",
"FunctionDefault index.js (4:10)",
......@@ -984,7 +984,7 @@ describe('Error recovery app', () => {
| ^",
"stack": [
"ClassDefault.render index.js (5:11)",
"Set.forEach <anonymous> (0:0)",
"Set.forEach <anonymous>",
"<FIXME-file-protocol>",
"<FIXME-file-protocol>",
"Page index.js (10:16)",
......
......@@ -97,7 +97,7 @@ describe('Error overlay for hydration errors in App router', () => {
> 6 | <main className="child">{isClient ? "client" : "server"}</main>
| ^",
"stack": [
"main <anonymous> (0:0)",
"main <anonymous>",
"Mismatch app/page.js (6:7)",
],
}
......@@ -172,7 +172,7 @@ describe('Error overlay for hydration errors in App router', () => {
> 6 | {isClient && <main className="only" />}
| ^",
"stack": [
"main <anonymous> (0:0)",
"main <anonymous>",
"Mismatch app/page.js (6:20)",
],
}
......@@ -233,7 +233,7 @@ describe('Error overlay for hydration errors in App router', () => {
> 5 | <html
| ^",
"stack": [
"html <anonymous> (0:0)",
"html <anonymous>",
"Root app/layout.js (5:5)",
],
}
......@@ -264,7 +264,7 @@ describe('Error overlay for hydration errors in App router', () => {
> 5 | <html
| ^",
"stack": [
"html <anonymous> (0:0)",
"html <anonymous>",
"Root app/layout.js (5:5)",
],
}
......@@ -324,7 +324,7 @@ describe('Error overlay for hydration errors in App router', () => {
> 5 | <div className="parent">
| ^",
"stack": [
"div <anonymous> (0:0)",
"div <anonymous>",
"Mismatch app/page.js (5:5)",
],
}
......@@ -378,7 +378,7 @@ describe('Error overlay for hydration errors in App router', () => {
> 5 | <div className="parent">
| ^",
"stack": [
"div <anonymous> (0:0)",
"div <anonymous>",
"Mismatch app/page.js (5:5)",
],
}
......@@ -428,7 +428,7 @@ describe('Error overlay for hydration errors in App router', () => {
> 4 | return <div className="parent">{!isClient && "only"}</div>;
| ^",
"stack": [
"div <anonymous> (0:0)",
"div <anonymous>",
"Mismatch app/page.js (4:10)",
],
}
......@@ -490,7 +490,7 @@ describe('Error overlay for hydration errors in App router', () => {
> 6 | <tr>test</tr>
| ^",
"stack": [
"tr <anonymous> (0:0)",
"tr <anonymous>",
"Page app/page.js (6:9)",
],
},
......@@ -518,7 +518,7 @@ describe('Error overlay for hydration errors in App router', () => {
> 4 | <table>
| ^",
"stack": [
"table <anonymous> (0:0)",
"table <anonymous>",
"Page app/page.js (4:5)",
],
},
......@@ -575,7 +575,7 @@ describe('Error overlay for hydration errors in App router', () => {
> 4 | <table>
| ^",
"stack": [
"table <anonymous> (0:0)",
"table <anonymous>",
"Page app/page.js (4:5)",
],
}
......@@ -636,7 +636,7 @@ describe('Error overlay for hydration errors in App router', () => {
> 9 | {isClient && <main className="second" />}
| ^",
"stack": [
"main <anonymous> (0:0)",
"main <anonymous>",
"Mismatch app/page.js (9:22)",
],
}
......@@ -727,7 +727,7 @@ describe('Error overlay for hydration errors in App router', () => {
> 6 | <p>Nested p tags</p>
| ^",
"stack": [
"p <anonymous> (0:0)",
"p <anonymous>",
"Page app/page.js (6:7)",
],
},
......@@ -739,7 +739,7 @@ describe('Error overlay for hydration errors in App router', () => {
> 6 | <p>Nested p tags</p>
| ^",
"stack": [
"p <anonymous> (0:0)",
"p <anonymous>",
"Page app/page.js (6:7)",
],
},
......@@ -806,7 +806,7 @@ describe('Error overlay for hydration errors in App router', () => {
> 8 | <div>Nested div under p tag</div>
| ^",
"stack": [
"div <anonymous> (0:0)",
"div <anonymous>",
"Page app/page.js (8:11)",
],
},
......@@ -818,7 +818,7 @@ describe('Error overlay for hydration errors in App router', () => {
> 8 | <div>Nested div under p tag</div>
| ^",
"stack": [
"div <anonymous> (0:0)",
"div <anonymous>",
"Page app/page.js (8:11)",
],
},
......@@ -875,7 +875,7 @@ describe('Error overlay for hydration errors in App router', () => {
> 3 | return <div><tr></tr></div>
| ^",
"stack": [
"tr <anonymous> (0:0)",
"tr <anonymous>",
"Page app/page.js (3:15)",
],
},
......@@ -887,7 +887,7 @@ describe('Error overlay for hydration errors in App router', () => {
> 3 | return <div><tr></tr></div>
| ^",
"stack": [
"tr <anonymous> (0:0)",
"tr <anonymous>",
"Page app/page.js (3:15)",
],
},
......@@ -951,7 +951,7 @@ describe('Error overlay for hydration errors in App router', () => {
> 5 | <p><span><span><span><span><p>hello world</p></span></span></span></span></p>
| ^",
"stack": [
"p <anonymous> (0:0)",
"p <anonymous>",
"Page app/page.js (5:32)",
],
},
......@@ -964,7 +964,7 @@ describe('Error overlay for hydration errors in App router', () => {
> 5 | <p><span><span><span><span><p>hello world</p></span></span></span></span></p>
| ^",
"stack": [
"p <anonymous> (0:0)",
"p <anonymous>",
"Page app/page.js (5:5)",
],
},
......@@ -976,7 +976,7 @@ describe('Error overlay for hydration errors in App router', () => {
> 5 | <p><span><span><span><span><p>hello world</p></span></span></span></span></p>
| ^",
"stack": [
"p <anonymous> (0:0)",
"p <anonymous>",
"Page app/page.js (5:32)",
],
},
......@@ -1066,7 +1066,7 @@ describe('Error overlay for hydration errors in App router', () => {
> 7 | <Script
| ^",
"stack": [
"script <anonymous> (0:0)",
"script <anonymous>",
"Layout app/layout.js (7:7)",
],
},
......@@ -1079,7 +1079,7 @@ describe('Error overlay for hydration errors in App router', () => {
> 5 | <html>
| ^",
"stack": [
"html <anonymous> (0:0)",
"html <anonymous>",
"Layout app/layout.js (5:5)",
],
},
......
......@@ -54,8 +54,8 @@ describe('ReactRefreshLogBox', () => {
| ^",
"stack": [
"onClick index.js (8:27)",
"UtilityScript.evaluate <anonymous> (236:17)",
"UtilityScript.<anonymous> <anonymous> (1:44)",
"UtilityScript.evaluate <anonymous>",
"UtilityScript.<anonymous> <anonymous>",
],
}
`)
......@@ -70,8 +70,8 @@ describe('ReactRefreshLogBox', () => {
| ^",
"stack": [
"onClick index.js (8:27)",
"UtilityScript.evaluate <anonymous> (236:17)",
"UtilityScript.<anonymous> <anonymous> (1:44)",
"UtilityScript.evaluate <anonymous>",
"UtilityScript.<anonymous> <anonymous>",
],
}
`)
......@@ -279,7 +279,7 @@ describe('ReactRefreshLogBox', () => {
| ^",
"stack": [
"FunctionDefault FunctionDefault.js (1:51)",
"Set.forEach <anonymous> (0:0)",
"Set.forEach <anonymous>",
"<FIXME-file-protocol>",
"<FIXME-file-protocol>",
],
......@@ -293,7 +293,7 @@ describe('ReactRefreshLogBox', () => {
| ^",
"stack": [
"FunctionDefault FunctionDefault.js (1:51)",
"Set.forEach <anonymous> (0:0)",
"Set.forEach <anonymous>",
"<FIXME-file-protocol>",
"<FIXME-file-protocol>",
],
......@@ -311,7 +311,7 @@ describe('ReactRefreshLogBox', () => {
| ^",
"stack": [
"FunctionDefault FunctionDefault.js (1:51)",
"Set.forEach <anonymous> (0:0)",
"Set.forEach <anonymous>",
"${isTurbopack ? '<FIXME-file-protocol>' : '<FIXME-next-dist-dir>'}",
"${isTurbopack ? '<FIXME-file-protocol>' : '<FIXME-next-dist-dir>'}",
],
......@@ -480,7 +480,7 @@ describe('ReactRefreshLogBox', () => {
| ^",
"stack": [
"ClickCount.render Child.js (4:11)",
"Set.forEach <anonymous> (0:0)",
"Set.forEach <anonymous>",
"<FIXME-file-protocol>",
"<FIXME-file-protocol>",
],
......@@ -494,7 +494,7 @@ describe('ReactRefreshLogBox', () => {
| ^",
"stack": [
"ClickCount.render Child.js (4:11)",
"Set.forEach <anonymous> (0:0)",
"Set.forEach <anonymous>",
"<FIXME-file-protocol>",
"<FIXME-file-protocol>",
],
......@@ -512,7 +512,7 @@ describe('ReactRefreshLogBox', () => {
| ^",
"stack": [
"ClickCount.render Child.js (4:11)",
"Set.forEach <anonymous> (0:0)",
"Set.forEach <anonymous>",
"${isTurbopack ? '<FIXME-file-protocol>' : '<FIXME-next-dist-dir>'}",
"${isTurbopack ? '<FIXME-file-protocol>' : '<FIXME-next-dist-dir>'}",
],
......@@ -667,8 +667,8 @@ describe('ReactRefreshLogBox', () => {
| ^",
"stack": [
"Index.useCallback[boom] index.js (5:11)",
"UtilityScript.evaluate <anonymous> (236:17)",
"UtilityScript.<anonymous> <anonymous> (1:44)",
"UtilityScript.evaluate <anonymous>",
"UtilityScript.<anonymous> <anonymous>",
],
}
`)
......@@ -683,8 +683,8 @@ describe('ReactRefreshLogBox', () => {
| ^",
"stack": [
"Index.useCallback[boom] index.js (5:11)",
"UtilityScript.evaluate <anonymous> (236:17)",
"UtilityScript.<anonymous> <anonymous> (1:44)",
"UtilityScript.evaluate <anonymous>",
"UtilityScript.<anonymous> <anonymous>",
],
}
`)
......@@ -722,8 +722,8 @@ describe('ReactRefreshLogBox', () => {
| ^",
"stack": [
"Index.useCallback[boom] index.js (5:11)",
"UtilityScript.evaluate <anonymous> (236:17)",
"UtilityScript.<anonymous> <anonymous> (1:44)",
"UtilityScript.evaluate <anonymous>",
"UtilityScript.<anonymous> <anonymous>",
],
}
`)
......@@ -738,8 +738,8 @@ describe('ReactRefreshLogBox', () => {
| ^",
"stack": [
"Index.useCallback[boom] index.js (5:11)",
"UtilityScript.evaluate <anonymous> (236:17)",
"UtilityScript.<anonymous> <anonymous> (1:44)",
"UtilityScript.evaluate <anonymous>",
"UtilityScript.<anonymous> <anonymous>",
],
}
`)
......@@ -777,8 +777,8 @@ describe('ReactRefreshLogBox', () => {
| ^",
"stack": [
"Index.useCallback[boom] index.js (5:11)",
"UtilityScript.evaluate <anonymous> (236:17)",
"UtilityScript.<anonymous> <anonymous> (1:44)",
"UtilityScript.evaluate <anonymous>",
"UtilityScript.<anonymous> <anonymous>",
],
}
`)
......@@ -793,8 +793,8 @@ describe('ReactRefreshLogBox', () => {
| ^",
"stack": [
"Index.useCallback[boom] index.js (5:11)",
"UtilityScript.evaluate <anonymous> (236:17)",
"UtilityScript.<anonymous> <anonymous> (1:44)",
"UtilityScript.evaluate <anonymous>",
"UtilityScript.<anonymous> <anonymous>",
],
}
`)
......@@ -832,8 +832,8 @@ describe('ReactRefreshLogBox', () => {
| ^",
"stack": [
"Index.useCallback[boom] index.js (5:11)",
"UtilityScript.evaluate <anonymous> (236:17)",
"UtilityScript.<anonymous> <anonymous> (1:44)",
"UtilityScript.evaluate <anonymous>",
"UtilityScript.<anonymous> <anonymous>",
],
}
`)
......@@ -848,8 +848,8 @@ describe('ReactRefreshLogBox', () => {
| ^",
"stack": [
"Index.useCallback[boom] index.js (5:11)",
"UtilityScript.evaluate <anonymous> (236:17)",
"UtilityScript.<anonymous> <anonymous> (1:44)",
"UtilityScript.evaluate <anonymous>",
"UtilityScript.<anonymous> <anonymous>",
],
}
`)
......@@ -887,8 +887,8 @@ describe('ReactRefreshLogBox', () => {
| ^",
"stack": [
"Index.useCallback[boom] index.js (5:11)",
"UtilityScript.evaluate <anonymous> (236:17)",
"UtilityScript.<anonymous> <anonymous> (1:44)",
"UtilityScript.evaluate <anonymous>",
"UtilityScript.<anonymous> <anonymous>",
],
}
`)
......@@ -903,8 +903,8 @@ describe('ReactRefreshLogBox', () => {
| ^",
"stack": [
"Index.useCallback[boom] index.js (5:11)",
"UtilityScript.evaluate <anonymous> (236:17)",
"UtilityScript.<anonymous> <anonymous> (1:44)",
"UtilityScript.evaluate <anonymous>",
"UtilityScript.<anonymous> <anonymous>",
],
}
`)
......@@ -1245,7 +1245,7 @@ describe('ReactRefreshLogBox', () => {
| ^",
"stack": [
"<unknown> pages/index.js (3:11)",
"Array.map <anonymous> (0:0)",
"Array.map <anonymous>",
"Page pages/index.js (2:13)",
],
}
......@@ -1261,7 +1261,7 @@ describe('ReactRefreshLogBox', () => {
| ^",
"stack": [
"eval pages/index.js (3:11)",
"Array.map <anonymous> (0:0)",
"Array.map <anonymous>",
"Page pages/index.js (2:13)",
],
}
......
......@@ -168,8 +168,8 @@ describe('pages/ error recovery', () => {
| ^",
"stack": [
"Index.useCallback[increment] index.js (7:11)",
"UtilityScript.evaluate <anonymous> (236:17)",
"UtilityScript.<anonymous> <anonymous> (1:44)",
"UtilityScript.evaluate <anonymous>",
"UtilityScript.<anonymous> <anonymous>",
],
}
`)
......@@ -261,7 +261,7 @@ describe('pages/ error recovery', () => {
| ^",
"stack": [
"Child child.js (3:9)",
"Set.forEach <anonymous> (0:0)",
"Set.forEach <anonymous>",
"<FIXME-file-protocol>",
"<FIXME-file-protocol>",
],
......@@ -275,7 +275,7 @@ describe('pages/ error recovery', () => {
| ^",
"stack": [
"Child child.js (3:9)",
"Set.forEach <anonymous> (0:0)",
"Set.forEach <anonymous>",
"<FIXME-file-protocol>",
"<FIXME-file-protocol>",
],
......@@ -293,7 +293,7 @@ describe('pages/ error recovery', () => {
| ^",
"stack": [
"Child child.js (3:9)",
"Set.forEach <anonymous> (0:0)",
"Set.forEach <anonymous>",
"${isTurbopack ? '<FIXME-file-protocol>' : '<FIXME-next-dist-dir>'}",
"${isTurbopack ? '<FIXME-file-protocol>' : '<FIXME-next-dist-dir>'}",
],
......@@ -549,7 +549,7 @@ describe('pages/ error recovery', () => {
| ^",
"stack": [
"ClassDefault.render index.js (5:11)",
"Set.forEach <anonymous> (0:0)",
"Set.forEach <anonymous>",
"<FIXME-file-protocol>",
"<FIXME-file-protocol>",
],
......@@ -563,7 +563,7 @@ describe('pages/ error recovery', () => {
| ^",
"stack": [
"ClassDefault.render index.js (5:11)",
"Set.forEach <anonymous> (0:0)",
"Set.forEach <anonymous>",
"<FIXME-file-protocol>",
"<FIXME-file-protocol>",
],
......@@ -596,7 +596,7 @@ describe('pages/ error recovery', () => {
| ^",
"stack": [
"ClassDefault.render index.js (5:11)",
"Set.forEach <anonymous> (0:0)",
"Set.forEach <anonymous>",
"${isTurbopack ? '<FIXME-file-protocol>' : '<FIXME-next-dist-dir>'}",
"${isTurbopack ? '<FIXME-file-protocol>' : '<FIXME-next-dist-dir>'}",
],
......@@ -665,7 +665,7 @@ describe('pages/ error recovery', () => {
| ^",
"stack": [
"Foo Foo.js (3:3)",
"Set.forEach <anonymous> (0:0)",
"Set.forEach <anonymous>",
"<FIXME-file-protocol>",
"<FIXME-file-protocol>",
],
......@@ -679,7 +679,7 @@ describe('pages/ error recovery', () => {
| ^",
"stack": [
"Foo Foo.js (3:3)",
"Set.forEach <anonymous> (0:0)",
"Set.forEach <anonymous>",
"<FIXME-file-protocol>",
"<FIXME-file-protocol>",
],
......@@ -697,7 +697,7 @@ describe('pages/ error recovery', () => {
| ^",
"stack": [
"Foo Foo.js (3:3)",
"Set.forEach <anonymous> (0:0)",
"Set.forEach <anonymous>",
"${isTurbopack ? '<FIXME-file-protocol>' : '<FIXME-next-dist-dir>'}",
"${isTurbopack ? '<FIXME-file-protocol>' : '<FIXME-next-dist-dir>'}",
],
......
......@@ -121,7 +121,7 @@ describe('Error overlay for hydration errors in Pages router', () => {
> 5 | <main className="child">{isClient ? "client" : "server"}</main>
| ^",
"stack": [
"main <anonymous> (0:0)",
"main <anonymous>",
"Mismatch index.js (5:9)",
],
}
......@@ -224,7 +224,7 @@ describe('Error overlay for hydration errors in Pages router', () => {
> 5 | {isClient && <main className="only" />}
| ^",
"stack": [
"main <anonymous> (0:0)",
"main <anonymous>",
"Mismatch index.js (5:20)",
],
}
......@@ -317,7 +317,7 @@ describe('Error overlay for hydration errors in Pages router', () => {
> 4 | <div className="parent">
| ^",
"stack": [
"div <anonymous> (0:0)",
"div <anonymous>",
"Mismatch index.js (4:5)",
],
}
......@@ -389,7 +389,7 @@ describe('Error overlay for hydration errors in Pages router', () => {
> 4 | <div className="parent">
| ^",
"stack": [
"div <anonymous> (0:0)",
"div <anonymous>",
"Mismatch index.js (4:5)",
],
}
......@@ -459,7 +459,7 @@ describe('Error overlay for hydration errors in Pages router', () => {
> 3 | return <div className="parent">{!isClient && "only"}</div>;
| ^",
"stack": [
"div <anonymous> (0:0)",
"div <anonymous>",
"Mismatch index.js (3:10)",
],
}
......@@ -551,7 +551,7 @@ describe('Error overlay for hydration errors in Pages router', () => {
> 3 | <table>
| ^",
"stack": [
"table <anonymous> (0:0)",
"table <anonymous>",
"Page index.js (3:5)",
],
}
......@@ -638,7 +638,7 @@ describe('Error overlay for hydration errors in Pages router', () => {
> 3 | <table>
| ^",
"stack": [
"table <anonymous> (0:0)",
"table <anonymous>",
"Page index.js (3:5)",
],
}
......@@ -733,7 +733,7 @@ describe('Error overlay for hydration errors in Pages router', () => {
> 8 | {isClient && <main className="second" />}
| ^",
"stack": [
"main <anonymous> (0:0)",
"main <anonymous>",
"Mismatch index.js (8:22)",
],
}
......@@ -853,7 +853,7 @@ describe('Error overlay for hydration errors in Pages router', () => {
> 4 | <p>Nested p tags</p>
| ^",
"stack": [
"p <anonymous> (0:0)",
"p <anonymous>",
"Page index.js (4:7)",
],
}
......@@ -948,7 +948,7 @@ describe('Error overlay for hydration errors in Pages router', () => {
> 6 | <div>Nested div under p tag</div>
| ^",
"stack": [
"div <anonymous> (0:0)",
"div <anonymous>",
"Page index.js (6:11)",
],
}
......@@ -1031,7 +1031,7 @@ describe('Error overlay for hydration errors in Pages router', () => {
> 2 | return <div><tr></tr></div>
| ^",
"stack": [
"tr <anonymous> (0:0)",
"tr <anonymous>",
"Page index.js (2:15)",
],
}
......@@ -1128,7 +1128,7 @@ describe('Error overlay for hydration errors in Pages router', () => {
> 3 | <p><span><span><span><span><p>hello world</p></span></span></span></span></p>
| ^",
"stack": [
"p <anonymous> (0:0)",
"p <anonymous>",
"Page index.js (3:32)",
],
}
......
......@@ -20,7 +20,7 @@ describe('app-dir - capture-console-error-owner-stack', () => {
| ^",
"stack": [
"onClick app/browser/event/page.js (7:17)",
"button <anonymous> (0:0)",
"button <anonymous>",
"Page app/browser/event/page.js (5:5)",
],
}
......@@ -112,7 +112,7 @@ describe('app-dir - capture-console-error-owner-stack', () => {
| ^",
"stack": [
"Page app/rsc/page.js (2:17)",
"Page <anonymous> (0:0)",
"Page <anonymous>",
],
}
`)
......
......@@ -22,7 +22,7 @@ describe('Dynamic IO Dev Errors', () => {
| ^",
"stack": [
"Page app/error/page.tsx (2:23)",
"LogSafely <anonymous> (0:0)",
"LogSafely <anonymous>",
],
}
`)
......@@ -47,7 +47,7 @@ describe('Dynamic IO Dev Errors', () => {
| ^",
"stack": [
"Page app/error/page.tsx (2:23)",
"LogSafely <anonymous> (0:0)",
"LogSafely <anonymous>",
],
}
`)
......@@ -110,11 +110,11 @@ describe('Dynamic IO Dev Errors', () => {
"source": null,
"stack": [
"<FIXME-file-protocol>",
"main <anonymous> (1:13)",
"body <anonymous> (1:13)",
"html <anonymous> (1:13)",
"Root [Server] <anonymous> (1:22)",
"LogSafely <anonymous> (0:0)",
"main <anonymous>",
"body <anonymous>",
"html <anonymous>",
"Root [Server] <anonymous>",
"LogSafely <anonymous>",
],
}
`)
......@@ -138,11 +138,11 @@ describe('Dynamic IO Dev Errors', () => {
| ^",
"stack": [
"Page app/no-accessed-data/page.js (1:31)",
"main <anonymous> (1:13)",
"body <anonymous> (1:13)",
"html <anonymous> (1:13)",
"Root [Server] <anonymous> (1:22)",
"LogSafely <anonymous> (0:0)",
"main <anonymous>",
"body <anonymous>",
"html <anonymous>",
"Root [Server] <anonymous>",
"LogSafely <anonymous>",
],
}
`)
......
......@@ -20,7 +20,7 @@ describe('hook-function-names', () => {
| ^",
"stack": [
"Button.useCallback[handleClick] app/button/page.tsx (7:11)",
"button <anonymous> (0:0)",
"button <anonymous>",
"Button app/button/page.tsx (11:5)",
"Page app/button/page.tsx (18:10)",
],
......
......@@ -34,7 +34,7 @@ describe('hydration-error-count', () => {
> 6 | <p>nest</p>
| ^",
"stack": [
"p <anonymous> (0:0)",
"p <anonymous>",
"Page app/bad-nesting/page.tsx (6:7)",
],
},
......@@ -46,7 +46,7 @@ describe('hydration-error-count', () => {
> 6 | <p>nest</p>
| ^",
"stack": [
"p <anonymous> (0:0)",
"p <anonymous>",
"Page app/bad-nesting/page.tsx (6:7)",
],
},
......@@ -82,7 +82,7 @@ describe('hydration-error-count', () => {
> 4 | return <p>{typeof window === 'undefined' ? 'server' : 'client'}</p>
| ^",
"stack": [
"p <anonymous> (0:0)",
"p <anonymous>",
"Page app/html-diff/page.tsx (4:10)",
],
}
......@@ -118,7 +118,7 @@ describe('hydration-error-count', () => {
> 10 | <p>nest</p>
| ^",
"stack": [
"p <anonymous> (0:0)",
"p <anonymous>",
"Page app/two-issues/page.tsx (10:7)",
],
},
......@@ -147,7 +147,7 @@ describe('hydration-error-count', () => {
> 10 | <p>nest</p>
| ^",
"stack": [
"p <anonymous> (0:0)",
"p <anonymous>",
"Page app/two-issues/page.tsx (10:7)",
],
},
......@@ -184,7 +184,7 @@ describe('hydration-error-count', () => {
> 12 | sneaky <p>very sneaky</p>
| ^",
"stack": [
"p <anonymous> (0:0)",
"p <anonymous>",
"Page app/hydration-with-runtime-errors/page.tsx (12:14)",
],
},
......@@ -196,7 +196,7 @@ describe('hydration-error-count', () => {
> 12 | sneaky <p>very sneaky</p>
| ^",
"stack": [
"p <anonymous> (0:0)",
"p <anonymous>",
"Page app/hydration-with-runtime-errors/page.tsx (12:14)",
],
},
......
......@@ -136,7 +136,7 @@ describe('Client Navigation rendering', () => {
"label": "Runtime Error",
"source": null,
"stack": [
"new Promise <anonymous> (0:0)",
"new Promise <anonymous>",
],
}
`)
......
......@@ -79,7 +79,7 @@ describe.each(
| ^",
"stack": [
"RandomReadingComponent app/page.tsx (35:23)",
"LogSafely <anonymous> (0:0)",
"LogSafely <anonymous>",
],
}
`)
......
......@@ -80,7 +80,7 @@ describe.each(
| ^",
"stack": [
"SyncIO app/client.tsx (5:16)",
"LogSafely <anonymous> (0:0)",
"LogSafely <anonymous>",
],
}
`)
......@@ -179,14 +179,14 @@ describe.each(
"source": null,
"stack": [
"<FIXME-file-protocol>",
"section <anonymous> (1:16)",
"main <anonymous> (1:13)",
"section <anonymous>",
"main <anonymous>",
"<FIXME-file-protocol>",
"main <anonymous> (1:13)",
"body <anonymous> (1:13)",
"html <anonymous> (1:13)",
"Root [Server] <anonymous> (1:22)",
"LogSafely <anonymous> (0:0)",
"main <anonymous>",
"body <anonymous>",
"html <anonymous>",
"Root [Server] <anonymous>",
"LogSafely <anonymous>",
],
}
`)
......@@ -201,14 +201,14 @@ describe.each(
| ^",
"stack": [
"RequestData app/page.tsx (33:16)",
"section <anonymous> (1:16)",
"main <anonymous> (1:13)",
"section <anonymous>",
"main <anonymous>",
"Page app/page.tsx (27:9)",
"main <anonymous> (1:13)",
"body <anonymous> (1:13)",
"html <anonymous> (1:13)",
"Root [Server] <anonymous> (1:22)",
"LogSafely <anonymous> (0:0)",
"main <anonymous>",
"body <anonymous>",
"html <anonymous>",
"Root [Server] <anonymous>",
"LogSafely <anonymous>",
],
}
`)
......@@ -352,7 +352,7 @@ describe.each(
| ^",
"stack": [
"SyncIO app/client.tsx (5:16)",
"LogSafely <anonymous> (0:0)",
"LogSafely <anonymous>",
],
}
`)
......
......@@ -44,7 +44,7 @@ describe.each(
"label": "Console Error",
"source": null,
"stack": [
"LogSafely <anonymous> (0:0)",
"LogSafely <anonymous>",
],
}
`)
......@@ -128,11 +128,11 @@ describe.each(
"stack": [
"<FIXME-file-protocol>",
"<FIXME-file-protocol>",
"main <anonymous> (1:13)",
"body <anonymous> (1:13)",
"html <anonymous> (1:13)",
"Root [Server] <anonymous> (1:22)",
"LogSafely <anonymous> (0:0)",
"main <anonymous>",
"body <anonymous>",
"html <anonymous>",
"Root [Server] <anonymous>",
"LogSafely <anonymous>",
],
}
`)
......@@ -148,11 +148,11 @@ describe.each(
"stack": [
"Dynamic app/page.tsx (20:16)",
"Page app/page.tsx (15:7)",
"main <anonymous> (1:13)",
"body <anonymous> (1:13)",
"html <anonymous> (1:13)",
"Root [Server] <anonymous> (1:22)",
"LogSafely <anonymous> (0:0)",
"main <anonymous>",
"body <anonymous>",
"html <anonymous>",
"Root [Server] <anonymous>",
"LogSafely <anonymous>",
],
}
`)
......@@ -283,7 +283,7 @@ describe.each(
"label": "Console Error",
"source": null,
"stack": [
"LogSafely <anonymous> (0:0)",
"LogSafely <anonymous>",
],
}
`)
......@@ -393,7 +393,7 @@ describe.each(
"label": "Console Error",
"source": null,
"stack": [
"LogSafely <anonymous> (0:0)",
"LogSafely <anonymous>",
],
}
`)
......@@ -470,7 +470,7 @@ describe.each(
"label": "Console Error",
"source": null,
"stack": [
"LogSafely <anonymous> (0:0)",
"LogSafely <anonymous>",
],
}
`)
......@@ -582,11 +582,11 @@ describe.each(
"<FIXME-file-protocol>",
"IndirectionTwo app/indirection.tsx (7:34)",
"<FIXME-file-protocol>",
"main <anonymous> (1:13)",
"body <anonymous> (1:13)",
"html <anonymous> (1:13)",
"Root [Server] <anonymous> (1:22)",
"LogSafely <anonymous> (0:0)",
"main <anonymous>",
"body <anonymous>",
"html <anonymous>",
"Root [Server] <anonymous>",
"LogSafely <anonymous>",
],
},
{
......@@ -597,11 +597,11 @@ describe.each(
"stack": [
"<FIXME-file-protocol>",
"<FIXME-file-protocol>",
"main <anonymous> (1:13)",
"body <anonymous> (1:13)",
"html <anonymous> (1:13)",
"Root [Server] <anonymous> (1:22)",
"LogSafely <anonymous> (0:0)",
"main <anonymous>",
"body <anonymous>",
"html <anonymous>",
"Root [Server] <anonymous>",
"LogSafely <anonymous>",
],
},
]
......@@ -620,11 +620,11 @@ describe.each(
"FetchingComponent app/page.tsx (35:16)",
"IndirectionTwo app/indirection.tsx (7:34)",
"Page app/page.tsx (16:9)",
"main <anonymous> (1:13)",
"body <anonymous> (1:13)",
"html <anonymous> (1:13)",
"Root [Server] <anonymous> (1:22)",
"LogSafely <anonymous> (0:0)",
"main <anonymous>",
"body <anonymous>",
"html <anonymous>",
"Root [Server] <anonymous>",
"LogSafely <anonymous>",
],
},
{
......@@ -637,11 +637,11 @@ describe.each(
"stack": [
"FetchingComponent app/page.tsx (35:16)",
"Page app/page.tsx (16:9)",
"main <anonymous> (1:13)",
"body <anonymous> (1:13)",
"html <anonymous> (1:13)",
"Root [Server] <anonymous> (1:22)",
"LogSafely <anonymous> (0:0)",
"main <anonymous>",
"body <anonymous>",
"html <anonymous>",
"Root [Server] <anonymous>",
"LogSafely <anonymous>",
],
},
]
......
......@@ -24,7 +24,7 @@ describe('next-link', () => {
> 6 | return <Link>Hello, Dave!</Link>
| ^",
"stack": [
"Array.forEach <anonymous> (0:0)",
"Array.forEach <anonymous>",
"Hello app/invalid-href/page.js (6:10)",
],
}
......@@ -99,7 +99,7 @@ describe('next-link', () => {
> 7 | <Link prefetch="unknown" href="https://nextjs.org/">
| ^",
"stack": [
"Array.forEach <anonymous> (0:0)",
"Array.forEach <anonymous>",
"Hello app/invalid-prefetch/page.js (7:5)",
],
}
......
......@@ -1449,7 +1449,7 @@ export async function getRedboxCallStack(
stack.push('<FIXME-file-protocol>')
} else if (frame.includes('.next/')) {
stack.push('<FIXME-next-dist-dir>')
} else if (frame === 'JSON.parse <anonymous> (0:0)') {
} else if (frame === 'JSON.parse <anonymous>') {
// TODO(veil): These frames will be ignore-listed soon. Until then, we
// remove them here, because their occurrence seems to be
// non-deterministic. They come from React's RSC parsing.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment