readable-stream
Advanced tools
Comparing version 2.3.7 to 2.3.8
@@ -56,3 +56,3 @@ // Copyright Joyent, Inc. and other Node contributors. | ||
var Buffer = require('safe-buffer').Buffer; | ||
var OurUint8Array = global.Uint8Array || function () {}; | ||
var OurUint8Array = (typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : {}).Uint8Array || function () {}; | ||
function _uint8ArrayToBuffer(chunk) { | ||
@@ -627,4 +627,4 @@ return Buffer.from(chunk); | ||
if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { | ||
debug('false write response, pause', src._readableState.awaitDrain); | ||
src._readableState.awaitDrain++; | ||
debug('false write response, pause', state.awaitDrain); | ||
state.awaitDrain++; | ||
increasedAwaitDrain = true; | ||
@@ -723,3 +723,3 @@ } | ||
for (var i = 0; i < len; i++) { | ||
dests[i].emit('unpipe', this, unpipeInfo); | ||
dests[i].emit('unpipe', this, { hasUnpiped: false }); | ||
}return this; | ||
@@ -726,0 +726,0 @@ } |
@@ -84,3 +84,3 @@ // Copyright Joyent, Inc. and other Node contributors. | ||
var Buffer = require('safe-buffer').Buffer; | ||
var OurUint8Array = global.Uint8Array || function () {}; | ||
var OurUint8Array = (typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : {}).Uint8Array || function () {}; | ||
function _uint8ArrayToBuffer(chunk) { | ||
@@ -353,3 +353,3 @@ return Buffer.from(chunk); | ||
if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); | ||
if (!state.writing && !state.corked && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); | ||
} | ||
@@ -596,3 +596,3 @@ }; | ||
// ignore unnecessary end() calls. | ||
if (!state.ending && !state.finished) endWritable(this, state, cb); | ||
if (!state.ending) endWritable(this, state, cb); | ||
}; | ||
@@ -658,7 +658,5 @@ | ||
} | ||
if (state.corkedRequestsFree) { | ||
state.corkedRequestsFree.next = corkReq; | ||
} else { | ||
state.corkedRequestsFree = corkReq; | ||
} | ||
// reuse the free corkReq. | ||
state.corkedRequestsFree.next = corkReq; | ||
} | ||
@@ -665,0 +663,0 @@ |
@@ -59,3 +59,2 @@ 'use strict'; | ||
if (this.length === 0) return Buffer.alloc(0); | ||
if (this.length === 1) return this.head.data; | ||
var ret = Buffer.allocUnsafe(n >>> 0); | ||
@@ -62,0 +61,0 @@ var p = this.head; |
@@ -18,5 +18,11 @@ 'use strict'; | ||
cb(err); | ||
} else if (err && (!this._writableState || !this._writableState.errorEmitted)) { | ||
pna.nextTick(emitErrorNT, this, err); | ||
} else if (err) { | ||
if (!this._writableState) { | ||
pna.nextTick(emitErrorNT, this, err); | ||
} else if (!this._writableState.errorEmitted) { | ||
this._writableState.errorEmitted = true; | ||
pna.nextTick(emitErrorNT, this, err); | ||
} | ||
} | ||
return this; | ||
@@ -39,5 +45,7 @@ } | ||
if (!cb && err) { | ||
pna.nextTick(emitErrorNT, _this, err); | ||
if (_this._writableState) { | ||
if (!_this._writableState) { | ||
pna.nextTick(emitErrorNT, _this, err); | ||
} else if (!_this._writableState.errorEmitted) { | ||
_this._writableState.errorEmitted = true; | ||
pna.nextTick(emitErrorNT, _this, err); | ||
} | ||
@@ -64,2 +72,4 @@ } else if (cb) { | ||
this._writableState.ending = false; | ||
this._writableState.finalCalled = false; | ||
this._writableState.prefinished = false; | ||
this._writableState.finished = false; | ||
@@ -66,0 +76,0 @@ this._writableState.errorEmitted = false; |
{ | ||
"name": "readable-stream", | ||
"version": "2.3.7", | ||
"version": "2.3.8", | ||
"description": "Streams3, a user-land copy of the stream library from Node.js", | ||
@@ -5,0 +5,0 @@ "main": "readable.js", |
# readable-stream | ||
***Node-core v8.11.1 streams for userland*** [![Build Status](https://travis-ci.org/nodejs/readable-stream.svg?branch=master)](https://travis-ci.org/nodejs/readable-stream) | ||
***Node-core v8.17.0 streams for userland*** [![Build Status](https://travis-ci.org/nodejs/readable-stream.svg?branch=master)](https://travis-ci.org/nodejs/readable-stream) | ||
@@ -21,3 +21,3 @@ | ||
Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.11.1/docs/api/stream.html). | ||
Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.17.0/docs/api/stream.html). | ||
@@ -24,0 +24,0 @@ If you want to guarantee a stable streams base, regardless of what version of |
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
88115
1928