max-mapper / max-mapper/concat-stream
New encoding auto-detection + streams2 change problem case
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 574
- Forks
- 61
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the shown stream-spigot objectMode pipeline into concat-stream, then inspect the encoding auto-detection and concat callback entry points. Compare the default behavior with {encoding: "object"}; done means the object-mode case is handled correctly without breaking legacy concat-stream invocations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- stream-processing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100