Comparing version 2.0.0-beta.12 to 2.0.0-beta.13
@@ -125,11 +125,31 @@ "use strict"; | ||
if (!this.cache[packageName]) { | ||
this.cache[packageName] = {}; | ||
} | ||
if (this.cache[packageName][dependency] === "dependent") { | ||
return true; | ||
} else if (this.cache[packageName][dependency] === "visited") { | ||
return false; | ||
} | ||
var dependencies = this.packageGraph.get(packageName).dependencies; | ||
if (dependencies.indexOf(dependency) > -1) { | ||
this.cache[packageName][dependency] = "dependent"; | ||
return true; | ||
} | ||
return !!(0, _lodash2.default)(dependencies, function (dep) { | ||
return _this2.isPackageDependentOf(dep, dependency); | ||
this.cache[packageName][dependency] = "visited"; | ||
var hasSubDependents = false; | ||
dependencies.forEach(function (dep) { | ||
if (_this2.isPackageDependentOf(dep, dependency)) { | ||
_this2.cache[packageName][dependency] = "dependent"; | ||
hasSubDependents = true; | ||
} | ||
}); | ||
return hasSubDependents; | ||
} | ||
@@ -142,2 +162,3 @@ }, { | ||
var dependents = {}; | ||
this.cache = {}; | ||
@@ -144,0 +165,0 @@ this.packages.forEach(function (pkg) { |
{ | ||
"name": "lerna", | ||
"version": "2.0.0-beta.12", | ||
"version": "2.0.0-beta.13", | ||
"description": "Tool for managing JavaScript projects with multiple packages", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
113180
2281