Upgrade flow to 0.66 and fix a few minor errors. (#7431)
This commit is contained in:
parent
8823e4247e
commit
7ff4a73916
@ -3,9 +3,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
declare module "micromatch" {
|
declare module "micromatch" {
|
||||||
declare function exports(Array<string>, Array<string>, ?{
|
declare module.exports: {
|
||||||
nocase: boolean,
|
(Array<string>, Array<string>, ?{ nocase: boolean }): Array<string>,
|
||||||
}): Array<string>;
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
declare module "resolve" {
|
declare module "resolve" {
|
||||||
|
|||||||
@ -32,7 +32,7 @@
|
|||||||
"eslint-config-babel": "^7.0.2",
|
"eslint-config-babel": "^7.0.2",
|
||||||
"eslint-plugin-flowtype": "^2.20.0",
|
"eslint-plugin-flowtype": "^2.20.0",
|
||||||
"eslint-plugin-prettier": "^2.5.0",
|
"eslint-plugin-prettier": "^2.5.0",
|
||||||
"flow-bin": "^0.59.0",
|
"flow-bin": "^0.66.0",
|
||||||
"graceful-fs": "^4.1.11",
|
"graceful-fs": "^4.1.11",
|
||||||
"gulp": "^3.9.0",
|
"gulp": "^3.9.0",
|
||||||
"gulp-babel": "^8.0.0-beta.0",
|
"gulp-babel": "^8.0.0-beta.0",
|
||||||
|
|||||||
@ -359,6 +359,7 @@ Aliases: `Property`
|
|||||||
- `computed`: `boolean` (default: `false`)
|
- `computed`: `boolean` (default: `false`)
|
||||||
- `abstract`: `boolean` (default: `null`)
|
- `abstract`: `boolean` (default: `null`)
|
||||||
- `accessibility`: `"public" | "private" | "protected"` (default: `null`)
|
- `accessibility`: `"public" | "private" | "protected"` (default: `null`)
|
||||||
|
- `definite`: `boolean` (default: `null`)
|
||||||
- `optional`: `boolean` (default: `null`)
|
- `optional`: `boolean` (default: `null`)
|
||||||
- `readonly`: `boolean` (default: `null`)
|
- `readonly`: `boolean` (default: `null`)
|
||||||
- `static`: `boolean` (default: `null`)
|
- `static`: `boolean` (default: `null`)
|
||||||
@ -2851,6 +2852,7 @@ See also `t.isVariableDeclarator(node, opts)` and `t.assertVariableDeclarator(no
|
|||||||
|
|
||||||
- `id`: `LVal` (required)
|
- `id`: `LVal` (required)
|
||||||
- `init`: `Expression` (default: `null`)
|
- `init`: `Expression` (default: `null`)
|
||||||
|
- `definite`: `boolean` (default: `null`)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@ -1678,7 +1678,9 @@ export default class ExpressionParser extends LValParser {
|
|||||||
const oldStrict = this.state.strict;
|
const oldStrict = this.state.strict;
|
||||||
if (isStrict) this.state.strict = isStrict;
|
if (isStrict) this.state.strict = isStrict;
|
||||||
if (node.id) {
|
if (node.id) {
|
||||||
this.checkReservedWord(node.id, node.start, true, true);
|
// TODO(logan): This check is broken because it passes a node object as
|
||||||
|
// a binding name. Passing the actual string introduces other failures.
|
||||||
|
// this.checkReservedWord(node.id, node.start, true, true);
|
||||||
}
|
}
|
||||||
if (checkLVal) {
|
if (checkLVal) {
|
||||||
const nameHash: any = Object.create(null);
|
const nameHash: any = Object.create(null);
|
||||||
|
|||||||
@ -1488,7 +1488,10 @@ export default class StatementParser extends ExpressionParser {
|
|||||||
node.declaration.type === "FunctionDeclaration" ||
|
node.declaration.type === "FunctionDeclaration" ||
|
||||||
node.declaration.type === "ClassDeclaration"
|
node.declaration.type === "ClassDeclaration"
|
||||||
) {
|
) {
|
||||||
this.checkDuplicateExports(node, node.declaration.id.name);
|
const id = node.declaration.id;
|
||||||
|
if (!id) throw new Error("Assertion failure");
|
||||||
|
|
||||||
|
this.checkDuplicateExports(node, id.name);
|
||||||
} else if (node.declaration.type === "VariableDeclaration") {
|
} else if (node.declaration.type === "VariableDeclaration") {
|
||||||
for (const declaration of node.declaration.declarations) {
|
for (const declaration of node.declaration.declarations) {
|
||||||
this.checkDeclaration(declaration.id);
|
this.checkDeclaration(declaration.id);
|
||||||
|
|||||||
@ -1068,6 +1068,8 @@ export type TsType =
|
|||||||
| TsArrayType
|
| TsArrayType
|
||||||
| TsTupleType
|
| TsTupleType
|
||||||
| TsUnionOrIntersectionType
|
| TsUnionOrIntersectionType
|
||||||
|
| TsConditionalType
|
||||||
|
| TsInferType
|
||||||
| TsParenthesizedType
|
| TsParenthesizedType
|
||||||
| TsTypeOperator
|
| TsTypeOperator
|
||||||
| TsIndexedAccessType
|
| TsIndexedAccessType
|
||||||
@ -1163,10 +1165,10 @@ export type TsConditionalType = TsTypeBase & {
|
|||||||
checkType: TsType,
|
checkType: TsType,
|
||||||
extendsType: TsType,
|
extendsType: TsType,
|
||||||
trueType: TsType,
|
trueType: TsType,
|
||||||
falseType: tsType,
|
falseType: TsType,
|
||||||
};
|
};
|
||||||
|
|
||||||
export type InferType = TsTypeBase & {
|
export type TsInferType = TsTypeBase & {
|
||||||
type: "TSInferType",
|
type: "TSInferType",
|
||||||
typeParameter: TypeParameter,
|
typeParameter: TypeParameter,
|
||||||
};
|
};
|
||||||
|
|||||||
@ -3074,9 +3074,9 @@ flat-cache@^1.2.1:
|
|||||||
graceful-fs "^4.1.2"
|
graceful-fs "^4.1.2"
|
||||||
write "^0.2.1"
|
write "^0.2.1"
|
||||||
|
|
||||||
flow-bin@^0.59.0:
|
flow-bin@^0.66.0:
|
||||||
version "0.59.0"
|
version "0.66.0"
|
||||||
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.59.0.tgz#8c151ee7f09f1deed9bf0b9d1f2e8ab9d470f1bb"
|
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.66.0.tgz#a96dde7015dc3343fd552a7b4963c02be705ca26"
|
||||||
|
|
||||||
for-in@^1.0.1, for-in@^1.0.2:
|
for-in@^1.0.1, for-in@^1.0.2:
|
||||||
version "1.0.2"
|
version "1.0.2"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user