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

Fixed bug in "npm show" #5011

Closed
wants to merge 14 commits into from
Closed

Conversation

lukaskuhn-lku
Copy link

This fixes an error in npm show. When calling npm show with a specific version of a package that does not exist, it does not show anything and gives a zero exit code. This has been changed: now it gives a 404 Error similar to if the package does not exist. Can be tested with npm show express@5.0.0 (local: node bin/npm-cli.js info express@5.0.0)

References

Fixes #4964

@lukaskuhn-lku lukaskuhn-lku requested a review from a team as a code owner June 12, 2022 19:56
lib/commands/view.js Outdated Show resolved Hide resolved
@lukaskuhn-lku
Copy link
Author

Tests are now running properly

lib/commands/view.js Outdated Show resolved Hide resolved
One space too many

Co-authored-by: Jordan Harband <ljharb@gmail.com>
@wraithgar
Copy link
Member

It looks like some debug logs accidentally got added?

@lukaskuhn-lku
Copy link
Author

Forgot to use single quotes. @wraithgar what do you mean exactly?

@@ -0,0 +1,30 @@
0 timing npm:load:whichnode Completed in 1ms
Copy link
Member

Choose a reason for hiding this comment

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

@lukaskuhn-lku these debug files

@@ -0,0 +1,30 @@
0 timing npm:load:whichnode Completed in 1ms
Copy link
Member

Choose a reason for hiding this comment

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

@lukaskuhn-lku these debug files

@lukaskuhn-lku
Copy link
Author

lukaskuhn-lku commented Jun 13, 2022

@wraithgar thanks, removed those files

@lukaskuhn-lku
Copy link
Author

Added test for the bug fix so coverage should be back at 100%

@wraithgar
Copy link
Member

Closing in favor of #5035, which is this PR with one commit added to fix tests. Thanks for making this PR!

@wraithgar wraithgar closed this Jun 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] npm info exits with zero exit code if package@version is not found
3 participants