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

refactor deprecate command and add tests #2302

Merged
merged 1 commit into from Dec 8, 2020
Merged

Conversation

nlf
Copy link
Contributor

@nlf nlf commented Dec 8, 2020

refactoring was mostly for readability, but there are some important changes to completion.

notably, the api endpoint we were using to list packages doesn't exist so could never work. i adjusted it to use a method that works, and to filter the result set based on current partial user input. i'm not totally sure if the filtering is necessary, but it seems kind to do it in js-land instead of letting the shell deal with it when the number of packages could be significant

References

Closes npm/statusboard#146

@nlf nlf requested a review from a team as a code owner December 8, 2020 21:16
@darcyclarke darcyclarke added Release 7.x work is associated with a specific npm 7 release release: next These items should be addressed in the next release labels Dec 8, 2020
@ljharb
Copy link
Collaborator

ljharb commented Dec 8, 2020

When you say "list packages" - does that mean there's supposed to be a way for npm deprecate to list current deprecation messages? (I ask because I'd love to see https://npmjs.com/deprecations become obsolete). I could file an RFC for this if it's not a thing that's supposed to exist.

@nlf
Copy link
Contributor Author

nlf commented Dec 8, 2020

When you say "list packages" - does that mean there's supposed to be a way for npm deprecate to list current deprecation messages? (I ask because I'd love to see https://npmjs.com/deprecations become obsolete). I could file an RFC for this if it's not a thing that's supposed to exist.

ah, nope. this was for tab completion, npm deprecate <tab> was intended to list every package you have write access to but was broken, this fixes it.

what you're suggesting would need an RFC, but is a pretty easy one for implementation.

@ljharb
Copy link
Collaborator

ljharb commented Dec 8, 2020

Thanks, I'll add that to my list then.

@isaacs isaacs changed the base branch from latest to release/v7.1.1 December 8, 2020 23:29
@isaacs isaacs merged commit f682445 into release/v7.1.1 Dec 8, 2020
@imatlopez imatlopez mentioned this pull request Apr 5, 2021
@nlf nlf deleted the nlf/deprecate-tests branch March 28, 2022 16:22
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

v7(tests): deprecate
5 participants