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 | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'node_modules/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/lib/index.js') diff --git a/node_modules/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/lib/index.js b/node_modules/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/lib/index.js index 424b87f8..437740b7 100644 --- a/node_modules/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/lib/index.js +++ b/node_modules/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/lib/index.js @@ -4,7 +4,6 @@ Object.defineProperty(exports, '__esModule', { value: true }); var core = require('@babel/core'); var helperPluginUtils = require('@babel/helper-plugin-utils'); -var helperEnvironmentVisitor = require('@babel/helper-environment-visitor'); function isNameOrLength(key) { if (core.types.isIdentifier(key)) { @@ -52,7 +51,11 @@ const hasReferenceOrThisVisitor = { } path.skip(); if (path.isMethod()) { - helperEnvironmentVisitor.requeueComputedKeyAndDecorators(path); + if (path.requeueComputedKeyAndDecorators) { + path.requeueComputedKeyAndDecorators(); + } else { + require("@babel/traverse").NodePath.prototype.requeueComputedKeyAndDecorators.call(path); + } } } }; @@ -148,7 +151,7 @@ function buildFieldsReplacement(fields, scope, file) { })); } var index = helperPluginUtils.declare(api => { - api.assertVersion(7); + api.assertVersion("^7.0.0-0 || >8.0.0-alpha <8.0.0-beta"); const setPublicClassFields = api.assumption("setPublicClassFields"); return { name: "bugfix-v8-static-class-fields-redefine-readonly", -- cgit v1.2.3