Skip to content

Commit

Permalink
--greatest and --newest should default --pre.
Browse files Browse the repository at this point in the history
  • Loading branch information
raineorshine committed Nov 28, 2019
1 parent 0e368ba commit 4227b48
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/package-managers/npm.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ module.exports = {
})
.then(_.partialRight(_.pullAll, TIME_FIELDS))
.then(versions =>
_.last(filterOutPrereleaseVersions(versions, options.pre))
_.last(filterOutPrereleaseVersions(versions, options.pre == null || options.pre))
);
},

Expand All @@ -245,7 +245,7 @@ module.exports = {
.then(versions =>
_.last(filterOutPrereleaseVersions(
doesSatisfyEnginesNode(versions, options.enginesNode),
options.pre)
options.pre == null || options.pre)
.sort(versionUtil.compareVersions)
)
);
Expand Down

0 comments on commit 4227b48

Please sign in to comment.