158 Commits

Author SHA1 Message Date
Dawid Małecki
b7aa3900f9 Add __pycache__ to the gitignore (#56134)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/56134

The `__pycache__` is generated when I run the script locally. This should be added to `.gitignore`.

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D97119516

fbshipit-source-id: f52160c43d537543ad1459ca7a07996de8ab5e7f
2026-03-19 04:26:54 -07:00
Jakub Piasecki
4fcd2f9f6d Run codegen for each API view separately (#55997)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55997

Changelog: [Internal]

Updates the C++ API snapshot generator to invoke codegen automatically for each created API view, generating for the specific platform that's being considered.

Reviewed By: cipolleschi

Differential Revision: D95788766

fbshipit-source-id: 8b376542f7822b73e44399c2615c327332378830
2026-03-10 09:09:06 -07:00
Jakub Piasecki
e0b90549e7 Integrate codegen into the api snapshot and allow configuration (#55642)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55642

Changelog: [Internal]

Adds a configuration file for the snapshot generation, allowing to create multiple views of the API and different flavors.

It also adds option to include codegen in the snapshot generation. Codegen needs to be executed first, and the path to its output needs to be passed when running the generation.

Reviewed By: cipolleschi

Differential Revision: D92958731

fbshipit-source-id: 42780d25b2bc04f213e697cca0b6bde07d94ca59
2026-02-25 01:12:30 -08:00
Jakub Piasecki
371b5b29e3 Setup doxygen configuration (#55639)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55639

Changelog: [Internal]

Adds a template for doxygen, which will be the base for C++ API snapshot.

Reviewed By: cipolleschi

Differential Revision: D75793597

fbshipit-source-id: 34cf10bdf8ae49d92717b5f7a026b3f9eca9e304
2026-02-25 01:12:30 -08:00
Alex Hunt
064a385273 Fix gitignore paths for debugger-frontend (#54756)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54756

Move blanket `packages/**/dist/` rule added in D77591742 into scoped `.gitignore` for `debugger-shell`.

This was preventing new files added to `packages/debugger-frontend/dist/` from being staged.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D88172611

fbshipit-source-id: 428fffd46f5f76ddf422a41b57e7b47446c40e43
2025-12-02 11:13:53 -08:00
Riccardo Cipolleschi
b10faf6c02 Create the orchestration function to coordinate the creation of the hard links (#53642)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53642

## Context

One of the quirk of SwiftPM is that the packages has to have access to the headers they need. Usually this is solved by properly setting the header_search_path. However, in  SwiftPM, we are not allowed to use headers search path that escape the package itself (basically, header search path can't start with `../`).

To work around this limitation we are recreating the correct Header structure by using hardlinks to the actual headers.

## Changed

In this change we are adding a function that is used to orchestrate the helpers function defined in previous changes.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D81778457

fbshipit-source-id: b4ab8c902d6d7e6ca4b89ccbab75c1b5d84ce00a
2025-09-22 10:14:58 -07:00
Rubén Norte
2016118aeb Centralize path definitions for Fantom builds and move to .out (#52829)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52829

Changelog: [internal]

Just a small refactor to move the definitions of output paths to a specific module. We'll add more to this in a latter diff.

Reviewed By: sammy-SC

Differential Revision: D78905645

fbshipit-source-id: 011e6cec13396301dad8e76400b6f2b9e13568f0
2025-08-04 05:56:51 -07:00
Nicola Corti
59101d6809 Remove unnecessary OSSLibraryExample (#52705)
Summary:
This module is currently unused, so we can clean it up.

## Changelog:

[INTERNAL] -

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

Test Plan: CI

Reviewed By: cipolleschi

Differential Revision: D78555763

Pulled By: cortinico

fbshipit-source-id: 0a6152ab3d357cac0c6d7669f292680af7b87074
2025-07-22 03:16:48 -07:00
Moti Zilberman
bf51035e04 Scaffolding for custom RNDT shell binary (#52357)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52357

Changelog: [Internal]

Adds a hyper-minimal build script using `electron/packager` that produces custom binaries for the experimental React Native DevTools standalone shell. The main user-facing benefit of this is replacing the Electron name and icon with our own branding.

NOTE: `electron/packager` is designed to include the application code in the resulting binary. This is arguably overkill for us - the current launch model of `electron src/electron/index.js` is actually wholly sufficient for what we need - but I decided to go with the grain of the available tooling for simplicity.

Icon design courtesy of huntie. 🙏

Reviewed By: huntie

Differential Revision: D77591742

fbshipit-source-id: a968465df4f54fba54c874b6300788e151600ed7
2025-07-02 03:48:51 -07:00
Pieter De Baets
87cd1c0a0a Add rncore stub headers for backwards-compat (#52083)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52083

These headers were removed in D55037569 but we may have some targets still depending on them. Add redirection headers with warnings to help users migrate without this being a breaking change.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D76810433

fbshipit-source-id: 43cddcc69eefbcff0c0140e165fb893bee493c79
2025-06-17 06:18:49 -07:00
Tim Yung
d6f29c8afd RN: Move {packages => private}/react-native-fantom (#51938)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51938

Moves `packages/react-native-fantom` to `private/react-native-fantom`.

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D76368959

fbshipit-source-id: 8d62f792229c10cd108dc849e8629d3174dc72c1
2025-06-11 23:49:51 -07:00
Tim Yung
1b0851515e RN: Move {packages => private}/react-native-codegen-typescript-test (#51936)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51936

Moves `packages/react-native-codegen-typescript-test` to `private/react-native-codegen-typescript-test`.

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D76357099

fbshipit-source-id: c00d19d1393aa9bc8059e30f837a045169776b50
2025-06-11 17:39:26 -07:00
Tim Yung
f0f71ea914 RN: Move {packages => private}/helloworld (#51934)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51934

Moves `packages/helloworld` to `private/helloworld`.

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D76356557

fbshipit-source-id: 92b20d75a8f2badb3c685d4918fe692623d9c04d
2025-06-11 17:39:26 -07:00
Mateo Guzmán
c1731ecd27 Update iOS RNTester build artifacts in .gitignore (#51579)
Summary:
Running `yarn prepare-ios` creates some build artifacts folders, which can be added to the .gitignore as they are generated.

## Changelog:

[INTERNAL] - Update iOS RNTester build artifacts in .gitignore

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

Test Plan: N/A

Reviewed By: cortinico

Differential Revision: D75389176

Pulled By: cipolleschi

fbshipit-source-id: ecb59051f5bb25b6be8fca9ac2ebf408adc5c7b7
2025-05-26 06:07:22 -07:00
Christian Falch
e40c1d265a add missing React-RCTSettings (#51523)
Summary:
Added missing module React-RCTSettings to the Swift package.

This was found when testing intergrating with a bare bones React Native project.

## Changelog:

[IOS] [FIXED] - add missing React-RCTSettings to Swift package

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

Test Plan: Run against a bare bones React Native project (not available in repo yet)

Reviewed By: rshest

Differential Revision: D75204445

Pulled By: cipolleschi

fbshipit-source-id: d9fcb27cc532846eece591152462ff9c88f82302
2025-05-22 05:48:04 -07:00
Nicola Corti
83ed4620d6 Add react-native/build to .gitignore
Summary:
This folder should have been added to the .gitignore.
Gradle is placing some build file over there in the latest version. This prevents it.

Changelog:
[Internal] [Changed] -

bypass-github-export-checks

Reviewed By: cipolleschi

Differential Revision: D74884379

fbshipit-source-id: 7da9682589c2bc161c1b0e3d741d1049b94505e4
2025-05-16 08:27:45 -07:00
Christian Falch
65544024b3 Add script to prepare the .build folder to prebuild React Native with SwiftPM (#51195)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51195

This change adds a script that prepares the repository by creating hard links to the header files in the `.build` folder that is also gitignored

## Changelog:
[Internal] - Add sdcript to setup the repository so that we can build it properly.

Test Plan:
run:
```
node packages/react-native/scripts/ios-prebuilds.js
```
observe the folder `.build` being created with all the files.

Reviewed By: cortinico

Differential Revision: D74393116

Pulled By: cipolleschi

fbshipit-source-id: 4951e61b49db83fbebbcc265ae025f53185fec81
2025-05-08 12:59:49 -07:00
Christian Falch
a860c55f38 Extract Flow types and constants (#49614)
Summary:
This change refactors the script to prebuild ios dependencies by:
- factoring out the constants
- factoring out the flow type definitions
- factoring out the .gitignore

bypass-github-export-check

## Changelog:

[INTERNAL] - Factor out flow types, constants and gitignore

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

Test Plan:
Tested in this `AppDelegate.mm`:

Imports:

```obj-c
#import "AppDelegate.h"
#import <glog/logging.h>
#import <double-conversion.h>
#include <fmt/core.h>
#include <boost/assert.hpp>
#include <fast_float/fast_float.h>
#include <string>
#import <SocketRocket/SRWebSocket.h>
```

Code:
```obj-c
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
  std::string input = "3.1416 xyz ";
  double_conversion::DoubleToStringConverter::EcmaScriptConverter();
  LOG(INFO) << "Hello from GLOG";
  fmt::print("Hello, world from FMT!\n");
  BOOST_ASSERT(100 == 100);
  double result;
  fast_float::from_chars(input.data(), input.data() + input.size(), result);
  LOG(INFO) << "Answer :" << result;

  NSArray *frameworks = [NSBundle allFrameworks];

  for (NSBundle *framework in frameworks) {
    NSString *frameworkName = framework.bundleURL.lastPathComponent;
    if ([frameworkName isEqualToString: @"ReactNativeDependencies.framework"]) {
      NSBundle *bundle = [NSBundle bundleWithURL:[framework bundleURL]];
      NSURL *bundleURL = [bundle URLForResource:@"ReactNativeDependencies_glog" withExtension:@"bundle"];
      NSBundle *resourceBundle = [NSBundle bundleWithURL:bundleURL];
      NSURL* url = [resourceBundle URLForResource:@"PrivacyInfo" withExtension:@"xcprivacy"];
      if (url == nil) {
        throw [NSException exceptionWithName:@"ResourceNotFoundException"
                                       reason:@"Could not find PrivacyInfo.xcprivacy in ReactNativeDependencies_glog bundle"
                                     userInfo:nil];
      }
      break;
    }
  }
  return YES;
}
```

Reviewed By: cortinico

Differential Revision: D70172536

Pulled By: cipolleschi

fbshipit-source-id: 91589693fd24e2b0d6d67759fb9fbc86841f4d13
2025-02-26 08:19:39 -08:00
Andrew Datsenko
e85d70c8ac Create a CMake executable target (#49526)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49526

Changelog: [Internal]

Introduce a binary tester for Fantom that will be used in runner when ready so OSS can run integration tests.

Here:
- Add BUCK target
- Add CMake target

Reviewed By: cortinico

Differential Revision: D69800975

fbshipit-source-id: 57e135e2a1cbfb88e0141ddc7859b9a29365ee1f
2025-02-19 09:15:07 -08:00
Riccardo Cipolleschi
69a4d32028 Add function to package the xcframework (#49434)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49434

This change adds a function to create the xcframework sarting from the various .framework's slice built before.

## Changelog:
[Internal] - Add function to create the xcframework

Reviewed By: cortinico

Differential Revision: D69660662

fbshipit-source-id: f58034c75cce3d242910d0ec1512be28059771ca
2025-02-14 10:20:10 -08:00
Riccardo Cipolleschi
dd0e1f24d1 Add build function to the prepare-ios-script (#49363)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49363

This change adds the `build()` function that calls xcodebuild to prepare the ReactNativeDependencies.framework

This functio creates the frameworks in the /react-native/third-party/.build folder

## Changelog:
[Internal] - Add build folder to the `prepare-ios-script`

Reviewed By: cortinico

Differential Revision: D69533218

fbshipit-source-id: edc9281e9270970084aa0f56b52ced4579df3473
2025-02-13 13:55:51 -08:00
Riccardo Cipolleschi
b98362e311 Add code to keep only required files for dependencies (#49360)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49360

We don't need the whole dependencies archiveto build the dependencies. But usually we only need a subset of them.

This change add a functionality to the script to remove the unnecessary files.

## Changelog:
[Internal] - Add feature to remove unnecessary files from 3p dependencies.

Reviewed By: cortinico

Differential Revision: D69518656

fbshipit-source-id: b071626a1894261b75023023b7f7eeb2730282a2
2025-02-13 13:55:51 -08:00
Riccardo Cipolleschi
7db0abf61b [Download and patch Glog dependency (#49336)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49336

This change adds the step to download the glog dependency and run the prepare_glog script that we have in the codebase

## Changelog:
[Internal] - Download Glog and patch it.

Reviewed By: cortinico

Differential Revision: D69466238

fbshipit-source-id: df0b4e29d4ff7d0d61f92a52141935472fa964fe
2025-02-13 13:55:51 -08:00
Riccardo Cipolleschi
9f23118716 Add function to download dependencies (#49335)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49335

This change adds a function in the prebuild script to download a 3p dependency in the react native monorepo.

## Changelog:
[Internal] - Add function to download 3rd party dependencies

Reviewed By: cortinico

Differential Revision: D69464429

fbshipit-source-id: 2d035168c2390eb9fa9e2338976fce15d86fb68c
2025-02-13 13:55:51 -08:00
Jakub Piasecki
2a99b22a44 Update module resolution for type generation (#49351)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49351

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69521547

fbshipit-source-id: 5d37875da91341ad1882733f5ee842a819558f85
2025-02-12 07:34:36 -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
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
Jakub Piasecki
f1a33c5982 Add generated types to the gitignore (#48848)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48848

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D68489815

fbshipit-source-id: ddb6e19e1ef060f537bfeacf6d8a916e08cff75b
2025-01-22 03:07:08 -08:00
Nicola Corti
c85be01cba Add .kotlin/ to gitignore (#48598)
Summary:
Adding .kotlin to gitignore. This folder starts to get used with K2 (with Kotlin 2.0) so we should be
adding it to the gitignore files

## Changelog:

[INTERNAL] - Add .kotlin to gitignore

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

Test Plan: N/A

Reviewed By: cipolleschi

Differential Revision: D68018000

Pulled By: cortinico

fbshipit-source-id: 78be3597071d07d105145d8ba94cd83cbf4f21bc
2025-01-10 07:35:12 -08:00
Rubén Norte
81fbd18410 Move remaining Fantom files to react-native-fantom (#48143)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48143

Changelog: [internal]

Just a small cleanup to move `jest/integration/*` to `packages/react-native-fantom`, so everything related to Fantom (config, runner, runtime, etc.) is in the same directory.

Reviewed By: javache

Differential Revision: D66874763

fbshipit-source-id: 8b87d7320c7704f7ce6cd58761508193784f5ce2
2024-12-06 05:24:31 -08:00
Rubén Norte
849c139a4c Initial implementation of Jest test runner for RN integration tests (#47558)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47558

Changelog: [internal]

Reviewed By: sammy-SC

Differential Revision: D65661701

fbshipit-source-id: 0f0227debc769d0cebebc1989cbcfbbdd44dfc34
2024-11-14 06:20:47 -08:00
Riccardo Cipolleschi
ace690aba9 Generate RN specific Files in RN (#47458)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47458

We are in a weird situation where React Native depends on some files that are generated by Codegen.

Codegen runs in the user project, so those dependencies are not available to React Native if we try to build it in isolation.

This is a problem and a blocker to prepare the prebuilds for iOS.

This image show the changes we are introducing:
On the right we have the current situation.
On the left the new one.

{F1954418630}

## Changelog:
[Internal] - Generate React Native specific code inside React Native

Reviewed By: cortinico, blakef

Differential Revision: D65541505

fbshipit-source-id: 1412d7f23c4d2230b795af41f1e832c8a70d5859
2024-11-07 04:08:58 -08: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
Nicola Corti
a272e8ee66 Remove unused rn-tester e2e tests (#45032)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45032

Those tests haven't been running since ~1 year now.
I know it's not ideal but I'd rather remove them instead of keeping them around not executing.
We can still revert them back from the history once we decide to revive the E2E testing effort.

Changelog:
[Internal] [Changed] - Remove unused rn-tester e2e tests

Reviewed By: cipolleschi

Differential Revision: D58729123

fbshipit-source-id: f0f47e3c2e087141fdff506b7c5c9b460263721b
2024-06-18 09:06:42 -07:00
Alex Hunt
53dda9e542 Format code-workspace file, clarify use of .vscode/ dir (#44874)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44874

While reviewing https://github.com/facebook/react/pull/29830, I noticed this file was committed with tab indentation in React Native. I have also used the `.gitignore` entry to clarify how `react-native.code-workspace` interacts with an optional user `.vscode/` config directory.

Note: The `json-stringify` parser can be used with Prettier 3+ only, so we use `json` instead.

Changelog: [Internal]

Reviewed By: vzaidman

Differential Revision: D58413581

fbshipit-source-id: 58c14db6648fed10736062b1f055475154aa74a4
2024-06-11 09:27:48 -07:00
Nicola Corti
cf914e412d RNGP - Autolinking. Add support for linking projects. (#44799)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44799

This is the final part of core autolinking:
1. I split RNGP into an `app-plugin` and a `settings-plugin`. This was necessary as the Gradle modules need to be loaded inside the settings.gradle.kts.
2. I've introduced a Settings Plugin to take care of either invoking the `config` command from CLI or receiving a file in input.
3. I've removed the former `RunAutolinkingConfigTask` as now the command is invoked inside the settings plugin
4. I've added hashing computed based on the lockfiles so we won't be re-executing teh `config` command if the lockfiles are not changed.
5. I've updated RN-Tester to use the core autolinking rather than manual linking for the 2 libraries it's using.

Changelog:linking
[Internal] [Changed] - RNGP - Autolinking. Add support for linking projects

Reviewed By: blakef

Differential Revision: D58190363

fbshipit-source-id: 6ab8b36729e77ca715f50a4a00aa0ca4eb5b63b1
2024-06-07 10:32:16 -07:00
Blake Friedman
995d5b832d Add an internal HelloWorld template
Summary:
This is a copy of the current packages/react-native/template that we exclusively use internally for testing.

Changelog: [Internal]

NOTE: Best contribution would be to scan the file list and ensure there isn't anything that shouldn't be in there.

bypass-github-export-checks

Reviewed By: cortinico, cipolleschi

Differential Revision: D56242484

fbshipit-source-id: 0913ff7acff9b0314b49f48e986674b77dbb908e
2024-04-23 15:07:59 -07:00
Dmitry Rykun
1cb0a3342a Add react-native-test-library package (#43068)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/43068

This diff adds `react-native-test-library` package.
It contains native module and native component example, and targets both the new and the old architecture. It has structure similar to many OSS React Native libraries, and is supposed to be used to test the integration with third-party libraries.

It is integrated with RNTester as the **OSS Library Example** screen.

{F1457510909}

**Change Background** tests native commands.
**Set Opacity** tests native props.
**Get Random Number** tests native module.

Changelog: [Internal]

Reviewed By: RSNara

Differential Revision: D50793835

fbshipit-source-id: ff6daefab10e6e9f13049e3013f8f63cfa8a929e
2024-04-09 11:35:43 -07:00
Pieter De Baets
6014dce04c Revert D54630694: Fix duplication across and rncore and FBReactNativeComponentSpec
Differential Revision:
D54630694

Original commit changeset: 75cb961ded9f

Original Phabricator Diff: D54630694

fbshipit-source-id: 50832c934e5bcc1a92456d949995c05a33767a92
2024-03-18 10:38:35 -07:00
Pieter De Baets
ef77087293 Fix duplication across and rncore and FBReactNativeComponentSpec (#43385)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/43385

`rncore` and `FBReactNativeComponentSpec` contain the same symbols, which leads to conflicts when we try to merge them into a single shared library. Cleanup the duplication and standardize on `FBReactNativeComponentSpec` everywhere. I've left the Android OSS targets as is, to avoid breaking deps.

Changelog: [Internal]

Reviewed By: cortinico, dmytrorykun

Differential Revision: D54630694

fbshipit-source-id: 75cb961ded9fd75508755c0530e29409fef801cf
2024-03-18 07:30:33 -07:00
Ramanpreet Nara
8bced4b29d Pull PopupMenuAndroid out of React Native core
Summary:
**History:** This component was originally introduced into React Native core in D52712758, to replace UIManagerModule.showPopupMenu().

**Problem:** But, React Native core should be lean. Adding this component to React Native bloats the core.

**Changes:** So, this diff pulls PopupMenuAndroid out into its own package in the react-native GitHub repository.

In the future, this will be migrated to a community package!

Changelog: [Android][Removed] Move PopupMenu out of React Native core

Reviewed By: NickGerleman

Differential Revision: D53328110

fbshipit-source-id: 469d8dc3e756c06040c72e08fa004aafa1bd6e18
2024-02-23 16:43:18 -08:00
Alex Hunt
fb446598f9 Rename E2E template init script, relocate Verdaccio config + storage (#43001)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/43001

More understandable name: ~"React Native init, for E2E testing". Also relocates Verdaccio config and storage location under `scripts/e2e/` (resolving TODO comment).

The intent is for the `scripts/e2e/` dir to also group the existing E2E testing-related scripts — although I will stop here for the current release-related work.

Changelog: [Internal]

Reviewed By: lunaleaps

Differential Revision: D53609332

fbshipit-source-id: fb2f6502a18c4a4ac2368b46af1e3ee42edbadd6
2024-02-15 14:51:48 -08:00
Rob Hogan
48a19d7020 Back out "Standalone Gradle plugin: Node.js package resolver"
Summary:
Original commit changeset: 32898e1ba30b

Original Phabricator Diff: D52998256

[General][Removed] - Back out: Gradle plugin for resolving node_modules packages.

Backing this (my own diff) out as it breaks CI - I'm not sure why it landed.

Reviewed By: cipolleschi

Differential Revision: D53427912

fbshipit-source-id: baec254a463e3f7827d6a8675499aab34069ddd1
2024-02-05 09:16:10 -08:00
Rob Hogan
8456ccad78 Standalone Gradle plugin: Node.js package resolver (#42823)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/42823

This is a tiny new Gradle plugin intended to be published to the Gradle Plugin Portal independently of React Native. It's only function is to resolve `node_modules` package roots using a sufficient subset of the Node JS resolution algorithm - e.g, we can use it to find `react-native` itself from a user's project, whatever package manager or workspace setup they're using, in a Gradle-friendly, cacheable manner.

The plugin is both a `Settings` plugin and a `Project` plugin, so that it may be used from both `settings.gradle` (where we need it to resolve `react-native`) and `app/build.gradle` (which currently applies from `cli-platform-android`).

The setup is mostly `gradle init` with a few modifications (eg, Kotlin JVM version) to stay close to the setup for `react-native-gradle-plugin`. I think it's easier to reason about this currently as an entirely separate Gradle project, but we may be able to merge the two and reduce some duplication once it's proven.

Changelog:
[General][Added] - Gradle plugin for resolving node_modules packages.

Reviewed By: cortinico

Differential Revision: D52998256

fbshipit-source-id: 32898e1ba30bccabca11b623f03959a51898afe8
2024-02-05 08:30:32 -08:00
Nicola Corti
d992abc56d Move legacy tests from OSS to fbandroid/java/com/facebook/fbreact (#41802)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41802

Those tests are not executing at all, they're just compiled.
Our internal infra is still depending on some bits of it though, so I'm moving them to `fbandroid/java/com/facebook/fbreact

Changelog:
[Internal] [Changed] - Move legacy tests from OSS to  fbandroid/java/com/facebook/fbreact

Reviewed By: rshest

Differential Revision: D51805702

fbshipit-source-id: 2c5cec68efa9854184e981220202d8f356ff690a
2023-12-27 17:34:29 -08:00
Oskar Kwaśniewski
09b110fef8 fix: add verdaccio generated files to .gitignore (#41783)
Summary:
When working with Verdaccio (testing the template, releasing packages) - I've stumbled upon a lot of changes in the repo:

![CleanShot 2023-12-04 at 13 14 12@2x](https://github.com/facebook/react-native/assets/52801365/74ce53a2-b885-41f4-9a12-968a8577285e)

## Changelog:

[INTERNAL] [ADDED] - Add verdaccio generated files to .gitignore

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

Test Plan: CI Green

Reviewed By: christophpurrer

Differential Revision: D51808583

Pulled By: huntie

fbshipit-source-id: fec2a13883590d0c6af179c3804fba9d4235dde2
2023-12-04 07:52:06 -08:00
Riccardo Cipolleschi
475b835e43 Add Hermes Xcode integration test to GH Actions (#41187)
Summary:
After disabling the E2E tests, we lost a test that was verifying that Hermes works well with the latest version of React Native for iOS
This change introduce this test back in GH actions

## Changelog:
[Internal] Add tests for Hermes-Xcode integration to GH Actions

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

Test Plan: CI is green 🤞

Reviewed By: NickGerleman

Differential Revision: D50737860

Pulled By: cipolleschi

fbshipit-source-id: f4bc09be879af7aba0ca42f1b7e407a5d5dc0986
2023-10-31 09:37:24 -07:00
Gijs Weterings
d4ad19c969 Revert D49370200: Migrate codegen to shared build setup, remove package build pre-step from RNTester
Differential Revision:
D49370200

Original commit changeset: 992913155169

Original Phabricator Diff: D49370200

fbshipit-source-id: e8232c97c22065fb54ac940ee2351b2155eb51e0
2023-10-23 12:00:54 -07:00
Alex Hunt
4db31a3110 Migrate codegen to shared build setup, remove package build pre-step from RNTester (#39540)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39540

This simplifies the use of Codegen when creating dev builds of `rn-tester` in the monorepo. It now runs from source for this internal scenario, and this package is now built using the shared monorepo build setup.

Changes:
- Migrate `packages/react-native-codegen` to the shared `yarn build` setup.
    - Update package to use `"exports"` field and wrap entry point modules with `babel-register` (NOTE: This is only required for each entry point internally used in the monorepo).
- Fixup small Flow syntax quirks that fail under `hermes-parser`.
- Remove `BuildCodegenCLITask` task from Android build.
- Remove Codegen `build.sh` call from iOS build, use `require.resolve` for `combine-js-to-schema-cli.js` entry point.

Externally significant FYIs:
- `react-native/codegen` is converted to use the `"exports"` field — it should export all `.js` files, as before.
- `codegenPath` is now ignored and marked as deprecated on `ReactExtensions.kt`.

NOTE: TypeScript auto-generation is not yet enabled on this package, since it uses CommonJS `module.exports` syntax (unsupported by `flow-api-translator`).

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D49370200

fbshipit-source-id: 992913155169912ea1a3cb24cb26efbd3f783058
2023-10-23 08:32:33 -07:00
Riccardo Cipolleschi
5678422504 Gitignore RCTLegacyInteropComponents.mm as it is generated by Xcode (#41010)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41010

## Changelog
[Internal] - Gitignore RCTLegacyInteropComponents.mm as it is generated by Xcode

Reviewed By: dmytrorykun

Differential Revision: D50323800

fbshipit-source-id: 63fdb82a97ff3c4d94d341555a0a3dcce8226a96
2023-10-17 02:33:19 -07:00