diff --git a/packages/metro-bundler/src/Config.js b/packages/metro-bundler/src/Config.js index 8fca6782cf..fb4e4c9f13 100644 --- a/packages/metro-bundler/src/Config.js +++ b/packages/metro-bundler/src/Config.js @@ -136,6 +136,9 @@ export type ConfigT = { runBeforeMainModule: Array, }; +/* $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: () => [], diff --git a/packages/metro-bundler/src/DeltaBundler/DeltaTransformer.js b/packages/metro-bundler/src/DeltaBundler/DeltaTransformer.js index 49017c2900..784dfa581b 100644 --- a/packages/metro-bundler/src/DeltaBundler/DeltaTransformer.js +++ b/packages/metro-bundler/src/DeltaBundler/DeltaTransformer.js @@ -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; } diff --git a/packages/metro-bundler/src/JSTransformer/index.js b/packages/metro-bundler/src/JSTransformer/index.js index c4da1a89e7..83dbbda913 100644 --- a/packages/metro-bundler/src/JSTransformer/index.js +++ b/packages/metro-bundler/src/JSTransformer/index.js @@ -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); } } diff --git a/packages/metro-bundler/src/Resolver/polyfills/require.js b/packages/metro-bundler/src/Resolver/polyfills/require.js index 25a3a9bf82..f602596f67 100644 --- a/packages/metro-bundler/src/Resolver/polyfills/require.js +++ b/packages/metro-bundler/src/Resolver/polyfills/require.js @@ -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); } diff --git a/packages/metro-bundler/src/Server/index.js b/packages/metro-bundler/src/Server/index.js index 2d756ec999..8a2807935c 100644 --- a/packages/metro-bundler/src/Server/index.js +++ b/packages/metro-bundler/src/Server/index.js @@ -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); } diff --git a/packages/metro-bundler/src/node-haste/DependencyGraph.js b/packages/metro-bundler/src/node-haste/DependencyGraph.js index c3aefd9f57..2d8be3cd8a 100644 --- a/packages/metro-bundler/src/node-haste/DependencyGraph.js +++ b/packages/metro-bundler/src/node-haste/DependencyGraph.js @@ -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); diff --git a/packages/metro-bundler/src/node-haste/DependencyGraph/ResolutionRequest.js b/packages/metro-bundler/src/node-haste/DependencyGraph/ResolutionRequest.js index 7d025568ea..1cb81a5aba 100644 --- a/packages/metro-bundler/src/node-haste/DependencyGraph/ResolutionRequest.js +++ b/packages/metro-bundler/src/node-haste/DependencyGraph/ResolutionRequest.js @@ -363,6 +363,9 @@ class ResolutionRequest { } _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); } diff --git a/packages/metro-bundler/src/node-haste/DependencyGraph/ResolutionResponse.js b/packages/metro-bundler/src/node-haste/DependencyGraph/ResolutionResponse.js index 9115dcccb1..590e77373d 100644 --- a/packages/metro-bundler/src/node-haste/DependencyGraph/ResolutionResponse.js +++ b/packages/metro-bundler/src/node-haste/DependencyGraph/ResolutionResponse.js @@ -34,6 +34,9 @@ class ResolutionResponse { 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; } diff --git a/packages/metro-bundler/src/node-haste/ModuleCache.js b/packages/metro-bundler/src/node-haste/ModuleCache.js index cc99b13b50..b8bd500235 100644 --- a/packages/metro-bundler/src/node-haste/ModuleCache.js +++ b/packages/metro-bundler/src/node-haste/ModuleCache.js @@ -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; diff --git a/packages/metro-bundler/src/node-haste/Package.js b/packages/metro-bundler/src/node-haste/Package.js index c9b1501043..ab99764ac4 100644 --- a/packages/metro-bundler/src/node-haste/Package.js +++ b/packages/metro-bundler/src/node-haste/Package.js @@ -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}; }