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

@aurelia/expression-parser

Package Overview
Dependencies
Maintainers
0
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aurelia/expression-parser - npm Package Compare versions

Comparing version 2.1.0-dev.202409251354 to 2.1.0-dev.202412161127

7

CHANGELOG.md

@@ -6,2 +6,9 @@ # Change Log

<a name="2.0.0-beta.22"></a>
# 2.0.0-beta.22 (2024-09-30)
### Refactorings:
* **parser:** no longer provide default to exp parser interface (#2024) ([b55cbcd](https://github.com/aurelia/aurelia/commit/b55cbcd))
<a name="2.0.0-beta.21"></a>

@@ -8,0 +15,0 @@ # 2.0.0-beta.21 (2024-08-08)

12

dist/types/ast.d.ts
import type { IVisitor } from './ast.visitor';
export type ExpressionKind = 'AccessThis' | 'AccessGlobal' | 'AccessBoundary' | 'AccessScope' | 'ArrayLiteral' | 'ObjectLiteral' | 'PrimitiveLiteral' | 'Template' | 'Unary' | 'CallScope' | 'CallMember' | 'CallFunction' | 'CallGlobal' | 'AccessMember' | 'AccessKeyed' | 'TaggedTemplate' | 'Binary' | 'Conditional' | 'Assign' | 'ArrowFunction' | 'ValueConverter' | 'BindingBehavior' | 'ArrayBindingPattern' | 'ObjectBindingPattern' | 'BindingIdentifier' | 'ForOfStatement' | 'Interpolation' | 'ArrayDestructuring' | 'ObjectDestructuring' | 'DestructuringAssignmentLeaf' | 'Custom';
export type ExpressionKind = 'AccessThis' | 'AccessGlobal' | 'AccessBoundary' | 'AccessScope' | 'ArrayLiteral' | 'ObjectLiteral' | 'PrimitiveLiteral' | 'New' | 'Template' | 'Unary' | 'CallScope' | 'CallMember' | 'CallFunction' | 'CallGlobal' | 'AccessMember' | 'AccessKeyed' | 'TaggedTemplate' | 'Binary' | 'Conditional' | 'Assign' | 'ArrowFunction' | 'ValueConverter' | 'BindingBehavior' | 'ArrayBindingPattern' | 'ObjectBindingPattern' | 'BindingIdentifier' | 'ForOfStatement' | 'Interpolation' | 'ArrayDestructuring' | 'ObjectDestructuring' | 'DestructuringAssignmentLeaf' | 'Custom';
export type UnaryOperator = 'void' | 'typeof' | '!' | '-' | '+' | '++' | '--';
export type BinaryOperator = '??' | '&&' | '||' | '==' | '===' | '!=' | '!==' | 'instanceof' | 'in' | '+' | '-' | '*' | '/' | '%' | '<' | '>' | '<=' | '>=';
export type BinaryOperator = '??' | '&&' | '||' | '==' | '===' | '!=' | '!==' | 'instanceof' | 'in' | '+' | '-' | '*' | '/' | '%' | '**' | '<' | '>' | '<=' | '>=';
export type AssignmentOperator = '=' | '/=' | '*=' | '+=' | '-=';
export type IsPrimary = AccessThisExpression | AccessBoundaryExpression | AccessScopeExpression | AccessGlobalExpression | ArrayLiteralExpression | ObjectLiteralExpression | PrimitiveLiteralExpression | TemplateExpression;
export type IsPrimary = AccessThisExpression | AccessBoundaryExpression | AccessScopeExpression | AccessGlobalExpression | ArrayLiteralExpression | ObjectLiteralExpression | PrimitiveLiteralExpression | TemplateExpression | NewExpression;
export type IsLiteral = ArrayLiteralExpression | ObjectLiteralExpression | PrimitiveLiteralExpression | TemplateExpression;

@@ -97,2 +97,8 @@ export type IsLeftHandSide = IsPrimary | CallGlobalExpression | CallFunctionExpression | CallMemberExpression | CallScopeExpression | AccessMemberExpression | AccessKeyedExpression | TaggedTemplateExpression;

}
export declare class NewExpression {
readonly func: IsLeftHandSide;
readonly args: readonly IsAssign[];
readonly $kind = "New";
constructor(func: IsLeftHandSide, args: readonly IsAssign[]);
}
export declare class CallScopeExpression {

@@ -99,0 +105,0 @@ readonly name: string;

@@ -31,6 +31,8 @@ import { CustomExpression, ForOfStatement, Interpolation, AnyBindingExpression, IsBindingBehavior } from './ast';

Multiplicative = 512,
Binary = 513,
LeftHandSide = 514,
Primary = 515,
Unary = 516
Exponentiation = 576,
Binary = 577,
Member = 578,
LeftHandSide = 579,
Primary = 580,
Unary = 581
}

@@ -37,0 +39,0 @@ export type ExpressionType = 'None' | 'Interpolation' | 'IsIterator' | 'IsChainable' | 'IsFunction' | 'IsProperty' | 'IsCustom';

@@ -1,4 +0,4 @@

