You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

@babel/plugin-transform-classes

Package Overview
Dependencies
Maintainers
4
Versions
104
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 7.20.7 to 7.21.0

1

lib/index.js

@@ -28,3 +28,2 @@ "use strict";

const supportUnicodeId = !(0, _helperCompilationTargets.isRequired)("transform-unicode-escapes", api.targets());
const VISITED = new WeakSet();

@@ -31,0 +30,0 @@ return {

4

lib/inline-createSuper-helpers.js

@@ -55,5 +55,3 @@ "use strict";

return file.addHelper("createSuper");
} catch (_unused) {
}
} catch (_unused) {}
const id = file.scope.generateUidIdentifier("createSuper");

@@ -60,0 +58,0 @@ helperIDs.set(file, id);

@@ -70,3 +70,2 @@ "use strict";

}
function maybeCreateConstructor() {

@@ -171,6 +170,3 @@ let hasConstructor = false;

if (props.instance || props.static) {
let args = [_core.types.cloneNode(classState.classRef),
props.instance ? _core.types.arrayExpression(props.instance) : _core.types.nullLiteral(),
props.static ? _core.types.arrayExpression(props.static) : _core.types.nullLiteral()];
let args = [_core.types.cloneNode(classState.classRef), props.instance ? _core.types.arrayExpression(props.instance) : _core.types.nullLiteral(), props.static ? _core.types.arrayExpression(props.static) : _core.types.nullLiteral()];
let lastNonNullIndex = 0;

@@ -203,3 +199,2 @@ for (let i = 0; i < args.length; i++) {

if (bareSuper.parentPath.isExpressionStatement() && bareSuper.parentPath.container === body.node.body && body.node.body.length - 1 === bareSuper.parentPath.key) {
if (classState.superThises.length) {

@@ -280,3 +275,2 @@ call = _core.types.assignmentExpression("=", thisRef(), call);

}
const bodyPaths = body.get("body");

@@ -290,3 +284,2 @@ if (!bodyPaths.length || !bodyPaths.pop().isReturnStatement()) {

}
function pushMethod(node, path) {

@@ -305,4 +298,3 @@ const scope = path ? path.scope : classState.scope;

var _nameFunction;
fn = (_nameFunction = (0, _helperFunctionName.default)(
{
fn = (_nameFunction = (0, _helperFunctionName.default)({
id: key,

@@ -328,4 +320,3 @@ node: node,

descriptor = {
key:
key,
key: key,
[descKey]: fn

@@ -349,4 +340,3 @@ };

const methodName = _core.types.memberExpression(_core.types.cloneNode(classRef), node.key, node.computed || _core.types.isLiteral(node.key));
let func = _core.types.functionExpression(null,
node.params, node.body, node.generator, node.async);
let func = _core.types.functionExpression(null, node.params, node.body, node.generator, node.async);
_core.types.inherits(func, node);

@@ -379,3 +369,2 @@ const key = _core.types.toComputedKey(node, node.key);

}
function pushConstructor(superReturns, method, path) {

@@ -392,3 +381,2 @@ setState({

_core.types.inheritsComments(construct, method);
construct.params = method.params;

@@ -402,3 +390,2 @@ _core.types.inherits(construct.body, method.body);

classState.pushedConstructor = true;
if (classState.hasInstanceDescriptors || classState.hasStaticDescriptors) {

@@ -410,3 +397,2 @@ pushDescriptors();

}
function pushInheritsToBody() {

@@ -419,3 +405,2 @@ if (!classState.isDerived || classState.pushedInherits) return;

});
if (!assumptions.superIsCallableConstructor) {

@@ -505,3 +490,2 @@ classState.body.unshift(_core.types.variableDeclaration("var", [_core.types.variableDeclarator(superFnId, _core.types.callExpression((0, _inlineCreateSuperHelpers.default)(classState.file), [_core.types.cloneNode(classState.classRef)]))]));

buildBody();
if (!assumptions.noClassCalls) {

@@ -508,0 +492,0 @@ constructorBody.body.unshift(_core.types.expressionStatement(_core.types.callExpression(classState.file.addHelper("classCallCheck"), [_core.types.thisExpression(), _core.types.cloneNode(classState.classRef)])));

{
"name": "@babel/plugin-transform-classes",
"version": "7.20.7",
"version": "7.21.0",
"description": "Compile ES2015 classes to ES5",

@@ -20,3 +20,3 @@ "repository": {

"@babel/helper-environment-visitor": "^7.18.9",
"@babel/helper-function-name": "^7.19.0",
"@babel/helper-function-name": "^7.21.0",
"@babel/helper-optimise-call-expression": "^7.18.6",

@@ -35,5 +35,5 @@ "@babel/helper-plugin-utils": "^7.20.2",

"devDependencies": {
"@babel/core": "^7.20.7",
"@babel/core": "^7.21.0",
"@babel/helper-plugin-test-runner": "^7.18.6",
"@babel/traverse": "^7.20.7"
"@babel/traverse": "^7.21.0"
},

@@ -40,0 +40,0 @@ "engines": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc