Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[0.73] Merge up to 0.73-rc4 #1966

Merged
merged 108 commits into from
Nov 7, 2023
Merged

Conversation

Saadnajmi
Copy link
Collaborator

@Saadnajmi Saadnajmi commented Nov 2, 2023

Please select one of the following

  • I am removing an existing difference between facebook/react-native and microsoft/react-native-macos 👍
  • I am cherry-picking a change from Facebook's react-native into microsoft/react-native-macos 👍
  • I am making a fix / change for the macOS implementation of react-native
  • I am making a change required for Microsoft usage of react-native

Summary:

Merge the latest commits from upstreams' 0.73-stable branch

Changelog:

[GENERAL] [ADDED] - Merge up to 0.73-rc4

Test Plan:

CI should pass.

huntie and others added 30 commits September 26, 2023 10:24
#publish-packages-to-npm
Summary:
Pull Request resolved: facebook#39476

This diff enables native view config interop layer in bridgeless mode by default for OSS.
It also removes redundant `enableNativeViewConfigsInBridgelessMode` JS feature flag.
Changelog: [General][Added] - Native view config interop layer enabled in bridgeless mode.

Reviewed By: luluwu2032

Differential Revision: D49318325

fbshipit-source-id: ea2e38b2ea10637b578d98e38d97eed923498fb3
Summary:
Pull Request resolved: facebook#39661

Changelog:
[Android][Changed] - Enable Template with Bridgeless

Reviewed By: cortinico

Differential Revision: D49464580

fbshipit-source-id: 26dd8e2a0b9a66421d58f147eed4d2fd28817dc7
#publish-packages-to-npm
Summary:
Pull Request resolved: facebook#39640

changelog: [internal] internal

Reducing visibility from public to package only for `ReactHostImpl.getDefaultHardwareBackBtnHandler()` since it's only used within package

Reviewed By: mdvacca

Differential Revision: D49612859

fbshipit-source-id: 3c40888da732f33dc046d9363b08119e707f4ea4
Summary:
Pull Request resolved: facebook#39687

Bridgeless mode is releasing in 0.73.

Bridgeless mode isn't stable inside RNTester (in 0.73) without the TurboModule interop layer: T164853040.

**Changes:** Enable the TurboModule interop layer in RNTester (Bridgeless Mode).

**Urgency:** This will unblock the 0.73.

Changelog: [General][Added] - Enable TurboModule interop in Bridgeless mode

Reviewed By: fkgozali, dmytrorykun, luluwu2032

Differential Revision: D49653919

