Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New encoding auto-detection + streams2 change problem case #19

Open
brycebaril opened this issue Jan 10, 2014 · 0 comments
Open

New encoding auto-detection + streams2 change problem case #19

brycebaril opened this issue Jan 10, 2014 · 0 comments

Comments

@brycebaril
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant