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
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
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36935
With the addition of AnimatedObject, animating prop values with arbitrary map/array nestings are possible (including transform matrix).
Note: this is only enabled when ReactNativeFeatureFlags.useAnimatedObjectForTransform is true.
Changelog:
[General][Added] - Enable animating skew in transforms with native driver
Reviewed By: mdvacca
Differential Revision: D45055381
fbshipit-source-id: 1b9224c0603ca7e89cd6f220d38a4579a4722e02
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
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36932
changelog: [internal]
ShadowNode must have its destructor as virtual because it is a base class and is used polymorphically. It is deleted through a pointer.
Reviewed By: nlutsenko
Differential Revision: D45045682
fbshipit-source-id: 882d06d2ab200c201acc09693cb982561e908859
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36954
This bumps the docker container we use to the latest major.
Changelog:
[Internal] [Changed] - Bump react-native-android docker container to 8.0
Reviewed By: cipolleschi
Differential Revision: D45083111
fbshipit-source-id: 44285e3e9af9be352c23bb1066fed3c35f51fb29
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36950
This test is flaky and is being reported on a number of diffs: D44729814
I'm suppressing it on Windows only as it's not failing on other platforms.
Changelog:
[Internal] [Changed] - Skip flaky `unmounted.measureInWindow(...) does nothing` test on Windows
Reviewed By: sshic
Differential Revision: D45081060
fbshipit-source-id: 917018d5e4a3298c7e4dee8658a41e2b18f68bb1
Summary:
We have modern Java now, so inline these lambda's to improve readability. Also removed some old logging related to a completed investigation.
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D45062457
fbshipit-source-id: b29f289b84083cb8b5dd2ccb7631ac21b4d04786
Summary:
This is bugfix for following code in RequestBodyUtil.java.
```
stream.getChannel().transferFrom(channel, 0, Long.MAX_VALUE);
```
This throws IllegalArgumentException in Android M or before. It seems in old version of JVM it internally casts third argument to integer so when you pass value that is larger than Integer.MAX_VALUE app would crash.
See:
https://bugs.openjdk.java.net/browse/JDK-5105464https://stackoverflow.com/questions/55696035/thrown-illegalargumentexception-when-using-java-nio
## Changelog
[Android] [Fixed] Fix issue downloading request body via remote URL
Pull Request resolved: https://github.com/facebook/react-native/pull/28399
Test Plan:
Run following code on Android M or before. It would crash w/o this PR but it won't with this PR.
```
const body = new FormData();
const image = { uri: "https://reactnative.dev/img/showcase/facebook.png", path: null };
body.append('user[img]', fileBody(image));
fetch("https://example.com", {
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'multipart/form-data;',
},
body: body
});
```
Reviewed By: christophpurrer, cipolleschi
Differential Revision: D45057263
Pulled By: cortinico
fbshipit-source-id: e0306eb157a5aa92619ac51e67d106b8651a0ba7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36622
This replaces Java `SpanPredicate` anonymous inner classes with lambdas and `androidx` `Predicate` (compat version of Java 8 predicate).
This may not be able to be merged yet because of Buck in OSS.
Changelog:
[Internal]
Reviewed By: javache
Differential Revision: D44362123
fbshipit-source-id: 67c9c7aa2acceab406e28ff49546c1240a5e85e6
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36934
Embarrassingly, the check for ReactNativeFeatureFlags.isAnimatedObjectEnabled wasn't actually useful since it's a function...it's been working as expected, so remove this gating since it's not doing anything.
Changelog:
[Internal] - Remove gating for AnimatedObject
Reviewed By: mdvacca
Differential Revision: D45055855
fbshipit-source-id: c30b3c04efc0e919059dbcb75a5adfea90610b85
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36936
I'm removing `POST_NOTIFICATION` as that's a typo as it should be `POST_NOTIFICATIONS`
We had both in version 0.71 so we can remove the wrong one as it's misleading for users.
Changelog:
[Android] [Removed] - Remove deprecated POST_NOTIFICATION from `PermissionsAndroid`
Reviewed By: sshic
Differential Revision: D45054310
fbshipit-source-id: be733811a1ee8e7c9d6e4986c0303eed7c07c35b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36916
Changelog: [iOS][Removed]
the bridge only behavior of eager initialization of native modules was coupled with the turbomodule infra, even though it didn't need to be. this eager initialized modules is a static list, and the bridge owner which is usually app scoped, can pass this list directly to the bridge instead.
Reviewed By: sammy-SC
Differential Revision: D45021784
fbshipit-source-id: f033661e0722f65ae971bd7ce27f8dc7de1173ad
Summary:
The example **Movies App** *no longer exists*, no wonder; why no one noticed these files ;).
It makes sense to remove all files specifically related to it.
This diff removes such dir and files.
## Changelog:
[GENERAL][REMOVED] - Cleanup - remove unused files (Movies App)
Pull Request resolved: https://github.com/facebook/react-native/pull/36913
Test Plan: - `yarn test-ci` --> should be green.
Reviewed By: christophpurrer
Differential Revision: D45056787
Pulled By: cortinico
fbshipit-source-id: 56b8d39772c70d31f2ba65ad986477710fa9fa9d
Summary:
- Although we have `.editorconfig`, on Windows machines most of the times the IDEs default to `CRLF` as default EOL config
- we've already specified the `eol` config as `lf` in `.editorconfig` at root level
- this diff syncs same config for prettier as well
>NOTE: Using `[skip ci]` as it's non code change and is tested for formatting.
## Changelog:
[GENERAL] [CHANGED] - Specify `eol` config in `.prettierrc` as `lf` at the root level
Pull Request resolved: https://github.com/facebook/react-native/pull/36884
Test Plan: - `yarn run format` --> _nothing should change_
Reviewed By: christophpurrer
Differential Revision: D45056330
Pulled By: cortinico
fbshipit-source-id: 166cbba04728e04521de58144abf0576730c8edd
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
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36912
Those files were in use to `buck fetch` dependencies for local consumption by the Buck OSS build.
They're not in use anymore and can be removed for now
Changelog:
[Internal] [Changed] - Remove Buck OSS third-party files
Reviewed By: cipolleschi
Differential Revision: D44992505
fbshipit-source-id: 0462a23c95107e67b1dd8d969648826cdb77554f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36898
This changes are a followup from D42281798 and the task T141309497.
In the previous diff, we were able to handle most cases thanks to `NSURLComponents`. `NSURLComponents` provides us with more flexibility so that we could handle the missing cases.
## Changelog:
[iOS][Fixed] - Handle doulbe `#` and partially escaped urls
Reviewed By: sammy-SC
Differential Revision: D44958172
fbshipit-source-id: 03628d86966c149d0785ad90fdbccbcb5e70106e
Summary:
Recent windows integration brought in a change where a unreferenced formal parameter was introduced in TurboModule.h. Windows treats with warning as an error, this change comments out the formal parameter name to get rid of the error/warning.
## Changelog:
[GENERAL] [FIXED] - Comment out unreferenced formal parameter
Pull Request resolved: https://github.com/facebook/react-native/pull/36853
Test Plan: Passed Windows testcases
Reviewed By: javache
Differential Revision: D45007332
Pulled By: philIip
fbshipit-source-id: 2e8128549d628a8be6bcd76c1fa473d0bc27649b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36908
We can now use Java 8, this diff i'm replacing old callbacks by lambdas
changelog: [internal] internal
Reviewed By: fkgozali
Differential Revision: D44977955
fbshipit-source-id: 0ab0d1c49a013e930041936bb08bbdb86dd30236
Summary:
New website of React is online, so some links about react should be also updated in README.md.
## 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
-->
[General] [Fixed] - Fix some links about react in readme
Pull Request resolved: https://github.com/facebook/react-native/pull/36638
Test Plan: The PR just changes some links in readme, don't need to test.
Reviewed By: jacdebug
Differential Revision: D44959199
Pulled By: blakef
fbshipit-source-id: 14a66a2d2b086fbe16f715c621c59a6d8d6ee698
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36882
This property was never used as TextAttributes has its own foreground color attribute.
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D44884978
fbshipit-source-id: daac06c9dfcbceedc084b6adc2cb114758533036
Summary:
[Codegen 103] This PR extracts the logic to compute the `extendsProps` and `props` properties in TypeScript Codegen in a `getProps()` function as requested on https://github.com/facebook/react-native/issues/34872
## Changelog:
[Internal] [Added] - Extract logic to compute codegen TS `extendsProps` and `props` properties in a single `getProps` function
Pull Request resolved: https://github.com/facebook/react-native/pull/36889
Test Plan: Run `yarn jest react-native-codegen` and ensure CI is green
Reviewed By: rshest
Differential Revision: D44952664
Pulled By: cipolleschi
fbshipit-source-id: fd51f0b8767efbb0071b6391e0852c19b5a984c6