Comparing version 2.6.2 to 2.6.3
12
index.js
@@ -237,4 +237,9 @@ 'use strict' | ||
pipe (dest, opts) { | ||
const ended = this[EMITTED_END] | ||
opts = opts || {} | ||
if (dest === process.stdout || dest === process.stderr) | ||
(opts = opts || {}).end = false | ||
opts.end = false | ||
else | ||
opts.end = opts.end !== false | ||
const p = { dest: dest, opts: opts, ondrain: _ => this[RESUME]() } | ||
@@ -245,2 +250,5 @@ this.pipes.push(p) | ||
this[RESUME]() | ||
// piping an ended stream ends immediately | ||
if (ended && p.opts.end) | ||
p.dest.end() | ||
return dest | ||
@@ -310,3 +318,3 @@ } | ||
p.dest.removeListener('drain', p.ondrain) | ||
if (!p.opts || p.opts.end !== false) | ||
if (p.opts.end) | ||
p.dest.end() | ||
@@ -313,0 +321,0 @@ }) |
{ | ||
"name": "minipass", | ||
"version": "2.6.2", | ||
"version": "2.6.3", | ||
"description": "minimal implementation of a PassThrough stream", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
18231
359