Skip to content

Commit 822efb4

Browse files
committed
fix: rely on latest arborist properties
This was introduced in 2.1.0, it breaks tests locally for whatever reason, but passes in CI. `isProjectRoot` also checks for "dep === dep.root.target", which I assume is the correct and desired behavior.
1 parent 92f9179 commit 822efb4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/deps.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ internals.resolve = async ({ packageJson, lockfile }, options) => {
3131

3232
for (const dep of arborist.idealTree.inventory.values()) {
3333

34-
if (dep.root === dep) {
34+
if (dep.isProjectRoot) {
3535
// root node is not a dep, really
3636
continue;
3737
}
@@ -41,7 +41,7 @@ internals.resolve = async ({ packageJson, lockfile }, options) => {
4141
continue;
4242
}
4343

44-
if (!options.deep && ![...dep.edgesIn].some(({ from }) => from === arborist.idealTree)) {
44+
if (!options.deep && ![...dep.edgesIn].some(({ from }) => from.isProjectRoot)) {
4545
continue;
4646
}
4747

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
},
3737
"dependencies": {
3838
"@hapi/wreck": "^17.0.0",
39-
"@npmcli/arborist": "^2.0.0",
39+
"@npmcli/arborist": "^2.1.0",
4040
"@pkgjs/nv": "0.1.0",
4141
"debug": "^4.1.1",
4242
"git-url-parse": "^11.1.2",

0 commit comments

Comments
 (0)