diff options
Diffstat (limited to 'node_modules/@npmcli/arborist/lib/calc-dep-flags.js')
-rw-r--r-- | node_modules/@npmcli/arborist/lib/calc-dep-flags.js | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/node_modules/@npmcli/arborist/lib/calc-dep-flags.js b/node_modules/@npmcli/arborist/lib/calc-dep-flags.js index 3d612607a..73f1e60d7 100644 --- a/node_modules/@npmcli/arborist/lib/calc-dep-flags.js +++ b/node_modules/@npmcli/arborist/lib/calc-dep-flags.js @@ -1,10 +1,12 @@ const { depth } = require('treeverse') -const calcDepFlags = tree => { - tree.dev = false - tree.optional = false - tree.devOptional = false - tree.peer = false +const calcDepFlags = (tree, resetRoot = true) => { + if (resetRoot) { + tree.dev = false + tree.optional = false + tree.devOptional = false + tree.peer = false + } const ret = depth({ tree, visit: node => calcDepFlagsStep(node), |