summaryrefslogtreecommitdiff
path: root/node_modules/@babel/helper-create-class-features-plugin/lib/index.js
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2024-08-30 17:21:18 +0800
committerlittleblack111 <littleblack11111@gmail.com>2024-08-30 17:21:18 +0800
commitefbc2ffe6a1ee5ec38a4396305561d6515d0943e (patch)
tree2b4c94f18f2c792dfda813050755d5c0273fae22 /node_modules/@babel/helper-create-class-features-plugin/lib/index.js
parent43acceb75957c880a5ba5a31aae221394a36d5f6 (diff)
node fixes, updates
Diffstat (limited to 'node_modules/@babel/helper-create-class-features-plugin/lib/index.js')
-rw-r--r--node_modules/@babel/helper-create-class-features-plugin/lib/index.js24
1 files changed, 15 insertions, 9 deletions
diff --git a/node_modules/@babel/helper-create-class-features-plugin/lib/index.js b/node_modules/@babel/helper-create-class-features-plugin/lib/index.js
index 5a91fcac..f14f0e58 100644
--- a/node_modules/@babel/helper-create-class-features-plugin/lib/index.js
+++ b/node_modules/@babel/helper-create-class-features-plugin/lib/index.js
@@ -29,8 +29,6 @@ Object.defineProperty(exports, "injectInitialization", {
}
});
var _core = require("@babel/core");
-var _helperFunctionName = require("@babel/helper-function-name");
-var _helperSplitExportDeclaration = require("@babel/helper-split-export-declaration");
var _decorators = require("./decorators.js");
var _semver = require("semver");
var _fields = require("./fields.js");
@@ -97,12 +95,12 @@ function createClassFeaturePlugin({
(0, _features.enableFeature)(file, feature, loose);
{
if (typeof file.get(versionKey) === "number") {
- file.set(versionKey, "7.24.5");
+ file.set(versionKey, "7.25.4");
return;
}
}
- if (!file.get(versionKey) || _semver.lt(file.get(versionKey), "7.24.5")) {
- file.set(versionKey, "7.24.5");
+ if (!file.get(versionKey) || _semver.lt(file.get(versionKey), "7.25.4")) {
+ file.set(versionKey, "7.25.4");
}
},
visitor: {
@@ -110,7 +108,7 @@ function createClassFeaturePlugin({
file
}) {
var _ref;
- if (file.get(versionKey) !== "7.24.5") return;
+ if (file.get(versionKey) !== "7.25.4") return;
if (!(0, _features.shouldTransform)(path, file)) return;
const pathIsClassDeclaration = path.isClassDeclaration();
if (pathIsClassDeclaration) (0, _typescript.assertFieldTransformed)(path);
@@ -168,7 +166,11 @@ function createClassFeaturePlugin({
const innerBinding = path.node.id;
let ref;
if (!innerBinding || !pathIsClassDeclaration) {
- (0, _helperFunctionName.default)(path);
+ {
+ var _path$ensureFunctionN;
+ (_path$ensureFunctionN = path.ensureFunctionName) != null ? _path$ensureFunctionN : path.ensureFunctionName = require("@babel/traverse").NodePath.prototype.ensureFunctionName;
+ }
+ path.ensureFunctionName(false);
ref = path.scope.generateUidIdentifier((innerBinding == null ? void 0 : innerBinding.name) || "Class");
}
const classRefForDefine = (_ref = ref) != null ? _ref : _core.types.cloneNode(innerBinding);
@@ -227,11 +229,15 @@ function createClassFeaturePlugin({
file
}) {
{
- if (file.get(versionKey) !== "7.24.5") return;
+ if (file.get(versionKey) !== "7.25.4") return;
const decl = path.get("declaration");
if (decl.isClassDeclaration() && (0, _decorators2.hasDecorators)(decl.node)) {
if (decl.node.id) {
- (0, _helperSplitExportDeclaration.default)(path);
+ {
+ var _path$splitExportDecl;
+ (_path$splitExportDecl = path.splitExportDeclaration) != null ? _path$splitExportDecl : path.splitExportDeclaration = require("@babel/traverse").NodePath.prototype.splitExportDeclaration;
+ }
+ path.splitExportDeclaration();
} else {
decl.node.type = "ClassExpression";
}