@babel/helper-create-class-features-plugin
Advanced tools
Comparing version 7.17.6 to 7.17.9
@@ -776,2 +776,17 @@ "use strict"; | ||
function isNameOrLength({ | ||
key, | ||
computed | ||
}) { | ||
if (key.type === "Identifier") { | ||
return !computed && (key.name === "name" || key.name === "length"); | ||
} | ||
if (key.type === "StringLiteral") { | ||
return key.value === "name" || key.value === "length"; | ||
} | ||
return false; | ||
} | ||
function buildFieldsInitNodes(ref, superRef, props, privateNamesMap, state, setPublicClassFields, privateFieldsAsProperties, constantSuper, innerBindingRef) { | ||
@@ -830,5 +845,7 @@ let needsClassRef = false; | ||
case isStatic && isPublic && isField && setPublicClassFields: | ||
needsClassRef = true; | ||
staticNodes.push(buildPublicFieldInitLoose(_core.types.cloneNode(ref), prop)); | ||
break; | ||
if (!isNameOrLength(prop.node)) { | ||
needsClassRef = true; | ||
staticNodes.push(buildPublicFieldInitLoose(_core.types.cloneNode(ref), prop)); | ||
break; | ||
} | ||
@@ -835,0 +852,0 @@ case isStatic && isPublic && isField && !setPublicClassFields: |
@@ -42,3 +42,3 @@ "use strict"; | ||
const version = "7.17.6".split(".").reduce((v, x) => v * 1e5 + +x, 0); | ||
const version = "7.17.9".split(".").reduce((v, x) => v * 1e5 + +x, 0); | ||
const versionKey = "@babel/plugin-class-features/version"; | ||
@@ -45,0 +45,0 @@ |
{ | ||
"name": "@babel/helper-create-class-features-plugin", | ||
"version": "7.17.6", | ||
"version": "7.17.9", | ||
"author": "The Babel Team (https://babel.dev/team)", | ||
@@ -23,4 +23,4 @@ "license": "MIT", | ||
"@babel/helper-environment-visitor": "^7.16.7", | ||
"@babel/helper-function-name": "^7.16.7", | ||
"@babel/helper-member-expression-to-functions": "^7.16.7", | ||
"@babel/helper-function-name": "^7.17.9", | ||
"@babel/helper-member-expression-to-functions": "^7.17.7", | ||
"@babel/helper-optimise-call-expression": "^7.16.7", | ||
@@ -34,3 +34,3 @@ "@babel/helper-replace-supers": "^7.16.7", | ||
"devDependencies": { | ||
"@babel/core": "^7.17.5", | ||
"@babel/core": "^7.17.9", | ||
"@babel/helper-plugin-test-runner": "^7.16.7", | ||
@@ -37,0 +37,0 @@ "@babel/plugin-syntax-class-static-block": "^7.14.5", |
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
53626
1343