Граф коммитов

839 Коммитов

Автор SHA1 Сообщение Дата
Luna Wei be348528e6 Delete validation in set-rn-version (#37814)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37814

Changelog: [Internal] - deleting file validation, do we need this?

Reviewed By: NickGerleman

Differential Revision: D46584771

fbshipit-source-id: 69a8853872b2b1582318a2e65d9919e2b50b2475
2023-06-14 07:44:51 -07:00
Luna Wei 31eb235a6a Fix set-rn-version (#37854)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37854

Changelog: [Internal] - Fix `saveFiles` in set-rn-version, incorrect function invoke

Reviewed By: NickGerleman

Differential Revision: D46582168

fbshipit-source-id: 944e182a88a1aa79bbf47d36ef8395c21dfefb24
2023-06-14 07:44:51 -07:00
Luna Wei d631e0d9e9 test-e2e-local dont launch emulator if device connected (#37862)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37862

Changelog: [Internal] - Don't launch android emulator if you already have a device connected.

Reviewed By: cortinico

Differential Revision: D46688735

fbshipit-source-id: 1256792f96ef6989465e7cbe43385469502b46fe
2023-06-13 13:28:12 -07:00
Luna Wei e82bb7beb5 rn-ci-e2e-test CircleCI using wrong parameters (#37852)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37852

Changelog: [Internal] - rn-ci-e2e-test is running on CircleCI but has been passing in the wrong parameter with `--version` -- which didn't evaluate the script, it would early exit as `--version` is a reserved parameter in yargs.

You can see if you do `node scripts/set-rn-version.js --help`

When I fixed this [here](https://www.internalfb.com/diff/D46511840?dst_version_fbid=827076485041949&transaction_fbid=625055476222975), forgot to pass `build-type` parameter

This will fix the broken testjs e2e builds here: https://app.circleci.com/pipelines/github/facebook/react-native/25703/workflows/11a41ba1-c731-44e4-b515-a8b209ae0848/jobs/732035

Reviewed By: rshest

Differential Revision: D46672741

fbshipit-source-id: 4a189127e4d0545192a03c1e7abc995dff6f83ae
2023-06-13 07:32:13 -07:00
Facebook Community Bot 2eba6ab5ac
Re-sync with internal repository (#37831)
Co-authored-by: Facebook Community Bot <6422482+facebook-github-bot@users.noreply.github.com>
2023-06-12 17:34:52 -04:00
Luna Wei 7bcff07f13 Refactor nightly monorepo publish script (#37707)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37707

Changelog: [Internal] - Refactor nightly monorepo publish script to also return a map of packages and their current nightly version and rename to reflect. This may refer to a nightly version that was just published (if we detect changes) or the nightly tag on npm if no changes.

In subsequent diffs, will update the react-native nightly script to use this map to set the versions for nightly react-native versions.

Reviewed By: hoxyq

Differential Revision: D46450703

fbshipit-source-id: c4e425924aa6cfdcf10e932e1b151ba05d9b7237
2023-06-09 09:20:08 -07:00
Luna Wei cf27e246ce Fix rm (#37706)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37706

Changelog: [Internal] Fix wrong usage of shelljs `rm`

Reviewed By: NickGerleman

Differential Revision: D46450762

fbshipit-source-id: 9e519222642421b596827675af38f643fa84c9f7
2023-06-05 23:25:18 -07:00
Luna Wei fd9e295bef Publish nightly monorepo packages (#37556)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37556

Changelog: [Internal]

Before making this change, we need to publish `nightly` versions of all existing monorepo dependencies.

Reviewed By: hoxyq

Differential Revision: D46117197

fbshipit-source-id: bcf6364e068579e63ca19e8161dcd32de4353e56
2023-06-02 17:40:52 -07:00
Saad Najmi 594cf1f647 Delete stale file `generatedComponentApiDocs.js` (#37053)
Summary:
I noticed this file was 4 years old in both React Native and React Native macOS, and figured it was safe to delete  ¯\_(ツ)_/¯

Note from Eli: I wrote this thing years ago to see if we could generate docs based on our components. Never moved forward, lets delete it.

## Changelog:

[INTERNAL] [REMOVED] - Remove stale generated doc file

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

Test Plan: N/A

Reviewed By: yungsters

Differential Revision: D46231152

Pulled By: TheSavior

fbshipit-source-id: c36a26ae7d7526305f73f1bd63f9d7223889e109
2023-05-28 16:20:02 -07:00
Riccardo Cipolleschi bdeb09bada Re-enable iOS integration tests (#37571)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37571

During the RC.0 of 0.72, we disabled the iOS integration tests because they were not working with Metro and the new Monorepo setup.

This change tries to re-enable them so we can be more protected in CI

## Changelog:
[internal] - Re-enable integration tests

Reviewed By: cortinico

Differential Revision: D46178840

fbshipit-source-id: a5239fa7067b8fb68d997dd0cc63b67fb54d2d7e
2023-05-25 06:28:29 -07:00
Luna Wei 7819fef988 Refactor to npm-utils (#37555)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37555

Changelog: [Internal] Refactor some npm commands and centralize in npm-utils.

For now, centralize `getPackageVersionStrByTag` and `publishPackage` and update:
1. `publish-npm` to use utilities. This is how we publish `react-native` for commitlies, releases, and nightlies
2. Update `find-and-publish-all-bumped-packages.js` where we publish our monorepo dependencies

Reviewed By: cortinico, hoxyq

Differential Revision: D46131120

fbshipit-source-id: e6020058eb94b4f8d95068b8cd87cc765711be5b
2023-05-24 14:42:54 -07:00
Luna Wei b23cf101f7 Refactor set-rn-version and add tests (#37291)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37291

Changelog: [Internal] Add tests for `rn-set-version` script and refactor for clarity

Reviewed By: NickGerleman

Differential Revision: D45248915

fbshipit-source-id: f6b8566d553d0954647ba81c55767fab6a2caf1c
2023-05-16 16:44:34 -07:00
Luna Wei d24f568c6f Update nightly versioning of react-native (#37028)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37028

Changelog: [Internal] - Update nightly versions of react-native

Reviewed By: hoxyq

Differential Revision: D45192008

fbshipit-source-id: d3626c676906f996bc38f8cb156261b7ae202c2a
2023-05-05 14:48:29 -07:00
Luna Wei 03a4de9a46 Refactor publish-npm (#37030)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37030

Changelog: [Internal] - Refactor publish-npm logic so its easier to follow

Reviewed By: hoxyq

Differential Revision: D45172195

fbshipit-source-id: 23aa109db17d42f43c348e122a3c2a1974aa61e4
2023-04-25 10:13:34 -07:00
Luna Wei 7b62bcbf9d Tests for publish-npm (#37029)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37029

Changelog: [Internal] - Add tests to publish-npm

Reviewed By: hoxyq

Differential Revision: D45171640

fbshipit-source-id: b70bb478ae6b08891f1e82088bb0e07d5d68b4e5
2023-04-25 10:13:34 -07:00
Nicola Corti 7d7f48da41 Remove Buck OSS 1 setup. (#36900)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36900

This commit effectively removes all the Buck 1 OSS infra code we do have inside
React Native as we'll need to rework most of it once we move to Buck 2

Changelog:
[Internal] [Changed] - Remove Buck OSS 1 setup

Reviewed By: mdvacca, cipolleschi

Differential Revision: D44956134

fbshipit-source-id: c0ad1914286c428480248658c4282df5477bba2b
2023-04-13 13:19:24 -07:00
Lorenzo Sciandra caa3fd83a6 fix(e2e script): fix the script post monorepo & metro-config work (#36836)
Summary:
Just backporting to main a couple of fixes we've done in the 0.72 branch plus removing the old bash script to avoid confusion (since now it's more broken than ever)

## 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] [FIXED] - fix the local e2e script post monorepo & metro-config work

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

Test Plan:
Run `yarn test-e2e-local` successfully, both for RNTester & RNTestProject scenarios.

Here's a screenshot if RNTestProject working successfully:
<img width="1501" alt="Screenshot 2023-04-06 at 14 20 54" src="https://user-images.githubusercontent.com/16104054/230394301-49ea5752-27ad-4800-b56e-004fd88e9c44.png">

Reviewed By: rshest

Differential Revision: D44748037

Pulled By: cipolleschi

fbshipit-source-id: d00438bd766e8f228120f7bbceef2013cf9c966f
2023-04-06 08:01:54 -07:00
Nicola Corti 01100a2fc8 Rename cleanAll to clean and refine it (#36832)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36832

We used to use `cleanAll` instead of `clean` to do cleaning of everything due to a bug on AGP on how clean was performed.
The bug is resolved, so we can now use `clean` properly.
Moreover, we have sporadic failures when the codegen/lib/ folder is not cleaned up. This fixes it.

Changelog:
[Internal] [Changed] - Rename cleanAll to clean and refine it

Reviewed By: cipolleschi

Differential Revision: D44745849

fbshipit-source-id: 4da5d34bcb0ee5c9f6b0e0f4e5b919bcc3171270
2023-04-06 05:54:15 -07:00
Zihan Chen (MSFT) 9bb71650c9 Add `@react-native/codegen-typescript-test` to verify .d.ts files in `@react-native/codegen` (1) (#36562)
Summary:
- Add a typescript project to test `CodegenSchema.d.ts`. More tests for other .d.ts files will be added in future pull requests.
- The build script scans all snapshots from `react-native/codegen`'s typescript frontend and generates .ts files for each snapshot, but they are .gitignore-ed.
- `npm run build` will build these .ts files against `CodegenSchema.d.ts` after generating them.
- A failed jest case is included to ensure CI catch it, it will be removed before merged.

bypass-github-export-checks

## Changelog:

[General] [Added] - Add react-native/codegen-typescript-test to verify .d.ts files in react-native/codegen (1)

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

Test Plan:
`npm run build` in `packages/react-native-codegen-typescript-test` and see all test files appear in `__generated__`.

## Screenshot

![Untitled](https://user-images.githubusercontent.com/53799235/226757755-cab4cb29-7d22-46a1-9ecb-d6732122ed38.png)

Reviewed By: rshest

Differential Revision: D44292277

Pulled By: cipolleschi

fbshipit-source-id: 8d79fe913f9563d64c92aae7c4f4e97a24ae9a21
2023-04-05 07:38:25 -07:00
Nicola Corti d1174535f7 Remove the update-ruby script as it's now unnecessary (#36802)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36802

As we now support a broader range of ruby version, we don't need `update-ruby.sh` anymore
and we also don't need to call it during the set-rn-version script.

Changelog:
[Internal] [Changed] - Remove the update-ruby script as it's now unnecessary

Reviewed By: cipolleschi

Differential Revision: D44670361

fbshipit-source-id: b23abab28ccbd27408e4d76670101faeb463bc6b
2023-04-05 03:50:40 -07:00
Dmitry Rykun fdbc89d10b Re-land "[react-native][PR] [Upstream][Security] Use `execFileSync` over `exec` for cases with uncontrolled absolute paths" (#36791)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36791

This is a re-land of D44635949. It was reverted as it was a suspected cause of CircleCI fails. It turned out the diff was unrelated, and the cause was something else.

## Changelog
[Internal][Security] - Use execFileSync over exec for cases with uncontrolled absolute paths

Reviewed By: cortinico

Differential Revision: D44663132

fbshipit-source-id: dfb3d09dbfbe3312ef54bcbbc43c8b4062d787a8
2023-04-04 15:17:44 -07:00
Phillip Pan bece6500f7 Back out "Use `execFileSync` over `exec` for cases with uncontrolled absolute paths" (#36780)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36780

Original commit changeset: 8e0ebb070768

Original Phabricator Diff: D44131032

Changelog: [Internal]

all the circleCI template tests started failing after this commit, revert!

Reviewed By: jacdebug, cortinico

Differential Revision: D44635949

fbshipit-source-id: 429167acdbee3ebf6d81491ac65896c534c18fd0
2023-04-03 14:14:09 -07:00
Saad Najmi dc289737a8 Use `execFileSync` over `exec` for cases with uncontrolled absolute paths (#36491)
Summary:
In our fork React Native macOS, we run [Github's CodeQL ](https://codeql.github.com) to analyze for vulnerabilities. One common one that comes up is the use of `exec` with an uncontrolled absolute path (Example: https://github.com/microsoft/react-native-macos/security/code-scanning/14). The very simple fix to this is to replace calls to `exec` with `execFileSync`, which more or less does the same thing (but more securely!).

## Changelog

[INTERNAL] [SECURITY] - Use `execFileSync` over `exec` for cases with uncontrolled absolute paths

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

Test Plan: CI should pass

Reviewed By: cipolleschi

Differential Revision: D44131032

Pulled By: dmytrorykun

fbshipit-source-id: 8e0ebb07076838216f878f802ec937d2df44f33a
2023-04-03 08:32:30 -07:00
Riccardo Cipolleschi cb88e75cf1 Fix Cocoapods for Xcode 14.3.0 (#36759)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36759

On Thursday the 30th, Apple Released Xcode 14.3.0.
This Version of Xcode enforce some version checks for which React-Codegen, which supported iOS 11 as minimum supported version, could not be build anymore.

This change ensue that React-Codegen is always aligned to the min version supported by React Native.
Plus, it moves CircleCI's Xcode to 14.3.0, to keep this problem in Check.

While working on this, I figured that, with the monorepo, Ruby tests stopped working because they were in the wrong folder: I moved them in the right one.

## Changelog:
[iOS][Fixed] - Make React Native build with Xcode 14.3.0 and fix tests

Reviewed By: blakef

Differential Revision: D44605617

fbshipit-source-id: 3ec1f5b36858ef07d9f713d74eb411a1edcccd45
2023-04-02 03:32:15 -07:00
fortmarek 0328a8d26b Use packaged react-native in test-e2e-local script (#36703)
Summary:
The current `test-e2e-local` script had two bugs:
- On [this](c1c22ebacc/scripts/test-e2e-local.js (L219)) line we were initializing a new RN project with the packed `react-native` created [here](c1c22ebacc/scripts/test-e2e-local.js (L211))
- We were updating the local RN version after running `npm pack` [here](c1c22ebacc/scripts/test-e2e-local.js (L214)). This meant that the version inside the packaged `react-native-xyz.tgz` was not updated since we ran `pack` before updating it. This was fine since the `init` command was using the local `react-native` repository instead of the packed version.

## Changelog:

[INTERNAL] [FIXED] - Use packaged react-native in test-e2e-local script
<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[INTERNAL] [FIXED] - Use packaged react-native in test-e2e-local script

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

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

Test Plan:
- Run `yarn test-e2e-local -t RNTestProject -p Android`. The command should succeed.

I am not completely sure how to double check that we are using the packed version. Locally, I have a `fsmonitor--daemon.ipc` in my `react-native/.git` that can't be copied. The `.git` folder would be copied only when `cli.js init` was called with the whole repository  – which is how I found out about the issue in the first place.

Reviewed By: hoxyq

Differential Revision: D44504599

Pulled By: cipolleschi

fbshipit-source-id: e57e2858bab46d4f978eed3cbaf3e504138594b8
2023-03-29 10:21:44 -07:00
Alex Hunt 32e836dd8b Fix paths in objc-test.sh, temporarily exclude /IntegrationTests (#36648)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36648

Changelog: [Internal]

Blocker for https://github.com/facebook/react-native/pull/36623. The `test-ios` job in CI was misconfigured following the monorepo migration — and this becomes load-bearing with the incoming version of React Native CLI.

- Update `objc-test.sh` to run in `packages/rn-tester`, and exclude tests under `/IntegrationTests` which are outside of a Metro project directory.
    - **This is temporary** — a task has been created to move/split up/otherwise restore tests in `IntegrationTests`, which cipolleschi is following up (thanks!).
- Also fix `yarn start` script in `packages/rn-tester`.

Reviewed By: cipolleschi

Differential Revision: D44416533

fbshipit-source-id: 59c5b743d9d8fda206a12e37d94324ed9bfd703e
2023-03-27 11:21:56 -07:00
Ruslan Lesiutin 04df252aa7 RN [refactor]: bump and realign package versions by running a single script (#36568)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36568

Changelog: [Internal]

Okay, so before the monorepo migration we had to use two scripts separately:
1. Bumping every package with `npm run bump-all-updated-packages`
2. Aligning other packages versions with `npm run align-package-versions`

The reason for it is that *before the monorepo* in a release branch cutoff process we had a step, which was removing `workspaces` keyword from `react-native` package. Without this keyword all new versions of packages will be resolved from npm (where they will be not available yet, because we have to publish them prior to it)

This is not the case for our current setup, and we can actually bump packages versions and they will be resolved as a workspaces successfully

Reviewed By: cortinico, cipolleschi

Differential Revision: D44261057

fbshipit-source-id: 31c2157be2d3b33bc073651d6045efcef2e8f5c5
2023-03-27 07:31:45 -07:00
Lorenzo Sciandra b312562f9a chore(e2e local script): fix e2e local script post monorepo refactoring (#36558)
Summary:
A quick fix for the local e2e script, a path needed to be updated.

## 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] [FIXED] -  fix e2e local script post monorepo refactoring

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

Test Plan: Run it locally.

Reviewed By: cortinico, cipolleschi

Differential Revision: D44257019

Pulled By: hoxyq

fbshipit-source-id: 29c4d4d103b5a041ef241cd371f31a1fc41d0396
2023-03-22 06:34:20 -07:00
Ruslan Lesiutin 9b6aaa731d RN [fix]: update template location in align-package-versions.js script
Summary: Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D44218613

fbshipit-source-id: 505962b500821252679084a44e7d92e52c6fbf49
2023-03-20 15:41:42 -07:00
Ruslan Lesiutin 9a711e2fd5 RN [fix]: fixed cwd for in publish-npm script
Summary:
Changelog: [Internal]

Accidentally trying to publish from root folders, was missed in monorepo changes initially

Reviewed By: cortinico

Differential Revision: D44217992

fbshipit-source-id: dc7c5728929429cece0edada55f525f100451d2f
2023-03-20 08:44:43 -07:00
Ruslan Lesiutin 4b6b706680 Update paths in a new setup to fix nightlies (#36535)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36535

Changelog: [Internal]

- We should be copying `/packages/react-native/package.json`, not root `package.json`
- Updating CircleCI config's target directory where hermes artifacts should be copied

Reviewed By: cortinico

Differential Revision: D44214309

fbshipit-source-id: af84897df3931c6a2d6a902b33c71b665c3fcefc
2023-03-20 07:05:52 -07:00
Ruslan Lesiutin c35675bbe0 fix[align-package-version]: fixed updating application dependencies for react-native package (#36534)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36534

Changelog: [Internal]

- Added option to include react-native package in forEachPackage func
- Used this in align-package-versions.js

Reviewed By: cortinico

Differential Revision: D44152939

fbshipit-source-id: da173e78945d8185ae7e35e29d08926de1700fa4
2023-03-20 07:05:52 -07:00
Rob Hogan 96789004b6 Fix reference to old `template/package.json` path
Summary:
Nightly builds are broken at the moment - at least in the first instance this looks to be because a reference to `template/package.json` was missed in the monorepo PR. This repairs it.

Changelog: [Internal]

Reviewed By: GijsWeterings

Differential Revision: D44205810

fbshipit-source-id: c810b7a211db7162569a67fca26771fce79d4f9d
2023-03-19 18:06:33 -07: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
Riccardo Cipolleschi 21d530208f Extracting Platform Specific TM code to break dependency cycle between ReactCommon and React-Core (#36461)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36461

This change breaks a dependency cycle between `ReactCommon` and `React-Core`.

`React-Core` depends on `ReactCommon` to have access to the various `TurboModule` native files.

`ReactCommon` depends on `React-Core` because the content of the `core/platform/ios` folder and the `samples` folder needs to access the `RCTBridge` and other files in Core.

To break the circular dependency, we introduced two new `podspecs`:

* `React-NativeModulesApple` for the content of `core/platform/ios`.
* `ReactCommon-Samples` for the content of the `samples` folder.

In this way, the new dependencies are linear as `React-NativeModulesApple` and `ReactCommon-Samples` depends on `React-Core` and `ReactCommon` and `React-Core` only depends on  `ReactCommon`.

While doing this, we also make sure that all the include path are aligned, to limit the amount of breaking changes.

## Changelog:
[iOS][Breaking] - Split the `ReactCommon/react/nativemodule/core/platform/ios` and `ReactCommon/react/nativemodule/samples` in two separate pods to break circular dependencies.

Reviewed By: mdvacca

Differential Revision: D44023865

fbshipit-source-id: a97569506350db5735ac5534b1592471de196cbe
2023-03-14 05:31:16 -07:00
Ruslan Lesiutin 8d8b44a5e3 Add option to commit with generic message (#36421)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36421

Changelog: [Internal]

Adding an extra choice for commit question, user can now choose between three options:
1. Commit with generic message, no further actions needed
2. Commit with custom message, intercative VIM input will open
3. Not committing anything

Reviewed By: cortinico

Differential Revision: D43943526

fbshipit-source-id: 014215105d192961486b7d1c697f491697492812
2023-03-09 09:19:17 -08:00
Riccardo Cipolleschi a055e07c3e Use the new CLI properties for codegen the legacy components
Summary:
This change updates the way in which we consume the list of components from the `react-native.config.js` files so that it is aligned to what Android does.

## Changelog:
[iOS][Changed] - Update how the `react-native.config.js` is consumed to add elements in the interop layer.

Reviewed By: cortinico

Differential Revision: D43875395

fbshipit-source-id: e359c98a9144f4efe62967096d48318491718958
2023-03-08 02:28:32 -08:00
Riccardo Cipolleschi aac71507fa Add tests with more recent Rubies (#36376)
Summary:
This change add more tests for iOS, using different versions of Ruby

## Changelog
[iOS][Added] - Added smoke tests for iOS with Ruby 2.7.7 and 3.2.0

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

Test Plan: CircleCI must be green.

Reviewed By: blakef

Differential Revision: D43825344

Pulled By: cipolleschi

fbshipit-source-id: 8d3f5a2d9688f4d58f0ad5573d7b21e059cab523
2023-03-06 02:56:26 -08:00
Riccardo Cipolleschi e4257a4dfb Attach a script to React-RCTAppDelegate to register Legacy Components in the interop layer (#36335)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36335

This change depends on [this PR](https://github.com/react-native-community/cli/pull/1849) of the CLI that introduces the `unstable_reactLegacyComponent` field in the `react-native.config.js` file.

This change introduce a JS script that reads that fields and generated a method in an object to return a list of components to be registered. The `RCTAppDelegate` has been updated to read those components and to automatically register them into the interop layer.

Notice that a user can just update the `react-native.config.js` and rebuild the app to integrate these changes, there is no need to reinstall the pods.

The idea behind this logic is to let the user know which components they are using with the interop layer, rather than rely on some black magic that could leave them blind to the need of actually migrate their apps.

## Changelog:
[iOS][Changed] - Implement mechanism to register legacy components in the iOS Fabric interop layer

Reviewed By: cortinico, dmytrorykun

Differential Revision: D43665973

fbshipit-source-id: b4e8d71fa1bbed7a6130ee4f83a6221394d5306e
2023-03-03 14:44:57 -08:00
Ruslan Lesiutin b72dc7f2c4 fix: update publishing packages tag message prefix (#36348)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36348

Changelog: [Internal]

Turns out that Phabricator strips `@` symbol from `@...` tags when exports commits to GitHub. Proposing to use `#` instead.

#publish-packages-to-npm

Reviewed By: cortinico

Differential Revision: D43712415

fbshipit-source-id: 86fc728eb0cb63afb6a9fe592a9ae998da2ce2e4
2023-03-02 03:55:51 -08:00
Riccardo Cipolleschi dce9d8d5de Prepare cocoapods to accept the ENABLE_HERMES_PROFILER flag (#36352)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36352

WIP

## Changelog:
[iOS][Changed] - Add support to enable the Hermes Sampling Profiler

Reviewed By: mdvacca

Differential Revision: D43699036

fbshipit-source-id: 9da5aed94541e09c705909fb7166623c36ce2a3e
2023-03-02 03:06:14 -08:00
Riccardo Cipolleschi 0f56cee8e1 Update Gemfile to require Cocoapods 1.12.0 (#36321)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36321

This change bumps Cocoapods to 1.12.0. This last release fixes a bug for which cocoapods was not working with Ruby 3.2.0

## Changelog
[iOS][Changed] - Bumbed version of Cocoapods to support Ruby 3.2.0

Reviewed By: blakef

Differential Revision: D43655787

fbshipit-source-id: 6954ac8271daa7894e57f6d6104ed4d549490695
2023-02-28 07:14:02 -08:00
Lorenzo Sciandra 5112bc5dbc chore(dependencies): bump CLI to 11 alpha2 and metro to 0.75.1 (#36271)
Summary:
Ahead of cut of RN 0.72, I'm upgrading CLI and Metro according to https://github.com/react-native-community/cli/releases/tag/v11.0.0-alpha.2

~While working on it, I noticed that run-ios has some changes that make the e2e test script not work super well, so I'll be checking in with the CLI team to figure out what's wrong. Let's not merge it until that's address it. (also, there's already a bump for Metro that we need 8d18baef55 so I'll probably change the version to latest CLI and Metro once more)~ (all addressed)

## 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
-->

[GENERAL] [CHANGED] - bump CLI to 11 alphav2 and metro to 0.75.1

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

Test Plan: Test CI, and locally I've used the e2e test script to ensure everything still works.

Reviewed By: NickGerleman

Differential Revision: D43625952

Pulled By: cipolleschi

fbshipit-source-id: dad940b65c56a586ae82acc2e7c16a918b872ee5
2023-02-28 03:18:06 -08:00
Riccardo Cipolleschi ad686b0ce1 Reduce breaking changes in use_frameworks! (#36305)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36305

This change automate settings some search paths for 3rd parties libraries that are not using our `install_modules_dependencies` helper.

This will make the `use_frameworks!` changes less breaking.

## Changelog:
[iOS][Changed] - Automatically update Search Path on pods

Reviewed By: dmytrorykun

Differential Revision: D43596808

fbshipit-source-id: 9c5d7ff60a1e4cf73afbfd70b2499f03825cd764
2023-02-27 06:47:46 -08:00
Riccardo Cipolleschi e57b6d11fa Remove .ruby-version and update Gemfile to support multiple versions of Ruby (#36281)
Summary:
This Change remove the need to have a specific version of Ruby installed. We are now supporting a wider range of Ruby versions, starting from Ruby 2.6.10 (the ruby installed on MacOS by default).
We are still using a Gemfile to control the version of cocoapods that needs to be installed.

## Changelog

[IOS] [CHANGED] - Remove `.ruby-version` and update Gemfile to support a wider range of Ruby versions

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

Test Plan:
- Tested locally on RNTester and an app from template, switch across different versions of Ruby
- CircleCI is green on the commit

Reviewed By: cortinico

Differential Revision: D43567660

Pulled By: cipolleschi

fbshipit-source-id: e7edfe5806a898a83ba39cb58b1318ebde56a57c
2023-02-26 09:32:28 -08:00
Riccardo Cipolleschi 93fdcbaed0 Drop the requirement to use PRODUCTION=1 to add -NDEBUG
Summary:
The previous fix for -DNDEBUG required to install the pods with PRODUCTION=1 in order to add the flag. The flag was added also to Debug configurations, which is not ideal.

With this change, we remove the requirement of running `PRODUCTION=1 pod install` and we install the -DNDEBUG flag to all the release configurations.

## Changelog:
[iOS][Changed] - Install the -DNDEBUG flag on Release configurations, without requiring PRODUCTION=1 flag

Reviewed By: cortinico

Differential Revision: D43535620

fbshipit-source-id: af97bef06f267dddd5ce13a466bbc8d9a5eb2b0b
2023-02-24 02:05:32 -08:00
Riccardo Cipolleschi dba8cb71bd Bump Flipper to 0.182.0
Summary:
This change bumps Flipper to 0.182.0, mirroring the [Android Commit](8fae37eaea)

allow-large-files

## Changelog:
[iOS][Changed] - Bump Flipper to 0.182.0

Reviewed By: dmytrorykun

Differential Revision: D43454236

fbshipit-source-id: c852520d1e7f3a386a2fac11318a9fb6e868b520
2023-02-21 09:46:02 -08:00
Riccardo Cipolleschi 3e88fd01ce Install the RuntimeScheduler when the New Architecture is enabled (#36209)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36209

ThisChange automatically enable the RuntimeScheduler when the new architecture is enabled, both on RNester and in the Template app.

Note that no migration steps are required.

## Changelog
[iOS][Changed] - Automatically install the RuntimeScheduler

Reviewed By: sammy-SC

Differential Revision: D43392059

fbshipit-source-id: 609ded9bdc3db13a0d54ff44d0d4687dfc8617a5
2023-02-21 04:17:26 -08:00
Ruslan Lesiutin 18b402cbd0 refactor(bump-all-updated-packages): use tag instead of custom commit message (#36220)
Summary:
Having custom commit message script is not an option for `main` branch, because we have internal tooling, which strips `[x]` tags from commit messages before merging them into `main` branch.

Instead of constant commit message, we are now using a tag which will be concatenated with the commit message, which was entered via interactive commit dialog, see demo below.

## Changelog
[Internal] - updated validation in bumping packages script

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

Test Plan: https://user-images.githubusercontent.com/28902667/220163767-015bf37b-6914-4df2-84d9-aa25fb2887d3.mov

Reviewed By: cortinico

Differential Revision: D43443597

Pulled By: hoxyq

fbshipit-source-id: 08e5e08524a1d934fbb35529e025358d7bf3b203
2023-02-21 01:39:51 -08:00
Riccardo Cipolleschi e7becb06c1 Update RCTFabric to generate headers in the `React` folder when using Frameworks
Summary:
By leveraging the `PUBLIC_HEADERS_FOLDER_PATH` build settings of Xcode, we can instruct cocoapods to generate the frameworks Headers in a specific folder, for example the `React` folder.
This allows us to maintain the `#include`/`#import` structure, even if the framework has a different name.
However, we need to update the search paths to take into account this extra folder.

## Changelog:
[iOS][Changed] - Generate RCTFabric framework's headers in the React folder

Reviewed By: sammy-SC, dmytrorykun

Differential Revision: D43425677

fbshipit-source-id: 94a4f3a3c7de86341b3ce3457704e6b8fb9a588e
2023-02-20 11:50:10 -08:00