@babel/plugin-transform-function-name
Advanced tools
Comparing version 7.21.4-esm.4 to 7.22.5
@@ -1,7 +0,13 @@ | ||
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 => { | ||
"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 => { | ||
api.assertVersion(7); | ||
const supportUnicodeId = !isRequired("transform-unicode-escapes", api.targets()); | ||
const supportUnicodeId = !(0, _helperCompilationTargets.isRequired)("transform-unicode-escapes", api.targets()); | ||
return { | ||
@@ -13,3 +19,3 @@ name: "transform-function-name", | ||
if (path.key !== "value" && !path.parentPath.isObjectProperty()) { | ||
const replacement = nameFunction(path); | ||
const replacement = (0, _helperFunctionName.default)(path); | ||
if (replacement) path.replaceWith(replacement); | ||
@@ -22,3 +28,3 @@ } | ||
if (value.isFunction()) { | ||
const newNode = nameFunction(value, false, supportUnicodeId); | ||
const newNode = (0, _helperFunctionName.default)(value, false, supportUnicodeId); | ||
if (newNode) value.replaceWith(newNode); | ||
@@ -30,3 +36,4 @@ } | ||
}); | ||
exports.default = _default; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@babel/plugin-transform-function-name", | ||
"version": "7.21.4-esm.4", | ||
"version": "7.22.5", | ||
"description": "Apply ES2015 function.name semantics to all functions", | ||
@@ -20,12 +20,12 @@ "repository": { | ||
"dependencies": { | ||
"@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" | ||
"@babel/helper-compilation-targets": "^7.22.5", | ||
"@babel/helper-function-name": "^7.22.5", | ||
"@babel/helper-plugin-utils": "^7.22.5" | ||
}, | ||
"peerDependencies": { | ||
"@babel/core": "^7.0.0-0 || ^7.21.4-esm.2" | ||
"@babel/core": "^7.0.0-0" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "7.21.4-esm.4", | ||
"@babel/helper-plugin-test-runner": "7.21.4-esm.4" | ||
"@babel/core": "^7.22.5", | ||
"@babel/helper-plugin-test-runner": "^7.22.5" | ||
}, | ||
@@ -36,3 +36,3 @@ "engines": { | ||
"author": "The Babel Team (https://babel.dev/team)", | ||
"type": "module" | ||
"type": "commonjs" | ||
} |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
6187
34
0
5
No
+ Added@babel/helper-function-name@7.24.7(transitive)
+ Added@babel/helper-plugin-utils@7.24.8(transitive)
- Removed@babel/code-frame@7.21.4-esm.4(transitive)
- Removed@babel/compat-data@7.21.4-esm.4(transitive)
- Removed@babel/helper-compilation-targets@7.21.4-esm.4(transitive)
- Removed@babel/helper-function-name@7.21.4-esm.4(transitive)
- Removed@babel/helper-plugin-utils@7.21.4-esm.4(transitive)
- Removed@babel/helper-string-parser@7.21.4-esm.4(transitive)
- Removed@babel/helper-validator-identifier@7.21.4-esm.4(transitive)
- Removed@babel/helper-validator-option@7.21.4-esm.4(transitive)
- Removed@babel/highlight@7.21.4-esm.4(transitive)
- Removed@babel/parser@7.21.4-esm.4(transitive)
- Removed@babel/template@7.21.4-esm.4(transitive)
- Removed@babel/types@7.21.4-esm.4(transitive)