From 42fe53b413527983f2509ae606412ee1e93761d7 Mon Sep 17 00:00:00 2001 From: isaacs Date: Tue, 17 Sep 2019 10:42:18 -0700 Subject: [PATCH] update minipass, pre-pause ReadEntry objects Need to start out paused to avoid auto-ending if they're empty. --- lib/read-entry.js | 4 ++++ package-lock.json | 6 +++--- package.json | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/read-entry.js b/lib/read-entry.js index aa369c74..8acee94b 100644 --- a/lib/read-entry.js +++ b/lib/read-entry.js @@ -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 diff --git a/package-lock.json b/package-lock.json index f0dce171..dc055de2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2126,9 +2126,9 @@ "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" }, "minipass": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.3.5.tgz", - "integrity": "sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==", + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.6.4.tgz", + "integrity": "sha512-D/+wBy2YykFsCcWvaIslCKKus5tqGQZ8MhEzNx4mujLNgHhXWaaUOZkok6/kztAlTt0QkYLEyIShrybNmzoeTA==", "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" diff --git a/package.json b/package.json index d70e2664..8a53a0a6 100644 --- a/package.json +++ b/package.json @@ -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",