felixge / felixge/node-combined-stream
issues with combined-stream@1.0.6
- Dominant language
- JavaScript
- Stars
- 145
- Forks
- 35
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
Since upgrading to v1.0.6 my streams are behaving differently, here's an example:
```javascript
// example.js
const combinedStream = require('combined-stream');
const through = require('through2');
const fs = require('fs');
const files = [ 'a.txt', 'b.txt' ];
var pipeline = combinedStream.create();
files.forEach(function(filePath) {
var stream = fs.createReadStream(filePath, 'utf8')
pipeline.append(function(next) {
console.error('Load file: %s', filePath);
next(stream);
});
});
pipeline.pipe(through(function(chunk, enc, next){
console.error(chunk.toString('utf8'));
next();
}));
```
```bash
echo 'a' > a.txt
echo 'b' > b.txt
```
```bash
+ combined-stream@1.0.5
updated 1 package in 0.934s
peter:combined-stream-bug peter$ node example.js
Load file: a.txt
a
Load file: b.txt
b
```
```bash
+ combined-stream@1.0.6
updated 1 package in 0.902s
peter:combined-stream-bug peter$ node example.js
Load file: a.txt
a
Load file: b.txt
```
using 1.0.6 the stream does not correctly print the contents of the second file.
I believe there was a breaking change made in https://github.com/felixge/node-combined-stream/pull/38
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.