Only use semver.satisfies on valid ranges

So it doesn't alarm when you use a package straight from git e.g.
v1.18.x
Fokke Zandbergen 10 years ago
parent 1a6e576483
commit 36c27633b9

@ -27,7 +27,7 @@ module.exports = function(Meta) {
try {
var pkgData = JSON.parse(pkgData),
ok = semver.satisfies(pkgData.version, pkg.dependencies[module]);
ok = !semver.validRange(pkg.dependencies[module]) || semver.satisfies(pkgData.version, pkg.dependencies[module]);
if (ok || (pkgData._resolved && pkgData._resolved.indexOf('//github.com') !== -1)) {
next(true);

Loading…
Cancel
Save