export { type ExpressionKind, CallFunctionExpression, CallGlobalExpression, CustomExpression, BindingBehaviorExpression, ValueConverterExpression, AssignExpression, ConditionalExpression, AccessThisExpression, AccessGlobalExpression, AccessScopeExpression, AccessBoundaryExpression, AccessMemberExpression, AccessKeyedExpression, CallScopeExpression, CallMemberExpression, BinaryExpression, UnaryExpression, PrimitiveLiteralExpression, ArrayLiteralExpression, ObjectLiteralExpression, TemplateExpression, TaggedTemplateExpression, ArrayBindingPattern, ObjectBindingPattern, BindingIdentifier, ForOfStatement, Interpolation, DestructuringAssignmentExpression, DestructuringAssignmentSingleExpression, DestructuringAssignmentRestExpression, ArrowFunction, type AnyBindingExpression, type IsPrimary, type IsLiteral, type IsLeftHandSide, type IsUnary, type IsBinary, type IsConditional, type IsAssign, type IsValueConverter, type IsBindingBehavior, type IsAssignable, type IsExpression, type IsExpressionOrStatement, type BinaryOperator, type AssignmentOperator, type BindingIdentifierOrPattern, type UnaryOperator, } from './ast';
export { type ExpressionKind, CallFunctionExpression, CallGlobalExpression, CustomExpression, BindingBehaviorExpression, ValueConverterExpression, AssignExpression, ConditionalExpression, AccessThisExpression, AccessGlobalExpression, AccessScopeExpression, AccessBoundaryExpression, AccessMemberExpression, AccessKeyedExpression, CallScopeExpression, CallMemberExpression, BinaryExpression, UnaryExpression, PrimitiveLiteralExpression, ArrayLiteralExpression, ObjectLiteralExpression, TemplateExpression, TaggedTemplateExpression, ArrayBindingPattern, ObjectBindingPattern, BindingIdentifier, ForOfStatement, Interpolation, DestructuringAssignmentExpression, DestructuringAssignmentSingleExpression, DestructuringAssignmentRestExpression, ArrowFunction, NewExpression, type AnyBindingExpression, type IsPrimary, type IsLiteral, type IsLeftHandSide, type IsUnary, type IsBinary, type IsConditional, type IsAssign, type IsValueConverter, type IsBindingBehavior, type IsAssignable, type IsExpression, type IsExpressionOrStatement, type BinaryOperator, type AssignmentOperator, type BindingIdentifierOrPattern, type UnaryOperator, } from './ast';
export { astVisit, type IVisitor, Unparser } from './ast.visitor';
export { IExpressionParser, ExpressionParser, type ExpressionType, parseExpression, } from './expression-parser';
//# sourceMappingURL=index.d.ts.map
{
"name": "@aurelia/expression-parser",
"version": "2.1.0-dev.202409251354",
"version": "2.1.0-dev.202412161127",
"main": "dist/cjs/index.cjs",

@@ -56,3 +56,3 @@ "module": "dist/esm/index.mjs",

"dependencies": {
"@aurelia/kernel": "2.1.0-dev.202409251354"
"@aurelia/kernel": "2.1.0-dev.202412161127"
},

@@ -63,4 +63,4 @@ "devDependencies": {

"engines": {
"node": ">=14.17.0"
"node": ">=20.16.0"
}
}

@@ -12,2 +12,3 @@ /* eslint-disable @typescript-eslint/no-unused-vars */

/** @internal */ export const ekPrimitiveLiteral = 'PrimitiveLiteral';
/** @internal */ export const ekNew = 'New';
/** @internal */ export const ekTemplate = 'Template';

@@ -46,2 +47,3 @@ /** @internal */ export const ekUnary = 'Unary';

| 'PrimitiveLiteral'
| 'New'
| 'Template'

@@ -74,5 +76,5 @@ | 'Unary'

export type BinaryOperator = '??' | '&&' | '||' | '==' | '===' | '!=' | '!==' | 'instanceof' | 'in' | '+' | '-' | '*' | '/' | '%' | '<' | '>' | '<=' | '>=';
export type BinaryOperator = '??' | '&&' | '||' | '==' | '===' | '!=' | '!==' | 'instanceof' | 'in' | '+' | '-' | '*' | '/' | '%' | '**' | '<' | '>' | '<=' | '>=';
export type AssignmentOperator = '=' | '/=' | '*=' | '+=' | '-=';
export type IsPrimary = AccessThisExpression | AccessBoundaryExpression | AccessScopeExpression | AccessGlobalExpression | ArrayLiteralExpression | ObjectLiteralExpression | PrimitiveLiteralExpression | TemplateExpression;
export type IsPrimary = AccessThisExpression | AccessBoundaryExpression | AccessScopeExpression | AccessGlobalExpression | ArrayLiteralExpression | ObjectLiteralExpression | PrimitiveLiteralExpression | TemplateExpression | NewExpression;
export type IsLiteral = ArrayLiteralExpression | ObjectLiteralExpression | PrimitiveLiteralExpression | TemplateExpression;

@@ -224,2 +226,10 @@ export type IsLeftHandSide = IsPrimary | CallGlobalExpression | CallFunctionExpression | CallMemberExpression | CallScopeExpression | AccessMemberExpression | AccessKeyedExpression | TaggedTemplateExpression;

export class NewExpression {
public readonly $kind = ekNew;
public constructor(
public readonly func: IsLeftHandSide,
public readonly args: readonly IsAssign[],
) {}
}
export class CallScopeExpression {

@@ -226,0 +236,0 @@ public readonly $kind = ekCallScope;

@@ -253,11 +253,8 @@ import {

public visitCallMember(expr: CallMemberExpression): void {
this.text += '(';
astVisit(expr.object, this);
this.text += `${expr.optionalMember ? '?.' : ''}.${expr.name}${expr.optionalCall ? '?.' : ''}`;
this.writeArgs(expr.args);
this.text += ')';
}
public visitCallScope(expr: CallScopeExpression): void {
this.text += '(';
let i = expr.ancestor;

@@ -269,3 +266,2 @@ while (i--) {

this.writeArgs(expr.args);
this.text += ')';
}

@@ -272,0 +268,0 @@

@@ -35,2 +35,3 @@ export {

ArrowFunction,
NewExpression,

@@ -37,0 +38,0 @@ // ast typing helpers

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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