From c8e72bb8b8317bcdcb4fe2ff85978c7db70f4461 Mon Sep 17 00:00:00 2001 From: Marshall Roch Date: Mon, 4 Dec 2017 13:25:03 -0800 Subject: [PATCH] @allow-large-files [flow] deploy flow 0.60 Reviewed By: gabelevi Differential Revision: D6466441 fbshipit-source-id: c51eeb53a2465498ad77b3865b5f8c03758d1d35 --- .flowconfig | 6 +++--- Libraries/Components/ScrollResponder.js | 3 +++ Libraries/Components/StatusBar/StatusBar.js | 2 -- Libraries/StyleSheet/StyleSheetValidation.js | 3 --- local-cli/server/runServer.js | 2 -- local-cli/templates/HelloWorld/_flowconfig | 6 +++--- package.json | 2 +- 7 files changed, 10 insertions(+), 14 deletions(-) diff --git a/.flowconfig b/.flowconfig index a4af89b71..5b26fd101 100644 --- a/.flowconfig +++ b/.flowconfig @@ -45,12 +45,12 @@ suppress_type=$FlowFixMe suppress_type=$FlowFixMeProps suppress_type=$FlowFixMeState -suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(5[0-9]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*[react_native_oss|react_native_fb][a-z,_]*\\)?)\\) -suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(5[0-9]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*[react_native_oss|react_native_fb][a-z,_]*\\)?)\\)?:? #[0-9]+ +suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(\\)? *\\(site=[a-z,_]*[react_native_oss|react_native_fb][a-z,_]*\\)?)\\) +suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(\\)? *\\(site=[a-z,_]*[react_native_oss|react_native_fb][a-z,_]*\\)?)\\)?:? #[0-9]+ suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError unsafe.enable_getters_and_setters=true [version] -^0.59.0 +^0.60.0 diff --git a/Libraries/Components/ScrollResponder.js b/Libraries/Components/ScrollResponder.js index 44a1959ee..ef145a0d3 100644 --- a/Libraries/Components/ScrollResponder.js +++ b/Libraries/Components/ScrollResponder.js @@ -474,6 +474,9 @@ var ScrollResponderMixin = { ) { invariant(ScrollViewManager && ScrollViewManager.zoomToRect, 'zoomToRect is not implemented'); if ('animated' in rect) { + /* $FlowFixMe(>=0.60.0 site=react_native_fb) This comment suppresses an + * error found when Flow v0.60 was deployed. To see the error delete this + * comment and run Flow. */ var { animated, ...rect } = rect; } else if (typeof animated !== 'undefined') { console.warn('`scrollResponderZoomTo` `animated` argument is deprecated. Use `options.animated` instead'); diff --git a/Libraries/Components/StatusBar/StatusBar.js b/Libraries/Components/StatusBar/StatusBar.js index 25cb941c8..9cbe6e406 100644 --- a/Libraries/Components/StatusBar/StatusBar.js +++ b/Libraries/Components/StatusBar/StatusBar.js @@ -324,7 +324,6 @@ class StatusBar extends React.Component<{ componentWillUnmount() { // When a StatusBar is unmounted, remove itself from the stack and update // the native bar with the next props. - // $FlowFixMe found when converting React.createClass to ES6 const index = StatusBar._propsStack.indexOf(this._stackEntry); StatusBar._propsStack.splice(index, 1); @@ -332,7 +331,6 @@ class StatusBar extends React.Component<{ } componentDidUpdate() { - // $FlowFixMe found when converting React.createClass to ES6 const index = StatusBar._propsStack.indexOf(this._stackEntry); this._stackEntry = createStackEntry(this.props); StatusBar._propsStack[index] = this._stackEntry; diff --git a/Libraries/StyleSheet/StyleSheetValidation.js b/Libraries/StyleSheet/StyleSheetValidation.js index dadf735dd..d064f2bbe 100644 --- a/Libraries/StyleSheet/StyleSheetValidation.js +++ b/Libraries/StyleSheet/StyleSheetValidation.js @@ -39,9 +39,6 @@ class StyleSheetValidation { /* $FlowFixMe(>=0.56.0 site=react_native_oss) This comment suppresses an * error found when Flow v0.56 was deployed. To see the error delete this * comment and run Flow. */ - /* $FlowFixMe(>=0.56.0 site=react_native_fb,react_native_oss) This - * comment suppresses an error found when Flow v0.56 was deployed. To see - * the error delete this comment and run Flow. */ styleError(message1, style, caller, message2); } var error = allStylePropTypes[prop]( diff --git a/local-cli/server/runServer.js b/local-cli/server/runServer.js index 66851c8cb..f86f1f133 100644 --- a/local-cli/server/runServer.js +++ b/local-cli/server/runServer.js @@ -89,8 +89,6 @@ function runServer( var wsProxy = null; var ms = null; - /* $FlowFixMe: Flow is wrong, Node.js docs specify that process.stdout is an - * instance of a net.Socket (a local socket, not network). */ const terminal = new Terminal(process.stdout); const ReporterImpl = getReporterImpl(args.customLogReporterPath || null); const reporter = new ReporterImpl(terminal); diff --git a/local-cli/templates/HelloWorld/_flowconfig b/local-cli/templates/HelloWorld/_flowconfig index 457423de0..a03374e91 100644 --- a/local-cli/templates/HelloWorld/_flowconfig +++ b/local-cli/templates/HelloWorld/_flowconfig @@ -41,12 +41,12 @@ suppress_type=$FlowFixMe suppress_type=$FlowFixMeProps suppress_type=$FlowFixMeState -suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(5[0-9]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) -suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(5[0-9]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+ +suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) +suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+ suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError unsafe.enable_getters_and_setters=true [version] -^0.59.0 +^0.60.0 diff --git a/package.json b/package.json index 43d493cb0..d87b26d33 100644 --- a/package.json +++ b/package.json @@ -208,7 +208,7 @@ "eslint-plugin-flowtype": "^2.33.0", "eslint-plugin-prettier": "2.1.1", "eslint-plugin-react": "^7.2.1", - "flow-bin": "^0.59.0", + "flow-bin": "^0.60.1", "jest": "21.3.0-beta.8", "prettier": "1.7.0", "react": "16.2.0",