Skip to content

Commit

Permalink
fix(package-graph): ensure to touch all nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
simllll committed Jul 7, 2022
1 parent c567a29 commit fd9bc57
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions core/package-graph/index.js
Expand Up @@ -232,10 +232,11 @@ class PackageGraph extends Map {
}

// Otherwise the same node is checked multiple times which is very wasteful in a large repository
if (alreadyVisited.has(topLevelDependent)) {
const identifier = `${baseNode.name}:${topLevelDependent.name}`;
if (alreadyVisited.has(identifier)) {
return;
}
alreadyVisited.add(topLevelDependent);
alreadyVisited.add(identifier);

if (
topLevelDependent === baseNode ||
Expand Down

0 comments on commit fd9bc57

Please sign in to comment.