Skip to content

Commit 2b0f8e5

Browse files
committed
fix: prune optional peer dependencies from tree
1 parent 7f02c11 commit 2b0f8e5

File tree

2 files changed

+2
-905
lines changed

2 files changed

+2
-905
lines changed

workspaces/arborist/lib/arborist/build-ideal-tree.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1516,7 +1516,7 @@ This is a one-time fix-up, please be patient...
15161516

15171517
#idealTreePrune () {
15181518
for (const node of this.idealTree.inventory.values()) {
1519-
if (node.extraneous) {
1519+
if (node.extraneous || (node.peer && node.optional)) {
15201520
node.parent = null
15211521
}
15221522
}

0 commit comments

Comments
 (0)