fix(core): skip transitive deps on package json creation (#12851)

This commit is contained in:
Miroslav Jonaš 2022-10-27 18:59:00 +02:00 committed by GitHub
parent 9bdc2cabf8
commit c0e5fb6b60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -65,10 +65,12 @@ function findAllNpmDeps(
if (node) {
list[node.data.packageName] = node.data.version;
recursivelyCollectPeerDependencies(node.name, graph, list);
} else {
// we are not interested in the dependencies of external projects
graph.dependencies[projectName]?.forEach((dep) => {
findAllNpmDeps(dep.target, graph, list, seen);
});
}
graph.dependencies[projectName]?.forEach((dep) => {
findAllNpmDeps(dep.target, graph, list, seen);
});
return list;
}