Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
966387d
commit 87fc2e7
Showing
10 changed files
with
195 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...ges/babel-parser/test/fixtures/experimental/import-assertions/valid-export-class/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export class Foo {} |
35 changes: 35 additions & 0 deletions
35
.../babel-parser/test/fixtures/experimental/import-assertions/valid-export-class/output.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"type": "File", | ||
"start":0,"end":19,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":19}}, | ||
"program": { | ||
"type": "Program", | ||
"start":0,"end":19,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":19}}, | ||
"sourceType": "module", | ||
"interpreter": null, | ||
"body": [ | ||
{ | ||
"type": "ExportNamedDeclaration", | ||
"start":0,"end":19,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":19}}, | ||
"specifiers": [], | ||
"source": null, | ||
"declaration": { | ||
"type": "ClassDeclaration", | ||
"start":7,"end":19,"loc":{"start":{"line":1,"column":7},"end":{"line":1,"column":19}}, | ||
"id": { | ||
"type": "Identifier", | ||
"start":13,"end":16,"loc":{"start":{"line":1,"column":13},"end":{"line":1,"column":16},"identifierName":"Foo"}, | ||
"name": "Foo" | ||
}, | ||
"superClass": null, | ||
"body": { | ||
"type": "ClassBody", | ||
"start":17,"end":19,"loc":{"start":{"line":1,"column":17},"end":{"line":1,"column":19}}, | ||
"body": [] | ||
} | ||
}, | ||
"assertions": [] | ||
} | ||
], | ||
"directives": [] | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
.../babel-parser/test/fixtures/experimental/import-assertions/valid-export-function/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export function foo() {} |
38 changes: 38 additions & 0 deletions
38
...bel-parser/test/fixtures/experimental/import-assertions/valid-export-function/output.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"type": "File", | ||
"start":0,"end":24,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":24}}, | ||
"program": { | ||
"type": "Program", | ||
"start":0,"end":24,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":24}}, | ||
"sourceType": "module", | ||
"interpreter": null, | ||
"body": [ | ||
{ | ||
"type": "ExportNamedDeclaration", | ||
"start":0,"end":24,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":24}}, | ||
"specifiers": [], | ||
"source": null, | ||
"declaration": { | ||
"type": "FunctionDeclaration", | ||
"start":7,"end":24,"loc":{"start":{"line":1,"column":7},"end":{"line":1,"column":24}}, | ||
"id": { | ||
"type": "Identifier", | ||
"start":16,"end":19,"loc":{"start":{"line":1,"column":16},"end":{"line":1,"column":19},"identifierName":"foo"}, | ||
"name": "foo" | ||
}, | ||
"generator": false, | ||
"async": false, | ||
"params": [], | ||
"body": { | ||
"type": "BlockStatement", | ||
"start":22,"end":24,"loc":{"start":{"line":1,"column":22},"end":{"line":1,"column":24}}, | ||
"body": [], | ||
"directives": [] | ||
} | ||
}, | ||
"assertions": [] | ||
} | ||
], | ||
"directives": [] | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
.../babel-parser/test/fixtures/experimental/import-assertions/valid-export-variable/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export const foo = ""; |
45 changes: 45 additions & 0 deletions
45
...bel-parser/test/fixtures/experimental/import-assertions/valid-export-variable/output.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"type": "File", | ||
"start":0,"end":22,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":22}}, | ||
"program": { | ||
"type": "Program", | ||
"start":0,"end":22,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":22}}, | ||
"sourceType": "module", | ||
"interpreter": null, | ||
"body": [ | ||
{ | ||
"type": "ExportNamedDeclaration", | ||
"start":0,"end":22,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":22}}, | ||
"specifiers": [], | ||
"source": null, | ||
"declaration": { | ||
"type": "VariableDeclaration", | ||
"start":7,"end":22,"loc":{"start":{"line":1,"column":7},"end":{"line":1,"column":22}}, | ||
"declarations": [ | ||
{ | ||
"type": "VariableDeclarator", | ||
"start":13,"end":21,"loc":{"start":{"line":1,"column":13},"end":{"line":1,"column":21}}, | ||
"id": { | ||
"type": "Identifier", | ||
"start":13,"end":16,"loc":{"start":{"line":1,"column":13},"end":{"line":1,"column":16},"identifierName":"foo"}, | ||
"name": "foo" | ||
}, | ||
"init": { | ||
"type": "StringLiteral", | ||
"start":19,"end":21,"loc":{"start":{"line":1,"column":19},"end":{"line":1,"column":21}}, | ||
"extra": { | ||
"rawValue": "", | ||
"raw": "\"\"" | ||
}, | ||
"value": "" | ||
} | ||
} | ||
], | ||
"kind": "const" | ||
}, | ||
"assertions": [] | ||
} | ||
], | ||
"directives": [] | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
...el-parser/test/fixtures/experimental/import-assertions/valid-export-without-from/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
const foo = ""; | ||
|
||
export { foo }; |
61 changes: 61 additions & 0 deletions
61
...parser/test/fixtures/experimental/import-assertions/valid-export-without-from/output.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
{ | ||
"type": "File", | ||
"start":0,"end":32,"loc":{"start":{"line":1,"column":0},"end":{"line":3,"column":15}}, | ||
"program": { | ||
"type": "Program", | ||
"start":0,"end":32,"loc":{"start":{"line":1,"column":0},"end":{"line":3,"column":15}}, | ||
"sourceType": "module", | ||
"interpreter": null, | ||
"body": [ | ||
{ | ||
"type": "VariableDeclaration", | ||
"start":0,"end":15,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":15}}, | ||
"declarations": [ | ||
{ | ||
"type": "VariableDeclarator", | ||
"start":6,"end":14,"loc":{"start":{"line":1,"column":6},"end":{"line":1,"column":14}}, | ||
"id": { | ||
"type": "Identifier", | ||
"start":6,"end":9,"loc":{"start":{"line":1,"column":6},"end":{"line":1,"column":9},"identifierName":"foo"}, | ||
"name": "foo" | ||
}, | ||
"init": { | ||
"type": "StringLiteral", | ||
"start":12,"end":14,"loc":{"start":{"line":1,"column":12},"end":{"line":1,"column":14}}, | ||
"extra": { | ||
"rawValue": "", | ||
"raw": "\"\"" | ||
}, | ||
"value": "" | ||
} | ||
} | ||
], | ||
"kind": "const" | ||
}, | ||
{ | ||
"type": "ExportNamedDeclaration", | ||
"start":17,"end":32,"loc":{"start":{"line":3,"column":0},"end":{"line":3,"column":15}}, | ||
"specifiers": [ | ||
{ | ||
"type": "ExportSpecifier", | ||
"start":26,"end":29,"loc":{"start":{"line":3,"column":9},"end":{"line":3,"column":12}}, | ||
"local": { | ||
"type": "Identifier", | ||
"start":26,"end":29,"loc":{"start":{"line":3,"column":9},"end":{"line":3,"column":12},"identifierName":"foo"}, | ||
"name": "foo" | ||
}, | ||
"exported": { | ||
"type": "Identifier", | ||
"start":26,"end":29,"loc":{"start":{"line":3,"column":9},"end":{"line":3,"column":12},"identifierName":"foo"}, | ||
"name": "foo" | ||
} | ||
} | ||
], | ||
"source": null, | ||
"declaration": null, | ||
"assertions": [] | ||
} | ||
], | ||
"directives": [] | ||
} | ||
} |