concat-stream
concat-stream copied to clipboard
New encoding auto-detection + streams2 change problem case
I'm not sure this is a big deal, but the encoding inference can cause issues when using objectMode streams and not specifying that the encoding is objects to concat-stream.
I found this in one of my tests when I updated this dependency:
var spigot = require("stream-spigot")
var concat = require("concat-stream")
spigot({objectMode: true}, [1, 2, 3, 4, 5])
.pipe(concat(function (c) { console.log(c) }))
// <Buffer 31 32 33 34 35>
Using {encoding: "object"} fixes this, but where people may be relying on the auto-detection (e.g. legacy concat-stream invocations) they could end up in trouble.