Skip to content

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

@brycebaril

Description

@brycebaril

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions