mirror of https://github.com/status-im/metro.git
Upgrade Flow to v0.56.0
Reviewed By: calebmer Differential Revision: D5958715 fbshipit-source-id: 7feda03a9540e69bf8d9b4eb89720248ff43294f
This commit is contained in:
parent
86a69bf25d
commit
87cfc05ea6
|
@ -136,6 +136,9 @@ export type ConfigT = {
|
|||
runBeforeMainModule: Array<string>,
|
||||
};
|
||||
|
||||
/* $FlowFixMe(>=0.56.0 site=react_native_fb) This comment suppresses an error
|
||||
* found when Flow v0.56 was deployed. To see the error delete this comment and
|
||||
* run Flow. */
|
||||
const DEFAULT = ({
|
||||
extraNodeModules: Object.create(null),
|
||||
getAssetExts: () => [],
|
||||
|
|
|
@ -316,6 +316,9 @@ class DeltaTransformer extends EventEmitter {
|
|||
).map(dep => this._getModuleId({path: dep}));
|
||||
}
|
||||
|
||||
/* $FlowFixMe(>=0.56.0 site=react_native_fb) This comment suppresses an
|
||||
* error found when Flow v0.56 was deployed. To see the error delete this
|
||||
* comment and run Flow. */
|
||||
return output;
|
||||
}
|
||||
|
||||
|
|
|
@ -141,6 +141,9 @@ class Transformer {
|
|||
|
||||
kill() {
|
||||
if (this._usesFarm && this._workers) {
|
||||
/* $FlowFixMe(>=0.56.0 site=react_native_fb) This comment suppresses an
|
||||
* error found when Flow v0.56 was deployed. To see the error delete this
|
||||
* comment and run Flow. */
|
||||
workerFarm.end(this._workers);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -53,8 +53,14 @@ type VerboseModuleNameForDev = string;
|
|||
global.require = require;
|
||||
global.__d = define;
|
||||
|
||||
/* $FlowFixMe(>=0.56.0 site=react_native_fb) This comment suppresses an error
|
||||
* found when Flow v0.56 was deployed. To see the error delete this comment and
|
||||
* run Flow. */
|
||||
const modules: ModuleMap = Object.create(null);
|
||||
if (__DEV__) {
|
||||
/* $FlowFixMe(>=0.56.0 site=react_native_fb) This comment suppresses an error
|
||||
* found when Flow v0.56 was deployed. To see the error delete this comment
|
||||
* and run Flow. */
|
||||
var verboseNamesToModuleIds: {[key: string]: number} = Object.create(null);
|
||||
}
|
||||
|
||||
|
|
|
@ -234,6 +234,9 @@ class Server {
|
|||
|
||||
this._reporter = reporter;
|
||||
this._projectRoots = this._opts.projectRoots;
|
||||
/* $FlowFixMe(>=0.56.0 site=react_native_fb) This comment suppresses an
|
||||
* error found when Flow v0.56 was deployed. To see the error delete this
|
||||
* comment and run Flow. */
|
||||
this._bundles = Object.create(null);
|
||||
this._bundleBuildInfos = new WeakMap();
|
||||
this._changeWatchers = [];
|
||||
|
@ -473,6 +476,9 @@ class Server {
|
|||
}
|
||||
|
||||
_clearBundles() {
|
||||
/* $FlowFixMe(>=0.56.0 site=react_native_fb) This comment suppresses an
|
||||
* error found when Flow v0.56 was deployed. To see the error delete this
|
||||
* comment and run Flow. */
|
||||
this._bundles = Object.create(null);
|
||||
}
|
||||
|
||||
|
|
|
@ -332,7 +332,6 @@ class DependencyGraph extends EventEmitter {
|
|||
}
|
||||
|
||||
function NotFoundError(...args) {
|
||||
/* $FlowFixMe: monkey-patching */
|
||||
Error.call(this);
|
||||
Error.captureStackTrace(this, this.constructor);
|
||||
var msg = util.format.apply(util, args);
|
||||
|
|
|
@ -363,6 +363,9 @@ class ResolutionRequest<TModule: Moduleish, TPackage: Packageish> {
|
|||
}
|
||||
|
||||
_resetResolutionCache() {
|
||||
/* $FlowFixMe(>=0.56.0 site=react_native_fb) This comment suppresses an
|
||||
* error found when Flow v0.56 was deployed. To see the error delete this
|
||||
* comment and run Flow. */
|
||||
this._immediateResolutionCache = Object.create(null);
|
||||
}
|
||||
|
||||
|
|
|
@ -34,6 +34,9 @@ class ResolutionResponse<TModule: {hash(): string}, TOptions> {
|
|||
this.mocks = null;
|
||||
this.numPrependedDependencies = 0;
|
||||
this.options = options;
|
||||
/* $FlowFixMe(>=0.56.0 site=react_native_fb) This comment suppresses an
|
||||
* error found when Flow v0.56 was deployed. To see the error delete this
|
||||
* comment and run Flow. */
|
||||
this._mappings = Object.create(null);
|
||||
this._finalized = false;
|
||||
}
|
||||
|
|
|
@ -72,8 +72,14 @@ class ModuleCache {
|
|||
this._getTransformCacheKey = getTransformCacheKey;
|
||||
this._globalTransformCache = globalTransformCache;
|
||||
this._depGraphHelpers = depGraphHelpers;
|
||||
/* $FlowFixMe(>=0.56.0 site=react_native_fb) This comment suppresses an
|
||||
* error found when Flow v0.56 was deployed. To see the error delete this
|
||||
* comment and run Flow. */
|
||||
this._moduleCache = Object.create(null);
|
||||
this._moduleOptions = moduleOptions;
|
||||
/* $FlowFixMe(>=0.56.0 site=react_native_fb) This comment suppresses an
|
||||
* error found when Flow v0.56 was deployed. To see the error delete this
|
||||
* comment and run Flow. */
|
||||
this._packageCache = Object.create(null);
|
||||
this._packageModuleMap = new WeakMap();
|
||||
this._platforms = platforms;
|
||||
|
|
|
@ -169,7 +169,6 @@ function getReplacements(pkg: PackageContent): mixed {
|
|||
|
||||
// merge with "browser" as default,
|
||||
// "react-native" as override
|
||||
// $FlowFixMe(>=0.35.0) browser and rn should be objects
|
||||
return {...browser, ...rn};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue