Skip to content
This repository was archived by the owner on Jan 20, 2022. It is now read-only.

Commit

Permalink
Merge branch 'gar/workspace-root' of github.com:npm/arborist into gar…
Browse files Browse the repository at this point in the history
…/workspace-root
  • Loading branch information
fritzy committed Sep 29, 2021
2 parents ed1e48a + 25b2db6 commit 3285397
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions lib/arborist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,24 @@ class Arborist extends Base {
return set
}

excludeWorkspacesDependencySet (tree) {
const set = new Set()
for (const edge of tree.edgesOut.values()) {
if (edge.type !== 'workspace' && edge.to) {
set.add(edge.to)
}
}
for (const node of set) {
for (const edge of node.edgesOut.values()) {
if (edge.to) {
set.add(edge.to)
}
}
}

return set
}

excludeWorkspacesDependencySet (tree) {
const set = new Set()
for (const edge of tree.edgesOut.values()) {
Expand Down

0 comments on commit 3285397

Please sign in to comment.