Commit Graph

27052 Commits

Author SHA1 Message Date
Oskar Kwaśniewski acc5fdff47 fix: make sure initialScrollIndex is bigger than 0 (#36844)
Summary:
Hey,

`adjustCellsAroundViewport` function was checking if `props.initialScrollIndex` is truthy and -1 was returning true. This caused bugs with rendering for tvOS: https://github.com/react-native-tvos/react-native-tvos/pull/485 There are warnings in the code about `initalScrollIndex` being smaller than 0 but this if statement would still allow that.

## Changelog:

[General] [Fixed] - Make sure initialScrollToIndex is bigger than 0 when adjusting cells

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

Test Plan: Pass -1 as initialScrollToIndex. Check that this code is executed.

Reviewed By: cipolleschi

Differential Revision: D44856266

Pulled By: NickGerleman

fbshipit-source-id: 781a1c0efeae93f00766eede4a42559dcd066d7d
2023-05-05 03:23:36 +09:00
Distiller 9cb7b44d4c [0.72.0-rc.2] Bump version numbers v0.72.0-rc.2 2023-05-04 12:16:25 +00:00
Nicola Corti 5d7c34c3c4 [LOCAL] Do not run Buck OSS on release branches (#37251) 2023-05-04 12:40:52 +01:00
Lorenzo Sciandra 138cb9187e [LOCAL] fix version of metro config 2023-05-04 12:17:40 +01:00
Lorenzo Sciandra d9d7286e8a [LOCAL] bump CLI to 11.2.1 2023-05-04 10:32:41 +01:00
Lorenzo Sciandra a0cb168aa0 Merge pull request #37230 from facebook/cipolleschi/fix_reading_hermes_tag 2023-05-03 16:05:59 +01:00
Lorenzo Sciandra 840db2122a Merge pull request #37203 from lunaleaps/revert-insets 2023-05-03 16:05:47 +01:00
Riccardo Cipolleschi 49d2009add Pass the file that needs to be read 2023-05-03 16:01:27 +01:00
Alex Hunt 738e01430a Set dev menu title to "React Native Dev Menu", add JS executor description (#37195)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37195

Updates the Dev Menu header on Android.

- Small alignment related to D44872456.
- Add subheading label showing current JS executor description (matching iOS) (note: on Android this is unformatted (but informative), e.g. `JSIExecutor+HermesRuntime`).

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D45142924

fbshipit-source-id: 5c95fc85e6d3b6879287440f76165b02957283e5
2023-05-03 15:08:58 +01:00
Dmitry Rykun 8de71e58b6 Make sure that hermes-engine is updated with cocoapods. (#37148)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37148

This should fix https://github.com/facebook/react-native/issue/36945, which is also causing annoyance when doing the releases

## Changelog:
[iOS][Changed] - Use contents of sdks/.hermesversion to let cocoapods recognize Hermes updates.

Reviewed By: cipolleschi

Differential Revision: D45394241

fbshipit-source-id: 972fbee8f954b90f7087bb232f922761c1639e06
2023-05-03 15:08:48 +01:00
Nicola Corti 34d7d016b4 Remove unnecessary files in RN-Tester (#37152)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37152

Those files are unncessary and can be removed from RNTester.
* Proguard file is empty
* Signing config is unnecessary and we can use the debug one also for release.

Changelog:
[Internal] [Changed] - Remove unnecessary files in RN-Tester

Reviewed By: hoxyq

Differential Revision: D45399388

fbshipit-source-id: fd1c6cccaef668e688a699e31045bdc8103ea98e
2023-05-03 15:08:41 +01:00
Nicola Corti bbecf516c0 Re-enable newArch on RN-Tester
Summary:
I accidentally turned off New Architecture on RN-Tester while shipping the Fabric Interop. This reverts it.

Changelog:
[Internal] [Changed] - Re-enable newArch on RN-Tester

Reviewed By: cipolleschi

Differential Revision: D45398914

fbshipit-source-id: 2c36f3d0440f147189de644821e1704c00353bac
2023-05-03 15:08:34 +01:00
Nicola Corti 1c09228161 Do not explicitely depend on androidx.swiperefreshlayout:swiperefreshlayout (#37139)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37139

This dependency is unnecessary. React Native already exposes a `api` dependency on
`androidx.swiperefreshlayout:swiperefreshlayout` so every consumer will also get it.

This is just another line in the template we can effectively remove.

Changelog:
[Android] [Changed] - Do not explicitely depend on androidx.swiperefreshlayout:swiperefreshlayout

Reviewed By: cipolleschi

Differential Revision: D45390819

fbshipit-source-id: cce34c6a09100d36ee5eb003bb30323f64f0bb9c
2023-05-03 15:08:27 +01:00
Nicola Corti fed80ad8c3 Add support for Events on the Fabric Interop Layer (#37059)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37059

This diff introduces InteropEventEmitter, a re-implementation of RCTEventEmitter that works with Fabric and allows to support events on the Fabric Interop for Android.
Thanks to this, users can keep on calling `getJSModule(RCTEventEmitter.class).receiveEvent(...)` in their legacy ViewManagers and they will be using the EventDispatcher
under the hood to dispatch events.

The logic is enabled only if the `unstable_useFabricInterop` flag is turned on. I've turned this on for the template setup and for RN Tester.

On top of this, this diff takes care also of event name "normalization".
On Fabric, all the events needs to be registered with a "top" prefix. With this diff, we'll be adding the "top" prefix at registration time, if the user hasn't added them.
This allows to use legacy ViewManagers on Fabric without having to ask users to change their event name.

Changelog:
[Android] [Added] - Add support for Events on the Fabric Interop Layer

Reviewed By: mdvacca

Differential Revision: D45144246

fbshipit-source-id: 63d4060153907c05977c976379b90574d1f69866
2023-05-03 15:07:02 +01:00
Tim Yung 2fcda359ba RN: Upgrade to deprecated-react-native-prop-types@4.1.0
Summary:
Upgrades React Native to `deprecated-react-native-prop-types@4.1.0`, which includes many of the new prop types in React Native v0.72.

See: https://github.com/facebook/react-native-deprecated-modules/blob/main/deprecated-react-native-prop-types/CHANGELOG.md

Changelog:
[General][Changed] - Upgrade to deprecated-react-native-prop-types@4.1.0

Reviewed By: rickhanlonii

Differential Revision: D45155955

fbshipit-source-id: 36e715c2338b667755bd1e522b7d5a2611103779
2023-05-03 15:06:55 +01:00
Alex Hunt d7af544bb9 Rename "Debug Menu" title to "Dev Menu" on iOS (#36981)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36981

We are (following a quick internal RFC) looking to standardise the term "[in-app] [Developer|Debug] menu" to "Dev Menu" in the React Native Debugging docs (and all docs references). (Indeed, the prevalent existing use in docs was already "Developer menu".) This PR aligns naming in the `RCTDevMenu` component on iOS.

See also https://github.com/facebook/react-native-website/pull/3692.

Changelog:
[iOS][Changed] - Rename "Debug Menu" title to "Dev Menu"

Reviewed By: christophpurrer

Differential Revision: D44872456

fbshipit-source-id: c222bb2c551a4f434a1dc0efbb8d4f75c785aa11
2023-05-03 15:06:19 +01:00
Lorenzo Sciandra dd89bfb254 [LOCAL] add missing types requirement 2023-05-03 15:04:51 +01:00
Nick Gerleman 414c015da3 Bump @tsconfig/react-native to 3.0.0 (#36957)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36957

Fixes https://github.com/facebook/react-native/issues/36830

This bumps the version of tsconfig/react-native to inform TypeScript of more libraries provided by Hermes/React Native. See https://github.com/tsconfig/bases/commit/eee5f19ce8c6a9a8d8baed5ce42588b95262b1a8.

I did the search off of current Hermes/RN main branch, but I think the new config should be valid as far back as 0.71. It doesn't make sense to change the new app template for an old version though, so instead I think we should include this new version in 0.72.

Changelog:
[General][Changed] - Bump tsconfig/react-native to 3.0.0

Reviewed By: cortinico

Differential Revision: D45085932

fbshipit-source-id: 448f1103ef13f76fa95884f790a3cccd9ff75b2f

# Conflicts:
#	packages/react-native/template/package.json
2023-05-03 15:03:30 +01:00
Dmitry Rykun c1c8a30cc8 Do not send extra onChangeText even wnen instantianting multiline TextView (#36930)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36930

This diff fixes https://github.com/facebook/react-native/issues/36494

Now this code matches its [Fabric counterpart](https://github.com/facebook/react-native/commit/7b4889937ceb0eccdbb62a610b58525c29928be7).

There is also one extra check that `_lastStringStateWasUpdatedWith != nil`. With that in place we don't send extra `onChangeText` event when `attributedText` is assigned for the first time on TextView construction.

Changelog: [IOS][Fixed] - Do not send extra onChangeText even wnen instantianting multiline TextView

Reviewed By: sammy-SC

Differential Revision: D45049135

fbshipit-source-id: 62fa281308b9d2e0a807d024f08d8a214bd99b5e
2023-05-03 15:02:11 +01:00
Nick Gerleman bab46dd321 Export EmitterSubscription TypeScript Type (#36632)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36632

Discovered when bumping the RN documentation to typecheck against 0.72, https://github.com/facebook/react-native/pull/36109 removed the `EmitterSubscription` type which should be kept public.

Changelog:
[General][Fixed] -  Export EmitterSubscription TypeScript Type

Reviewed By: cortinico

Differential Revision: D44375081

fbshipit-source-id: c8dbd5694d3a728a0a2091210894d27c9d84a012
2023-05-03 15:02:02 +01:00
Janic Duplessis 37abba0193 Add fabric support for maintainVisibleContentPosition on Android (#35994)
Summary:
Implement a few missing bits for `maintainVisibleContentPosition` to work with fabric. The main thing needed is to add 2 fabric renderer listener methods to allow to hook into specific parts of the rendering process. We need some code to execute before view updates are executed and after view updates are executed. The current methods that are exposed do not work for this case. `willDispatchViewUpdates` is called from JS thread, and there doesn't seem to be a way to add UI blocks that will be executed at the right time like we do in paper. `didDispatchMountItems` is called for every frame which we don't want and will cause lots of overhead.

After that we simply need to call the right methods in the new renderer listener methods.

## Changelog

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

Pick one each for the category and type tags:

[ANDROID] [ADDED] - Add fabric support for maintainVisibleContentPosition on Android

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

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

Test Plan: Tested in RN tester maintainVisibleContentPosition example on Android with fabric enabled.

Reviewed By: cipolleschi

Differential Revision: D44131763

Pulled By: cortinico

fbshipit-source-id: 32c0b5867d460537b18a70d472fd58052da6cf80
2023-05-03 15:01:44 +01:00
Luna Wei 08fc618b77 Revert "feat: Add Fabric implementation of inset logical properties (#35692)"
This reverts commit 9669c10afc.
2023-05-02 14:22:55 -07:00
Alex Hunt c068efcdae [0.72] Bump Metro to 0.76.2, cherry pick Metro config updates (#36976)
Co-authored-by: Deepak Jacob <deepakjacob@meta.com>
2023-04-21 10:50:47 +01:00
Lorenzo Sciandra 51de9e1ad6 [LOCAL] update podlock post release to fix CI 2023-04-11 12:14:51 +01:00
Distiller 30b5de04d6 [0.72.0-rc.1] Bump version numbers v0.72.0-rc.1 2023-04-05 12:16:48 +00:00
Nicola Corti f3b71f4843 Fix a crash new app template when createRootView is invoked with null bundle (#36796)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36796

As the title says, this fixes a instacrash on template when `createRootView` is invoked with
a bundle being null. The crash was happening as the parameter, despite being not used, is
specified as `Bundle` and is not nullable. When the Java caller passes `null`, the app crashes.

Changelog:
[Android] [Fixed] - Fix a crash new app template when `createRootView` is invoked with null bundle

Reviewed By: cipolleschi

Differential Revision: D44668305

fbshipit-source-id: 1150ddac26f19765e7340878c8850d8462c6f3fd
2023-04-04 18:36:28 +01:00
Lorenzo Sciandra c92bb3c526 [LOCAL] bump CLI to 11.1.1 2023-04-04 11:50:51 +01:00
Samuel Susla 921bbb6cf1 Correct offset when drawing text to TextStorage coordinate system. (#36771)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36771

Changelog: [internal]

Previously, when `NSTextStorage` was cached, we were not accounting for case where text which was aligned to centre or left, was used to size its container.
The result was that it was painted outside of its container, therefore invisible. To fix this, we adjust the offset to make sure text is painted correctly.

This bug only happens if:
- Text is not aligned to left in right to left writing system.
- The canvas where text is drawn is not stretched to full width of its parent.
- The offset needs to be large enough for this to matter, otherwise the text is just slightly off.
- Because of the caching mechanism, it had to be a piece of text that was rendered before. Otherwise it would work.

This complexity is worth the trouble to avoid invalidation of layout inside NSTextContainer, which is expensive.

Reviewed By: cipolleschi

Differential Revision: D44624085

fbshipit-source-id: 1bb8ef88933a49b478a2606dba6bf16b4e728b2b
2023-04-03 15:19:06 +01:00
Samuel Susla 6d6b6a8345 Only create NSAttributedString if NSTextStorage is nil (#36773)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36773

Changelog: [internal]

Do not construct `NSAttributedString` if `NSTextStorage` exists. Creating `NSAttributedString` is expensive and it isn't needed to measure text if `NSTextStorage` `exists`

Reviewed By: cipolleschi

Differential Revision: D44620292

fbshipit-source-id: 0827c514e40fcbd9626d2b7d7b6d28a3332d9aa1
2023-04-03 15:19:06 +01:00
Samuel Susla 614e4109bf Extract NSTextStorage measure into a helper method (#36772)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36772

changelog: [internal]

Move NSTextStorage into a private method.

Reviewed By: cipolleschi

Differential Revision: D44620262

fbshipit-source-id: 4855879f3c3a09b2f352ab84c906c7bd106aebda
2023-04-03 15:19:06 +01:00
Riccardo Cipolleschi d3c94b42f4 Fix Cocoapods for Xcode 14.3.0 (#36759)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36759

On Thursday the 30th, Apple Released Xcode 14.3.0.
This Version of Xcode enforce some version checks for which React-Codegen, which supported iOS 11 as minimum supported version, could not be build anymore.

This change ensue that React-Codegen is always aligned to the min version supported by React Native.
Plus, it moves CircleCI's Xcode to 14.3.0, to keep this problem in Check.

While working on this, I figured that, with the monorepo, Ruby tests stopped working because they were in the wrong folder: I moved them in the right one.

## Changelog:
[iOS][Fixed] - Make React Native build with Xcode 14.3.0 and fix tests

Reviewed By: blakef

Differential Revision: D44605617

fbshipit-source-id: 3ec1f5b36858ef07d9f713d74eb411a1edcccd45
2023-04-03 15:19:06 +01:00
Lorenzo Sciandra e795b534aa fix(metro-config): fix and realign the situation for metro config for 0.72 (#36746) 2023-03-31 17:44:20 +01:00
Ruslan Lesiutin 68cd44be07 Merge pull request #36573 from hoxyq/hoxyq/cherry-pick-ci-scripts-changes-to-0.72-stable
RN [refactor]: bump and realign package versions by running a single …
2023-03-31 15:53:15 +01:00
Ruslan Lesiutin a469927c16 RN [refactor]: bump and realign package versions by running a single script
Summary:
Changelog: [Internal]

Okay, so before the monorepo migration we had to use two scripts separately:
1. Bumping every package with `npm run bump-all-updated-packages`
2. Aligning other packages versions with `npm run align-package-versions`

The reason for it is that *before the monorepo* in a release branch cutoff process we had a step, which was removing `workspaces` keyword from `react-native` package. Without this keyword all new versions of packages will be resolved from npm (where they will be not available yet, because we have to publish them prior to it)

This is not the case for our current setup, and we can actually bump packages versions and they will be resolved as a workspaces successfully

Differential Revision: D44261057

fbshipit-source-id: 6095209c8183f6d84e2697fda2e9a21f8a57f73e
2023-03-31 13:44:43 +01:00
Alex Hunt c5f18de6a2 Update template metro.config.js, remove transitive metro dep from main package (#36723)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36723

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D44542544

fbshipit-source-id: 70807edc8a183c28e1f0018a5426f4f2e29580a0
2023-03-31 11:34:47 +01:00
Nicola Corti 1199e4764d Add examples of Direct Manipulation in Fabric Intrerop (#36724)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36724

Similarly to iOS, this adds some examples of direct manipulation on Android using
all the various methods.

Changelog:
[Internal] [Changed] - Add examples of Direct Manipulation in Fabric Intrerop

Reviewed By: cipolleschi

Differential Revision: D44541437

fbshipit-source-id: b6e10ac0a815f41ff3c980236b7d8c6937e92065
2023-03-31 11:33:01 +01:00
Nicola Corti cb30323f04 Add example for dispatchViewManagerCommand on Fabric Interop (#36725)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36725

This diff adds an example of using `dispatchViewManagerCommand` for the Fabric Intreop on Android.

Changelog:
[Android] [Added] - Add example for dispatchViewManagerCommand on Fabric Interop

Reviewed By: cipolleschi

Differential Revision: D44540951

fbshipit-source-id: 85bc65ad0eb3a951fbb37d61ca26532ec3cc53b7
2023-03-31 11:32:52 +01:00
Nicola Corti 5299c60bdc Add Fabric Interop event example (#36692)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36692

Similar to the iOS counterpart,
this changes adds an example to RNTester to verify that the Interop Layer can process bubbling events in Fabric as it used to do in Paper.

Changelog:
[Internal] [Changed] - Add Fabric Interop event example

Reviewed By: cipolleschi

Differential Revision: D44467555

fbshipit-source-id: 1f1af27583c402641c549bc2926a64469dcd7b3f
2023-03-31 11:32:09 +01:00
Nicola Corti 341cda45ee Add Fabric Interop constants example (#36693)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36693

Similar to #36417, this changes adds an example to RNTester to verify that the Interop Layer can process constants in Fabric as it used to do in Paper for Android.

Changelog:
[Android] [Added] - Add Fabric Interop constants example

Reviewed By: cipolleschi

Differential Revision: D44466391

fbshipit-source-id: 74e654319b93e60b415297dcdddc98eb100913df
2023-03-31 11:31:46 +01:00
Alex Hunt 0026f73360 Remove 'import' from default Package Exports conditions (#955)
Summary:
X-link: https://github.com/facebook/metro/pull/955

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

Changelog:
[General][Changed] - Default condition set for experimental Package Exports is now `['require', 'react-native']`

The [Exports RFC](https://github.com/react-native-community/discussions-and-proposals/blob/main/proposals/0534-metro-package-exports-support.md) had assumed that supporting the `"import"` condition was a syntax-only difference, given we are not in a Node.js environment — and so was worthwhile to support for maximal ecosystem compatibility.

{F915841105}

This assumption is similar to [`--moduleResolution bundler` in TypeScript 5.0](https://github.com/microsoft/TypeScript/pull/51669):

> bundlers and runtimes that include a range of Node-like resolution features and ESM syntax, but do not enforce the strict resolution rules that accompany ES modules in Node or in the browser
> -- https://github.com/microsoft/TypeScript/pull/51669#issue-1467004047

However, robhogan has rightly pointed out that **we should not do this!**

- ESM (once transpiled) is **not** simply a stricter subset of in-scope features supported by CJS. For example, it supports top-level async, which would be breaking at runtime.
- We recently made the same change for our Jest environment:
    - https://github.com/facebook/react-native/commit/681d7f8113d2b5e9d6966255ee6c72b50a7d488a

As such, we are erring on the side of correctness and supporting only `['require', 'react-native']` in our defaults. At runtime, all code run by React Native is anticipated to be CommonJS. `"exports"` will instead allow React Native to correctly select the CommonJS versions of modules from all npm packages.

Metro changelog: [Experimental] Package Exports `unstable_conditionNames` now defaults to `['require']`

Reviewed By: robhogan

Differential Revision: D44303559

fbshipit-source-id: 0077e547e7775e53d1e4e9c3a9d01347f4fb7d4a
2023-03-31 11:28:56 +01:00
Lorenzo Sciandra 392a843494 [LOCAL] fix e2e local testing script post metro-config 2023-03-30 17:50:42 +01:00
Lorenzo Sciandra 8beed6ad08 [LOCAL] need to be in the rn-tester folder the whole time when testing rn-tester 2023-03-30 17:02:02 +01:00
Riccardo Cipolleschi a9ec217117 Fix RNTester in main (#36686)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36686

After the recent changes of Metro and Metro-Config, we need to update the path used to load the bundle in RNTester

## Changelog:
[General][Fixed] - Use the right path to load RNTester bundle

Reviewed By: cortinico

Differential Revision: D44465418

fbshipit-source-id: 96170194579792f9a5d8a141328d43e45a4db973
2023-03-30 16:56:24 +01:00
Lorenzo Sciandra d0699dc428 [LOCAL] bump CLI to 11.0.1 2023-03-30 16:47:26 +01:00
Lorenzo Sciandra 73837a72f6 [LOCAL] bump js-polyfills and virtualized-lists 2023-03-30 13:54:18 +01:00
Lorenzo Sciandra 8a493af0b9 bumped packages versions
#publish-packages-to-npm
2023-03-30 13:49:52 +01:00
Nicola Corti 7b2cff831e Re-enable Fabric in the default app template/RN-Tester (#36717)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36717

After D43711737 landed, it turns out that Fabric is always disabled for both
RN-Tester and new app from template (so for 0.72 also RC0).
The reason is that a new method `createRootView(Bundle)` was introduced inside
`ReactActivityDelegate`. Both RN Tester and the template were using the
old `createRootView()` method which is not called anymore at this stage
(should potentially be deprecated?).

This diff fixes it by overriding both method inside `DefaultReactActivityDelegate`
so that both methods are setting the Fabric renderer.

Changelog:
[Android] [Fixed] - Re-enable Fabric in the default app template/RN-Tester

Reviewed By: cipolleschi

Differential Revision: D44536222

fbshipit-source-id: d22a0c522f011a8fe4d27b5d8f2fcf5dd13c3058
2023-03-30 13:49:30 +01:00
Riccardo Cipolleschi 6070b58a96 Add Examples for Direct Manipulation in the Interop Layer (#36610)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36610

This change add to RNTester examples of a legacy Native Component, loaded in the New Architecture through the Interop Layer, that uses the APIs described in the [Direct Manipulation](https://reactnative.dev/docs/direct-manipulation) sectioon of the website.

[iOS][Added] - Added examples of direct manipulation

Reviewed By: sammy-SC

Differential Revision: D43978674

fbshipit-source-id: 1cbc56f28034f84f309166e3e392ad97a8164e64
2023-03-30 11:11:06 +01:00
Riccardo Cipolleschi 3e079f0802 Make UIManager.dispatchViewManagerCommand work in Fabric through Interop Layer (#36578)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36578

This change brings to the Fabric Interop Layer the possibility to directly call native methods on the View Manager, something that was not possible before and that we can use to simplify the migration to the New Architecture.

[iOS][Added] - Native Components can now call native methods in Fabric when they are loaded through the Interop Layer

Reviewed By: sammy-SC

Differential Revision: D43945278

fbshipit-source-id: fe67ac85a5d0db3747105f56700d1dbba7ada5f1
2023-03-30 11:10:18 +01:00
fortmarek 18137348ee Use packaged react-native in test-e2e-local script (#36703)
Summary:
The current `test-e2e-local` script had two bugs:
- On [this](https://github.com/facebook/react-native/blob/c1c22ebacc4097ce56f19385161ebb23ee1624b3/scripts/test-e2e-local.js#L219) line we were initializing a new RN project with the packed `react-native` created [here](https://github.com/facebook/react-native/blob/c1c22ebacc4097ce56f19385161ebb23ee1624b3/scripts/test-e2e-local.js#L211)
- We were updating the local RN version after running `npm pack` [here](https://github.com/facebook/react-native/blob/c1c22ebacc4097ce56f19385161ebb23ee1624b3/scripts/test-e2e-local.js#L214). This meant that the version inside the packaged `react-native-xyz.tgz` was not updated since we ran `pack` before updating it. This was fine since the `init` command was using the local `react-native` repository instead of the packed version.

## Changelog:

[INTERNAL] [FIXED] - Use packaged react-native in test-e2e-local script
<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[INTERNAL] [FIXED] - Use packaged react-native in test-e2e-local script

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

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

Test Plan:
- Run `yarn test-e2e-local -t RNTestProject -p Android`. The command should succeed.

I am not completely sure how to double check that we are using the packed version. Locally, I have a `fsmonitor--daemon.ipc` in my `react-native/.git` that can't be copied. The `.git` folder would be copied only when `cli.js init` was called with the whole repository  – which is how I found out about the issue in the first place.

Reviewed By: hoxyq

Differential Revision: D44504599

Pulled By: cipolleschi

fbshipit-source-id: e57e2858bab46d4f978eed3cbaf3e504138594b8
2023-03-30 10:52:54 +01:00