/
usr
/
local
/
lib
/
node_modules
/
npm
/
node_modules
/
@npmcli
/
arborist
/
lib
/
/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib
mkdir
upload
Name
Size
Mode
Actions
arborist/
-
0755
rm
add-rm-pkg-deps.js
5008
0644
edit
dl
rm
audit-report.js
9619
0644
edit
dl
rm
calc-dep-flags.js
3359
0644
edit
dl
rm
can-place-dep.js
14273
0644
edit
dl
rm
case-insensitive-map.js
1239
0644
edit
dl
rm
consistent-resolve.js
1247
0644
edit
dl
rm
debug.js
1282
0644
edit
dl
rm
deepest-nesting-target.js
691
0644
edit
dl
rm
dep-valid.js
5128
0644
edit
dl
rm
diff.js
10327
0644
edit
dl
rm
edge.js
9988
0644
edit
dl
rm
from-path.js
1095
0644
edit
dl
rm
gather-dep-set.js
1286
0644
edit
dl
rm
index.js
273
0644
edit
dl
rm
inventory.js
3321
0644
edit
dl
rm
isolated-classes.js
2717
0644
edit
dl
rm
link.js
3114
0644
edit
dl
rm
node.js
49828
0644
edit
dl
rm
optional-set.js
1201
0644
edit
dl
rm
override-resolves.js
225
0644
edit
dl
rm
override-set.js
8773
0644
edit
dl
rm
packument-cache.js
2557
0644
edit
dl
rm
peer-entry-sets.js
2632
0644
edit
dl
rm
place-dep.js
20250
0644
edit
dl
rm
printable.js
5222
0644
edit
dl
rm
query-selector-all.js
30361
0644
edit
dl
rm
realpath.js
2655
0644
edit
dl
rm
relpath.js
136
0644
edit
dl
rm
reset-dep-flags.js
542
0644
edit
dl
rm
retire-path.js
501
0644
edit
dl
rm
shrinkwrap.js
37721
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
2991
0644
edit
dl
rm
tree-check.js
4142
0644
edit
dl
rm
version-from-tgz.js
1488
0644
edit
dl
rm
vuln.js
5958
0644
edit
dl
rm
yarn-lock.js
10813
0644
edit
dl
rm
Edit:
/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/from-path.js
(1095B)
// file dependencies need their dependencies resolved based on the location // where the tarball was found, not the location where they end up getting // installed. directory (ie, symlink) deps also need to be resolved based on // their targets, but that's what realpath is const { dirname } = require('node:path') const npa = require('npm-package-arg') const fromPath = (node, edge) => { if (edge && edge.overrides && edge.overrides.name === edge.name && edge.overrides.value) { // fromPath could be called with a node that has a virtual root, if that // happens we want to make sure we get the real root node when overrides // are in use. this is to allow things like overriding a dependency with a // tarball file that's a relative path from the project root if (node.sourceReference) { return node.sourceReference.root.realpath } return node.root.realpath } if (node.resolved) { const spec = npa(node.resolved) if (spec?.type === 'file') { return dirname(spec.fetchSpec) } } return node.realpath } module.exports = fromPath
Save
cmd:
run