Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

buildNodePackage: fix issue with impure version handling (#30577)

authored by

b123400 and committed by
Robin Gloster
2cc79e95 97c5dfc5

+1 -1
+1 -1
pkgs/development/web/nodejs/build-node-package.nix
··· 145 145 function replaceImpureVersionSpec(versionSpec) { 146 146 var parsedUrl = url.parse(versionSpec); 147 147 148 - if(versionSpec == "latest" || versionSpec == "unstable" || 148 + if(versionSpec == "" || versionSpec == "latest" || versionSpec == "unstable" || 149 149 versionSpec.substr(0, 2) == ".." || dependency.substr(0, 2) == "./" || dependency.substr(0, 2) == "~/" || dependency.substr(0, 1) == '/' || /^[^/]+\/[^/]+$/.test(versionSpec)) 150 150 return '*'; 151 151 else if(parsedUrl.protocol == "git:" || parsedUrl.protocol == "git+ssh:" || parsedUrl.protocol == "git+http:" || parsedUrl.protocol == "git+https:" ||