Skip to content

Commit 4d79344

Browse files
committed
Pull node 7.8.0. test passes w/ READABLE_STREAM=disable.
1 parent 847d79e commit 4d79344

File tree

5 files changed

+14
-26
lines changed

5 files changed

+14
-26
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ npm install --save readable-stream
1818
This package is a mirror of the Streams2 and Streams3 implementations in
1919
Node-core.
2020

21-
Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v7.7.3/docs/api/).
21+
Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v7.8.0/docs/api/).
2222

2323
If you want to guarantee a stable streams base, regardless of what version of
2424
Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html).

build/test-replacements.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,3 +304,10 @@ module.exports['test-stream-buffer-list.js'] = [
304304
'require(\'../../lib/internal/streams/BufferList\');'
305305
]
306306
]
307+
308+
module.exports['test-stream-transform-constructor-set-methods.js'] = [
309+
[
310+
/Error: _transform\\\(\\\) is n/,
311+
'Error: .*[Nn]'
312+
]
313+
]

lib/_stream_readable.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ var StringDecoder;
6060

6161
util.inherits(Readable, Stream);
6262

63+
var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];
64+
6365
function prependListener(emitter, event, fn) {
6466
// Sadly this is not cacheable as some libraries bundle their own
6567
// event emitter implementation with them.
@@ -784,10 +786,9 @@ Readable.prototype.wrap = function (stream) {
784786
}
785787

786788
// proxy certain important events.
787-
var events = ['error', 'close', 'destroy', 'pause', 'resume'];
788-
forEach(events, function (ev) {
789-
stream.on(ev, self.emit.bind(self, ev));
790-
});
789+
for (var n = 0; n < kProxyEvents.length; n++) {
790+
stream.on(kProxyEvents[n], self.emit.bind(self, kProxyEvents[n]));
791+
}
791792

792793
// when we try to consume some more bytes, simply unpause the
793794
// underlying stream.

test/common.js

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -257,26 +257,6 @@ exports.ddCommand = function (filename, kilobytes) {
257257
}
258258
};
259259

260-
exports.spawnCat = function (options) {
261-
var spawn = require('child_process').spawn;
262-
263-
if (exports.isWindows) {
264-
return spawn('more', [], options);
265-
} else {
266-
return spawn('cat', [], options);
267-
}
268-
};
269-
270-
exports.spawnSyncCat = function (options) {
271-
var spawnSync = require('child_process').spawnSync;
272-
273-
if (exports.isWindows) {
274-
return spawnSync('more', [], options);
275-
} else {
276-
return spawnSync('cat', [], options);
277-
}
278-
};
279-
280260
exports.spawnPwd = function (options) {
281261
var spawn = require('child_process').spawn;
282262

test/parallel/test-stream-transform-constructor-set-methods.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ t.resume();
3030

3131
assert.throws(function () {
3232
t2.end(bufferShim.from('blerg'));
33-
}, /^Error: _transform\(\) is not implemented$/);
33+
}, /^Error: .*[Nn]ot implemented$/);
3434

3535
process.on('exit', function () {
3636
assert.strictEqual(t._transform, _transform);

0 commit comments

Comments
 (0)