mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
24efebf83d
Summary: This PR is a task from https://github.com/facebook/react-native/issues/34872 _Extract the modules/utils.js from the flow and typescript folders in a shared parsers-commons.js file. Then, have the two parsers use the same wrapModuleSchema function for modules._ (`wrapModuleSchema` is a copy-paste mistake, in this case it is `wrapNullable` and `unwrapNullable`) ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [Internal] [Changed] - Extracts Codegen's modules/utils.js files from the flow and typescript folders in parsers-commons Pull Request resolved: https://github.com/facebook/react-native/pull/34898 Test Plan: I ran `yarn jest react-native-codegen`: <img width="775" alt="Capture d’écran 2022-10-07 à 21 29 48" src="https://user-images.githubusercontent.com/17070498/194639515-a446c2cf-daf3-43a1-9833-cd546ca5865e.png"> Reviewed By: cipolleschi Differential Revision: D40193740 Pulled By: cipolleschi fbshipit-source-id: 02cbacc215fe5dd9bdd0839d8796587ab2821906
react-native-codegen
Installation
yarn add --dev react-native-codegen
Note: We're using yarn to install deps. Feel free to change commands to use npm 3+ and npx if you like
Testing
To run the tests in this package, run the following commands from the react Native root folder:
yarnto install the dependencies. You just need to run this onceyarn jest react-native-codegen.