mafintosh / duplexify

Turn a writable and readable stream into a streams2 duplex stream with support for async initialization and streams1/streams2 input
MIT License
190 stars 36 forks source link

Incompatible with ReadableStream from node@6.3.0 #6

Closed dignifiedquire closed 8 years ago

dignifiedquire commented 8 years ago

Since https://github.com/nodejs/node/pull/7077 was merged and released in node@6.3.0 the internal buffer of a readable stream is no longer an array but a BufferList. Due to this issue tests started breaking with that release with the following error:

TypeError: Cannot read property 'length' of undefined
    at Connection.Duplexify._forward (/home/travis/build/ipfs/js-ipfs/node_modules/interface-connection/node_modules/duplexify/index.js:170:76)
    at Duplex.onreadable (/home/travis/build/ipfs/js-ipfs/node_modules/interface-connection/node_modules/duplexify/index.js:127:10)
    at emitNone (events.js:86:13)
    at Duplex.emit (events.js:185:7)
    at emitReadable_ (_stream_readable.js:433:10)
    at emitReadable (_stream_readable.js:427:7)
    at readableAddChunk (_stream_readable.js:188:13)
    at Duplex.Readable.push (_stream_readable.js:135:10)