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