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

fix: npm outdated parsing invalid specs #1857

Conversation

ruyadorno
Copy link
Contributor

This commit fixes a problem in which npm outdated was breaking when
trying to read an invalid semver range spec defined for a given
installed dep by performing the npm-package-arg parsing within a
try/catch block instead of expecting to read properties from the
returned instance.

Also, adds the missing test for that specific line of code and linted test/lib/outdated.js.

Fixes #1703

@ruyadorno ruyadorno requested a review from a team as a code owner September 24, 2020 20:09
@ruyadorno ruyadorno added the Release 7.x work is associated with a specific npm 7 release label Sep 24, 2020
@ruyadorno ruyadorno added this to the OSS - Sprint 15 milestone Sep 24, 2020
This commit fixes a problem in which npm outdated was breaking when
trying to read an invalid semver range spec defined for a given
installed dep by performing the `npm-package-arg` parsing within a
try/catch block instead of expecting to read properties from the
returned instance.

Also, adds the missing test for that specific line of code.

Fixes npm#1703
@ruyadorno ruyadorno force-pushed the fix-npm-outdated-parse-invalid-specs branch from 99ea8a5 to 84b5f6f Compare September 29, 2020 18:30
nlf pushed a commit that referenced this pull request Sep 29, 2020
This commit fixes a problem in which npm outdated was breaking when
trying to read an invalid semver range spec defined for a given
installed dep by performing the `npm-package-arg` parsing within a
try/catch block instead of expecting to read properties from the
returned instance.

Also, adds the missing test for that specific line of code.

Fixes #1703

PR-URL: #1857
Credit: @ruyadorno
Close: #1857
Reviewed-by: @nlf
nlf pushed a commit that referenced this pull request Sep 29, 2020
This commit fixes a problem in which npm outdated was breaking when
trying to read an invalid semver range spec defined for a given
installed dep by performing the `npm-package-arg` parsing within a
try/catch block instead of expecting to read properties from the
returned instance.

Also, adds the missing test for that specific line of code.

Fixes #1703

PR-URL: #1857
Credit: @ruyadorno
Close: #1857
Reviewed-by: @nlf
@ruyadorno ruyadorno closed this Sep 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

2 participants