Skip to content

Commit

Permalink
Upgrade to Flow 0.201.0
Browse files Browse the repository at this point in the history
Summary: Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D43772813

fbshipit-source-id: 563c6f3dfb00bc9247ac0505d7f841afad1eb43e
  • Loading branch information
mroch authored and facebook-github-bot committed Mar 4, 2023
1 parent 0f53d31 commit 947751f
Show file tree
Hide file tree
Showing 14 changed files with 18 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,4 @@ untyped-import
untyped-type-import

[version]
^0.200.0
^0.201.0
2 changes: 1 addition & 1 deletion .flowconfig.android
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,4 @@ untyped-import
untyped-type-import

[version]
^0.200.0
^0.201.0
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ class DrawerLayoutAndroid extends React.Component<Props, State> {
* LTI update could not be added via codemod */
_onDrawerSlide = event => {
if (this.props.onDrawerSlide) {
// $FlowFixMe[unused-promise]
this.props.onDrawerSlide(event);
}
if (this.props.keyboardDismissMode === 'on-drag') {
Expand Down
1 change: 1 addition & 0 deletions Libraries/Components/Keyboard/KeyboardAvoidingView.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ class KeyboardAvoidingView extends React.Component<Props, State> {

_onKeyboardChange = (event: ?KeyboardEvent) => {
this._keyboardEvent = event;
// $FlowFixMe[unused-promise]
this._updateBottomIfNecessary();
};

Expand Down
1 change: 1 addition & 0 deletions Libraries/Components/RefreshControl/RefreshControl.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ class RefreshControl extends React.Component<RefreshControlProps> {
_onRefresh = () => {
this._lastNativeRefreshing = true;

// $FlowFixMe[unused-promise]
this.props.onRefresh && this.props.onRefresh();

// The native component will start refreshing so force an update to
Expand Down
2 changes: 2 additions & 0 deletions Libraries/Components/Switch/Switch.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,9 @@ const SwitchWithForwardedRef: React.AbstractComponent<
const [native, setNative] = React.useState({value: (null: ?boolean)});

const handleChange = (event: SwitchChangeEvent) => {
// $FlowFixMe[unused-promise]
onChange?.(event);
// $FlowFixMe[unused-promise]
onValueChange?.(event.nativeEvent.value);
setNative({value: event.nativeEvent.value});
};
Expand Down
1 change: 1 addition & 0 deletions Libraries/Core/Devtools/openFileInEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
const getDevServer = require('./getDevServer');

function openFileInEditor(file: string, lineNumber: number) {
// $FlowFixMe[unused-promise]
fetch(getDevServer().url + 'open-stack-frame', {
method: 'POST',
headers: {
Expand Down
1 change: 1 addition & 0 deletions Libraries/Core/Devtools/openURLInBrowser.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
const getDevServer = require('./getDevServer');

function openURLInBrowser(url: string) {
// $FlowFixMe[unused-promise]
fetch(getDevServer().url + 'open-url', {
method: 'POST',
body: JSON.stringify({url}),
Expand Down
1 change: 1 addition & 0 deletions Libraries/LogBox/UI/LogBoxMessage.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ function TappableLinks(props: {
fragments.push(
<Text
onPress={() => {
// $FlowFixMe[unused-promise]
Linking.openURL(link);
}}
key={++indexCounter}
Expand Down
1 change: 1 addition & 0 deletions Libraries/ReactNative/AppRegistry.js
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,7 @@ const AppRegistry = {
NativeHeadlessJsTaskSupport &&
reason instanceof HeadlessJsTaskError
) {
// $FlowFixMe[unused-promise]
NativeHeadlessJsTaskSupport.notifyTaskRetry(taskId).then(
retryPosted => {
if (!retryPosted) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
"yargs": "^17.6.2"
},
"devDependencies": {
"flow-bin": "^0.200.0",
"flow-bin": "^0.201.0",
"hermes-eslint": "0.8.0",
"mock-fs": "^5.1.4",
"react": "18.2.0",
Expand Down
1 change: 1 addition & 0 deletions packages/hermes-inspector-msggen/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,4 +248,5 @@ async function main(): Promise<void> {
iw.write();
}

// $FlowFixMe[unused-promise]
main();
2 changes: 1 addition & 1 deletion repo-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-native": "^4.0.0",
"eslint-plugin-relay": "^1.8.3",
"flow-bin": "^0.200.0",
"flow-bin": "^0.201.0",
"inquirer": "^7.1.0",
"jest": "^29.2.1",
"jest-junit": "^10.0.0",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4550,10 +4550,10 @@ flatted@^3.1.0:
resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.2.tgz#64bfed5cb68fe3ca78b3eb214ad97b63bedce561"
integrity sha512-JaTY/wtrcSyvXJl4IMFHPKyFur1sE9AUqc0QnhOaJ0CxHtAoIV8pYDzeEfAaNEtGkOfq4gr3LBFmdXW5mOQFnA==

flow-bin@^0.200.0:
version "0.200.0"
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.200.0.tgz#bae10e7454aca131f72f084f64371f5098c5be07"
integrity sha512-4KquALYPkCCTCZ43GIqTDZDOf4znU3/kXsigpiwwORV8l/ctqwvKkqCOhjqvGy5DtbiL6WTPBqLwGAlxeGeNIA==
flow-bin@^0.201.0:
version "0.201.0"
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.201.0.tgz#bc8d7c3687526313d7a24dd920873a0273148d81"
integrity sha512-fqx6CMOhX9Xm4mN+tq/c7sqcm8aHFV1ipbLz2ZCzoNcPuUNZPoSVYm4p0qZqH0HyzMMEP1OWlU7dIkuSJ02cpg==

flow-enums-runtime@^0.0.5:
version "0.0.5"
Expand Down

0 comments on commit 947751f

Please sign in to comment.