Comparing version 1.3.0 to 2.0.0
@@ -1,2 +0,2 @@ | ||
var parse = require('esprima').parse; | ||
var parse = require('acorn').parse; | ||
@@ -6,3 +6,8 @@ module.exports = function (src) { | ||
if (typeof src === 'string') { | ||
try { ast = parse(src) } | ||
try { | ||
ast = parse(src, { | ||
ecmaVersion: 6, | ||
allowReturnOutsideFunction: true | ||
}) | ||
} | ||
catch (err) { ast = parse('(' + src + ')') } | ||
@@ -9,0 +14,0 @@ } |
{ | ||
"name": "astw", | ||
"version": "1.3.0", | ||
"version": "2.0.0", | ||
"description": "walk the ast with references to parent nodes", | ||
"main": "index.js", | ||
"dependencies": { | ||
"esprima": "^2.1.0" | ||
"acorn": "^1.0.3" | ||
}, | ||
@@ -37,3 +37,3 @@ "devDependencies": { | ||
"source", | ||
"esprima" | ||
"acorn" | ||
], | ||
@@ -40,0 +40,0 @@ "author": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5714
86
+ Addedacorn@^1.0.3
+ Addedacorn@1.2.2(transitive)
- Removedesprima@^2.1.0
- Removedesprima@2.7.3(transitive)