@babel/plugin-transform-classes
Advanced tools
Comparing version 7.18.4 to 7.18.6
@@ -40,3 +40,3 @@ "use strict"; | ||
superFnId: undefined, | ||
superName: undefined, | ||
superName: null, | ||
superReturns: [], | ||
@@ -50,3 +50,2 @@ isDerived: false, | ||
hasConstructor: false, | ||
staticPropBody: [], | ||
body: [], | ||
@@ -328,3 +327,11 @@ superThises: [], | ||
} else { | ||
wrapReturn = returnArg => _core.types.callExpression(classState.file.addHelper("possibleConstructorReturn"), [thisRef()].concat(returnArg || [])); | ||
wrapReturn = returnArg => { | ||
const returnParams = [thisRef()]; | ||
if (returnArg != null) { | ||
returnParams.push(returnArg); | ||
} | ||
return _core.types.callExpression(classState.file.addHelper("possibleConstructorReturn"), returnParams); | ||
}; | ||
} | ||
@@ -562,3 +569,3 @@ | ||
setState({ | ||
extendsNative: classState.isDerived && builtinClasses.has(classState.superName.name) && !classState.scope.hasBinding(classState.superName.name, true) | ||
extendsNative: _core.types.isIdentifier(classState.superName) && builtinClasses.has(classState.superName.name) && !classState.scope.hasBinding(classState.superName.name, true) | ||
}); | ||
@@ -587,3 +594,2 @@ const { | ||
body.push(...classState.staticPropBody.map(fn => fn(_core.types.cloneNode(classState.classRef)))); | ||
const isStrict = path.isInStrictMode(); | ||
@@ -590,0 +596,0 @@ let constructorOnly = classState.classId && body.length === 1; |
{ | ||
"name": "@babel/plugin-transform-classes", | ||
"version": "7.18.4", | ||
"version": "7.18.6", | ||
"description": "Compile ES2015 classes to ES5", | ||
@@ -17,9 +17,9 @@ "repository": { | ||
"dependencies": { | ||
"@babel/helper-annotate-as-pure": "^7.16.7", | ||
"@babel/helper-environment-visitor": "^7.18.2", | ||
"@babel/helper-function-name": "^7.17.9", | ||
"@babel/helper-optimise-call-expression": "^7.16.7", | ||
"@babel/helper-plugin-utils": "^7.17.12", | ||
"@babel/helper-replace-supers": "^7.18.2", | ||
"@babel/helper-split-export-declaration": "^7.16.7", | ||
"@babel/helper-annotate-as-pure": "^7.18.6", | ||
"@babel/helper-environment-visitor": "^7.18.6", | ||
"@babel/helper-function-name": "^7.18.6", | ||
"@babel/helper-optimise-call-expression": "^7.18.6", | ||
"@babel/helper-plugin-utils": "^7.18.6", | ||
"@babel/helper-replace-supers": "^7.18.6", | ||
"@babel/helper-split-export-declaration": "^7.18.6", | ||
"globals": "^11.1.0" | ||
@@ -34,5 +34,5 @@ }, | ||
"devDependencies": { | ||
"@babel/core": "^7.18.2", | ||
"@babel/helper-plugin-test-runner": "^7.16.7", | ||
"@babel/traverse": "^7.18.2" | ||
"@babel/core": "^7.18.6", | ||
"@babel/helper-plugin-test-runner": "^7.18.6", | ||
"@babel/traverse": "^7.18.6" | ||
}, | ||
@@ -42,3 +42,4 @@ "engines": { | ||
}, | ||
"author": "The Babel Team (https://babel.dev/team)" | ||
"author": "The Babel Team (https://babel.dev/team)", | ||
"type": "commonjs" | ||
} |
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
26576
630