Update flow to 0.92.1 and fix related issues (#9468)
* Update flow to 0.92.1 and fix related issues * Change isThenable check
This commit is contained in:
parent
953182d44a
commit
7943a48cc3
@ -36,7 +36,7 @@
|
|||||||
"eslint-plugin-flowtype": "^3.2.1",
|
"eslint-plugin-flowtype": "^3.2.1",
|
||||||
"eslint-plugin-prettier": "^3.0.1",
|
"eslint-plugin-prettier": "^3.0.1",
|
||||||
"fancy-log": "^1.3.3",
|
"fancy-log": "^1.3.3",
|
||||||
"flow-bin": "^0.87.0",
|
"flow-bin": "^0.92.1",
|
||||||
"graceful-fs": "^4.1.15",
|
"graceful-fs": "^4.1.15",
|
||||||
"gulp": "^4.0.0",
|
"gulp": "^4.0.0",
|
||||||
"gulp-babel": "^8.0.0",
|
"gulp-babel": "^8.0.0",
|
||||||
|
|||||||
@ -43,7 +43,6 @@ export function makeWeakCache<
|
|||||||
>(
|
>(
|
||||||
handler: (ArgT, CacheConfigurator<SideChannel>) => ResultT,
|
handler: (ArgT, CacheConfigurator<SideChannel>) => ResultT,
|
||||||
): (ArgT, SideChannel) => ResultT {
|
): (ArgT, SideChannel) => ResultT {
|
||||||
// $FlowIssue https://github.com/facebook/flow/issues/4528
|
|
||||||
return makeCachedFunction(new WeakMap(), handler);
|
return makeCachedFunction(new WeakMap(), handler);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,7 +10,7 @@ import {
|
|||||||
makeWeakCache,
|
makeWeakCache,
|
||||||
type CacheConfigurator,
|
type CacheConfigurator,
|
||||||
} from "../caching";
|
} from "../caching";
|
||||||
import makeAPI from "../helpers/config-api";
|
import makeAPI, { type PluginAPI } from "../helpers/config-api";
|
||||||
import { makeStaticFileCache } from "./utils";
|
import { makeStaticFileCache } from "./utils";
|
||||||
import pathPatternToRegex from "../pattern-to-regex";
|
import pathPatternToRegex from "../pattern-to-regex";
|
||||||
import type { FilePackageData, RelativeConfig, ConfigFile } from "./types";
|
import type { FilePackageData, RelativeConfig, ConfigFile } from "./types";
|
||||||
@ -150,7 +150,7 @@ const LOADING_CONFIGS = new Set();
|
|||||||
|
|
||||||
const readConfigJS = makeStrongCache(
|
const readConfigJS = makeStrongCache(
|
||||||
(
|
(
|
||||||
filepath,
|
filepath: string,
|
||||||
cache: CacheConfigurator<{
|
cache: CacheConfigurator<{
|
||||||
envName: string,
|
envName: string,
|
||||||
caller: CallerMetadata | void,
|
caller: CallerMetadata | void,
|
||||||
@ -193,7 +193,7 @@ const readConfigJS = makeStrongCache(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (typeof options === "function") {
|
if (typeof options === "function") {
|
||||||
options = options(makeAPI(cache));
|
options = ((options: any): (api: PluginAPI) => {})(makeAPI(cache));
|
||||||
|
|
||||||
if (!cache.configured()) throwConfigError();
|
if (!cache.configured()) throwConfigError();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -131,6 +131,7 @@ function isThenable(val: mixed): boolean {
|
|||||||
return (
|
return (
|
||||||
!!val &&
|
!!val &&
|
||||||
(typeof val === "object" || typeof val === "function") &&
|
(typeof val === "object" || typeof val === "function") &&
|
||||||
|
!!val.then &&
|
||||||
typeof val.then === "function"
|
typeof val.then === "function"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3806,9 +3806,10 @@ 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.87.0:
|
flow-bin@^0.92.1:
|
||||||
version "0.87.0"
|
version "0.92.1"
|
||||||
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.87.0.tgz#fab7f984d8cc767e93fa9eb01cf7d57ed744f19d"
|
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.92.1.tgz#32c136c07235f30c42dc0549a0790f370fad4070"
|
||||||
|
integrity sha512-F5kC5oQOR2FXROAeybJHFqgZP+moKV9fa/53QK4Q4WayTQHdA0KSl48KD1gP0A9mioRLiKUegTva/7I15cX3Iw==
|
||||||
|
|
||||||
flush-write-stream@^1.0.0, flush-write-stream@^1.0.2:
|
flush-write-stream@^1.0.0, flush-write-stream@^1.0.2:
|
||||||
version "1.0.3"
|
version "1.0.3"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user