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

28190 Коммитов

Автор SHA1 Сообщение Дата
Rob Hogan 1202d394a9 Add Babel Flow lib defs to React Native repo (#38145)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38145

Add Babel type definitions ahead of moving `metro-react-native-babel-transformer` under `react-natve`.

These are mostly duplicated from https://github.com/facebook/metro, adapted for RN's naming conventions and lint rules.

Changelog:
[Internal]

Reviewed By: christophpurrer

Differential Revision: D47154206

fbshipit-source-id: a44703f6926507732f2f1c65a17e5d4ac590c724
2023-07-03 06:58:20 -07:00
Intl Scheduler 259a316893 translation auto-update for i18n/fb4a.config.json on master
Summary:
Chronos Job Instance ID: 1125907910595572
Sandcastle Job Instance ID: 987595037
allow-large-files
ignore-conflict-markers
opt-out-review

Differential Revision: D47173948

fbshipit-source-id: 0b8415edf595f772153be1990faabb8fbef0b9d2
2023-07-01 23:54:27 -07:00
Intl Scheduler 5957014266 translation auto-update for i18n/instagram.config.json on master
Summary:
Chronos Job Instance ID: 1125907910595572
Sandcastle Job Instance ID: 987595037
allow-large-files
ignore-conflict-markers
opt-out-review

Differential Revision: D47173950

fbshipit-source-id: 8c9a28a8e20121b74317746f3d01c8c4369a13ca
2023-07-01 23:54:27 -07:00
Intl Scheduler 0958b9b0b6 translation auto-update for Apps/Wilde/scripts/intl-config.json on master
Summary:
Chronos Job Instance ID: 1125907910549669
Sandcastle Job Instance ID: 18014399495240353
allow-large-files
ignore-conflict-markers
opt-out-review

Differential Revision: D47173375

fbshipit-source-id: f97a11774474da12c31ba52b46b05f189e717ae0
2023-07-01 20:29:59 -07:00
Intl Scheduler 5262e9bb63 translation auto-update for i18n/fb4a.config.json on master
Summary:
Chronos Job Instance ID: 1125907910428138
Sandcastle Job Instance ID: 9007200238030275
allow-large-files
ignore-conflict-markers
opt-out-review

Differential Revision: D47172440

fbshipit-source-id: 3f0f85f09e8bd200f5855e3e8a65e7769e419eea
2023-07-01 14:19:18 -07:00
Intl Scheduler eca0d1231a translation auto-update for i18n/fb4a.config.json on master
Summary:
Chronos Job Instance ID: 1125907910091203
Sandcastle Job Instance ID: 4503600612360907
allow-large-files
ignore-conflict-markers
opt-out-review

Differential Revision: D47170011

fbshipit-source-id: ecead608224885a47f9eb1d90dd8b348ebbcba0f
2023-07-01 04:24:00 -07:00
Nick Gerleman 5008a91029 Disable REACT_NATIVE_DEBUG in gray builds (#38082)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/38082

Reviewed By: javache

Differential Revision: D47028243

fbshipit-source-id: 79b3bc2a075bf74fcf4aa197326ec00150167845
2023-06-30 22:18:11 -07:00
Jatin Nagar a9bfd7bb70 converted InteropEventEmitter java file to kotlin (#38144)
Summary:
Helping in [Kotlin-ify React Native tests](https://github.com/facebook/react-native/issues/37708), Converted [react/fabric/interop/InteropEventEmitterTest.java](https://github.com/facebook/react-native/tree/main/packages/react-native/ReactAndroid/src/test/java/com/facebook/react/fabric/interop/InteropEventEmitterTest.java) to kotlin file

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

[INTERNAL] [CHANGED] - `InteropEventEmitterTest.java` file migrated from java to kotlin

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

Test Plan:
Tests should pass
```
./gradlew :packages:react-native:ReactAndroid:test
```

Reviewed By: NickGerleman

Differential Revision: D47165007

Pulled By: mdvacca

fbshipit-source-id: 459b0867810eb1b782eea354d74152306b9546ff
2023-06-30 18:57:19 -07:00
Intl Scheduler 81785c241e translation auto-update for i18n/fb4a.config.json on master
Summary:
Chronos Job Instance ID: 1125907909899955
Sandcastle Job Instance ID: 987038736
allow-large-files
ignore-conflict-markers
opt-out-review

Differential Revision: D47165666

fbshipit-source-id: 056ff6f434ba7153fde8f5de1486789ff08157dc
2023-06-30 17:55:59 -07:00
David Vacca ea48fd24ea Resorting methods in ReactHost class (#38043)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38043

Resorting methods in ReactHost class, this class in very long and to make it easy to read and analyze I'm sorting methods as public -> package -> private

no changes of behavior are happening here

bypass-github-export-checks

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D46773622

fbshipit-source-id: 4e2867930dc84ef410569532e8a195e491a6a553
2023-06-30 14:57:39 -07:00
Panagiotis Vekris 5fd32d71e9 Upgrade hermes-* packages in xplat and arvr to 0.14.0 (#38133)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38133

Upgrade hermes parser packages to the latest released versions.

Changelog is here: https://github.com/facebook/hermes/blob/main/tools/hermes-parser/js/CHANGELOG.md

Changelog: [Internal]

Reviewed By: mroch

Differential Revision: D47133130

fbshipit-source-id: e1022f491feb08273fd340eb1fce7256d3a2f191
2023-06-30 11:10:35 -07:00
Rob Hogan 005d832d53 Update CLI to 12.0.0-alpha.6, Metro to 0.76.7 (#38141)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38141

Bump CLI and Metro versions on main to latest.

Changelog:
[General][Fixed] - Bump CLI to 12.0.0-alpha.6, Metro to 0.76.7

Reviewed By: dmytrorykun

Differential Revision: D47153654

fbshipit-source-id: d9eff64e5539f0e577e059bce836af3c65a4a8c7
2023-06-30 09:54:17 -07:00
Pieter De Baets 0fe5ffd568 Do not create RuntimeExecutor on non-JSI executors (#38125)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38125

On Android, when using the remote debugging feature (using legacy websockets), it's not safe to assume we can get a `jsi::Runtime` from `JSExecutor`.

Changelog: [General][Fixed] Android does't crash when using remote debugger

Reviewed By: NickGerleman

Differential Revision: D47124234

fbshipit-source-id: 0542da1aca5d411964e3a0833f4c48428ed90c91
2023-06-30 08:09:30 -07:00
Intl Scheduler 2d1b459bd6 translation auto-update for i18n/fb4a.config.json on master
Summary:
Chronos Job Instance ID: 1125907909617241
Sandcastle Job Instance ID: 986703379
allow-large-files
ignore-conflict-markers
opt-out-review

Differential Revision: D47154185

fbshipit-source-id: c6b975da1afe1e14f5019bacd716bdb4f81f8d6e
2023-06-30 07:49:52 -07:00
Nicola Corti c3f672cef7 Use vals inside ReactApplication (#38088)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38088

For better Kotlin interop we should be using `val` in this interface rather than just `fun`.
This is not a breaking change as Java users can still use `getReactNativeHost()` as before.

Changelog:
[Internal] [Changed] -  Use vals inside ReactApplication

Reviewed By: javache

Differential Revision: D47053030

fbshipit-source-id: 4a7fbc71a76be54e1cf7daef499b9bc3e8fc615a
2023-06-30 06:02:01 -07:00
Nicola Corti 3a912a3716 Add foojay-resolver-convention to auto-download the right JDK (#38139)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38139

This adds https://github.com/gradle/foojay-toolchains to our build setup.
This will make sure that if the user doesn't have JDK 17 installed, it will be
autodownloaded once they try to build the first time.

Changelog:
[Internal] [Changed] - Add foojay-resolver-convention to auto-download the right JDK

Reviewed By: sammy-SC

Differential Revision: D47129944

fbshipit-source-id: fd49f6dfe5f87ce3f01e5cce3527144fb96f032a
2023-06-30 05:30:29 -07:00
Samuel Susla 5bda54c1f1 Disable nstextstorage_caching in OSS (#38129)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38129

changelog: [iOS] Disable NSTextStorage caching in OSS

A [bug was reported](https://github.com/facebook/react-native/issues/37944) for NSTextStorage caching. Even thought I fixed the bug in D47019250, I want to disable the feature in OSS until the fix is verified in Facebook app.
My plan is to pick this commit for 0.72.1 and reenable NSTextStorage caching once the fix is validated.

Reviewed By: NickGerleman

Differential Revision: D47127912

fbshipit-source-id: 97694e383eb751e89b776c0599969f2c411bac6f
2023-06-30 05:12:39 -07:00
Gabriel Donadel 835f62c189 Fix use_react_native to support absolute paths (#37545)
Summary:
While setting up a monorepo that required a custom react-native path location (react-native-macos in my case) I was getting the following error when running `pod install`

![image](https://github.com/facebook/react-native/assets/11707729/29bacfbb-78d9-49db-9c75-3e75674d87e9)

That's because `build_codegen` and `checkAndGenerateEmptyThirdPartyProvider` functions don't check if the given `react_native_path` is absolute or relative.

This PR fixes this problem by checking if `react_native_path` starts with `/`

bypass-github-export-checks

## Changelog:

[IOS] [FIXED] - Fix `use_react_native` to support custom react native absolute paths

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

Test Plan:
Modify [rn-tester/Podfile](https://github.com/facebook/react-native/tree/main/packages/rn-tester/Podfile) to use an absolute path when calling `use_react_native`

E.g.

```rb
rn_path = File.dirname(`node --print "require.resolve('react-native/package.json')"`)

use_react_native!(
  path: rn_path,
  ...
)
```

then run `pod install`

Reviewed By: cortinico

Differential Revision: D46279570

Pulled By: cipolleschi

fbshipit-source-id: 0d6da12c5617cfca2c9ef9dea08ecf728a970b6f
2023-06-30 04:12:18 -07:00
Lorenzo Sciandra ed929dfd01 add 0.72.1 changelog (#38131)
Summary:
Adds changelog for new patch.

## 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] - add changelog entry for 0.72.1

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

Test Plan: N/A

Reviewed By: cortinico

Differential Revision: D47149515

Pulled By: cipolleschi

fbshipit-source-id: 737032c204d68749770801fa34ecb8d212b8958f
2023-06-30 04:05:49 -07:00
louiszawadzki a4a0655496 Fix pod install for swift libs using new arch (#38121)
Summary:
This fixes a bug that started with React Native 0.72.0 when using the new architecture and installing a native lib that has Swift code (in my case, `datadog/mobile-react-native`).

Running `pod install` errors with the following output (`DatadogSDKReactNative` is the pod containing the Swift code):

```
[...]
Analyzing dependencies
Downloading dependencies
Installing DatadogSDKReactNative 1.8.0-rc0
[!] The following Swift pods cannot yet be integrated as static libraries:

The Swift pod `DatadogSDKReactNative` depends upon `React-Fabric`, `React-graphics`, `React-utils`, and `React-debug`, which do not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies.
```

Indeed, this pods were added as dependencies in `packages/react-native/scripts/cocoapods/new_architecture.rb` but do not define modules contrary to the other pods in the list.

This PR is solving a problem that already occured in the past and was solved here: https://github.com/facebook/react-native/pull/33743
It's a new implementation for the PR initially opened here: https://github.com/facebook/react-native/pull/38039

## Changelog:
[IOS] [FIXED] - Fix pod install for libraries using Swift code when the new architecture is enabled

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

Test Plan:
1. Clone [this](https://github.com/louiszawadzki/react-native) repo
2. From `main`, add a Swift file to the `MyNativeView` native module in the RN tester app (see inspiration from [this commit](26958fccf4))
3. Try to run `RCT_NEW_ARCH_ENABLED=1 USE_HERMES=0 bundle exec pod install` inside the `packages/rn-tester`
4. Observe errors
5. Apply [the commit](7b7c3ff530) from this PR
6. Both pod install and the subsequent build should succeed.
7. Revert the changes and repeat steps 2 to 6 with `RCT_NEW_ARCH_ENABLED=1 USE_HERMES=1 bundle exec pod install`

Reviewed By: cortinico

Differential Revision: D47127854

Pulled By: cipolleschi

fbshipit-source-id: bf7f65e0d126195a76a0fafbe2f3172f00d5adc1
2023-06-30 03:07:59 -07:00
Intl Scheduler 80a2b8ea54 translation auto-update for i18n/fb4a.config.json on master
Summary:
Chronos Job Instance ID: 1125907909241891
Sandcastle Job Instance ID: 4503600611310924
allow-large-files
ignore-conflict-markers
opt-out-review

Differential Revision: D47142727

fbshipit-source-id: 5889656b2714716a3b12862a898a9b1a235f3bdc
2023-06-29 18:05:01 -07:00
Luna Wei fc01ab62fd JestE2E: Add border screenshots (#38045)
Summary:
Changelog: [Internal] - Update some RNTester examples to allow for internal snapshot tests

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

From 0.72 border breakage, adding screenshot tests for our border examples in RNTester

Reviewed By: NickGerleman

Differential Revision: D46993114

fbshipit-source-id: b2d569c8a09098271ed74a6a88744ae75e373003
2023-06-29 16:56:49 -07:00
Nick Gerleman 3f6412b934 Remove YGExperimentalFeatureFixAbsoluteTrailingColumnMargin (#37374)
Summary:
X-link: https://github.com/facebook/yoga/pull/1317

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

This is edge-casey enough, and I actually broke this in D42282358 without us noticing (I changed height to width of the bottom usage, instead, copy/pasting the value of the top one).

Reviewed By: yungsters

Differential Revision: D45766764

fbshipit-source-id: b600b79b8436534fe48ef2acbfde8ba64068e593
2023-06-29 11:04:01 -07:00
Alex Hunt 29f2602ff9 Add global hook to assert that base Metro config is called (#38126)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38126

Towards https://github.com/react-native-community/cli/issues/1987. Will be paired with a CLI PR targeting React Native 0.72.1.

Changelog: None

Reviewed By: motiz88

Differential Revision: D47125080

fbshipit-source-id: b3b9d93ba747240f5168021ccb793ffe5d34251d
2023-06-29 08:51:14 -07:00
Intl Scheduler 0bd6b28b32 translation auto-update for i18n/fb4a.config.json on master
Summary:
Chronos Job Instance ID: 1125907908625836
Sandcastle Job Instance ID: 985666883
allow-large-files
ignore-conflict-markers
opt-out-review

Differential Revision: D47117968

fbshipit-source-id: 66b6978e1099d9f2bba668dfd9fafadbe398eca9
2023-06-28 23:56:00 -07:00
Intl Scheduler 8d3df56d9b translation auto-update for i18n/fb4a.config.json on master
Summary:
Chronos Job Instance ID: 1125907908530012
Sandcastle Job Instance ID: 9007200235834664
allow-large-files
ignore-conflict-markers
opt-out-review

Differential Revision: D47108063

fbshipit-source-id: c355735d9db580cb63e2628ba8ab5ca1e94108fd
2023-06-28 14:42:11 -07:00
Arushi Kesarwani 15d735b35b Refactor ReactSurface to use TaskInterface (#38081)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38081

Changelog: [Internal]

As part of refactoring ReactSurface, ensuring the methods expose interfaces instead of internal classes, e.g. use TaskInterface instead of Task,

Reviewed By: cortinico

Differential Revision: D47026648

fbshipit-source-id: 5fc42693b307af057b51a869133c52de0b1dca3a
2023-06-28 13:30:51 -07:00
Alex Danoff 04af0b955d W3CPointerEvents: add unit test for JSPointerDispatcher (#38114)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38114

Changelog: [Android] [Internal] - W3CPointerEvents: add unit test for JSPointerDispatcher

This adds a basic test for JSPointerDispatcher. Right now this asserts that when a MotionEvent with ACTION_DOWN is received, we send out a pointerdown event.

There's a lot to be desired here in terms of e.g. ensuring that we're dispatching the event to the right target, which we can pursue as future work (of course, more complex test cases should also be added). I suspect we'll need to do a bit more refactoring to make this code more deeply testable (e.g. right now it's not straightforward to access Event properties from the test).

Reviewed By: javache

Differential Revision: D47035119

fbshipit-source-id: 1b49e2458325d6f0cc53d3b7ade8d6328141360f
2023-06-28 13:19:55 -07:00
Lulu Wu 637ffb175d Fix setRuntimeConfigProvider multiple times error
Summary:
Fix the following error:
 {F1038388240}

Calling ```setRuntimeConfigProvider``` multiple times is not always a wrong behaviour, the following could happen and before this diff App C will raise above error:
- App A has main bundle X
- App B has main bundle Y
- App C has main bundle X and bundle Y

To fix we guarantee ```setRuntimeConfigProvider``` only called once instead of raising an error.

Changelog:
[iOS][Changed] Fix setRuntimeConfigProvider called multiple times error

Reviewed By: dmytrorykun

Differential Revision: D47094267

fbshipit-source-id: c8473f4f7d639a73e0201c6d72781c01e6cf95fd
2023-06-28 09:49:57 -07:00
Phillip Pan 3ecbc1dba1 explicitly enable ATS in app template (#37923)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37923

Changelog: [Internal]

in this change, i'm looking to make sure our app template will not violate apple best practices and minimize probability of app rejection.

this change entails two guardrails:
- explicitly marking disabling ATS as disabled with a comment. even though this is already the case, this will make it more unlikely someone will override this
- replacing the localhost domain override with the apple provided NSAllowsLocalNetworking key, which is the recommendation

Reviewed By: sammy-SC

Differential Revision: D46707159

fbshipit-source-id: 8fe407d08767269a18fb15c80fdd83a58cf2a4a8
2023-06-28 09:11:58 -07:00
Phillip Pan d320334da8 tests for ats settings (#38084)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38084

Changelog: [Internal]

addings tests for D47041590

Reviewed By: cipolleschi

Differential Revision: D46961587

fbshipit-source-id: 6b93a20c8539d692db2f84836a0ab79d899197fa
2023-06-28 09:11:58 -07:00
Phillip Pan c86f15af30 adjust ats settings in plist in pod install (#38086)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38086

Changelog: [Internal]

in this diff, we update the developer's Info.plists to have the correct ATS settings

introducing usage of files: https://www.rubydoc.info/github/CocoaPods/Xcodeproj/Xcodeproj/Project#files-instance_method, in order to retrieve the plists

Reviewed By: cipolleschi

Differential Revision: D47041590

fbshipit-source-id: 3797ab18cf4f25ee377c8155a8cc4bb61f2bdcf1
2023-06-28 09:11:58 -07:00
Jacob Parker 6eb0327113 Update README.md - iOS support is 13.4 (#38108)
Summary:
According to the podfiles, the minimum version is 13.4

## Changelog:

[General] [Fixed] - Updated docs to match iOS 13.4 minimum requirement.

<!-- 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/38108

Reviewed By: jacdebug

Differential Revision: D47093313

Pulled By: blakef

fbshipit-source-id: f59b1be3a6608082fd680e42396aff9a269c77a0
2023-06-28 09:01:44 -07:00
Sam Zhou 605db4427c Replace $Call in react-native (#38104)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38104

With the introduction of [new utility types](https://flow.org/en/docs/types/utilities/#toc-return-type) in Flow, these $Call are no longer needed

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D47078502

fbshipit-source-id: 7fc5f6aa08052b8de8e3f0a45ce2d7a24cb4e1b5
2023-06-28 07:18:53 -07:00
Intl Scheduler b01c7b4aa5 translation auto-update for i18n/fb4a.config.json on master
Summary:
Chronos Job Instance ID: 1125907908196726
Sandcastle Job Instance ID: 13510799864709483
allow-large-files
ignore-conflict-markers
opt-out-review

Differential Revision: D47092881

fbshipit-source-id: 857554a3854e3d421a075f2d3d66adce6ee01c62
2023-06-28 06:16:58 -07:00
Alex Hunt bbcedd385b Restore base config merge in metro-config (#38092)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38092

Reverts https://github.com/facebook/react-native/pull/36777.

This is motivated by reducing user friction when the widespread assumption is for `react-native/metro-config` to export a complete Metro config, as with Expo/rnx-kit, and like previously understood uses of `metro-config`. See https://github.com/facebook/metro/issues/1010#issuecomment-1609215165 for further notes.

Fixes:
- https://github.com/facebook/metro/issues/1010
- https://github.com/facebook/react-native/issues/38069
- https://github.com/kristerkari/react-native-svg-transformer/issues/276

Note that we do not intend for `react-native/metro-config` to directly export `assetExts` etc — these can be accessed on the `resolver` property from the full config object.

Changelog: [General][Changed] `react-native/metro-config` now includes all base config values from `metro-config`

Reviewed By: robhogan

Differential Revision: D47055973

fbshipit-source-id: 5ad23cc9700397110de5c0e81c7d76299761ef0a
2023-06-28 04:29:45 -07:00
Dmitry Rykun a9618b33be Expose UIManager.getConstants instead of getNativeViewConfig to JS in bridgeless mode (#37865)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37865

In bridge mode UIManager's `constants` contain view configs for every registered native component and possibly some extra data.

On iOS there is no extra data, but on Android in addition to view configs there are `genericBubblingEventTypes` and `genericDirectEventTypes`. They are then [merged](https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/ReactNative/getNativeComponentAttributes.js#L110-L116) into `bubblingEventTypes` and `directEventTypes` of every view config.

This diff replaces `getNativeViewConfig` binding with `getConstants` to make this behaviour possible in the bridgeless mode.

This diff also removes caching on native side with the expectation that `constants` will be cached on JS side just as [it is done](https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/ReactNative/PaperUIManager.js#L24-L32) in bridge mode.

Changelog: [Internal] - Expose UIManager.getConstants instead of getNativeViewConfig to JS in bridgeless mode.

Reviewed By: RSNara

Differential Revision: D46698717

fbshipit-source-id: f9c96e220e49f6947766336ea545c01e38cb46ac
2023-06-28 04:17:07 -07:00
Sam Zhou c803a5bfa1 Enable mapped type (#38106)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38106

Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D47081653

fbshipit-source-id: e739ac2c868aed39bc5168607074fc2ee69b49ae
2023-06-27 22:31:25 -07:00
Phillip Pan 2df19cec82 convert ProjectMock path type from string to Pathname (#38085)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38085

Changelog: [Internal]

the path instance attribute on `Project` is not actually supposed to be `String`, but `Pathname`: https://www.rubydoc.info/github/CocoaPods/Xcodeproj/Xcodeproj/Project#path-instance_method

i need this actually to be a pathname, so doing the refactor in this diff

Reviewed By: cipolleschi

Differential Revision: D47041355

fbshipit-source-id: 8b43c3a6f1cbc0f930749f380bd9d06ed44c0c37
2023-06-27 16:06:54 -07:00
Panagiotis Vekris b9cf5a1c49 Deploy 0.210.1 to xplat and set type_guards=true (#38098)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38098

Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D47065254

fbshipit-source-id: 77c4694d8e1b31ef4dbd60cbf30d8fa1267a2819
2023-06-27 15:33:10 -07:00
Xixi Liran 6fbbe26f5f Fix 'out-of-line definition of constexpr' build error for XCode 15 for React Native (#38079)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38079

This diff fixes the
```
out-of-line definition of constexpr static data member is redundant in C++17 and is deprecated [-Werror,-Wdeprecated]
```
error in `RAMBundleRegistry`

## Changelog:
[internal] - Fix Xcode 15 namespace build errors in `RAMBundleRegistry`.

Reviewed By: javache, cipolleschi

Differential Revision: D46988689

fbshipit-source-id: 5dc34b0f7d6fb266bc379b3639244bf69505aa88
2023-06-27 13:20:36 -07:00
Intl Scheduler 01e62d9498 translation auto-update for i18n/fb4a.config.json on master
Summary:
Chronos Job Instance ID: 1125907907694341
Sandcastle Job Instance ID: 22517999117287273
allow-large-files
ignore-conflict-markers
opt-out-review

Differential Revision: D47069434

fbshipit-source-id: 89018bf327fbf77f911ad422d512be8c365e2410
2023-06-27 12:12:43 -07:00
Ken Tominaga 04d1de5896 Remove iOS 12 version check (#33460)
Summary:
I removed the code checking iOS 12 availability because the iOS minimum deployment target is now iOS 12.4 after these commits (982ca30de0, c71e6efbcd).

My previous pull requests regarding iOS 11
* [Remove iOS 11 version check by ken0nek · Pull Request https://github.com/facebook/react-native/issues/32151 · facebook/react-native](https://github.com/facebook/react-native/pull/32151)
* [Remove iOS 11 availability check by ken0nek · Pull Request https://github.com/facebook/react-native/issues/32488 · facebook/react-native](https://github.com/facebook/react-native/pull/32488)
* [Remove iOS 11 deprecation warnings around SafeArea by ken0nek · Pull Request https://github.com/facebook/react-native/issues/32851 · facebook/react-native](https://github.com/facebook/react-native/pull/32851)

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[iOS] [Changed] - Remove iOS 12 availability check

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

Reviewed By: NickGerleman

Differential Revision: D35021632

Pulled By: javache

fbshipit-source-id: bf85d44874a2c10cb345d33df7c9e4789312a7cd
2023-06-27 11:51:00 -07:00
Kryštof Woldřich a60d88053c Add @getsentry to React Native incubating partners list (#38091)
Summary:
Add getsentry to the React Native incubating partners list.

If you are interested in Sentry's work in the RN Core, see the ReactWG Post -> [Better Error Reporting for the New Architecture
](https://github.com/reactwg/react-native-new-architecture/discussions/122)
## 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
-->

[Internal] - Add getsentry to the React Native incubating partners list

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

Test Plan: None - Docs update

Reviewed By: cortinico, sammy-SC

Differential Revision: D47060764

Pulled By: blakef

fbshipit-source-id: 9a42a5d9ff9012eb4ec7ffb04fac850c750f3c65
2023-06-27 10:48:43 -07:00
Matt Blagden 48791bcd98 Fix grouping of console logs (#37835)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37835

Chrome Dev Tools doesn't correctly display grouped console logs (i.e. console output between a `console.group` and `console.groupEnd`) when timestamps are all zero.

Populate the timestamp field so grouping functions as expected.

Changelog: [General] [Fixed] Fix timestamps and grouped display of console messages within in a `console.group`

Reviewed By: fbmal7

Differential Revision: D46605659

fbshipit-source-id: c5821bfb4807c7f0ce28b7bb95ea08de29caf8a2
2023-06-27 10:44:42 -07:00
Jordan Brown 37460b06a4 Deploy 0.210.0 to xplat (#38097)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38097

Changelog: [Internal]

Reviewed By: mroch

Differential Revision: D47056034

fbshipit-source-id: 3a5f387722b637ad56a7871008bd9afecb0c52c8
2023-06-27 09:14:20 -07:00
trashcoder e35ca71bca Trashcoder/blob slice content type (#38078)
Summary:
I added the contentType parameter to Blob.slice like it's in the MDN Web docs.
This PR fixes https://github.com/facebook/react-native/issues/38058

When i slice a Blob for chunked uploads with react native i lost the content type, e.g. "image/jpeg", so the server doesn't know what kind of file he gets. In the docs of MDN the slice method was described with a third contentType parameter which was missing in Metas implementation.
## Changelog:
 [GENERAL] [ADDED] added a third parameter "contentType" to method slice of class Blob.

<!-- 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/38078

Test Plan:
I tested it with the unit-tests:
yarn run test Blob-test.js
yarn run v1.22.19
$ jest Blob-test.js
 PASS  packages/react-native/Libraries/Blob/__tests__/Blob-test.js
  Blob
    ✓ should create empty blob (5 ms)
    ✓ should create blob from other blobs and strings
    ✓ should slice a blob (1 ms)
    ✓ should slice a blob and sets a contentType
    ✓ should close a blob (4 ms)

My added unit test results "✓ should slice a blob and sets a contentType".

Reviewed By: hoxyq

Differential Revision: D47057162

Pulled By: blakef

fbshipit-source-id: 0931b0b828f81b9b90562ffd51d4111c81034ffc
2023-06-27 09:10:13 -07:00
Samuel Susla ebbd22c9d8 Add nullptr check to SharedFunction (#38075)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38075

changelog: [internal]

`SharedFunction<>` is created with nullptr for its internal `std::function`. If called after created with default constructor, it crashes app. It also does not have API to check if its internal function is not nullptr.

With image cancelation, there is a race between when native component calls `imageRequest.cancel()` and when cancelation function is set in `RCTImageManager`.
To fix this, this diff adds a nullptr check inside SharedFunction. So it is always safe to call.

Reviewed By: javache

Differential Revision: D47022957

fbshipit-source-id: 0a04a87cd1ffe6bf3ca2fded38f689f06cc92ca9
2023-06-27 09:01:29 -07:00
Riccardo Cipolleschi a702d0515f Warn users when a component is registered in Rendere and in the interop (#38089)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38089

This change add a warning if a component is registered in both the New Renderer and in the Interop layer.

This can help users migrating their components once the library has been migrated.

## Changelog:
[iOS][Added] - Add warning to help users migrate away from the interop layer.

Reviewed By: cortinico

Differential Revision: D47053556

fbshipit-source-id: cc2ba09db16aaa370947a77173b6ea6a0acfa519
2023-06-27 08:45:10 -07:00
Riccardo Cipolleschi a28881a3d7 Implement multiple manager lookup for the interop layer (#38093)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38093

In [this issue](https://github.com/facebook/react-native/issues/37905), the community detected a strict assumption in the interop layer for which, given a component `XXXView`, its ViewManager must be called `RCTXXXViewManager`.

That's not the case for some components, for example, `BVLinearGradient`, which View manager is `BVLinearGradientManager` and not `RCTBVLinearGradientManager`.

This diff adds a secondary lookup logic:
1. We look for the `RCTXXXViewManager`.
2. If not found, we look for `XXXViewManager`.

We will assess whether to generalize this logic once and for all or to expand other lookup cases on an example/failure basis as it's not a goal to have a 100% accurate interop layer. The Goal is to cover most use cases.

## Changelog:
[iOS][Added] - Allow to lookup for ViewManager without the RCT prefix in the Interop Layer

Reviewed By: sammy-SC

Differential Revision: D47055969

fbshipit-source-id: 1d31f3f4bc6f1f543edbd157ce04ad9daf23dbc6
2023-06-27 08:43:23 -07:00