Commit Graph

1253 Commits

Author SHA1 Message Date
Riccardo Cipolleschi 07699e5838 Remove last remnant of CircleCI from npm-utils (#49202)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49202

There are some leftover references to CircleCI in these scripts. Let's remove it.

## Changelog:
[Internal] - Remove remaining CircleCI references from npm-utils scripts

Reviewed By: huntie

Differential Revision: D69182550

fbshipit-source-id: d8707abba3e01c26c8d7170522333dcbc039c19d
2025-02-05 09:55:00 -08:00
Jakub Piasecki 289bdb6b1b Enable TypeScript generation for ToastAndroid (#49095)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49095

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D68958757

fbshipit-source-id: 3e06201936e2beda4d6a0e591dcd4a619b169795
2025-02-05 08:15:17 -08:00
Jakub Piasecki 43f07ae9a5 Update common interface shadowing for type generation (#49205)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49205

Changelog: [Internal]

Updates how name shadowing works for the TS type generation prototype to align more with how Flow does it - `.js.flow` files shadow every other file with the same name, then `.js` file (if exists) is treated as the common interface.

The script still uses `.flow.js` for common interface, which will be changed in another diff.

Reviewed By: huntie

Differential Revision: D68958772

fbshipit-source-id: caa390711f2bcd7666d875703fc316d874500a0d
2025-02-05 08:15:17 -08:00
Riccardo Cipolleschi 480b2335c9 Remove circleci folder (#49121)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49121

This change removes the scripts/circleci folder and the last poll-maven script which was not used.

## Changelog:
[Internal] - Remove the circleci folder script

Reviewed By: cortinico, huntie

Differential Revision: D69047603

fbshipit-source-id: a4f1f100d71d792edf42c8d4cb6a0b8d8e7e5260
2025-02-03 14:07:07 -08:00
Riccardo Cipolleschi ae7175d0ab Move analisys scripts to .github folder (#49123)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49123

Previously, we used to have CI workflows scripts in a `react-native/scripts/circleci` folder.
Now that we are not using CircleCI anymore, we move those scripts to the `.github/workflow-scripts` folder.

## Changelog:
[Internal] - Move ci scripts to the `.github/workflow-scripts` folder

Reviewed By: cortinico, huntie

Differential Revision: D69047581

fbshipit-source-id: 6a5d8525e526cc7521d42e2be9530deb09914fdc
2025-02-03 10:02:19 -08:00
Riccardo Cipolleschi d654ae51bb Remove references from CircleCI from the release scripts (#49122)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49122

This change updates the Release testing and the release scripts by removing any reference to CircleCI

## Changelog:
[Internal] - Remove CircleCI references from Release and Release testing scripts

Reviewed By: cortinico, huntie

Differential Revision: D69047479

fbshipit-source-id: 14a394b879c03cd81a8d043036c43839a38602c7
2025-02-03 10:02:19 -08:00
Riccardo Cipolleschi 870aca62de Remove references of CircleCI from the readme (#49120)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49120

This change removes any reference of CircleCI from the READMEs in React Native

## Changelog
[Internal] - Remove CircleCI references

Reviewed By: cortinico, huntie

Differential Revision: D69047437

fbshipit-source-id: 602350372c1d869098be0c8da7cb3db2077474d8
2025-02-03 10:02:19 -08:00
Riccardo Cipolleschi 839eb44300 Remove CircleCI configuration (#49119)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49119

This change removes the .circleci folder and the workflow that we run on CircleCI

## Changelog:
[Internal] - Remove CircleCI config

Reviewed By: cortinico, huntie

Differential Revision: D69047483

fbshipit-source-id: 0020a4ff69d035e939e01079059ba2743aee55fe
2025-02-03 10:02:19 -08:00
Rubén Norte 2f27327f33 Rename src/private/specs as src/private/specs_DEPRECATED (#49068)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49068

Changelog: [internal]

Renamed directory to better signal it's deprecated and added README.md to clarify intent.

Reviewed By: huntie

Differential Revision: D68895998

fbshipit-source-id: 5bc70d0782194db27c27cc89cc402d99f11aafa4
2025-02-03 09:15:31 -08:00
Alex Hunt 4348a57503 Fix build-types script, align internal babel-register (#49133)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49133

Follow up to D68960540.

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D69053411

fbshipit-source-id: ffc8aba923aab8f4cd0d74fb61c49893ff09b6c1
2025-02-03 08:32:39 -08:00
Jakub Piasecki 8d90be814e Refactor ActionSheetIOS to better align with OSS types (#49094)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49094

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D68957719

fbshipit-source-id: 4e4738a619583000ea6fe78808d46e300428504a
2025-02-03 04:47:06 -08:00
Alex Hunt 3cf400a51b Convert build scripts to regular Flow syntax (#49103)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49103

Changelog: [Internal]

Reviewed By: j-piasecki

Differential Revision: D68960540

fbshipit-source-id: 0ac01529eaea97db98b85b6021532092997d633b
2025-02-03 03:49:23 -08:00
Alex Hunt e1575857dd Relocate babel-register script (#49102)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49102

Moves this script one level up. In the next diff, will be used to support execution of scripts themselves, as well as `packages/`.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D68960279

fbshipit-source-id: 7b62420c269dc1c1366ac9a827db078d34cb86c5
2025-02-03 03:49:23 -08:00
Alex Hunt cd78f44e58 Remove unused checkForGitChanges script (#49099)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49099

Changelog: [Internal]

Reviewed By: EdmondChuiHW

Differential Revision: D68960652

fbshipit-source-id: 138e83dfedef7ea717502a1e964eb802dae678c4
2025-01-31 09:18:31 -08:00
Alex Hunt 21541b51b3 Apply stripPrivateProperties transform to public-api-test (#49064)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49064

Update `public-api-test` to disregard all object/type members prefixed with an underscore (`_`). These are considered existing internal APIs.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D68895376

fbshipit-source-id: db581df7cc37802fa5f7d3aa4d7c07514223209a
2025-01-31 04:27:13 -08:00
Dawid Małecki 4ccb2f2aa2 Add transform that strips private properties in build types script (#49060)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49060

We want to hide private properties from JS public API interface. The stripPrivateProperties transform removes all private nodes of type ObjectTypeProperty, Property, PropertyDefinition and MethodDefinition. There is also a change in transforms reducer that incorporates `print` function from hermes-transform which modifies the code base on the transformed ast (transformed.mutatedCode seems to be a code before the transform operation).

## Changelog:
[Internal] -  Added transform that strips private properties in build-types script

Reviewed By: huntie

Differential Revision: D68892853

fbshipit-source-id: 5035fd4339aa6294d972e7aff0eb563f48d4c3d2
2025-01-31 02:02:08 -08:00
Jakub Piasecki 8058aab0d6 Ignore implementation files when .flow.js file exists during type translation (#49039)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49039

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D68774523

fbshipit-source-id: 07776e7e0d551e3bad5a30eff1de8a76769e5761
2025-01-29 05:36:53 -08:00
Jakub Piasecki df6be9f665 Use alert to test type generation prototype (#49038)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49038

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D68774524

fbshipit-source-id: 791da64babebc8d08f671262fa63f67aff2c0942
2025-01-29 05:36:53 -08:00
Alex Hunt b8ee2b3503 Add source transformation pipeline to build-types (#48893)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48893

Updates `build-types` to support source file AST transforms, and templates out an initial `stripPrivateProperties` transform.

- Also, parallelise file translation via `Promise.all`.

Changelog: [Internal]

Reviewed By: iwoplaza

Differential Revision: D68558012

fbshipit-source-id: 6eb3881fcf30bf8f4ba045522f6569fbbad14f62
2025-01-23 08:29:09 -08:00
Alex Hunt d4c1c7bfe3 Move experimental type generation into dedicated script (#48867)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48867

Also:
- Rename output dir to `types_generated/`.
- Support source patterns outside of the `react-native` package.

Changelog: [Internal]

Reviewed By: j-piasecki

Differential Revision: D68498211

fbshipit-source-id: 7f9f540efd6d3d2c70b8b1721738f3fea569641d
2025-01-23 02:39:32 -08:00
Iwo Plaza bdb5804f32 Migrated Core/ReactNativeVersion to use export syntax. (#48853)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48853

## Motivation
Modernising the react-native codebase to allow for ingestion by modern Flow tooling.

## This diff
- Updates the `ReactNativeVersion` template to use `export` syntax.
- Regenerates the `ReactNativeVersion.js` file with the new template.
- Updates jest mock.
- Updates the public API snapshot *(intented breaking change)*

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D68492723

fbshipit-source-id: daa55d3d553aca562cf2e091cd24546681a8db2f
2025-01-22 07:41:04 -08:00
Marc Rousavy f2553d39da feat: Add REACT_NATIVE_VERSION_* definitions to ReactNativeVersion.h (#48813)
Summary:
The `ReactNativeVersion.h` file currently contains a `struct` that holds the React Native version (e.g. `1000.0.0`, as individual ints).

For some libraries, we need to conditionally compile out code when using an older React Native version, and that's where library authors usually set compiler flags that hold the react native version - those are usually resolved using a `node require.resolve` script in the Podspec or build.gradle, adding unnecessary complexity.

With this PR this becomes obsolete as we now create a `#define` that holds the React Native version directly - so e.g.

```cpp
#define REACT_NATIVE_VERSION_MAJOR 0
#define REACT_NATIVE_VERSION_MINOR 67
#define REACT_NATIVE_VERSION_PATCH 1
```

..which we can then use to conditionally compile some code in our libraries:

```cpp
#include <React/ReactNativeVersion.h>
#if REACT_NATIVE_VERSION_MINOR >= 76
  // new stuff
#else
  // fallback
#endif
```

## Changelog:

[INTERNAL] [ADDED] - Added `REACT_NATIVE_VERSION_*` C++ defines to `ReactNativeVersion.h`

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

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

Test Plan: Just import the header in a library and check if the defines exist!

Reviewed By: cortinico

Differential Revision: D68441049

Pulled By: javache

fbshipit-source-id: 55ac8875e1a3f8ad8b9d12795fed4204e9c5bb77
2025-01-21 09:00:20 -08:00
Fabrizio Cucci 00c6b21ecb Build codegen CLI when running yarn test-e2e-local (#48816)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48816

Given the recent changes, the error mentioned in [this](https://fb.workplace.com/groups/1374515773430764/permalink/1406615956887412)  post can show up also when testing iOS.

So here we are building the codegen when running `yarn test-e2e-local` regardless by the platform.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D68441078

fbshipit-source-id: 9067545b61be59ec595142c2e4ba888e20d9a13a
2025-01-21 07:58:52 -08:00
Jakub Piasecki 25c0b7ff5e Bootstrap experimental types build for main package (#48661)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48661

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

Changelog: [Internal]

Reviewed By: iwoplaza

Differential Revision: D68102875

fbshipit-source-id: abb77737dc2f46d6caba0d9a4c44b26e8a595cff
2025-01-17 07:58:08 -08:00
Nicola Corti de5bccf080 Cleanup prealpha logic from the JS Publishing Scripts (#48691)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48691

We don't intent to use the prealpha logic in the near future so it makes sense to remove it for
to simplify our already complicated release process. We can always revive it if we wish.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D68206014

fbshipit-source-id: f05eeae3997d52df1127852e03437a387a01f5ad
2025-01-16 11:36:42 -08:00
Nicola Corti 1b15f57c25 No need to invoke 'input keyevent 82' on test-e2e-local (#48707)
Summary:
The testing script is making unnecessary call to `input keyevent 82` which causes the Android device to
open the menu.

## Changelog:

[Internal] [Changed] -

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

Test Plan: Tested local with local device

Reviewed By: cipolleschi

Differential Revision: D68215641

Pulled By: cortinico

fbshipit-source-id: 3e2653d8aa0c1e6606d9921f7b3794d0d27ef3f0
2025-01-16 04:11:13 -08:00
Riccardo Cipolleschi 559d070e8e Use RNTester App downloaded from CI instead of building (#48637)
Summary:
This change improves the E2E testing by downloading the iOS RNTesterApp that is built in CI instead of building it locally. This should let us save 10 to 20 minutes when we test a new release.

## Changelog:
[Internal] - Use the RNTester app built in CI for release testing on iOS

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

Test Plan:
- build the app in ci
- run `yarn test-e2e-local -c <my-token>` and `yarn test-e2e-local -h false -c <my-token>` and verify that the iOS app is not built, but run in the simulator

Reviewed By: cortinico

Differential Revision: D68161477

Pulled By: cipolleschi

fbshipit-source-id: 577d110f9ff0197a2d3348a08a60e60a4d0a752b
2025-01-15 01:04:29 -08:00
Nicola Corti a40a885d88 Fix test-e2e-local with RNTester due to unbuilt codegen (#48558)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48558

Running `yarn test-e2e-local -t "RNTester" -p "Android" -h true -c <TOKEN>`
currently fails if you start from RNTester Android.

That's because codegen is not built. This commit fixes it.

Changelog:
[Internal] [Changed] - Fix test-e2e-local with RNTester due to unbuilt codegen

Reviewed By: cipolleschi

Differential Revision: D67972074

fbshipit-source-id: c5c721a913b655675ed6e03e60efbb5ccdf613b2
2025-01-10 08:46:37 -08:00
Alex Hunt 79c7c58656 Document monorepo build setup (#48420)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48420

Adds a long overdue README for our newer monorepo build setup.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D67740763

fbshipit-source-id: 0c7686d75272acf74c0af5a1c4c08336fb45e2a2
2025-01-02 10:33:34 -08:00
Riccardo Cipolleschi 27aa28b1f5 USe the debug APK instead of the release one (#48365)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48365

For a mistake, the local E2E test we use to test a release is still pointing to the release APK instead of using the debug apk.

This change fix that. The change has been manually applied to the release branches, for example [here](https://github.com/facebook/react-native/commit/385318bf6a83b124d9e8eb925932edff02115c85)

## Changelog
[Internal] - use Debug apk instead of release one to test the release

Reviewed By: robhogan

Differential Revision: D67599760

fbshipit-source-id: 224b5b8d8f664bb579b09ee68f1b92c0774a9b5e
2024-12-23 07:46:02 -08:00
Riccardo Cipolleschi 4368368ef5 Fix some peer dependencies on React types (#48292)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48292

These dependencies are making the CI on main to fail.

## Changelog:
[General][Fixed] - Fix peer dependencies on React types

Reviewed By: javache, hoxyq

Differential Revision: D67283609

fbshipit-source-id: b325246f5de654a9ccbf7f96eec24434047a38ee
2024-12-16 14:08:19 -08:00
Blake Friedman 05b4146270 ci: verify JS build artifacts aren't committed (#48091)
Summary:
Building our JS packages dirties the repo. This makes sure we don't
accidentally commit these to the repo, as it'll break Flow tests with an
obscure error message.

Changelog: [Internal]

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

Test Plan:
Ran this locally, the GH lint action should run on this PR.
I'll intentionally add a build artifact to validate.
| A | B | C |
| - | - | - |
| ![CleanShot 2024-12-04 at 14 11 16@2x](https://github.com/user-attachments/assets/11c05c32-12c8-4d85-9a28-b3bdffb42ea0) | ![CleanShot 2024-12-04 at 14 11 22@2x](https://github.com/user-attachments/assets/b4c4f1dc-2cb9-4138-8931-13e71c015a6d) | ![CleanShot 2024-12-04 at 14 19 31@2x](https://github.com/user-attachments/assets/953bf783-57ba-4832-bbd8-b36e23a2ccb4) |

Reviewed By: cipolleschi

Differential Revision: D66760144

Pulled By: blakef

fbshipit-source-id: 81f20fa0a83d5f17b5773d1608664b683ba74409
2024-12-06 13:21:23 -08:00
Vojtech Novak 52f09276cc fix hermes param handling in test-e2e-local.js (#48068)
Summary:
why: running `yarn test-e2e-local -t "RNTestProject" -p "Android" -h false -c $GITHUB_TOKEN` would actually build the app with Hermes even though it's specified as disabled.

This is because of the `if (argv.hermes == null)` condition whose body would not execute.
The condition was changed [recently](https://github.com/facebook/react-native/commit/f322dc7a84eb72370910f6933d0a4fa7780f49bc#diff-56f57bf0eac99b0fda1b2938aceb8d9b663db82c07cb405bd53a01c8689710ffR258).

Reason for `await` being used:

```
Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ scripts/release-testing/test-e2e-local.js:303:32

Cannot get argv.hermes because property hermes is missing in Promise [1]. [prop-missing]

     scripts/release-testing/test-e2e-local.js
     300│     'reactNativeArchitectures=arm64-v8a',
     301│     'android/gradle.properties',
     302│   );
     303│   const hermesEnabled = (argv).hermes === true;
     304│
     305│   // Update gradle properties to set Hermes as false
     306│   if (!hermesEnabled) {

     flow-typed/npm/yargs_v17.x.x.js
 [1]  80│     argv: Argv | Promise<Argv>;
 ```

## Changelog:

[INTERNAL] [FIXED] - fix `hermes` param handling in `test-e2e-local.js`

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

Test Plan: tested locally

Reviewed By: cipolleschi

Differential Revision: D66704263

Pulled By: robhogan

fbshipit-source-id: f05f23b95e67bd20025e0b3448df0d284fcb62da
2024-12-03 16:14:32 -08:00
Blake Friedman 9df20d414e Log out which workflow artifact we're using (#48046)
Summary:
Make it clearer to the release crew to avoid using an outdated artifact
for testing a release.

{F1971030533}

Changelog: [Internal]

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

Test Plan:
```
yarn test-e2e-local -t "RNTester" -p "Android" -h true -c $GITHUB_TOKEN
```

Reviewed By: robhogan

Differential Revision: D66657082

Pulled By: blakef

fbshipit-source-id: 225128690c180bee7a3d28fdcc7f8c9885a37f0d
2024-12-03 09:34:48 -08:00
Alex Hunt 01b40789ee Update build script to minimally support subpath patterns (#47673)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47673

Update shared monorepo build script:
- Refactor entry point discovery and file iteration
- Add support for "exports" subpath patterns (skip considering as entry point with warning)

This is required for the incoming migration of `react-native-codegen` to this build setup (D51465053).

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D66121262

fbshipit-source-id: 0deb2c2b26de442ee348ef9de54a1fa144368b6f
2024-11-20 09:21:13 -08:00
Alex Hunt 35ab62cca3 Substitute @pkgjs/parseargs for Node builtin (#47704)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47704

Now that we have a min requirement of Node 18.18 on `main`, drop dependency on this polyfill.

Changelog: [Internal]

Reviewed By: vzaidman

Differential Revision: D66162328

fbshipit-source-id: e8ab6669fe14ed177eccf4b861c01df4fb0d405a
2024-11-19 09:47:40 -08:00
Rubén Norte 07b34f4ca3 Add Flow typing for test runner for RN integration tests (#47612)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47612

Changelog: [internal]

Just using babel-register so we can use Flow types in the code for the RN integration tests runner.

Reviewed By: sammy-SC

Differential Revision: D65948801

fbshipit-source-id: 6c54b0463fe4b71c818ff1c4faa973cc8b13b5d2
2024-11-15 03:00:17 -08:00
Nicola Corti 7e268c9d52 Revert React 19RC to React 18.3.1 (#47380)
Summary:
While we're waiting for 19 stable, let's bring main back to 18.3.1 ahead of the 0.77 branch cut. We'll land this change just after 19 stable lands.

This is a cherry pick of b93b378fa0 which landed in 0.76 already

bypass-github-export-checks

## Changelog:

[INTERNAL] - Revert React 19RC to React 18.3.1

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

Test Plan: CI

Reviewed By: cipolleschi

Differential Revision: D65430775

Pulled By: cortinico

fbshipit-source-id: f0f211754c8ffe5d037fd299e4de52c29d1d7913
2024-11-08 08:27:37 -08:00
Blake Friedman f5595c716b test-e2e-local support useLastSuccessfulPipeline (#47248)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47248

This argument wasn't implemented; this change implements it.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D65066030

fbshipit-source-id: 999fb2fa89cc71f9a568843d4cf92a500ff1b4f8
2024-10-29 10:08:07 -07:00
Rubén Norte 66df63d3b5 Generalize feature flags script (#47208)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47208

Changelog: [internal]

Small change to unify the yarn commands for feature flags into a single `featureflags` command with options.

Reviewed By: NickGerleman, mdvacca

Differential Revision: D64982509

fbshipit-source-id: 3f9d7ac35f61950bd03fef243e1a95625144a0cd
2024-10-29 08:02:54 -07:00
Vitali Zaidman e08c7eb22a fix how @babel/register is used and update it (#46987)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46987

X-link: https://github.com/facebook/metro/pull/1371

Update `babel/register` to latest version, fixing the bug that were preventing us from updating it previously.

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D64245277

fbshipit-source-id: f3d07b06a11fbe3a0ed28e22f5b687541782dda9
2024-10-14 06:30:59 -07:00
Riccardo Cipolleschi 6d61899fc5 Fix analyze_code to use the proper PR number (#46548)
Summary:
Analyze code was still using the CIRCLECI env variable to retrieve the PR number.
This change uses the github one and also removes a duplicated flow check

## Changelog:
[Internal] - Remove duplicated flow check and use gh PR number rather than CircleCI one

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

Test Plan: Tested locally and in CI

Reviewed By: NickGerleman

Differential Revision: D62883758

Pulled By: cipolleschi

fbshipit-source-id: 0c7e97ea9caf4465972424e0b69a899ecfd07095
2024-09-18 02:57:48 -07:00
anirudh.bharti 7cdb87eb19 chore: replace mkdirp with mkdir fs (#46388)
Summary:
This pull request replaces the use of mkdirp with Node.js's built-in fs.mkdirSync({ recursive: true }) function, which is available in Node.js version 10.12.0 and above. This change reduces the number of external dependencies and simplifies the codebase by using the native capabilities of Node.js.

The motivation behind this change is to remove the unnecessary mkdirp dependency, as Node.js natively supports recursive directory creation since version 10.12.0. This streamlines the code and reduces the reliance on external libraries.

## Changelog:

[INTERNAL] [REMOVED] - Replaced mkdirp with fs.mkdirSync({ recursive: true }) in build scripts and codegen. Requires Node.js 10.12.0 and above.

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

Test Plan: I ran the build and codegen scripts locally with Node.js version 10.12.0 and above after replacing mkdirp, ensuring the scripts work as expected. No issues were encountered, and all processes, including directory creation and file handling, function correctly.

Reviewed By: cortinico

Differential Revision: D62852488

Pulled By: huntie

fbshipit-source-id: 76f44102a80b499521c156308d276a17d279ce38
2024-09-17 07:03:44 -07:00
Nicola Corti 773a02ad5d Fix wrong command for publishing of external-artifacts (#46417)
Summary:
This is a pick on main of a fix necessary to release 0.76.x

## Changelog:

[INTERNAL] - Fix wrong command for publishing of external-artifacts

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

Test Plan: CI

Reviewed By: cipolleschi

Differential Revision: D62440193

Pulled By: cortinico

fbshipit-source-id: 57ea0736c1b6e3e60b048a46770356901de74024
2024-09-10 07:11:42 -07:00
Riccardo Cipolleschi 27bd6c9227 Use Debug APK for release testing (#46413)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46413

When testing RNTester for Android during a release, we downloads the APKs from CI to save time.

Sadly, we were downloading the Release APKs instead of the Debug ones, so we could not test te integration with Metro.

This change fixes the testing scripts to download the debug APK

## Changelog
[Internal] - Download the debug APK instead of the Release one

Reviewed By: cortinico

Differential Revision: D62436023

fbshipit-source-id: 08a568caf3e5c85b9da933bc01623587bd36affe
2024-09-10 04:41:07 -07:00
Vitali Zaidman 5cdfec9843 update metro version in react-native (#46264)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46264

React-native was not in sync with metro changes that RN relies on

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D61982240

fbshipit-source-id: 63b1f53174ab0ec663a537569a032c62c431eb83
2024-08-30 05:26:34 -07:00
Blake Friedman 2ac997abcc Remove references to old template (#46082)
Summary:
## Summary
There are old references to the react-native/template. This code has
moved to react-native-community/template.

Changelog: [Internal]

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

Test Plan:
CI

closes facebook/metro#1324

Reviewed By: cipolleschi

Differential Revision: D61472439

Pulled By: blakef

fbshipit-source-id: fc40145c03002a7c3117b72d07981a96aa3d8760
2024-08-19 09:19:35 -07:00
Riccardo Cipolleschi eb2d9852c7 Fix E2E tests on Template (#45974)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45974

This change fixes the E2E tests on the template on main.

There were two issues:
1. we were forcing the project on the 0.75 branch. We now use the current branch name
2. we were replacing all the versions for the dependencies that starts with `react-native` to the monorepo version. The problem is that also `react-native-community` packages starts with `react-native`. We now changes the versions if the dependency name starts with `react-native/`.

## Changelog:
[Internal] - Fix E2E tests on main

Reviewed By: cortinico

Differential Revision: D61122154

fbshipit-source-id: 07210fc9f63e99eac46894f13c7ca5359e186e6c
2024-08-13 05:05:56 -07:00
Riccardo Cipolleschi a11ab3b129 Add maestro test for the template (#45713)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45713

## Context
Running manual tests when preparing a release, it's time consuming.
We have to do the cherry picks, wait for CI to finish, and then manually test 8 configurations.

Maestro is a tool that allow us to run E2E tests automatically, and we can wire it to CI.

## Change

Add Maestro flow for a new app created from the template

Changelog:
[Internal] - Exploration to integrate maestro

Reviewed By: blakef

Differential Revision: D60282783

fbshipit-source-id: 0aa7f3fae4f5bf31518e02ddc56ca2d4fac4dfa3
2024-07-26 09:57:46 -07:00
Nicola Corti cb6ea49123 Fix warning on scripts/releases-ci/__tests__/publish-updated-packages-test.js (#45643)
Summary:
This just fixes a warning in scripts/releases-ci/__tests__/publish-updated-packages-test.js that the CI is firing on every PR

## Changelog:

[INTERNAL] - Fix warning on scripts/releases-ci/__tests__/publish-updated-packages-test.js

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

Test Plan: CI

Reviewed By: blakef

Differential Revision: D60170227

Pulled By: cortinico

fbshipit-source-id: 5889f7dd530cc00651d683001e1f2624bd79c27e
2024-07-24 12:41:00 -07:00