@npmcli/arborist 2.7.0 → 2.8.2
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/bin/dedupe.js +46 -0
- package/lib/arborist/build-ideal-tree.js +126 -698
- package/lib/arborist/load-actual.js +4 -2
- package/lib/arborist/reify.js +190 -54
- package/lib/can-place-dep.js +402 -0
- package/lib/case-insensitive-map.js +48 -0
- package/lib/deepest-nesting-target.js +16 -0
- package/lib/edge.js +4 -2
- package/lib/node.js +60 -12
- package/lib/peer-entry-sets.js +72 -0
- package/lib/place-dep.js +551 -0
- package/lib/printable.js +10 -0
- package/lib/shrinkwrap.js +7 -3
- package/package.json +7 -5
- package/lib/peer-set.js +0 -25
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@npmcli/arborist",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.8.2",
|
|
4
4
|
"description": "Manage node_modules trees",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@npmcli/installed-package-contents": "^1.0.7",
|
|
@@ -16,20 +16,22 @@
|
|
|
16
16
|
"common-ancestor-path": "^1.0.1",
|
|
17
17
|
"json-parse-even-better-errors": "^2.3.1",
|
|
18
18
|
"json-stringify-nice": "^1.1.4",
|
|
19
|
+
"mkdirp": "^1.0.4",
|
|
19
20
|
"mkdirp-infer-owner": "^2.0.0",
|
|
20
21
|
"npm-install-checks": "^4.0.0",
|
|
21
|
-
"npm-package-arg": "^8.1.
|
|
22
|
+
"npm-package-arg": "^8.1.5",
|
|
22
23
|
"npm-pick-manifest": "^6.1.0",
|
|
23
24
|
"npm-registry-fetch": "^11.0.0",
|
|
24
|
-
"pacote": "^11.
|
|
25
|
+
"pacote": "^11.3.5",
|
|
25
26
|
"parse-conflict-json": "^1.1.1",
|
|
26
27
|
"proc-log": "^1.0.0",
|
|
27
28
|
"promise-all-reject-late": "^1.0.0",
|
|
28
29
|
"promise-call-limit": "^1.0.1",
|
|
29
30
|
"read-package-json-fast": "^2.0.2",
|
|
30
31
|
"readdir-scoped-modules": "^1.1.0",
|
|
32
|
+
"rimraf": "^3.0.2",
|
|
31
33
|
"semver": "^7.3.5",
|
|
32
|
-
"
|
|
34
|
+
"ssri": "^8.0.1",
|
|
33
35
|
"treeverse": "^1.0.4",
|
|
34
36
|
"walk-up-path": "^1.0.0"
|
|
35
37
|
},
|
|
@@ -50,7 +52,7 @@
|
|
|
50
52
|
"test-only": "tap",
|
|
51
53
|
"posttest": "npm run lint",
|
|
52
54
|
"snap": "tap",
|
|
53
|
-
"postsnap": "npm run
|
|
55
|
+
"postsnap": "npm run lintfix",
|
|
54
56
|
"test-proxy": "ARBORIST_TEST_PROXY=1 tap --snapshot",
|
|
55
57
|
"preversion": "npm test",
|
|
56
58
|
"postversion": "npm publish",
|
package/lib/peer-set.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
// when we have to dupe a set of peer dependencies deeper into the tree in
|
|
2
|
-
// order to make room for a dep that would otherwise conflict, we use
|
|
3
|
-
// this to get the set of all deps that have to be checked to ensure
|
|
4
|
-
// nothing is locking them into the current location.
|
|
5
|
-
//
|
|
6
|
-
// this is different in its semantics from an "optional set" (ie, the nodes
|
|
7
|
-
// that should be removed if an optional dep fails), because in this case,
|
|
8
|
-
// we specifically intend to include deps in the peer set that have
|
|
9
|
-
// dependants outside the set.
|
|
10
|
-
const peerSet = node => {
|
|
11
|
-
const set = new Set([node])
|
|
12
|
-
for (const node of set) {
|
|
13
|
-
for (const edge of node.edgesOut.values()) {
|
|
14
|
-
if (edge.valid && edge.peer && edge.to)
|
|
15
|
-
set.add(edge.to)
|
|
16
|
-
}
|
|
17
|
-
for (const edge of node.edgesIn) {
|
|
18
|
-
if (edge.valid && edge.peer)
|
|
19
|
-
set.add(edge.from)
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
return set
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
module.exports = peerSet
|