diff --git a/.flowconfig b/.flowconfig index 428b5207bc46c3..1c776c8065b471 100644 --- a/.flowconfig +++ b/.flowconfig @@ -85,4 +85,4 @@ untyped-import untyped-type-import [version] -^0.121.0 +^0.122.0 diff --git a/.flowconfig.android b/.flowconfig.android index f2345391df5aac..cb37da2887626a 100644 --- a/.flowconfig.android +++ b/.flowconfig.android @@ -85,4 +85,4 @@ untyped-import untyped-type-import [version] -^0.121.0 +^0.122.0 diff --git a/Libraries/Utilities/ReactNativeTestTools.js b/Libraries/Utilities/ReactNativeTestTools.js index 8ea11c8579b27d..cd018a6fc5e3cc 100644 --- a/Libraries/Utilities/ReactNativeTestTools.js +++ b/Libraries/Utilities/ReactNativeTestTools.js @@ -16,8 +16,9 @@ const React = require('react'); const ReactTestRenderer = require('react-test-renderer'); const ShallowRenderer = require('react-test-renderer/shallow'); -/* $FlowFixMe(>=0.120.0) This comment suppresses an error found when Flow - * v0.120 was deployed. To see the error, delete this comment and run Flow. */ +/* $FlowFixMe(>=0.122.0 site=react_native_fb) This comment suppresses an error + * found when Flow v0.122.0 was deployed. To see the error, delete this comment + * and run Flow. */ const shallowRenderer = new ShallowRenderer(); import type {ReactTestRenderer as ReactTestRendererType} from 'react-test-renderer'; @@ -27,8 +28,9 @@ export type ReactTestInstance = $PropertyType; export type Predicate = (node: ReactTestInstance) => boolean; type $ReturnType = $Call<((...A) => Ret) => Ret, Fn>; -/* $FlowFixMe(>=0.120.0) This comment suppresses an error found when Flow - * v0.120 was deployed. To see the error, delete this comment and run Flow. */ +/* $FlowFixMe(>=0.122.0 site=react_native_fb) This comment suppresses an error + * found when Flow v0.122.0 was deployed. To see the error, delete this comment + * and run Flow. */ export type ReactTestRendererJSON = $ReturnType; const { @@ -54,13 +56,13 @@ function byClickable(): Predicate { // HACK: Find components that use `Pressability`. node.instance?.state?.pressability != null || // TODO: Remove this after deleting `Touchable`. - /* $FlowFixMe(>=0.120.0) This comment suppresses an error found when Flow - * v0.120 was deployed. To see the error, delete this comment and run - * Flow. */ + /* $FlowFixMe(>=0.122.0 site=react_native_fb) This comment suppresses an + * error found when Flow v0.122.0 was deployed. To see the error, delete + * this comment and run Flow. */ (node.instance && - /* $FlowFixMe(>=0.120.0) This comment suppresses an error found when - * Flow v0.120 was deployed. To see the error, delete this comment and - * run Flow. */ + /* $FlowFixMe(>=0.122.0 site=react_native_fb) This comment suppresses + * an error found when Flow v0.122.0 was deployed. To see the error, + * delete this comment and run Flow. */ typeof node.instance.touchableHandlePress === 'function'), 'is clickable', ); @@ -75,9 +77,9 @@ function byTestID(testID: string): Predicate { function byTextMatching(regex: RegExp): Predicate { return withMessage( - /* $FlowFixMe(>=0.120.0) This comment suppresses an error found when Flow - * v0.120 was deployed. To see the error, delete this comment and run Flow. - */ + /* $FlowFixMe(>=0.122.0 site=react_native_fb) This comment suppresses an + * error found when Flow v0.122.0 was deployed. To see the error, delete + * this comment and run Flow. */ node => node.props && regex.exec(node.props.children), `text content matches ${regex.toString()}`, ); diff --git a/Libraries/Utilities/registerGeneratedViewConfig.js b/Libraries/Utilities/registerGeneratedViewConfig.js index 7ce2c2f01f39de..947b3b06642b72 100644 --- a/Libraries/Utilities/registerGeneratedViewConfig.js +++ b/Libraries/Utilities/registerGeneratedViewConfig.js @@ -50,25 +50,25 @@ function registerGeneratedViewConfig( const mergedViewConfig = { uiViewClassName: componentName, Commands: {}, + /* $FlowFixMe(>=0.122.0 site=react_native_fb) This comment suppresses an + * error found when Flow v0.122.0 was deployed. To see the error, delete + * this comment and run Flow. */ bubblingEventTypes: { ...ReactNativeViewViewConfig.bubblingEventTypes, - /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment suppresses an - * error found when Flow v0.111 was deployed. To see the error, delete - * this comment and run Flow. */ ...(viewConfig.bubblingEventTypes || {}), }, + /* $FlowFixMe(>=0.122.0 site=react_native_fb) This comment suppresses an + * error found when Flow v0.122.0 was deployed. To see the error, delete + * this comment and run Flow. */ directEventTypes: { ...ReactNativeViewViewConfig.directEventTypes, - /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment suppresses an - * error found when Flow v0.111 was deployed. To see the error, delete - * this comment and run Flow. */ ...(viewConfig.directEventTypes || {}), }, + /* $FlowFixMe(>=0.122.0 site=react_native_fb) This comment suppresses an + * error found when Flow v0.122.0 was deployed. To see the error, delete + * this comment and run Flow. */ validAttributes: { ...ReactNativeViewViewConfig.validAttributes, - /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment suppresses an - * error found when Flow v0.111 was deployed. To see the error, delete - * this comment and run Flow. */ ...(viewConfig.validAttributes || {}), }, }; diff --git a/RNTester/js/examples/TextInput/TextInputExample.android.js b/RNTester/js/examples/TextInput/TextInputExample.android.js index 6306cd603871d9..8c7020f02ccc74 100644 --- a/RNTester/js/examples/TextInput/TextInputExample.android.js +++ b/RNTester/js/examples/TextInput/TextInputExample.android.js @@ -99,6 +99,9 @@ class AutogrowingTextInputExample extends React.Component<{...}> { onValueChange={value => this.setState({multiline: value})} /> TextInput: + {/* $FlowFixMe(>=0.122.0 site=react_native_android_fb) This comment + * suppresses an error found when Flow v0.122.0 was deployed. To see + * the error, delete this comment and run Flow. */} =0.78.0 site=react_native_android_fb) This issue was * found when making Flow check .android.js files. */ @@ -114,8 +117,6 @@ class AutogrowingTextInputExample extends React.Component<{...}> { * found when making Flow check .android.js files. */ this.setState({contentSize: event.nativeEvent.contentSize}) } - /* $FlowFixMe(>=0.78.0 site=react_native_android_fb) This issue was - * found when making Flow check .android.js files. */ {...props} /> Plain text value representation: diff --git a/RNTester/js/examples/TurboModule/SampleTurboModuleExample.js b/RNTester/js/examples/TurboModule/SampleTurboModuleExample.js index 8d13df63c26dff..eae564aa3a21cc 100644 --- a/RNTester/js/examples/TurboModule/SampleTurboModuleExample.js +++ b/RNTester/js/examples/TurboModule/SampleTurboModuleExample.js @@ -70,10 +70,10 @@ class SampleTurboModuleExample extends React.Component<{||}, State> { _setResult(name, result) { this.setState(({testResults}) => ({ + /* $FlowFixMe(>=0.122.0 site=react_native_fb) This comment suppresses an + * error found when Flow v0.122.0 was deployed. To see the error, delete + * this comment and run Flow. */ testResults: { - /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment suppresses - * an error found when Flow v0.111 was deployed. To see the error, - * delete this comment and run Flow. */ ...testResults, /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment suppresses * an error found when Flow v0.111 was deployed. To see the error, diff --git a/jest/renderer.js b/jest/renderer.js index e148b519223b7b..e9f0cde6c4ad10 100644 --- a/jest/renderer.js +++ b/jest/renderer.js @@ -15,8 +15,9 @@ const React = require('react'); const ShallowRenderer = require('react-test-renderer/shallow'); const TestRenderer = require('react-test-renderer'); -/* $FlowFixMe(>=0.120.0) This comment suppresses an error found when Flow - * v0.120 was deployed. To see the error, delete this comment and run Flow. */ +/* $FlowFixMe(>=0.122.0 site=react_native_fb) This comment suppresses an error + * found when Flow v0.122.0 was deployed. To see the error, delete this comment + * and run Flow. */ const renderer = new ShallowRenderer(); export const shallow = (Component: React.Element): any => { diff --git a/package.json b/package.json index 15b539acd576e4..a7c5f920f7812b 100644 --- a/package.json +++ b/package.json @@ -138,7 +138,7 @@ "eslint-plugin-react-hooks": "^3.0.0", "eslint-plugin-react-native": "3.8.1", "eslint-plugin-relay": "1.7.0", - "flow-bin": "^0.121.0", + "flow-bin": "^0.122.0", "flow-remove-types": "1.2.3", "jest": "^24.9.0", "jest-junit": "^6.3.0", diff --git a/template/_flowconfig b/template/_flowconfig index 6a4a358c7e6d10..b274ad1d6762f4 100644 --- a/template/_flowconfig +++ b/template/_flowconfig @@ -70,4 +70,4 @@ untyped-import untyped-type-import [version] -^0.121.0 +^0.122.0 diff --git a/yarn.lock b/yarn.lock index 295793f27e3d85..9dc1fd5552f9ba 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3530,10 +3530,10 @@ flat-cache@^1.2.1: rimraf "~2.6.2" write "^0.2.1" -flow-bin@^0.121.0: - version "0.121.0" - resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.121.0.tgz#e206bdc3d510277f9a847920540f72c49e87c130" - integrity sha512-QYRMs+AoMLj/OTaSo9+8c3kzM/u8YgvfrInp0qzhtzC02Sc2jb3BV/QZWZGjPo+XK3twyyqXrcI3s8MuL1UQRg== +flow-bin@^0.122.0: + version "0.122.0" + resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.122.0.tgz#c723a2b33b1a70bd10204704ae1dc776d5d89d79" + integrity sha512-my8N5jgl/A+UVby9E7NDppHdhLgRbWgKbmFZSx2MSYMRh3d9YGnM2MM+wexpUpl0ftY1IM6ZcUwaAhrypLyvlA== flow-parser@0.*: version "0.89.0"