Skip to content
Permalink
Browse files
fix: pass prefix and workspaces to libnpmpack (#4917)
  • Loading branch information
nlf committed May 19, 2022
1 parent dc38ab9 commit 357b0af2af2b07a58d2d837043d1d77c9495d8b5
Showing 2 changed files with 11 additions and 2 deletions.
@@ -44,7 +44,11 @@ class Pack extends BaseCommand {
// noise generated during packing
const tarballs = []
for (const { arg, manifest } of manifests) {
const tarballData = await libpack(arg, this.npm.flatOptions)
const tarballData = await libpack(arg, {
...this.npm.flatOptions,
prefix: this.npm.localPrefix,
workspaces: this.workspacePaths,
})
const pkgContents = await getContents(manifest, tarballData)
tarballs.push(pkgContents)
}
@@ -80,7 +80,12 @@ class Publish extends BaseCommand {
}

// we pass dryRun: true to libnpmpack so it doesn't write the file to disk
const tarballData = await pack(spec, { ...opts, dryRun: true })
const tarballData = await pack(spec, {
...opts,
dryRun: true,
prefix: this.npm.localPrefix,
workspaces: this.workspacePaths,
})
const pkgContents = await getContents(manifest, tarballData)

// The purpose of re-reading the manifest is in case it changed,

0 comments on commit 357b0af

Please sign in to comment.