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
+33
-83
No files matched your search
+2
-2
@@ -76,7 +76,7 @@
|
||||
"fast-glob": "3.3.3",
|
||||
"file-entry-cache": "11.1.5",
|
||||
"find-cache-directory": "6.0.0",
|
||||
"flow-parser": "0.331.0",
|
||||
"flow-parser": "0.332.0",
|
||||
"get-east-asian-width": "1.7.0",
|
||||
"get-stdin": "9.0.0",
|
||||
"graphql": "17.0.2",
|
||||
@@ -161,7 +161,7 @@
|
||||
"eslint-plugin-simple-import-sort": "14.0.0",
|
||||
"eslint-plugin-unicorn": "75.0.0",
|
||||
"esm-utils": "4.4.2",
|
||||
"flow-estree": "0.331.0",
|
||||
"flow-estree": "0.332.0",
|
||||
"get-port": "7.2.0",
|
||||
"gfm-test-suite": "0.0.2",
|
||||
"globals": "17.12.0",
|
||||
|
||||
@@ -30,6 +30,9 @@ const excludeVisitorKeys = {
|
||||
|
||||
// Flow node from Babel
|
||||
TupleTypeAnnotation: ["types"],
|
||||
|
||||
// `flow@0.332.0`
|
||||
ObjectTypeMappedTypeProperty: ["nameType"],
|
||||
};
|
||||
|
||||
const excludeNodeTypes = [
|
||||
|
||||
@@ -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"],
|
||||
},
|
||||
|
||||
@@ -5088,19 +5088,19 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"flow-estree@npm:0.331.0":
|
||||
version: 0.331.0
|
||||
resolution: "flow-estree@npm:0.331.0"
|
||||
checksum: 10/ab19ede3a0a9aa3b03140df7e9a7732ed28f987b7b556a874968bc3d1bf7a952be3545e73117875a2f47bae319a758365b692d2fa25feae5ba1cfe4cc5663635
|
||||
"flow-estree@npm:0.332.0":
|
||||
version: 0.332.0
|
||||
resolution: "flow-estree@npm:0.332.0"
|
||||
checksum: 10/ed80fbfce0ab9668f80faaf2c27799d7a3832aa4e422a9f6b792f68b75958b23904ee207cc91e0774458732bf58d84a29349fc21df4fbe0e7509b4b10586fe54
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"flow-parser@npm:0.331.0":
|
||||
version: 0.331.0
|
||||
resolution: "flow-parser@npm:0.331.0"
|
||||
"flow-parser@npm:0.332.0":
|
||||
version: 0.332.0
|
||||
resolution: "flow-parser@npm:0.332.0"
|
||||
dependencies:
|
||||
flow-estree: "npm:0.331.0"
|
||||
checksum: 10/3ac27e2ad45e3fea263e7f915fafc7d6857001f5bb962ff411eb6856b29a922e601ebc803339c8139a6f2f36f342f86907bfd1cb48955d50cc3171b4d55ba0fa
|
||||
flow-estree: "npm:0.332.0"
|
||||
checksum: 10/ce19763f9e052c2a024b10726946552b9af5e78dfcbe0bffb1a585ec19fb05560fd0dc829848934b550c9502e796fd868858ada54da87ea924499fb45e3323ae
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -8083,8 +8083,8 @@ __metadata:
|
||||
fast-glob: "npm:3.3.3"
|
||||
file-entry-cache: "npm:11.1.5"
|
||||
find-cache-directory: "npm:6.0.0"
|
||||
flow-estree: "npm:0.331.0"
|
||||
flow-parser: "npm:0.331.0"
|
||||
flow-estree: "npm:0.332.0"
|
||||
flow-parser: "npm:0.332.0"
|
||||
get-east-asian-width: "npm:1.7.0"
|
||||
get-port: "npm:7.2.0"
|
||||
get-stdin: "npm:9.0.0"
|
||||
|
||||
Reference in new issue
Block a user