Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49691
Changelog: [internal]
This adds a new getter for `document` in the `Root` class in Fantom tests to easily access the document instance for the root.
This isn't very useful at the moment, but will be very useful when we introduce `document.getElementById`, so we can access arbitrary nodes very easily.
Reviewed By: javache
Differential Revision: D69307130
fbshipit-source-id: 2650bc03e143ee9f0b29d0f284a2f9079ab9f765
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49690
Changelog: [internal]
We're shipping this soon and most tests already using DOM APIs to make assertions, so it's easier if we just "ship" in tests.
Reviewed By: javache, sammy-SC
Differential Revision: D69307129
fbshipit-source-id: 75d0be013703cff7bc2bad5cd16c26bc6471e547
Summary:
Migrate com.facebook.react.modules.network.ProgressRequestBody to Kotlin.
Note: To keep the logic the same as in Java, I had to make the params of RequestBodyUtil.createProgressRequest non-nullable again which were made nullable by mistake in https://github.com/facebook/react-native/pull/49584.
## Changelog:
[INTERNAL]- Migrate com.facebook.react.modules.network.ProgressRequestBody to Kotlin
Pull Request resolved: https://github.com/facebook/react-native/pull/49682
Test Plan:
```bash
yarn test-android
yarn android
```
Reviewed By: rshest
Differential Revision: D70239855
Pulled By: cortinico
fbshipit-source-id: 03c5e0bd5c66a4d5df5e4304d4479ec576d350fd
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49687
Changelog: [internal]
Just a minor type rename to better reflect what this type will become soon.
Reviewed By: cortinico
Differential Revision: D70185597
fbshipit-source-id: d5a67eda44dc88dd32a5290f1d0b292ed7014006
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49633
Changelog: [internal]
This replaces the definition of `HostInstance` to use an interface instead of an object, to better represent the underlying type (an instance of `ReactFabricHostComponent`) and simplify the migration to the new DOM API.
Reviewed By: huntie
Differential Revision: D70023947
fbshipit-source-id: bf312abf02fec48b2b5afb41053593ce542f7324
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49658
This bumps the version of Node that we use to build React Native from 18 to 20.
We'll still be supporting building with 20, but we'll moving our toolchain to Node 20 becuase 18 is at EOL soon.
Changelog:
[General] [Changed] - Bump Node 18 -> 20 to build React Native in OSS
Reviewed By: javache, cipolleschi
Differential Revision: D70168003
fbshipit-source-id: b64ee583b2d2e72d25393119ae9e9029a74d5b13
Summary:
Reland of https://github.com/facebook/react-native/issues/49413 which was reverted due to an internal crash. I've attempted to do a solution to keep backwards compatibility but doesn't seem to work – keeping the original solution for now, perhaps something else can be cleaned up to avoid the breakage.
## Changelog:
[INTERNAL] - Migrate com.facebook.react.uimanager.ReactClippingViewGroup to Kotlin
Pull Request resolved: https://github.com/facebook/react-native/pull/49607
Test Plan:
```bash
yarn test-android
yarn android
```
Verified that the update changes do not cause a crash.
Test flow:
- login to BizApp using Instagram account
- on home screen scroll down to Insights section
- it should show without crashing
Reviewed By: arushikesarwani94
Differential Revision: D70200000
Pulled By: alanleedev
fbshipit-source-id: 89bc948c1b91d9419d4b6e1885d949c4a3c20986
Summary:
## Summary
> [!NOTE]
> This only modifies types, so shouldn't have an impact at runtime.
Some time ago we moved some type definitions from React to React Native
in #26437.
This continues making progress on that so values that are created by
React Native and passed to the React renderer (in this case public
instances) are actually defined in React Native and not in React.
This will allow us to modify the definition of some of these types
without having to make changes in the React repository (in the short
term, we want to refactor PublicInstance from an object to an interface,
and then modify that interface to add all the new DOM methods).
## How did you test this change?
Manually synced `ReactNativeTypes` on top of
https://github.com/facebook/react-native/pull/49602 and verified Flow
passes.
DiffTrain build for [9dd378ff1222335ff133bab2d61001fcc84a1c56](https://github.com/facebook/react/commit/9dd378ff1222335ff133bab2d61001fcc84a1c56)
Reviewed By: poteto
Differential Revision: D70091830
fbshipit-source-id: 2cc49d8ed89e8ee2531dbc4094ef9720fc3040ad
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49678
In this diff I'm undeprecating SynchronousEventReceiver and marking it as UnstableReactNativeAPI, to properly describe the status of this API.
changelog: [internal] internal
Reviewed By: mlord93
Differential Revision: D70193235
fbshipit-source-id: c4818c89eecef135e9e1f82d35e7f1e2d46b1637
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49683
Use of these types will trigger `[internal-type]` error in the next version of Flow. This diff cleans them up ahead of the time.
Changelog: [Internal]
Reviewed By: gkz
Differential Revision: D70202028
fbshipit-source-id: 97b7217040b63514f20888fb20c86596235a82a6
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49632
changelog: [internal]
Add gating to experiment with removal of `_turboModuleManagerDelegateMutex`.
# Why remove _turboModuleManagerDelegateMutex?
- It is not consistently used in the class. Here is a case where access to _delegate is not protected by the mutex: https://fburl.com/code/9tay04fn
- From inspecting individual implementations of RCTTurboModuleManagerDelegates, it is not needed to synchronise access.
- It may lead to deadlocks under following conditions:
- **A)** JavaScript thread gets hold of the `_turboModuleManagerDelegateMutex` and then tries to dispatch a block on the main thread synchronously (calling `RCTUnsafeExecuteOnMainQueueSync`). For example, when a new native module is created lazily because JavaScript used it and the native module requires main thread setup.-
- **B)** The main thread tries to get hold of `_turboModuleManagerDelegateMutex` when it is creating a native module ([[RCTModuleRegistry moduleForName:lazilyLoadIfNecessary:]](https://fburl.com/code/lioi5zei)) from Obj-C.
Reviewed By: javache, cipolleschi
Differential Revision: D70087779
fbshipit-source-id: 1780b2f48537dd578260a96f8f498dbe11529689
Summary:
The class is still in Java and also lacks of some tests so adding them to make it safer to migrate or for future refactors.
## Changelog:
[INTERNAL] - Add `ProgressResponseBodyTest` test cases
Pull Request resolved: https://github.com/facebook/react-native/pull/48675
Test Plan:
```bash
yarn test-android
```
Reviewed By: alanleedev
Differential Revision: D68205423
Pulled By: rshest
fbshipit-source-id: edb1dcf4da34377b7b1dcfc68a6e08861421964b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49635
Changelog:
[General][Internal] - report proxy idle state in heartbeat events
The proxy is considered Idle if it didn't receive any messages for 10 seconds.
Reviewed By: robhogan
Differential Revision: D70078637
fbshipit-source-id: 5b8d9a3a6e3e2568e40b3ada0a41e76b277fe66d
Summary:
`NSUnderlinePatternDash`/`NSUnderlinePatternDot` are [deprecated](https://developer.apple.com/documentation/uikit/nsunderlinepatterndash). Use their drop-in replacements (`NSUnderlineStylePatternDash` and `NSUnderlineStylePatternDot`) instead.
## Changelog:
<!-- Help reviewers and the release process by writing your own changelog entry.
Pick one each for the category and type tags:
[IOS] [DEPRECATED] - Update deprecated enums in RCTTextPrimitivesConversions.h
For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
Pull Request resolved: https://github.com/facebook/react-native/pull/49648
Test Plan: Local build
Reviewed By: cortinico
Differential Revision: D70153675
Pulled By: cipolleschi
fbshipit-source-id: e64c9df1a5282a3f33f742a455c64c002f0c8044
Summary:
After this change: https://github.com/facebook/react-native/pull/49078 UIWindowSceneDelegate is no longer needed.
This wasn't removed in the original PR.
## Changelog:
[iOS] [Removed] - Remove no longer needed UISceneDelegate
Pull Request resolved: https://github.com/facebook/react-native/pull/49628
Test Plan: CI GREEN
Reviewed By: cortinico
Differential Revision: D70102384
Pulled By: cipolleschi
fbshipit-source-id: e33185a4becd949a9f0ec1eabeeb4fe85ef3ee79
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49516
Merge global.d.ts and globals.d.ts into one file and align some definitions with implementations.
Changelog:
[General][Changed] - Improve TypeScript types for `global` objects
Reviewed By: huntie
Differential Revision: D69772463
fbshipit-source-id: 4771e27a97e1e9cbc33d8f75ba11cffd4d200124
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49637
The dtslint requires that the minimum typescript version of 4.9 is used.
Changelog:
[General][Changed] - Increase minimum typescript version in index.d.ts
Reviewed By: huntie
Differential Revision: D69749044
fbshipit-source-id: be255d108c2e9e9452808ba3dea981a7fac0bc21
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49655
This tripped me up since this if hits for TextViews in general, not just EditText
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D70139349
fbshipit-source-id: 1993dda4c6472265c5e61fa4cad4f2beaf4a9930
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49654
This is a lint error, so figured I would fix it
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D70138099
fbshipit-source-id: 489bedc28ac15bed8f98cc3eceb9e393cd4598e7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49587
This is a reland diff for D69805065.
The problems with the original diff were:
- wrong header search path in the `React-NativeModuleApple.podspec`
- adding an implementation `RuntimeExecutor.cpp` file to implement a function that is used by an inline function in the `RuntimeExecutor.h`.
I believe that the last point specifically was creating issues to the linker which was not able to resolve the symbols properly in transitive dependencies.
The fix was to move the implementation of `getMainThreadMutex` to be `inline`.
## Changelog:
[Internal]
Reviewed By: cipolleschi
Differential Revision: D69922771
fbshipit-source-id: 285ce1f232e8c94b99d80aafe1ffbc473921d52f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49639
Changelog: [internal]
This refactors some code in the performance API and Perfetto to avoid doing unnecessary work when not tracing (e.g.: string manipulation for tracks).
It also reduces the cost of logging marks/measures to tracing backends if not actively tracing (e.g.: moving the check to outside the lock).
Reviewed By: bgirard
Differential Revision: D69246772
fbshipit-source-id: 141a13f609f12be7ab8ca00f7aa1892b34770bbb
Summary:
Fixes assert crash in https://github.com/facebook/react-native/issues/46568#issuecomment-2653747732.
We can temporarily downgrade _LIBCPP_HARDENING_MODE to _LIBCPP_HARDENING_MODE_EXTENSIVE, it disables strict weak ordering check in debug mode. Actually, when we sort animation mutations, we don't need it to satisfy strict weak ordering.
https://libcxx.llvm.org/Hardening.html#id3
Another solution is we make sort satisfy it, but we don't have any key to compare when two mutation is the same mutation type but not the same parentTag. Maybe we can use pointer of muation to compare?
## Changelog:
[IOS] [FIXED] - Fabric: disable React-Fabric stable_sort strict weak sort check in debug mode
Pull Request resolved: https://github.com/facebook/react-native/pull/49422
Test Plan: Fixes https://github.com/facebook/react-native/issues/46568#issuecomment-2653747732.
Reviewed By: sammy-SC
Differential Revision: D69984937
Pulled By: cipolleschi
fbshipit-source-id: 2a3d17970def513c4ba915068f25338169db82d6