Skip to content

Commit

Permalink
[7.x] Bump end-of-stream from v1.4.1 to v1.4.4 (#76479) (#76553)
Browse files Browse the repository at this point in the history
  • Loading branch information
watson authored Sep 3, 2020
1 parent b2fe6f4 commit 738370c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
11 changes: 9 additions & 2 deletions packages/kbn-pm/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27726,6 +27726,7 @@ var eos = function(stream, opts, callback) {
var rs = stream._readableState;
var readable = opts.readable || (opts.readable !== false && stream.readable);
var writable = opts.writable || (opts.writable !== false && stream.writable);
var cancelled = false;

var onlegacyfinish = function() {
if (!stream.writable) onfinish();
Expand All @@ -27750,8 +27751,13 @@ var eos = function(stream, opts, callback) {
};

var onclose = function() {
if (readable && !(rs && rs.ended)) return callback.call(stream, new Error('premature close'));
if (writable && !(ws && ws.ended)) return callback.call(stream, new Error('premature close'));
process.nextTick(onclosenexttick);
};

var onclosenexttick = function() {
if (cancelled) return;
if (readable && !(rs && (rs.ended && !rs.destroyed))) return callback.call(stream, new Error('premature close'));
if (writable && !(ws && (ws.ended && !ws.destroyed))) return callback.call(stream, new Error('premature close'));
};

var onrequest = function() {
Expand All @@ -27776,6 +27782,7 @@ var eos = function(stream, opts, callback) {
stream.on('close', onclose);

return function() {
cancelled = true;
stream.removeListener('complete', onfinish);
stream.removeListener('abort', onclose);
stream.removeListener('request', onrequest);
Expand Down
9 changes: 1 addition & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11433,14 +11433,7 @@ encoding@^0.1.11:
dependencies:
iconv-lite "~0.4.13"

end-of-stream@^1.0.0, end-of-stream@^1.1.0:
version "1.4.1"
resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.1.tgz#ed29634d19baba463b6ce6b80a37213eab71ec43"
integrity sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==
dependencies:
once "^1.4.0"

end-of-stream@^1.4.1, end-of-stream@^1.4.4:
end-of-stream@^1.0.0, end-of-stream@^1.1.0, end-of-stream@^1.4.1, end-of-stream@^1.4.4:
version "1.4.4"
resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0"
integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==
Expand Down

0 comments on commit 738370c

Please sign in to comment.