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
cab4fc60
Unverified
Commit
cab4fc60
authored
Nov 19, 2025
by
Sebastian "Sebbie" Silbermann
Committed by
GitHub
Nov 19, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix log log alignment in spinners (#86298)
parent
a7b0b5fa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
spinner.ts
packages/next/src/build/spinner.ts
+3
-3
cache-components-console-patch.test.ts
...-components-errors/cache-components-console-patch.test.ts
+5
-5
No files found.
packages/next/src/build/spinner.ts
View file @
cab4fc60
...
@@ -13,7 +13,7 @@ export default function createSpinner(
...
@@ -13,7 +13,7 @@ export default function createSpinner(
)
{
)
{
let
spinner
:
undefined
|
(
ora
.
Ora
&
{
setText
:
(
text
:
string
)
=>
void
})
let
spinner
:
undefined
|
(
ora
.
Ora
&
{
setText
:
(
text
:
string
)
=>
void
})
let
prefixText
=
`
${
Log
.
prefixes
.
info
}
${
text
}
`
let
prefixText
=
`
${
Log
.
prefixes
.
info
}
${
text
}
`
if
(
process
.
stdout
.
isTTY
)
{
if
(
process
.
stdout
.
isTTY
)
{
spinner
=
ora
({
spinner
=
ora
({
...
@@ -60,7 +60,7 @@ export default function createSpinner(
...
@@ -60,7 +60,7 @@ export default function createSpinner(
}
}
spinner
.
setText
=
(
newText
)
=>
{
spinner
.
setText
=
(
newText
)
=>
{
text
=
newText
text
=
newText
prefixText
=
`
${
Log
.
prefixes
.
info
}
${
newText
}
`
prefixText
=
`
${
Log
.
prefixes
.
info
}
${
newText
}
`
spinner
!
.
prefixText
=
prefixText
spinner
!
.
prefixText
=
prefixText
return
spinner
!
return
spinner
!
}
}
...
@@ -71,7 +71,7 @@ export default function createSpinner(
...
@@ -71,7 +71,7 @@ export default function createSpinner(
}
}
spinner
.
stopAndPersist
=
()
=>
{
spinner
.
stopAndPersist
=
()
=>
{
// Add \r at beginning to reset the current line of loading status text
// Add \r at beginning to reset the current line of loading status text
const
suffixText
=
`\r
${
Log
.
prefixes
.
event
}
${
text
}
`
const
suffixText
=
`\r
${
Log
.
prefixes
.
event
}
${
text
}
`
if
(
spinner
)
{
if
(
spinner
)
{
spinner
.
text
=
suffixText
spinner
.
text
=
suffixText
}
else
{
}
else
{
...
...
test/e2e/app-dir/cache-components-errors/cache-components-console-patch.test.ts
View file @
cab4fc60
...
@@ -70,11 +70,11 @@ describe('Cache Components Errors', () => {
...
@@ -70,11 +70,11 @@ 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>]"
`
)
`
)
}
}
})
})
}
}
...
...
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