From 85a6f011b6e4d9f86bc82437c88273f4cc2782d3 Mon Sep 17 00:00:00 2001 From: Gabe Levi Date: Tue, 6 Sep 2016 13:36:33 -0700 Subject: [PATCH] Deploy v0.32.0 Reviewed By: jeffmo Differential Revision: D3821852 fbshipit-source-id: 01fd16707cba860a830d682a2af2bdd542605abf --- .flowconfig | 6 +++--- IntegrationTests/PromiseTest.js | 2 -- Libraries/Experimental/SwipeableRow/SwipeableListView.js | 8 +++++--- .../Initialization/ExceptionsManager.js | 6 +++++- .../JavaScriptAppEngine/Initialization/parseErrorStack.js | 2 +- Libraries/JavaScriptAppEngine/System/JSTimers/JSTimers.js | 2 ++ .../System/JSTimers/JSTimersExecution.js | 2 +- .../NavigationExperimental/NavigationTransitioner.js | 1 + Libraries/ReactIOS/YellowBox.js | 2 +- package.json | 2 +- 10 files changed, 20 insertions(+), 13 deletions(-) diff --git a/.flowconfig b/.flowconfig index ed152621d..f193cba54 100644 --- a/.flowconfig +++ b/.flowconfig @@ -47,11 +47,11 @@ suppress_type=$FlowIssue suppress_type=$FlowFixMe suppress_type=$FixMe -suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(3[0-1]\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) -suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(3[0-1]\\|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-2]\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) +suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(3[0-2]\\|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.31.0 +^0.32.0 diff --git a/IntegrationTests/PromiseTest.js b/IntegrationTests/PromiseTest.js index 6a625cb91..861983bc2 100644 --- a/IntegrationTests/PromiseTest.js +++ b/IntegrationTests/PromiseTest.js @@ -28,9 +28,7 @@ class PromiseTest extends React.Component { this.testShouldSucceedAsync(), this.testShouldThrowAsync(), ]).then(() => TestModule.markTestPassed( - // $FlowFixMe found when converting React.createClass to ES6 this.shouldResolve && this.shouldReject && - // $FlowFixMe found when converting React.createClass to ES6 this.shouldSucceedAsync && this.shouldThrowAsync )); } diff --git a/Libraries/Experimental/SwipeableRow/SwipeableListView.js b/Libraries/Experimental/SwipeableRow/SwipeableListView.js index db2cb617f..fb29bd565 100644 --- a/Libraries/Experimental/SwipeableRow/SwipeableListView.js +++ b/Libraries/Experimental/SwipeableRow/SwipeableListView.js @@ -94,7 +94,7 @@ class SwipeableListView extends React.Component { dataSource: this.props.dataSource, }; - _listViewRef: ?string = null; + _listViewRef: ?ReactElement = null; _shouldBounceFirstRowOnMount = false; componentWillMount(): void { @@ -132,7 +132,8 @@ class SwipeableListView extends React.Component { * (from high 20s to almost consistently 60 fps) */ _setListViewScrollable = (value: boolean): void => { - if (this._listViewRef && this._listViewRef.setNativeProps) { + if (this._listViewRef && + typeof this._listViewRef.setNativeProps === 'function') { this._listViewRef.setNativeProps({ scrollEnabled: value, }); @@ -141,7 +142,8 @@ class SwipeableListView extends React.Component { // Passing through ListView's getScrollResponder() function getScrollResponder = (): ?Object => { - if (this._listViewRef && this._listViewRef.getScrollResponder) { + if (this._listViewRef && + typeof this._listViewRef.getScrollResponder === 'function') { return this._listViewRef.getScrollResponder(); } }; diff --git a/Libraries/JavaScriptAppEngine/Initialization/ExceptionsManager.js b/Libraries/JavaScriptAppEngine/Initialization/ExceptionsManager.js index b104b98fe..7f1b276b3 100644 --- a/Libraries/JavaScriptAppEngine/Initialization/ExceptionsManager.js +++ b/Libraries/JavaScriptAppEngine/Initialization/ExceptionsManager.js @@ -58,7 +58,11 @@ function handleException(e: Error, isFatal: boolean) { e = new Error(e); } - (console._errorOriginal || console.error)(e.message); + if (typeof console._errorOriginal === 'function') { + console._errorOriginal(e.message); + } else { + console.error(e.message); + } reportException(e, isFatal); } diff --git a/Libraries/JavaScriptAppEngine/Initialization/parseErrorStack.js b/Libraries/JavaScriptAppEngine/Initialization/parseErrorStack.js index 8e4f47e80..573fbd144 100644 --- a/Libraries/JavaScriptAppEngine/Initialization/parseErrorStack.js +++ b/Libraries/JavaScriptAppEngine/Initialization/parseErrorStack.js @@ -26,7 +26,7 @@ function parseErrorStack(e: Error): Array { var stack = Array.isArray(e.stack) ? e.stack : stacktraceParser.parse(e.stack); - var framesToPop = e.framesToPop || 0; + var framesToPop = typeof e.framesToPop === 'number' ? e.framesToPop : 0; while (framesToPop--) { stack.shift(); } diff --git a/Libraries/JavaScriptAppEngine/System/JSTimers/JSTimers.js b/Libraries/JavaScriptAppEngine/System/JSTimers/JSTimers.js index 0ff75f23d..fe802bc9b 100644 --- a/Libraries/JavaScriptAppEngine/System/JSTimers/JSTimers.js +++ b/Libraries/JavaScriptAppEngine/System/JSTimers/JSTimers.js @@ -37,6 +37,8 @@ function _allocateCallback(func: Function, type: $Keys=0.32.0) - this seems to be putting something of the wrong + * type into identifiers */ JSTimersExecution.identifiers[freeIndex] = stack.shift(); } } diff --git a/Libraries/JavaScriptAppEngine/System/JSTimers/JSTimersExecution.js b/Libraries/JavaScriptAppEngine/System/JSTimers/JSTimersExecution.js index 175b0794b..23512da1b 100644 --- a/Libraries/JavaScriptAppEngine/System/JSTimers/JSTimersExecution.js +++ b/Libraries/JavaScriptAppEngine/System/JSTimers/JSTimersExecution.js @@ -46,7 +46,7 @@ const JSTimersExecution = { timerIDs: [], immediates: [], requestIdleCallbacks: [], - identifiers: ([] : [{methodName: string}]), + identifiers: ([] : Array), errors: (null : ?[Error]), diff --git a/Libraries/NavigationExperimental/NavigationTransitioner.js b/Libraries/NavigationExperimental/NavigationTransitioner.js index d048d7f37..ef8282a05 100644 --- a/Libraries/NavigationExperimental/NavigationTransitioner.js +++ b/Libraries/NavigationExperimental/NavigationTransitioner.js @@ -251,6 +251,7 @@ function buildTransitionProps( position, progress, scenes, + // $FlowFixMe(>=0.32.0) - find can return undefined scene: scenes.find(isSceneActive), }; } diff --git a/Libraries/ReactIOS/YellowBox.js b/Libraries/ReactIOS/YellowBox.js index dbefa60f3..2177924d8 100644 --- a/Libraries/ReactIOS/YellowBox.js +++ b/Libraries/ReactIOS/YellowBox.js @@ -144,7 +144,7 @@ function isWarningIgnored(warning: string): boolean { return ( Array.isArray(console.ignoredYellowBox) && console.ignoredYellowBox.some( - ignorePrefix => warning.startsWith(ignorePrefix) + ignorePrefix => warning.startsWith(String(ignorePrefix)) ) ); } diff --git a/package.json b/package.json index 50e7cd7d5..ff2a16862 100644 --- a/package.json +++ b/package.json @@ -207,7 +207,7 @@ "eslint-plugin-babel": "^3.2.0", "eslint-plugin-flow-vars": "^0.2.1", "eslint-plugin-react": "^4.2.1", - "flow-bin": "^0.31.1", + "flow-bin": "^0.32.0", "jest": "15.1.0", "jest-repl": "15.1.0", "jest-runtime": "15.1.0",