fix: adapt for semver to version 7.3.2

see https://github.com/npm/node-semver/issues/322
This commit is contained in:
Gregor Martynus
2020-04-16 13:54:47 -07:00
parent 93cb76653d
commit 0363790b8a
2 changed files with 13 additions and 11 deletions
+3 -1
View File
@@ -33,7 +33,9 @@ function isMaintenanceRange(range) {
function getUpperBound(range) {
return semver.valid(range)
? range
: ((semver.validRange(range) || '').match(/<(?<upperBound>\d+\.\d+\.\d+)$/) || [])[1];
: ((semver.validRange(range) || '').match(/<(?<upperBound>\d+\.\d+\.\d+-\d+)$/) || [])[1]
// https://github.com/npm/node-semver/issues/322
.replace(/-\d+$/, '');
}
function getLowerBound(range) {