buildNodePackage: fix issue with impure version handling (#30577)
This commit is contained in:
parent
97c5dfc55e
commit
2cc79e95f8
@ -145,7 +145,7 @@ let
|
|||||||
function replaceImpureVersionSpec(versionSpec) {
|
function replaceImpureVersionSpec(versionSpec) {
|
||||||
var parsedUrl = url.parse(versionSpec);
|
var parsedUrl = url.parse(versionSpec);
|
||||||
|
|
||||||
if(versionSpec == "latest" || versionSpec == "unstable" ||
|
if(versionSpec == "" || versionSpec == "latest" || versionSpec == "unstable" ||
|
||||||
versionSpec.substr(0, 2) == ".." || dependency.substr(0, 2) == "./" || dependency.substr(0, 2) == "~/" || dependency.substr(0, 1) == '/' || /^[^/]+\/[^/]+$/.test(versionSpec))
|
versionSpec.substr(0, 2) == ".." || dependency.substr(0, 2) == "./" || dependency.substr(0, 2) == "~/" || dependency.substr(0, 1) == '/' || /^[^/]+\/[^/]+$/.test(versionSpec))
|
||||||
return '*';
|
return '*';
|
||||||
else if(parsedUrl.protocol == "git:" || parsedUrl.protocol == "git+ssh:" || parsedUrl.protocol == "git+http:" || parsedUrl.protocol == "git+https:" ||
|
else if(parsedUrl.protocol == "git:" || parsedUrl.protocol == "git+ssh:" || parsedUrl.protocol == "git+http:" || parsedUrl.protocol == "git+https:" ||
|
||||||
|
Loading…
x
Reference in New Issue
Block a user