glob-stream
Advanced tools
Comparing version 4.1.0 to 4.1.1
29
index.js
@@ -29,15 +29,7 @@ /*jslint node: true */ | ||
var found = false; | ||
globber.on('error', stream.emit.bind(stream, 'error')); | ||
globber.on('end', function(){ | ||
if (opt.allowEmpty !== true && !found && globIsSingular(globber)) { | ||
stream.emit('error', new Error('File not found with singular glob')); | ||
} | ||
globber.on('end', function(/* some args here so can't use bind directly */){ | ||
stream.end(); | ||
}); | ||
globber.on('match', function(filename) { | ||
found = true; | ||
stream.write({ | ||
@@ -107,10 +99,5 @@ cwd: opt.cwd, | ||
var uniqueStream = unique('path'); | ||
var returnStream = aggregate.pipe(uniqueStream); | ||
aggregate.on('error', function (err) { | ||
returnStream.emit('error', err); | ||
}); | ||
return aggregate.pipe(uniqueStream); | ||
return returnStream; | ||
function streamFromPositive(positive) { | ||
@@ -152,14 +139,2 @@ var negativeGlobs = negatives.filter(indexGreaterThan(positive.index)).map(toGlob); | ||
function globIsSingular(glob) { | ||
var globSet = glob.minimatch.set; | ||
if (globSet.length !== 1) { | ||
return false; | ||
} | ||
return globSet[0].every(function isString(value) { | ||
return typeof value === 'string'; | ||
}); | ||
} | ||
module.exports = gs; |
{ | ||
"name": "glob-stream", | ||
"description": "File system globs as a stream", | ||
"version": "4.1.0", | ||
"version": "4.1.1", | ||
"repository": "wearefractal/glob-stream", | ||
@@ -11,5 +11,5 @@ "author": "Fractal <contact@wearefractal.com> (http://wearefractal.com/)", | ||
"dependencies": { | ||
"glob": "^5.0.3", | ||
"glob": "^4.3.1", | ||
"minimatch": "^2.0.1", | ||
"ordered-read-streams": "^0.2.0", | ||
"ordered-read-streams": "^0.1.0", | ||
"glob2base": "^0.0.12", | ||
@@ -25,5 +25,5 @@ "unique-stream": "^2.0.2", | ||
"mocha": "^2.0.0", | ||
"mocha-lcov-reporter": "0.0.2", | ||
"mocha-lcov-reporter": "0.0.1", | ||
"rimraf": "^2.2.5", | ||
"should": "^5.2.0" | ||
"should": "^4.3.0" | ||
}, | ||
@@ -30,0 +30,0 @@ "scripts": { |
@@ -45,5 +45,2 @@ # glob-stream [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status][david-image]][david-url] | ||
- When true it is the same as saying opt.base = opt.cwd | ||
- allowEmpty | ||
- Default is `false` | ||
- If true, won't emit an error when a glob pointing at a single file fails to match | ||
@@ -50,0 +47,0 @@ This argument is passed directly to [node-glob](https://github.com/isaacs/node-glob) so check there for more options |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8157
108
82
+ Addedglob@4.5.3(transitive)
+ Addedordered-read-streams@0.1.0(transitive)
- Removedglob@5.0.15(transitive)
- Removedisstream@0.1.2(transitive)
- Removedordered-read-streams@0.2.0(transitive)
- Removedpath-is-absolute@1.0.1(transitive)
- Removedreadable-stream@1.1.14(transitive)
Updatedglob@^4.3.1
Updatedordered-read-streams@^0.1.0