Commit Graph

1139 Commits

Author SHA1 Message Date
Riccardo Cipolleschi da88bf0030 Add job to build the slices for ios prebuilds (#49528)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49528

This change introduces a job to prebuild iOS slices.

## Changelog:
[Internal] - Create prepare artifacts workflows

Reviewed By: cortinico

Differential Revision: D69855542

fbshipit-source-id: 54d5b24b55f9e7bebdbb201073524dc4f3748e07
2025-02-28 09:05:37 -08:00
Iwo Plaza 5fc2484440 Align useAnimatedValue with OSS types (#49643)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49643

## Motivation
Modernising the RN codebase to allow for modern Flow tooling to process it.

## This diff
Aligns `useAnimatedValue.js` with its manual .d.ts types.

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D70096210

fbshipit-source-id: c3cd517eccf1cb68400772ddde6e5891861c927d
2025-02-28 06:33:21 -08:00
Jakub Piasecki be59427448 Align ProgressBarAndroid types with OSS (#49663)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49663

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D70176068

fbshipit-source-id: 0a1febb390affc2a3123e49e88b039b390a34387
2025-02-28 05:46:48 -08:00
Iwo Plaza 42cea2dc9c (reattempt) Use implicit namespace to better align Animated module with OSS types (#49685)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49685

## Motivation
Modernising the RN codebase to allow for modern Flow tooling to process it.

## This diff
Renames `Animated.js` to `AnimatedExports.js`, and introduces an intermediate file that reexports `* as Animated` as a default. This should have equivalent runtime behavior, but allows for a common interface file: `Animated.js.flow` to reinterpret the module as having single exports. TypeScript treats this as a namespace.

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D70237239

fbshipit-source-id: f552490cb6bb721c6163272689ec9b6c68386574
2025-02-28 05:03:55 -08:00
Dawid Małecki 38e1444162 Add TouchableOpacity to buildTypes and align Flow with TS types (#49700)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49700

Changelog:
[Internal] - Added TouchableOpacity to buildTypes and aligned Flow with TS types

Reviewed By: huntie

Differential Revision: D69922731

fbshipit-source-id: 852b8afe99469512c0951d2fd3818fca744102fe
2025-02-27 03:02:16 -08:00
Riccardo Cipolleschi 9e64099df6 Cleanup script and move the index to release (#49666)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49666

This change moves the index.js file to the `releases` folder, giving it a meaningful name.

It also rename the prebuild folder to ios-prebuild to be more descriptive.

It finally removes the old scripts that this refactoring supersedes.

bypass-github-export-checks

## Changelog:

[INTERNAL] - Move the infdex.js to the prepare-ios-prebuilds script.

Reviewed By: cortinico

Differential Revision: D70176043

fbshipit-source-id: e0c3f3bd53adf97fa388c37a746d274fd678f690
2025-02-26 08:19:39 -08:00
Christian Falch 8b984ca2c4 Glue all the scripts together. (#49671)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49671

This change refactors the script to prebuild ios dependencies by adding a script that glues all the steps together.

bypass-github-export-checks

## Changelog:

[INTERNAL] - Add script to orchestrate all the steps

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: D70175842

Pulled By: cipolleschi

fbshipit-source-id: e4bb4ad5d12e7ceaaca0eeee7ce6dc7269aa7bad
2025-02-26 08:19:39 -08:00
Christian Falch 2fdb6c9832 Refactor compose-framework script (#49665)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49665

This change refactors the script to prebuild ios dependencies by factoring out the code that creates the XCFrameworks

bypass-github-export-checks

## Changelog:

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

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: D70175797

Pulled By: cipolleschi

fbshipit-source-id: 8eb07fd3ff9f309d5f6e4b55156c5d5cbbd41235
2025-02-26 08:19:39 -08:00
Christian Falch 1cf751ed58 Refactor build script (#49669)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49669

This change refactors the script to prebuild ios dependencies by factoring out the script that builds the frameworks

bypass-github-export-checks

## Changelog:

[INTERNAL] - Factor out the script to build the frameworks.

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: D70175778

Pulled By: cipolleschi

fbshipit-source-id: 987ea8922ab566c6601a77084226df2b6456243f
2025-02-26 08:19:39 -08:00
Christian Falch f7970cddf2 Add code to generate the Swift Package
Summary:
This change refactors the script to prebuild ios dependencies by:
- remove the manually maintained Package.swift
- add script to generate it starting from the configurations that we have
bypass-github-export-checks
## Changelog:

[INTERNAL] - Factor out script to generate  Package.swift file

Reviewed By: cortinico

Differential Revision: D70175760

Pulled By: cipolleschi

fbshipit-source-id: a1b0fc6dcdc1860b04ab260697f259c297338f41
2025-02-26 08:19:39 -08:00
Christian Falch 7aa5df32a4 Refactor setupDependencies script (#49670)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49670

This change refactors the script to prebuild ios dependencies by factoring out the code that setups native dependencies.

bypass-github-export-checks

## Changelog:

[INTERNAL] - Factor out code to setup native dependencies

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: D70175729

Pulled By: cipolleschi

fbshipit-source-id: 4e1c19b5482b4335ab66c2b605abcb9db47091d3
2025-02-26 08:19:39 -08:00
Christian Falch 339b0b5653 Add utils: CLI arg validation and folders utils (#49668)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49668

This change refactors the script to prebuild ios dependencies by:
- factoring out CLI validation in a separate file
- factoring out the folder utilities in a separate file

bypass-github-export-checks

## Changelog:

[INTERNAL] - Factor out CLI and folder utilities

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: D70175663

Pulled By: cipolleschi

fbshipit-source-id: 5c6653aed7054658c5e265675766a28415da3918
2025-02-26 08:19:39 -08:00
Christian Falch 6eac2bd5b9 Configure all the third party dependencies we need (#49667)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49667

This change refactors the script to prebuild ios dependencies by extracting all the dependencies' configurations in a separate file

bypass-github-export-checks

## Changelog:

[INTERNAL] - Factor out all the dependencies configurations in a separate file

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: D70175499

Pulled By: cipolleschi

fbshipit-source-id: c0eacb831e6551d39956c9835d15ab8d9e91d8f2
2025-02-26 08:19:39 -08: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
Jakub Piasecki 65242998ca Align Pressable types with OSS (#49631)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49631

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D70091770

fbshipit-source-id: 8a2fb448984fccf31c473002ffccd5ddb174b7e1
2025-02-26 07:21:43 -08:00
Dawid Małecki dbbdb985f5 Add SafeAreaView to buildTypes and align Flow with TS types (#49664)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49664

Changelog:
[Internal] - Added SafeAreaView to buildTypes and aligned Flow with TS types

Reviewed By: huntie

Differential Revision: D70176107

fbshipit-source-id: 5da4ef4751c2d4a57b3ffd736294587836babecf
2025-02-26 03:15:02 -08:00
Iwo Plaza 9d92b277bf Optional post-transform pipeline for .d.ts files generated by build-types script (#49634)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49634

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69992512

fbshipit-source-id: 7fc004e9460498de236a833aea5265a5fac5f490
2025-02-26 03:06:57 -08:00
Dawid Małecki 7856ef8409 Add Image and ImageBackground to buildTypes and align Flow with TS defs (#49659)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49659

Changelog:
[Internal] - Added Image and ImageBackground to buildTypes and aligned Flow with TS defs

Reviewed By: huntie

Differential Revision: D70099485

fbshipit-source-id: 6000fc7099a4f811c451a08c4d5cf505d84ec0c9
2025-02-25 09:12:52 -08:00
Jakub Piasecki edfc73d1a1 Align DrawerLayoutAndroid type definitions with OSS (#49620)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49620

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D70081361

fbshipit-source-id: 203a9a984fddef6dfd2fce7e84ae44e8e68e8fcc
2025-02-25 05:51:21 -08:00
Dawid Małecki 4e79ca4464 Add Touchable to buildTypes and align Flow with TS types (#49562)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49562

Changelog:
[Internal]: Added Touchable to buildTypes and aligned Flow with TS types.

Reviewed By: huntie

Differential Revision: D69843245

fbshipit-source-id: 578987a277c3407890a541e442bb347311f71efa
2025-02-25 01:49:28 -08:00
Jakub Piasecki dee6168027 Align Keyboard types with OSS (#49623)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49623

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D70083211

fbshipit-source-id: c91d3cd7e8f4ad8770bc686768103b43611d4ebb
2025-02-25 01:23:04 -08:00
Jakub Piasecki 091f542a2e Add a pretransform replacing Stringish with string (#49636)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49636

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D70094483

fbshipit-source-id: 3ec23f19af437e28e82f73f03541cbf38469d670
2025-02-25 01:22:31 -08:00
Shawn Dempsey f17c26437b Revert D69849314: Use implicit namespace to better align Animated module with OSS types
Differential Revision:
D69849314

Original commit changeset: cdaa605ba536

Original Phabricator Diff: D69849314

fbshipit-source-id: b97b049cf5f3728568a55abfb93dc67cadfa26ba
2025-02-24 15:40:33 -08:00
Iwo Plaza b56548969a Use implicit namespace to better align Animated module with OSS types (#49559)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49559

## Motivation
Modernising the RN codebase to allow for modern Flow tooling to process it.

## This diff
Renames `Animated.js` to `AnimatedExports.js`, and introduces an intermediate file that reexports `* as Animated` as a default. This should have equivalent runtime behavior, but allows for a common interface file: `Animated.js.flow` to reinterpret the module as having single exports. TypeScript treats this as a namespace.

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69849314

fbshipit-source-id: cdaa605ba5361d3349c6dd0e84fd0fbfee263941
2025-02-24 09:20:04 -08:00
Jakub Piasecki c66728dc35 Add ButtonProps export (#49593)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49593

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69984581

fbshipit-source-id: 1a9607866dee564718081a15f9f6740dfb8dd0e4
2025-02-24 08:50:19 -08:00
Dawid Małecki 92e21688db Add RefreshControl to buildTypes and align Flow with TS types (#49564)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49564

Changelog:
[Internal] - Added RefreshControl to buildTypes and aligned Flow with TS types

Reviewed By: huntie

Differential Revision: D69924368

fbshipit-source-id: 1a01ede28f9d0729c483036f8d3f9c9eced58286
2025-02-24 07:08:03 -08:00
Jakub Piasecki f8627e5627 Align ActivityIndicator with OSS types (#49519)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49519

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69661567

fbshipit-source-id: 35e3849eeea188f8bdfa0664c90d3d9e5328ef80
2025-02-24 06:36:56 -08:00
Jakub Piasecki db4086de97 Align LayoutConformance types with OSS (#49625)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49625

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D70084487

fbshipit-source-id: f4f0a06f3d7cf87659696ac41a27be5f5972d99f
2025-02-24 06:19:45 -08:00
Jakub Piasecki 0a87f0cf5c Align ScrollView with the OSS types (#49617)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49617

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69981167

fbshipit-source-id: d4b2661b9ec746f30b512bad2c84d4dd0c1755c7
2025-02-24 05:03:18 -08:00
Dawid Małecki b060fbe99c Add StatusBar to buildTypes and align Flow with TS types (#49598)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49598

Changelog:
[Internal] - Added StatusBar to buildTypes and aligned Flow with TS types

Reviewed By: huntie

Differential Revision: D69990300

fbshipit-source-id: 684c3692fd3cc4862fd3cd3fe4731129887b9bcc
2025-02-24 03:11:31 -08:00
Dawid Małecki 0d454285c7 Add Switch to buildTypes and align Flow with TS types. (#49597)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49597

Changelog:
[Internal] - Added Switch to buildTypes and aligned Flow with TS types.

Reviewed By: huntie

Differential Revision: D69984618

fbshipit-source-id: 1fb978bb712be20f0e685af80bef0ac6d78b73ba
2025-02-21 09:09:01 -08:00
Jakub Piasecki 289dba8cf2 Align InteractionManager and PanResponder types with OSS (#49517)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49517

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69742877

fbshipit-source-id: ccd99b29aed4ec4ef8c0b7b2a57763f716be411e
2025-02-21 05:18:56 -08:00
Dawid Małecki f5837bf9f4 Add TouchableHighlight to buildTypes and move comments from TS definitions (#49560)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49560

Changelog:
[Internal] - Added TouchableHighlight to buildTypes and moved comments from TS definitions

Reviewed By: huntie

Differential Revision: D69919248

fbshipit-source-id: 66b615df60862a53132bd7b2ae9f54065c444e22
2025-02-21 04:00:06 -08:00
Dawid Małecki e96e0de756 Add TouchableNativeFeedback to buildTypes and align Flow types (#49561)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49561

Changelog:
[Internal] - Added TouchableNativeFeedback to buildTypes and aligned Flow types

Reviewed By: huntie

Differential Revision: D69858177

fbshipit-source-id: 4bd55cba9a9eb1a1d304911cf929b363205a20d5
2025-02-21 04:00:06 -08:00
Dawid Małecki b418aacd85 Add TouchableWithoutFeedback to buildTypes and align Flow with TS types (#49529)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49529

Changelog:
[Internal] - Added TouchableWithoutFeedback to buildTypes and aligned Flow with TS types

Reviewed By: huntie

Differential Revision: D69855221

fbshipit-source-id: a1de660e02a90f8e1c181b8e0c5dfdbaa4d2c75c
2025-02-21 04:00:06 -08:00
Jakub Piasecki c079d5218f Partially align Utilities with OSS types (#49471)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49471

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69747254

fbshipit-source-id: 70bfe94d0950d31e7f4f3c3bc4df47121e8be9c1
2025-02-20 09:12:43 -08:00
Riccardo Cipolleschi 3ab568d472 Add utility function to validate args (#49522)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49522

While testing the script, sometime I obtained undesired results because I was passing the wrong values for the arguments.

This change add a simple validation function to inform the user when the arguments that are passed are not valid.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D69851416

fbshipit-source-id: c378a3ca5db942cca5178274204a0d01d1eefdf7
2025-02-20 03:28:49 -08:00
Riccardo Cipolleschi 07f05cedd5 fix typo in configuration check (#49523)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49523

There was a typo when checking the configuration. The default parameter is `all`, not `All`.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D69851429

fbshipit-source-id: 7f16f5f89c90824ceb57f9980bc38a31be33ccfe
2025-02-20 03:28:49 -08:00
Riccardo Cipolleschi b8af3ad599 Cleanup old xcframework (#49524)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49524

If there is already an XCFramework in the current location. xcodebuild fails to create and override the xcframework.

This change allows us to override an old xcframework and to iterate more quickly.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D69851428

fbshipit-source-id: 723b3035cec008e2bd177da4f960f2bb085ff493
2025-02-20 03:28:49 -08:00
Dawid Małecki 3f9e474d23 Align Flow to TS types in Modal (#49521)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49521

Changelog:
[Internal] - Aligned types of the Modal between Flow and iOS

Reviewed By: huntie

Differential Revision: D69786560

fbshipit-source-id: 3bf0999db5ad57a1b9b9dd95f2b77c994fe3af6e
2025-02-19 09:12:45 -08:00
Riccardo Cipolleschi 864d47822f Handle configurations and destinations in prepare-ios-prebuilds (#49498)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49498

This change handles the destinations and the configurations parameter when passed to the script.

## Changelog:
[Internal] - Handle `configuration` and `destination` parameters

Reviewed By: cortinico

Differential Revision: D69787469

fbshipit-source-id: 5c4ae766dad84640fbf5340efc296355c4944e1c
2025-02-19 06:19:48 -08:00
Iwo Plaza ee90f2d97f Prefer common interface files when building the type graph (#49494)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49494

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69786939

fbshipit-source-id: 3b0481e83a528afbdf1d29734d2aea9cad740f58
2025-02-19 06:00:03 -08:00
Riccardo Cipolleschi 601b2ec353 Honor the task provided to prepare-ios-prebuilds (#49497)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49497

This change honors the task provided as an argument.

If `all` is passed, we execute all the commands.
If a specific task is passed, we only execute that command.

## Changelog:
[Internal] - Honor the task passed to the preopare-ios-script

Reviewed By: cortinico

Differential Revision: D69787470

fbshipit-source-id: 0dec13ad0b5f2cc23cc72b4a899405ac1acf4f86
2025-02-19 04:59:37 -08:00
Riccardo Cipolleschi ca37f2b20a Add argument parsing and help function to prepare ios build (#49496)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49496

This change prepare the argument parsing to the prepare-ios-prebuilds so we can customise the behavior to simplify usage in CI.

It also adds the --help command to provide.

##changelog:
[Internal] - adds the help mfunction and argument parsing

Reviewed By: cortinico

Differential Revision: D69779877

fbshipit-source-id: d66bc19ee556229eb7167f2075b77bacce2ad5c4
2025-02-19 04:59:37 -08:00
Riccardo Cipolleschi c0e43edd01 Extracted the dependencies array to separate file (#49495)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49495

This change extracts the dependencies array to a separate file. This is helpful because we can use this file as cache-key to determines whether we have to rebuild the artifacts or not.

This file is also bound to grow so it will make the script more manageable.

## Changelog:
[Internal] - Move the dependencies for ios prebuilds on a separate file

Reviewed By: cortinico

Differential Revision: D69779522

fbshipit-source-id: 7ce60e426d428859f6f759d8e7b1ea499c36eff9
2025-02-19 04:59:37 -08:00
Dawid Małecki 8beae3ba52 Align types of the Libraries/PushNotificationIOS between Flow and TS (#49266)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49266

Changelog:
[Internal] - Aligned types of the PushNotificationIOS between Flow and TS

Reviewed By: huntie

Differential Revision: D69309391

fbshipit-source-id: 1e99f6aa6805c25db7ede6c65305b309590ebd6a
2025-02-18 09:03:55 -08:00
Iwo Plaza e4e03bd909 Trace the import path that leads to an untranslatable file (#49480)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49480

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69752685

fbshipit-source-id: 94f70eeaec35c864c15b463f3afce929765f2c40
2025-02-18 07:37:57 -08:00
Dawid Małecki 71bd096136 Add PermissionsAndroid to buildTypes and align Flow with TS types (#49352)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49352

Changelog:
[Internal] - Added PermissionsAndroid to buildTypes and align Flow with TS types.

Reviewed By: huntie

Differential Revision: D69464744

fbshipit-source-id: 31591b2069d25a20bff569b296dcbda88d9f2148
2025-02-18 01:20:26 -08:00
Jakub Piasecki 91edb9c184 Align LayoutAnimation types with OSS (#49467)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49467

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69745571

fbshipit-source-id: 4c27b6c22126a2c8b0965e1a88f9dc310e5ff77c
2025-02-18 01:10:02 -08:00
Jakub Piasecki 721c7fafa4 Add ReactNative to the list of translated modules (#49472)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49472

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69748223

fbshipit-source-id: 97aed0dfc25de9117db3c359970dd94899dd1417
2025-02-18 00:41:51 -08:00