New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

crater

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

crater - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

spec/fixtures/js/q.js

13

index.js

@@ -39,7 +39,16 @@ var fs = require('fs'),

opts.append = opts.append || '';
if (string_func === undefined) {string_func = defaultFileRead;}
var files = findAllFiles(opts.dir, []);
var files;
if (opts.fileList) {
for (var i = opts.fileList.length - 1; i >= 0; i--) {
opts.fileList[i] = opts.rootDir + opts.fileList[i];
}
files = opts.fileList;
} else {
files = findAllFiles(opts.dir, []);
}
var bundle = opts.prepend;

@@ -46,0 +55,0 @@ files.forEach(function(file) {

2

package.json

@@ -5,3 +5,3 @@ {

"description": "A simple crater for node.js apps",
"version": "0.0.2",
"version": "0.0.3",
"repository": {

@@ -8,0 +8,0 @@ "type": "git",

@@ -11,3 +11,3 @@ var crater = require('../index.js'),

crater.bundle({'dir': __dirname + '/fixtures/js', outFile: outFile, minimizeJS: true});
expect(fs.readFileSync(outFile, 'utf-8')).toEqual('function a(){return"hello"}function b(){return"hello"}');
expect(fs.readFileSync(outFile, 'utf-8')).toEqual('function a(){return"hello"}function q(){console.log("q")}function b(){return"hello"}');
fs.unlink(outFile);

@@ -20,3 +20,3 @@ });

});
expect(fs.readFileSync(outFile, 'utf-8')).toEqual('hellohello');
expect(fs.readFileSync(outFile, 'utf-8')).toEqual('hellohellohello');
fs.unlink(outFile);

@@ -43,2 +43,8 @@ });

it('should take a list of files if given', function() {
crater.bundle({'fileList': ['q.js', 'a.js'], rootDir: __dirname + '/fixtures/js/', outFile: outFile, minimizeJS: true});
expect(fs.readFileSync(outFile, 'utf-8')).toEqual('function q(){console.log("q")}function a(){return"hello"}');
fs.unlink(outFile);
});
});
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