chore(deps): update dependency flow-parser to v0.199.1 (#14298)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: fisker Cheung <lionkay@gmail.com>
This commit is contained in:
renovate[bot]andfisker Cheung authored and GitHub committed 2023-02-07 09:27:21 +08:00
1 parent 8c1915f6e0
commit 4d80f5cf17
9 files changed
+107 -16

No files matched your search

+1 -1
View File
@@ -61,7 +61,7 @@
"file-entry-cache": "6.0.1",
"find-cache-dir": "4.0.0",
"find-parent-dir": "0.3.1",
"flow-parser": "0.198.2",
"flow-parser": "0.199.1",
"get-stdin": "9.0.0",
"graphql": "16.6.0",
"hermes-eslint": "0.9.0",
+8 -1
View File
@@ -65,7 +65,14 @@ function printFlow(path, options, print) {
semi,
];
case "DeclareVariable":
return [printDeclareToken(path), "var ", print("id"), semi];
return [
printDeclareToken(path),
// TODO: Only use `node.kind` when babel update AST
node.kind ?? "var",
" ",
print("id"),
semi,
];
case "DeclareExportDeclaration":
return printExportDeclaration(path, options, print);
case "DeclareExportAllDeclaration":
@@ -0,0 +1,35 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`decare.js [babel-flow] format 1`] = `
"Unexpected token (2:9)
1 | declare var a: string;
> 2 | declare let b: string;
| ^
3 | declare const c: string;
4 | declare export var a: string;
5 | declare export let b: string;"
`;
exports[`decare.js format 1`] = `
====================================options=====================================
parsers: ["flow"]
printWidth: 80
| printWidth
=====================================input======================================
declare var a: string;
declare let b: string;
declare const c: string;
declare export var a: string;
declare export let b: string;
declare export const c: string;
=====================================output=====================================
declare var a: string;
declare let b: string;
declare const c: string;
declare export var a: string;
declare export let b: string;
declare export const c: string;
================================================================================
`;
@@ -0,0 +1,6 @@
declare var a: string;
declare let b: string;
declare const c: string;
declare export var a: string;
declare export let b: string;
declare export const c: string;
@@ -0,0 +1 @@
run_spec(import.meta, ["flow"], { errors: { "babel-flow": true } });
@@ -1,8 +1,35 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`bigint-key.js [typescript] format 1`] = `
"Property assignment expected. (1:6)
> 1 | a = {1n: ""}
| ^
2 | a = {1n() {}}
3 | a = {get 1n() {}}
4 |"
`;
exports[`bigint-key.js format 1`] = `
====================================options=====================================
parsers: ["babel", "typescript", "flow"]
printWidth: 80
| printWidth
=====================================input======================================
a = {1n: ""}
a = {1n() {}}
a = {get 1n() {}}
=====================================output=====================================
a = { 1n: "" };
a = { 1n() {} };
a = { get 1n() {} };
================================================================================
`;
exports[`escape-sequence-key.js format 1`] = `
====================================options=====================================
parsers: ["babel", "typescript"]
parsers: ["babel", "typescript", "flow"]
printWidth: 80
| printWidth
=====================================input======================================
@@ -30,7 +57,7 @@ const b = {
exports[`expand.js format 1`] = `
====================================options=====================================
parsers: ["babel", "typescript"]
parsers: ["babel", "typescript", "flow"]
printWidth: 80
| printWidth
=====================================input======================================
@@ -74,6 +101,17 @@ exports[`expression.js [espree] format 1`] = `
8 | ({} = 0);"
`;
exports[`expression.js [flow] format 1`] = `
"Unexpected token \`:\`, expected a type (5:5)
3 | a = () => ({}).x;
4 | ({} && a, b);
> 5 | ({}::b, 0);
| ^
6 | ({}::b()\`\`[''].c++ && 0 ? 0 : 0, 0);
7 | ({}(), 0);
8 | ({} = 0);"
`;
exports[`expression.js [meriyah] format 1`] = `
"Expected ')' (5:4)
3 | a = () => ({}).x;
@@ -98,7 +136,7 @@ exports[`expression.js [typescript] format 1`] = `
exports[`expression.js format 1`] = `
====================================options=====================================
parsers: ["babel", "typescript"]
parsers: ["babel", "typescript", "flow"]
printWidth: 80
| printWidth
=====================================input======================================
@@ -159,7 +197,7 @@ const a3 = {
exports[`getter-setter.js format 1`] = `
====================================options=====================================
parsers: ["babel", "typescript"]
parsers: ["babel", "typescript", "flow"]
printWidth: 80
| printWidth
=====================================input======================================
@@ -183,7 +221,7 @@ printWidth: 80
exports[`method.js format 1`] = `
====================================options=====================================
parsers: ["babel", "typescript"]
parsers: ["babel", "typescript", "flow"]
printWidth: 80
| printWidth
=====================================input======================================
@@ -197,7 +235,7 @@ a = { f() {} };
exports[`range.js format 1`] = `
====================================options=====================================
parsers: ["babel", "typescript"]
parsers: ["babel", "typescript", "flow"]
printWidth: 80
| printWidth
=====================================input======================================
@@ -235,7 +273,7 @@ group(
exports[`right-break.js format 1`] = `
====================================options=====================================
parsers: ["babel", "typescript"]
parsers: ["babel", "typescript", "flow"]
printWidth: 80
| printWidth
=====================================input======================================
+3
View File
@@ -0,0 +1,3 @@
a = {1n: ""}
a = {1n() {}}
a = {get 1n() {}}
+3 -2
View File
@@ -1,8 +1,9 @@
run_spec(import.meta, ["babel", "typescript"], {
run_spec(import.meta, ["babel", "typescript", "flow"], {
errors: {
acorn: ["expression.js"],
espree: ["expression.js"],
typescript: ["expression.js"],
typescript: ["expression.js", "bigint-key.js"],
meriyah: ["expression.js"],
flow: ["expression.js"],
},
});
+5 -5
View File
@@ -4230,10 +4230,10 @@ __metadata:
languageName: node
linkType: hard
"flow-parser@npm:0.198.2":
version: 0.198.2
resolution: "flow-parser@npm:0.198.2"
checksum: 1c623e939a2dbddcbe9c62984641b9b9fec86adfc93b34832201c2aded24db292adb8d57a3052a438f0013588f2e58a86a71f91e2c2c515f49f4cb1ce1376a51
"flow-parser@npm:0.199.1":
version: 0.199.1
resolution: "flow-parser@npm:0.199.1"
checksum: c0c16aa4510af17dc8644eb9e6108bb223f23971569529389c56502fd4521ac9f04384277165b2adccabedf5d577fdf49e34323ac9a44cdd092d6dc139c987df
languageName: node
linkType: hard
@@ -7177,7 +7177,7 @@ __metadata:
file-entry-cache: 6.0.1
find-cache-dir: 4.0.0
find-parent-dir: 0.3.1
flow-parser: 0.198.2
flow-parser: 0.199.1
get-stdin: 9.0.0
graphql: 16.6.0
hermes-eslint: 0.9.0