summaryrefslogtreecommitdiff
path: root/node_modules/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/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/plugin-bugfix-v8-static-class-fields-redefine-readonly/lib/index.js
parent43acceb75957c880a5ba5a31aae221394a36d5f6 (diff)
node fixes, updates
Diffstat (limited to 'node_modules/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/lib/index.js')
-rw-r--r--node_modules/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/lib/index.js9
1 files changed, 6 insertions, 3 deletions
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",