Skip to content

Commit 4a48b02

Browse files
mrochfacebook-github-bot
authored andcommitted
upgrade to flow 0.122.0
Summary: Changelog: [Internal] Reviewed By: dsainati1 Differential Revision: D20919782 fbshipit-source-id: 3d5dc54ea4daafb8a1d96cad6c35a2dab4c24097
1 parent bf2609d commit 4a48b02

File tree

10 files changed

+41
-37
lines changed

10 files changed

+41
-37
lines changed

.flowconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,4 @@ untyped-import
8585
untyped-type-import
8686

8787
[version]
88-
^0.121.0
88+
^0.122.0

.flowconfig.android

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,4 @@ untyped-import
8585
untyped-type-import
8686

8787
[version]
88-
^0.121.0
88+
^0.122.0

Libraries/Utilities/ReactNativeTestTools.js

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ const React = require('react');
1616

1717
const ReactTestRenderer = require('react-test-renderer');
1818
const ShallowRenderer = require('react-test-renderer/shallow');
19-
/* $FlowFixMe(>=0.120.0) This comment suppresses an error found when Flow
20-
* v0.120 was deployed. To see the error, delete this comment and run Flow. */
19+
/* $FlowFixMe(>=0.122.0 site=react_native_fb) This comment suppresses an error
20+
* found when Flow v0.122.0 was deployed. To see the error, delete this comment
21+
* and run Flow. */
2122
const shallowRenderer = new ShallowRenderer();
2223

2324
import type {ReactTestRenderer as ReactTestRendererType} from 'react-test-renderer';
@@ -27,8 +28,9 @@ export type ReactTestInstance = $PropertyType<ReactTestRendererType, 'root'>;
2728
export type Predicate = (node: ReactTestInstance) => boolean;
2829

2930
type $ReturnType<Fn> = $Call<<Ret, A>((...A) => Ret) => Ret, Fn>;
30-
/* $FlowFixMe(>=0.120.0) This comment suppresses an error found when Flow
31-
* v0.120 was deployed. To see the error, delete this comment and run Flow. */
31+
/* $FlowFixMe(>=0.122.0 site=react_native_fb) This comment suppresses an error
32+
* found when Flow v0.122.0 was deployed. To see the error, delete this comment
33+
* and run Flow. */
3234
export type ReactTestRendererJSON = $ReturnType<ReactTestRenderer.create.toJSON>;
3335

