diff --git a/.flowconfig b/.flowconfig index e3c0deb8e59feb..21d657ac945969 100644 --- a/.flowconfig +++ b/.flowconfig @@ -98,4 +98,4 @@ untyped-import untyped-type-import [version] -^0.86.0 +^0.87.0 diff --git a/.flowconfig.android b/.flowconfig.android index 0f70fa4dd7a2bf..3ea9c1f76393d0 100644 --- a/.flowconfig.android +++ b/.flowconfig.android @@ -98,4 +98,4 @@ untyped-import untyped-type-import [version] -^0.86.0 +^0.87.0 diff --git a/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js b/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js index e41c4e5cc4d979..c6a94f59450d32 100644 --- a/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +++ b/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js @@ -231,6 +231,9 @@ class DrawerLayoutAndroid extends React.Component { return ( =0.87.0 site=react_native_android_fb) This comment + * suppresses an error found when Flow v0.87 was deployed. To see the + * error, delete this comment and run Flow. */ ref={this._nativeRef} drawerWidth={this.props.drawerWidth} drawerPosition={this.props.drawerPosition} @@ -322,18 +325,30 @@ class DrawerLayoutAndroid extends React.Component { * Native methods */ blur() { + /* $FlowFixMe(>=0.87.0 site=react_native_android_fb) This comment + * suppresses an error found when Flow v0.87 was deployed. To see the + * error, delete this comment and run Flow. */ nullthrows(this._nativeRef.current).blur(); } focus() { + /* $FlowFixMe(>=0.87.0 site=react_native_android_fb) This comment + * suppresses an error found when Flow v0.87 was deployed. To see the + * error, delete this comment and run Flow. */ nullthrows(this._nativeRef.current).focus(); } measure(callback: MeasureOnSuccessCallback) { + /* $FlowFixMe(>=0.87.0 site=react_native_android_fb) This comment + * suppresses an error found when Flow v0.87 was deployed. To see the + * error, delete this comment and run Flow. */ nullthrows(this._nativeRef.current).measure(callback); } measureInWindow(callback: MeasureInWindowOnSuccessCallback) { + /* $FlowFixMe(>=0.87.0 site=react_native_android_fb) This comment + * suppresses an error found when Flow v0.87 was deployed. To see the + * error, delete this comment and run Flow. */ nullthrows(this._nativeRef.current).measureInWindow(callback); } @@ -342,6 +357,9 @@ class DrawerLayoutAndroid extends React.Component { onSuccess: MeasureLayoutOnSuccessCallback, onFail?: () => void, ) { + /* $FlowFixMe(>=0.87.0 site=react_native_android_fb) This comment + * suppresses an error found when Flow v0.87 was deployed. To see the + * error, delete this comment and run Flow. */ nullthrows(this._nativeRef.current).measureLayout( relativeToNativeNode, onSuccess, @@ -350,6 +368,9 @@ class DrawerLayoutAndroid extends React.Component { } setNativeProps(nativeProps: Object) { + /* $FlowFixMe(>=0.87.0 site=react_native_android_fb) This comment + * suppresses an error found when Flow v0.87 was deployed. To see the + * error, delete this comment and run Flow. */ nullthrows(this._nativeRef.current).setNativeProps(nativeProps); } } diff --git a/Libraries/Utilities/__tests__/setAndForwardRef-test.js b/Libraries/Utilities/__tests__/setAndForwardRef-test.js index e1899bb3c2fdf1..33bbd288d91e71 100644 --- a/Libraries/Utilities/__tests__/setAndForwardRef-test.js +++ b/Libraries/Utilities/__tests__/setAndForwardRef-test.js @@ -88,6 +88,9 @@ describe('setAndForwardRef', () => { ReactTestRenderer.create(); + /* $FlowFixMe(>=0.87.0 site=react_native_fb) This comment suppresses an + * error found when Flow v0.87 was deployed. To see the error, delete this + * comment and run Flow. */ const val = createdRef.current && createdRef.current.testFunc(); expect(innerFuncCalled).toBe(true); diff --git a/RNTester/js/TextInputExample.android.js b/RNTester/js/TextInputExample.android.js index 7bed8d83f37a4e..3f67bb6c370930 100644 --- a/RNTester/js/TextInputExample.android.js +++ b/RNTester/js/TextInputExample.android.js @@ -315,8 +315,6 @@ class SelectionExample extends React.Component< onChangeText={value => this.setState({value})} onSelectionChange={this.onSelectionChange.bind(this)} ref={textInput => (this._textInput = textInput)} - /* $FlowFixMe(>=0.78.0 site=react_native_android_fb) This issue was - * found when making Flow check .android.js files. */ selection={this.state.selection} style={this.props.style} value={this.state.value} diff --git a/ReactAndroid/src/androidTest/js/ScrollViewTestModule.js b/ReactAndroid/src/androidTest/js/ScrollViewTestModule.js index 1fa81476260d85..aa8fa89ab65727 100644 --- a/ReactAndroid/src/androidTest/js/ScrollViewTestModule.js +++ b/ReactAndroid/src/androidTest/js/ScrollViewTestModule.js @@ -87,6 +87,9 @@ type State = {| |}; class ScrollViewTestApp extends React.Component { + /* $FlowFixMe(>=0.87.0 site=react_native_fb) This comment suppresses an error + * found when Flow v0.87 was deployed. To see the error, delete this comment + * and run Flow. */ scrollView = React.createRef(); state = getInitialState(); @@ -121,6 +124,9 @@ class ScrollViewTestApp extends React.Component { } class HorizontalScrollViewTestApp extends React.Component { + /* $FlowFixMe(>=0.87.0 site=react_native_fb) This comment suppresses an error + * found when Flow v0.87 was deployed. To see the error, delete this comment + * and run Flow. */ scrollView = React.createRef(); state = getInitialState(); diff --git a/jest/preprocessor.js b/jest/preprocessor.js index 86397a6fafc3da..2bb532f58a45ea 100644 --- a/jest/preprocessor.js +++ b/jest/preprocessor.js @@ -33,7 +33,6 @@ const nodeOptions = babelRegisterOnly.config([nodeFiles]); babelRegisterOnly([]); -/* $FlowFixMe(site=react_native_oss) */ const transformer = require('metro/src/reactNativeTransformer'); module.exports = { process(src /*: string */, file /*: string */) { diff --git a/local-cli/bundle/buildBundle.js b/local-cli/bundle/buildBundle.js index b81b7432951f6b..bdc5af3c7cdf0d 100644 --- a/local-cli/bundle/buildBundle.js +++ b/local-cli/bundle/buildBundle.js @@ -13,7 +13,6 @@ const log = require('../util/log').out('bundle'); const Server = require('metro/src/Server'); -/* $FlowFixMe(site=react_native_oss) */ const outputBundle = require('metro/src/shared/output/bundle'); const path = require('path'); const saveAssets = require('./saveAssets'); diff --git a/local-cli/templates/HelloWorld/_flowconfig b/local-cli/templates/HelloWorld/_flowconfig index 9bded78be9b0a0..924d0642337288 100644 --- a/local-cli/templates/HelloWorld/_flowconfig +++ b/local-cli/templates/HelloWorld/_flowconfig @@ -67,4 +67,4 @@ suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError [version] -^0.86.0 +^0.87.0 diff --git a/package.json b/package.json index 0223bb9f5b0a68..f213000f634180 100644 --- a/package.json +++ b/package.json @@ -221,7 +221,7 @@ "eslint-plugin-prettier": "2.6.0", "eslint-plugin-react": "7.8.2", "eslint-plugin-react-native": "3.5.0", - "flow-bin": "^0.86.0", + "flow-bin": "^0.87.0", "jest": "24.0.0-alpha.6", "jest-junit": "5.2.0", "prettier": "1.13.6", diff --git a/yarn.lock b/yarn.lock index c9449e21266c8d..071003c164c046 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2590,10 +2590,10 @@ flat-cache@^1.2.1: graceful-fs "^4.1.2" write "^0.2.1" -flow-bin@^0.86.0: - version "0.86.0" - resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.86.0.tgz#153a28722b4dc13b7200c74b644dd4d9f4969a11" - integrity sha512-ulRvFH3ewGIYwg+qPk/OJXoe3Nhqi0RyR0wqgK0b1NzUDEC6O99zU39MBTickXvlrr6iwRO6Wm4lVGeDmnzbew== +flow-bin@^0.87.0: + version "0.87.0" + resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.87.0.tgz#fab7f984d8cc767e93fa9eb01cf7d57ed744f19d" + integrity sha512-mnvBXXZkUp4y6A96bR5BHa3q1ioIIN2L10w5osxJqagAakTXFYZwjl0t9cT3y2aCEf1wnK6n91xgYypQS/Dqbw== for-in@^1.0.1, for-in@^1.0.2: version "1.0.2"