diff --git a/.flowconfig b/.flowconfig index 87471105d..f20c92be6 100644 --- a/.flowconfig +++ b/.flowconfig @@ -39,11 +39,11 @@ suppress_type=$FlowIssue suppress_type=$FlowFixMe suppress_type=$FixMe -suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(3[0-6]\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) -suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(3[0-6]\\|1[0-9]\\|[1-2][0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+ +suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(3[0-7]\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) +suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(3[0-7]\\|1[0-9]\\|[1-2][0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+ suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy unsafe.enable_getters_and_setters=true [version] -^0.36.0 +^0.37.0 diff --git a/Libraries/Performance/Systrace.js b/Libraries/Performance/Systrace.js index 3c191fb44..dd1ff34b1 100644 --- a/Libraries/Performance/Systrace.js +++ b/Libraries/Performance/Systrace.js @@ -213,7 +213,7 @@ if (__DEV__) { // other files. Therefore, calls to `require('moduleId')` are not replaced // with numeric IDs // TODO(davidaurelio) Scan polyfills for dependencies, too (t9759686) - require.Systrace = Systrace; + (require: any).Systrace = Systrace; } module.exports = Systrace; diff --git a/local-cli/bundle/output/unbundle/as-indexed-file.js b/local-cli/bundle/output/unbundle/as-indexed-file.js index 05978ec8f..ce768f3ed 100644 --- a/local-cli/bundle/output/unbundle/as-indexed-file.js +++ b/local-cli/bundle/output/unbundle/as-indexed-file.js @@ -71,7 +71,6 @@ function saveAsIndexedFile( const fileHeader = new Buffer(4); fileHeader.writeUInt32LE(MAGIC_UNBUNDLE_FILE_HEADER, 0); -//$FlowIssue #14640206 const nullByteBuffer: Buffer = new Buffer(1).fill(0); function writeBuffers(stream, buffers: Array) { @@ -113,7 +112,6 @@ function buildModuleTable(startupCode, buffers, moduleGroups) { const moduleIds = Array.from(moduleGroups.modulesById.keys()); const maxId = moduleIds.reduce((max, id) => Math.max(max, id)); const numEntries = maxId + 1; - //$FlowIssue #14640206 const table: Buffer = new Buffer(entryOffset(numEntries)).fill(0); // num_entries diff --git a/package.json b/package.json index 558f49cad..b280fa050 100644 --- a/package.json +++ b/package.json @@ -199,7 +199,7 @@ "eslint-plugin-babel": "^3.3.0", "eslint-plugin-flowtype": "^2.20.0", "eslint-plugin-react": "^6.4.1", - "flow-bin": "^0.36.0", + "flow-bin": "^0.37.0", "jest": "17.0.3", "jest-repl": "17.0.3", "jest-runtime": "17.0.3", diff --git a/packager/react-packager/src/Server/index.js b/packager/react-packager/src/Server/index.js index 2f42e8707..b9f350634 100644 --- a/packager/react-packager/src/Server/index.js +++ b/packager/react-packager/src/Server/index.js @@ -264,7 +264,9 @@ class Server { this._bundles[key].then(bundle => { const deps = bundleDeps.get(bundle); filePaths.forEach(filePath => { + // $FlowFixMe(>=0.37.0) if (deps.files.has(filePath)) { + // $FlowFixMe(>=0.37.0) deps.outdated.add(filePath); } }); @@ -557,6 +559,7 @@ class Server { if (optionsJson in this._bundles) { return this._bundles[optionsJson].then(bundle => { const deps = bundleDeps.get(bundle); + // $FlowFixMe(>=0.37.0) const {dependencyPairs, files, idToIndex, outdated} = deps; if (outdated.size) { @@ -570,6 +573,7 @@ class Server { const changedModules = Array.from(outdated, this.getModuleForPath, this); + // $FlowFixMe(>=0.37.0) deps.outdated = new Set(); const opts = bundleOpts(options); diff --git a/packager/react-packager/src/node-haste/ModuleCache.js b/packager/react-packager/src/node-haste/ModuleCache.js index 3ade7b7b3..141024dd0 100644 --- a/packager/react-packager/src/node-haste/ModuleCache.js +++ b/packager/react-packager/src/node-haste/ModuleCache.js @@ -114,6 +114,7 @@ class ModuleCache { getPackageForModule(module: Module): ?Package { if (this._packageModuleMap.has(module)) { const packagePath = this._packageModuleMap.get(module); + // $FlowFixMe(>=0.37.0) if (this._packageCache[packagePath]) { return this._packageCache[packagePath]; } else {