espower-source
Advanced tools
Comparing version 0.4.0 to 0.4.1
13
index.js
@@ -1,2 +0,2 @@ | ||
/* | ||
/** | ||
* espower-source - Power Assert instrumentor from source to source. | ||
@@ -19,4 +19,5 @@ * | ||
var espowerOptions, modifiedAst, generatedOutput, code, map, | ||
jsAst = esprima.parse(jsCode, {tolerant: true, loc: true, tokens: true, source: filepath}); | ||
var jsAst, espowerOptions, modifiedAst, escodegenOutput, code, map; | ||
jsAst = esprima.parse(jsCode, {tolerant: true, loc: true, tokens: true, source: filepath}); | ||
espowerOptions = merge(merge(espower.defaultOptions(), options), { | ||
@@ -28,8 +29,8 @@ destructive: true, | ||
modifiedAst = espower(jsAst, espowerOptions); | ||
generatedOutput = escodegen.generate(modifiedAst, { | ||
escodegenOutput = escodegen.generate(modifiedAst, { | ||
sourceMap: true, | ||
sourceMapWithCode: true | ||
}); | ||
code = generatedOutput.code; // Generated source code | ||
map = sourceMap.fromJSON(generatedOutput.map); | ||
code = escodegenOutput.code; // Generated source code | ||
map = sourceMap.fromJSON(escodegenOutput.map); | ||
map.sourcemap.sourcesContent = [jsCode]; | ||
@@ -36,0 +37,0 @@ return code + '\n' + map.toComment() + '\n'; |
{ | ||
"name": "espower-source", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"description": "Power Assert instrumentor from source to source", | ||
@@ -29,12 +29,12 @@ "keywords": [ | ||
"dependencies": { | ||
"espower": "^0.4.1", | ||
"esprima": "^1.1.1", | ||
"escodegen": "^1.3.1", | ||
"convert-source-map": "^0.3.3", | ||
"lodash.merge": "^2.4.1" | ||
"espower": "~0.4.1", | ||
"esprima": "~1.1.1", | ||
"escodegen": "~1.3.1", | ||
"convert-source-map": "~0.3.3", | ||
"lodash.merge": "~2.4.1" | ||
}, | ||
"devDependencies": { | ||
"expect.js": "^0.3.1", | ||
"jshint": "^2.4.4", | ||
"mocha": "^1.18.2" | ||
"expect.js": "~0.3.1", | ||
"jshint": "~2.4.4", | ||
"mocha": "~1.18.2" | ||
}, | ||
@@ -41,0 +41,0 @@ "engines": { |
13300
+ Addedamdefine@1.0.1(transitive)
+ Addedescodegen@1.3.3(transitive)
+ Addedesprima@1.1.1(transitive)
+ Addedesutils@1.0.0(transitive)
+ Addedsource-map@0.1.43(transitive)
- Removeddeep-is@0.1.4(transitive)
- Removedescodegen@1.14.3(transitive)
- Removedesprima@1.2.54.0.1(transitive)
- Removedestraverse@4.3.0(transitive)
- Removedesutils@2.0.3(transitive)
- Removedfast-levenshtein@2.0.6(transitive)
- Removedlevn@0.3.0(transitive)
- Removedoptionator@0.8.3(transitive)
- Removedprelude-ls@1.1.2(transitive)
- Removedsource-map@0.6.1(transitive)
- Removedtype-check@0.3.2(transitive)
- Removedword-wrap@1.2.5(transitive)
Updatedconvert-source-map@~0.3.3
Updatedescodegen@~1.3.1
Updatedespower@~0.4.1
Updatedesprima@~1.1.1
Updatedlodash.merge@~2.4.1