Граф коммитов

26315 Коммитов

Автор SHA1 Сообщение Дата
Ruslan Lesiutin 83afdafae4 feat(react-native-github): automate publishing bumped packages via circleci (#35621)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35621

Changelog: [Internal]

1. Added `for-each-package.js` script. This can be used to iterate through all of the packages inside `/packages` with the access to package manifest. This soon can be used as a replacement for `yarn workspaces --info`
2. Added `find-and-publish-all-bumped-packages.js` script. This script iterates through all the packages and detects if the version was changed via `git log -p` (same as `git diff`). If so, it tries to publish it to npm.
3. Added corresponding job and workflow to CircleCI config, which will use this script

Reviewed By: cortinico

Differential Revision: D41972733

fbshipit-source-id: c5d0ed5b852b744a699ecb88861ea3e82200e1f3
2022-12-14 02:17:16 -08:00
Sam Zhou 9f9111bd7b Deploy 0.195.2 to xplat
Summary: Changelog: [Internal]

Reviewed By: mroch, jbrown215

Differential Revision: D42023901

fbshipit-source-id: e3fe3720e82f6857e7be5198a400011917012dff
2022-12-13 20:03:15 -08:00
Ruslan Shestopalyuk 963e45afd1 Recursively pass invoker into ::toJS data structures for generated C++ modules
Summary:
While working on D42008409 I found out that codegen for pure C++ modules doesn't work with container types that are nested inside generated data structures, which happens because they don't have a specialization of `bridging::toJS` that wouldn't pass the `invoker` instance through.

It looks like an easiest option would be just to use `invoker` in codegen for `toJS` as well, which this diff does.

Note that I also experimented with removing `invoker` from being used in the `::toJS` specializations for containers altogether (see D42008410), as there doesn't seem to be a single use case when `invoker` would be ever needed in any `::toJS` specialization (and imagining such a scenario would be a stretch, tbh - why a conversion function would invoke anything running on JS side, given that invoker provides no return values anyway?..)

But since I am still not 100% about the invoker purpose there, I went with the codegen change.

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D42008724

fbshipit-source-id: 6302d3ceacdfc8fed296ee1ef1a985f7273c2261
2022-12-13 17:07:13 -08:00
Sam Zhou fc3565ce8d Pre-suppress errors before the next Flow release
Summary: Changelog: [Internal]

Reviewed By: fred2028

Differential Revision: D42006446

fbshipit-source-id: de6c327a540e5085ac196679cf7db7db8a681298
2022-12-13 16:50:33 -08:00
Samuel Susla 455ca8cfaf Make UIManager.measure* compatible with Fabric
Summary:
changelog: [internal]

To make migration to the new architecture more straight forward, this change makes `UIManager.measure`,  `UIManager.measureInWindow`, `UIManager.measureLayout` and `UIManager.measureLayoutRelativeToParent` functions backwards compatible. Users will not have to make any change to continue using the APIs.

This will make [Migrating .measure*()
](https://reactnative.dev/docs/new-architecture-library-intro#migrating-measure) in the migration guide optional.

Reviewed By: yungsters

Differential Revision: D41613050

fbshipit-source-id: 3c65ced231590243d118fbc120a87b08d5261da0
2022-12-13 11:43:05 -08:00
Lorenzo Sciandra 326109ba5d fix(metro): realign "leftover" metro packages from 0.73.3 to 0.73.5 (#35625)
Summary:
I just noticed while working on 0.71 that the PR https://github.com/facebook/react-native/pull/35580 was incomplete. This PR takes care of re-aligning the leftovers. (in 0.71 I've taken care of the changes locally)

## 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
-->

[INTERNAL] [FIXED] - realign "leftover" metro packages from 0.73.3 to 0.73.5

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

Test Plan: N/A

Reviewed By: cortinico, cipolleschi

Differential Revision: D41996338

Pulled By: dmytrorykun

fbshipit-source-id: bc1c95b0159f639e33835b922555d2f5b8c22c66
2022-12-13 09:52:30 -08:00
MaeIg 3f2691cf84 Extract the parseFile function in the typescript and flow parsers (#35318)
Summary:
This PR aims to extract  the parseFile function in the typescript and flow parsers.  This is to solve the problem described [here](https://github.com/facebook/react-native/pull/35158#issuecomment-1298330753) and help with the work done in https://github.com/facebook/react-native/issues/34872.

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[Internal] [Changed] - Extract the parseFile function in the typescript and flow parsers

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

Test Plan:
yarn flow:
<img width="496" alt="image" src="https://user-images.githubusercontent.com/40902940/206518024-83084c3d-ab0d-4a04-810a-d40270add4b0.png">

yarn lint:
<img width="495" alt="image" src="https://user-images.githubusercontent.com/40902940/206518076-9e07eafe-db61-4c6e-8aaa-f92f190cf4f3.png">

yarn test:
<img width="389" alt="image" src="https://user-images.githubusercontent.com/40902940/206518118-5633b28c-b79b-4421-80f7-de1e03fb8ff2.png">

Reviewed By: cortinico

Differential Revision: D41248581

Pulled By: cipolleschi

fbshipit-source-id: f5b878a28a7de612fcdd1528f064b44f668503af
2022-12-13 09:00:46 -08:00
Dmitry Rykun 234486068e Prepare dummy hermes.xcframework before pod install
Summary:
This diff adds prepare command to hermes-engine.podspec. That command creates dummy `universal/hermes.xcframework` and `maocosx/hermes.framework`. This allow us to utilise CocoaPods auto-linking, and remove manual linking/cleanup code.
Also we now do not pollute user project with "Copy Hermes Framework" script phase. Which was quite bad on its own, and also caused annoying bugs on the CI.
allow-large-files

Changelog:
[iOS][Changed] - Prepare dummy hermes.xcframework before pod install.

Reviewed By: cipolleschi

Differential Revision: D41533994

fbshipit-source-id: d7d098ba5e882ac2d036335c23d7cda447d75b8d
2022-12-13 08:42:09 -08:00
Dmitry Rykun 65e0f79f69 Backport fix: update CircleCI config to use the RN version in Hermes workspace caching (#35617)
Summary:
This is a backport of 0edcbc30c8. It fixes inconsistencies in caching strategies of Hermes tarball and Hermes workspace on CircleCI.

## Changelog

[INTERNAL] [FIXED] - Update CircleCI config to use the RN version in Hermes workspace caching.

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

Test Plan:
1. Create and push a new branch.
2. Change version in. react-native/package.json
3. Push those changes.

Before:
CircleCI restores cached Hermes workspace for the old version.

After:
CircleCI creates new workspace for the new version.

Reviewed By: cipolleschi

Differential Revision: D41970943

Pulled By: dmytrorykun

fbshipit-source-id: 7e343b7a8d4b1c5a63016ec53538abe4ad7808cc
2022-12-13 04:19:43 -08:00
Zihan Chen (MSFT) f07490b1f1 Fix codegen output for object with indexer (#35344)
Summary:
The current implementation think `{[key:T]:U}` and `{key:object}` are the same type, which is semantically wrong.

This pull request fixes the problem and return `{type:'GenericObjectTypeAnnotation'}`, so that `{[key:T]:U}` is `Object`. The current schema cannot represent dictionary type, `Object` is the closest one.

The previous incorrect implementation actually bring in code with logic that doesn't make sense (treating indexer as property), those and related unit test are all undone.

## Changelog

[General] [Changed] - Fix codegen output for object with indexer

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

Test Plan: `yarn jest react-native-codegen` passed

Reviewed By: rshest

Differential Revision: D41304475

Pulled By: cipolleschi

fbshipit-source-id: caab8e458d83f9850c5c28b67cc561a764738372
2022-12-13 03:21:02 -08:00
Moti Zilberman 9b280ad1c5 Replace matchAll with exec
Summary:
When using the `g` modifier on the regex, match and matchAll's behaviour is equivalent, and match has better backwards compatibility on older iOS versions.

Changelog: [General][Fixed] Fixed a backwards compatibility issue with AnimatedInterpolation

Reviewed By: yungsters

Differential Revision: D41879036

fbshipit-source-id: 240dda85ef0de8e27452846c77114ac46823f74f
2022-12-13 02:45:49 -08:00
Nicola Corti 822396d1ff Expose ReactAndroid/src/main/jni/react/cxxcomponents via prefab (#35619)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35619

Reference https://github.com/reactwg/react-native-releases/discussions/41#discussioncomment-4353534
I'm exposing `ReactAndroid/src/main/jni/react/cxxcomponents` to be consumed via prefab.
It will be available to both: `react_nativemodule_core` and `reactnativejni`

Changelog:
[Internal] [Changed] - Expose ReactAndroid/src/main/jni/react/cxxcomponents via prefab

Reviewed By: cipolleschi

Differential Revision: D41965512

fbshipit-source-id: 3a5a7473267e2e161d9d7fb0e8dfa74593b47b6e
2022-12-13 02:22:32 -08:00
Nicola Corti bb5fee8f59 Expose ReactCommon/cxxreact headers via Prefab
Summary:
Reference https://github.com/reactwg/react-native-releases/discussions/41#discussioncomment-4353534
I'm exposing the headers inside `ReactCommon/cxxreact` to be access via the Prefab API.

Changelog:
[Internal] [Changed] - Expose ReactCommon/cxxreact headers via Prefab

Reviewed By: cipolleschi

Differential Revision: D41965511

fbshipit-source-id: 726b2948262b4b07cb40996fa1ccf9726a5197ce
2022-12-13 02:22:32 -08:00
Xin Chen cf9c7d51ef Fix edge case when delete is queued with conflict layout animation
Summary:
This is a two step (1/2) fix to a race that could caused a `DELETE`...`CREATE` mutations being sent over to the fabric mounting layer. Such combination was assumed not possible from the differ, yet it happened at least in the existence of layout animation and when certain commits happen while animation is active.

This race condition could cause a view to get deleted at the end of one UI frame, yet the mount instructions generated from animation in the next frame still need to access the deleted view and caused crashes like T112157805. Note that even though such crash is recorded as `RetryableMountingLayerException` and is a soft crash (which only gets logged but not crash in production), the out-of-order mount instructions could lead to illegal view state and make the surface unusable, like what's shown here:

{F820669000}

The diff fixes this issue by removing the `DELETE` [conflict animation](https://fburl.com/code/5ctckvz3) keyframe, as well as the `CREATE` [immediate mutations](https://fburl.com/code/txyomytd) from the layout animation. The Fabric mounting layer assumes no combination of `DELETE...CREATE` in the same frame from differ + [layout animation overrides](https://fburl.com/code/zn17uqch).

Reviewed By: sammy-SC

Differential Revision: D41895427

fbshipit-source-id: d6df02663ba707af6db4a63a325ac776ca54d18e
2022-12-13 01:17:37 -08:00
David Vacca a120679619 Add support for String props on C++ Components
Summary:
This diff adds support for String props on C++ Components

changelog: [internal] internal

Reviewed By: genkikondo

Differential Revision: D41784029

fbshipit-source-id: 3065186074e1feca3dd0dd724105f1596146ee1d
2022-12-12 20:05:23 -08:00
Xin Chen a3c47d3baa Replace RN Dev Tool perf logger usage of API 24 method in java.util.Comparator.naturalOrder
Summary:
Previous diff D41486648 is causing crashes and a sev S311353, which is due to usages of an old Android API that only work after level 24 (D36500518 (0fc42fd35c)). ~~This diff updates the implementation to use a compatible API, but with worse runtime complexity.~~

~~https://fburl.com/txd0r89e is a good explanation on the two algorithm to calculate a streaming median value. This diff uses the approach described in https://stackoverflow.com/a/4903642.~~

## Update
Following suggestion from sshic, I preserved the existing algorithm but with a custom comparator approach.

Changelog: [Internal]

Reviewed By: makovkastar

Differential Revision: D41505143

fbshipit-source-id: 494e07fa627b5cf8bad7971fa5de86d270a7412c
2022-12-12 13:50:44 -08:00
generatedunixname89002005325672 0f089ea2db Daily `arc lint --take KTFMT`
Reviewed By: adamjernst

Differential Revision: D41833756

fbshipit-source-id: 0ecc95aff3bdadadb0769dec55d27fb84fe50e95
2022-12-12 07:51:03 -08:00
Ruslan Shestopalyuk 41c17ddd56 Batch/throttle reporting of the performance entries
Summary:
Makes sure that we don't spam too often the JS performance entry reporting callback, which further dispatches entries to `PerformanceObserver` instances.

The logic is as following:
* ~~~If internal buffer of entries reaches the limit, we schedule the callback (with background priority)~~~
*~~~ Once the callback is processed, we schedule the next flush after a timeout of 500ms, this will also be scheduled from native with background priority~~~
* ~~~Whenever new performance type starts to be observed, we also schedule the callback, in order to prime the above~~~
* Schedule the flush with low priority, whenever there is the first entry coming into an empty buffer, and rely on the Scheduler to "do the right thing" when asked to flush it with background priority and not doo it exceedingly often (see the prolonged discussion)

Changelog: [internal]

Reviewed By: rubennorte

Differential Revision: D41875085

fbshipit-source-id: 368b525203215350ceabb43d5e9e8e3bd5242aca
2022-12-12 04:53:31 -08:00
Christoph Purrer e327f9e20c BUCK > Enable ObjectiveC TM for MacOS (#35609)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35609

Changelog: [Internal]

Reviewed By: shwanton, cortinico

Differential Revision: D41893371

fbshipit-source-id: c60ca66d6c3957dd7850a14a1394a6b5227ff415
2022-12-12 03:23:45 -08:00
David Vacca 1a514e514b Refactor ReactNativeFeatureFlags
Summary:
Refactor ReactNativeFeatureFlags

changelog: [internal] internal

Reviewed By: javache

Differential Revision: D41750644

fbshipit-source-id: 43fdd7758e68a578afdb799488fda9f8bdf0ddb4
2022-12-10 15:42:08 -08:00
David Vacca 57ffa12a08 Delete references of CppComponentRegistry from FabricJSIModuleProvider
Summary:
Delete references of CppComponentRegistry from FabricJSIModuleProvider since it's not necessary anymore

changelog: [internal] internal

Reviewed By: javache

Differential Revision: D41638893

fbshipit-source-id: 8a7b032ead5972609dd4d3c1e40d9d60299c6480
2022-12-10 15:42:08 -08:00
David Vacca 4ab125961b Delete references of CppComponentRegistry from the internals of React Native Android renderer
Summary:
Delete references of CppComponentRegistry from the internals of React Native Android renderer, since it's not necessary anymore

changelog: [internal] internal

Reviewed By: javache

Differential Revision: D41638890

fbshipit-source-id: c4b08853722874dbb21891817836862225469dd9
2022-12-10 15:42:08 -08:00
Lulu Wu 11b53908a7 Remove atomic fix
Summary:
Changelog:
[Android][Changed] - Remove testing code for atomic fix

Reviewed By: fkgozali

Differential Revision: D41730846

fbshipit-source-id: e73e3b9530969683d4247759f3923f105d79cd34
2022-12-10 14:45:22 -08:00
Sam Zhou 3ee91089cf Deploy 0.195.1 to xplat
Summary: Changelog: [Internal]

Reviewed By: mvitousek

Differential Revision: D41899730

fbshipit-source-id: 67885896647a4db2b0cb9330f4e5036b03d7e25e
2022-12-10 14:01:38 -08:00
David Vacca ee437bf904 Delete isRootComponent method
Summary:
Delete isRootComponent method, since it's not necessary anymore

changelog: [internal] internal

Reviewed By: javache

Differential Revision: D41638887

fbshipit-source-id: d1d58e07684cb8fd0fc48cfa1f3f92434c1d14c4
2022-12-10 10:30:47 -08:00
David Vacca d9e7be76cd Delete ComponentDeprecatedAPI
Summary:
Deletes references to ComponentDeprecatedAPI in favour of Component API

changelog: [internal] internal

Reviewed By: rshest

Differential Revision: D41638892

fbshipit-source-id: c83b2303650475aa59b438e46e96f976db586a27
2022-12-10 10:30:47 -08:00
David Vacca 30d50430a9 Delete C++ ViewManagers
Summary:
This diff deletes the first implementation of C++ ViewManagers integrated into the internals of Fabric

changelog: [internal] internal

Reviewed By: javache

Differential Revision: D41638894

fbshipit-source-id: 2e7aebff587e2e57b7f3fbf37a24b04943c74573
2022-12-10 10:30:47 -08:00
Nicola Corti 3ab6274f0d Bump further patch packages to unblock nightly as they have unreleased changes on main
Summary:
There are other 3 packages which have unreleased changes on main:
```
babel-plugin-codegen/
eslint-plugin-specs/
eslint-config-react-native-community/
```
I'm bumping them in order to be able to publish them to NPM.

Changelog:
[Internal] [Changed] - Bump further patch packages to unblock nightly as they have unreleased changes on main

Reviewed By: hoxyq

Differential Revision: D41874749

fbshipit-source-id: 0b8cd69cab6fcb116f2635c964490927f4fb20be
2022-12-10 04:03:11 -08:00
Sam Zhou 44a533503c Deploy flow v0.195.0
Summary: Changelog: [Internal]

Reviewed By: pieterv, jbrown215

Differential Revision: D41854995

fbshipit-source-id: 9232bf3c5c8f379e68bc1792a40963ad70f66c15
2022-12-09 13:50:16 -08:00
Ahmed Shehata b65ce3c74a Expose setLongPressDeactivationDistance as class method
Summary:
Changelog:
[Internal][Added] - Provided a way to override long press sensitivity,

Reviewed By: javache

Differential Revision: D41766246

fbshipit-source-id: befeafd93a73675ec609b0510dd8b5190b07dda0
2022-12-09 12:58:02 -08:00
David Angulo 910a750fbc Rename `POST_NOTIFICATION` to `POST_NOTIFICATIONS` (#35533)
Summary:
After adding `<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>` on my `AndroidManifest.xml`, I expected to use `PermissionsAndroid.PERMISSIONS.POST_NOTIFICATIONS` but `POST_NOTIFICATIONS` is `undefined` and is named `POST_NOTIFICATION` instead.

Every other Android permission is 1:1 in spelling except this one where it lacks `S`.

Not sure if this is a welcome change since this can be breaking. Or maybe we can include both with and without `S` to not be a breaking change. Or just keep it as is and close this PR.

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[Android] [Changed] - Rename `POST_NOTIFICATION` to `POST_NOTIFICATIONS`

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

Test Plan: `PermissionsAndroid.PERMISSIONS.POST_NOTIFICATIONS` should not be `undefined`.

Reviewed By: cortinico

Differential Revision: D41705866

Pulled By: philIip

fbshipit-source-id: a0328b174f0196421565f0cd2b2f1eb509428553
2022-12-09 12:56:07 -08:00
Rubén Norte 5d8fae9cc0 Improve spec-compliance of PerformanceObserver.prototype.observe
Summary:
Our implementation of `PerformanceObserver.prototype.observe` diverges a little bit from the [spec](https://w3c.github.io/performance-timeline/#dom-performanceobserver-observe) regarding the behavior when calling it multiple times. E.g.:

1. We don't throw errors if both `type ` and `entryTypes` are passed.
2. We don't throw errors if neither `type ` nor `entryTypes` are passed.
3. We don't throw errors if we call observe with `type` and we call again later with `entryTypes`, and vice versa.
4. The logic to consolidate entry types in subsequent observe calls is incorrect.

This fixes those issues and also applies some minor naming improvements.

Changelog: [internal]

Reviewed By: rshest

Differential Revision: D41872269

fbshipit-source-id: 9a6b485f4ef2f479c8b6f0307012322f65a11879
2022-12-09 12:15:42 -08:00
Rubén Norte 120e87b86e Show warning when native module for performance marks and measures is not available
Summary:
We're currently showing warnings when we call `performanceObserver.observe` and the native module for performance observers isn't available, but we don't do the same for `performance.mark`, `performance.measure`, etc.

This adds the warning in those cases.

Changelog: [internal]

Reviewed By: rshest

Differential Revision: D41872270

fbshipit-source-id: d720580b930550f27c827a58243579c42a4f6da9
2022-12-09 12:15:42 -08:00
Rubén Norte 4328259f66 Minor stylistic and type coverage changes for Web Performance modules in RN
Summary:
Improved Flow coverage to 100% in both modules.

[Changelog][Internal]

Reviewed By: rshest

Differential Revision: D41872271

fbshipit-source-id: f93553dcabd6d78a3946fdf9d2d2d40cb6c8ca23
2022-12-09 12:15:42 -08:00
Moti Zilberman 340c046c2e Remove experimental support for Hermes Modules (CommonJS)
Summary: Changelog: [Internal]

Reviewed By: jacdebug

Differential Revision: D41736222

fbshipit-source-id: 05c03ff31072416f7ee81baccb8a4efd2c8baa85
2022-12-09 04:00:31 -08:00
fabriziobertoglio1987 006527fea7 Fix onAccessibilityAction on Fabric (#35507)
Summary:
fixes https://github.com/facebook/react-native/issues/30841#issuecomment-1228128357. onAccessibilityAction does not work on Fabric and logs:

```
E/unknown:ReactEventEmitter( 3845): com.facebook.react.bridge.ReactNoCrashSoftException:
Cannot find EventEmitter for receiveEvent: SurfaceId[1] ReactTag[104] UIManagerType[2]
```

## Changelog

[Android] [Fixed] - Fix onAccessibilityAction on Fabric

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

Test Plan: https://github.com/facebook/react-native/pull/35507#issuecomment-1330876598

Reviewed By: javache

Differential Revision: D41707777

Pulled By: philIip

fbshipit-source-id: 0f4550a17f4b8bfc1aefa404059b367907f8f60d
2022-12-09 03:47:28 -08:00
Fredia Huya-Kouadio 4f142bf803 Update the logic to check for the source of a MotionEvent
Summary: Changelog: [Internal] Update logic to check for source of MotionEvent for PointerEvents

Reviewed By: lunaleaps

Differential Revision: D41851881

fbshipit-source-id: af3a49d75fc3d58e70d210e7f93d3a6dba90d1c3
2022-12-09 02:38:26 -08:00
Nicola Corti bc26a1b9a4 Update reference to statusBarTranslucent in Modal comment
Summary:
Re-apply #29278 that was recently closed by still valid.

Changelog:
[Internal] [Changed] - Update reference to statusBarTranslucent in Modal comment

Reviewed By: christophpurrer

Differential Revision: D41765526

fbshipit-source-id: 0397e86aa9adc5e5495cad8e2612cc5457840273
2022-12-09 02:30:09 -08:00
Nicola Corti 177f30a323 Bump all the @react-native/ packages to publish on main
Summary:
Nightlies are currently broken on main. That's because nightlies rely on packages that got
re-scoped under `react-native`. We need to publish them to NPM.
In order to do so, I'm bumping versions for the one that have changes on main so that they
can be published to NPM to unblock nightlies.

Changelog:
[Internal] [Changed] - Bump all the react-native/ packages to publish on main

Reviewed By: hoxyq

Differential Revision: D41840985

fbshipit-source-id: 45b691611e33668df0922d4ff753738a773f162c
2022-12-09 02:10:17 -08:00
Ruslan Latypov 43e7f50a99 fix missing imports and set disable_infer_precompiled_header] [shard:2/3][1/2]
Reviewed By: rmaz

Differential Revision: D41796827

fbshipit-source-id: e2dc03e02854150901f71626a76b3370404d4f96
2022-12-08 15:27:25 -08:00
Michael Anthony Leon de28f9b8ea Include sampling profiler & inspector behind a compile-time flag
Summary:
Changelog:
[iOS][Changed] - Create a new compile time flag to enable remote sample profiling.

Reviewed By: cortinico

Differential Revision: D41554133

fbshipit-source-id: 00a7f9f6c9f09d72afee070c1cc6187aa3d0ddb1
2022-12-08 14:57:29 -08:00
Michael Anthony Leon 8284303ec8 Always include inspector
Summary:
Changelog:
[Android][Changed] - Include the inspector in all build modes, and only turn it off/on at runtime.

Reviewed By: jpporto

Differential Revision: D40248901

fbshipit-source-id: f13c58f631e4617a6f157df8899e128959af450a
2022-12-08 14:57:29 -08:00
Matin Zadeh Dolatabad 48966ebce1 fix: script phases warning (#35594)
Summary:
Running pod install result in some warninigs on ruby v3:
```
script_phases.rb:51: warning: Passing safe_level with the 2nd argument of ERB.new is deprecated. Do not use it, and specify other arguments as keyword arguments.
script_phases.rb:51: warning: Passing trim_mode with the 3rd argument of ERB.new is deprecated. Use keyword argument like ERB.new(str, trim_mode: ...) instead.
```

## Changelog

[INTERNAL] [FIXED] - warnings while running `pod-install` inside script phase script

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

Test Plan:
- Install ruby v3 (I haven't tested on ruby v2, most m1 users need to upgrade to v3)
- Run `pod install` in ios folder

Reviewed By: christophpurrer

Differential Revision: D41839668

Pulled By: cortinico

fbshipit-source-id: f3d328573179ddfd307011f0701f0befa0b111f8
2022-12-08 09:05:56 -08:00
Saad Najmi 76bf71e2cc Merge AlertIOSExample page into AlertExample page (#35586)
Summary:
`AlertIOS` was deprecated and removed long ago (e2bd7db732) but there continues to be a test page with the name `AlertIOS` in RN-Tester. `AlertIOSExample.js` contains valid examples of how to use `Alert.prompt()` so it's worth keeping them around. Let's move those into `AlertExample.js` and remove `AlertIOSExample.js`. While we're here, let's do some extra fixes to the test page:

- Remove `showsIndividualExamples = true`. For whatever reason, I needed to remove this to show the examples properly...
- Convert all uses of `<TouchableHighlight>` with `<Pressable>`. The latter replaces the former, so I thought that made sense..

Some extra context:

In React Native macOS, we had forked `AlertIOS` into `AlertMacOS`, with a corresponding example page. This PR was made while working on removing those (https://github.com/microsoft/react-native-macos/pull/1548/).

## Changelog

[INTERNAL] [CHANGED] - Moved `Alert.prompt` examples into common rn-tester test page

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

Test Plan:
Test page shows up fine on iOS .

![Simulator Screen Recording - iPhone 14 Pro - 2022-12-07 at 15 15 40](https://user-images.githubusercontent.com/6722175/206318170-1893c8f6-0596-4825-8312-f45e45557095.gif)

Reviewed By: lunaleaps

Differential Revision: D41825889

Pulled By: NickGerleman

fbshipit-source-id: 82e4405b1f3a1ccb558b5a5038a90416e7a32c29
2022-12-07 18:30:49 -08:00
Ruslan Lesiutin 74859c7f0d refactor(react-native/DatePickerAndroid): internalize native module
Summary: Changelog: [Internal]

Reviewed By: lunaleaps

Differential Revision: D41772143

fbshipit-source-id: 842934c930d1f5209f65a70fff9919a99c330bda
2022-12-07 17:06:07 -08:00
Nick Gerleman 5928144302 Fix TS Type for measureLayout optional parameter
Summary:
Encountered this, causing typechecking to fail on an example in the current RN documentation.

`onFail` is an optional parameter (see 8e2bde6f27/packages/react-native-renderer/src/ReactNativeTypes.js (L106)), which is not optional in current TS types. Update the TS typings to match.

Note that "?" here is positioned to be a Flow optional parameter, instead of a maybe type. Which means it accepts undefined, but not null, matching the TS usage of "?" which always means possibly undefined (but never null, like a flow maybe type allows).

Changelog:
[General][Fixed] - Fix TS Type for measureLayout optional parameter

Reviewed By: lunaleaps

Differential Revision: D41775900

fbshipit-source-id: 8f53428b8077ec9139c7c1bbc60ed20f5fa9f7ea
2022-12-07 13:25:36 -08:00
David Vacca 0df2530c9e Fix lint warning in ReactChoreographer
Summary: changelog: [internal] internal

Reviewed By: javache

Differential Revision: D41621588

fbshipit-source-id: b85e001589f4b0eb7bc5b82329b2fcd9473a0dd2
2022-12-07 11:30:21 -08:00
David Vacca a98861f836 Extend Component to integrate layout and hierarchy of components
Summary:
In this diff I'm extending component to integrate layout and hierarchy of components

changelog: [internal] internal

Reviewed By: javache

Differential Revision: D41621587

fbshipit-source-id: e31c87676ec3068036fb6e9444bce85934b18b7b
2022-12-07 11:30:21 -08:00
Alexander Oprisnik 605a52fe3e Added possibility to mark Fresco image pipeline as already initialized for RN apps
Summary:
Changelog:
[Android][Added] - Added possibility to mark Fresco image pipeline as already initialized

Reviewed By: defHLT

Differential Revision: D41741638

fbshipit-source-id: 46f059297f3af8c1f9cb4b93ce4add895bce85df
2022-12-07 10:35:01 -08:00
Samuel Susla 6fa51e0c47 Fix flow types in NativeUIManager
Summary:
changelog: [internal]

Fix Flow types for UIManager measure functions.
Host platform does not accept null value for reactTag parameter. It errors if null is passed. This moves error closer to developers as Flow can catch it.

Reviewed By: javache

Differential Revision: D41614452

fbshipit-source-id: 2216c195808b8a1aae58c7cb2fa15be8a073e222
2022-12-07 08:37:35 -08:00