/
home2
/
dakshskx
/
nodejs
/
lib
/
node_modules
/
npm
/
node_modules
/
@npmcli
/
arborist
/
lib
/
/home2/dakshskx/nodejs/lib/node_modules/npm/node_modules/@npmcli/arborist/lib
mkdir
upload
Name
Size
Mode
Actions
arborist/
-
0755
rm
add-rm-pkg-deps.js
5010
0644
edit
dl
rm
audit-report.js
12282
0644
edit
dl
rm
calc-dep-flags.js
3148
0644
edit
dl
rm
can-place-dep.js
14273
0644
edit
dl
rm
case-insensitive-map.js
1356
0644
edit
dl
rm
consistent-resolve.js
1432
0644
edit
dl
rm
debug.js
1228
0644
edit
dl
rm
deepest-nesting-target.js
691
0644
edit
dl
rm
dep-valid.js
4990
0644
edit
dl
rm
diff.js
9798
0644
edit
dl
rm
edge.js
6983
0644
edit
dl
rm
from-path.js
1069
0644
edit
dl
rm
gather-dep-set.js
1286
0644
edit
dl
rm
get-workspace-nodes.js
863
0644
edit
dl
rm
index.js
353
0644
edit
dl
rm
inventory.js
3272
0644
edit
dl
rm
link.js
3691
0644
edit
dl
rm
node.js
44093
0644
edit
dl
rm
optional-set.js
1353
0644
edit
dl
rm
override-resolves.js
230
0644
edit
dl
rm
override-set.js
2603
0644
edit
dl
rm
peer-entry-sets.js
2632
0644
edit
dl
rm
place-dep.js
20207
0644
edit
dl
rm
printable.js
5217
0644
edit
dl
rm
query-selector-all.js
16827
0644
edit
dl
rm
realpath.js
2737
0644
edit
dl
rm
relpath.js
131
0644
edit
dl
rm
reset-dep-flags.js
638
0644
edit
dl
rm
retire-path.js
491
0644
edit
dl
rm
shrinkwrap.js
37913
0644
edit
dl
rm
signal-handling.js
2245
0644
edit
dl
rm
signals.js
1381
0644
edit
dl
rm
spec-from-lock.js
874
0644
edit
dl
rm
tracker.js
3373
0644
edit
dl
rm
tree-check.js
4121
0644
edit
dl
rm
version-from-tgz.js
1489
0644
edit
dl
rm
vuln.js
5858
0644
edit
dl
rm
yarn-lock.js
10289
0644
edit
dl
rm
Edit:
/home2/dakshskx/nodejs/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/optional-set.js
(1353B)
// when an optional dep fails to install, we need to remove the branch of the // graph up to the first optionalDependencies, as well as any nodes that are // only required by other nodes in the set. // // This function finds the set of nodes that will need to be removed in that // case. // // Note that this is *only* going to work with trees where calcDepFlags // has been called, because we rely on the node.optional flag. const gatherDepSet = require('./gather-dep-set.js') const optionalSet = node => { if (!node.optional) { return new Set() } // start with the node, then walk up the dependency graph until we // get to the boundaries that define the optional set. since the // node is optional, we know that all paths INTO this area of the // graph are optional, but there may be non-optional dependencies // WITHIN the area. const set = new Set([node]) for (const node of set) { for (const edge of node.edgesIn) { if (!edge.optional) { set.add(edge.from) } } } // now that we've hit the boundary, gather the rest of the nodes in // the optional section. that's the set of dependencies that are only // depended upon by other nodes within the set, or optional dependencies // from outside the set. return gatherDepSet(set, edge => !edge.optional) } module.exports = optionalSet
Save
cmd:
run