From 61d1a4fb39ec93885cff35b38feb2fd764d8ea3c Mon Sep 17 00:00:00 2001 From: Gabe Levi Date: Mon, 14 Nov 2016 20:39:21 -0800 Subject: [PATCH] Deploy v0.35.0 Reviewed By: davidaurelio Differential Revision: D4177391 fbshipit-source-id: c02cf98ed275b7032103b11eab6d0e189f8d8f24 --- .flowconfig | 6 +++--- Examples/UIExplorer/js/UIExplorerStatePersister.js | 2 +- Libraries/BatchedBridge/MessageQueue.js | 3 ++- Libraries/ReactNative/renderApplication.js | 2 +- package.json | 4 ++-- packager/react-packager/src/Bundler/BundleBase.js | 6 +++++- packager/react-packager/src/node-haste/Module.js | 8 ++++---- packager/react-packager/src/node-haste/Package.js | 1 + 8 files changed, 19 insertions(+), 13 deletions(-) diff --git a/.flowconfig b/.flowconfig index 9babe3b88..fb2bb2b37 100644 --- a/.flowconfig +++ b/.flowconfig @@ -40,11 +40,11 @@ suppress_type=$FlowIssue suppress_type=$FlowFixMe suppress_type=$FixMe -suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(3[0-4]\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) -suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(3[0-4]\\|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-5]\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) +suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(3[0-5]\\|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.34.0 +^0.35.0 diff --git a/Examples/UIExplorer/js/UIExplorerStatePersister.js b/Examples/UIExplorer/js/UIExplorerStatePersister.js index 508065a5e..8104e55de 100644 --- a/Examples/UIExplorer/js/UIExplorerStatePersister.js +++ b/Examples/UIExplorer/js/UIExplorerStatePersister.js @@ -40,7 +40,7 @@ export type PassProps = { * this in real apps with user data, but we could maybe pull it out for other internal settings-type * usage. */ -function createContainer( +function createContainer( Component: ReactClass}>, spec: { cacheKeySuffix: (props: Props) => string, diff --git a/Libraries/BatchedBridge/MessageQueue.js b/Libraries/BatchedBridge/MessageQueue.js index 648e44dcd..74633b99d 100644 --- a/Libraries/BatchedBridge/MessageQueue.js +++ b/Libraries/BatchedBridge/MessageQueue.js @@ -247,7 +247,7 @@ class MessageQueue { const debug = this._debugInfo[cbID >> 1]; const module = debug && this._remoteModuleTable[debug[0]]; const method = debug && this._remoteMethodTable[debug[0]][debug[1]]; - if (!callback) { + if (callback == null) { let errorMessage = `Callback with id ${cbID}: ${module}.${method}() not found`; if (method) { errorMessage = `The callback ${method}() exists in module ${module}, ` @@ -272,6 +272,7 @@ class MessageQueue { this._callbacks[cbID & ~1] = null; this._callbacks[cbID | 1] = null; + // $FlowIssue(>=0.35.0) #14551610 callback.apply(null, args); if (__DEV__) { diff --git a/Libraries/ReactNative/renderApplication.js b/Libraries/ReactNative/renderApplication.js index 29610faea..26cf1bed7 100644 --- a/Libraries/ReactNative/renderApplication.js +++ b/Libraries/ReactNative/renderApplication.js @@ -21,7 +21,7 @@ var invariant = require('fbjs/lib/invariant'); // require BackAndroid so it sets the default handler that exits the app if no listeners respond require('BackAndroid'); -function renderApplication( +function renderApplication( RootComponent: ReactClass, initialProps: Props, rootTag: any diff --git a/package.json b/package.json index e2b87bc85..d166d84c8 100644 --- a/package.json +++ b/package.json @@ -164,7 +164,7 @@ "event-target-shim": "^1.0.5", "fbjs": "^0.8.5", "fbjs-scripts": "^0.7.0", - "flow-bin": "^0.34.0", + "flow-bin": "^0.35.0", "fs-extra": "^0.26.2", "glob": "^5.0.15", "graceful-fs": "^4.1.3", @@ -221,7 +221,7 @@ "eslint-plugin-babel": "^3.3.0", "eslint-plugin-flowtype": "^2.20.0", "eslint-plugin-react": "^6.4.1", - "flow-bin": "^0.34.0", + "flow-bin": "^0.35.0", "graphlib-dot": "0.6.2", "graphql": "0.6.2", "jest": "16.0.1", diff --git a/packager/react-packager/src/Bundler/BundleBase.js b/packager/react-packager/src/Bundler/BundleBase.js index 4d2ce0d2f..35c8a56db 100644 --- a/packager/react-packager/src/Bundler/BundleBase.js +++ b/packager/react-packager/src/Bundler/BundleBase.js @@ -110,7 +110,11 @@ class BundleBase { setRamGroups(ramGroups: Array) {} - toJSON(): mixed { + toJSON(): { + modules: Array, + assets: Array, + mainModuleId: number | void, + } { return { modules: this._modules, assets: this._assets, diff --git a/packager/react-packager/src/node-haste/Module.js b/packager/react-packager/src/node-haste/Module.js index ee5c28fcf..3cea23d0a 100644 --- a/packager/react-packager/src/node-haste/Module.js +++ b/packager/react-packager/src/node-haste/Module.js @@ -114,11 +114,11 @@ class Module { ); } - getCode(transformOptions: mixed) { + getCode(transformOptions: Object) { return this.read(transformOptions).then(({code}) => code); } - getMap(transformOptions: mixed) { + getMap(transformOptions: Object) { return this.read(transformOptions).then(({map}) => map); } @@ -154,7 +154,7 @@ class Module { return this._moduleCache.getPackageForModule(this); } - getDependencies(transformOptions: mixed) { + getDependencies(transformOptions: Object) { return this.read(transformOptions).then(({dependencies}) => dependencies); } @@ -244,7 +244,7 @@ class Module { * dependencies, etc. The overall process is to read the cache first, and if * it's a miss, we let the worker write to the cache and read it again. */ - read(transformOptions: mixed): Promise { + read(transformOptions: Object): Promise { const key = stableObjectHash(transformOptions || {}); const promise = this._readPromises.get(key); if (promise != null) { diff --git a/packager/react-packager/src/node-haste/Package.js b/packager/react-packager/src/node-haste/Package.js index 3e4ffa1dc..1961f2737 100644 --- a/packager/react-packager/src/node-haste/Package.js +++ b/packager/react-packager/src/node-haste/Package.js @@ -165,6 +165,7 @@ function getReplacements(pkg) { // merge with "browser" as default, // "react-native" as override + // $FlowFixMe(>=0.35.0) browser and rn should be objects return { ...browser, ...rn }; }