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

derequire

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

derequire - npm Package Compare versions

Comparing version 0.6.1 to 0.7.0

test/cjs-lazy.js

2

index.js
'use strict';
var estraverse = require('estraverse');
var esprima = require('esprima-six');
var esprima = require('esprima');
var esrefactor = require('esrefactor');

@@ -5,0 +5,0 @@

{
"name": "derequire",
"version": "0.6.1",
"version": "0.7.0",
"description": "remove requires",
"main": "index.js",
"scripts": {
"test": "./node_modules/istanbul/lib/cli.js test ./node_modules/mocha/bin/_mocha test/test.js"
"test": "istanbul test ./node_modules/mocha/bin/_mocha test/test.js"
},

@@ -21,3 +21,3 @@ "repository": {

"estraverse": "~1.5.0",
"esprima-six": "~0.0.3",
"esprima": "~1.0.4",
"esrefactor": "~0.1.0"

@@ -24,0 +24,0 @@ },

@@ -9,2 +9,4 @@ var should = require('chai').should();

var compare = hash(fs.readFileSync('./test/pouchdb.dereq.js', {encoding: 'utf8'}));
var compareCjsSmartass = fs.readFileSync('./test/cjs-smartass.dereq.js', {encoding: 'utf8'});
var compareCjslazy = fs.readFileSync('./test/cjs-lazy.js', {encoding: 'utf8'});
describe('derequire', function(){

@@ -67,2 +69,17 @@ it('should work', function(){

});
it('should fix cjs-smartassery', function (done){
fs.readFile('./test/cjs-smartass.js', {encoding:'utf8'}, function(err, data){
if(err){
return done(err);
}
var transformed = derequire(data);
transformed.should.equal(compareCjsSmartass);
done();
});
});
it('should fix not fix cjs-lazy', function (){
derequire(compareCjslazy).should.equal(compareCjslazy);
});
});
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