Socket
Socket
Sign inDemoInstall

@babel/plugin-transform-classes

Package Overview
Dependencies
Maintainers
5
Versions
106
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.3.4 to 7.4.0

25

lib/transformClass.js

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

const verifyConstructorVisitor = _core().traverse.visitors.merge([_helperReplaceSupers().environmentVisitor, {
Super(path, state) {
if (state.isDerived) return;
const {
node,
parentPath
} = path;
if (parentPath.isCallExpression({
callee: node
})) {
throw path.buildCodeFrameError("super() is only allowed in a derived constructor");
}
}
}]);
function transformClass(path, file, builtinClasses, isLoose) {

@@ -221,10 +204,2 @@ const classState = {

const isConstructor = node.kind === "constructor";
if (isConstructor) {
path.traverse(verifyConstructorVisitor, {
isDerived: classState.isDerived,
file: classState.file
});
}
const replaceSupers = new (_helperReplaceSupers().default)({

@@ -231,0 +206,0 @@ methodPath: path,

12

package.json
{
"name": "@babel/plugin-transform-classes",
"version": "7.3.4",
"version": "7.4.0",
"description": "Compile ES2015 classes to ES5",

@@ -13,8 +13,8 @@ "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-classes",

"@babel/helper-annotate-as-pure": "^7.0.0",
"@babel/helper-define-map": "^7.1.0",
"@babel/helper-define-map": "^7.4.0",
"@babel/helper-function-name": "^7.1.0",
"@babel/helper-optimise-call-expression": "^7.0.0",
"@babel/helper-plugin-utils": "^7.0.0",
"@babel/helper-replace-supers": "^7.3.4",
"@babel/helper-split-export-declaration": "^7.0.0",
"@babel/helper-replace-supers": "^7.4.0",
"@babel/helper-split-export-declaration": "^7.4.0",
"globals": "^11.1.0"

@@ -29,6 +29,6 @@ },

"devDependencies": {
"@babel/core": "^7.3.4",
"@babel/core": "^7.4.0",
"@babel/helper-plugin-test-runner": "^7.0.0"
},
"gitHead": "1f6454cc90fe33e0a32260871212e2f719f35741"
"gitHead": "f1328fb913b5a93d54dfc6e3728b1f56c8f4a804"
}
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