Update flow-parser to v0.332.0 (#20110)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: fisker <lionkay@gmail.com>
This commit is contained in:
1 parent
92ee7178a6
commit
1a15312010
10 files changed
+35
-85
No files matched your search
@@ -1,19 +1,19 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`valid-flow-default-import.js format 1`] = `
|
||||
"Unexpected identifier, expected the keyword \`from\` (1:15)
|
||||
"The \`module\` import phase is not supported. (1:8)
|
||||
> 1 | import module foo from "./module.wasm";
|
||||
| ^
|
||||
| ^
|
||||
2 | import bar from "./module.wasm";
|
||||
3 |
|
||||
Cause: Unexpected identifier, expected the keyword \`from\` (1:14)"
|
||||
Cause: The \`module\` import phase is not supported. (1:7)"
|
||||
`;
|
||||
|
||||
exports[`valid-ts-default-import.js format 1`] = `
|
||||
"Unexpected identifier, expected the keyword \`from\` (1:15)
|
||||
"The \`module\` import phase is not supported. (1:8)
|
||||
> 1 | import module foo from "./module.wasm";
|
||||
| ^
|
||||
| ^
|
||||
2 | import bar from "./module.wasm";
|
||||
3 |
|
||||
Cause: Unexpected identifier, expected the keyword \`from\` (1:14)"
|
||||
Cause: The \`module\` import phase is not supported. (1:7)"
|
||||
`;
|
||||
+8
-8
@@ -33,11 +33,11 @@ Cause: Unexpected token x"
|
||||
`;
|
||||
|
||||
exports[`no-default.js format[flow] 1`] = `
|
||||
"Unexpected identifier, expected the keyword \`from\` (1:14)
|
||||
"Only \`import defer * as ns from "module"\` is valid (1:14)
|
||||
> 1 | import defer x from "x";
|
||||
| ^
|
||||
2 |
|
||||
Cause: Unexpected identifier, expected the keyword \`from\` (1:13)"
|
||||
Cause: Only \`import defer * as ns from "module"\` is valid (1:13)"
|
||||
`;
|
||||
|
||||
exports[`no-default.js format[hermes] 1`] = `
|
||||
@@ -127,11 +127,11 @@ Cause: Unexpected token {"
|
||||
`;
|
||||
|
||||
exports[`no-named.js format[flow] 1`] = `
|
||||
"Unexpected token \`{\`, expected the keyword \`from\` (1:14)
|
||||
"Only \`import defer * as ns from "module"\` is valid (1:14)
|
||||
> 1 | import defer { x } from "x";
|
||||
| ^
|
||||
2 |
|
||||
Cause: Unexpected token \`{\`, expected the keyword \`from\` (1:13)"
|
||||
Cause: Only \`import defer * as ns from "module"\` is valid (1:13)"
|
||||
`;
|
||||
|
||||
exports[`no-named.js format[hermes] 1`] = `
|
||||
@@ -217,10 +217,10 @@ Cause: Unexpected token {"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 format[flow] 1`] = `
|
||||
"Unexpected token \`{\`, expected the keyword \`from\` (1:14)
|
||||
"Only \`import defer * as ns from "module"\` is valid (1:14)
|
||||
> 1 | import defer { x } from "x";
|
||||
| ^
|
||||
Cause: Unexpected token \`{\`, expected the keyword \`from\` (1:13)"
|
||||
Cause: Only \`import defer * as ns from "module"\` is valid (1:13)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 format[hermes] 1`] = `
|
||||
@@ -299,10 +299,10 @@ Cause: Unexpected token x"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 format[flow] 1`] = `
|
||||
"Unexpected identifier, expected the keyword \`from\` (1:14)
|
||||
"Only \`import defer * as ns from "module"\` is valid (1:14)
|
||||
> 1 | import defer x from "x";
|
||||
| ^
|
||||
Cause: Unexpected identifier, expected the keyword \`from\` (1:13)"
|
||||
Cause: Only \`import defer * as ns from "module"\` is valid (1:13)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 format[hermes] 1`] = `
|
||||
|
||||
@@ -29,14 +29,6 @@ exports[`dynamic-import.js format[espree] 1`] = `
|
||||
Cause: The only valid meta property for import is 'import.meta'"
|
||||
`;
|
||||
|
||||
exports[`dynamic-import.js format[flow] 1`] = `
|
||||
"Unexpected identifier, expected the identifier \`meta\` (1:8)
|
||||
> 1 | import.defer("foo");
|
||||
| ^
|
||||
2 |
|
||||
Cause: Unexpected identifier, expected the identifier \`meta\` (1:7)"
|
||||
`;
|
||||
|
||||
exports[`dynamic-import.js format[hermes] 1`] = `
|
||||
"'meta' expected in member expression (1:8)
|
||||
> 1 | import.defer("foo");
|
||||
@@ -79,14 +71,6 @@ exports[`dynamic-import-attributes-expression.js format[espree] 1`] = `
|
||||
Cause: The only valid meta property for import is 'import.meta'"
|
||||
`;
|
||||
|
||||
exports[`dynamic-import-attributes-expression.js format[flow] 1`] = `
|
||||
"Unexpected identifier, expected the identifier \`meta\` (1:8)
|
||||
> 1 | import.defer("x", { with: { attr: "val" } });
|
||||
| ^
|
||||
2 |
|
||||
Cause: Unexpected identifier, expected the identifier \`meta\` (1:7)"
|
||||
`;
|
||||
|
||||
exports[`dynamic-import-attributes-expression.js format[hermes] 1`] = `
|
||||
"'meta' expected in member expression (1:8)
|
||||
> 1 | import.defer("x", { with: { attr: "val" } });
|
||||
@@ -129,14 +113,6 @@ exports[`import-defer.js format[espree] 1`] = `
|
||||
Cause: Unexpected token *"
|
||||
`;
|
||||
|
||||
exports[`import-defer.js format[flow] 1`] = `
|
||||
"Unexpected token \`*\`, expected the keyword \`from\` (1:14)
|
||||
> 1 | import defer * as ns from "x";
|
||||
| ^
|
||||
2 |
|
||||
Cause: Unexpected token \`*\`, expected the keyword \`from\` (1:13)"
|
||||
`;
|
||||
|
||||
exports[`import-defer.js format[hermes] 1`] = `
|
||||
"'from' expected (1:14)
|
||||
> 1 | import defer * as ns from "x";
|
||||
@@ -176,14 +152,6 @@ exports[`import-defer-attributes-declaration.js format[espree] 1`] = `
|
||||
Cause: Unexpected token *"
|
||||
`;
|
||||
|
||||
exports[`import-defer-attributes-declaration.js format[flow] 1`] = `
|
||||
"Unexpected token \`*\`, expected the keyword \`from\` (1:14)
|
||||
> 1 | import defer * as ns from "x" with { attr: "val" };
|
||||
| ^
|
||||
2 |
|
||||
Cause: Unexpected token \`*\`, expected the keyword \`from\` (1:13)"
|
||||
`;
|
||||
|
||||
exports[`import-defer-attributes-declaration.js format[hermes] 1`] = `
|
||||
"'from' expected (1:14)
|
||||
> 1 | import defer * as ns from "x" with { attr: "val" };
|
||||
|
||||
@@ -9,7 +9,6 @@ runFormatTest(import.meta, ["babel", "typescript", "flow"], {
|
||||
errors: {
|
||||
acorn: importDeferTests,
|
||||
espree: importDeferTests,
|
||||
flow: importDeferTests,
|
||||
hermes: importDeferTests,
|
||||
},
|
||||
});
|
||||
@@ -59,13 +59,13 @@ Cause: The only valid meta property for import is 'import.meta'"
|
||||
`;
|
||||
|
||||
exports[`import-phase.js format[flow] 1`] = `
|
||||
"Unexpected identifier, expected the identifier \`meta\` (1:8)
|
||||
"The \`source\` import phase is not supported. (1:8)
|
||||
> 1 | import.source(\`data:text/javascript,
|
||||
| ^
|
||||
2 | console.log("RUN");
|
||||
3 | \`)
|
||||
4 |
|
||||
Cause: Unexpected identifier, expected the identifier \`meta\` (1:7)"
|
||||
Cause: The \`source\` import phase is not supported. (1:7)"
|
||||
`;
|
||||
|
||||
exports[`import-phase.js format[hermes] 1`] = `
|
||||
@@ -93,16 +93,6 @@ exports[`import-phase.js format[typescript] 1`] = `
|
||||
Cause: 'source' is not a valid meta-property for keyword 'import'."
|
||||
`;
|
||||
|
||||
exports[`import-phase.js format[typescript] 1`] = `
|
||||
"'source' is not a valid meta-property for keyword 'import'. (1:1)
|
||||
> 1 | import.source(\`data:text/javascript,
|
||||
| ^^^^^^^^^^^^^
|
||||
2 | console.log("RUN");
|
||||
3 | \`)
|
||||
4 |
|
||||
Cause: 'source' is not a valid meta-property for keyword 'import'."
|
||||
`;
|
||||
|
||||
exports[`template-literal.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel", "flow", "typescript"]
|
||||
|
||||
+2
-12
@@ -41,16 +41,6 @@ exports[`import-defer.js format[espree] 1`] = `
|
||||
Cause: The only valid meta property for import is 'import.meta'"
|
||||
`;
|
||||
|
||||
exports[`import-defer.js format[flow] 1`] = `
|
||||
"Unexpected identifier, expected the identifier \`meta\` (1:8)
|
||||
> 1 | import.defer("./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module");
|
||||
| ^
|
||||
2 | import.defer(
|
||||
3 | // Comment
|
||||
4 | "./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module"
|
||||
Cause: Unexpected identifier, expected the identifier \`meta\` (1:7)"
|
||||
`;
|
||||
|
||||
exports[`import-defer.js format[hermes] 1`] = `
|
||||
"'meta' expected in member expression (1:8)
|
||||
> 1 | import.defer("./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module");
|
||||
@@ -132,13 +122,13 @@ Cause: The only valid meta property for import is 'import.meta'"
|
||||
`;
|
||||
|
||||
exports[`import-source.js format[flow] 1`] = `
|
||||
"Unexpected identifier, expected the identifier \`meta\` (1:8)
|
||||
"The \`source\` import phase is not supported. (1:8)
|
||||
> 1 | import.source("./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module");
|
||||
| ^
|
||||
2 | import.source(
|
||||
3 | // Comment
|
||||
4 | "./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module"
|
||||
Cause: Unexpected identifier, expected the identifier \`meta\` (1:7)"
|
||||
Cause: The \`source\` import phase is not supported. (1:7)"
|
||||
`;
|
||||
|
||||
exports[`import-source.js format[hermes] 1`] = `
|
||||
|
||||
@@ -2,7 +2,7 @@ runFormatTest(import.meta, ["babel", "flow", "typescript"], {
|
||||
errors: {
|
||||
acorn: ["import-defer.js", "import-source.js"],
|
||||
espree: ["import-defer.js", "import-source.js"],
|
||||
flow: ["import-defer.js", "import-source.js"],
|
||||
flow: ["import-source.js"],
|
||||
hermes: ["import-defer.js", "import-source.js"],
|
||||
typescript: ["import-source.js"],
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user