-
Notifications
You must be signed in to change notification settings - Fork 2.5k
cleanup(core): migrate to nanospinner #29138
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
base: master
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
View your CI Pipeline Execution ↗ for commit 356e47f.
☁️ Nx Cloud last updated this comment at |
@43081j I was thinking we would go for Please could you confirm this library does not have this issue? (Should be able to modify the linked stackblitz) and how the two libraries compare? |
I'll take a look when I can 👍 The two libraries are pretty well aligned, so it comes mostly down to personal preference. picospinner is a bit more customisable Both maintainers are active in our community too, so you really could just flip a coin here 😅 |
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.
@43081j I added picospinner to my comparison with ora and nanospinner:
https://stackblitz.com/edit/stackblitz-starters-dmnx9n?file=package.json&view=editor
It seems like it doesn't actually allow for the error handling at all. Maybe it is calling process.exit itself?
- ora: works as expected but bloated
- nanospinner: has double printing issue on exit
- picospinner: does not allow for exceptions to be handled
We cannot proceed until one of nanospinner
or picospinner
matches the functionality/robustness of ora I'm afraid
All good, I'll look into this today or tomorrow 👍 I'm mobile at the minute so can't dig into it but I'll figure it out once I'm at a laptop |
Hi @43081j, Following up on this one: With the latest versions of ![]() It's because usmanyunusov/nanospinner#32 was explicitly addressed. tinylibs/picospinner#5 remains in limbo somewhat. I think we could probably press ahead with |
its been a while so i forget what the disagreement was, but as far as i remember, it was because none of these spinners should really allow output while they're enabled when the spinner is enabled, you wouldn't expect output to occur (because we're outputting the spinner frames). errors are no different and shouldn't output either. picospinner seems to be doing the right thing here and we're wrong for not stopping the spinner before outputting errors. however, that does make your try/catch a little more verbose, so i understand why ora and nanospinner would add special behaviour for it. we should go with nanospinner for that reason |
53fa439
to
522875f
Compare
i've rebased and updated to use nanospinner 👍 |
Awesome, thanks! Please can we add the usual lint import check to prevent regressions |
Migrates from `ora` to `nanospinner`, a much lighter package.
Migrates from
ora
tonanospinner
, a much lighter package.this should roughly be a drop in replacement and will be faster/lighter