[Codegen] Extract the switch(configType) block from the buildSchema function into a new function in the parsers/utils.js file#34992
Conversation
|
Hi @cipolleschi, As requested in the task, I put I think we should consider extracting them into What do you think about it? Should I propose these tasks in the umbrella issue? |
Base commit: 3c8d678 |
Base commit: 5e6a4c5 |
cipolleschi
left a comment
There was a problem hiding this comment.
Seems very good to me and very thanks for the tests also!
Your proposal on those extra refactoring is pretty good and, eventually, we will do that and we will add them to the umbrella issue.
The wrapModuleSchema has already been refactored. The buildModuleSchema is pretty big and, IIRC, there are other PR that are working on parts of the function. I'd rather to focus on merging all the open PRs, now, to help us in figuring out what's left to do!
I hope to add some more tasks later this week. 👍
|
@MaeIg could you rebase this please? 🙏 |
… and typescript folders
It doesn't reset their implementation but clears the call history for functions. It is useful for each test to be independent when testing that a function has been called.
b1ecf99 to
df5bc7d
Compare
Done! 😃 |
|
@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
|
This pull request was successfully merged by @MaeIg in 8f484c3. When will my fix make it into a release? | Upcoming Releases |
Summary
This PR aims to extract the switch(configType) block from the buildSchema function into a separate function in a shared file between typescript and flow. It is a task of #34872:
Changelog
[Internal] [Changed] - Extract the switch(configType) block from the buildSchema function into a new function in the parsers/utils.js file
Test Plan
yarn flow:

yarn lint:

yarn jest react-native-codegen:

I added new tests:
