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

broccoli-funnel

Package Overview
Dependencies
Maintainers
2
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

broccoli-funnel - npm Package Compare versions

Comparing version 0.2.4 to 0.2.5

2

index.js

@@ -47,3 +47,3 @@ 'use strict';

return a instanceof Minimatch;
}).length > 0;
}).length === this.include.length;

@@ -50,0 +50,0 @@ this._instantiatedStack = (new Error()).stack;

{
"name": "broccoli-funnel",
"version": "0.2.4",
"version": "0.2.5",
"description": "Broccoli plugin that allows you to filter files selected from an input node down based on regular expressions.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -36,7 +36,7 @@ 'use strict';

return builder.build()
.then(function(results) {
var outputPath = results.directory;
.then(function(results) {
var outputPath = results.directory;
expect(walkSync(outputPath)).to.eql(walkSync(inputPath));
});
expect(walkSync(outputPath)).to.eql(walkSync(inputPath));
});
});

@@ -61,14 +61,14 @@

return builder.build()
.then(function(results) {
var expected = [
[ path.join('__input_path__', 'subdir1/subsubdir1/foo.png'),
path.join('__output_path__', 'foo/subdir1/subsubdir1/foo.png'),
'subdir1/subsubdir1/foo.png' ],
.then(function(results) {
var expected = [
[ path.join('__input_path__', 'subdir1/subsubdir1/foo.png'),
path.join('__output_path__', 'foo/subdir1/subsubdir1/foo.png'),
'subdir1/subsubdir1/foo.png' ],
[ path.join('__input_path__', 'subdir1/subsubdir2/some.js'),
path.join('__output_path__', 'foo/subdir1/subsubdir2/some.js'),
'subdir1/subsubdir2/some.js' ]
];
];
expect(processFileArguments).to.eql(expected);
});
expect(processFileArguments).to.eql(expected);
});
});

@@ -89,9 +89,42 @@

return builder.build()
.then(function(results) {
var outputPath = results.directory;
.then(function(results) {
var outputPath = results.directory;
expect(walkSync(outputPath)).to.eql([]);
});
expect(walkSync(outputPath)).to.eql([]);
});
});
it('works with mixed glob and RegExp includes', function() {
var inputPath = path.join(fixturePath, 'dir1');
var node = new Funnel(inputPath, {
include: [ '**/*.png', /.js$/ ],
destDir: 'foo',
processFile: function() {
/* do nothing */
}
});
builder = new broccoli.Builder(node);
return builder.build()
.then(function(results) {
var outputPath = results.directory;
expect(walkSync(outputPath)).to.eql([]);
});
});
it('correctly chooses _matchedWalk scenario', function() {
var inputPath = path.join(fixturePath, 'dir1');
var node;
node = new Funnel(inputPath, { include: [ '**/*.png', /.js$/ ] });
expect(node._matchedWalk).to.eql(false);
node = new Funnel(inputPath, { include: [ '**/*.png', '**/*.js' ] });
expect(node._matchedWalk).to.eql(true);
});
});

@@ -98,0 +131,0 @@

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