Commit Graph

4 Commits

Author SHA1 Message Date
Rubén Norte 26e33a5f17 Back out "Revert D52919566: [RN] Move codegen root directory from Libraries to src"
Summary:
Changelog: [internal]

bypass-github-export-checks

Reviewed By: huntie

Differential Revision: D52958335

fbshipit-source-id: 24403cdae650fdd4ec0c739b912f69bd6cd5aaad
2024-01-22 09:47:08 -08:00
Himanshi Goyal 692f7275bc Revert D52919566: Move codegen root directory from Libraries to src
Differential Revision:
D52919566

Original commit changeset: 6de8a2d2b607

Original Phabricator Diff: D52919566

fbshipit-source-id: dc25ec0072b436c2b61bc36bd70c8ea12ab2b5c0
2024-01-22 06:53:20 -08:00
Rubén Norte 5e8ce6ca5e Move codegen root directory from Libraries to src (#42402)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/42402

Now that we have 2 top level directories for JS files in the `react-native` package, we need to choose where to put the native module and native component specs, because our current infra only supports a single directory.

The options we had are:
1. Keep specs in the current directory (`Libraries`). This is a problem because it encourages us to keep adding modules in this "deprecated" directory.
2. Move specs to the new `src` directory. This requires moving the current files, but from now only we can create new specs in a private directory.
3. Modify the infra to allow multiple directories. This changes the public API for something it's likely only going to be used here.

In this PR I went for option 2) because it's the most future-proof, even though it requires a little bit more work now. I created a script to automatically copy all the specs for modules and components to `src/private/specs/components` and `src/private/specs/modules`, and changed their current locations to serve as a proxy for the new location (to avoid breaking a potentially public API).

`src/private/specs` isn't meant to be their final location. We should probably still colocate native module/component specs with the rest of their code, but we can do so when we move the code from `Libraries` to `src/private`.

Changelog: [internal]

Reviewed By: cortinico

Differential Revision: D52919566

fbshipit-source-id: 6de8a2d2b6077e4f884386567721c6bd2b88a5d3
2024-01-22 04:05:20 -08:00
Ruslan Lesiutin 714b502b0c | RN Monorepo | Migrate to package (#36434)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36434

Changelog: [Internal]

This is a squashed stack of 18 commits, starting from D43202126

allow-large-files

Reviewed By: cortinico

Differential Revision: D43977381

fbshipit-source-id: 0da552ddb85f2f61a0be0ef071915b35f3f8555c
2023-03-17 05:03:25 -07:00