-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
upgrade dev tools to flow 0.241 and fix sample app
Summary: Problem: the Relay repo is in flow `0.241` while the devtools are in `0.113.0` this means that if we use relay 17 in this project we will get a bunch of flow errors. Additionally, all the nice features for react like component syntax and hook syntax are missing. To fix this I'm doing a least effort upgrade, fixing easy and repeatable patterns first and using `$FlowFixMe` for the rest. Changes: 1. Explicit return types: used the codemods in this [note](https://medium.com/flow-type/local-type-inference-for-flow-aaa65d071347) and manually added the react component return types. For context, portal and fragments I just used FlowFixMe 2. Using objects as maps: Devtools uses objects as maps extensively, replaced those with FlowFixMe and we can move them to proper maps iteratively. 3. Bridge: Bridge had input and output types inferred, but they aren't used. Replaced with any. 4. Removed dead files: `Observable.js`, `isPromise.js` aren't required and had lots of errors, removing them was easier than upgrading. It's a massive diff, but most changes are `FlowFixMe`'s. To fix the sample app, I stringyfied and and parsed the store in the dev backend. We already do this for the chrome extension. Reviewed By: tyao1 Differential Revision: D60495796 fbshipit-source-id: f5ddd5220015cb25adbf6c0fc3d84d8583118a39
- Loading branch information
1 parent
d76af9a
commit b784ca0
Showing
68 changed files
with
785 additions
and
1,453 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.