Skip to content

Commit

Permalink
fix: pass prefix and workspaces to npm-packlist (#173)
Browse files Browse the repository at this point in the history
  • Loading branch information
nlf authored May 19, 2022
1 parent 5e619da commit 6de3a2b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/dir.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,12 @@ class DirFetcher extends Fetcher {
stream.resolved = this.resolved
stream.integrity = this.integrity

const { prefix, workspaces } = this.opts

// run the prepare script, get the list of files, and tar it up
// pipe to the stream, and proxy errors the chain.
this[_prepareDir]()
.then(() => packlist({ path: this.resolved }))
.then(() => packlist({ path: this.resolved, prefix, workspaces }))
.then(files => tar.c(tarCreateOptions(this.package), files)
.on('error', er => stream.emit('error', er)).pipe(stream))
.catch(er => stream.emit('error', er))
Expand Down

0 comments on commit 6de3a2b

Please sign in to comment.