Skip to content
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

chore(refactor): promisify completion scripts #2759

Closed
wants to merge 4 commits into from

Conversation

wraithgar
Copy link
Member

We also removed the "none" script because we handle a missing
script just fine. There is no need to put an empty one in

@wraithgar wraithgar requested a review from a team as a code owner February 23, 2021 00:00
@wraithgar
Copy link
Member Author

Looks like something in the last patch to npm brought in more fs.promises references. That'll have to be fixed before CI is green.

@darcyclarke darcyclarke added Release 7.x work is associated with a specific npm 7 release semver:patch semver patch level for changes labels Feb 23, 2021
Copy link
Contributor

@nlf nlf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is an excellent refactor to remove some weirdness

that said, we should pick one way to define the completion function and stick with it. we have currently

function (opts) {}
async function (opts) {}
opts => {}
(opts) => {}
async (opts) => {}

i think the last one makes the most sense to use as the canonical definition style since we use arrow functions for most things, and just always declaring it async is nice for consistency

@wraithgar
Copy link
Member Author

@nlf very good point. I tried to be aware of that when I was changing the tap functions (I think I got them to all be async t =>, but obviously forgot to do that to the actual function I was refactoring. I'll change that.

Copy link
Contributor

@nlf nlf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@wraithgar wraithgar added the release: next These items should be addressed in the next release label Feb 24, 2021
wraithgar and others added 4 commits February 25, 2021 09:44
When using `npm explain <package>` it's useful to see if the package has
been bundled. This is especially useful when trying to understand the
provenance of a package's content

PR-URL: #2750
Credit: @kumavis
Close: #2750
Reviewed-by: @nlf
We also removed the "none" script because we handle a missing
script just fine. There is no need to put an empty one in

PR-URL: #2759
Credit: @wraithgar
Close: #2759
Reviewed-by: @nlf
@wraithgar wraithgar closed this in 113b131 Feb 25, 2021
@wraithgar wraithgar deleted the gar/completion-refactor branch November 2, 2021 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release: next These items should be addressed in the next release Release 7.x work is associated with a specific npm 7 release semver:patch semver patch level for changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants