@markw65/prettier-plugin-monkeyc 1.0.24 → 1.0.25

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.
package/README.md CHANGED
@@ -210,10 +210,14 @@ Accept and fix a few more illegal programs
210
210
  - Don't allow comments on AttributeList nodes.
211
211
  - They weren't handled, and that resulted in an assertion from Prettier
212
212
 
213
- #### 1.0.23
213
+ #### 1.0.24
214
214
 
215
215
  - Add an Attributes node between the AttributeList and the Attribute[]
216
216
  - This allows us to handle trailing comments on attributes better.
217
217
  - Properly handle comments in the monkeyc-json parser.
218
218
  - Drop comments unless we have the source code
219
219
  - Drop prettier-ignore comments if we _do_ have the source code.
220
+
221
+ #### 1.0.25
222
+
223
+ - Fix some nits in estree-types.
@@ -15,7 +15,7 @@ interface BaseNode {
15
15
  end?: number;
16
16
  range?: [number, number] | undefined;
17
17
  }
18
- export declare type Node = Identifier | Literal | Program | SwitchCase | InstanceOfCase | CatchClause | CatchClauses | VariableDeclarator | EnumStringBody | EnumStringMember | Statement | Expression | Property | Declaration | ImportStatement | AsTypeSpec | AttributeList | Attributes | TypeSpecList | TypeSpecPart | ClassElement | ClassBody | MethodDefinition | Comment;
18
+ export declare type Node = Identifier | DottedName | ScopedName | Literal | Program | SwitchCase | InstanceOfCase | CatchClause | CatchClauses | VariableDeclarator | EnumStringBody | EnumStringMember | Statement | Expression | Property | Declaration | ImportStatement | AsTypeSpec | AttributeList | Attributes | TypeSpecList | TypeSpecPart | ClassElement | ClassBody | MethodDefinition | Comment;
19
19
  export interface Comment extends BaseNode {
20
20
  type: "Line" | "Block";
21
21
  value: string;
@@ -233,6 +233,13 @@ export interface MemberExpression extends BaseExpression {
233
233
  property: Expression;
234
234
  computed: boolean;
235
235
  }
236
+ export interface DottedName extends MemberExpression {
237
+ type: "MemberExpression";
238
+ object: ScopedName;
239
+ property: Identifier;
240
+ computed: false;
241
+ }
242
+ export declare type ScopedName = DottedName | Identifier;
236
243
  export interface SwitchCase extends BaseNode {
237
244
  type: "SwitchCase";
238
245
  test?: Expression | InstanceOfCase | null | undefined;
@@ -268,7 +275,7 @@ export declare type UpdateOperator = "++" | "--";
268
275
  export interface ClassDeclaration extends BaseDeclaration {
269
276
  type: "ClassDeclaration";
270
277
  id: Identifier;
271
- superClass?: Expression | null | undefined;
278
+ superClass?: ScopedName | null | undefined;
272
279
  body: ClassBody;
273
280
  }
274
281
  export interface ClassBody extends BaseStatement {
@@ -310,7 +317,7 @@ export interface TypeSpecList extends BaseNode {
310
317
  }
311
318
  export interface TypeSpecPart extends BaseNode {
312
319
  type: "TypeSpecPart";
313
- name: Identifier | MemberExpression;
320
+ name: ScopedName | string;
314
321
  body?: BlockStatement;
315
322
  callspec?: MethodDefinition;
316
323
  generics?: Array<TypeSpecList>;
@@ -337,11 +344,11 @@ declare type Attribute = SymbolExpression | CallExpression;
337
344
  export declare type ImportStatement = ImportModule | Using;
338
345
  export interface ImportModule extends BaseNode {
339
346
  type: "ImportModule";
340
- id: MemberExpression;
347
+ id: ScopedName;
341
348
  }
342
349
  export interface Using extends BaseNode {
343
350
  type: "Using";
344
- id: MemberExpression;
351
+ id: ScopedName;
345
352
  as: Identifier;
346
353
  }
347
354
  export {};
package/package.json CHANGED
@@ -23,7 +23,7 @@
23
23
  "prepack": "webpack --mode production"
24
24
  },
25
25
  "name": "@markw65/prettier-plugin-monkeyc",
26
- "version": "1.0.24",
26
+ "version": "1.0.25",
27
27
  "description": "A prettier plugin for Garmin monkey-c",
28
28
  "main": "build/prettier-plugin-monkeyc.cjs",
29
29
  "types": "build/src/prettier-plugin-monkeyc.d.ts",