Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
7ed2d23a
Unverified
Commit
7ed2d23a
authored
Jul 03, 2025
by
Sebastian "Sebbie" Silbermann
Committed by
GitHub
Jul 03, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[devtools] Omit line/col numbers for anonymous sources (#81223)
parent
c2826156
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
206 additions
and
192 deletions
+206
-192
call-stack-frame.stories.tsx
.../components/call-stack-frame/call-stack-frame.stories.tsx
+12
-0
stack-frame.ts
packages/next/src/next-devtools/shared/stack-frame.ts
+3
-1
ReactRefreshLogBox.test.ts
test/development/acceptance-app/ReactRefreshLogBox.test.ts
+28
-28
error-recovery.test.ts
test/development/acceptance-app/error-recovery.test.ts
+9
-9
hydration-error.test.ts
test/development/acceptance-app/hydration-error.test.ts
+22
-22
ReactRefreshLogBox.test.ts
test/development/acceptance/ReactRefreshLogBox.test.ts
+32
-32
error-recovery.test.ts
test/development/acceptance/error-recovery.test.ts
+11
-11
hydration-error.test.ts
test/development/acceptance/hydration-error.test.ts
+12
-12
capture-console-error-owner-stack.test.ts
...ror-owner-stack/capture-console-error-owner-stack.test.ts
+2
-2
dynamic-io-dev-errors.test.ts
...p-dir/dynamic-io-dev-errors/dynamic-io-dev-errors.test.ts
+12
-12
hook-function-names.test.ts
...t/app-dir/hook-function-names/hook-function-names.test.ts
+1
-1
hydration-error-count.test.ts
...p-dir/hydration-error-count/hydration-error-count.test.ts
+7
-7
rendering.test.ts
...development/pages-dir/client-navigation/rendering.test.ts
+1
-1
dynamic-io-errors.platform-dynamic.test.ts
...amic-io-errors/dynamic-io-errors.platform-dynamic.test.ts
+1
-1
dynamic-io-errors.sync-attribution.test.ts
...amic-io-errors/dynamic-io-errors.sync-attribution.test.ts
+16
-16
dynamic-io-errors.test.ts
test/e2e/app-dir/dynamic-io-errors/dynamic-io-errors.test.ts
+34
-34
next-link-errors.test.ts
test/e2e/next-link-errors/next-link-errors.test.ts
+2
-2
next-test-utils.ts
test/lib/next-test-utils.ts
+1
-1
No files found.
packages/next/src/next-devtools/dev-overlay/components/call-stack-frame/call-stack-frame.stories.tsx
View file @
7ed2d23a
...
...
@@ -64,3 +64,15 @@ export const NoSource: Story = {
frame
,
},
}
export
const
AnonymousSource
:
Story
=
{
args
:
{
frame
:
{
...
frame
,
originalStackFrame
:
{
...
frame
.
originalStackFrame
,
file
:
'<anonymous>'
,
},
},
},
}
packages/next/src/next-devtools/shared/stack-frame.ts
View file @
7ed2d23a
...
...
@@ -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
{
...
...
test/development/acceptance-app/ReactRefreshLogBox.test.ts
View file @
7ed2d23a
...
...
@@ -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)",
],
}
...
...
test/development/acceptance-app/error-recovery.test.ts
View file @
7ed2d23a
...
...
@@ -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)",
...
...
test/development/acceptance-app/hydration-error.test.ts
View file @
7ed2d23a
...
...
@@ -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)",
],
},
...
...
test/development/acceptance/ReactRefreshLogBox.test.ts
View file @
7ed2d23a
...
...
@@ -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)",
],
}
...
...
test/development/acceptance/error-recovery.test.ts
View file @
7ed2d23a
...
...
@@ -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>'
}
",
],
...
...
test/development/acceptance/hydration-error.test.ts
View file @
7ed2d23a
...
...
@@ -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)",
],
}
...
...
test/development/app-dir/capture-console-error-owner-stack/capture-console-error-owner-stack.test.ts
View file @
7ed2d23a
...
...
@@ -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>",
],
}
`
)
...
...
test/development/app-dir/dynamic-io-dev-errors/dynamic-io-dev-errors.test.ts
View file @
7ed2d23a
...
...
@@ -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>",
],
}
`
)
...
...
test/development/app-dir/hook-function-names/hook-function-names.test.ts
View file @
7ed2d23a
...
...
@@ -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)",
],
...
...
test/development/app-dir/hydration-error-count/hydration-error-count.test.ts
View file @
7ed2d23a
...
...
@@ -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)",
],
},
...
...
test/development/pages-dir/client-navigation/rendering.test.ts
View file @
7ed2d23a
...
...
@@ -136,7 +136,7 @@ describe('Client Navigation rendering', () => {
"label": "Runtime Error",
"source": null,
"stack": [
"new Promise <anonymous>
(0:0)
",
"new Promise <anonymous>",
],
}
`
)
...
...
test/e2e/app-dir/dynamic-io-errors/dynamic-io-errors.platform-dynamic.test.ts
View file @
7ed2d23a
...
...
@@ -79,7 +79,7 @@ describe.each(
| ^",
"stack": [
"RandomReadingComponent app/page.tsx (35:23)",
"LogSafely <anonymous>
(0:0)
",
"LogSafely <anonymous>",
],
}
`
)
...
...
test/e2e/app-dir/dynamic-io-errors/dynamic-io-errors.sync-attribution.test.ts
View file @
7ed2d23a
...
...
@@ -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>",
],
}
`
)
...
...
test/e2e/app-dir/dynamic-io-errors/dynamic-io-errors.test.ts
View file @
7ed2d23a
...
...
@@ -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>",
],
},
]
...
...
test/e2e/next-link-errors/next-link-errors.test.ts
View file @
7ed2d23a
...
...
@@ -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)",
],
}
...
...
test/lib/next-test-utils.ts
View file @
7ed2d23a
...
...
@@ -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.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment