Content-Length: 336772 | pFad | http://github.com/npm/cli/commit/c629c52547d21648759f8930cb634cba9216405f

E1 fix: pass arborist constructor to manifest call · npm/cli@c629c52 · GitHub
Skip to content

Commit c629c52

Browse files
committed
fix: pass arborist constructor to manifest call
1 parent 534ad77 commit c629c52

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

lib/commands/pack.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,13 @@ class Pack extends BaseCommand {
2929
const unicode = this.npm.config.get('unicode')
3030
const json = this.npm.config.get('json')
3131

32+
const Arborist = require('@npmcli/arborist')
3233
// Get the manifests and filenames first so we can bail early on manifest
3334
// errors before making any tarballs
3435
const manifests = []
3536
for (const arg of args) {
3637
const spec = npa(arg)
37-
const manifest = await pacote.manifest(spec, this.npm.flatOptions)
38+
const manifest = await pacote.manifest(spec, { ...this.npm.flatOptions, Arborist })
3839
if (!manifest._id) {
3940
throw new Error('Invalid package, must have name and version')
4041
}

workspaces/libnpmexec/lib/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const manifests = new Map()
2424

2525
const getManifest = async (spec, flatOptions) => {
2626
if (!manifests.has(spec.raw)) {
27-
const manifest = await pacote.manifest(spec, { ...flatOptions, preferOnline: true })
27+
const manifest = await pacote.manifest(spec, { ...flatOptions, preferOnline: true, Arborist })
2828
manifests.set(spec.raw, manifest)
2929
}
3030
return manifests.get(spec.raw)

workspaces/libnpmpack/lib/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ async function pack (spec = 'file:.', opts = {}) {
1212
// gets spec
1313
spec = npa(spec)
1414

15-
const manifest = await pacote.manifest(spec, opts)
15+
const manifest = await pacote.manifest(spec, { ...opts, Arborist })
1616

1717
const stdio = opts.foregroundScripts ? 'inherit' : 'pipe'
1818

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/npm/cli/commit/c629c52547d21648759f8930cb634cba9216405f

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy