Comparing version 1.4.0 to 1.5.0
@@ -41,3 +41,3 @@ var pump = require('pump') | ||
self.removeListener('close', onclose) | ||
if (err) return self.destroy(err) | ||
if (err) return self.destroy(err.message === 'premature close' ? null : err) | ||
ended = true | ||
@@ -55,4 +55,4 @@ self.uncork() | ||
module.exports = define({destroy:false}) | ||
module.exports.obj = define({destroy:false, objectMode:true, highWaterMark:16}) | ||
module.exports = define({autoDestroy:false, destroy:false}) | ||
module.exports.obj = define({autoDestroy: false, destroy:false, objectMode:true, highWaterMark:16}) | ||
module.exports.ctor = define |
{ | ||
"name": "pumpify", | ||
"version": "1.4.0", | ||
"version": "1.5.0", | ||
"description": "Combine an array of streams into a single duplex stream using pump and duplexify", | ||
"main": "index.js", | ||
"dependencies": { | ||
"duplexify": "^3.5.3", | ||
"duplexify": "^3.6.0", | ||
"inherits": "^2.0.3", | ||
@@ -9,0 +9,0 @@ "pump": "^2.0.0" |
27
test.js
@@ -182,1 +182,28 @@ var tape = require('tape') | ||
}) | ||
tape('preserves error again', function (t) { | ||
var ws = new stream.Writable() | ||
var rs = new stream.Readable() | ||
ws._write = function (data, enc, cb) { | ||
cb(null) | ||
} | ||
rs._read = function () { | ||
this.push(Buffer.alloc(16 * 1024)) | ||
} | ||
var pumpifyErr = pumpify( | ||
through(), | ||
through(function(chunk, _, cb) { | ||
cb(new Error('test')) | ||
}), | ||
ws | ||
) | ||
rs.pipe(pumpifyErr) | ||
.on('error', function (err) { | ||
t.ok(err) | ||
t.ok(err.message !== 'premature close', 'does not close with premature close') | ||
t.end() | ||
}) | ||
}) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9417
217
Updatedduplexify@^3.6.0