estree-to-babel
Advanced tools
Comparing version 3.1.0 to 3.1.1
@@ -16,7 +16,2 @@ 'use strict'; | ||
if (node.regex) { | ||
node.type = 'RegExpLiteral'; | ||
return; | ||
} | ||
if (isString(value)) { | ||
@@ -36,3 +31,17 @@ node.type = 'StringLiteral'; | ||
} | ||
if (node.regex) { | ||
transformRegExp(node); | ||
return; | ||
} | ||
}; | ||
function transformRegExp(node) { | ||
node.type = 'RegExpLiteral'; | ||
for (const key of Object.keys(node.regex)) { | ||
node[key] = node.regex[key]; | ||
} | ||
delete node.regex; | ||
} |
{ | ||
"name": "estree-to-babel", | ||
"version": "3.1.0", | ||
"version": "3.1.1", | ||
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)", | ||
@@ -12,16 +12,2 @@ "description": "convert estree ast to babel", | ||
}, | ||
"nyc": { | ||
"check-coverage": true, | ||
"all": true, | ||
"exclude": [ | ||
"**/*.spec.js", | ||
"example.js", | ||
".*.js", | ||
"test" | ||
], | ||
"branches": 100, | ||
"lines": 100, | ||
"functions": 100, | ||
"statements": 100 | ||
}, | ||
"scripts": { | ||
@@ -54,3 +40,3 @@ "test": "madrun test", | ||
"eslint-plugin-node": "^11.0.0", | ||
"eslint-plugin-putout": "^6.8.1", | ||
"eslint-plugin-putout": "^7.0.0", | ||
"espree": "^7.2.0", | ||
@@ -61,4 +47,4 @@ "estree-util-attach-comments": "^1.0.0", | ||
"nyc": "^15.0.0", | ||
"putout": "^12.5.1", | ||
"supertape": "^3.5.0" | ||
"putout": "^14.0.1", | ||
"supertape": "^4.8.1" | ||
}, | ||
@@ -65,0 +51,0 @@ "license": "MIT", |
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
14937
252