diff --git a/workspaces/arborist/lib/node.js b/workspaces/arborist/lib/node.js index c79bc0bd3a00b..abd54ffe9725a 100644 --- a/workspaces/arborist/lib/node.js +++ b/workspaces/arborist/lib/node.js @@ -1149,6 +1149,9 @@ class Node { for (const kid of node.children.values()) { kid.parent = this } + if (node.isLink && node.target) { + node.target.root = null + } } if (!node.isRoot) { diff --git a/workspaces/arborist/tap-snapshots/test/arborist/reify.js.test.cjs b/workspaces/arborist/tap-snapshots/test/arborist/reify.js.test.cjs index 49b02273ec59f..32b02494f7cf2 100644 --- a/workspaces/arborist/tap-snapshots/test/arborist/reify.js.test.cjs +++ b/workspaces/arborist/tap-snapshots/test/arborist/reify.js.test.cjs @@ -2228,19 +2228,6 @@ ArboristNode { "type": "prod", }, }, - "fsChildren": Set { - ArboristNode { - "dev": true, - "extraneous": true, - "location": "target", - "name": "target", - "optional": true, - "packageName": "ABBREV", - "path": "{CWD}/test/arborist/tap-testdir-reify-collide-case-variant-dep-names/target", - "peer": true, - "version": "1.0.0", - }, - }, "isProjectRoot": true, "location": "", "name": "tap-testdir-reify-collide-case-variant-dep-names", @@ -2275,19 +2262,6 @@ ArboristNode { "type": "prod", }, }, - "fsChildren": Set { - ArboristNode { - "dev": true, - "extraneous": true, - "location": "target", - "name": "target", - "optional": true, - "packageName": "ABBREV", - "path": "{CWD}/test/arborist/tap-testdir-reify-collide-case-variant-dep-names/target", - "peer": true, - "version": "1.0.0", - }, - }, "isProjectRoot": true, "location": "", "name": "tap-testdir-reify-collide-case-variant-dep-names",