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.13 to 0.2.14

tests/fixtures/lib/main.js

10

index.js

@@ -196,4 +196,3 @@ 'use strict';

// the destination paths "absolute" is actually stlil relative to the FSTree
entry.relativePath = ensureRelative(this.lookupDestinationPath(ensureRelative(path.join(this.destDir, relativePath))));
entry.relativePath = this.lookupDestinationPath(relativePath);

@@ -211,3 +210,3 @@ this.outputToInputMappings[entry.relativePath] = relativePath;

map(function(relativePath) {
var output = ensureRelative(this.lookupDestinationPath(ensureRelative(path.join(this.destDir, relativePath))));
var output = this.lookupDestinationPath(relativePath);
this.outputToInputMappings[output] = relativePath;

@@ -308,7 +307,8 @@ return output;

// the destDir is absolute to prevent '..' above the output dir
if (this.getDestinationPath) {
return this._destinationPathCache[relativePath] = this.getDestinationPath(relativePath);
return this._destinationPathCache[relativePath] = ensureRelative(path.join(this.destDir, this.getDestinationPath(relativePath)));
}
return this._destinationPathCache[relativePath] = relativePath;
return this._destinationPathCache[relativePath] = ensureRelative(path.join(this.destDir, relativePath));
};

@@ -315,0 +315,0 @@

{
"name": "broccoli-funnel",
"version": "0.2.13",
"version": "0.2.14",
"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",

@@ -708,2 +708,27 @@ 'use strict';

});
it('receives relative inputPath as argument and can escape destDir with ..', function() {
var inputPath = fixturePath + '/lib';
var node = new Funnel(inputPath, {
destDir: 'utility',
getDestinationPath: function(relativePath) {
if (relativePath === 'main.js') {
return '../utility.js';
}
return relativePath;
}
});
builder = new broccoli.Builder(node);
return builder.build().then(function(results) {
var outputPath = results.directory;
expect(walkSync(outputPath)).to.eql([
'utility/',
'utility/utils/',
'utility/utils/foo.js',
'utility/utils.js',
'utility.js'
]);
});
});
});

@@ -710,0 +735,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