@marko/compiler 5.39.31 → 5.39.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -890,6 +890,7 @@ export class NodePath<T = Node> {
890
890
  isFunction(opts?: object): this is NodePath<t.Function>;
891
891
  isFunctionDeclaration(opts?: object): this is NodePath<t.FunctionDeclaration>;
892
892
  isFunctionExpression(opts?: object): this is NodePath<t.FunctionExpression>;
893
+ isFunctionParameter(opts?: object): this is NodePath<t.FunctionParameter>;
893
894
  isFunctionParent(opts?: object): this is NodePath<t.FunctionParent>;
894
895
  isFunctionTypeAnnotation(opts?: object): this is NodePath<t.FunctionTypeAnnotation>;
895
896
  isFunctionTypeParam(opts?: object): this is NodePath<t.FunctionTypeParam>;
@@ -900,8 +901,10 @@ export class NodePath<T = Node> {
900
901
  isImport(opts?: object): this is NodePath<t.Import>;
901
902
  isImportAttribute(opts?: object): this is NodePath<t.ImportAttribute>;
902
903
  isImportDeclaration(opts?: object): this is NodePath<t.ImportDeclaration>;
904
+ isImportExpression(opts?: object): this is NodePath<t.ImportExpression>;
903
905
  isImportDefaultSpecifier(opts?: object): this is NodePath<t.ImportDefaultSpecifier>;
904
906
  isImportNamespaceSpecifier(opts?: object): this is NodePath<t.ImportNamespaceSpecifier>;
907
+ isImportOrExportDeclaration(opts?: object): this is NodePath<t.ImportOrExportDeclaration>;
905
908
  isImportSpecifier(opts?: object): this is NodePath<t.ImportSpecifier>;
906
909
  isIndexedAccessType(opts?: object): this is NodePath<t.IndexedAccessType>;
907
910
  isInferredPredicate(opts?: object): this is NodePath<t.InferredPredicate>;
@@ -1017,6 +1020,7 @@ export class NodePath<T = Node> {
1017
1020
  isTSDeclareFunction(opts?: object): this is NodePath<t.TSDeclareFunction>;
1018
1021
  isTSDeclareMethod(opts?: object): this is NodePath<t.TSDeclareMethod>;
1019
1022
  isTSEntityName(opts?: object): this is NodePath<t.TSEntityName>;
1023
+ isTSEnumBody(opts?: object): this is NodePath<t.TSEnumBody>;
1020
1024
  isTSEnumDeclaration(opts?: object): this is NodePath<t.TSEnumDeclaration>;
1021
1025
  isTSEnumMember(opts?: object): this is NodePath<t.TSEnumMember>;
1022
1026
  isTSExportAssignment(opts?: object): this is NodePath<t.TSExportAssignment>;
@@ -1054,6 +1058,7 @@ export class NodePath<T = Node> {
1054
1058
  isTSSatisfiesExpression(opts?: object): this is NodePath<t.TSSatisfiesExpression>;
1055
1059
  isTSStringKeyword(opts?: object): this is NodePath<t.TSStringKeyword>;
1056
1060
  isTSSymbolKeyword(opts?: object): this is NodePath<t.TSSymbolKeyword>;
1061
+ isTSTemplateLiteralType(opts?: object): this is NodePath<t.TSTemplateLiteralType>;
1057
1062
  isTSThisType(opts?: object): this is NodePath<t.TSThisType>;
1058
1063
  isTSTupleType(opts?: object): this is NodePath<t.TSTupleType>;
1059
1064
  isTSType(opts?: object): this is NodePath<t.TSType>;
@@ -1101,6 +1106,7 @@ export class NodePath<T = Node> {
1101
1106
  isVariableDeclaration(opts?: object): this is NodePath<t.VariableDeclaration>;
1102
1107
  isVariableDeclarator(opts?: object): this is NodePath<t.VariableDeclarator>;
1103
1108
  isVariance(opts?: object): this is NodePath<t.Variance>;
1109
+ isVoidPattern(opts?: object): this is NodePath<t.VoidPattern>;
1104
1110
  isVoidTypeAnnotation(opts?: object): this is NodePath<t.VoidTypeAnnotation>;
1105
1111
  isWhile(opts?: object): this is NodePath<t.While>;
1106
1112
  isWhileStatement(opts?: object): this is NodePath<t.WhileStatement>;
@@ -1234,6 +1240,7 @@ export class NodePath<T = Node> {
1234
1240
  assertFunction(opts?: object): asserts this is NodePath<t.Function>;
1235
1241
  assertFunctionDeclaration(opts?: object): asserts this is NodePath<t.FunctionDeclaration>;
1236
1242
  assertFunctionExpression(opts?: object): asserts this is NodePath<t.FunctionExpression>;
1243
+ assertFunctionParameter(opts?: object): asserts this is NodePath<t.FunctionParameter>;
1237
1244
  assertFunctionParent(opts?: object): asserts this is NodePath<t.FunctionParent>;
1238
1245
  assertFunctionTypeAnnotation(opts?: object): asserts this is NodePath<t.FunctionTypeAnnotation>;
1239
1246
  assertFunctionTypeParam(opts?: object): asserts this is NodePath<t.FunctionTypeParam>;
@@ -1244,8 +1251,10 @@ export class NodePath<T = Node> {
1244
1251
  assertImport(opts?: object): asserts this is NodePath<t.Import>;
1245
1252
  assertImportAttribute(opts?: object): asserts this is NodePath<t.ImportAttribute>;
1246
1253
  assertImportDeclaration(opts?: object): asserts this is NodePath<t.ImportDeclaration>;
1254
+ assertImportExpression(opts?: object): asserts this is NodePath<t.ImportExpression>;
1247
1255
  assertImportDefaultSpecifier(opts?: object): asserts this is NodePath<t.ImportDefaultSpecifier>;
1248
1256
  assertImportNamespaceSpecifier(opts?: object): asserts this is NodePath<t.ImportNamespaceSpecifier>;
1257
+ assertImportOrExportDeclaration(opts?: object): asserts this is NodePath<t.ImportOrExportDeclaration>;
1249
1258
  assertImportSpecifier(opts?: object): asserts this is NodePath<t.ImportSpecifier>;
1250
1259
  assertIndexedAccessType(opts?: object): asserts this is NodePath<t.IndexedAccessType>;
1251
1260
  assertInferredPredicate(opts?: object): asserts this is NodePath<t.InferredPredicate>;
@@ -1361,6 +1370,7 @@ export class NodePath<T = Node> {
1361
1370
  assertTSDeclareFunction(opts?: object): asserts this is NodePath<t.TSDeclareFunction>;
1362
1371
  assertTSDeclareMethod(opts?: object): asserts this is NodePath<t.TSDeclareMethod>;
1363
1372
  assertTSEntityName(opts?: object): asserts this is NodePath<t.TSEntityName>;
1373
+ assertTSEnumBody(opts?: object): asserts this is NodePath<t.TSEnumBody>;
1364
1374
  assertTSEnumDeclaration(opts?: object): asserts this is NodePath<t.TSEnumDeclaration>;
1365
1375
  assertTSEnumMember(opts?: object): asserts this is NodePath<t.TSEnumMember>;
1366
1376
  assertTSExportAssignment(opts?: object): asserts this is NodePath<t.TSExportAssignment>;
@@ -1398,6 +1408,7 @@ export class NodePath<T = Node> {
1398
1408
  assertTSSatisfiesExpression(opts?: object): asserts this is NodePath<t.TSSatisfiesExpression>;
1399
1409
  assertTSStringKeyword(opts?: object): asserts this is NodePath<t.TSStringKeyword>;
1400
1410
  assertTSSymbolKeyword(opts?: object): asserts this is NodePath<t.TSSymbolKeyword>;
1411
+ assertTSTemplateLiteralType(opts?: object): asserts this is NodePath<t.TSTemplateLiteralType>;
1401
1412
  assertTSThisType(opts?: object): asserts this is NodePath<t.TSThisType>;
1402
1413
  assertTSTupleType(opts?: object): asserts this is NodePath<t.TSTupleType>;
1403
1414
  assertTSType(opts?: object): asserts this is NodePath<t.TSType>;
@@ -1445,6 +1456,7 @@ export class NodePath<T = Node> {
1445
1456
  assertVariableDeclaration(opts?: object): asserts this is NodePath<t.VariableDeclaration>;
1446
1457
  assertVariableDeclarator(opts?: object): asserts this is NodePath<t.VariableDeclarator>;
1447
1458
  assertVariance(opts?: object): asserts this is NodePath<t.Variance>;
1459
+ assertVoidPattern(opts?: object): asserts this is NodePath<t.VoidPattern>;
1448
1460
  assertVoidTypeAnnotation(opts?: object): asserts this is NodePath<t.VoidTypeAnnotation>;
1449
1461
  assertWhile(opts?: object): asserts this is NodePath<t.While>;
1450
1462
  assertWhileStatement(opts?: object): asserts this is NodePath<t.WhileStatement>;
package/dist/types.d.ts CHANGED
@@ -56,7 +56,7 @@ export interface ArrayExpression extends BaseNode {
56
56
  export interface AssignmentExpression extends BaseNode {
57
57
  type: "AssignmentExpression";
58
58
  operator: string;
59
- left: LVal;
59
+ left: LVal | OptionalMemberExpression;
60
60
  right: Expression;
61
61
  }
62
62
 
@@ -1816,7 +1816,7 @@ export type Pureish = FunctionDeclaration | FunctionExpression | StringLiteral |
1816
1816
  export type Declaration = FunctionDeclaration | VariableDeclaration | ClassDeclaration | ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ImportDeclaration | DeclareClass | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareTypeAlias | DeclareOpaqueType | DeclareVariable | DeclareExportDeclaration | DeclareExportAllDeclaration | InterfaceDeclaration | OpaqueType | TypeAlias | EnumDeclaration | TSDeclareFunction | TSInterfaceDeclaration | TSTypeAliasDeclaration | TSEnumDeclaration | TSModuleDeclaration | TSImportEqualsDeclaration;
1817
1817
  export type FunctionParameter = Identifier | RestElement | AssignmentPattern | ArrayPattern | ObjectPattern | VoidPattern;
1818
1818
  export type PatternLike = Identifier | MemberExpression | RestElement | AssignmentPattern | ArrayPattern | ObjectPattern | VoidPattern | TSAsExpression | TSSatisfiesExpression | TSTypeAssertion | TSNonNullExpression;
1819
- export type LVal = Identifier | MemberExpression | RestElement | AssignmentPattern | ArrayPattern | ObjectPattern | OptionalMemberExpression | TSParameterProperty | TSAsExpression | TSSatisfiesExpression | TSTypeAssertion | TSNonNullExpression;
1819
+ export type LVal = Identifier | MemberExpression | RestElement | AssignmentPattern | ArrayPattern | ObjectPattern | TSParameterProperty | TSAsExpression | TSSatisfiesExpression | TSTypeAssertion | TSNonNullExpression;
1820
1820
  export type TSEntityName = Identifier | TSQualifiedName;
1821
1821
  export type Literal = StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | RegExpLiteral | TemplateLiteral | BigIntLiteral | DecimalLiteral;
1822
1822
  export type Immutable = StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | BigIntLiteral | JSXAttribute | JSXClosingElement | JSXElement | JSXExpressionContainer | JSXSpreadChild | JSXOpeningElement | JSXText | JSXFragment | JSXOpeningFragment | JSXClosingFragment | DecimalLiteral;
@@ -1906,7 +1906,7 @@ export interface Aliases {
1906
1906
  }
1907
1907
 
1908
1908
  export function arrayExpression(elements?: Array<null | Expression | SpreadElement>): ArrayExpression;
1909
- export function assignmentExpression(operator: string, left: LVal, right: Expression): AssignmentExpression;
1909
+ export function assignmentExpression(operator: string, left: LVal | OptionalMemberExpression, right: Expression): AssignmentExpression;
1910
1910
  export function binaryExpression(operator: "+" | "-" | "/" | "%" | "*" | "**" | "&" | "|" | ">>" | ">>>" | "<<" | "^" | "==" | "===" | "!=" | "!==" | "in" | "instanceof" | ">" | "<" | ">=" | "<=" | "|>", left: Expression | PrivateName, right: Expression): BinaryExpression;
1911
1911
  export function interpreterDirective(value: string): InterpreterDirective;
1912
1912
  export function directive(value: DirectiveLiteral): Directive;
@@ -2132,7 +2132,7 @@ export function tsIntersectionType(types: Array<TSType>): TSIntersectionType;
2132
2132
  export function tsConditionalType(checkType: TSType, extendsType: TSType, trueType: TSType, falseType: TSType): TSConditionalType;
2133
2133
  export function tsInferType(typeParameter: TSTypeParameter): TSInferType;
2134
2134
  export function tsParenthesizedType(typeAnnotation: TSType): TSParenthesizedType;
2135
- export function tsTypeOperator(typeAnnotation: TSType, operator: string): TSTypeOperator;
2135
+ export function tsTypeOperator(typeAnnotation: TSType, operator?: string): TSTypeOperator;
2136
2136
  export function tsIndexedAccessType(objectType: TSType, indexType: TSType): TSIndexedAccessType;
2137
2137
  export function tsMappedType(typeParameter: TSTypeParameter, typeAnnotation?: TSType | null, nameType?: TSType | null): TSMappedType;
2138
2138
  export function tsTemplateLiteralType(quasis: Array<TemplateElement>, types: Array<TSType>): TSTemplateLiteralType;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marko/compiler",
3
- "version": "5.39.31",
3
+ "version": "5.39.32",
4
4
  "description": "Marko template to JS compiler.",
5
5
  "keywords": [
6
6
  "babel",
@@ -69,13 +69,13 @@
69
69
  "@babel/plugin-syntax-typescript": "^7.27.1",
70
70
  "@babel/plugin-transform-modules-commonjs": "^7.27.1",
71
71
  "@babel/plugin-transform-typescript": "^7.28.0",
72
- "@babel/runtime": "^7.27.6",
72
+ "@babel/runtime": "^7.28.2",
73
73
  "@babel/traverse": "^7.28.0",
74
- "@babel/types": "^7.28.0",
74
+ "@babel/types": "^7.28.2",
75
75
  "@luxass/strip-json-comments": "^1.4.0",
76
76
  "complain": "^1.6.1",
77
77
  "he": "^1.2.0",
78
- "htmljs-parser": "^5.5.4",
78
+ "htmljs-parser": "^5.7.3",
79
79
  "jsesc": "^3.1.0",
80
80
  "kleur": "^4.1.5",
81
81
  "lasso-package-root": "^1.0.1",
@@ -87,7 +87,7 @@
87
87
  "source-map-support": "^0.5.21"
88
88
  },
89
89
  "devDependencies": {
90
- "marko": "^5.37.41"
90
+ "marko": "^5.37.43"
91
91
  },
92
92
  "engines": {
93
93
  "node": "18 || 20 || >=22"