@babel/plugin-transform-function-name
Advanced tools
Comparing version 8.0.0-alpha.11 to 8.0.0-alpha.12
import * as _babel_core from '@babel/core'; | ||
declare const _default: (api: _babel_core.PluginAPI, options: {}, dirname: string) => _babel_core.PluginObject<_babel_core.PluginPass<{}>>; | ||
declare const _default: (api: _babel_core.PluginAPI, options: object, dirname: string) => _babel_core.PluginObject<object & _babel_core.PluginPass>; | ||
//# sourceMappingURL=index.d.ts.map | ||
export { _default as default }; |
import { isRequired } from '@babel/helper-compilation-targets'; | ||
import { declare } from '@babel/helper-plugin-utils'; | ||
import nameFunction from '@babel/helper-function-name'; | ||
var index = declare(api => { | ||
api.assertVersion("8.0.0-alpha.11"); | ||
api.assertVersion("8.0.0-alpha.12"); | ||
const supportUnicodeId = !isRequired("transform-unicode-escapes", api.targets()); | ||
@@ -14,4 +13,3 @@ return { | ||
if (path.key !== "value" && !path.parentPath.isObjectProperty()) { | ||
const replacement = nameFunction(path); | ||
if (replacement) path.replaceWith(replacement); | ||
path.ensureFunctionName(supportUnicodeId); | ||
} | ||
@@ -23,4 +21,3 @@ } | ||
if (value.isFunction()) { | ||
const newNode = nameFunction(value, false, supportUnicodeId); | ||
if (newNode) value.replaceWith(newNode); | ||
value.ensureFunctionName(supportUnicodeId); | ||
} | ||
@@ -27,0 +24,0 @@ } |
{ | ||
"name": "@babel/plugin-transform-function-name", | ||
"version": "8.0.0-alpha.11", | ||
"version": "8.0.0-alpha.12", | ||
"description": "Apply ES2015 function.name semantics to all functions", | ||
@@ -20,12 +20,11 @@ "repository": { | ||
"dependencies": { | ||
"@babel/helper-compilation-targets": "^8.0.0-alpha.11", | ||
"@babel/helper-function-name": "^8.0.0-alpha.11", | ||
"@babel/helper-plugin-utils": "^8.0.0-alpha.11" | ||
"@babel/helper-compilation-targets": "^8.0.0-alpha.12", | ||
"@babel/helper-plugin-utils": "^8.0.0-alpha.12" | ||
}, | ||
"peerDependencies": { | ||
"@babel/core": "^8.0.0-alpha.11" | ||
"@babel/core": "^8.0.0-alpha.12" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^8.0.0-alpha.11", | ||
"@babel/helper-plugin-test-runner": "^8.0.0-alpha.11" | ||
"@babel/core": "^8.0.0-alpha.12", | ||
"@babel/helper-plugin-test-runner": "^8.0.0-alpha.12" | ||
}, | ||
@@ -32,0 +31,0 @@ "engines": { |
Sorry, the diff of this file is not supported yet
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
3
68951
46
- Removed@babel/helper-function-name@8.0.0-alpha.11(transitive)