Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

glob-stream

Package Overview
Dependencies
Maintainers
2
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

glob-stream - npm Package Compare versions

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;

10

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc