Skip to content

Commit

Permalink
install: skip deprecated versions when possible
Browse files Browse the repository at this point in the history
`[email protected]` included a change that makes it skip deprecated
versions when possible even if they would otherwise be the best semver range
match.

npm/npm@3aaa6ef
already uses `npm-pick-manifest` in such a way, and this patch guarantees that `pacote` itself
picks up this behavior as well (for `install`), since it defaults to including deprecated versions if
this option isn't passed through.

The patch for pacote to change this behavior can come later.

PR-URL: npm/npm#20151
Credit: @zkat
Reviewed-By: @iarna
  • Loading branch information
zkat authored and iarna committed Mar 23, 2018
1 parent 54de9a8 commit 78bebc0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/config/pacote.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ function pacoteOpts (moreOpts) {
defaultTag: npm.config.get('tag'),
dirPacker: pack.packGitDep,
hashAlgorithm: 'sha1',
includeDeprecated: false,
key: npm.config.get('key'),
localAddress: npm.config.get('local-address'),
log: log,
Expand Down

0 comments on commit 78bebc0

Please sign in to comment.