Commit Graph

38536 Commits

Author SHA1 Message Date
Rubén Norte 4ae86e651c Enable enableIntersectionObserverEventLoopIntegration feature flag by default (#51472)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51472

Changelog: [internal]

This enables the integration of `IntersectionObserver` with the Event Loop by default.

Reviewed By: rshest, javache

Differential Revision: D74991641

fbshipit-source-id: 7f12d7d5413d12a6a7de53e9d6701195d48996dc
2025-05-20 05:40:00 -07:00
Rubén Norte 3aeba22dda Integrate IntersectionObserver in Event Loop (#51452)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51452

Changelog: [internal]

This implements a long planned refactor of `IntersectionObserver` to have a proper integration with the Event Loop, which unblocks `FragmentRef` in React Native.

The existing integration doesn't integrate with the Event Loop, so the intersection determination doesn't happen as a step in the event loop but in 2 different moments:
1. When you start observing a new target, we check if there are any pending transactions for that target, and otherwise determine the intersection immediately and queue the notifications.
2. Using mount hooks, when a transaction for a surfaceId is mounted, we check intersections for all the observers in that surface.

This has an important problem:
* If you attach a observer on a target before the target is attached to the tree (something that `FragmentRef` will start doing soon), we don't have a pending transaction so we determine intersections immediately. In that case, it's always "not visible" because it's not attached, and then we immediately trigger a transition when mounted in the same tick.

To fix this, we can implement a step in the Event Loop the same way that `IntersectionObserver` does on Web. We would still wait for pending transactions to be mounted to determine intersection timing (the same way we do now, but now checking at the end of the current Event Loop tick), but the dispatch of initial notifications for target that won't change is done at the end of the tick instead of synchronously.

It also refactors the list of active observers as a list of shared pointers to `IntersectionObserver` objects, instead of as list of `IntersectionObserver` objects directly. This is necessary to build the list of pending observers (with stable references) while making sure the ownership stays in the list of active observers.

Reviewed By: javache

Differential Revision: D74883214

fbshipit-source-id: 24accf1dba48d13b5773950a5cbf9ea38f4a1745
2025-05-20 05:40:00 -07:00
Oskar Kwaśniewski 50ce8c77a7 fix: make RCTScreenSize take horizontal orientation into account (#51444)
Summary:
This PR improves `RCTScreenSize` to handle horizontal orientations. This was causing a flicker whenever opening a Modal in horizontal orientation. Currently, `RCTScreenSize` is used to supply initial state for `ModalHostViewState`:

https://github.com/facebook/react-native/blob/f1697544cd720df21bd7dc8ca993d95a41321e3f/packages/react-native/ReactCommon/react/renderer/components/modal/ModalHostViewState.h#L31

This works great in portrait mode, but causes onLayout the be called twice in horizontal orientation (first with screen size and then with actual size..)

## Changelog:

[IOS] [FIXED] - make RCTScreenSize take horizontal orientation into account

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

Test Plan: Open modal in horizontal orientation

Reviewed By: cipolleschi

Differential Revision: D74978651

Pulled By: rshest

fbshipit-source-id: f026e727b3529766de38dd31059c51b255f33e78
2025-05-20 04:54:33 -07:00
Riccardo Cipolleschi f4250fa09e Refactor the prebuild script to use fetch instead of curl (#51398)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51398

As a followup after the comment of D74565936 (https://www.internalfb.com/diff/D74565936?dst_version_fbid=727294986523938&transaction_fbid=1121452289999956), I refactored the code to use `fetch` instead of `curl`.

## Changelog:
[Internal] - Refactor the code to use Fetch instead of curl

Reviewed By: NickGerleman

Differential Revision: D74886699

fbshipit-source-id: 843e915a5b13f420e9036c32a421d47beb5b5860
2025-05-20 04:32:46 -07:00
Christian Falch 9371e20192 fixed build type when downloading hermes artifacts (#51283)
Summary:
Hermes build-type was hardcoded to 'release' in the previous version of the prebuild scripts.

This commit fixes this so that we can provide a build-type for hermes when downloading prebuilt tarballs.

- Cleaned up parameters in hermes.js
- Updated with buildType parameter when suitable
- Fixed some function names
- Updated version file so that it contains build type
- Removed version file when using a local tarball

## Changelog:

[IOS] [FIXED] - Fixed resolving build type when downloading hermes artifacts

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

Test Plan: No test-plan yet

Reviewed By: cortinico

Differential Revision: D74882001

Pulled By: cipolleschi

fbshipit-source-id: cfeed934023712e70f7d04c137e8611164120cec
2025-05-20 04:32:46 -07:00
Christian Falch e2f6ce4ddf fixed defines in package.swift (#51284)
Summary:
Our Cocoapods config has a list of defines that are used mostly when setting up pods:

- RCT_FABRIC_ENABLED
- USE_HERMES
- RCT_AGGREGATE_PRIVACY_FILES
- RCT_NEW_ARCH_ENABLED
- APP_PATH
- REACT_NATIVE_PATH
- RCT_SKIP_CODEGEN
- SWIFT_ACTIVE_COMPILATION_CONDITIONS
- USE_FRAMEWORKS
- USE_THIRD_PARTY_JSC
- HERMES_ENABLE_DEBUGGER
- REACT_NATIVE_DEBUGGER_ENABLED
- REACT_NATIVE_DEBUGGER_ENABLED_DEVONLY

Out of these, only the following are used in objective-c/c code:

- USE_HERMES
- HERMES_ENABLE_DEBUGGER
- REACT_NATIVE_DEBUGGER_ENABLED
- REACT_NATIVE_DEBUGGER_ENABLED_DEVONLY

This commit adds the required defines to the correct targets.

## Changelog:

Pick one each for the category and type tags:

[IOS] [FIXED] - fixed defines in package.swift

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

Test Plan: No test-plan yet

Reviewed By: cortinico

Differential Revision: D74872272

Pulled By: cipolleschi

fbshipit-source-id: 5d9a68c1d819409bc7400ade622f62bb332d0896
2025-05-20 04:32:46 -07:00
Christian Falch ccbf878fb8 cleanup logging (#51243)
Summary:
Cleaned up logging

- Added `prebuildLog` function to harmonize output
- Reduced output from creating headers

bypass-github-export-checks

## Changelog:

[INTERNAL] [CHANGED] - cleaned up iOS-prebuild logging

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

Test Plan: No tests required.

Reviewed By: cortinico

Differential Revision: D74569484

Pulled By: cipolleschi

fbshipit-source-id: b41d336320762a6adcb82faec4e6d633c6a9a8a5
2025-05-20 04:32:46 -07:00
Christian Falch 41d2b5de0a add download/extract hermes prebuilts (#51216)
Summary:
When running the prebuild script:

`node scripts/ios-prebuild.js`

The script will now try to resolve and download a prebuilt version of hermes:

1. Hermes artifacts will be extracted to the `./build/artifacts/hermes` folder to ensure that Package.swift can find a version to link against.
2. The script checks the environment variable `HERMES_ENGINE_TARBALL_PATH` and tries do expand the tarball into the artifacts folder from 1
3. If not found, the script reads the hermes version from either the hidden environment-variable `HERMES_VERSION` and tries to download a release-tarball or a nightly tarball for this version. If the version does not exist, the script will fail.

Also added some extra logging features to the script.

bypass-github-export-checks

## Changelog:

[IOS] [ADDED] - Added downloading of hermes artifacts when pre-building for iOS.

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

Test Plan:
1. Delete the `packages/react-native/.build` folder
2. Run the build script (provide a valid HERMES_ENGINE_TARBALL_PATH or a valid Hermes version (or nightly version)
3. Verify that the script successfully exits
4. Build the Package.swift in Xcode and verify that it finds and links the relevant Hermes files, verifying is done by the build succeeding.

Reviewed By: NickGerleman

Differential Revision: D74565936

Pulled By: cipolleschi

fbshipit-source-id: 5bd231999da24cfcce446150ac0fc1b5a4b6a4ae
2025-05-20 04:32:46 -07:00
Pieter De Baets d6371bd6ac Improve naming of template args in bridging (#51418)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51418

Improve readability

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D74884371

fbshipit-source-id: 26b6966458097c8ac8d030629a1bee131418a34d
2025-05-20 03:57:43 -07:00
Mateo Guzmán 5596923189 Legacy Native Module e2e test (#51449)
Summary:
Found an issue with the legacy native module calls in old architecture (https://github.com/facebook/react-native/issues/51443) and got the idea of adding some simple e2e tests for the native modules so regressions like this can be captured moving forward.

This doesn't cover all methods, as not all of them are available for both Android and iOS, and also some of them are currently crashing, so it makes no sense to cover them all yet – but this can be used as a good starting point to increase coverage for essential APIs.

## Changelog:

[INTERNAL]  - Legacy Native Module e2e test

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

Test Plan:
```sh
cd packages/rn-tester && maestro test .maestro/legacy-native-module.yml -e APP_ID=com.facebook.react.uiapp
```

<img width="594" alt="image" src="https://github.com/user-attachments/assets/6237613d-f5dc-4d8a-9b12-0980177793eb" />

<img width="740" alt="image" src="https://github.com/user-attachments/assets/8bdef368-13ac-494c-a506-88fff01dc8d6" />

Reviewed By: cortinico

Differential Revision: D74978093

Pulled By: rshest

fbshipit-source-id: f9c7ba3ca5177eb3d3863d2b8252ac17f3d07aa0
2025-05-20 03:35:42 -07:00
React Native Bot 5d30829eb4 Add changelog for v0.80.0-rc.2 (#51463)
Summary:
Add Changelog for 0.80.0-rc.2

## Changelog:
[Internal] - Add Changelog for 0.80.0-rc.2

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

Test Plan: N/A

Reviewed By: cipolleschi

Differential Revision: D75050745

Pulled By: rshest

fbshipit-source-id: 91739212e3e646acdb33c01e65ed6fff4330cf7e
2025-05-20 03:27:32 -07:00
riteshshukla04 89e6c72fd4 Correct Link for Networking (#51396)
Summary:
I noticed the link to networking in new app screen is wrong. So correcting it here

## Changelog:
[GENERAL][FIXED] - Fix Networking URL in New app screen

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

Test Plan: Click on the link to open

Reviewed By: arushikesarwani94

Differential Revision: D74886240

Pulled By: cortinico

fbshipit-source-id: 19ccf63e64f0e40df4a0ab4082299c654926e35d
2025-05-20 03:07:42 -07:00
Krystof Woldrich 6399caef63 fix(types): Reference global.d.ts using path not types (#51104)
Summary:
After https://github.com/facebook/react-native/pull/49516 TSC would not find the global types.

Types reference expect a package name but was given a path to a declaration.

TS doc: https://www.typescriptlang.org/docs/handbook/triple-slash-directives.html#-reference-path-

This PR changes `types` to `path` to fix the issue.

`dtslint` fails with `no-bad-reference` rule, but the `../src` lives in the same package in `react-native` package.

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

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

[GENERAL] [FIXED] - Reference `global.d.ts` using `path` so they can be resolved by TSC

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

Test Plan:
Before the change with current RN 0.79.2 TSC would fail on resolving the global types (example from [Sentry RN SDK build](https://github.com/getsentry/sentry-react-native/commit/134d810cf95416091779806e00d3a3cc6cbace89)):

![Screenshot 2025-05-05 at 17 18 04](https://github.com/user-attachments/assets/b264c8da-aa21-49d8-9597-82586291a01a)

After the change to path TSC finds the global types.

Using TSC Version 4.9.5

Reviewed By: huntie

Differential Revision: D74208815

Pulled By: coado

fbshipit-source-id: 2fd51d79061ffb356c047604213cff7a425f167e
2025-05-20 00:52:43 -07:00
Nick Gerleman 9fe20d4ea3 Remove Measurement Placeholder Logic from Text ShadowNodes (#51465)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51465

Prior to D63303709 AttributedString could not represent formatting on an empty string, and so some text content was forcefully added to empty strings during measurement.

This is problematic in combination with Facsimile, where we directly render the layout we used during measurement, since empty text now has a random "I" in it.

Android's TextLayoutManager already knows how to interpret `baseTextAttributes`, and the placeholder is not needed. Other platforms should be updated to do the same, but that may be non-trivial to validate everywhere.

This diff removes logic from ShadowNodes to always inset a placeholder, and instead shims it in platform TextLayoutManagers which have not yet been updated to use `BaseTextAttributes`. That way, we don't force placeholders during measurement, and different platforms can incrementally unjank their code.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D74770916

fbshipit-source-id: 7cf19db1a9a5cf68137bbff81b14ce5288235b2b
2025-05-19 18:15:39 -07:00
Nick Gerleman 0cd6a29981 TextSharedExamples and empty text E2E test (#51464)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51464

Add a module of shared examples, like `TextInputSharedExamples`, to avoid copy/paste between these.

Modifies the empty test example a bit and adds an E2E test.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D74780847

fbshipit-source-id: 30c2830ef0b638680fe75b4bcf9f138f5c01e190
2025-05-19 18:15:39 -07:00
Ruslan Lesiutin ce4334233c Validate marks presense, if specified (#51389)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51389

# Changelog: [Internal]

This is the pre-requisite for the diff on top, which migrates performance-related classes to start using `HighResTimeStamp`.

We should be throwing `SyntaxError` if the specified mark name is not buffered. Like Chromium does:
 {F1978032319}

In this diff:
- `PerformanceEntryReporter::getMarkTime` is now public, ca be called by `NativePerformance` and returns `std::optional`.
- `NativePerformance` is responsible for validating that marks are present in the buffer, if their names are specified in `.measure()` call.
- Mark names take precedence over `startTime` and `endTime` values, so if they are specified and not available, then we will throw Error over `jsi` that will be catched on JavaScript side in `Performance.js`.

Reviewed By: rubennorte

Differential Revision: D74837812

fbshipit-source-id: ca2ba198c4c9e6e2d8d37f852affea667f1c174c
2025-05-19 15:24:36 -07:00
Nick Gerleman 5ac46bbb67 Fix random characters in comment in CSSTokenizer (#51417)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51417

tsia

Changelog: [Internal]

Created from CodeHub with https://fburl.com/edit-in-codehub

Reviewed By: joevilches

Differential Revision: D74837890

fbshipit-source-id: b07a30ea49c555f606dbb348c16d5c9f0a6e7b47
2025-05-19 13:58:54 -07:00
Eric Rozell 2f761ee7c4 Do not flush Animated operation queue on mount for some feature flags (#51461)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51461

We are trying to minimize the amount of non-determinism in flushing Animated operation queues. Initially the `ReactNativeFeatureFlags.animatedShouldSignalBatch` handled non-determinism on the native side, eliminating the use of native mount hooks to trigger operation batch flushes in the native module. However, there is additional non-determinism introduced by JS, where the set of pending Animated operations may be flushed as a result of an effect.

This change eliminates the flushing of Animated operations in the `useEffect` for `createAnimatedPropsHook.js`.

## Changelog

[Internal]

Reviewed By: yungsters, zeyap

Differential Revision: D75003751

fbshipit-source-id: 73c7bb02355b5f634f4a800f46ca5f529cd15ebd
2025-05-19 13:49:27 -07:00
Eric Rozell 71caf2c557 Fix cross-over issue with animatedShouldUseSingleOp and animatedShouldSignalBatch (#51459)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51459

When using `animatedShouldSignalBatch` in combination with `animatedShouldUseSingleOp`, we were seeing an issue where the queue is not flushed deterministically. It would be flushed in an ad-hoc manner by `createAnimatedPropsHook.js`, but this was only if a mount happened to occur in the same frame.

Adding a deterministic queue flush mechanism to the logic handling `animatedShouldUseSingleOp` appears to resolve the issue.

## Changelog

[Internal]

Reviewed By: javache

Differential Revision: D75002657

fbshipit-source-id: 51f50af0f22becf152da15a720ba70dfc158cdbf
2025-05-19 13:49:27 -07:00
kocburak a703d4cfc1 Typo fix in InterpolationAnimatedNode for debugging (#51460)
Summary:
I noticed a missing debugging text while working on https://github.com/facebook/react-native/issues/50496. It was a typo. I though I might as well send a PR.

## Changelog:

[Android] [Fixed] - Fixing a typo in InterpolationAnimatedNode for debug text.

<!-- Help reviewers and the release process by writing your own changelog entry.
Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

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

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

Reviewed By: cortinico, shwanton

Differential Revision: D75005096

Pulled By: javache

fbshipit-source-id: 390452b2b0c6eabfa003b9c95719649c79444d3a
2025-05-19 11:02:47 -07:00
Nick Lefever 3306c3b962 Improve naming of the hermes variants (#51456)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51456

Going from:
* static_hermes_stable -> static_hermes
* static_hermes_trunk -> static_hermes_experimental

Changelog: [Internal]

Reviewed By: rubennorte

Differential Revision: D74999979

fbshipit-source-id: f20b07af4c7fddc6d162937b4c96f0bf60902dbd
2025-05-19 10:08:10 -07:00
Ruslan Lesiutin efcc798de9 Make processingStartTime and processingEndTime optional (#51390)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51390

# Changelog: [Internal]

Ideally, these should not be optional, but these values are set at runtime.

Assertions added to validate that these values are set before reporting to `PerformanceEntryReporter`.

Reviewed By: rshest

Differential Revision: D74811439

fbshipit-source-id: 5e95931848263a58d977c07bac0eb18e53b91140
2025-05-19 08:34:29 -07:00
Rubén Norte 935cba270c Adds basic Fantom test for <Button> (#51380)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51380

Changelog: [internal]

Adding more examples of tests for core components with Fantom :)

Reviewed By: lenaic

Differential Revision: D74874581

fbshipit-source-id: 1285c4d222cb811b51155871c245b1bd5889b47a
2025-05-19 04:00:31 -07:00
Nick Lefever 8d8cb718aa Fix NaN value comparison for TextInput component (#51422)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51422

See title

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D74915630

fbshipit-source-id: e7a556229d04f835b80752259d01330d0f4fcd62
2025-05-19 03:12:48 -07:00
Nick Lefever 995129c757 Fix NaN value comparison for Text component (#51421)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51421

See title

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D74915629

fbshipit-source-id: 0c24426c5e04ab3fc6ee85a4ca53e6095f0d3fce
2025-05-19 03:12:48 -07:00
Nick Lefever f278c94a12 Fix accessibilityState serialization for props diffing of View component (#51420)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51420

The checked and unchecked state of the accessibility state property has to be serialized as `{ "checked": true }` and `{"checked": false}`.

This diff updates the serialization of the `accessibilityState` prop for the prop diffing on the View component.

This fixes the e2e test selectors for radio buttons.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D74910744

fbshipit-source-id: 212b78e29a007744ac9283c7ec9b96ce80fd5681
2025-05-19 03:12:48 -07:00
Nick Lefever 01db5aa230 Support running tests with different hermes variants (#51451)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51451

This diff adds the `fantom_hermes_variant` pragma which can be set to:
- `hermes` for the default Hermes runtime used by RN
- `static_hermes` for the stable version of Static Hermes
- `static_hermes_trunk` for the "trunk" version of Static Hermes

Each variant will set up the correct build options for the runner and the correct compiler to use for the bundle.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D74959718

fbshipit-source-id: 5d30c8e15ab052eb5686f26632f08ab42b5e68c7
2025-05-19 03:06:53 -07:00
Nick Lefever b1772de409 Make default mode used for benchmarks more obvious (#51446)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51446

See title

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D74958927

fbshipit-source-id: 245397c6e9a89a40e5c1260fcd624e5f6b9f7c8d
2025-05-19 03:06:53 -07:00
Nick Lefever 0769ddf85b Add documentation for passChildrenWhenCloning feature (#51447)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51447

Changelog: [Internal]

Document how the `passChildrenWhenCloningPersistedNodes` feature works.

Reviewed By: rshest

Differential Revision: D74961913

fbshipit-source-id: 6f412de36acc233a6bdf3d59548035ad884264a8
2025-05-19 02:43:33 -07:00
Nick Lefever b2775a4501 Add technical documentation for RSNRU (#51435)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51435

Changelog: [Internal]

Adding a technical documentation for the Runtime Shadow Node Referece Update (RSNRU) feature.

Reviewed By: rshest

Differential Revision: D74943809

fbshipit-source-id: cf5cc02adefa2635efb29e498747fc733711c2e4
2025-05-19 02:43:33 -07:00
Riccardo Cipolleschi 2fa9c850f7 Avoid duplicated symbols for FollyConvert.h functions (#51393)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51393

In D74738548 we copied RCTFollyConvert to Follyconvert and we moved it to a separate file.

The problem is that when we build react native, we now might have duplicated symbols, especially with prebuilds where the symbols are "flattened" together.

To fix this, we can have the old file point to the new file in order not to break our suers and have a single symbol anyway.

## Changelog:
[Internal] -

Reviewed By: sammy-SC

Differential Revision: D74883143

fbshipit-source-id: 98361307286cdc19c57b8f5c9f066aebea992896
2025-05-18 11:27:39 -07:00
Tim Yung 55cf1e7fd3 RN: Unbreak Rules of React in RNTesterPlatformTestEventRecorder (#51441)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51441

Refactors `RNTesterPlatformTestEventRecorder` so that it does not use `useMemo` from an instance method.

Instead, this diff changes the module to export a hook by the same name, `useRecorderTestEventHandlers`.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D74950333

fbshipit-source-id: 6cb222a6ec077abadbdc7008e822645aba3d07f6
2025-05-18 08:08:24 -07:00
Tim Yung 3371fb57b7 RN: Migrate to ESM - ReactDevToolsSettingsManager (#51440)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51440

Migrates files to use ESM to mitigate the existing lint warning.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D74949984

fbshipit-source-id: e89eb482835cb3a3d3b997dc766803dd307a6b99
2025-05-18 08:08:24 -07:00
Tim Yung 77f2cb27be RN: Migrate to ESM - BackHandler (#51439)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51439

Migrates the `BackHandler` mock to use ESM to mitigate the existing lint warning.

I'm actually not sure this is even used anywhere… and the unmocked `BackHandler` is already using ESM.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D74949885

fbshipit-source-id: 7f37212db2125bb7afdbd342175e3beae6c7c14f
2025-05-18 08:08:24 -07:00
Tim Yung 4434707967 RN: Suppress Lint Error in ReactNativePrivateInterface (#51438)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51438

The `ReactNativePrivateInterface` module needs to continue using `module.exports` in order to lazily import dependencies.

For now, we just suppress the `lint/no-commonjs-exports` lint rule.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D74949839

fbshipit-source-id: 295853be7fb988b879b6fd0b15ef31dd6e47cf85
2025-05-18 08:08:24 -07:00
Tim Yung d798423c29 RN: Migrate to ESM - __flowtests__ (#51437)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51437

Migrates files to use ESM to mitigate the existing lint warning.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D74949792

fbshipit-source-id: d1372bb3a8615fe4544d67f04d26237b06515bad
2025-05-18 08:08:24 -07:00
Tim Yung f1697544cd RN: Migrate to ESM - Libraries/Components/Image (#51434)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51434

Migrates files to use ESM to mitigate the existing lint warning.

I am suppressing `RelativeImageStub` to preserve compatibility with the dynamic asset exports generated by Metro (i.e. not ESM with `default` exports).

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D74943031

fbshipit-source-id: ac4b2afd96fe5446acb4452395d7cb42bb5a6c17
2025-05-17 23:17:37 -07:00
Tim Yung 1218a8a6d0 RN: Delete ErrorUtils Mock (#51433)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51433

This `ErrorUtils` mock is dead code.

There is no `ErrorUtils` module in React Native. (Maybe there was once upon a time...)

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D74942884

fbshipit-source-id: 893458c4bc6f9ed29452579ce81915a52e6cd649
2025-05-17 17:18:55 -07:00
Tim Yung 42d2b1f675 RN: Migrate to ESM - Libraries/Components/RefreshControl (#51431)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51431

Migrates files to use ESM to mitigate the existing lint warning.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D74942842

fbshipit-source-id: bc68b1a3422e97bafc23516e429877a6624f37a3
2025-05-17 17:18:55 -07:00
Tim Yung bfb177cd9e RN: Migrate to ESM - Libraries/Blob (#51427)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51427

Migrates files to use ESM to mitigate the existing lint warning.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D74942792

fbshipit-source-id: a9f5b3e73d4c89f3dd499053d9b575c2eb3b9842
2025-05-17 17:18:55 -07:00
Tim Yung a1da4b102c RN: Fix Existing Lint Warnings (#51426)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51426

Fixes a bunch of ESLint warnings across the codebase.

The only remaining warnings are from the `lint/no-commonjs-exports` rule.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D74942686

fbshipit-source-id: 384de34c7297f7f7fcff1827c8b2e46714a5cda7
2025-05-17 17:18:55 -07:00
Tim Yung 84de8a075e RN: Delete @oncall Annotations (#51416)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51416

Deletes `oncall` annotations from the `facebook/react-native` repository.

Changelog:
[Internal]

Reviewed By: javache

Differential Revision: D74902524

fbshipit-source-id: 32a6a5b2ff27281792d572f151e2b094d9a79029
2025-05-17 16:18:05 -07:00
Tim Yung ba092bfaba RN: Add Missing @format Annotations (#51415)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51415

Adds the `format` annotation to all files that were missing them.

Also, adds `noformat` to generated files, and removed it from files that no longer need them.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D74901034

fbshipit-source-id: 7e0b85ca8ee2de41278f3aa23cb03e9c266d9c28
2025-05-16 18:09:09 -07:00
Samuel Susla ef17880fb0 remove return value from synchronouslyUpdateViewOnUIThread (#51402)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51402

changelog: [internal]

the return value is unused. Let's remove it.

Reviewed By: zeyap

Differential Revision: D74884875

fbshipit-source-id: 83449ea298bdfbd7d083080aaa4d214bf246fcab
2025-05-16 16:46:37 -07:00
Tim Yung ebe2a857f1 RN: Prefer Destructured Import for isValidElement (#51413)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51413

Prefers using this as a destructured import instead of as a member expression of `React`.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D74895841

fbshipit-source-id: c1d3af40134a3721c9a7b676ee1f2c4a18612e4d
2025-05-16 16:33:18 -07:00
Tim Yung ab1ac938c9 RN: Prefer Destructured Import for createElement (#51409)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51409

Prefers using this as a destructured import instead of as a member expression of `React`.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D74895837

fbshipit-source-id: b9d6082e4882d95f0d2aa1eed13b725edeb854cd
2025-05-16 16:33:18 -07:00
Tim Yung d78916d6ca RN: Prefer Destructured Import for cloneElement (#51410)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51410

Prefers using this as a destructured import instead of as a member expression of `React`.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D74895844

fbshipit-source-id: 67f334981a1effce051c89e3d4643232aa22b4e9
2025-05-16 16:33:18 -07:00
Tim Yung 0a41b70164 RN: Prefer Destructured Import for useReducer (#51411)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51411

Prefers using this as a destructured import instead of as a member expression of `React`.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D74895840

fbshipit-source-id: 0a3d78d2871c3334b6e1b570744962a4d0168a9e
2025-05-16 16:33:18 -07:00
Tim Yung 2e95617c2b RN: Prefer Destructured Import for use (#51408)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51408

Prefers using this as a destructured import instead of as a member expression of `React`.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D74895838

fbshipit-source-id: 2cc369e168a7ee10aa4374717f817636841c372c
2025-05-16 16:33:18 -07:00
Tim Yung 2f77e0d7fd RN: Prefer Destructured Import for useContext (#51412)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51412

Prefers using this as a destructured import instead of as a member expression of `React`.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D74895839

fbshipit-source-id: 9ab9fc8bdee6d1764ad86fa2165da32cb266174e
2025-05-16 16:33:18 -07:00