fix bug with ranges with less than 3 digits
This commit is contained in:
parent
424bc36cb9
commit
2946f74d15
@ -327,8 +327,9 @@ function updatePackageJson(pkgStr, deps) {
|
||||
return newPkgStr;
|
||||
}
|
||||
|
||||
// "18.0" > "18.2.0"
|
||||
function updateRange(range, version) {
|
||||
return range.replace(/[0-9]+\.[0-9]+\.[0-9]+(-.+)?/g, version);
|
||||
return range.replace(/[0-9]+\.?[0-9]+?\.?[0-9]+?(-.+)?/g, version);
|
||||
}
|
||||
|
||||
function isVersionPrerelease(version) {
|
||||
|
Loading…
Reference in New Issue
Block a user