Commit Graph

38536 Commits

Author SHA1 Message Date
Dawid Małecki f63bd3a8e4 Create implicit StyleSheet namespace to better align Flow and TS types (#49810)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49810

Changelog:
[Internal]

Migrated StyleSheet namespace content to StyleSheetExport.js to recreate it by importing * as StyleSheet, which aligns with TS namespace definition. Added .flow files that specify base type declarations and will be digested by the flow tooling.

Reviewed By: huntie

Differential Revision: D70391322

fbshipit-source-id: dd974ef282cb984a1e57d5732e3b5bdab6db4564
2025-03-05 09:17:40 -08:00
Iwo Plaza dc689aa415 Skip redundant reparsing when translating Flow defs to TS defs (#49840)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49840

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D70620551

fbshipit-source-id: d526c1de733f19ab6106ae586632709fd1a389dc
2025-03-05 05:39:22 -08:00
Dawid Małecki f5feb73022 Move PlatformColorValueTypesIOS comments from .d.ts to .js (#49834)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49834

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D70615477

fbshipit-source-id: 4f042d05a1c487ace87af07809c70e6a2582d652
2025-03-05 03:30:42 -08:00
Riccardo Cipolleschi 290257e76d Fix Sonatype publishing (#49836)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49836

We were passing the path to the `RegularFile` instead of the `PublishingArtifacts` to the gradle script.

cortinico why this is not checked at build time? This should be a typing issue that should be caught at build time, also during the test-all jobs, not just when the nightly run...

## Changelog:
[Internal]

Reviewed By: cortinico

Differential Revision: D70617638

fbshipit-source-id: 67ff1aea2bd827fb110db7a0d2f3651b88a1e8cc
2025-03-05 03:30:32 -08:00
Riccardo Cipolleschi 908146caa5 Fix TMManager moduleProviderForName (#49835)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49835

The implementation of moduleProviderForName is slightly off.

This method was supposed to replace the previous ternary expression and to enhance with the module provider call.

The ternary expression used to be
```
!RCTTurboModuleInteropEnabled() || [self _isTurboModule:moduleName] ? [self _provideObjCModule:moduleName] : nil
```

However, as you can see from the current implementation, instead of calling `RCTTurboModuleInteropEnabled()` we are calling `RCTTurboModuleEnabled()` which is clearly a mistake.

On top of that, I'm also updating the guard around the `getModuleProvider` selector as it was bypassing the other checks, and that's wrong.

## Changelog:
[Internal] - Fix moduleProviderForName method

Reviewed By: RSNara

Differential Revision: D70569552

fbshipit-source-id: ed4055da9ea385ed10323ed8d7a8772010b3a105
2025-03-05 03:24:07 -08:00
Dawid Małecki a1ed5f9014 Add type tests for process color (#49832)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49832

Changelog:
[Internal] - Added type tests for process color

Reviewed By: huntie

Differential Revision: D70561282

fbshipit-source-id: b410459233348fe584bee29b74b72804013f170f
2025-03-05 02:44:20 -08:00
Sam Zhou 12ac3e7273 Deploy 0.263.0 to xplat
Summary: Changelog: [Internal]

Reviewed By: panagosg7

Differential Revision: D70606997

fbshipit-source-id: bd89ea370fbc408fbc22a4ac2f7463a09bdb1ffd
2025-03-04 22:04:46 -08:00
Sam Zhou 7c5995df4a Deploy 0.263.0 to xplat (#49825)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49825

Changelog: [Internal]

Reviewed By: pieterv

Differential Revision: D70595199

fbshipit-source-id: a3be1b74cca99f0ff79aca4dd51059b3b09facb2
2025-03-04 21:35:46 -08:00
David Vacca bf72322912 Annotate NullSafe(LOCAL) for classes in java/com/facebook/react (#49768)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49768

Nullsafety scripts and analysis determine it's safe to annotate these classes as NullSafe(LOCAL)

changelog: [internal] internal

Reviewed By: javache, rshest

Differential Revision: D70464135

fbshipit-source-id: a430a6a04bbb49b3f830dbe68a46d3268afe628b
2025-03-04 19:56:16 -08:00
David Vacca 835d2079fd Introduce LegacyArchitectureLogger class (#49823)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49823

Introduce LegacyArchitectureLogger class, which provides logging functionality to help track and debug usage of legacy architecture components when an app is running on the new architecture. The data provided by this class will  help identify classes and methods that are still being used in the new architecture when they shouldn't.

changelog: [Internal] Internal

Reviewed By: rshest

Differential Revision: D70543605

fbshipit-source-id: 56262170c03bb0fd375b8dc3cb34a7c15a69a810
2025-03-04 18:21:55 -08:00
Mateo Guzmán f60a48c9f3 Migrate PositionAndSizeAnimation to Kotlin (#49756)
Summary:
Migrate com.facebook.react.uimanager.layoutanimation.PositionAndSizeAnimation to Kotlin.

## Changelog:

[INTERNAL] - Migrate com.facebook.react.uimanager.layoutanimation.PositionAndSizeAnimation to Kotlin

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

Test Plan:
```bash
yarn test-android
yarn android
```

Reviewed By: rshest

Differential Revision: D70493553

Pulled By: Abbondanzo

fbshipit-source-id: 48b57901e93c32a8bc1ba40988eeae12bfc4aea1
2025-03-04 13:00:19 -08:00
Janic Duplessis b614c966ab Setup a Macrobenchmark for RNTester (#49486)
Summary:
Benchmark to test changes from https://github.com/facebook/react-native/issues/49449

Might be nice to have some version of this in the repo.

## Changelog:

[INTERNAL] [ADDED] - Setup a Macrobenchmark for RNTester

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

Test Plan:
### Methodology

Picked various JS file from websites (facebook, instagram) to artificially grow RN tester bundle somewhat realistically. The files are required lazily from a button press callback to simulate the code being included, but not executed, as it would be in a large app that uses lazy requires for the different screens.

I've also made the RN tester screens lazy so all their code is not loaded initially. This is more representative of real apps. Note this is implemented in a hacky way just for the purpose of this test. It would actually be nice to implement this properly.

The tests were made using low end device Samsung Galaxy A03s.

### Compression ON with 10.5 mb bundle

#### Peak allocated memory

60.9 mb

#### ReactInstance.loadJSBundler

148.64 ms

#### Benchmark

timeToFullDisplayMs      min 1,825.0,   median 1,911.1,   max 1,994.8
timeToInitialDisplayMs   min   834.9,   median   860.9,   max   903.9

#### APK

Size: 22.9 mb
Download size: 14.5 mb

### Compression OFF with 10.5 mb bundle

#### Peak allocated memory

51.5 mb

#### ReactInstance.loadJSBundler

946 us

#### Benchmark

timeToFullDisplayMs      min 1,752.8,   median 1,827.2,   max 1,977.5
timeToInitialDisplayMs   min   837.7,   median   881.3,   max   937.2

#### APK

Size: 28 mb
Download size: 14.5 mb

Reviewed By: rshest

Differential Revision: D70002286

Pulled By: cortinico

fbshipit-source-id: 436597f439ba244649373870c1facefdb12297d9
2025-03-04 12:56:07 -08:00
Alex Hunt f94dbb30ee Exclude HostAgent implementation in release builds (#49813)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49813

Making use of the recently standardised `REACT_NATIVE_DEBUGGER_ENABLED` preprocessor flag, conditionally swap out `HostAgent` for a stub in production (non dev, non profiling) builds. This uses the same private implementation idiom as `HermesRuntimeTargetDelegate`.

This results in a **42.2kiB** size reduction (uncompressed) in production builds, due to excluding the CDP agent components of `jsinspector-modern`.

- Intentionally, we're gating just this logic, rather than several outer integration points/native bindings for `jsinspector-modern`. This is for predictability and maintenance — the Fusebox subsystem is always loaded/bound, but can fork to an empty implementation.

 {F1975625351}

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D70495853

fbshipit-source-id: 00253ac71444819a917a3781efe38365acb91e85
2025-03-04 10:17:04 -08:00
Pieter De Baets 6bf6cebcf0 Remove usage of folly::to (#49786)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49786

Most of these call-sites are only used for exceptional scenarios, so we can just rely on std::to_string and do string concatenation. For a few others that may be more perf-sensitive, I switched over to `snprintf`.

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D70402439

fbshipit-source-id: 3b90ebb13a7bf1c6cf30722ef636e5e8498a5b26
2025-03-04 10:07:09 -08:00
Vitali Zaidman 86b1f9ac07 fix type on the flow types for "chalk" (#49814)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49814

`bgWhiteBrigh + t = bgWhiteBright`
seems like no one was using `chalk.bgWhiteBright` before me :)

Changelog:
[General][Internal] fix type on the flow types for "chalk"

Reviewed By: huntie, hoxyq

Differential Revision: D70403987

fbshipit-source-id: 34f65e57fbb2eeadd6030557e0499db0b2603b38
2025-03-04 10:05:30 -08:00
Riccardo Cipolleschi fc264400ec Fix PullToRefresh props casting (#49815)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49815

The pull to refresh component props's casting is imprecise.
This change uses the more precise type for the props.

## Changelog:
[Internal] - cast props to `PullToRefreshViewProps`

Reviewed By: sammy-SC

Differential Revision: D70559080

fbshipit-source-id: c42d3d41a22683a3392813c2af25828781a68401
2025-03-04 10:04:36 -08:00
Ruslan Lesiutin ed7dbce799 Increase Hermes Sampling rate to 10kHz (#49795)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49795

# Changelog: [Internal]

I've been able to reliably and consistently record samples with an interval between 2 consecutive ones to be ~0.1-0.2ms, lets bump the sampling frequency to have more frames.

On Windows, Hermes Sampler peaks at ~500Hz, so this won't have much effect.

Reviewed By: huntie

Differential Revision: D70395983

fbshipit-source-id: 9a9e619d75096a3ee75e0e1a2f8b8fff33130268
2025-03-04 08:10:41 -08:00
Ruslan Lesiutin df4433c40e Serialize and send Profile trace events after emitting the buffer (#49794)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49794

# Changelog: [Internal]

Before, we would store all User Timings and Timeline Events in the PerformanceTracer's buffer, and then add Profile event to it as well.

On larger apps, the amount of events buffered could reach ~100k, which inevitably would cause OOM.

With this approach, we will flush out buffered events from PerformanceTracer first, then do JavaScript Profile serialization, then send it over CDP straight away.

Reviewed By: huntie

Differential Revision: D70395982

fbshipit-source-id: 2c17abba421fa9c4afc4d4ca36afd98b1db50905
2025-03-04 08:10:41 -08:00
Mateo Guzmán 71fbf51979 Migrate ReactNativeVersion Android template to Kotlin (#49758)
Summary:
Added a new template `ReactNativeVersion.kt-template.js` to be used to generate the Kotlin template for Android. Updating also the set-rn-artifacts-version script to use this template instead of the Java one.

## Changelog:

[INTERNAL] - Migrate ReactNativeVersion Android template to Kotlin

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

Test Plan:
```bash
yarn test-android
yarn android
node ./scripts/releases/set-version.js 1000.0.0
```

Reviewed By: huntie, rshest

Differential Revision: D70486775

Pulled By: cortinico

fbshipit-source-id: 5dd1e0e2ecf4d848dc24e6c47df243a1259ab559
2025-03-04 07:38:18 -08:00
Fabrizio Cucci e85079219f Add changelog for 0.79.0-rc.0 (#49808)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49808

As per title.

Changelog: [Internal]

Reviewed By: cortinico, cipolleschi

Differential Revision: D70553252

fbshipit-source-id: ce8721017cbfa8d114f3d3acc5aa67762924c4d9
2025-03-04 07:32:51 -08:00
Pieter De Baets 5411b143ef Use fast_float in CSS parser (#49751)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49751

fast_float promises significant improvements in float parsing performance and is already what's being used in folly internally. Unifying all percentage parsing on the new css parser logic, which can use fast_float internally.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D70392268

fbshipit-source-id: 56147e5478d008bc2c34579df035ec7acf8744bb
2025-03-04 07:25:59 -08:00
Pieter De Baets 3dc78f804a Update fast_float dependency to 8.0.0 (#49775)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49775

Upgrading this dependency to match folly and to enable using this for number parsing across Fabric.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D70482373

fbshipit-source-id: 64429595c1126e6a06436701a7562bdf6dd962d5
2025-03-04 07:25:59 -08:00
Riccardo Cipolleschi a8e25733dd Use the right file for dSYM (#49807)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49807

This change fixes a copy-and-paste mistake in passing the right parameter for publishing the ReactNativeDependencies dSYMs.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D70552858

fbshipit-source-id: fc103814420d94180d26c89ba9b405693864a64b
2025-03-04 06:24:32 -08:00
Vitali Zaidman 49af871af4 reduce the space occupied by initial metro logs (#49805)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49805

Changelog:
[General][Internal] reduce the space occupied by initial metro logs

Reviewed By: huntie

Differential Revision: D70488459

fbshipit-source-id: 23865e117c372a8c4a25ec89fbd5c4daacb6a596
2025-03-04 05:46:00 -08:00
Alex Hunt 9c6af97ff8 Include root entry point, switch to excludes (#49806)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49806

Changelog: [Internal]

Reviewed By: iwoplaza

Differential Revision: D70488623

fbshipit-source-id: 72f10da4082754dea7d8675f09559607ac96905e
2025-03-04 05:35:34 -08:00
Alex Hunt ec851ccf4f Simplify type source file resolution logic (#49785)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49785

Changelog: [Internal]

Reviewed By: cipolleschi, iwoplaza

Differential Revision: D70487265

fbshipit-source-id: ed4654e975f5fec0fe76f8d5f156fef611e24d14
2025-03-04 05:35:34 -08:00
Nicola Corti 3132cc88dd Enable RTTI to fix exception pointer issue on React Native
Summary:
X-link: https://github.com/facebook/yoga/pull/1791

Disabling RTTI for Yoga is causing std::exception to don't work properly in OSS.
Fixes: https://github.com/facebook/react-native/issues/48027

Not sure why we originally disabled RTTI for Yoga, but we have it enable for the whole
React Native build so it probably makes sense to have it enabled for Yoga as well.

Changelog:
[Internal] [Changed] - Enable RTTI to fix exception pointer issue on React Native

bypass-github-export-checks

Reviewed By: javache, NickGerleman

Differential Revision: D70386744

fbshipit-source-id: 36e3a1ddb38346d31979d5c1b77d6e9796d6a855
2025-03-04 04:51:38 -08:00
Nicola Corti 25949b361c Refactor ReactCommon to use target_compile_reactnative_options (#49803)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49803

This refactors the whole ReactCommon to use the `target_compile_reactnative_options` macro we just introduced.

Changelog:
[Internal] [Changed] -

Reviewed By: javache

Differential Revision: D70386740

fbshipit-source-id: 1f15ea7e182d79bbb0bedce653284808e3309e4f
2025-03-04 04:51:38 -08:00
Facebook Community Bot 88fb0218fb Re-sync with internal repository (#49811) 2025-03-04 11:55:38 +00:00
Fabrizio Cucci a58aae46df Fix destructuring error in Verify Release is on NPM step
Summary:
Found this issue while releasing 0.79.0-rc.0 (see [job](https://github.com/facebook/react-native/actions/runs/13649159968/job/38156418752)).

bypass-github-export-checks

```
SyntaxError: Invalid destructuring assignment target
    at new AsyncFunction (<anonymous>)
    at callAsyncFunction (/__w/_actions/actions/github-script/v6/dist/index.js:15143:16)
    at main (/__w/_actions/actions/github-script/v6/dist/index.js:15236:26)
    at /__w/_actions/actions/github-script/v6/dist/index.js:15217:1
    at /__w/_actions/actions/github-script/v6/dist/index.js:15268:3
    at Object.<anonymous> (/__w/_actions/actions/github-script/v6/dist/index.js:15271:12)
    at Module._compile (node:internal/modules/cjs/loader:1469:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
    at Module.load (node:internal/modules/cjs/loader:1288:32)
    at Module._load (node:internal/modules/cjs/loader:1104:12)
```

## Changelog:
[Internal] -

Reviewed By: cipolleschi

Differential Revision: D70552301

fbshipit-source-id: b50e3d76c7497cc218e379400d5870531669abe1
2025-03-04 03:17:46 -08:00
David Vacca 25d501df7e Annotate LegacyArchitecture classes for com/facebook/react/uimanager package (#49764)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49764

Annotate LegacyArchitecture classes for com/facebook/react/uimanager package

changelog: [internal] internal

Reviewed By: rshest

Differential Revision: D70441495

fbshipit-source-id: fd3e5b3a40dffc31197df2153cde528bc723a2ab
2025-03-03 17:31:27 -08:00
David Vacca 8254758f74 Annotate Legacy Architecture classes of com/facebook/react (#49765)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49765

Annotate Legacy Architecture classes of com/facebook/react

changelog: [internal] internal

Reviewed By: rshest

Differential Revision: D70441494

fbshipit-source-id: bc677ce508a0d119258819fc6a02d339dc5d8e9a
2025-03-03 17:31:27 -08:00
David Vacca 7d71f5d2de Mark Bridge classes as LegacyArchitecture (#49763)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49763

Mark Bridge classes as LegacyArchitecture

changelog: [internal] internal

Reviewed By: shwanton

Differential Revision: D70429646

fbshipit-source-id: 12b4ff95f337b046a9f377529d92eac70c16e7ea
2025-03-03 17:31:27 -08:00
David Vacca a8c4b3a274 Mark all LayoutAnination classes as LegacyArchitecture (#49761)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49761

LayoutAnination classes are not used on the new architecture, this diff marks the as LegacyArchitecture to drive its removal

Changelog: [Internal] internal

Reviewed By: rshest

Differential Revision: D70410096

fbshipit-source-id: cda84958985c4133c926455a5c9611773a0d32ec
2025-03-03 17:31:27 -08:00
David Vacca 9915cf0811 Annotate as LegacyArchitecture classes from devSupport, internal and jsexecutor (#49766)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49766

Annotate as LegacyArchitecture classes from devSupport, internal and jsexecutor

changelog: [internal] internal

Reviewed By: rshest

Differential Revision: D70441497

fbshipit-source-id: bfb4f5ce7dc4c73e120bdf00ebc21ffd07b5b43b
2025-03-03 17:08:21 -08:00
David Vacca 40b38d0a44 Delete Deprecated classs StandardCharsets (#49762)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49762

Delete Deprecated classs StandardCharsets

changelog: [Android][Breaking] Delete Deprecated classs StandardCharsets

Reviewed By: rshest

Differential Revision: D70441496

fbshipit-source-id: f8f9cf9fc5a90d73d79a6493c7343a80f683c237
2025-03-03 17:08:21 -08:00
Nicola Corti c4c3d3bfbe Do not use $ in identifiers for event emitters. (#49792)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49792

This removes the `$` from the `event` and `payload` identifier inside codegen.
This is causing the `-Wdollar-in-identifier-extension` warning to fire.

As I'm looking into enabling `-Wall -Werror` for React Common, this should be addressed as well.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D70500543

fbshipit-source-id: c593680961b1b98561c3985f92ade5d6ba448ac9
2025-03-03 16:47:46 -08:00
Nicola Corti a724b27301 Remove _Nullable from jni_lib_merge.
Summary:
This is causing the `-Wno-nullability-extension` warning to fire.
As I'm looking into enabling `Wall Werror` for ReactCommon, this should be fixed as it's causing the build to fail.

We don't use nullability extensions at all in the other JNI_OnLoad files, so it's fine (and probably better) we
replace them with a function that also doens't specify a Nullability annotation.

This is impacting only the OSS So Merging toolchain.

Changelog:
[Internal] [Changed] -

bypass-github-export-checks

Reviewed By: cipolleschi

Differential Revision: D70500544

fbshipit-source-id: 2d5b52d8f34ec026a25e8625bd0c6a1812221dea
2025-03-03 16:47:46 -08:00
Riccardo Cipolleschi 53eaf3e4e4 Back out "fix: avoid race condition crash in [RCTDataRequestHandler invalidate]" (#49797)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49797

Backing D70314889 as it was breaking some internal tests.

I verified that before the backout the tests were failing and after the backout they were not.

## Changelog:
[iOS][Changed] - Reverted  fix: avoid race condition crash in [RCTDataRequestHandler invalidate].

Reviewed By: Abbondanzo

Differential Revision: D70511155

fbshipit-source-id: 276f6947aa6bb648c9c9eeb5c342f336acc8a26f
2025-03-03 15:25:46 -08:00
Samuel Susla 5e39bd6131 move initialisation of UIKit proxies to RCTHost initialisation (#49790)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49790

changelog: [internal]

Reviewed By: cipolleschi

Differential Revision: D70399708

fbshipit-source-id: f9883616377343f6c29eaa0ccee8681967fa570c
2025-03-03 10:24:28 -08:00
Jorge Cabiedes Acosta df282a0538 Add prerelease staging API for iOS (#49650)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49650

- Added a new template to React Native's Feature Flag's script for Canary and Experimental prerelease stages iOS
- Overload initWithDelegate to add optional releaseLevel parameter
- Add Obj-C enum for Release Level
- Use static variables to keep the context on whether a ReactNative Factory has been created and with which flags it has been created.
- Crash in case we try to create multiple factories with different feature flags.
- Creating multiple factories with the same feature flags is allowed

Changelog: [iOS] [Added] - On `RCTReactNativeFactory` add `initWithDelegate` overload with argument to specify release level for an application

Reviewed By: cipolleschi

Differential Revision: D70106210

fbshipit-source-id: 14fe4c8571621a75a7064f1ffd02a07270cea43a
2025-03-03 09:52:26 -08:00
Nicola Corti 5f0c857c0e Move react-native-flags.cmake to ReactCommon (#49745)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49745

It turns out we want those flags to be available also inside ReactCommon so I'm moving it there.
This will allow us to reference them also inside ReactCommon and will make sure Common does not depend on Android

Changelog:
[Internal] [Changed] -

Reviewed By: javache

Differential Revision: D70386742

fbshipit-source-id: 3675c01f5e3f6515af6423d75e3fe145ba3d8936
2025-03-03 09:41:24 -08:00
Nicola Corti d8b714488b Use target_compile_reactnative_options for the remaining third-party libs (#49743)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49743

Those 3rd party CMake libraries were not using our compiler flags correctly.
This fixes it.

Changelog:
[Internal] [Changed] -

Reviewed By: javache

Differential Revision: D70386743

fbshipit-source-id: e35688f7eb3fa9bcdda1180023006d267782ceaf
2025-03-03 09:41:24 -08:00
Nicola Corti 87466a2025 Use target_compile_reactnative_options on all the remaining ReactAndroid targets (#49744)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49744

Those targets inside ReactAndroid were not setting the compiler flags correctly for React Native.
This change fixes them.

Changelog:
[Internal] [Changed] -

Reviewed By: javache

Differential Revision: D70386747

fbshipit-source-id: 424e93c444347db88c941d442e0eaeedf2b1bee1
2025-03-03 09:41:24 -08:00
Nicola Corti fb55ab9c84 Introduce the target_compile_reactnative_options function (#49747)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49747

I'm adding the `target_compile_reactnative_options` to centralize the management
of compilation flags for React Native CMake build.

Changelog:
[Internal] [Changed] -

Reviewed By: javache

Differential Revision: D70386746

fbshipit-source-id: aefbd5a073d9fab48d09ebbba6507377ef626d73
2025-03-03 09:41:24 -08:00
Riccardo Cipolleschi 42052940ea Fix caches for RNTester (#49791)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49791

The cache for RNTester is broken because the matrix parameters used to test RNTester are not part of the job_id that is used to create the cache keys to restore the Podfile.lock.

This means that we have a race condition on which job of the matrix manages to save the cache. However, those caches are not always valid for the other jobs that presents different matrix parameters.

This change should fix the issue.

## Changelog:
[Internal] - Fix test-rn-tester cache Cache

Reviewed By: cortinico

Differential Revision: D70493507

fbshipit-source-id: 1db6e00507b3e9abe4400831ee1b048c620b9102
2025-03-03 09:05:28 -08:00
Pieter De Baets d3b203f2cb Cleanup enableAnimatedClearImmediateFix (#49787)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49787

We're not experimenting with this, so cleanup the code.

Changelog: [Internal]

Reviewed By: fabriziocucci

Differential Revision: D70488980

fbshipit-source-id: 12e93b7f8fb89e3bb1f06c8f734b782286f3fad3
2025-03-03 08:04:27 -08:00
Rob Hogan 035142e62d metro-config: Don't always assert import/require with unstable_enablePackageExports (#49780)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49780

Now that we're using a minimum Metro version of 0.81.3, Metro will dynamically assert `import` or `require` based on the style of the import at source.

Asserting both is likely to cause issues with `babel/runtime` and potentially other packages - see https://github.com/facebook/metro/pull/1447.

Changelog:
[Internal] metro-config: Assert import/require dynamically when using `unstable_enablePackageExports` with Metro.

Reviewed By: hoxyq

Differential Revision: D70473577

fbshipit-source-id: b3e6fbd78e2b6fc0f9a16ec3db2c19698848e6d1
2025-03-03 07:58:20 -08:00
Rob Hogan 6606a1da84 Update Metro ^0.81.0 -> ^0.81.3 || ^0.82.0 (#49779)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49779

Changelog:
[General][Changed] Bump minimum Metro from 0.81.0 to ^0.81.3 || ^0.82.0

Reviewed By: hoxyq

Differential Revision: D70473389

fbshipit-source-id: aee3cb073fef420fd7bc1efedb0b48411b038c44
2025-03-03 07:58:20 -08:00
Riccardo Cipolleschi b8a0499ce4 Publish dSYMs for RN Dependencies (#49782)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49782

This commit adds the configuration to upload the ReactNativeDependencies.dSYM files to maven

## Changelog:
[Internal] - Add code to upload dSYMs to Maven

Reviewed By: cortinico

Differential Revision: D70485966

fbshipit-source-id: 129dea1c75181f22e9bf304e39ac91835bb87b39
2025-03-03 07:26:36 -08:00