From 7e04f728cc4cd4853a8fc99e2df0a12988897589 Mon Sep 17 00:00:00 2001 From: Michael Perrotte Date: Tue, 24 Sep 2019 15:40:44 -0400 Subject: tar@4.4.12 --- node_modules/minizlib/index.js | 13 +++++++++++-- node_modules/minizlib/package.json | 12 ++++++------ 2 files changed, 17 insertions(+), 8 deletions(-) (limited to 'node_modules/minizlib') diff --git a/node_modules/minizlib/index.js b/node_modules/minizlib/index.js index df486965c..1385dc236 100644 --- a/node_modules/minizlib/index.js +++ b/node_modules/minizlib/index.js @@ -60,6 +60,7 @@ const _flushFlag = Symbol('flushFlag') const _finishFlush = Symbol('finishFlush') const _handle = Symbol('handle') const _onError = Symbol('onError') +const _sawError = Symbol('sawError') const _level = Symbol('level') const _strategy = Symbol('strategy') const _ended = Symbol('ended') @@ -119,6 +120,7 @@ class Zlib extends MiniPass { this[_handle] = new realZlib[mode](opts) this[_onError] = (err) => { + this[_sawError] = true // there is no way to cleanly recover. // continuing only obscures problems. this.close() @@ -152,6 +154,9 @@ class Zlib extends MiniPass { } params (level, strategy) { + if (this[_sawError]) + return + if (!this[_handle]) throw new Error('cannot switch params when binding is closed') @@ -190,8 +195,10 @@ class Zlib extends MiniPass { } reset () { - assert(this[_handle], 'zlib binding closed') - return this[_handle].reset() + if (!this[_sawError]) { + assert(this[_handle], 'zlib binding closed') + return this[_handle].reset() + } } flush (kind) { @@ -228,6 +235,8 @@ class Zlib extends MiniPass { if (typeof chunk === 'string') chunk = Buffer.from(chunk, encoding) + if (this[_sawError]) + return assert(this[_handle], 'zlib binding closed') // _processChunk tries to .close() the native handle after it's done, so we diff --git a/node_modules/minizlib/package.json b/node_modules/minizlib/package.json index 0e6e4f467..fbf08b3df 100644 --- a/node_modules/minizlib/package.json +++ b/node_modules/minizlib/package.json @@ -1,8 +1,8 @@ { "_from": "minizlib@^1.2.1", - "_id": "minizlib@1.2.1", + "_id": "minizlib@1.2.2", "_inBundle": false, - "_integrity": "sha512-7+4oTUOWKg7AuL3vloEWekXY2/D20cevzsrNT2kGWm+39J9hGTCBv8VI5Pm5lXZ/o3/mdR4f8rflAPhnQb8mPA==", + "_integrity": "sha512-hR3At21uSrsjjDTWrbu0IMLTpnkpv8IIMFDFaoz43Tmu4LkmAXfH44vNNzpTnf+OAQQCHrb91y/wc2J4x5XgSQ==", "_location": "/minizlib", "_phantomChildren": {}, "_requested": { @@ -18,10 +18,10 @@ "_requiredBy": [ "/tar" ], - "_resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.2.1.tgz", - "_shasum": "dd27ea6136243c7c880684e8672bb3a45fd9b614", + "_resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.2.2.tgz", + "_shasum": "6f0ccc82fa53e1bf2ff145f220d2da9fa6e3a166", "_spec": "minizlib@^1.2.1", - "_where": "/Users/isaacs/dev/npm/cli/node_modules/tar", + "_where": "/Users/mperrotte/npminc/cli/node_modules/tar", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", @@ -67,5 +67,5 @@ "preversion": "npm test", "test": "tap test/*.js --100 -J" }, - "version": "1.2.1" + "version": "1.2.2" } -- cgit v1.2.3