Page MenuHomePhabricator

[native] [10/40] RN 0.70: Flow update
ClosedPublic

Authored by ashoat on Dec 17 2022, 7:53 PM.
Tags
None
Referenced Files
F3243880: D5904.id19494.diff
Thu, Nov 14, 9:45 AM
Unknown Object (File)
Tue, Nov 12, 11:22 AM
Unknown Object (File)
Sun, Nov 10, 5:55 PM
Unknown Object (File)
Sun, Nov 10, 7:31 AM
Unknown Object (File)
Mon, Nov 4, 9:49 PM
Unknown Object (File)
Mon, Nov 4, 8:24 AM
Unknown Object (File)
Mon, Nov 4, 8:24 AM
Unknown Object (File)
Sat, Nov 2, 3:33 AM
Subscribers

Details

Summary

The .flowconfig and package.json changes come from React Native Upgrade Helper. The rest fix Flow errors uncovered by the update.

Historically I've split up Flow changes for a React Native upgrade, but this time there weren't too many!

Depends on D5903

Test Plan

Ran flow and also tested along with whole stack: test plan

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.Dec 17 2022, 7:53 PM
Harbormaster failed remote builds in B14233: Diff 19467!
native/.flowconfig
8

Had to add this

native/calendar/calendar.react.js
200

Flow errors exposed that we were doing this wrong

native/flow-typed/npm/react-native-reanimated_v2.x.x.js
38

Flow didn't like that I was "shadowing" other names on line 487, so I had to change this

native/navigation/disconnected-bar.react.js
29

Flow caught a bug here!

native/navigation/tab-bar.react.js
23

And here!

patches/react-native-firebase+5.6.0.patch
270–273

We had this hack here before to trick Flow into not giving errors, but it's actually not typed correctly. I fixed the type up to actually be correct this time

Please ignore CI until the end of the stack

Fix new Flow error in web/electron.js

tomek added inline comments.
native/media/file-utils.js
158–162 ↗(On Diff #19616)

I'm fine with this new version, but just curious: was it required by a new version of Flow?

This revision is now accepted and ready to land.Dec 19 2022, 8:56 AM
native/media/file-utils.js
158–162 ↗(On Diff #19616)

Yes it was. Flow was afraid that the console.log might have some side effect and so newLocalURI could become falsey somehow

This revision was landed with ongoing or failed builds.Dec 20 2022, 12:00 PM
This revision was automatically updated to reflect the committed changes.