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
b5599525
Commit
b5599525
authored
Oct 17, 2025
by
Niklas Mischkulnig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
79f9651b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
9 deletions
+13
-9
progress.ts
packages/next/src/build/progress.ts
+5
-2
cache-components-console-patch.test.ts
...-components-errors/cache-components-console-patch.test.ts
+6
-5
index.test.js
test/integration/polyfills/test/index.test.js
+2
-2
No files found.
packages/next/src/build/progress.ts
View file @
b5599525
...
@@ -49,6 +49,10 @@ export const createProgress = (total: number, label: string) => {
...
@@ -49,6 +49,10 @@ export const createProgress = (total: number, label: string) => {
interval
:
200
,
interval
:
200
,
},
},
})
})
if
(
process
.
stdout
.
isTTY
)
{
// createSpinner logs the initial state, but doesn't do anything afterwards anyway.
progressSpinner
=
undefined
}
const
run
=
()
=>
{
const
run
=
()
=>
{
curProgress
++
curProgress
++
...
@@ -72,7 +76,7 @@ export const createProgress = (total: number, label: string) => {
...
@@ -72,7 +76,7 @@ export const createProgress = (total: number, label: string) => {
const
isFinished
=
curProgress
===
total
const
isFinished
=
curProgress
===
total
const
message
=
`
${
label
}
(
${
curProgress
}
/
${
total
}
)`
const
message
=
`
${
label
}
(
${
curProgress
}
/
${
total
}
)`
if
(
pro
cess
.
stdout
.
isTTY
&&
pro
gressSpinner
&&
!
isFinished
)
{
if
(
progressSpinner
&&
!
isFinished
)
{
progressSpinner
.
setText
(
message
)
progressSpinner
.
setText
(
message
)
}
else
{
}
else
{
progressSpinner
?.
stop
()
progressSpinner
?.
stop
()
...
@@ -87,7 +91,6 @@ export const createProgress = (total: number, label: string) => {
...
@@ -87,7 +91,6 @@ export const createProgress = (total: number, label: string) => {
const
clear
=
()
=>
{
const
clear
=
()
=>
{
if
(
if
(
process
.
stdout
.
isTTY
&&
progressSpinner
&&
progressSpinner
&&
// Ensure only reset and clear once to avoid set operation overflow in ora
// Ensure only reset and clear once to avoid set operation overflow in ora
progressSpinner
.
isSpinning
progressSpinner
.
isSpinning
...
...
test/e2e/app-dir/cache-components-errors/cache-components-console-patch.test.ts
View file @
b5599525
...
@@ -67,11 +67,12 @@ describe('Cache Components Errors', () => {
...
@@ -67,11 +67,12 @@ describe('Cache Components Errors', () => {
`
)
`
)
}
else
{
}
else
{
expect
(
output
).
toMatchInlineSnapshot
(
`
expect
(
output
).
toMatchInlineSnapshot
(
`
"[<timestamp>] This is a console log from a server component page
"[<timestamp>] This is a console log from a server component page
[<timestamp>] This is a console log from a server component page
[<timestamp>] This is a console log from a server component page
[<timestamp>] Collecting build traces ...
[<timestamp>] Collecting build traces ...
[<timestamp>]"
[<timestamp>] ✓ Collecting build traces in 3.1s
`
)
[<timestamp>]"
`
)
}
}
})
})
}
}
...
...
test/integration/polyfills/test/index.test.js
View file @
b5599525
...
@@ -51,8 +51,8 @@ describe('Polyfills', () => {
...
@@ -51,8 +51,8 @@ describe('Polyfills', () => {
it
(
'should contain generated page count in output'
,
async
()
=>
{
it
(
'should contain generated page count in output'
,
async
()
=>
{
expect
(
output
).
toContain
(
'Generating static pages (0/5)'
)
expect
(
output
).
toContain
(
'Generating static pages (0/5)'
)
expect
(
output
).
toContain
(
'Generating static pages (5/5)'
)
expect
(
output
).
toContain
(
'Generating static pages (5/5)'
)
// we should
only have 1 segment and the initial message logged out
// we should
have 4 segment, the initial message, and the final one with time
expect
(
output
.
match
(
/Generating static pages/g
).
length
).
toBe
(
5
)
expect
(
output
.
match
(
/Generating static pages/g
).
length
).
toBe
(
6
)
})
})
}
}
)
)
...
...
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