Commit Graph

38536 Commits

Author SHA1 Message Date
Tim Yung 02dfbeaaeb RN: Delete Shallow Renderer Cases in Modal-test.js (#44970)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44970

These Jest unit test cases were making assertions about shallow rendering, but that shallow rendering is now deprecated.

Changelog:
[Internal]

Reviewed By: robhogan

Differential Revision: D58643058

fbshipit-source-id: 75c95b3ef8f9c481b50d90bf195ba3bd90196f0b
2024-06-16 12:15:49 -07:00
Tim Yung 77b441249a RN: Delete Shallow Renderer Cases in InputAccessoryView-test.js (#44975)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44975

These Jest unit test cases were making assertions about shallow rendering, but that shallow rendering is now deprecated.

Changelog:
[Internal]

Reviewed By: robhogan

Differential Revision: D58643064

fbshipit-source-id: 19cb05df25b4b92ee584ea126d238276f5b214f7
2024-06-16 12:15:49 -07:00
Tim Yung f294bd8223 RN: Migrate LogBoxNotificationContainer-test.js from Shallow Renderer (#44981)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44981

Migrates this Jest unit test away from using `react-shallow-renderer` because it is no longer recommended.

Changelog:
[Internal]

Reviewed By: robhogan

Differential Revision: D58643062

fbshipit-source-id: 6d7bba78945509bbb6bdab1e6347ba0d90343ec3
2024-06-16 12:15:49 -07:00
Tim Yung 86a48c4118 RN: Migrate LogBoxNotification-test.js from Shallow Renderer (#44971)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44971

Migrates this Jest unit test away from using `react-shallow-renderer` because it is no longer recommended.

Changelog:
[Internal]

Reviewed By: robhogan

Differential Revision: D58643068

fbshipit-source-id: f3a0331140fbaa9ee19b76da8700e60b3efc525a
2024-06-16 12:15:49 -07:00
Tim Yung 81130f8b0f RN: Migrate LogBoxInspectorStackFrames-test.js from Shallow Renderer (#44976)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44976

Migrates this Jest unit test away from using `react-shallow-renderer` because it is no longer recommended.

Changelog:
[Internal]

Reviewed By: robhogan

Differential Revision: D58643067

fbshipit-source-id: 2e298e2736227afb9322463daa3db0578638559a
2024-06-16 12:15:49 -07:00
Tim Yung 96cbfb1e66 RN: Migrate LogBoxInspectorStackFrame-test.js from Shallow Renderer (#44969)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44969

Migrates this Jest unit test away from using `react-shallow-renderer` because it is no longer recommended.

Changelog:
[Internal]

Reviewed By: robhogan

Differential Revision: D58643057

fbshipit-source-id: 0d2943a714ca718841ab4bec5a33f6c9e48fea92
2024-06-16 12:15:49 -07:00
Tim Yung 6dd9fa46ca RN: Migrate LogBoxInspectorSourceMapStatus-test.js from Shallow Renderer (#44986)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44986

Migrates this Jest unit test away from using `react-shallow-renderer` because it is no longer recommended.

Changelog:
[Internal]

Reviewed By: robhogan

Differential Revision: D58643069

fbshipit-source-id: a2dbba104a7f6af57b6990da3cb0055a5390bc00
2024-06-16 12:15:49 -07:00
Tim Yung 8c0541cb12 RN: Migrate LogBoxInspectorSection-test.js from Shallow Renderer (#44983)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44983

Migrates this Jest unit test away from using `react-shallow-renderer` because it is no longer recommended.

Changelog:
[Internal]

Reviewed By: robhogan

Differential Revision: D58643056

fbshipit-source-id: 61494765f68f1810b19a33f5e2a6c5d4087ce11c
2024-06-16 12:15:49 -07:00
Tim Yung a83d8d1590 RN: Migrate LogBoxInspectorReactFrames-test.js from Shallow Renderer (#44972)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44972

Migrates this Jest unit test away from using `react-shallow-renderer` because it is no longer recommended.

Changelog:
[Internal]

Reviewed By: robhogan

Differential Revision: D58643055

fbshipit-source-id: 419fe07643f623e75050487beb9ca306417e43d9
2024-06-16 12:15:49 -07:00
Tim Yung d75a28db62 RN: Migrate LogBoxInspectorHeader-test.js from Shallow Renderer (#44978)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44978

Migrates this Jest unit test away from using `react-shallow-renderer` because it is no longer recommended.

Changelog:
[Internal]

Reviewed By: robhogan

Differential Revision: D58643059

fbshipit-source-id: 0eb36537fd3a8c69f4861fac14b99755eff97f04
2024-06-16 10:30:39 -07:00
Tim Yung c5acff86bd RN: Migrate LogBoxInspectorFooter-test.js from Shallow Renderer (#44968)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44968

Migrates this Jest unit test away from using `react-shallow-renderer` because it is no longer recommended.

Changelog:
[Internal]

Reviewed By: robhogan

Differential Revision: D58643066

fbshipit-source-id: 216a036ef8e5cfe9b362c2f367da052ee6c9808b
2024-06-16 10:30:39 -07:00
Tim Yung ba2e4a57e8 RN: Migrate LogBoxInspectorCodeFrame-test.js from Shallow Renderer (#44979)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44979

Migrates this Jest unit test away from using `react-shallow-renderer` because it is no longer recommended.

Changelog:
[Internal]

Reviewed By: robhogan

Differential Revision: D58643061

fbshipit-source-id: 0c68324d4d92fc8818ac469737eda3679aa773b3
2024-06-16 10:30:39 -07:00
Tim Yung 7dd4811bea RN: Migrate LogBoxInspector-test.js from Shallow Renderer (#44974)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44974

Migrates this Jest unit test away from using `react-shallow-renderer` because it is no longer recommended.

Changelog:
[Internal]

Reviewed By: robhogan

Differential Revision: D58641098

fbshipit-source-id: be7592b3fb5c4a66879ad734439faceb4ad5cdde
2024-06-16 10:30:39 -07:00
Tim Yung e05cbd9912 RN: Migrate LogBoxButton-test.js from Shallow Renderer (#44987)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44987

Migrates this Jest unit test away from using `react-shallow-renderer` because it is no longer recommended.

Changelog:
[Internal]

Reviewed By: robhogan

Differential Revision: D58641097

fbshipit-source-id: a9d3abee19d58262d36ac250a55780df803c464b
2024-06-16 10:30:39 -07:00
Tim Yung 9eee99fd8c RN: Migrate LogBoxInspectorMessageHeader-test.js from Shallow Renderer (#44967)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44967

Migrates this Jest unit test away from using `react-shallow-renderer` because it is no longer recommended.

Changelog:
[Internal]

Reviewed By: robhogan

Differential Revision: D58641096

fbshipit-source-id: e9752f21763156ee409ae81a304cada84a346bdb
2024-06-16 10:30:39 -07:00
Tim Yung 00253a2efe RN: Migrate LogBoxInspectorContainer-test.js from Shallow Renderer (#44985)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44985

Migrates this Jest unit test away from using `react-shallow-renderer` because it is no longer recommended.

Changelog:
[Internal]

Reviewed By: robhogan

Differential Revision: D58641095

fbshipit-source-id: 90563955876a148a2b867e0ec5128bdd8786f274
2024-06-16 10:30:39 -07:00
Tim Yung 64e6721b23 Do not passthrough logbox errors that already have a component stack (#44888)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44888

In https://github.com/facebook/react/pull/29839 we removed the `Warning: ` prefix. This PR replaces the special cases in LogBox for `Warning: ` to use the presence of a component stack instead. This is what LogBox really cares about anyway, since the reason to let errors pass through to the exception manager is to let DevTools add the component stacks.

Changelog: [General] [Fixed] - Fix logbox reporting for React errors

Reviewed By: rickhanlonii

Differential Revision: D58441017

fbshipit-source-id: 5355cd04ddcd5238dadbfcbd64fe1f43c8cd04dc
2024-06-15 19:24:03 -07:00
Ramanpreet Nara 2f8d4f0c25 Ensure redbox shows up after reloads fail (#44959)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44959

If a react instance create fails, ReactHost [calls handleHostException](https://www.internalfb.com/code/fbsource/[bf94dae8c8b7527653145fdd799f6f47b1f8b284]/xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactHostImpl.java?lines=784-793%2C956-959%2C966%2C979-980%2C982%2C985-986). This method uses the dev support manager to show the redbox: line 789.

https://www.internalfb.com/code/fbsource/[bf94dae8c8b7527653145fdd799f6f47b1f8b284]/xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactHostImpl.java?lines=784-793

But, if react instance reload fails, react host does everything in handleHostException, **except** call into dev support manager to show the redbox.

https://www.internalfb.com/code/fbsource/[bf94dae8c8b7527653145fdd799f6f47b1f8b284]/xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactHostImpl.java?lines=457-466

Hence, the redbox doesn't show.

## Thoughts
These two code-paths do really similar things. I'm thinking about how to unify them.

Changelog: [Android][Fixed] Show RedBox after reloads fail (bridgeless)

Reviewed By: alanleedev

Differential Revision: D58592928

fbshipit-source-id: 37a7adc1845a8b28917fcd9acbaae1484478e4e6
2024-06-14 16:33:55 -07:00
Ramanpreet Nara ce2e4263bd Make soft exceptions easier to spot in logcat (#44958)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44958

Now, all soft exception methods will have raiseSoftException(...)

## Before

```
BridgelessReact: ReactHost{0}.getOrCreateDestroyTask(): handleHostException(message = "Unable to load script. Make sure you're either running Metro (run 'npx react-native start') or that your bundle 'RNTesterBundle.js' is packaged correctly for release.")
```

## After
```
BridgelessReact: ReactHost{0}.raiseSoftException(getOrCreateDestroyTask()): handleHostException(message = "Unable to load script. Make sure you're either running Metro (run 'npx react-native start') or that your bundle 'RNTesterBundle.js' is packaged correctly for release.")
```

Changelog: [Internal]

Reviewed By: alanleedev

Differential Revision: D58593609

fbshipit-source-id: 171a872cd41e4ffe9c2e9654c563a6f3af342ad9
2024-06-14 16:32:34 -07:00
alicata 457d14bd1b Fix onprogress not firing when Content-Length is not available for XMLHttpRequest (#44899)
Summary:
When an XMLHttpRequest is performed, the `onprogress` event it is not invoked when the `Content-Length` header is missing in the response. This is the case when we are calling an endpoint that responds with `transfer-encoding: chunked` (https://tools.ietf.org/html/rfc9112#section-7.1), preventing the user to keep track of the progress while the server is sending chunks. Despite we will never know the total length of the content (because it will not be known due to the RFC specification, so it will be always `-1`), we will now be able to keep track of the loaded data.

Note that in Android, this is the current default behaviour.

To address this issue:
- I removed the condition where the `downloadProgressBlock` was dispatched only when  `response.expectedContentLength` was greater than 0
- I created a new test case for `XMLHttpRequest` in the tester app to download a chunked file

## Changelog:

[IOS] [CHANGED] - fire `onprogress` event for `XMLHttpRequest` even when the `Content-Length` header is missing in the response headers

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

Test Plan:
|before|after|
|----------|:-------------:|
|https://github.com/facebook/react-native/assets/37150312/6da3518f-eed3-4808-a2f8-abe26e5c7487|https://github.com/facebook/react-native/assets/37150312/ed1da300-dcf7-4874-a941-a2289f1cb777

Reviewed By: cortinico

Differential Revision: D58562088

Pulled By: NickGerleman

fbshipit-source-id: 23a1cafa49ddcd25fa0db7d04fae845126771425
2024-06-14 13:58:14 -07:00
zhongwuzw 9d637e4622 Fixes NSDataBigString length calculation (#44900)
Summary:
We assume data[length] is '\0', like Android https://github.com/facebook/react-native/blob/33aa83a0e6f63d3d50d4803074ad9e2243439100/packages/react-native/ReactCommon/cxxreact/JSBigString.h#L81. So we should minus 1 after we called `ensureNullTerminated`. it may crash in hermes engine because hermes should ensure data[length] is `\0`.

## Changelog:

[IOS] [FIXED] - Fixes NSDataBigString length calculation

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

Test Plan:
We can mimic the crash by changes some code :
![image](https://github.com/facebook/react-native/assets/5061845/cc65f232-c37c-452c-bf0d-aeb71b7b2950)

Reviewed By: javache

Differential Revision: D58561775

Pulled By: NickGerleman

fbshipit-source-id: 0f7879a028b84379f4f00c65bcfc6b1a7d66814a
2024-06-14 13:55:58 -07:00
Nicola Corti 2b640bec34 Fix for broken test_helloworld_android on Release (#44952)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44952

The test_helloworld_android Release variant are broken on GHA.
This fixes it as it forces hermesc to be built *before* the app attempts to create a bundle.

Changelog:
[Internal] [Changed] - Fix for broken test_helloworld_android on Release

Reviewed By: cipolleschi, blakef

Differential Revision: D58591480

fbshipit-source-id: 2afc1cfe8c416da6f5919d20098639653798dd1a
2024-06-14 11:11:20 -07:00
Riccardo Cipolleschi f1a362d834 Update the testing-script to use github actions (#44923)
Summary:
With the migration to GHA, we are updating the testing scripts to work with the new CI.

There are a bit of shenanigans due to:
* How GHA archives artifacts => they are all `.zip` files, so I had to play around with unzipping them
* GHA seems to create a different commit, like if it is forking the repo instead of using it. I think that it is how the checkout action works. *Note:* this might be a problem for the `Create React Native Release` workflow because it has to commit on the stable branch!
* Android is building only the simulator architecture when running from regular CI. The app is not configured to run only on that, so the RNTestProject was a failing because it was trying to build all the available architectures. It is an easy fix in the user project space when release testing.

## Changelog:
[Internal] - Update the testing script to work with the new CI

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

Test Plan:
Tested locally.

* [iOS] RNTester - Hermes 
* [iOS] RNTester - JSC 
* [Android] RNTester - Hermes 
* [Android] RNTester - JSC 
* [iOS] RNTestProject - Hermes   (The project is created correctly and it builds, crash at runtime for https://github.com/facebook/react-native/issues/44926)
* [iOS] RNTestProject - JSC  (The project is created correctly and it builds, crash at runtime for https://github.com/facebook/react-native/issues/44926)
* [Android] RNTester - Hermes  (Needed to build only the simulator architecture)
* [Android] RNTester - JSC  (Needed to build only the simulator architecture)

Reviewed By: andrewdacenko

Differential Revision: D58528432

Pulled By: cipolleschi

fbshipit-source-id: 733065de4c532b13d8e95e2217f9aafd5a2ef8a0
2024-06-14 10:56:52 -07:00
Ruslan Lesiutin 09bdbace95 refactor[LogBox]: filter out ANSI color styles (#44924)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44924

# Changelog: [Internal]

For Strict Mode, RDT backend will apply ANSI escape codes to style the message, basically to dim it for 2-nd invocations of logs / warnings / errors in Strict Mode.

With these changes, LogBox will filter out these stylings, so that the message is displayed correctly in the LogBox bubble and in LogBox panel (full screen mode).

Reviewed By: rickhanlonii, yungsters

Differential Revision: D58477316

fbshipit-source-id: 17773f658d2a3bfa7f6a3ccec9fc88a97dd2c0af
2024-06-14 10:42:12 -07:00
Christoph Purrer 810a516475 Call Turbo Module methods 'methods' in the Turbo Module JSON schema (#44919)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44919

## Changelog:

[Internal] [Fixed] - Call Turbo Module methods 'methods' in the Turbo Module JSON schema

We don't support `properties` on Turbo Modules. We only support methods (even eventEmitters are just methods)

Reviewed By: javache

Differential Revision: D58510557

fbshipit-source-id: 02b1dc93a37b58b47bb9fd94a9658b5a7301bf55
2024-06-14 10:36:31 -07:00
Wojciech Lewicki 358fe46969 fix: make it possible to add multiple mountingOverrideDelegates (#44927)
Summary:
PR changing the single mountingOverrideDelegate to a vector of those, so other listeners can operate on the transaction. Used by `react-native-screens` in https://github.com/software-mansion/react-native-screens/pull/2134 and `react-native-reanimated` in https://github.com/software-mansion/react-native-reanimated/pull/6055.

Till now, only one listener could be added there, meaning that e.g. `Layout Animations` from `react-native`,  `Layout Animations` from `react-native-reanimated` and listening for `Screen` removal in `react-native-screens` could not operate at the same time.

## Changelog:

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

Pick one each for the category and type tags:

[GENERAL] [FIXED] - Message

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

[GENERAL] [FIXED] - Add option for multiple `mountingOverrideDelegates`

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

Test Plan: The code of `LayoutAnimations` inside `react-native` should work the same since it will add just one listener then. For other cases, different libraries can read/mutate transactions.

Reviewed By: javache

Differential Revision: D58530278

Pulled By: sammy-SC

fbshipit-source-id: d6305963621000be11d51a50cffff64526cca934
2024-06-14 10:22:32 -07:00
Riccardo Cipolleschi 9093f6f9c1 Move to M1 machines (#44944)
Summary:
CircleCI is removing support for intel machines at the end of June, hence we have to migrate to M1.

## Changelog:
[Internal] - Migrate to M1

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

Test Plan: CircleCI is green

Reviewed By: robhogan

Differential Revision: D58589100

Pulled By: cipolleschi

fbshipit-source-id: da7359d8c13093ef1595adc5fabb4f3628006c7a
2024-06-14 10:17:33 -07:00
Nicola Corti 19f6aec4a1 AGP to 8.5.0 (#44951)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44951

As the latest minor of AGP just released, let's bump it so that 0.75 users can use it.

Changelog:
[Android] [Changed] - AGP to 8.5.0

Reviewed By: cipolleschi

Differential Revision: D58587826

fbshipit-source-id: c14091faba1cb270ea2386f22fdbf079bce61421
2024-06-14 09:48:30 -07:00
Nicola Corti 9c7c955834 Add package.json to default lockFiles for ReactSettingsExtension (#44948)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44948

This is a small improvement suggested by tido64 to also account for package.json when computing caching
for autolinking of libraries.

Changelog:
[Internal] [Changed] - Add package.json to default `lockFiles` for ReactSettingsExtension

Reviewed By: cipolleschi

Differential Revision: D58587739

fbshipit-source-id: 6e0acf7d4badd8d8cc25dd90bb55fd6c0fa3779b
2024-06-14 09:33:45 -07:00
Ramanpreet Nara e78742a9d8 Allow native module loads during react instance init
Summary:
## Context
Right now, the ReactInstance construtor eagerly initializes native modules.

## Problem
When these modules initialize, they may load other modules. But, all those loads will fail, because the react instance is in the process of being constructed.

## Changes
Eagerly initialize modules after the react instance is created. That way, these native module requires work.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D58537536

fbshipit-source-id: d0e424df708ec35b014f5cecda11e8756e8f4346
2024-06-14 09:17:32 -07:00
Ramanpreet Nara 74d030de70 Attach react instance to react host immediately
Summary:
## Changes
1. Store the react instance inside a private property (vs in the mReactInstanceTaskRef)
2. Attach the react instance to that property immediatley, after create

## Problems resolved
1. React host apis that use the instance (like ReactContext.getNativeModule()) will now also work **during** react native init. (see T191972567).
2. If exceptions get thrown during react instance init, the react instance will now get cleaned up (see test plan).

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D58537535

fbshipit-source-id: fddf44d45b214b52a950e33d67ac6612a50ddcba
2024-06-14 09:17:32 -07:00
Blake Friedman 2e2b71eeab replace test_android_template with test_android_helloworld (#44905)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44905

Replaces the last template CI job.

Changelog: [Internal] [Changed] Use Helloworld in GHA CI workflow.

Reviewed By: cortinico

Differential Revision: D58466813

fbshipit-source-id: 333b9a4c71eec6901c78f144db48f365539c6a5a
2024-06-14 08:08:26 -07:00
Blake Friedman 7061649c03 Fixes for release builds (#44943)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44943

Release builds require more configuration.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D58529721

fbshipit-source-id: ca78ab530a459e6b9ec4595d22c1aecc66bc9dc0
2024-06-14 06:10:52 -07:00
Riccardo Cipolleschi c7d3220f4d Properly export the hermes tarball path to reuse it in RNTester (#44931)
Summary:
While working on GHA, I realized that RNTester is not reusing the hermes package we create in the previous steps.

This change should fix that, saving ~5 minute per RNTester test as it does not have to rebuild hermes every time.

## Changelog:
[Internal] - Improve CI to reuse hermes tarballs

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

Test Plan:
| Before | After |
| --- | --- |
| <img width="847" alt="Screenshot 2024-06-13 at 16 02 32" src="https://github.com/facebook/react-native/assets/11162307/099fd2d4-0954-4e64-baf0-6322e02d57bb"> | <img width="1203" alt="Screenshot 2024-06-13 at 16 34 20" src="https://github.com/facebook/react-native/assets/11162307/f8b9f9b6-0bd3-4ea4-8acd-3a4c1bffbc88"> |

Reviewed By: cortinico

Differential Revision: D58530335

Pulled By: cipolleschi

fbshipit-source-id: e711ae8affd78a4da4b64e6092cfffafd40589e5
2024-06-14 04:42:15 -07:00
Ruslan Lesiutin 7bd98eecd0 Add test showcasing memory leak in RemoteObjectsTable in Hermes (#44936)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44936

# Changelog: [Internal]

Added a small test that uses `folly:ManualExecutor`, which reproduces the memory leak issue in Hermes' RemoteObjectsTable:
1. Send `Runtime.enable`
2. Evaluate `console.log(<object>);` to populate `RemoteObjectsTable`
3. Send `Page.reload` to reload VM

This test is expected to fail, because by the time it is published, the D58398254 hasn't landed.

Reviewed By: motiz88

Differential Revision: D58531763

fbshipit-source-id: 99af3bfce0a31fe905d5bf2bf433f62cfbc34897
2024-06-14 04:05:10 -07:00
Alex Taylor (alta) 6584b408fb Deploy 0.238.0 to xplat (#44941)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44941

Changelog: [Internal]

Reviewed By: cyan33

Differential Revision: D58565114

fbshipit-source-id: ba6cba0445327ff7ff57505dbb498f2b5d8d5fe7
2024-06-14 02:19:11 -07:00
Charles Dudley 8b53d41a88 Update RN Share.share()'s argument types to be more explicit (#44887)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44887

The previous inexact object types and documentation for Share.share()'s arguments have led to confusion in how this library should be used. This diff updates the argument types to be more explicit, and rewrites some of the documentation for clarity.

Changelog:
[General][Breaking] Update `Share.share()`'s argument types to be more explicit.

Reviewed By: NickGerleman

Differential Revision: D58224906

fbshipit-source-id: 5ac8efe7caa0ecdd430fa7a1951c73c4acd8c6a1
2024-06-13 14:55:27 -07:00
Richard Howell 261f7b9f11 make yogaApple modular (#44938)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44938

Yoga is transitively included in Swift targets and needs to be modular.

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D58469454

fbshipit-source-id: 72bc6b5d3e5ee0710d9334a626e4e7297ce26b09
2024-06-13 14:18:45 -07:00
Rubén Norte 49a911fab4 Back out "Revert D58459930: [react-native][PR] Add ReactMarkerConstants.CONTENT_APPEARED support on Android"
Summary:
Changelog: [ANDROID] [ADDED] - Add the ReactMarkerConstants.CONTENT_APPEARED support on Android in bridgeless mode.

This re-applies https://github.com/facebook/react-native/pull/43620 which was reverted because a CI job started failing because we forgot to update `packages/react-native/ReactAndroid/api/ReactAndroid.api`.

Reviewed By: cortinico

Differential Revision: D58535868

fbshipit-source-id: 9eec33c5e798850a7434a6c391abf2fc3fc9d0a6
2024-06-13 12:49:25 -07:00
Moti Zilberman be6eda8c98 Suppress LogBox for warnings if Fusebox console is available
Summary:
Changelog: [Internal]

Showing warnings in LogBox is noisy, confusing for web developers, and not the best use of screen real estate on mobile platforms. Since the Fusebox console offers a superior experience, as of this diff we'll suppress warnings in LogBox if we detect that Fusebox is available.

*The first time* a warning is suppressed, globally (i.e. at most once per app launch), we'll show a notification pointing the user towards Fusebox. When the notification is clicked, we call the `DevSettings.openDebugger` method and dismiss it.

The wording of the notification ("Open debugger to view warnings") is intentional:

1. It's short enough to fit on small screens in its entirety.
2. It doesn't actually say "*click here* to open the debugger". This is for the best because `DevSettings.openDebugger` is a best-effort method that might fail, and in the current implementation there's no reliable feedback to the user about the success/failure of the launch.

Reviewed By: huntie

Differential Revision: D57681446

fbshipit-source-id: fe6101785780de3bc586ade11f471f7c74707be1
2024-06-13 12:22:48 -07:00
Moti Zilberman e3a76c5155 Expose DevSettings.openDebugger method to JS (#44934)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44934

Resubmission of D57681447 with an updated `ReactAndroid.api`.

 ---

Changelog: [Internal]

Adds a private API that gives JS the ability to trigger the same "open debugger" action as in the Dev Menu. This is in preparation for changes to LogBox.

For simplicity, this method operates on a best-effort basis - i.e. it doesn't report the success or failure (or failure reason) of the launch.

Reviewed By: huntie

Differential Revision: D58529832

fbshipit-source-id: e5510f529a19e0149d8dce04fa610e6c2371cc79
2024-06-13 12:22:48 -07:00
Vitali Zaidman dc460147bb Update debugger-frontend from 06a25f7...f7e972c (#44935)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44935

Changelog: [Internal] - Update `react-native/debugger-frontend` from 06a25f7...f7e972c

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

Reviewed By: hoxyq

Differential Revision: D58531480

fbshipit-source-id: 72d6d56a6a0d2262fb0a9120276add25fd4c219a
2024-06-13 10:40:30 -07:00
Pieter Vanderwerff a237e8da7a Destructure all overridden props (#44910)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44910

Props within the `Text` component are accessed both via destructuring the props object but also in some cases by using a "dot" access on the destructured `restProps`. However in all of the "dot" access cases the property is being overrided. Which means in the final JSX these properties get set twice, e.g. via the `restProps` spread then overrrided by static properties. This change just destructures all values to avoid this inefficiency.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D58446569

fbshipit-source-id: 12a800f5e2218a1d95d57cc689a4c79caab480b4
2024-06-13 10:14:56 -07:00
Alex Hunt 1c6bf24cfb Fix default accessor for unstable_fuseboxEnabled (RNTester crash)
Summary: Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D58527490

fbshipit-source-id: 7974189ab2f4d4e7f38199d5e824611634cd4d7b
2024-06-13 08:28:23 -07:00
Riccardo Cipolleschi ece68f0efd Remove the trigger-react-native-release to use the GHA workflow_dispatch UI (#44898)
Summary:
This change removes the need for the trigger-react-native-release.js script.
Thanks to the migration to Github Actions, we can now leverage the GHA workflow UI to trigger a Prepare Release job that creates a github tag that will spin a new release.

The pro of this approach are:
- less code to maintain: instead of a complex trigger release scripts, we only have to maintain two very straightforward scripts for the CI
- easier to trigger a release: instead of running a script, we can now just use the GH UI

The `trigger-react-native-release` script was doing the following steps:
- check that we are in the release branch ==> Already implemented in the GHA workflow
- Gets the branch name (not needed) ==> the job will automatically run on the stable branch
- Check for unsent changes (not needed) ==> we are not in a local environment
- get the gh token (not needed) ==> You need to be logged in GH and have write access to the repo
- get the version ==> provided as a parameter
- fails if the tag is already there ==> Functionality added in the workflow
- Parse and validate the version ==> Functionality added to the action prepare-release action + the JS Script
- Compute the npmTag ==> Functionality added to the action prepare-release action + the JS Script
- trigger the release workflow ==> The GH UI does that for us

## Changelog:
[Internal] - Remove the trigger-react-native-release.js

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

Test Plan: Testing in Production!

Reviewed By: cortinico, huntie

Differential Revision: D58461470

Pulled By: cipolleschi

fbshipit-source-id: 32bb0ee91370c9483a29e2ca2e18e24557d5fd53
2024-06-13 08:19:58 -07:00
Sergei Rybalkin 726a4a1e5e Revert D57681447: Expose DevSettings.openDebugger method to JS
Differential Revision:
D57681447

Original commit changeset: ddb1fbd0f1c8

Original Phabricator Diff: D57681447

fbshipit-source-id: 94bf94227bcc9fab8282bd68ddf3f4f1df64656b
2024-06-13 07:20:18 -07:00
Sergei Rybalkin 7e0f894d3a Revert D58459930: Add ReactMarkerConstants.CONTENT_APPEARED support on Android
Differential Revision:
D58459930

Original commit changeset: 4498a3623c50

Original Phabricator Diff: D58459930

fbshipit-source-id: 8bc5ef3c8b1e42a4085ee6d2834bf6906c936c0d
2024-06-13 07:19:45 -07:00
Alfonso Curbelo 3cb03cb297 Add 0.72.15 to Changelog (#44904)
Summary:
Add 0.72.15 to Changelog

## Changelog:
[Internal] [Changed] - Generated 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

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

Reviewed By: cipolleschi

Differential Revision: D58470819

Pulled By: cortinico

fbshipit-source-id: 20a1816811213ed9a69f1ede3579aa8fc661faf2
2024-06-13 04:53:46 -07:00
Blake Friedman b2e6a37e5b configure to build from source (#44920)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44920

Configure helloworld to build from source, using a combination of our [How to Build from Source](https://reactnative.dev/contributing/how-to-build-from-source#update-your-project-to-build-from-source) guide, as well as using rn-tester's config as a guide.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D58287748

fbshipit-source-id: 836b09416f4da4087fbdea4476d29cd226157914
2024-06-13 04:51:20 -07:00
Blake Friedman 6970854a15 cli assemble support (#44903)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44903

Call our wrapper to assemble an Android build of helloworld.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D58287785

fbshipit-source-id: 15aa303008254780b3d1b625b392bdbe2869a19a
2024-06-13 04:51:20 -07:00