-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(gatsby-cli): fix timers on progress bar #28684
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works ;) left one suggestion but feel free to to ignore
@@ -93,15 +93,27 @@ export function initializeYurnalistLogger(): void { | |||
activities[action.payload.id] = activity | |||
} else if (action.payload.type === ActivityTypes.Progress) { | |||
const bar = new ProgressBar( | |||
` [:bar] :current/:total :elapsed s :percent ${action.payload.text}`, | |||
` [:bar] :current/:total :elapsed s :rate /s :percent ${action.payload.text}`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit (feel free to ignore)
` [:bar] :current/:total :elapsed s :rate /s :percent ${action.payload.text}`, | |
` [:bar] :current/:total :elapseds :rate/s :percent ${action.payload.text}`, |
extra space there make it look a bit weird (like it was something separate) - this change does in fact result in
-[=====-------------------------] 18/100 1.5 s 12 /s 18% test #1
+[=====-------------------------] 18/100 1.5s 12/s 18% test #1
"postfixes" are "attached" to their numbers which to me make it more clear what those are (IMO)
but up to you and feel free to ignore
This PR fixes something I've seen for a while now. The progress bar in yurnalist (CI=1) will not show you an ETA or total runtime of the progress bar. It remains zero.
Apparently this is caused by a bug by setting
curr
when creating the progress bar. See visionmedia/node-progress#81The workaround is to call
bar.tick(n)
instead. This will cause an incorrect eta when starting from non-zero but at least it'll show you something, and show you the current runtime.Looking at the repo, I'm not expecting any more fixes for this package.