@babel/plugin-transform-function-name
Advanced tools
Comparing version 7.21.4-esm.3 to 7.21.4-esm.4
@@ -1,13 +0,7 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.default = void 0; | ||
var _helperCompilationTargets = require("@babel/helper-compilation-targets"); | ||
var _helperPluginUtils = require("@babel/helper-plugin-utils"); | ||
var _helperFunctionName = require("@babel/helper-function-name"); | ||
var _default = (0, _helperPluginUtils.declare)(api => { | ||
import { isRequired } from "@babel/helper-compilation-targets"; | ||
import { declare } from "@babel/helper-plugin-utils"; | ||
import nameFunction from "@babel/helper-function-name"; | ||
export default declare(api => { | ||
api.assertVersion(7); | ||
const supportUnicodeId = !(0, _helperCompilationTargets.isRequired)("transform-unicode-escapes", api.targets()); | ||
const supportUnicodeId = !isRequired("transform-unicode-escapes", api.targets()); | ||
return { | ||
@@ -19,3 +13,3 @@ name: "transform-function-name", | ||
if (path.key !== "value" && !path.parentPath.isObjectProperty()) { | ||
const replacement = (0, _helperFunctionName.default)(path); | ||
const replacement = nameFunction(path); | ||
if (replacement) path.replaceWith(replacement); | ||
@@ -28,3 +22,3 @@ } | ||
if (value.isFunction()) { | ||
const newNode = (0, _helperFunctionName.default)(value, false, supportUnicodeId); | ||
const newNode = nameFunction(value, false, supportUnicodeId); | ||
if (newNode) value.replaceWith(newNode); | ||
@@ -36,4 +30,3 @@ } | ||
}); | ||
exports.default = _default; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@babel/plugin-transform-function-name", | ||
"version": "7.21.4-esm.3", | ||
"version": "7.21.4-esm.4", | ||
"description": "Apply ES2015 function.name semantics to all functions", | ||
@@ -20,5 +20,5 @@ "repository": { | ||
"dependencies": { | ||
"@babel/helper-compilation-targets": "7.21.4-esm.3", | ||
"@babel/helper-function-name": "7.21.4-esm.3", | ||
"@babel/helper-plugin-utils": "7.21.4-esm.3" | ||
"@babel/helper-compilation-targets": "7.21.4-esm.4", | ||
"@babel/helper-function-name": "7.21.4-esm.4", | ||
"@babel/helper-plugin-utils": "7.21.4-esm.4" | ||
}, | ||
@@ -29,4 +29,4 @@ "peerDependencies": { | ||
"devDependencies": { | ||
"@babel/core": "7.21.4-esm.3", | ||
"@babel/helper-plugin-test-runner": "7.21.4-esm.3" | ||
"@babel/core": "7.21.4-esm.4", | ||
"@babel/helper-plugin-test-runner": "7.21.4-esm.4" | ||
}, | ||
@@ -33,0 +33,0 @@ "engines": { |
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
6
5793
28
+ Added@babel/code-frame@7.21.4-esm.4(transitive)
+ Added@babel/compat-data@7.21.4-esm.4(transitive)
+ Added@babel/helper-compilation-targets@7.21.4-esm.4(transitive)
+ Added@babel/helper-function-name@7.21.4-esm.4(transitive)
+ Added@babel/helper-plugin-utils@7.21.4-esm.4(transitive)
+ Added@babel/helper-string-parser@7.21.4-esm.4(transitive)
+ Added@babel/helper-validator-identifier@7.21.4-esm.4(transitive)
+ Added@babel/helper-validator-option@7.21.4-esm.4(transitive)
+ Added@babel/highlight@7.21.4-esm.4(transitive)
+ Added@babel/parser@7.21.4-esm.4(transitive)
+ Added@babel/template@7.21.4-esm.4(transitive)
+ Added@babel/types@7.21.4-esm.4(transitive)
- Removed@babel/code-frame@7.21.4-esm.3(transitive)
- Removed@babel/compat-data@7.21.4-esm.3(transitive)
- Removed@babel/helper-compilation-targets@7.21.4-esm.3(transitive)
- Removed@babel/helper-function-name@7.21.4-esm.3(transitive)
- Removed@babel/helper-plugin-utils@7.21.4-esm.3(transitive)
- Removed@babel/helper-string-parser@7.21.4-esm.3(transitive)
- Removed@babel/helper-validator-identifier@7.21.4-esm.3(transitive)
- Removed@babel/helper-validator-option@7.21.4-esm.3(transitive)
- Removed@babel/highlight@7.21.4-esm.3(transitive)
- Removed@babel/parser@7.21.4-esm.3(transitive)
- Removed@babel/template@7.21.4-esm.3(transitive)
- Removed@babel/types@7.21.4-esm.3(transitive)