From efbc2ffe6a1ee5ec38a4396305561d6515d0943e Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Fri, 30 Aug 2024 17:21:18 +0800 Subject: node fixes, updates --- .../lib/index.js | 24 ++++++++++++++-------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'node_modules/@babel/helper-create-class-features-plugin/lib/index.js') 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"; } -- cgit v1.2.3