Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/@npmcli/arborist/lib/node.js')
-rw-r--r--node_modules/@npmcli/arborist/lib/node.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/node_modules/@npmcli/arborist/lib/node.js b/node_modules/@npmcli/arborist/lib/node.js
index 884a77dca..f59847936 100644
--- a/node_modules/@npmcli/arborist/lib/node.js
+++ b/node_modules/@npmcli/arborist/lib/node.js
@@ -348,6 +348,14 @@ class Node {
return !!this.getBundler()
}
+ // when reifying, if a package is technically in a bundleDependencies list,
+ // but that list is the root project, we still have to install it. This
+ // getter returns true if it's in a dependency's bundle list, not the root's.
+ get inDepBundle () {
+ const bundler = this.getBundler()
+ return !!bundler && bundler !== this.root
+ }
+
get isRoot () {
return this === this.root
}