PATH:
usr
/
lib
/
node_modules
/
npm
/
lib
/
utils
const { resolve } = require('node:path') const localeCompare = require('@isaacs/string-locale-compare')('en') const installedDeep = async (npm) => { const Arborist = require('@npmcli/arborist') const { depth, global, prefix, workspacesEnabled, } = npm.flatOptions const getValues = (tree) => [...tree.inventory.values()] .filter(i => i.location !== '' && !i.isRoot) .map(i => { return i }) .filter(i => (i.depth - 1) <= depth) .sort((a, b) => (a.depth - b.depth) || localeCompare(a.name, b.name)) const res = new Set() const gArb = new Arborist({ global: true, path: resolve(npm.globalDir, '..'), workspacesEnabled, }) const gTree = await gArb.loadActual({ global: true }) for (const node of getValues(gTree)) { res.add(global ? node.name : [node.name, '-g']) } if (!global) { const arb = new Arborist({ global: false, path: prefix, workspacesEnabled }) const tree = await arb.loadActual() for (const node of getValues(tree)) { res.add(node.name) } } return [...res] } module.exports = installedDeep
[-] verify-signatures.js
[edit]
[-] format.js
[edit]
[-] completion.fish
[edit]
[-] validate-lockfile.js
[edit]
[-] display.js
[edit]
[-] installed-shallow.js
[edit]
[-] format-search-stream.js
[edit]
[-] tar.js
[edit]
[-] sbom-spdx.js
[edit]
[-] update-workspaces.js
[edit]
[-] explain-dep.js
[edit]
[-] npm-usage.js
[edit]
[-] log-file.js
[edit]
[-] sbom-cyclonedx.js
[edit]
[-] open-url.js
[edit]
[-] get-workspaces.js
[edit]
[-] format-bytes.js
[edit]
[-] did-you-mean.js
[edit]
[-] audit-error.js
[edit]
[-] get-identity.js
[edit]
[-] output-error.js
[edit]
[-] error-message.js
[edit]
[-] reify-finish.js
[edit]
[-] queryable.js
[edit]
[+]
..
[-] timers.js
[edit]
[-] auth.js
[edit]
[-] cmd-list.js
[edit]
[-] explain-eresolve.js
[edit]
[-] reify-output.js
[edit]
[-] installed-deep.js
[edit]
[-] ping.js
[edit]
[-] completion.sh
[edit]
[-] read-user-info.js
[edit]
[-] is-windows.js
[edit]