Skip to content

Commit

Permalink
chore(ast-spec): update @babel/parser and spapshots (#6266)
Browse files Browse the repository at this point in the history
* chore: update `@babel/parser`

* chore: update snapshots for `@babel/parser`

Co-authored-by: Josh Goldberg <git@joshuakgoldberg.com>
  • Loading branch information
sosukesuzuki and JoshuaKGoldberg committed Jan 22, 2023
1 parent d562244 commit d64a9b9
Show file tree
Hide file tree
Showing 35 changed files with 1,758 additions and 39 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"@babel/code-frame": "^7.18.6",
"@babel/core": "^7.20.2",
"@babel/eslint-parser": "^7.19.1",
"@babel/parser": "^7.20.3",
"@babel/parser": "^7.20.7",
"@babel/types": "^7.20.2",
"@nrwl/nx-cloud": "15.0.2",
"@nrwl/jest": "15.3.2",
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`AST Fixtures element AccessorProperty modifier-abstract-with-value Babel - AST 1`] = `
Program {
type: "Program",
body: Array [
ClassDeclaration {
type: "ClassDeclaration",
abstract: true,
body: ClassBody {
type: "ClassBody",
body: Array [
ClassAccessorProperty {
type: "ClassAccessorProperty",
abstract: true,
computed: false,
key: Identifier {
type: "Identifier",
name: "foo",
range: [41, 44],
loc: {
start: { column: 20, line: 2 },
end: { column: 23, line: 2 },
},
},
static: false,
typeAnnotation: TSTypeAnnotation {
type: "TSTypeAnnotation",
typeAnnotation: TSNumberKeyword {
type: "TSNumberKeyword",
range: [46, 52],
loc: {
start: { column: 25, line: 2 },
end: { column: 31, line: 2 },
},
},
range: [44, 52],
loc: {
start: { column: 23, line: 2 },
end: { column: 31, line: 2 },
},
},
value: Literal {
type: "Literal",
raw: "1",
value: 1,
range: [55, 56],
loc: {
start: { column: 34, line: 2 },
end: { column: 35, line: 2 },
},
},
range: [23, 57],
loc: {
start: { column: 2, line: 2 },
end: { column: 36, line: 2 },
},
},
],
range: [19, 59],
loc: {
start: { column: 19, line: 1 },
end: { column: 1, line: 3 },
},
},
id: Identifier {
type: "Identifier",
name: "Foo",
range: [15, 18],
loc: {
start: { column: 15, line: 1 },
end: { column: 18, line: 1 },
},
},
superClass: null,
range: [0, 59],
loc: {
start: { column: 0, line: 1 },
end: { column: 1, line: 3 },
},
},
],
sourceType: "script",
range: [0, 60],
loc: {
start: { column: 0, line: 1 },
end: { column: 0, line: 4 },
},
}
`;
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`AST Fixtures element AccessorProperty modifier-abstract-with-value Babel - Tokens 1`] = `
Array [
Identifier {
type: "Identifier",
value: "abstract",
range: [0, 8],
loc: {
start: { column: 0, line: 1 },
end: { column: 8, line: 1 },
},
},
Keyword {
type: "Keyword",
value: "class",
range: [9, 14],
loc: {
start: { column: 9, line: 1 },
end: { column: 14, line: 1 },
},
},
Identifier {
type: "Identifier",
value: "Foo",
range: [15, 18],
loc: {
start: { column: 15, line: 1 },
end: { column: 18, line: 1 },
},
},
Punctuator {
type: "Punctuator",
value: "{",
range: [19, 20],
loc: {
start: { column: 19, line: 1 },
end: { column: 20, line: 1 },
},
},
Identifier {
type: "Identifier",
value: "abstract",
range: [23, 31],
loc: {
start: { column: 2, line: 2 },
end: { column: 10, line: 2 },
},
},
Identifier {
type: "Identifier",
value: "accessor",
range: [32, 40],
loc: {
start: { column: 11, line: 2 },
end: { column: 19, line: 2 },
},
},
Identifier {
type: "Identifier",
value: "foo",
range: [41, 44],
loc: {
start: { column: 20, line: 2 },
end: { column: 23, line: 2 },
},
},
Punctuator {
type: "Punctuator",
value: ":",
range: [44, 45],
loc: {
start: { column: 23, line: 2 },
end: { column: 24, line: 2 },
},
},
Identifier {
type: "Identifier",
value: "number",
range: [46, 52],
loc: {
start: { column: 25, line: 2 },
end: { column: 31, line: 2 },
},
},
Punctuator {
type: "Punctuator",
value: "=",
range: [53, 54],
loc: {
start: { column: 32, line: 2 },
end: { column: 33, line: 2 },
},
},
Numeric {
type: "Numeric",
value: "1",
range: [55, 56],
loc: {
start: { column: 34, line: 2 },
end: { column: 35, line: 2 },
},
},
Punctuator {
type: "Punctuator",
value: ";",
range: [56, 57],
loc: {
start: { column: 35, line: 2 },
end: { column: 36, line: 2 },
},
},
Punctuator {
type: "Punctuator",
value: "}",
range: [58, 59],
loc: {
start: { column: 0, line: 3 },
end: { column: 1, line: 3 },
},
},
]
`;
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`AST Fixtures element AccessorProperty modifier-abstract-with-value AST Alignment - AST 1`] = `
"Snapshot Diff:
- TSESTree
+ Babel
Program {
type: 'Program',
body: Array [
ClassDeclaration {
type: 'ClassDeclaration',
abstract: true,
body: ClassBody {
type: 'ClassBody',
body: Array [
- TSAbstractAccessorProperty {
- type: 'TSAbstractAccessorProperty',
+ ClassAccessorProperty {
+ type: 'ClassAccessorProperty',
+ abstract: true,
computed: false,
- declare: false,
key: Identifier {
type: 'Identifier',
name: 'foo',
range: [41, 44],
loc: {
start: { column: 20, line: 2 },
end: { column: 23, line: 2 },
},
},
- override: false,
static: false,
typeAnnotation: TSTypeAnnotation {
type: 'TSTypeAnnotation',
typeAnnotation: TSNumberKeyword {
type: 'TSNumberKeyword',
range: [46, 52],
loc: {
start: { column: 25, line: 2 },
end: { column: 31, line: 2 },
},
},
range: [44, 52],
loc: {
start: { column: 23, line: 2 },
end: { column: 31, line: 2 },
},
},
- value: null,
+ value: Literal {
+ type: 'Literal',
+ raw: '1',
+ value: 1,
+
+ range: [55, 56],
+ loc: {
+ start: { column: 34, line: 2 },
+ end: { column: 35, line: 2 },
+ },
+ },
range: [23, 57],
loc: {
start: { column: 2, line: 2 },
end: { column: 36, line: 2 },
},
},
],
range: [19, 59],
loc: {
start: { column: 19, line: 1 },
end: { column: 1, line: 3 },
},
},
id: Identifier {
type: 'Identifier',
name: 'Foo',
range: [15, 18],
loc: {
start: { column: 15, line: 1 },
end: { column: 18, line: 1 },
},
},
superClass: null,
range: [0, 59],
loc: {
start: { column: 0, line: 1 },
end: { column: 1, line: 3 },
},
},
],
sourceType: 'script',
range: [0, 60],
loc: {
start: { column: 0, line: 1 },
end: { column: 0, line: 4 },
},
}"
`;
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`AST Fixtures element AccessorProperty modifier-abstract-with-value Babel - Error 1`] = `[SyntaxError: Missing semicolon. (2:23)]`;
exports[`AST Fixtures element AccessorProperty modifier-abstract-with-value AST Alignment - Token 1`] = `
"Snapshot Diff:
Compared values have no visual difference."
`;

This file was deleted.

0 comments on commit d64a9b9

Please sign in to comment.