Skip to content

Commit 7bcb33c

Browse files
committed
add extra logs in pages
1 parent 84215b3 commit 7bcb33c

File tree

5 files changed

+56
-24
lines changed

5 files changed

+56
-24
lines changed

test/development/app-dir/cache-components-dev-fallback-validation/app/none/[top]/unwrapped/[bottom]/page.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
export default async function Page(props: {
22
params: Promise<{ top: string; bottom: string }>
33
}) {
4+
console.log('/none/[top]/unwrapped/[bottom]/page.tsx :: awaiting params')
5+
await using _ = {
6+
async [Symbol.asyncDispose]() {
7+
console.log(
8+
'/none/[top]/unwrapped/[bottom]/page.tsx :: finished awaiting params'
9+
)
10+
},
11+
}
412
return (
513
<p>
614
Top: {(await props.params).top}, Bottom: {(await props.params).bottom}

test/development/app-dir/cache-components-dev-fallback-validation/app/none/[top]/wrapped/[bottom]/page.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
export default async function Page(props: {
22
params: Promise<{ top: string; bottom: string }>
33
}) {
4+
console.log('/none/[top]/wrapped/[bottom]/page.tsx :: awaiting params')
5+
await using _ = {
6+
async [Symbol.asyncDispose]() {
7+
console.log(
8+
'/none/[top]/wrapped/[bottom]/page.tsx :: finished awaiting params'
9+
)
10+
},
11+
}
412
return (
513
<p>
614
Top: {(await props.params).top}, Bottom: {(await props.params).bottom}

test/development/app-dir/cache-components-dev-fallback-validation/app/partial/[top]/unwrapped/[bottom]/page.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
export default async function Page(props: {
22
params: Promise<{ top: string; bottom: string }>
33
}) {
4+
console.log('/partial/[top]/unwrapped/[bottom]/page.tsx :: awaiting params')
5+
await using _ = {
6+
async [Symbol.asyncDispose]() {
7+
console.log(
8+
'/partial/[top]/unwrapped/[bottom]/page.tsx :: finished awaiting params'
9+
)
10+
},
11+
}
412
return (
513
<p>
614
Top: {(await props.params).top}, Bottom: {(await props.params).bottom}

test/development/app-dir/cache-components-dev-fallback-validation/app/partial/[top]/wrapped/[bottom]/page.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
export default async function Page(props: {
22
params: Promise<{ top: string; bottom: string }>
33
}) {
4+
console.log('/partial/[top]/wrapped/[bottom]/page.tsx :: awaiting params')
5+
await using _ = {
6+
async [Symbol.asyncDispose]() {
7+
console.log(
8+
'/partial/[top]/wrapped/[bottom]/page.tsx :: finished awaiting params'
9+
)
10+
},
11+
}
412
return (
513
<p>
614
Top: {(await props.params).top}, Bottom: {(await props.params).bottom}

test/development/app-dir/cache-components-dev-fallback-validation/cache-components-dev-fallback-validation.test.ts

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,11 @@ describe('Cache Components Fallback Validation', () => {
6969
Learn more: https://nextjs.org/docs/messages/blocking-route",
7070
"environmentLabel": "Server",
7171
"label": "Blocking Route",
72-
"source": "app/partial/[top]/unwrapped/[bottom]/page.tsx (6:26) @ Page
73-
> 6 | Top: {(await props.params).top}, Bottom: {(await props.params).bottom}
74-
| ^",
72+
"source": "app/partial/[top]/unwrapped/[bottom]/page.tsx (14:26) @ Page
73+
> 14 | Top: {(await props.params).top}, Bottom: {(await props.params).bottom}
74+
| ^",
7575
"stack": [
76-
"Page app/partial/[top]/unwrapped/[bottom]/page.tsx (6:26)",
76+
"Page app/partial/[top]/unwrapped/[bottom]/page.tsx (14:26)",
7777
"ReportValidation <anonymous>",
7878
],
7979
}
@@ -98,11 +98,11 @@ describe('Cache Components Fallback Validation', () => {
9898
Learn more: https://nextjs.org/docs/messages/blocking-route",
9999
"environmentLabel": "Server",
100100
"label": "Blocking Route",
101-
"source": "app/partial/[top]/unwrapped/[bottom]/page.tsx (6:26) @ Page
102-
> 6 | Top: {(await props.params).top}, Bottom: {(await props.params).bottom}
103-
| ^",
101+
"source": "app/partial/[top]/unwrapped/[bottom]/page.tsx (14:26) @ Page
102+
> 14 | Top: {(await props.params).top}, Bottom: {(await props.params).bottom}
103+
| ^",
104104
"stack": [
105-
"Page app/partial/[top]/unwrapped/[bottom]/page.tsx (6:26)",
105+
"Page app/partial/[top]/unwrapped/[bottom]/page.tsx (14:26)",
106106
"ReportValidation <anonymous>",
107107
],
108108
}
@@ -130,11 +130,11 @@ describe('Cache Components Fallback Validation', () => {
130130
Learn more: https://nextjs.org/docs/messages/blocking-route",
131131
"environmentLabel": "Server",
132132
"label": "Blocking Route",
133-
"source": "app/partial/[top]/unwrapped/[bottom]/page.tsx (6:26) @ Page
134-
> 6 | Top: {(await props.params).top}, Bottom: {(await props.params).bottom}
135-
| ^",
133+
"source": "app/partial/[top]/unwrapped/[bottom]/page.tsx (14:26) @ Page
134+
> 14 | Top: {(await props.params).top}, Bottom: {(await props.params).bottom}
135+
| ^",
136136
"stack": [
137-
"Page app/partial/[top]/unwrapped/[bottom]/page.tsx (6:26)",
137+
"Page app/partial/[top]/unwrapped/[bottom]/page.tsx (14:26)",
138138
"ReportValidation <anonymous>",
139139
],
140140
}
@@ -159,11 +159,11 @@ describe('Cache Components Fallback Validation', () => {
159159
Learn more: https://nextjs.org/docs/messages/blocking-route",
160160
"environmentLabel": "Server",
161161
"label": "Blocking Route",
162-
"source": "app/partial/[top]/unwrapped/[bottom]/page.tsx (6:26) @ Page
163-
> 6 | Top: {(await props.params).top}, Bottom: {(await props.params).bottom}
164-
| ^",
162+
"source": "app/partial/[top]/unwrapped/[bottom]/page.tsx (14:26) @ Page
163+
> 14 | Top: {(await props.params).top}, Bottom: {(await props.params).bottom}
164+
| ^",
165165
"stack": [
166-
"Page app/partial/[top]/unwrapped/[bottom]/page.tsx (6:26)",
166+
"Page app/partial/[top]/unwrapped/[bottom]/page.tsx (14:26)",
167167
"ReportValidation <anonymous>",
168168
],
169169
}
@@ -191,11 +191,11 @@ describe('Cache Components Fallback Validation', () => {
191191
Learn more: https://nextjs.org/docs/messages/blocking-route",
192192
"environmentLabel": "Server",
193193
"label": "Blocking Route",
194-
"source": "app/partial/[top]/unwrapped/[bottom]/page.tsx (6:26) @ Page
195-
> 6 | Top: {(await props.params).top}, Bottom: {(await props.params).bottom}
196-
| ^",
194+
"source": "app/partial/[top]/unwrapped/[bottom]/page.tsx (14:26) @ Page
195+
> 14 | Top: {(await props.params).top}, Bottom: {(await props.params).bottom}
196+
| ^",
197197
"stack": [
198-
"Page app/partial/[top]/unwrapped/[bottom]/page.tsx (6:26)",
198+
"Page app/partial/[top]/unwrapped/[bottom]/page.tsx (14:26)",
199199
"ReportValidation <anonymous>",
200200
],
201201
}
@@ -220,11 +220,11 @@ describe('Cache Components Fallback Validation', () => {
220220
Learn more: https://nextjs.org/docs/messages/blocking-route",
221221
"environmentLabel": "Server",
222222
"label": "Blocking Route",
223-
"source": "app/partial/[top]/unwrapped/[bottom]/page.tsx (6:26) @ Page
224-
> 6 | Top: {(await props.params).top}, Bottom: {(await props.params).bottom}
225-
| ^",
223+
"source": "app/partial/[top]/unwrapped/[bottom]/page.tsx (14:26) @ Page
224+
> 14 | Top: {(await props.params).top}, Bottom: {(await props.params).bottom}
225+
| ^",
226226
"stack": [
227-
"Page app/partial/[top]/unwrapped/[bottom]/page.tsx (6:26)",
227+
"Page app/partial/[top]/unwrapped/[bottom]/page.tsx (14:26)",
228228
"ReportValidation <anonymous>",
229229
],
230230
}

0 commit comments

Comments
 (0)