Socket
Socket
Sign inDemoInstall

@babel/plugin-transform-classes

Package Overview
Dependencies
Maintainers
4
Versions
105
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/plugin-transform-classes - npm Package Compare versions

Comparing version 7.18.4 to 7.18.6

16

lib/transformClass.js

@@ -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"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc