Skip to content

Commit

Permalink
test(ast-spec): update @babel/parser (#6599)
Browse files Browse the repository at this point in the history
  • Loading branch information
sosukesuzuki committed Mar 13, 2023
1 parent 5f6ed73 commit 7fe41ff
Show file tree
Hide file tree
Showing 36 changed files with 864 additions and 17 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.7",
"@babel/parser": "^7.21.2",
"@babel/types": "^7.20.2",
"@nrwl/jest": "15.7.2",
"@nrwl/nx-cloud": "15.0.3",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`AST Fixtures declaration ExportAllDeclaration kind-type TSESTree - AST 1`] = `
Program {
type: "Program",
body: Array [
ExportAllDeclaration {
type: "ExportAllDeclaration",
assertions: Array [],
exported: Identifier {
type: "Identifier",
name: "x",
range: [17, 18],
loc: {
start: { column: 17, line: 1 },
end: { column: 18, line: 1 },
},
},
exportKind: "type",
source: Literal {
type: "Literal",
raw: "'a'",
value: "a",
range: [24, 27],
loc: {
start: { column: 24, line: 1 },
end: { column: 27, line: 1 },
},
},
range: [0, 28],
loc: {
start: { column: 0, line: 1 },
end: { column: 28, line: 1 },
},
},
],
sourceType: "module",
range: [0, 29],
loc: {
start: { column: 0, line: 1 },
end: { column: 0, line: 2 },
},
}
`;
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`AST Fixtures declaration ExportAllDeclaration kind-type TSESTree - Tokens 1`] = `
Array [
Keyword {
type: "Keyword",
value: "export",
range: [0, 6],
loc: {
start: { column: 0, line: 1 },
end: { column: 6, line: 1 },
},
},
Identifier {
type: "Identifier",
value: "type",
range: [7, 11],
loc: {
start: { column: 7, line: 1 },
end: { column: 11, line: 1 },
},
},
Punctuator {
type: "Punctuator",
value: "*",
range: [12, 13],
loc: {
start: { column: 12, line: 1 },
end: { column: 13, line: 1 },
},
},
Identifier {
type: "Identifier",
value: "as",
range: [14, 16],
loc: {
start: { column: 14, line: 1 },
end: { column: 16, line: 1 },
},
},
Identifier {
type: "Identifier",
value: "x",
range: [17, 18],
loc: {
start: { column: 17, line: 1 },
end: { column: 18, line: 1 },
},
},
Identifier {
type: "Identifier",
value: "from",
range: [19, 23],
loc: {
start: { column: 19, line: 1 },
end: { column: 23, line: 1 },
},
},
String {
type: "String",
value: "'a'",
range: [24, 27],
loc: {
start: { column: 24, line: 1 },
end: { column: 27, line: 1 },
},
},
Punctuator {
type: "Punctuator",
value: ";",
range: [27, 28],
loc: {
start: { column: 27, line: 1 },
end: { column: 28, line: 1 },
},
},
]
`;
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`AST Fixtures declaration ExportAllDeclaration kind-type Babel - AST 1`] = `
Program {
type: "Program",
body: Array [
ExportAllDeclaration {
type: "ExportAllDeclaration",
assertions: Array [],
exported: Identifier {
type: "Identifier",
name: "x",
range: [17, 18],
loc: {
start: { column: 17, line: 1 },
end: { column: 18, line: 1 },
},
},
exportKind: "type",
source: Literal {
type: "Literal",
raw: "'a'",
value: "a",
range: [24, 27],
loc: {
start: { column: 24, line: 1 },
end: { column: 27, line: 1 },
},
},
range: [0, 28],
loc: {
start: { column: 0, line: 1 },
end: { column: 28, line: 1 },
},
},
],
sourceType: "script",
range: [0, 29],
loc: {
start: { column: 0, line: 1 },
end: { column: 0, line: 2 },
},
}
`;
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`AST Fixtures declaration ExportAllDeclaration kind-type Babel - Tokens 1`] = `
Array [
Keyword {
type: "Keyword",
value: "export",
range: [0, 6],
loc: {
start: { column: 0, line: 1 },
end: { column: 6, line: 1 },
},
},
Identifier {
type: "Identifier",
value: "type",
range: [7, 11],
loc: {
start: { column: 7, line: 1 },
end: { column: 11, line: 1 },
},
},
Punctuator {
type: "Punctuator",
value: "*",
range: [12, 13],
loc: {
start: { column: 12, line: 1 },
end: { column: 13, line: 1 },
},
},
Identifier {
type: "Identifier",
value: "as",
range: [14, 16],
loc: {
start: { column: 14, line: 1 },
end: { column: 16, line: 1 },
},
},
Identifier {
type: "Identifier",
value: "x",
range: [17, 18],
loc: {
start: { column: 17, line: 1 },
end: { column: 18, line: 1 },
},
},
Identifier {
type: "Identifier",
value: "from",
range: [19, 23],
loc: {
start: { column: 19, line: 1 },
end: { column: 23, line: 1 },
},
},
String {
type: "String",
value: "'a'",
range: [24, 27],
loc: {
start: { column: 24, line: 1 },
end: { column: 27, line: 1 },
},
},
Punctuator {
type: "Punctuator",
value: ";",
range: [27, 28],
loc: {
start: { column: 27, line: 1 },
end: { column: 28, line: 1 },
},
},
]
`;
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`AST Fixtures declaration ExportAllDeclaration kind-type AST Alignment - AST 1`] = `
"Snapshot Diff:
- TSESTree
+ Babel
Program {
type: 'Program',
body: Array [
ExportAllDeclaration {
type: 'ExportAllDeclaration',
assertions: Array [],
exported: Identifier {
type: 'Identifier',
name: 'x',
range: [17, 18],
loc: {
start: { column: 17, line: 1 },
end: { column: 18, line: 1 },
},
},
exportKind: 'type',
source: Literal {
type: 'Literal',
raw: '\\\\'a\\\\'',
value: 'a',
range: [24, 27],
loc: {
start: { column: 24, line: 1 },
end: { column: 27, line: 1 },
},
},
range: [0, 28],
loc: {
start: { column: 0, line: 1 },
end: { column: 28, line: 1 },
},
},
],
- sourceType: 'module',
+ sourceType: 'script',
range: [0, 29],
loc: {
start: { column: 0, line: 1 },
end: { column: 0, line: 2 },
},
}"
`;
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`AST Fixtures declaration ExportAllDeclaration kind-type AST Alignment - Token 1`] = `
"Snapshot Diff:
Compared values have no visual difference."
`;
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`AST Fixtures declaration ExportAllDeclaration type-kind TSESTree - AST 1`] = `
Program {
type: "Program",
body: Array [
ExportAllDeclaration {
type: "ExportAllDeclaration",
assertions: Array [],
exported: null,
exportKind: "type",
source: Literal {
type: "Literal",
raw: "'a'",
value: "a",
range: [19, 22],
loc: {
start: { column: 19, line: 1 },
end: { column: 22, line: 1 },
},
},
range: [0, 23],
loc: {
start: { column: 0, line: 1 },
end: { column: 23, line: 1 },
},
},
],
sourceType: "module",
range: [0, 24],
loc: {
start: { column: 0, line: 1 },
end: { column: 0, line: 2 },
},
}
`;

0 comments on commit 7fe41ff

Please sign in to comment.