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
a533dffb
Commit
a533dffb
authored
Oct 18, 2025
by
Niklas Mischkulnig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bigint
parent
76dddc43
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
spinner.ts
packages/next/src/build/spinner.ts
+6
-6
No files found.
packages/next/src/build/spinner.ts
View file @
a533dffb
import
ora
from
'next/dist/compiled/ora'
import
ora
from
'next/dist/compiled/ora'
import
*
as
Log
from
'./output/log'
import
*
as
Log
from
'./output/log'
import
{
hrtimeDurationToString
}
from
'./duration-to-string'
import
{
hrtime
BigInt
DurationToString
}
from
'./duration-to-string'
const
dotsSpinner
=
{
const
dotsSpinner
=
{
frames
:
[
'.'
,
'..'
,
'...'
],
frames
:
[
'.'
,
'..'
,
'...'
],
...
@@ -13,7 +13,7 @@ export default function createSpinner(
...
@@ -13,7 +13,7 @@ export default function createSpinner(
logFn
:
(...
data
:
any
[])
=>
void
=
console
.
log
logFn
:
(...
data
:
any
[])
=>
void
=
console
.
log
)
{
)
{
let
prefixText
=
`
${
Log
.
prefixes
.
info
}
${
text
}
`
let
prefixText
=
`
${
Log
.
prefixes
.
info
}
${
text
}
`
const
progressStart
=
process
.
hrtime
()
const
progressStart
=
process
.
hrtime
.
bigint
()
if
(
process
.
stdout
.
isTTY
)
{
if
(
process
.
stdout
.
isTTY
)
{
let
spinner
=
ora
({
let
spinner
=
ora
({
...
@@ -70,8 +70,8 @@ export default function createSpinner(
...
@@ -70,8 +70,8 @@ export default function createSpinner(
return
spinner
return
spinner
}
}
spinner
.
stopAndPersist
=
()
=>
{
spinner
.
stopAndPersist
=
()
=>
{
const
progressEnd
=
process
.
hrtime
(
progressStart
)
const
duration
=
process
.
hrtime
.
bigint
()
-
progressStart
text
=
`
${
text
}
in
${
hrtime
DurationToString
(
progressEnd
)}
`
text
=
`
${
text
}
in
${
hrtime
BigIntDurationToString
(
duration
)}
`
prefixText
=
`
${
Log
.
prefixes
.
info
}
${
text
}
`
prefixText
=
`
${
Log
.
prefixes
.
info
}
${
text
}
`
spinner
.
prefixText
=
prefixText
spinner
.
prefixText
=
prefixText
origStopAndPersist
()
origStopAndPersist
()
...
@@ -93,9 +93,9 @@ export default function createSpinner(
...
@@ -93,9 +93,9 @@ export default function createSpinner(
},
},
stop
:
()
=>
spinner
,
stop
:
()
=>
spinner
,
stopAndPersist
:
()
=>
{
stopAndPersist
:
()
=>
{
const
progressEnd
=
process
.
hrtime
(
progressStart
)
const
duration
=
process
.
hrtime
.
bigint
()
-
progressStart
logFn
(
logFn
(
`
${
Log
.
prefixes
.
event
}
${
text
}
in
${
hrtime
DurationToString
(
progressEnd
)}
`
`
${
Log
.
prefixes
.
event
}
${
text
}
in
${
hrtime
BigIntDurationToString
(
duration
)}
`
)
)
return
spinner
!
return
spinner
!
},
},
...
...
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