Read only dependencies of deep dependencies (not dev dependencies).

This commit is contained in:
André Cruz
2013-06-25 22:43:50 +01:00
parent d2494fb97d
commit 9af3a0d725

View File

@@ -659,8 +659,8 @@ Project.prototype._restoreNode = function (node, flattened, jsonKey) {
node.dependencies = node.dependencies || {};
node.dependants = node.dependants || {};
deps = mout.object.filter(node.pkgMeta[jsonKey], function (value) {
return !node.dependencies[value];
deps = mout.object.filter(node.pkgMeta[jsonKey], function (value, key) {
return !node.dependencies[key];
});
mout.object.forOwn(deps, function (value, key) {
@@ -698,11 +698,11 @@ Project.prototype._restoreNode = function (node, flattened, jsonKey) {
restored.dependants[node.name] = node;
// Call restore for this dependency
this._restoreNode(restored, flattened, jsonKey);
this._restoreNode(restored, flattened, 'dependencies');
// Do the same for the incompatible local package
if (local && restored !== local) {
this._restoreNode(local, flattened, jsonKey);
this._restoreNode(local, flattened, 'dependencies');
}
}, this);
};