Files
react-native/packages/react-native-codegen
MaeIg 26b22a6827 Remove hardcoded language from modules/index.js (#36435)
Summary:
This PR aims to remove the hardcoded language constants to use common parser instead. It is a task of https://github.com/facebook/react-native/issues/34872:
> [Codegen 89 - Assigned to MaeIg] Remove the const language variable from flow/modules/index.js and replace its usage with parser.language()
> [Codegen 90 - Assigned to MaeIg] Remove the const language variable from typescript/modules/index.js and replace its usage with parser.language()

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[Internal] [Changed] - Remove hardcoded language from modules/index.js to use common parser instead

Pull Request resolved: https://github.com/facebook/react-native/pull/36435

Test Plan:
yarn flow:
<img width="145" alt="image" src="https://user-images.githubusercontent.com/40902940/224333480-600cefd0-9dc6-4142-8e88-db20785e49e6.png">

yarn lint:
<img width="504" alt="image" src="https://user-images.githubusercontent.com/40902940/224333852-d510594f-053e-4866-8ceb-5e3e3d074bc2.png">

yarn test
<img width="383" alt="image" src="https://user-images.githubusercontent.com/40902940/224333600-8c772829-2362-4943-895d-1949a0d88918.png">

Reviewed By: cortinico

Differential Revision: D43979030

Pulled By: cipolleschi

fbshipit-source-id: 39c5b99fc628620f1831ed8c4ee531eec0e866c4
2023-03-15 07:14:26 -07:00
..
2022-02-22 02:23:02 -08:00
2020-09-29 14:39:40 -07:00

@react-native/codegen

Version

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:

  1. yarn to install the dependencies. You just need to run this once
  2. yarn jest react-native-codegen.