MCPcopy Create free account
hub / github.com/nodejs/node / exec

Method exec

deps/npm/lib/commands/prune.js:20–33  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18 static usage = ['[[<@scope>/]<pkg>...]']
19
20 async exec () {
21 const where = this.npm.prefix
22 const Arborist = require('@npmcli/arborist')
23 const { policy: allowScriptsPolicy } = await resolveAllowScripts(this.npm)
24 const opts = {
25 ...this.npm.flatOptions,
26 path: where,
27 workspaces: this.workspaceNames,
28 allowScripts: allowScriptsPolicy,
29 }
30 const arb = new Arborist(opts)
31 await arb.prune(opts)
32 await reifyFinish(this.npm, arb)
33 }
34}
35
36module.exports = Prune

Callers

nothing calls this directly

Calls 3

resolveAllowScriptsFunction · 0.85
reifyFinishFunction · 0.85
requireFunction · 0.50

Tested by

no test coverage detected