Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36968
Changelog: [iOS][Breaking]
we should be using `optional` never. this will be a breaking change if you have any class that conform to `RCTTurboModuleManagerDelegate`
#saynotoruntimechecks
Reviewed By: cipolleschi
Differential Revision: D45022003
fbshipit-source-id: d1b3cf72bae82070704f20de4558949189da462a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37008
Reduce Visibility of public methods that should be private
changelog: [Internal] internal
Reviewed By: luluwu2032
Differential Revision: D45153669
fbshipit-source-id: 2177a114eaa701d79a21d8a25bd299bf681dc4b8
Summary:
X-link: https://github.com/facebook/yoga/pull/1251
Pull Request resolved: https://github.com/facebook/react-native/pull/36990
YGNode::setConfig was deprecated as part of D15416474 in an apparent goal to remove config pointers per-Node.
While I don't know the history of the motivation here, these config pointers were never removed, and we will be doubling down on per-node configs for StrictLayout, so we will want to undeprecate this.
This also exposes functions to the public C ABI, but I didn't spend the effort to create language projections for it.
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D45133646
fbshipit-source-id: 2bb15c4825717793529cdad8542447d11e723e35
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
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36980
With the TurboModule interop layer, some modules aren't being loaded at all. This logging will help us root cause the problem: is the issue with the TurboModule system, or with instantiating a particular module.
Changelog: [Internal]
Reviewed By: cortinico, mdvacca
Differential Revision: D45102812
fbshipit-source-id: 5c5f55d5857c694270a83c38b68cae0fdb2c3b50
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36986
global.nativeModuleProxy and global.__turboModuleProxy should not share the same cache.
Otherwise, global.nativeModuleProxy could return TurboModules, and global.__turboModuleProxy could return legacy native modules.
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D45131296
fbshipit-source-id: 472059dc95d760a5eb8fc376606b30e614ee86c5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36985
This diff simplifies TurboModuleManagerDelegate. Now, it doesn't do any filtering.
What TurboModuleManagerDelegate does:
- If the TurboModule interop layer is on, getLegacyModule(moduleName) starts returning legacy modules.
- If the TurboModule interop layer is off, getLegacyModule(moduleName) returns null.
This should help with T144183369. In that crash, some native modules are returned as null. And complicated filtering could be a contributor to that problem. So, simplifying filtering might mitigate that issue.
Even if it doesn't, this makes the TurboModuleManager easier to understand, which makes root causing/mitigating that problem easier.
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D45131297
fbshipit-source-id: 9e37804e09c9f04ab0610f5b444574ae65c9d638
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36994
We already run changelog validation internally which has specific exemptions for codemods and dirsynced directories. Do not run twice, now that we need to export diffs.
An alternative solution would be to port the logic to the OSS changelog generator and stop running the internal one, but that would increase latency, and we have made fixes to the internal once as recent as two weeks ago in D44746795.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D45135111
fbshipit-source-id: e23c2613b183f75a148d1b38b31c259acc9c9fc5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36998
For performance entries that have the same start/end time it makes more sense to report them back to `PerformanceObserver` in the same order they were logged.
This kind of determinism is arguably better both in terms of API, and from the point of view of testing.
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D45142500
fbshipit-source-id: 77ff0093bead45dc2f15efc4b903dc181927565a
Summary:
<!--
Thanks for submitting a pull request!
We appreciate you spending the time to work on these changes. Please
provide enough information so that others can review your pull request.
The three fields below are mandatory.
Before submitting a pull request, please make sure the following is
done:
1. Fork [the repository](https://github.com/facebook/react) and create
your branch from `main`.
2. Run `yarn` in the repository root.
3. If you've fixed a bug or added code that should be tested, add tests!
4. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch
TestName` is helpful in development.
5. Run `yarn test --prod` to test in the production environment. It
supports the same options as `yarn test`.
6. If you need a debugger, run `yarn debug-test --watch TestName`, open
`chrome://inspect`, and press "Inspect".
7. Format your code with
[prettier](https://github.com/prettier/prettier) (`yarn prettier`).
8. Make sure your code lints (`yarn lint`). Tip: `yarn linc` to only
check changed files.
9. Run the [Flow](https://flowtype.org/) type checks (`yarn flow`).
10. If you haven't already, complete the CLA.
Learn more about contributing:
https://reactjs.org/docs/how-to-contribute.html
-->
## Summary
Browsers restore state like forms and scroll position right after the
popstate event. To make sure the page work as expected on back or
forward button, we need to flush transitions scheduled in a popstate
synchronously, and only yields if it suspends.
This PR adds a new HostConfig method to check if `window.event ===
'popstate'`, and `scheduleMicrotask` if a transition is scheduled in a
`PopStateEvent`.
## How did you test this change?
yarn test
DiffTrain build for commit https://github.com/facebook/react/commit/d121c67004a2e6b0bb5d341843663ef213f64863.
Reviewed By: kassens
Differential Revision: D45145742
Pulled By: sammy-SC
fbshipit-source-id: 196fe3539ee8588a31012d6af86a5ce0cd7fc973
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36824
After this diff, RNTester Android can build successfully, and it should be safe to land this stack to move Venice Android to OSS folders
Changelog:
[Android][Changed] - Add bolts task files as internal dependency
Reviewed By: cortinico
Differential Revision: D44729814
fbshipit-source-id: 80926dc548bb269bb9c69efab4c7620a3fb9fdc2
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36961
changelog: [internal]
Initial state must reflect content offset, otherwise ShadowTree will not know about the contentOffset until user scrolls.
This was affecting both, iOS and Android.
Reviewed By: mdvacca
Differential Revision: D45087358
fbshipit-source-id: 8812c2d3fe97e017938a9a81acbb31d579a00d45
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
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36997
I've noticed that `Performance.mark`, for some reason, has been using an explicit `duration` parameter throughout, whereas it doesn't really make sense - neither from the web standard perspective, nor in general.
Changelog: [Internal]
Reviewed By: rubennorte
Differential Revision: D45141978
fbshipit-source-id: ce3d149401249882f673c4bb6727eb1560469fa3
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36812
```robolectric4_test``` is internal and would fail CircleCI tests so we have to migrate away from it.
Changes:
> load("fbsource/tools/build_defs/oss:rn_defs.bzl") -> load("//tools/build_defs/oss:rn_defs.bzl")
> fb_android_library -> rn_android_library
> robolectric4_test -> rn_robolectric_test
I have to disable one test ```BridgelessReactContextTest.getJSIModuleTest``` since it keeps failing to create FabricUIManager which has static code in initialization, I've tried multiple ways but didn't work so disabled it temporarily to unblock.
bypass-github-export-checks
Changelog:
[Android][Changed] - Migrate "robolectric4_test" to "rn_robolectric_test" for bridgeless tests
Reviewed By: cortinico
Differential Revision: D44704765
fbshipit-source-id: 25729617a4d97f4d95a92c550ba42238f09664cb
Summary:
Adding changelog for 0.71.7 release
## 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] [Changed] - add changelog entry for 0.71.7
Pull Request resolved: https://github.com/facebook/react-native/pull/36973
Test Plan: N/A
Reviewed By: rshest, GijsWeterings
Differential Revision: D45114903
Pulled By: cortinico
fbshipit-source-id: c460858dd29d0c9da421bdaafb715ee71b9dd61f
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.70.9
Pull Request resolved: https://github.com/facebook/react-native/pull/36975
Test Plan: N/A
Reviewed By: NickGerleman
Differential Revision: D45115818
Pulled By: cortinico
fbshipit-source-id: a175a1ea6b864b21300f7f89731f3f501084949a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36983
Changelog: [Internal]
This updates ReactCommon/react code to use C++17 namespace format which was already used partially in other files
Reviewed By: NickGerleman
Differential Revision: D45121589
fbshipit-source-id: 0be5a7bce75dc9f8cde7856684f730f4d6df9202
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36904
In this diff I'm deleting sStateDescription from BaseViewManager, which their usages were originally deleted in D17152891
bypass-github-export-checks
changelog: [Android][Deleted] Delete sStateDescription from BaseViewManager, it's safe to delete because it shouldn't be used anywhere
Reviewed By: genkikondo
Differential Revision: D44682968
fbshipit-source-id: 732c32429b2c0c107f7968ece5b2e1ed256eed90
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36587
Right now an arc focus'd Android Studio (and presumably Android studio in OSS) will warn on any call incompatible with API 20 and later, but we only target API 21+ (Lollipop). See D24380233 for where we removed Lollipop and earlier code in October 2020.
https://pxl.cl/2xMGG
From searching, these warnings are controlled by the closest parent `AndroidManifest.xml`. We don't use this to control the actual SDK version, but we can add one for correct lint warning.
This change does that, then removes any extraneous version checks that were added since then.
Changelog:
[Internal]
Reviewed By: cortinico
Differential Revision: D44305441
fbshipit-source-id: f7b9b8889f4b0523a1e7b1a14808b0f587012a90
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36821
About SoLoaderLibrary:
```
/**
* This class is used to mark Java classes that depend on native libraries.
*
* <p>The purpose is to enable compile-time checking of library renaming. Adding a native target to
* the native library merge map will cause its library name to change in release builds, which
* SoLoader only supports if the target sets allow_jni_merging = True.
*
* <p>By publishing the library names to Buck via this annotation, we can validate at build time
* that this parameter is set.
*/
```
This annotation is not supported in OSS so move it to avoid breakage
Changelog:
[Android][Changed] -Remove SoLoaderLibrary to avoid OSS breakage
Reviewed By: cortinico
Differential Revision: D44679498
fbshipit-source-id: 6255e3c5f011d999d5e5aa6ae756a783bea2ee77
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36966
Changelog: [Internal]
This allows to re-use the same implementation for multiple platforms
Reviewed By: javache
Differential Revision: D45102417
fbshipit-source-id: 22de8b87774ccf87d76df0a0fe4663198207f324
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36964
Changelog: [Internal]
W/o #pragma once, .cpp files would include the same header file content multiple times leading to compile errors as
```
react-native-github/packages/react-native/ReactCommon/jserrorhandler/JsErrorHandler.h:14:6: note: unguarded header; consider using #ifdef guards or #pragma once
enum JSErrorHandlerKey : uint16_t {
^
```
Reviewed By: shwanton
Differential Revision: D45100413
fbshipit-source-id: 9a8a03624b9475506caf1e485dc8a06a7f14c1e5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36965
Changelog: [Internal]
These implementations are identical and can be merged
Reviewed By: javache
Differential Revision: D45101259
fbshipit-source-id: af7b2e0288f0cae44ae183a639a9d10e58887fc2
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36777
Changelog: [Internal]
Remove internal merge of `getDefaultConfig` (Metro base defaults) from `react-native/metro-config`. This is unnecessary given the config loading setup of RN CLI and Expo CLI, which use (or replicate) Metro's [`loadConfig`](https://github.com/facebook/metro/blob/1e47cb5b3cc289530fb18e402891f9d2816611dd/packages/metro-config/src/loadConfig.js#L182-L190) function — which will itself apply defaults appropriately.
This relates to a previously-breaking behaviour documented in the test plan of https://github.com/react-native-community/cli/pull/1896 (independently fixed and no longer load-bearing) (**read: no need to cherry pick this change**).
https://pxl.cl/2B8NS
While this has no effect under the fixed RN CLI setup, this is a worthwhile simplification to this package that better-aligns with current Metro tooling expectations.
## Notes
- `getDefaultConfig` no longer returns `ConfigT` (full config), and instead returns `MetroConfig` (partial config). This is non-breaking with the expected API of a given `metro.config.js` file.
Reviewed By: cipolleschi
Differential Revision: D44630645
fbshipit-source-id: 472c3967449dfb99f845a82d9e9c49efc343021c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36960
We're deprecating the unsafe `$Shape` and moving to the safe `Partial`: https://fb.workplace.com/groups/flowlang/posts/1251655088773485
I have previously codemodded all locations that do not cause errors. Now start on the remaining ones: codemod and suppress.
Changelog: [Internal]
Reviewed By: SamChou19815
Differential Revision: D45076273
fbshipit-source-id: 27ebf33370143e19751dbdcfcc1876cf3c586e14
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36958
As we don't invoke `buck` anymore inside `Dockerfile.android` anymore,
those instructions can be removed.
Changelog:
[Internal] [Changed] - Remove instructions from `Dockerfile.android` that are BUCK related
Reviewed By: sammy-SC, arushikesarwani94
Differential Revision: D45086054
fbshipit-source-id: 5ed5e353f43b11784a4dcb930148ab264d4dd063
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36933
Skew is already supported on the platform side; there's no reason to disable animating it.
Changelog:
[General][Added] - Enable animating skew in transforms with native driver
Reviewed By: mdvacca
Differential Revision: D45053914
fbshipit-source-id: 31198c35eeb55211a3ff88c968707db65b025f49
Summary:
Since v0.71 the autoComplete prop on TextInput is available on iOS ([release notes](https://reactnative.dev/blog/2023/01/12/version-071#component-specific-behavior)). However, this change is not reflected in the types.
Original types PR here - https://github.com/DefinitelyTyped/DefinitelyTyped/pull/65144 by chwallen
## Changelog:
[GENERAL] [FIXED] - Fix autoComplete type for TextInput
Pull Request resolved: https://github.com/facebook/react-native/pull/36931
Test Plan: Setting the autoComplete prop on TextInput to `nickname`, `organization`, `organization-title`, or `url` should not result in typescript errors.
Reviewed By: NickGerleman
Differential Revision: D45052350
Pulled By: javache
fbshipit-source-id: 40993833b4ed14f91e3bf3521a264ea93517a0c9