Files
react-native/packages/react-native-codegen
Tarun Chauhan 7b345bca55 Extract module/errors into a shared file (#34896)
Summary:
This PR reduces code duplication by extracting all the errors in the module/errors into a single parsers/errors.js file. All the errors must drop the corresponding Flow or Typescript token in the name and take an extra language parameter in the constructor. Also, rename the hasteModuleName parameter to nativeModuleName.

Part of https://github.com/facebook/react-native/issues/34872

## 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] - Extract all the parsers errors in the module/errors into a single parsers/errors.js file

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

Test Plan:
run ```yarn jest react-native-codegen``` and check all test case passes.

<img width="793" alt="image" src="https://user-images.githubusercontent.com/34857453/194545577-cf2d980b-b6b7-4f93-b13e-2e45d92dceab.png">

Reviewed By: rshest

Differential Revision: D40176486

Pulled By: rshest

fbshipit-source-id: b33ae49b2bcceeffd307370ee5e3b24a9e1bb340
2022-10-10 04:20:22 -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.