fbshipit-source-id: a4a09a99544c2ef8713484dbeab5cb04f29256cc
…nabled (facebook#39696)

Summary:
Pull Request resolved: facebook#39696

`Commands` and `Constants` should be set in native only if component data is instantiated via native view config interop layer.
Changelog: [Internal]

Reviewed By: RSNara

Differential Revision: D49684166

fbshipit-source-id: ceaa29c2ed3336aa6e21a116a3f5f94e03c225c1
#publish-packages-to-npm
Summary:
Pull Request resolved: facebook#39710

Last week Apple released Xcode 15, which required us to ship a workaround for the new linker.
Unfortunately, the previous fix was not good enough and there were some edge cases that were not covered.
For example, in some occasions the flags are read as an array and the `-Wl` and the `-ld_classic` flags were separated and not properly removed when moving from Xcode 15 to Xcpde 14.3.1.

This change fixes those edge cases, with a more robust solution where:
- We convert the flags to a string.
- We trim the string and the values properly.
- We add the flags when running `pod install` with Xcode 15 as the default iOS toolchain.
- We remove the flags when running `pod install` with Xcode <15 as the default iOS toolchain.

## Changelog:
[Internal] - Make the Xcode 15 workaround more robust.

Reviewed By: dmytrorykun

Differential Revision: D49748844

fbshipit-source-id: 34976d148f123c5aacba6487a500874bb938fe99
Summary:
Sync latest `debugger-frontend` artifacts, based on motiz88/rn-chrome-devtools-frontend#12.

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D49502838

fbshipit-source-id: 25805066670ac35ec976dc820a73a722ee182dd2
Summary:
Pull Request resolved: facebook#39755

The goal of this diff is to fix:
```
JNI DETECTED ERROR IN APPLICATION: JNI NewGlobalRef called with pending exception java.lang.NoSuchMethodError: no static or non-static method
"Lcom/facebook/react/jscexecutor/JSCExecutor;.initHybrid(Lcom/facebook/react/bridge/ReadableNativeMap;)Lcom/facebook/jni/HybridData;"

```

changelog: [internal] internal

Reviewed By: luluwu2032

Differential Revision: D49831595

fbshipit-source-id: 9ce22cdccdd02af74edb27be2df72a469d3166c9
#publish-packages-to-npm
This is an eager cherry pick of facebook#39784 for `0.73-stable`.
Applies correct fix for `_formatVersion` misalignment — based on facebook#36657.
This is an eager cherry pick of facebook#39788 for `0.73-stable`.
#publish-packages-to-npm
cipolleschi and others added 6 commits October 24, 2023 15:14
Co-authored-by: Lulu Wu <luluwu@meta.com>
Co-authored-by: Gabriel Donadel <donadeldev@gmail.com>
fix `java.lang.NoSuchMethodError` for Bridgeless (facebook#41081)
resolved: facebook#41081
resolved: facebook#40999
resolved: facebook#41165
Fix RNTester not showing Redbox when Metro is not connected (facebook#41191)
resolved: facebook#41191
resolved: facebook#41190
resolved: facebook#41085
resolved: facebook#41206
@Saadnajmi Saadnajmi requested a review from a team as a code owner November 2, 2023 17:24
@Saadnajmi Saadnajmi changed the base branch from main to 0.73-stable November 2, 2023 17:26
mdvacca and others added 15 commits November 2, 2023 11:55
Summary:
Original commit changeset: 93eba1eb3106

Original Phabricator Diff: D50694805

changelog: [internal] internal

Reviewed By: fkgozali

Differential Revision: D50853438

fbshipit-source-id: 687cb100dfea28f3ea63812e1dd5b21e4c8ceb0e
Summary:
Fixes: facebook#39524

## Changelog:

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

Pick one each for the category and type tags:
For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[ANDROID] [FIXED] - Fix textTransform not working in new architecture

Pull Request resolved: facebook#41223

Test Plan:
**Before:**
<img width="307" alt="image" src="https://github.com/facebook/react-native/assets/34857453/d44e6030-0a49-42c9-be44-cf7541583af0">

**After:**
<img width="307" alt="image" src="https://github.com/facebook/react-native/assets/34857453/fb717cec-72d3-41d7-8c48-4ec9a9ecb16b">

Reviewed By: javache

Differential Revision: D50773216

Pulled By: NickGerleman

fbshipit-source-id: 769bf67f2661ff4ff7b88121493bdd27564458d3
…acebook#41270)

Summary:
Pull Request resolved: facebook#41270

`scheduleCellsToRenderUpdate()` is called in response to new measurements, or component changes. It has logic to decide whether to immediately calculate new state, or to defer it until a later batched period.

It will not immediately update state if we don't yet have measurements for cells, but this condition is after another which calculates priority, relying on these measurements. These are garbage if we don't yet have measurements, and trigger an invariant violation in horizontal RTL.

This switches around the conditions, to avoid offset resolution if we don't yet have valid measurements.

I suspect some "hiPri" renders where cells shift are bugged right now when we update state in response to content size change, before we have new corresponding cell layouts.

Changelog:
[General][Fixed] - Bail on hiPri render on missing layout data before checking priority

Reviewed By: yungsters

Differential Revision: D50791506

fbshipit-source-id: 8dbffc37edd2a42f7842c0090d344dcd6f3e3c6d
…acebook#41176)

Summary:
facebook#35198 introduced a regression where if an `{transform: undefined}` style is provided to an Animated View a `Cannot read property 'map' of undefined` type error is thrown

<img src="https://github.com/facebook/react-native/assets/11707729/bb87781e-1ba7-40ec-879d-a57cef3e10d9" height="200" />

## Changelog:

[GENERAL] [FIXED] - Fix `createAnimatedStyle` when providing an undefined transform style

Pull Request resolved: facebook#41176

Test Plan:
<details>
  <summary>Render an `Animated.View` passing `style={{transform: undefined}}`</summary>

E.g.

```
const UndefinedTransform = () => {
  return (
    <View>
      <Animated.View style={{transform: undefined}} />
    </View>
  );
};
```
</details>

### RNTester
1. Open the RNTester app and navigate to the Animated page
2. Navigate to the Transform Styles page
3. App should not throw any errors

<table>
    <tr><th>Before</th><th>After</th></tr>
    <tr>
        <td><video src="https://github.com/facebook/react-native/assets/11707729/92ba9c3b-60b0-4805-8080-0e7fb7c00345"/></td>
        <td><video src="https://github.com/facebook/react-native/assets/11707729/80e2bba8-6ff6-4cf5-bcb8-26de0b869036"/></td>
    </tr>
</table>

Reviewed By: fabriziocucci

Differential Revision: D50638415

Pulled By: javache

fbshipit-source-id: 0ee949f019a77b8bef557888694e0e8404810105
Summary:
Pull Request resolved: facebook#40869

Bumps DRNPT to v5 - the significant change is that this one depends on `react-native/normalize-color: ^0.73.0`, instead of `*`, so is protected from future breaking changes to that package.

NOTE: We can't safely include `react-native/normalize-color: ^0.74.0` in the dependency range of DRNPT because `0.74.0` isn't a semver-compliant release (0.74 isn't cut yet), so this will pull 0.73.2 from NPM, which is fine.  We may need to publish DRNPT@6 if 0.74 final turns out to contain breaking changes (eg, a Node 20 bump).

Changelog:
[General][Fixed] Update `deprecated-react-native-prop-types` to remove fragile transitive `*` dependencies.

Reviewed By: huntie

Differential Revision: D50228564

fbshipit-source-id: 01aafafad40d9a93d00de2b5f45d2796620b9b5d
…k#41207)

Summary:
This should fix
facebook#37905 (comment)

When working on react-native-fast-image, we realized that the interop layer does not work for components where the exported name is different from the iOS class.

To fix this, we can use the Bridge to retrieve the actual view manager, given the component name.

This solution should be much more robust than making assumptions on the ViewManager name, given the ComponentName.

On top of that, we realized tha the interop layer was not calling `didSetProps` after setting the props, so we are invoking that.

bypass-github-export-checks

[iOS][Fixed] - Add support for Components with custom names in the interop layer.

Pull Request resolved: facebook#41207

Test Plan: Tested locally on an app created in 0.72 and 0.73 in Bridge and Bridgeless mode.

Reviewed By: cortinico

Differential Revision: D50698172

Pulled By: cipolleschi

fbshipit-source-id: 49aee905418515b0204febbbe6a67c0114f37029
…cebook#41284)

Summary:
There is a problem in the way that we check if Fabric is enabled inside `react_native_post_install`.

https://github.com/facebook/react-native/blob/899e7cdb55197fc17a96a93af4f8bcc7519553c2/packages/react-native/scripts/react_native_pods.rb#L239

We're determining if fabric is enabled by checking if the `React-Fabric pod `is present, but since we always call `setup_fabric!(:react_native_path => prefix)`  (facebook#39057) inside `use_react_native` the `React-Fabric` pod is always present causing the `-DRN_FABRIC_ENABLED` flag to always be added to `project.pbxproj` even if the new arch is disabled.

[IOS] [FIXED] - Fix ios pod post_install logic for detecting if fabric is enabled

Pull Request resolved: facebook#41284

Test Plan: Run `use_react_native!(fabric => false)` should not add the `-DRN_FABRIC_ENABLED` flag to `project.pbxproj`

Reviewed By: fkgozali

Differential Revision: D50896487

Pulled By: cipolleschi

fbshipit-source-id: 78154407ce52b09fd3a317b7dc64bd4bba56363e
#publish-packages-to-npm
@Saadnajmi Saadnajmi changed the title [0.73] Merge up to November 2 [0.73] Merge up to 0.73-rc4 Nov 7, 2023
@Saadnajmi Saadnajmi enabled auto-merge (squash) November 7, 2023 09:21
@Saadnajmi Saadnajmi merged commit bb83c40 into microsoft:0.73-stable Nov 7, 2023
31 of 36 checks passed
@Saadnajmi Saadnajmi deleted the marge-more branch November 7, 2023 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.