mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
633498fe9a
Summary: Part of https://github.com/facebook/react-native/issues/34872 > [Assigned to youedd] Extract the nameToValidate logic ([Flow](https://github.com/facebook/react-native/blob/main/packages/react-native-codegen/src/parsers/flow/modules/index.js#L704-L713), [TypeScript](https://github.com/facebook/react-native/blob/f353119113d6fc85491765ba1e90ac83cb00fd61/packages/react-native-codegen/src/parsers/typescript/modules/index.js#L738-L747)) into a shared function into the parser/utils.js file. Notice that you may need a callback to update the cxx boolean. ## 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 --> [Changed] [Internal] - refactor parser module platform verification Pull Request resolved: https://github.com/facebook/react-native/pull/34961 Test Plan: `yarn jest react-native-codegen`  Reviewed By: cipolleschi Differential Revision: D40319245 Pulled By: skinsshark fbshipit-source-id: bc36cdcfa06047e1acee0d638f5756b6462d76d1
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.