@babel/plugin-transform-classes
Advanced tools
Comparing version 7.3.4 to 7.4.0
@@ -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, |
{ | ||
"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" | ||
} |
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
23440
571