@npmcli/arborist 6.2.9 → 6.2.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/arborist/reify.js +23 -11
- package/package.json +2 -9
package/lib/arborist/reify.js
CHANGED
|
@@ -483,17 +483,29 @@ module.exports = cls => class Reifier extends cls {
|
|
|
483
483
|
|
|
484
484
|
process.emit('time', 'reify:trashOmits')
|
|
485
485
|
|
|
486
|
-
const
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
this
|
|
486
|
+
for (const node of this.idealTree.inventory.values()) {
|
|
487
|
+
const { top } = node
|
|
488
|
+
|
|
489
|
+
// if the top is not the root or workspace then we do not want to omit it
|
|
490
|
+
if (!top.isProjectRoot && !top.isWorkspace) {
|
|
491
|
+
continue
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
// if a diff filter has been created, then we do not omit the node if the
|
|
495
|
+
// top node is not in that set
|
|
496
|
+
if (this.diff?.filterSet?.size && !this.diff.filterSet.has(top)) {
|
|
497
|
+
continue
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
// omit node if the dep type matches any omit flags that were set
|
|
501
|
+
if (
|
|
502
|
+
node.peer && this[_omitPeer] ||
|
|
503
|
+
node.dev && this[_omitDev] ||
|
|
504
|
+
node.optional && this[_omitOptional] ||
|
|
505
|
+
node.devOptional && this[_omitOptional] && this[_omitDev]
|
|
506
|
+
) {
|
|
507
|
+
this[_addNodeToTrashList](node)
|
|
508
|
+
}
|
|
497
509
|
}
|
|
498
510
|
|
|
499
511
|
process.emit('timeEnd', 'reify:trashOmits')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@npmcli/arborist",
|
|
3
|
-
"version": "6.2.
|
|
3
|
+
"version": "6.2.10",
|
|
4
4
|
"description": "Manage node_modules trees",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@isaacs/string-locale-compare": "^1.1.0",
|
|
@@ -41,7 +41,6 @@
|
|
|
41
41
|
"@npmcli/eslint-config": "^4.0.0",
|
|
42
42
|
"@npmcli/template-oss": "4.14.1",
|
|
43
43
|
"benchmark": "^2.1.4",
|
|
44
|
-
"chalk": "^4.1.0",
|
|
45
44
|
"minify-registry-metadata": "^3.0.0",
|
|
46
45
|
"nock": "^13.3.0",
|
|
47
46
|
"tap": "^16.3.4",
|
|
@@ -75,18 +74,12 @@
|
|
|
75
74
|
"bin": {
|
|
76
75
|
"arborist": "bin/index.js"
|
|
77
76
|
},
|
|
78
|
-
"//": "sk test-env locale to catch locale-specific sorting",
|
|
79
77
|
"tap": {
|
|
80
|
-
"color": true,
|
|
81
78
|
"after": "test/fixtures/cleanup.js",
|
|
82
79
|
"test-env": [
|
|
83
|
-
"NODE_OPTIONS=--no-warnings",
|
|
84
80
|
"LC_ALL=sk"
|
|
85
81
|
],
|
|
86
|
-
"
|
|
87
|
-
"--no-warnings",
|
|
88
|
-
"--no-deprecation"
|
|
89
|
-
],
|
|
82
|
+
"color": 1,
|
|
90
83
|
"timeout": "360",
|
|
91
84
|
"nyc-arg": [
|
|
92
85
|
"--exclude",
|