From 8da1f1149f5ee9f8a75cbc8baac280c95585daa2 Mon Sep 17 00:00:00 2001 From: Daniel Sainati Date: Fri, 15 Feb 2019 12:01:04 -0800 Subject: [PATCH] deploy 0.93 Summary: upgrades flow version allow-large-files bypass-lint Reviewed By: nmote Differential Revision: D14095305 fbshipit-source-id: 000b3b2e085f673bc443fc8bc1b3aae1b42df0e9 --- .flowconfig | 2 +- .flowconfig.android | 2 +- Libraries/Components/TextInput/TextInput.js | 3 - .../Components/Touchable/TouchableBounce.js | 21 ------- .../Touchable/TouchableHighlight.js | 60 ------------------- .../Components/Touchable/TouchableOpacity.js | 27 --------- Libraries/Core/Timers/JSTimers.js | 9 --- .../Lists/ListView/InternalListViewType.js | 1 - Libraries/Lists/VirtualizedList.js | 9 --- RNTester/js/ScrollViewSimpleExample.js | 3 - package.json | 2 +- template/_flowconfig | 2 +- yarn.lock | 8 +-- 13 files changed, 8 insertions(+), 141 deletions(-) diff --git a/.flowconfig b/.flowconfig index 9066cd3e0..435e855a6 100644 --- a/.flowconfig +++ b/.flowconfig @@ -98,4 +98,4 @@ untyped-import untyped-type-import [version] -^0.92.0 +^0.93.0 diff --git a/.flowconfig.android b/.flowconfig.android index c2e4cf641..4f9768d14 100644 --- a/.flowconfig.android +++ b/.flowconfig.android @@ -98,4 +98,4 @@ untyped-import untyped-type-import [version] -^0.92.0 +^0.93.0 diff --git a/Libraries/Components/TextInput/TextInput.js b/Libraries/Components/TextInput/TextInput.js index e9aa082f9..a5297cbe7 100644 --- a/Libraries/Components/TextInput/TextInput.js +++ b/Libraries/Components/TextInput/TextInput.js @@ -1161,9 +1161,6 @@ const TextInput = createReactClass({ props.autoCapitalize = UIManager.getViewManagerConfig( 'AndroidTextInput', ).Constants.AutoCapitalizationType[props.autoCapitalize || 'sentences']; - /* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This comment - * suppresses an error when upgrading Flow's support for React. To see the - * error delete this comment and run Flow. */ let children = this.props.children; let childCount = 0; React.Children.forEach(children, () => ++childCount); diff --git a/Libraries/Components/Touchable/TouchableBounce.js b/Libraries/Components/Touchable/TouchableBounce.js index ff1b2d1d5..04817aef0 100644 --- a/Libraries/Components/Touchable/TouchableBounce.js +++ b/Libraries/Components/Touchable/TouchableBounce.js @@ -89,9 +89,6 @@ const TouchableBounce = ((createReactClass({ getInitialState: function(): State { return { - /* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an - * error found when Flow v0.89 was deployed. To see the error, delete - * this comment and run Flow. */ ...this.touchableGetInitialState(), scale: new Animated.Value(1), }; @@ -187,31 +184,13 @@ const TouchableBounce = ((createReactClass({ nativeID={this.props.nativeID} testID={this.props.testID} hitSlop={this.props.hitSlop} - /* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an - * error found when Flow v0.89 was deployed. To see the error, delete - * this comment and run Flow. */ onStartShouldSetResponder={this.touchableHandleStartShouldSetResponder} onResponderTerminationRequest={ - /* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses - * an error found when Flow v0.89 was deployed. To see the error, - * delete this comment and run Flow. */ this.touchableHandleResponderTerminationRequest } - /* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an - * error found when Flow v0.89 was deployed. To see the error, delete - * this comment and run Flow. */ onResponderGrant={this.touchableHandleResponderGrant} - /* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an - * error found when Flow v0.89 was deployed. To see the error, delete - * this comment and run Flow. */ onResponderMove={this.touchableHandleResponderMove} - /* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an - * error found when Flow v0.89 was deployed. To see the error, delete - * this comment and run Flow. */ onResponderRelease={this.touchableHandleResponderRelease} - /* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an - * error found when Flow v0.89 was deployed. To see the error, delete - * this comment and run Flow. */ onResponderTerminate={this.touchableHandleResponderTerminate}> {this.props.children} {Touchable.renderDebugView({ diff --git a/Libraries/Components/Touchable/TouchableHighlight.js b/Libraries/Components/Touchable/TouchableHighlight.js index 4d1696cfc..5cc229390 100644 --- a/Libraries/Components/Touchable/TouchableHighlight.js +++ b/Libraries/Components/Touchable/TouchableHighlight.js @@ -203,15 +203,9 @@ const TouchableHighlight = ((createReactClass({ getDefaultProps: () => DEFAULT_PROPS, getInitialState: function() { - /* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an - * error found when Flow v0.89 was deployed. To see the error, delete this - * comment and run Flow. */ this._isMounted = false; if (this.props.testOnly_pressed) { return { - /* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an - * error found when Flow v0.89 was deployed. To see the error, delete - * this comment and run Flow. */ ...this.touchableGetInitialState(), extraChildStyle: { opacity: this.props.activeOpacity, @@ -222,9 +216,6 @@ const TouchableHighlight = ((createReactClass({ }; } else { return { - /* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an - * error found when Flow v0.89 was deployed. To see the error, delete - * this comment and run Flow. */ ...this.touchableGetInitialState(), extraChildStyle: null, extraUnderlayStyle: null, @@ -233,21 +224,12 @@ const TouchableHighlight = ((createReactClass({ }, componentDidMount: function() { - /* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an - * error found when Flow v0.89 was deployed. To see the error, delete this - * comment and run Flow. */ this._isMounted = true; ensurePositiveDelayProps(this.props); }, componentWillUnmount: function() { - /* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an - * error found when Flow v0.89 was deployed. To see the error, delete this - * comment and run Flow. */ this._isMounted = false; - /* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an - * error found when Flow v0.89 was deployed. To see the error, delete this - * comment and run Flow. */ clearTimeout(this._hideTimeout); }, @@ -265,22 +247,13 @@ const TouchableHighlight = ((createReactClass({ * defined on your component. */ touchableHandleActivePressIn: function(e: PressEvent) { - /* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an - * error found when Flow v0.89 was deployed. To see the error, delete this - * comment and run Flow. */ clearTimeout(this._hideTimeout); - /* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an - * error found when Flow v0.89 was deployed. To see the error, delete this - * comment and run Flow. */ this._hideTimeout = null; this._showUnderlay(); this.props.onPressIn && this.props.onPressIn(e); }, touchableHandleActivePressOut: function(e: PressEvent) { - /* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an - * error found when Flow v0.89 was deployed. To see the error, delete this - * comment and run Flow. */ if (!this._hideTimeout) { this._hideUnderlay(); } @@ -302,15 +275,9 @@ const TouchableHighlight = ((createReactClass({ }, touchableHandlePress: function(e: PressEvent) { - /* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an - * error found when Flow v0.89 was deployed. To see the error, delete this - * comment and run Flow. */ clearTimeout(this._hideTimeout); if (!Platform.isTV) { this._showUnderlay(); - /* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an - * error found when Flow v0.89 was deployed. To see the error, delete - * this comment and run Flow. */ this._hideTimeout = setTimeout( this._hideUnderlay, this.props.delayPressOut, @@ -344,9 +311,6 @@ const TouchableHighlight = ((createReactClass({ }, _showUnderlay: function() { - /* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an - * error found when Flow v0.89 was deployed. To see the error, delete this - * comment and run Flow. */ if (!this._isMounted || !this._hasPressHandler()) { return; } @@ -362,13 +326,7 @@ const TouchableHighlight = ((createReactClass({ }, _hideUnderlay: function() { - /* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an - * error found when Flow v0.89 was deployed. To see the error, delete this - * comment and run Flow. */ clearTimeout(this._hideTimeout); - /* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an - * error found when Flow v0.89 was deployed. To see the error, delete this - * comment and run Flow. */ this._hideTimeout = null; if (this.props.testOnly_pressed) { return; @@ -409,31 +367,13 @@ const TouchableHighlight = ((createReactClass({ isTVSelectable={true} tvParallaxProperties={this.props.tvParallaxProperties} hasTVPreferredFocus={this.props.hasTVPreferredFocus} - /* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an - * error found when Flow v0.89 was deployed. To see the error, delete - * this comment and run Flow. */ onStartShouldSetResponder={this.touchableHandleStartShouldSetResponder} onResponderTerminationRequest={ - /* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses - * an error found when Flow v0.89 was deployed. To see the error, - * delete this comment and run Flow. */ this.touchableHandleResponderTerminationRequest } - /* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an - * error found when Flow v0.89 was deployed. To see the error, delete - * this comment and run Flow. */ onResponderGrant={this.touchableHandleResponderGrant} - /* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an - * error found when Flow v0.89 was deployed. To see the error, delete - * this comment and run Flow. */ onResponderMove={this.touchableHandleResponderMove} - /* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an - * error found when Flow v0.89 was deployed. To see the error, delete - * this comment and run Flow. */ onResponderRelease={this.touchableHandleResponderRelease} - /* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an - * error found when Flow v0.89 was deployed. To see the error, delete - * this comment and run Flow. */ onResponderTerminate={this.touchableHandleResponderTerminate} nativeID={this.props.nativeID} testID={this.props.testID}> diff --git a/Libraries/Components/Touchable/TouchableOpacity.js b/Libraries/Components/Touchable/TouchableOpacity.js index 0451f8dff..ad97528a7 100644 --- a/Libraries/Components/Touchable/TouchableOpacity.js +++ b/Libraries/Components/Touchable/TouchableOpacity.js @@ -162,13 +162,7 @@ const TouchableOpacity = ((createReactClass({ getInitialState: function() { return { - /* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an - * error found when Flow v0.89 was deployed. To see the error, delete - * this comment and run Flow. */ ...this.touchableGetInitialState(), - /* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an - * error found when Flow v0.89 was deployed. To see the error, delete - * this comment and run Flow. */ anim: new Animated.Value(this._getChildStyleOpacityWithDefault()), }; }, @@ -266,9 +260,6 @@ const TouchableOpacity = ((createReactClass({ }, _opacityInactive: function(duration: number) { - /* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an - * error found when Flow v0.89 was deployed. To see the error, delete this - * comment and run Flow. */ this.setOpacityTo(this._getChildStyleOpacityWithDefault(), duration); }, @@ -293,31 +284,13 @@ const TouchableOpacity = ((createReactClass({ hasTVPreferredFocus={this.props.hasTVPreferredFocus} tvParallaxProperties={this.props.tvParallaxProperties} hitSlop={this.props.hitSlop} - /* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an - * error found when Flow v0.89 was deployed. To see the error, delete - * this comment and run Flow. */ onStartShouldSetResponder={this.touchableHandleStartShouldSetResponder} onResponderTerminationRequest={ - /* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses - * an error found when Flow v0.89 was deployed. To see the error, - * delete this comment and run Flow. */ this.touchableHandleResponderTerminationRequest } - /* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an - * error found when Flow v0.89 was deployed. To see the error, delete - * this comment and run Flow. */ onResponderGrant={this.touchableHandleResponderGrant} - /* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an - * error found when Flow v0.89 was deployed. To see the error, delete - * this comment and run Flow. */ onResponderMove={this.touchableHandleResponderMove} - /* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an - * error found when Flow v0.89 was deployed. To see the error, delete - * this comment and run Flow. */ onResponderRelease={this.touchableHandleResponderRelease} - /* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an - * error found when Flow v0.89 was deployed. To see the error, delete - * this comment and run Flow. */ onResponderTerminate={this.touchableHandleResponderTerminate}> {this.props.children} {Touchable.renderDebugView({ diff --git a/Libraries/Core/Timers/JSTimers.js b/Libraries/Core/Timers/JSTimers.js index d54fab92d..f91dc6035 100644 --- a/Libraries/Core/Timers/JSTimers.js +++ b/Libraries/Core/Timers/JSTimers.js @@ -290,9 +290,6 @@ const JSTimers = { * @param {function} func Callback to be invoked before the end of the * current JavaScript execution loop. */ - /* $FlowFixMe(>=0.79.1 site=react_native_fb) This comment suppresses an - * error found when Flow v0.79 was deployed. To see the error delete this - * comment and run Flow. */ setImmediate: function(func: Function, ...args: any) { const id = _allocateCallback( () => func.apply(undefined, args), @@ -305,9 +302,6 @@ const JSTimers = { /** * @param {function} func Callback to be invoked every frame. */ - /* $FlowFixMe(>=0.79.1 site=react_native_fb) This comment suppresses an - * error found when Flow v0.79 was deployed. To see the error delete this - * comment and run Flow. */ requestAnimationFrame: function(func: Function) { const id = _allocateCallback(func, 'requestAnimationFrame'); Timing.createTimer(id, 1, Date.now(), /* recurring */ false); @@ -319,9 +313,6 @@ const JSTimers = { * with time remaining in frame. * @param {?object} options */ - /* $FlowFixMe(>=0.79.1 site=react_native_fb) This comment suppresses an - * error found when Flow v0.79 was deployed. To see the error delete this - * comment and run Flow. */ requestIdleCallback: function(func: Function, options: ?Object) { if (requestIdleCallbacks.length === 0) { Timing.setSendIdleEvents(true); diff --git a/Libraries/Lists/ListView/InternalListViewType.js b/Libraries/Lists/ListView/InternalListViewType.js index a760775b2..c8eaddf39 100644 --- a/Libraries/Lists/ListView/InternalListViewType.js +++ b/Libraries/Lists/ListView/InternalListViewType.js @@ -21,7 +21,6 @@ class InternalListViewType extends React.Component { flashScrollIndicators() {} getScrollResponder(): any {} getScrollableNode(): any {} - // $FlowFixMe getMetrics(): Object {} scrollTo(...args: Array) {} scrollToEnd(options?: ?{animated?: ?boolean}) {} diff --git a/Libraries/Lists/VirtualizedList.js b/Libraries/Lists/VirtualizedList.js index 8455c51d6..a97cb7128 100644 --- a/Libraries/Lists/VirtualizedList.js +++ b/Libraries/Lists/VirtualizedList.js @@ -290,9 +290,6 @@ class VirtualizedList extends React.PureComponent { * suppresses an error when upgrading Flow's support for React. To see the * error delete this comment and run Flow. */ this._scrollRef.scrollTo( - /* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This - * comment suppresses an error when upgrading Flow's support for React. - * To see the error delete this comment and run Flow. */ this.props.horizontal ? {x: offset, animated} : {y: offset, animated}, ); } @@ -341,9 +338,6 @@ class VirtualizedList extends React.PureComponent { * suppresses an error when upgrading Flow's support for React. To see the * error delete this comment and run Flow. */ this._scrollRef.scrollTo( - /* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This - * comment suppresses an error when upgrading Flow's support for React. - * To see the error delete this comment and run Flow. */ horizontal ? {x: offset, animated} : {y: offset, animated}, ); } @@ -382,9 +376,6 @@ class VirtualizedList extends React.PureComponent { * suppresses an error when upgrading Flow's support for React. To see the * error delete this comment and run Flow. */ this._scrollRef.scrollTo( - /* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This - * comment suppresses an error when upgrading Flow's support for React. - * To see the error delete this comment and run Flow. */ this.props.horizontal ? {x: offset, animated} : {y: offset, animated}, ); } diff --git a/RNTester/js/ScrollViewSimpleExample.js b/RNTester/js/ScrollViewSimpleExample.js index f5ca4fced..bd814d598 100644 --- a/RNTester/js/ScrollViewSimpleExample.js +++ b/RNTester/js/ScrollViewSimpleExample.js @@ -17,9 +17,6 @@ const {ScrollView, StyleSheet, Text, TouchableOpacity} = ReactNative; const NUM_ITEMS = 20; class ScrollViewSimpleExample extends React.Component<{}> { - /* $FlowFixMe(>=0.85.0 site=react_native_fb) This comment suppresses an error - * found when Flow v0.85 was deployed. To see the error, delete this comment - * and run Flow. */ makeItems = (nItems: number, styles): Array => { const items = []; for (let i = 0; i < nItems; i++) { diff --git a/package.json b/package.json index ca30b7700..ad52e83c4 100644 --- a/package.json +++ b/package.json @@ -200,7 +200,7 @@ "eslint-plugin-react": "7.8.2", "eslint-plugin-react-hooks": "^1.0.1", "eslint-plugin-react-native": "3.5.0", - "flow-bin": "^0.92.0", + "flow-bin": "^0.93.0", "jest": "24.0.0-alpha.6", "jest-junit": "6.3.0", "jscodeshift": "^0.6.2", diff --git a/template/_flowconfig b/template/_flowconfig index 47d80d954..82adc4930 100644 --- a/template/_flowconfig +++ b/template/_flowconfig @@ -66,4 +66,4 @@ suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError [version] -^0.92.0 +^0.93.0 diff --git a/yarn.lock b/yarn.lock index ab14ae3fe..879834790 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2801,10 +2801,10 @@ flat-cache@^1.2.1: graceful-fs "^4.1.2" write "^0.2.1" -flow-bin@^0.92.0: - version "0.92.0" - resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.92.0.tgz#f5bf3e808b17b480e067ac673829ca715a168bea" - integrity sha512-3ErXSAXZZlLV5/QPlaUDCWlDUXop1SiH32ifXL3SEiBwsmGbudCLim+HFVZfkegrn1nB4TcNSkMWtW8SnMPyAQ== +flow-bin@^0.93.0: + version "0.93.0" + resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.93.0.tgz#9192a08d88db2a8da0ff55e42420f44539791430" + integrity sha512-p8yq4ocOlpyJgOEBEj0v0GzCP25c9WP0ilFQ8hXSbrTR7RPKuR+Whr+OitlVyp8ocdX0j1MrIwQ8x28dacy1pg== flow-parser@0.*: version "0.89.0"