mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-07-11 21:31:52 +02:00
Only use semver.satisfies on valid ranges
So it doesn't alarm when you use a package straight from git e.g.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user