Content-Length: 338694 | pFad | http://github.com/npm/cli/commit/d79c6de1183de2b5e74ad3835e6efd7773234cc2

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

Commit d79c6de

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

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
@@ -4,6 +4,7 @@ const npa = require('npm-package-arg')
44
const { log, output } = require('proc-log')
55
const { getContents, logTar } = require('../utils/tar.js')
66
const BaseCommand = require('../base-cmd.js')
7+
const Arborist = require('@npmcli/arborist')
78

89
class Pack extends BaseCommand {
910
static description = 'Create a tarball from a package'
@@ -34,7 +35,7 @@ class Pack extends BaseCommand {
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/d79c6de1183de2b5e74ad3835e6efd7773234cc2

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy