Comparing version 0.6.1 to 0.7.0
'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); | ||
}); | ||
}); |
350086
10
10487
+ Addedesprima@~1.0.4
- Removedesprima-six@~0.0.3