Skip to content
Snippets Groups Projects
Commit 122c1674 authored by Rhys Arkins's avatar Rhys Arkins
Browse files

Fix semver calculations

parent 3955f862
Branches
No related tags found
No related merge requests found
...@@ -107,9 +107,9 @@ function getDependencyUpgrades(depName, currentVersion) { ...@@ -107,9 +107,9 @@ function getDependencyUpgrades(depName, currentVersion) {
function isRange(input) { function isRange(input) {
// Pinned versions also return true for semver.validRange // Pinned versions also return true for semver.validRange
// We need to check first that they're not 'valid' to get only ranges // We need to check first that they're not 'valid' to get only ranges
return !semver.valid(input) && semver.validRange(input); return (semver.valid(input) === null && semver.validRange(input) !== null);
} }
function isValidVersion(input) { function isValidVersion(input) {
return semver.valid(input) || semver.validRange(input); return (semver.valid(input) || semver.validRange(input)) !== null;
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment