Socket
Socket
Sign inDemoInstall

@babel/plugin-proposal-decorators

Package Overview
Dependencies
Maintainers
4
Versions
123
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/plugin-proposal-decorators - npm Package Compare versions

Comparing version 8.0.0-alpha.2 to 8.0.0-alpha.3

19

lib/index.js

@@ -712,3 +712,13 @@ import { declare } from '@babel/helper-plugin-utils';

}
originalClass.body.body.unshift(types.staticBlock([types.expressionStatement(createLocalsAssignment(elementLocals, classLocals, elementDecorations, types.arrayExpression(classDecorations), types.numericLiteral(classDecorationsFlag), needsInstancePrivateBrandCheck ? lastInstancePrivateName : null, state)), requiresStaticInit && types.expressionStatement(types.callExpression(types.cloneNode(staticInitLocal), [types.thisExpression()]))].filter(Boolean)));
let {
superClass
} = originalClass;
if (superClass) {
const id = path.scope.maybeGenerateMemoised(superClass);
if (id) {
originalClass.superClass = types.assignmentExpression("=", id, superClass);
superClass = id;
}
}
originalClass.body.body.unshift(types.staticBlock([types.expressionStatement(createLocalsAssignment(elementLocals, classLocals, elementDecorations, types.arrayExpression(classDecorations), types.numericLiteral(classDecorationsFlag), needsInstancePrivateBrandCheck ? lastInstancePrivateName : null, types.cloneNode(superClass), state)), requiresStaticInit && types.expressionStatement(types.callExpression(types.cloneNode(staticInitLocal), [types.thisExpression()]))].filter(Boolean)));
path.insertBefore(assignments.map(expr => types.expressionStatement(expr)));

@@ -718,7 +728,7 @@ path.scope.crawl();

}
function createLocalsAssignment(elementLocals, classLocals, elementDecorations, classDecorations, classDecorationsFlag, maybePrivateBranName, state, version) {
function createLocalsAssignment(elementLocals, classLocals, elementDecorations, classDecorations, classDecorationsFlag, maybePrivateBranName, superClass, state, version) {
let lhs, rhs;
const args = [types.thisExpression(), elementDecorations, classDecorations];
{
if (maybePrivateBranName || classDecorationsFlag.value !== 0) {
if (maybePrivateBranName || superClass || classDecorationsFlag.value !== 0) {
args.push(classDecorationsFlag);

@@ -730,3 +740,6 @@ }

`);
} else if (superClass) {
args.push(types.unaryExpression("void", types.numericLiteral(0)));
}
if (superClass) args.push(superClass);
rhs = types.callExpression(state.addHelper("applyDecs2305"), args);

@@ -733,0 +746,0 @@ }

20

package.json
{
"name": "@babel/plugin-proposal-decorators",
"version": "8.0.0-alpha.2",
"version": "8.0.0-alpha.3",
"author": "The Babel Team (https://babel.dev/team)",

@@ -23,15 +23,15 @@ "license": "MIT",

"dependencies": {
"@babel/helper-create-class-features-plugin": "^8.0.0-alpha.2",
"@babel/helper-plugin-utils": "^8.0.0-alpha.2",
"@babel/helper-replace-supers": "^8.0.0-alpha.2",
"@babel/helper-split-export-declaration": "^8.0.0-alpha.2",
"@babel/plugin-syntax-decorators": "^8.0.0-alpha.2"
"@babel/helper-create-class-features-plugin": "^8.0.0-alpha.3",
"@babel/helper-plugin-utils": "^8.0.0-alpha.3",
"@babel/helper-replace-supers": "^8.0.0-alpha.3",
"@babel/helper-split-export-declaration": "^8.0.0-alpha.3",
"@babel/plugin-syntax-decorators": "^8.0.0-alpha.3"
},
"peerDependencies": {
"@babel/core": "^8.0.0-alpha.2"
"@babel/core": "^8.0.0-alpha.3"
},
"devDependencies": {
"@babel/core": "^8.0.0-alpha.2",
"@babel/helper-plugin-test-runner": "^8.0.0-alpha.2",
"@babel/traverse": "^8.0.0-alpha.2",
"@babel/core": "^8.0.0-alpha.3",
"@babel/helper-plugin-test-runner": "^8.0.0-alpha.3",
"@babel/traverse": "^8.0.0-alpha.3",
"@types/charcodes": "^0.2.0",

@@ -38,0 +38,0 @@ "array.prototype.concat": "^1.0.2",

Sorry, the diff of this file is not supported yet

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