Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@babel/plugin-proposal-decorators

Package Overview
Dependencies
Maintainers
4
Versions
126
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 7.17.2 to 7.17.8

27

lib/transformer-2021-12.js

@@ -164,4 +164,9 @@ "use strict";

function filteredOrderedDecoratorInfo(info) {
const filtered = info.filter(isDecoratorInfo);
return [...filtered.filter(el => el.isStatic && el.kind >= ACCESSOR && el.kind <= SETTER), ...filtered.filter(el => !el.isStatic && el.kind >= ACCESSOR && el.kind <= SETTER), ...filtered.filter(el => el.isStatic && el.kind === FIELD), ...filtered.filter(el => !el.isStatic && el.kind === FIELD)];
}
function generateDecorationExprs(info) {
return _core.types.arrayExpression(info.filter(isDecoratorInfo).map(el => {
return _core.types.arrayExpression(filteredOrderedDecoratorInfo(info).map(el => {
const decs = el.decorators.length > 1 ? _core.types.arrayExpression(el.decorators) : el.decorators[0];

@@ -185,15 +190,17 @@ const kind = el.isStatic ? el.kind + STATIC : el.kind;

function extractElementLocalAssignments(decorationInfo) {
const locals = [];
const localIds = [];
for (const el of decorationInfo) {
if ("locals" in el && el.locals) {
if (Array.isArray(el.locals)) {
locals.push(...el.locals);
} else {
locals.push(el.locals);
}
for (const el of filteredOrderedDecoratorInfo(decorationInfo)) {
const {
locals
} = el;
if (Array.isArray(locals)) {
localIds.push(...locals);
} else if (locals !== undefined) {
localIds.push(locals);
}
}
return locals;
return localIds;
}

@@ -200,0 +207,0 @@

{
"name": "@babel/plugin-proposal-decorators",
"version": "7.17.2",
"version": "7.17.8",
"author": "The Babel Team (https://babel.dev/team)",

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

"dependencies": {
"@babel/helper-create-class-features-plugin": "^7.17.1",
"@babel/helper-create-class-features-plugin": "^7.17.6",
"@babel/helper-plugin-utils": "^7.16.7",

@@ -34,5 +34,5 @@ "@babel/helper-replace-supers": "^7.16.7",

"devDependencies": {
"@babel/core": "^7.17.2",
"@babel/core": "^7.17.8",
"@babel/helper-plugin-test-runner": "^7.16.7",
"@babel/traverse": "^7.17.0",
"@babel/traverse": "^7.17.3",
"babel-plugin-polyfill-es-shims": "^0.6.0",

@@ -39,0 +39,0 @@ "object.getownpropertydescriptors": "^2.1.1"

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