@babel/plugin-proposal-decorators
Advanced tools
Comparing version 7.17.2 to 7.17.8
@@ -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" |
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
45136
720
3