@babel/helper-create-class-features-plugin
Advanced tools
Comparing version 7.14.3 to 7.14.4
@@ -67,10 +67,7 @@ "use strict"; | ||
methodPath: path, | ||
methodNode: node, | ||
objectRef: classRef, | ||
isStatic: node.static, | ||
superRef, | ||
scope, | ||
file: this, | ||
refToPreserve: classRef | ||
}, true).replace(); | ||
}).replace(); | ||
const properties = [prop("kind", _core.types.stringLiteral(isMethod ? node.kind : "field")), prop("decorators", takeDecorators(node)), prop("static", node.static && _core.types.booleanLiteral(true)), prop("key", getKey(node))].filter(Boolean); | ||
@@ -134,3 +131,3 @@ | ||
let replacement = _core.template.expression.ast` | ||
const wrapperCall = _core.template.expression.ast` | ||
${addDecorateHelper(file)}( | ||
@@ -145,10 +142,12 @@ ${classDecorators || _core.types.nullLiteral()}, | ||
`; | ||
let classPathDesc = "arguments.1.body.body.0"; | ||
if (!isStrict) { | ||
replacement.arguments[1].body.directives.push(_core.types.directive(_core.types.directiveLiteral("use strict"))); | ||
wrapperCall.arguments[1].body.directives.push(_core.types.directive(_core.types.directiveLiteral("use strict"))); | ||
} | ||
let replacement = wrapperCall; | ||
let classPathDesc = "arguments.1.body.body.0"; | ||
if (isDeclaration) { | ||
replacement = _core.template.ast`let ${ref} = ${replacement}`; | ||
replacement = _core.template.statement.ast`let ${ref} = ${wrapperCall}`; | ||
classPathDesc = "declarations.0.init." + classPathDesc; | ||
@@ -155,0 +154,0 @@ } |
@@ -40,3 +40,3 @@ "use strict"; | ||
const version = "7.14.3".split(".").reduce((v, x) => v * 1e5 + +x, 0); | ||
const version = "7.14.4".split(".").reduce((v, x) => v * 1e5 + +x, 0); | ||
const versionKey = "@babel/plugin-class-features/version"; | ||
@@ -43,0 +43,0 @@ |
{ | ||
"name": "@babel/helper-create-class-features-plugin", | ||
"version": "7.14.3", | ||
"version": "7.14.4", | ||
"author": "The Babel Team (https://babel.dev/team)", | ||
@@ -25,3 +25,3 @@ "license": "MIT", | ||
"@babel/helper-optimise-call-expression": "^7.12.13", | ||
"@babel/helper-replace-supers": "^7.14.3", | ||
"@babel/helper-replace-supers": "^7.14.4", | ||
"@babel/helper-split-export-declaration": "^7.12.13" | ||
@@ -35,4 +35,4 @@ }, | ||
"@babel/helper-plugin-test-runner": "7.13.10", | ||
"@babel/preset-env": "7.14.2" | ||
"@babel/preset-env": "7.14.4" | ||
} | ||
} |
3
48448
1210