3436
const {
@@ -54,13 +56,13 @@ function byClickable(): Predicate {
5456
// HACK: Find components that use `Pressability`.
5557
node.instance?.state?.pressability != null ||
5658
// TODO: Remove this after deleting `Touchable`.
57-
/* $FlowFixMe(>=0.120.0) This comment suppresses an error found when Flow
58-
* v0.120 was deployed. To see the error, delete this comment and run
59-
* Flow. */
59+
/* $FlowFixMe(>=0.122.0 site=react_native_fb) This comment suppresses an
60+
* error found when Flow v0.122.0 was deployed. To see the error, delete
61+
* this comment and run Flow. */
6062
(node.instance &&
61-
/* $FlowFixMe(>=0.120.0) This comment suppresses an error found when
62-
* Flow v0.120 was deployed. To see the error, delete this comment and
63-
* run Flow. */
63+
/* $FlowFixMe(>=0.122.0 site=react_native_fb) This comment suppresses
64+
* an error found when Flow v0.122.0 was deployed. To see the error,
65+
* delete this comment and run Flow. */
6466
typeof node.instance.touchableHandlePress === 'function'),
6567
'is clickable',
6668
);
@@ -75,9 +77,9 @@ function byTestID(testID: string): Predicate {
7577

7678
function byTextMatching(regex: RegExp): Predicate {
7779
return withMessage(
78-
/* $FlowFixMe(>=0.120.0) This comment suppresses an error found when Flow
79-
* v0.120 was deployed. To see the error, delete this comment and run Flow.
80-
*/
80+
/* $FlowFixMe(>=0.122.0 site=react_native_fb) This comment suppresses an
81+
* error found when Flow v0.122.0 was deployed. To see the error, delete
82+
* this comment and run Flow. */
8183
node => node.props && regex.exec(node.props.children),
8284
`text content matches ${regex.toString()}`,
8385
);

Libraries/Utilities/registerGeneratedViewConfig.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,25 +50,25 @@ function registerGeneratedViewConfig(
5050
const mergedViewConfig = {
5151
uiViewClassName: componentName,
5252
Commands: {},
53+
/* $FlowFixMe(>=0.122.0 site=react_native_fb) This comment suppresses an
54+
* error found when Flow v0.122.0 was deployed. To see the error, delete
55+
* this comment and run Flow. */
5356
bubblingEventTypes: {
5457
...ReactNativeViewViewConfig.bubblingEventTypes,
55-
/* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment suppresses an
56-
* error found when Flow v0.111 was deployed. To see the error, delete
57-
* this comment and run Flow. */
5858
...(viewConfig.bubblingEventTypes || {}),
5959
},
60+
/* $FlowFixMe(>=0.122.0 site=react_native_fb) This comment suppresses an
61+
* error found when Flow v0.122.0 was deployed. To see the error, delete
62+
* this comment and run Flow. */
6063
directEventTypes: {
6164
...ReactNativeViewViewConfig.directEventTypes,
62-
/* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment suppresses an
63-
* error found when Flow v0.111 was deployed. To see the error, delete
64-
* this comment and run Flow. */
6565
...(viewConfig.directEventTypes || {}),
6666
},
67+
/* $FlowFixMe(>=0.122.0 site=react_native_fb) This comment suppresses an
68+
* error found when Flow v0.122.0 was deployed. To see the error, delete
69+
* this comment and run Flow. */
6770
validAttributes: {
6871
...ReactNativeViewViewConfig.validAttributes,
69-
/* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment suppresses an
70-
* error found when Flow v0.111 was deployed. To see the error, delete
71-
* this comment and run Flow. */
7272
...(viewConfig.validAttributes || {}),
7373
},
7474
};

RNTester/js/examples/TextInput/TextInputExample.android.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ class AutogrowingTextInputExample extends React.Component<{...}> {
9999
onValueChange={value => this.setState({multiline: value})}
100100
/>
101101
<Text>TextInput:</Text>
102+
{/* $FlowFixMe(>=0.122.0 site=react_native_android_fb) This comment
103+
* suppresses an error found when Flow v0.122.0 was deployed. To see
104+
* the error, delete this comment and run Flow. */}
102105
<TextInput
103106
/* $FlowFixMe(>=0.78.0 site=react_native_android_fb) This issue was
104107
* found when making Flow check .android.js files. */
@@ -114,8 +117,6 @@ class AutogrowingTextInputExample extends React.Component<{...}> {
114117
* found when making Flow check .android.js files. */
115118
this.setState({contentSize: event.nativeEvent.contentSize})
116119
}
117-
/* $FlowFixMe(>=0.78.0 site=react_native_android_fb) This issue was
118-
* found when making Flow check .android.js files. */
119120
{...props}
120121
/>
121122
<Text>Plain text value representation:</Text>

RNTester/js/examples/TurboModule/SampleTurboModuleExample.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ class SampleTurboModuleExample extends React.Component<{||}, State> {
7070

7171
_setResult(name, result) {
7272
this.setState(({testResults}) => ({
73+
/* $FlowFixMe(>=0.122.0 site=react_native_fb) This comment suppresses an
74+
* error found when Flow v0.122.0 was deployed. To see the error, delete
75+
* this comment and run Flow. */
7376
testResults: {
74-
/* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment suppresses
75-
* an error found when Flow v0.111 was deployed. To see the error,
76-
* delete this comment and run Flow. */
7777
...testResults,
7878
/* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment suppresses
7979
* an error found when Flow v0.111 was deployed. To see the error,

jest/renderer.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ const React = require('react');
1515
const ShallowRenderer = require('react-test-renderer/shallow');
1616
const TestRenderer = require('react-test-renderer');
1717

18-
/* $FlowFixMe(>=0.120.0) This comment suppresses an error found when Flow
19-
* v0.120 was deployed. To see the error, delete this comment and run Flow. */
18+
/* $FlowFixMe(>=0.122.0 site=react_native_fb) This comment suppresses an error
19+
* found when Flow v0.122.0 was deployed. To see the error, delete this comment
20+
* and run Flow. */
2021
const renderer = new ShallowRenderer();
2122

2223
export const shallow = (Component: React.Element<any>): any => {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@
138138
"eslint-plugin-react-hooks": "^3.0.0",
139139
"eslint-plugin-react-native": "3.8.1",
140140
"eslint-plugin-relay": "1.7.0",
141-
"flow-bin": "^0.121.0",
141+
"flow-bin": "^0.122.0",
142142
"flow-remove-types": "1.2.3",
143143
"jest": "^24.9.0",
144144
"jest-junit": "^6.3.0",

template/_flowconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,4 @@ untyped-import
7070
untyped-type-import
7171

7272
[version]
73-
^0.121.0
73+
^0.122.0

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3530,10 +3530,10 @@ flat-cache@^1.2.1:
35303530
rimraf "~2.6.2"
35313531
write "^0.2.1"
35323532

3533-
flow-bin@^0.121.0:
3534-
version "0.121.0"
3535-
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.121.0.tgz#e206bdc3d510277f9a847920540f72c49e87c130"
3536-
integrity sha512-QYRMs+AoMLj/OTaSo9+8c3kzM/u8YgvfrInp0qzhtzC02Sc2jb3BV/QZWZGjPo+XK3twyyqXrcI3s8MuL1UQRg==
3533+
flow-bin@^0.122.0:
3534+
version "0.122.0"
3535+
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.122.0.tgz#c723a2b33b1a70bd10204704ae1dc776d5d89d79"
3536+
integrity sha512-my8N5jgl/A+UVby9E7NDppHdhLgRbWgKbmFZSx2MSYMRh3d9YGnM2MM+wexpUpl0ftY1IM6ZcUwaAhrypLyvlA==
35373537

35383538
flow-parser@0.*:
35393539
version "0.89.0"

0 commit comments

Comments
 (0)