Commit Graph

38536 Commits

Author SHA1 Message Date
Nicola Corti d11f622699 monitor-new-issues should ping the Issue Triager Oncall (#49359)
Summary:
This updates the Issue Triaging bot to ping the oncall

## Changelog:

[INTERNAL] -

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

Test Plan: Nothing to test

Reviewed By: cipolleschi

Differential Revision: D69527137

Pulled By: cortinico

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

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69521547

fbshipit-source-id: 5d37875da91341ad1882733f5ee842a819558f85
2025-02-12 07:34:36 -08:00
Alex Hunt 0d66c524cf Restore Metro log streaming via CLI flag (#49353)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49353

This change adds an opt-in to restore JavaScript log streaming via the Metro dev server, [removed from React Native core in 0.77](https://reactnative.dev/blog/2025/01/21/version-0.77#removal-of-consolelog-streaming-in-metro).

Users can opt into this legacy behaviour by adding the `--client-logs` flag to `npx react-native-community/cli start`.

- The default experience remains without streamed JS logs.
- The existing "JavaScript logs have moved! ..." notice is printed in all cases, and we do not advertise the new flag for new users.
- Under non-Community CLI dev servers (i.e. Expo), log streaming is restored implicitly.

We will clean up this functionality again when we eventually remove JS log streaming over `HMRClient`, tasked in T214991636.

**Implementation notes**

- Logs are always sent over `HMRClient` (previous status quo), even with log streaming off in the dev server. This is a necessary evil to be able to flag this functionality in a user-accessible place, and to move fast for 0.78.
- Necessarily, emitting `fusebox_console_notice` moves to the dev server itself, on first device (Fusebox) connection.

Changelog:
[General][Added] - Add opt in for legacy Metro log streaming via `--client-logs` flag

Reviewed By: robhogan

Differential Revision: D69469039

fbshipit-source-id: be99d02a3b1c977a59bf7d2726f0e6cf2e60b28a
2025-02-12 07:17:15 -08:00
Pieter De Baets 403719c371 Remove CountingOutputStream (#49275)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49275

This is a copied guava class and is only used in one spot.  Remove it and just count directly in ProgressRequestBody.

Changelog: [Internal]

Reviewed By: Abbondanzo

Differential Revision: D69323277

fbshipit-source-id: 5260004a4431f03733882b6ee83a341d8bf29bb0
2025-02-12 06:21:45 -08:00
Iwo Plaza 2b30aa5cc8 Migrate Libraries/Utilities/differ/*.js to export syntax (#49332)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49332

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

## This diff
- Migrates `Libraries/Utilities/differ/*.js` to use the export syntax.
- Updates deep-imports of these files to use `.default`
- Updates codegen with a compat layer
- Updates the current iteration of API snapshots (intended).

Changelog:
[General][Breaking] - Deep imports to `Libraries/Utilities/differ/...` with `require` syntax need to be appended with '.default'.

Reviewed By: yungsters

Differential Revision: D69467423

fbshipit-source-id: 2e58a0b9711e9bdf5ca907a5b2252584f6fec9bc
2025-02-12 05:30:20 -08:00
Pieter De Baets 9073817925 Add more test coverage for $ReadOnlyArray<UnsafeMixed> in component codegen (#49349)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49349

Follow-up on D69454101 to add more test coverage for `$ReadOnlyArray<UnsafeMixed>` as a component prop. The new type was missing from the CodegenSchema, which revealed some gaps in tests.

Changelog: [Internal]

Reviewed By: fabriziocucci

Differential Revision: D69488035

fbshipit-source-id: 19895e55e5ec4d89a790f1c388de9eea025a316c
2025-02-12 04:20:08 -08:00
Rubén Norte 96a8a3da48 Only log errors accessing feature flags in JS if the native module itself is not defined (#49350)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49350

Changelog: [internal]

Reviewed By: GijsWeterings

Differential Revision: D69520832

fbshipit-source-id: fb72103705c930eb5f0944c931b4fdeabde841ae
2025-02-12 04:07:10 -08:00
Jakub Piasecki 1d7de4261f Add transform that replaces empty type with never (#49331)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49331

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69465686

fbshipit-source-id: ef5e5eeedb6cd1bc89529d11bbf1ff7490daf704
2025-02-12 03:20:15 -08:00
Dawid Małecki bf282146b6 Add UIManager to build-types and align Flow with TS defs (#49322)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49322

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D69241595

fbshipit-source-id: 00dafa499fe70f47395ab363f6565619e1877bae
2025-02-12 02:00:10 -08:00
Tommy Nguyen 7926d656b3 fix: fix @react-native-community/cli-platform-* packages not being found in monorepos (#47308)
Summary:
Fix `react-native-community/cli-platform-*` packages not being found in monorepos.

Note that we are making the assumption that `process.cwd()` returns the project root. This is the same assumption that `react-native-community/cli` makes. Specifically, `findProjectRoot()` has an optional argument that defaults to `process.cwd()`:

- [`findProjectRoot()`](https://github.com/react-native-community/cli/blob/14.x/packages/cli-tools/src/findProjectRoot.ts)
- Which gets called without arguments in [`loadConfig()`](https://github.com/react-native-community/cli/blob/14.x/packages/cli-config/src/loadConfig.ts#L89)
- `loadConfig()` gets called from [`setupAndRun()`](https://github.com/react-native-community/cli/blob/14.x/packages/cli/src/index.ts#L196), also without project root set

As far as I can see, the project root argument is only ever used in tests.

## Changelog:

[GENERAL] [FIXED] - Fix `react-native-community/cli-platform-*` packages not being found in monorepos

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

Test Plan:
1. Clone/check out this branch: https://github.com/microsoft/rnx-kit/pull/3409
2. Cherry-pick https://github.com/facebook/react-native/pull/47304
3. Cherry-pick https://github.com/facebook/react-native/pull/47308
4. Run `react-native config` inside `packages/test-app`
5. Verify that `projects` is populated

**Before:**

```js
  "healthChecks": [],
  "platforms": {},
  "assets": [],
  "project": {}
}
```

**After:**

```js
  "healthChecks": [],
  "platforms": {
    "ios": {},
    "android": {}
  },
  "assets": [],
  "project": {
    "ios": {
      "sourceDir": "/~/packages/test-app/ios",
      "xcodeProject": {
        "name": "SampleCrossApp.xcworkspace",
        "path": ".",
        "isWorkspace": true
      },
      "automaticPodsInstallation": false,
      "assets": []
    },
    "android": {
      "sourceDir": "/~/packages/test-app/android",
      "appName": "app",
      "packageName": "com.msft.identity.client.sample.local",
      "applicationId": "com.msft.identity.client.sample.local",
      "mainActivity": "com.microsoft.reacttestapp.MainActivity",
      "assets": []
    }
  }
}
```

Reviewed By: cortinico

Differential Revision: D69465533

Pulled By: robhogan

fbshipit-source-id: 3d6cf32752a7a41d9c7e84f35b0f26ae7d7a971f
2025-02-12 00:34:32 -08:00
Nick Gerleman d08f9accf0 Back out "Wire up native box shadow parsing" (#49345)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49345

This diff is causing an error to be logged for every user. Even if it's noise, its more trouble than its worth. Let's revert until feature flags check fixed.

Changelog: [Internal]

Reviewed By: makovkastar

Differential Revision: D69504966

fbshipit-source-id: 13caf715cef9a4cc6c9b7c68d3003fbced870d34
2025-02-12 00:11:32 -08:00
Rick Hanlon 578e99a013 Add a healthy number of inital e2e tests (#49338)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49338

This doesn't cover all cases, but is a good start.

Where relevant, I call out inline places where there are KPs with LogBox that will be fixed separately.

## Changelog

Changelog: [internal]

Reviewed By: rubennorte

Differential Revision: D69443040

fbshipit-source-id: 7281f30aa705ae812d5b5f5f9ad03b37358de059
2025-02-11 19:33:07 -08:00
Rick Hanlon 1aa0ddd88b Update fantom test, add helpers (#49337)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49337

*Note: This diff adds helpers and updates the one test we have. The next diff adds a bunch of tests, see that diff for how these helpers are used to scale to a large number of tests.*

-----

## Overview

Adds helpers for the LogBox e2e test to make it easier to write simple, readable, tests with a healthy level of abstraction over the e2e APIs.

## API
The helpers expose an ability to render a component, and return methods to get the UI state:

```
// Returns the LogBox inspector UI as an object.
getInspectorUI: () => ?InspectorUI,

// Returns the LogBox notification UI as an object.
getNotificationUI: () => ?NotificationUI,
```

These return objects that represent the main text elements in the UI like `title` and `message`.

The helpers also provide methods for interacting with the LogBox UI:

```
// True if the LogBox inspector is open.
isOpen: () => boolean,

// Tap the notification to open the LogBox inspector.
openNotification: () => void,

// Tap to close the notification.
dimissNotification: () => void,

// Tap the minimize button to collapse the LogBox inspector.
mimimizeInspector: () => void,

// Tap the dismiss button to close the LogBox inspector.
dismissInspector: () => void,

// Tap the next button to go to the next log.
nextLog: () => void,

// Tap the previous button to go to the previous log.
previousLog: () => void,
```

## Example test
This allows writing tests like:

```
test('should log error', () => {
  const logBox = renderLogBox(<ComponentThatErrors />);

  // Should show notification
  expect(logBox.isOpen()).toBe(false);
  expect(logBox.getNotifciationUI()).toEqual({
    count: '!',
    message: 'error message',
  });

  // Tap the notification
  logBox.openNotification();

  // Should show log
  expect(logBox.isOpen()).toBe(true);
  expect(logBox.getInspectorUI()).toEqual({
    header: 'Log 1 of 1',
    title: 'Console Error',
    message: 'error message',
    stackFrames: [
      'ComponentThatErrors'
    ],
    componentStackFrames: [
      '<ComponentThatErrors />',
    ],
    isDismissable: true,
  });
})
```

## Changelog

Changelog: [internal]

Reviewed By: rubennorte

Differential Revision: D69443041

fbshipit-source-id: c81ccd56a39d01d61814d29515b587096c0509c0
2025-02-11 19:33:07 -08:00
Samuel Susla 00abe54707 account for tunnelled components like Modal in view culling (#49344)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49344

changelog: [internal]

restart culling context when coming across a component like Modal.

Reviewed By: alanleedev

Differential Revision: D69490655

fbshipit-source-id: bda67fd271134dceb2669d9d71c9de3041d085a9
2025-02-11 18:59:28 -08:00
David Vacca 46653fa548 Raise java source and target versions for ReactModuleSpecProcessor from 8 -> 11 (#49342)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49342

Raise java source and target versions for ReactModuleSpecProcessor from 8 -> 11

changelog: [internal] internal

Reviewed By: NickGerleman

Differential Revision: D69478204

fbshipit-source-id: 4059391041443d0418c363c1e627b6d4c38b9ff0
2025-02-11 18:53:05 -08:00
David Vacca 5cb71ef181 Raise source and target version of Prop annotation processor from 7 to 11 (#49343)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49343

Raise source and target version of annotation processor from 7 to 11

This is unused in OSS

changelog: [internal] internal

Reviewed By: NickGerleman

Differential Revision: D69478025

fbshipit-source-id: 28c6ed5889db423c43a36ccee396083ae7e78e5f
2025-02-11 18:53:05 -08:00
Joe Vilches a733930017 Add e2e tests for fixed transform cases (#49318)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49318

tsia see previous diffs for fix. Added more tests to box shadow, filter, and borders

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D69416675

fbshipit-source-id: ae1e33750b56c1a4720e04e29fc110f1e11c0b3d
2025-02-11 15:44:59 -08:00
Nick Gerleman ba4a0cc23e Wire up native box shadow parsing (#49317)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49317

This hooks into `enableNativeCSSParsing()` to optionally bypass viewconfig processor, and lets us parse the raw strings (or objects composed of string) in native.

Right now, to not disturb too much while this is in experimentation, this is  just a facade over existing types and props storage, and we ignore any non-px lengths.

Also need to prepend

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D69337482

fbshipit-source-id: 6093e312e0d1dc1855713da20b72bf75b98af3ea
2025-02-11 13:20:32 -08:00
Nick Gerleman b1bd540045 <react/renderer/css> OSS build logic (#49316)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49316

This hooks up some build logic for `react/renderer/css`. A bit funky right now since header only, and might need to change later (it isn't neccesarily guaranteed to be header only in the future).

Changelog: [Internal]

Reviewed By: cortinico, cipolleschi

Differential Revision: D69426450

fbshipit-source-id: 77e0ef409f34daf003d28a5cd70de935bd180440
2025-02-11 13:20:32 -08:00
Andrew Datsenko 6ec1d9d843 Add .toMatch API (#49328)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49328

Changelog: [Internal]
Add missing `.toMatch` expect API

Reviewed By: rubennorte

Differential Revision: D69462225

fbshipit-source-id: aefe02e6a1f8f15c8c30c26492fa926e7d6e4e8e
2025-02-11 11:21:33 -08:00
Wu Zhong 6a3e275d14 Reland RNTester: Fixes turbo module examples error in bridgeless mode (#49329)
Summary:
Reland https://github.com/facebook/react-native/issues/48362.

## Changelog:

[IOS] [FIXED] - RNTester: Fixes turbo module examples error in bridgeless mode

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

Test Plan: RNTester turbomodule examples in bridgeless can work as expected.

Reviewed By: christophpurrer

Differential Revision: D69463612

Pulled By: cortinico

fbshipit-source-id: 8613b001ebbe64ce0d505f5515bb7a4b6a64dbe7
2025-02-11 10:56:19 -08:00
Qian Wu df3a60293c Revert D69277991: Initial Open Sourcing of React Native Compatibility Check
Differential Revision:
D69277991

Original commit changeset: 886a983d4b17

Original Phabricator Diff: D69277991

fbshipit-source-id: f69d528d87c22d03b0c3e654733c8efa89104df0
2025-02-11 10:35:55 -08:00
Andrew Datsenko 9799e34211 Add .toHaveLength (#49327)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49327

Changelog: [Internal]
Add missing `.toHaveLength` expect API

Reviewed By: rubennorte

Differential Revision: D69241817

fbshipit-source-id: 11c7f314a30fd1db3c00b8665b613d290d50ad81
2025-02-11 10:32:27 -08:00
David Vacca 5444c76433 Configure all feature flags of NewArchitecture on canary (#49333)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49333

The rollout of "new architecture everywhere" should be enabled in OSS canary releases. This diff updates the ReactNativeFeatureFlags.config.js to reflect that all of the feature flags used by the new architecture are enabled by default in experimental and canary releases. Note that these feature flags were already enabled in OSS when new architecture was enabled.

changelog: [internal] internal

Reviewed By: rubennorte, NickGerleman

Differential Revision: D69419662

fbshipit-source-id: 6ecf9e38bb2fd0d3c0f7129ae16fcef8755b5da2
2025-02-11 10:14:02 -08:00
Oskar Kwaśniewski e7de582798 feat(iOS): centralize JS engine dependency configuration (#49297)
Summary:
> [!NOTE]
> This PR is part of JavaScriptCore Extraction to this repository: https://github.com/react-native-community/javascriptcore

This PR centralizes the setup of js engine dependencies which need to be defined when building with dynamic frameworks. This will allow us to change linked framework if using a third party one in the future

## Changelog:

[INTERNAL] [CHANGED] - centralize JS engine dependency configuration

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

Test Plan: CI Green (Build needs to go properly)

Reviewed By: javache

Differential Revision: D69396641

Pulled By: cipolleschi

fbshipit-source-id: deedd12084f563f73f12f8617fdca0a6d680bf5a
2025-02-11 10:03:07 -08:00
Alex Taylor (alta) 32fcd2733e Deploy 0.260.0 to xplat (#49319)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49319

Changelog: [Internal]

Reviewed By: panagosg7

Differential Revision: D69438322

fbshipit-source-id: 1906cfc76125e1bb7244b2a40536c3268a914ecf
2025-02-11 09:34:17 -08:00
Jakub Piasecki aedf8c1dba Update virtualized-lists types to align them closer to TS definitions (#49264)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49264

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69308531

fbshipit-source-id: 29f1726026aa55e4e17616e7880c7d30eae13b8f
2025-02-11 09:25:22 -08:00
Jakub Piasecki b8e2bcd60d Update types in virtualized-lists so that they produce valid TS output (#49263)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49263

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69308533

fbshipit-source-id: 36dd38a5bfce3b19eabcf04ef5f14e006d581bcd
2025-02-11 09:25:22 -08:00
Jakub Piasecki 1cf4c84ba0 Update files in packages/virtualized-lists to use export syntax (#49262)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49262

Changelog: [General][Breaking] Deep imports into `react-native/virtualized-lists` with require syntax may need to be appended with `.default`

Reviewed By: huntie

Differential Revision: D69308532

fbshipit-source-id: 6de15d46e0931616bc9849edbccb7cf745e15dd5
2025-02-11 09:25:22 -08:00
Rubén Norte 3a8837de4b Type event options as interface instead of objects (#49204)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49204

Changelog: [internal]

We don't copy the options object and just access the individual properties, so using an interface is enough, and has the benefit of not having to create object copies to pass down to subclasses.

Reviewed By: yungsters

Differential Revision: D69182824

fbshipit-source-id: 9819e5627d72761c78d0f39a1861a3239066dbb2
2025-02-11 09:14:29 -08:00
Eli White 6590bb3e14 Initial Open Sourcing of React Native Compatibility Check (#49311)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49311

This tool enables checking the boundary between JavaScript and Native for
backwards incompatible changes to protect against crashes.

This is useful for:

- Local Development
- Over the Air updates on platforms that support it
- Theoretically: Server Components with React Native

Check out the Readme for more information

Changelog: [General][Added] Open Sourcing React Native's Compatibility Check

Reviewed By: yungsters

Differential Revision: D69277991

fbshipit-source-id: 886a983d4b17609ce771cdd93b75f34bbd8417dc
2025-02-11 08:23:16 -08:00
Iwo Plaza 28945c68da Migrate files in Libraries/Modal and Libraries/Network to use export syntax (#49035)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49035

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

## This diff
- Migrates files in `Libraries/Modal/*.js` and `Libraries/Network/*.js` to use the `export` syntax.
- Updates deep-imports of these files to use `.default`
- Updates jest mocks
- Updates the current iteration of API snapshots (intended).

Changelog:
[General][Breaking] - Deep imports to modules inside `Libraries/Modal` and `Libraries/Network` with `require` syntax may need to be appended with '.default'.

Reviewed By: huntie

Differential Revision: D68827032

fbshipit-source-id: 98149055f82edad96e74371a79f05f88a8ab3b66
2025-02-11 07:47:24 -08:00
Pieter De Baets abd7259de4 Allow UnsafeMixed as Array value in codegen (#49324)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49324

Provide Android component codegen a bit more flexibility by allowing `$ReadOnlyArray<UnsafeMixed>` and avoid casting in the view manager.

Changelog: [General][Added]

Reviewed By: fabriziocucci

Differential Revision: D69454101

fbshipit-source-id: c210647deffeb01b7db8aa07266e58c42acf14ba
2025-02-11 07:11:18 -08:00
Fabrizio Cucci aaa72799e2 Add changelog entry for v0.78.0-rc.4 (#49326)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49326

As per title.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D69458244

fbshipit-source-id: 12fdc52ab578cd16e91207de76bc827b534a8635
2025-02-11 06:46:16 -08:00
Ruslan Lesiutin 0aefeb06d2 Update debugger-frontend from 0db2088...3adf51a (#49299)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49299

Changelog: [Internal] - Update `react-native/debugger-frontend` from 0db2088...3adf51a

Resyncs `react-native/debugger-frontend` from GitHub - see `rn-chrome-devtools-frontend` [changelog](https://github.com/facebookexperimental/rn-chrome-devtools-frontend/compare/0db20882e348e426a298417ef8ab1b379ad2ef6e...3adf51aa915c2deb26f5d373751a15b4d0c8f259).

Reviewed By: huntie

Differential Revision: D69387439

fbshipit-source-id: e8cf7e4d9e9faca99187a19943b2549e6b6214ad
2025-02-11 06:38:14 -08:00
Ruslan Lesiutin 999f99b41f Update debugger-frontend from d126cc8...0db2088 (#49267)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49267

Changelog: [Internal] - Update `react-native/debugger-frontend` from d126cc8...0db2088

Resyncs `react-native/debugger-frontend` from GitHub - see `rn-chrome-devtools-frontend` [changelog](https://github.com/facebookexperimental/rn-chrome-devtools-frontend/compare/d126cc87f2b61e12e9579ddbfd4c0eb516bce881...0db20882e348e426a298417ef8ab1b379ad2ef6e).

Reviewed By: robhogan

Differential Revision: D69307173

fbshipit-source-id: 400f8ec259264d3a6bbea43c3ad2f02440d4294a
2025-02-11 06:38:14 -08:00
Ruslan Lesiutin 5c88633035 Roll out 6.1.1 on fbsource (#49255)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49255

# Changelog:
[General] [Changed] - upgrade React DevTools to 6.1.1.

allow-large-files

Reviewed By: huntie

Differential Revision: D69302964

fbshipit-source-id: 80f7f720fc37564260435a23c9de7779ceab3668
2025-02-11 06:38:14 -08:00
Nicola Corti e6690cb4a7 Disable console logging for hermesc (#49301)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49301

The hermesc logging is extremely noisy and not relevant for the users. I'm disabling it for the task that runs metro+hermesc (only for the hermesc) part.

Changelog:
[Internal] [Changed] - Disable console logging for hermesc

Reviewed By: robhogan

Differential Revision: D69399156

fbshipit-source-id: e5f8722b33d30675aba5a8aa82c456be21254b0c
2025-02-11 06:11:08 -08:00
Riccardo Cipolleschi 444c7d4eff Allow multiple RN instances to run at the same time (#49300)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49300

With the refactor of the AppDelegate in favor ReactNativeFactory, the users can now instantiate multiple instances of react native.
However, currently, if you try to run multiple instances, the app will crash with the message:

```
libc++abi: terminating due to uncaught exception of type std::runtime_error: Feature flags cannot be overridden more than once
```

This happens also when the feature flags we would like to set are the same that we already applied. This should be an allowed scenario because reapplying the excatly same features flags should have no effect on React native and that's not the use case we want to forbid.

With this change, we are creating a static variable that checks whether we already apply that set of feature flags and it allows you to create multiple instances by keeping the same flags

## Changelog:
[iOS][Fixed] - Allow multiple RN instances to run at the same time

Reviewed By: rubennorte

Differential Revision: D69398441

fbshipit-source-id: a377c6a1402d38d66d348fa8c6a65e645973aadc
2025-02-11 05:54:39 -08:00
Jakub Piasecki f1a3ff0dd1 Update RCTDeviceEventEmitter singleton instantiation (#49085)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49085

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D68953499

fbshipit-source-id: ea469813593cc4bcb746345a78c68dc7b0b4d56d
2025-02-11 05:42:24 -08:00
Jakub Piasecki 7dbfc1099c Align EventEmitter definitions with TypeScript (#49206)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49206

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D68953500

fbshipit-source-id: 0e936e8423f8792db34d6b44b1620dde5bd13a47
2025-02-11 05:42:24 -08:00
Mateo Guzmán 9612241597 Make Overflow internal (#49235)
Summary:
As part of the initiative to reduce the public API surface, this class can be internalized. I've checked there are [no relevant OSS usages](https://github.com/search?type=code&q=NOT+is%3Afork+NOT+org%3Afacebook+NOT+repo%3Areact-native-tvos%2Freact-native-tvos+NOT+repo%3Anuagoz%2Freact-native+NOT+repo%3A2lambda123%2Freact-native+NOT+repo%3Abeanchips%2Ffacebookreactnative+NOT+repo%3AfabOnReact%2Freact-native-notes+NOT+user%3Ahuntie+com.facebook.react.uimanager.style.Overflow).

## Changelog:

[INTERNAL] - Make com.facebook.react.uimanager.style.Overflow internal

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

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

Reviewed By: cipolleschi

Differential Revision: D69307164

Pulled By: cortinico

fbshipit-source-id: 778e36456c673e6472458c3076638eb7fd70c1de
2025-02-11 05:38:46 -08:00
zhongwuzw 62831e740c RNTester: Fixes turbo module examples error in bridgeless mode (#48362)
Summary:
In https://github.com/facebook/react-native/issues/47598 , we removed `__turboModuleProxy ` in bridgeless mode, it would produce error in rntester turbomodule examples, fix it by change `__turboModuleProxy` to `nativeModuleProxy`. RSNara can you please help to review? :)

before:
![image](https://github.com/user-attachments/assets/bf8edc50-6dbc-4465-9936-36ec9112761b)

After:
![image](https://github.com/user-attachments/assets/2d5c1546-d758-4692-a9a7-5cf195edc015)

## Changelog:

[IOS] [FIXED] - RNTester: Fixes turbo module examples error in bridgeless mode

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

Test Plan: RNTester turbomodule examples in bridgeless can work as expected.

Reviewed By: shwanton

Differential Revision: D67603884

Pulled By: cortinico

fbshipit-source-id: d905fa0535da5fde5e7ebff1d453ea761be9f42f
2025-02-11 05:28:58 -08:00
Mateo Guzmán 18992d2ebe Make ReactPackageLogger internal (#49236)
Summary:
As part of the initiative to reduce the public API surface, this class can be internalized. I've checked there are [no relevant OSS usages](https://github.com/search?type=code&q=NOT+is%3Afork+NOT+org%3Afacebook+NOT+repo%3Areact-native-tvos%2Freact-native-tvos+NOT+repo%3Anuagoz%2Freact-native+NOT+repo%3A2lambda123%2Freact-native+NOT+repo%3Abeanchips%2Ffacebookreactnative+NOT+repo%3AfabOnReact%2Freact-native-notes+NOT+user%3Ahuntie+com.facebook.react.ReactPackageLogger).

## Changelog:

[INTERNAL] - Make com.facebook.react.ReactPackageLogger internal

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

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

Reviewed By: cipolleschi

Differential Revision: D69307159

Pulled By: cortinico

fbshipit-source-id: 397be796bc9cc7acd633b461d40fcf1989708b4c
2025-02-11 04:03:09 -08:00
Samuel Susla abb9f4f152 remove unused macros from Differentiator (#49310)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49310

changelog: [internal]

These macros were unused, let's remove them.

Reviewed By: NickGerleman

Differential Revision: D69402801

fbshipit-source-id: ac701eb3dbd942ae217725563723f3ebfecd06cc
2025-02-11 03:00:45 -08:00
Samuel Susla 022a0fb65a extract TinyMap into internal header (#49308)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49308

changelog: [internal]

move TinyMap class to its own file in internal folder.

Reviewed By: NickGerleman

Differential Revision: D69402458

fbshipit-source-id: e16d5f33ef0e704e3336cf6f13f510206d7f5e5d
2025-02-11 03:00:45 -08:00
Samuel Susla a1ed021dc3 refactor private parts of Differentiator.h to internal files (#49307)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49307

changelog: [internal]

There were parts of Differentiator that were leaking outside of "mounting" module. This diff moves them to "internal" folder and changes buck so they can't be imported from outside the module.

Reviewed By: NickGerleman

Differential Revision: D69401878

fbshipit-source-id: 8aa8c96e91b088dab4f9c8b9a5e6937e09be7eb4
2025-02-11 03:00:45 -08:00
Samuel Susla 174a0de1e1 handle transform in view culling (#49304)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49304

changelog: [internal]

View culling must take transform into account when calculating whether a frame is visible or not. This diff adds that.

Reviewed By: NickGerleman

Differential Revision: D69394909

fbshipit-source-id: 4c588a64f2c8e2d35fb7d606d26adc09d3502780
2025-02-11 03:00:45 -08:00
Ingrid Wang fffd6d75b4 Suppress deprecated status bar APIs in RCTStatusBarManager (#49315)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49315

Changelog: [iOS][Fixed] Suppressed iOS 13 deprecation warnings in RCTStatusBarManager

Reviewed By: NickGerleman

Differential Revision: D69334478

fbshipit-source-id: b643c52d928f95f33659a643d0cc1d7de1f65563
2025-02-10 18:44:22 -08:00
Joe Vilches f835b824f4 Ensure filterLayer, backgroundImageLayer, and backgroundColorLayer are the same size/shape as the owning View (#49278)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49278

The previous diff (https://github.com/facebook/react-native/pull/49272) fixed an issue where we used frame to get the size of a sublayer. This is problematic in that it scales things twice if a scaling transform is applied. I looked to see where else we do this and we have this problem (sometimes) with background color and filter.

To fix this in the general case I created a helper to size a layer to the same shape as the View's layer - so using bounds for the size, (0,0) for position on the frame, and cornerRadius/mask for border radius considerations. The only 3 layers that should be the exact same size are backgroundColorLayer, backgroundImageLayer, and filterLayer

Changelog: [iOS] [Fixed] - Fix cases where background color, filter, and background image were sized incorrectly if there was a scaling transform

Reviewed By: jorge-cab

Differential Revision: D69321790

fbshipit-source-id: 70b5d18fa01967896b1bfffdb5684c2c907f3549
2025-02-10 17:22:14 -08:00