refactor: migrate spinner to use import/export - #2366
Merged
1 commit merged intoNov 18, 2021
Merged
Conversation
Contributor
|
ghost
marked this pull request as ready for review
November 16, 2021 13:49
ghost
self-requested a review
as a code owner
November 16, 2021 13:49
ghost
self-requested a review
November 16, 2021 13:49
ghost
self-requested a review
as a code owner
November 16, 2021 13:49
ghost
requested review from
ArturSnyk,
JamesPatrickGill,
mika-bar and
muscar
November 16, 2021 13:49
maxjeffos
reviewed
Nov 16, 2021
maxjeffos
reviewed
Nov 16, 2021
maxjeffos
approved these changes
Nov 16, 2021
maxjeffos
left a comment
Contributor
There was a problem hiding this comment.
Made a couple suggestions but approved it.
ghost
force-pushed
the
refactor/spinner-esm
branch
from
November 18, 2021 17:23
6d3c21f to
9f6d514
Compare
ghost
force-pushed
the
refactor/spinner-esm
branch
from
November 18, 2021 17:28
9f6d514 to
e575119
Compare
Arvi3d
approved these changes
Nov 18, 2021
This pull request was closed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Considering NodeJS more or less supports ES modules now natively, I was checking to see how close we are to building CLI using ES modules. The only thing stopping us TypeScript-wise seems to be the
spinnermodule. So I've migrated that. The only thing left after this is the various JS modules.Notes
There's some odd logic around
isRequired. I think this was for tests and import flows which we no longer provide. So it's no longer needed. See: #2371The
isCIcheck is also kind of weird. It looks like we can check the environment if it's TTY instead to decide whether or not to render the spinner. Kind of like how we render colours.I don't want to get too deep into improving
spinner's code/types as we may want to replace it with a library. Especially if we want to show better progress updates (e.g. percentages, fractions, etc.).