Skip to content

Commit

Permalink
Update: Use pumpify to propagate errors/destroy
Browse files Browse the repository at this point in the history
  • Loading branch information
phated committed Feb 21, 2017
1 parent d617960 commit 755b7b4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
8 changes: 2 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ var Combine = require('ordered-read-streams');
var unique = require('unique-stream');

var glob = require('glob');
var pumpify = require('pumpify');
var resolveGlob = require('to-absolute-glob');
var isNegatedGlob = require('is-negated-glob');
var globParent = require('glob-parent');
Expand Down Expand Up @@ -124,13 +125,8 @@ var gs = {
// Then just pipe them to a single unique stream and return it
var aggregate = new Combine(streams);
var uniqueStream = unique('path');
var returnStream = aggregate.pipe(uniqueStream);

aggregate.on('error', function(err) {
returnStream.emit('error', err);
});

return returnStream;
return pumpify.obj(aggregate, uniqueStream);

function streamFromPositive(positive) {
var negativeGlobs = negatives.filter(indexGreaterThan(positive.index))
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"glob-parent": "^3.0.0",
"is-negated-glob": "^1.0.0",
"ordered-read-streams": "^0.3.0",
"pumpify": "^1.3.5",
"through2": "^0.6.0",
"to-absolute-glob": "^0.1.1",
"unique-stream": "^2.0.2"
Expand Down

0 comments on commit 755b7b4

Please sign in to comment.