Skip to content

Commit

Permalink
update minipass, pre-pause ReadEntry objects
Browse files Browse the repository at this point in the history
Need to start out paused to avoid auto-ending if they're empty.
  • Loading branch information
isaacs committed Sep 17, 2019
1 parent 4a9069a commit 42fe53b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions lib/read-entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ const SLURP = Symbol('slurp')
module.exports = class ReadEntry extends MiniPass {
constructor (header, ex, gex) {
super()
// read entries always start life paused. this is to avoid the
// situation where Minipass's auto-ending empty streams results
// in an entry ending before we're ready for it.
this.pause()
this.extended = ex
this.globalExtended = gex
this.header = header
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"dependencies": {
"chownr": "^1.1.1",
"fs-minipass": "^1.2.5",
"minipass": "^2.3.5",
"minipass": "^2.6.4",
"minizlib": "^1.2.1",
"mkdirp": "^0.5.0",
"safe-buffer": "^5.1.2",
Expand Down

0 comments on commit 42fe53b

Please sign in to comment.