Summary:
Installing `react-native` 0.72.x causes a warning about `react-test-renderer` because `react-native/virtualized-lists` has declared a peer dependency on it. As far as I know, it is not used for anything but tests.
```
➤ YN0002: │ react-native@npm:0.72.0-rc.6 [292eb] doesn't provide react-test-renderer (p5a2fb), requested by react-native/virtualized-lists
```
Note that while many package managers default to warnings in this case, there are still a number of users out there for which this is an error.
## Changelog:
[GENERAL] [FIXED] - `react-native/virtualized-lists` does not need `react-test-renderer` at runtime
Pull Request resolved: https://github.com/facebook/react-native/pull/37955
Test Plan: n/a
Reviewed By: rshest
Differential Revision: D46871536
Pulled By: NickGerleman
fbshipit-source-id: 1e5e15608ab394bc43cd4e6ac727a74734874642
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37939
# Changelog:
[Internal] -
This addresses potential problem with inconsistent naming of direct events on Android, as we've recently found out that there are several such occasions, which can be potentially a source of errors.
Reviewed By: javache
Differential Revision: D46801798
fbshipit-source-id: 01050f53c1efa382021400e803214ae1aafff3fa
Summary:
Prior to 0.69, an RN app receiving the `UIApplicationDidReceiveMemoryWarningNotification` notification resulted in RN performing a GC on the JSC. Since 0.69 this has not worked, this PR fixes the issue.
Before 0.69 this was handled via a hardcoded memory pressure level: https://github.com/facebook/react-native/blob/c5c17985dae402725abb8a3a94ccedc515428711/React/CxxBridge/RCTCxxBridge.mm#L362
(It seems like the levels are an Android concept - see https://developer.android.com/reference/android/content/ComponentCallbacks2#constants_1)
In commit https://github.com/facebook/react-native/commit/0916df99511d6918ea905c2a9df45bccc1fd332a it was changed to run from a constant which could be reconfigured but a mistake (return type of `BOOL` rather than `int`) was resulting in the intended default memory pressure level of 15 (same as the old hardcoded value) being changed to 1 when it was passed on to `handleMemoryPressure`.
## Changelog:
[IOS] [FIXED] - UIApplicationDidReceiveMemoryWarningNotification has not been obeyed on iOS since RN 0.69
Pull Request resolved: https://github.com/facebook/react-native/pull/37973
Test Plan:
Tested manually via the Simulator using Debug -> Simulate Memory Warning and monitoring the console output of the app.
Before fix:
```
WARNING: Logging before InitGoogleLogging() is written to STDERR
W0620 11:21:42.824463 257294336 JSIExecutor.cpp:377] Memory warning (pressure level: 1) received by JS VM, unrecognized pressure level
```
With fix (and also the same output for the latest 0.68 tag in the repo):
```
WARNING: Logging before InitGoogleLogging() is written to STDERR
I0620 11:25:47.479444 79212544 JSIExecutor.cpp:370] Memory warning (pressure level: TRIM_MEMORY_RUNNING_CRITICAL) received by JS VM, running a GC
```
Reviewed By: javache
Differential Revision: D46857205
Pulled By: sammy-SC
fbshipit-source-id: 35121e6c4186fded6ef3ba728d9aafbc936627bb
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37964
When a Surface is stopped, we don't immediately destroy the SurfaceMountingManager but instead just tear down its internal state. This allows for better error handling (eg did this react tag ever exist, or is this non-existing tag).
The way we construct the set of tags post-deletion is flawed though: `mTagToViewState.keySet()` does not create a new Set with all the tags used, but instead uses the underlying HashMap to iterate over the keys as needed. This effectively keeps all the Views inside that deleted surface alive.
Changelog: [Android][Fixed] Surfaces in the new architecture no longer leak views once stopped
Reviewed By: sammy-SC, rshest
Differential Revision: D46840717
fbshipit-source-id: fad145e4dd21b216d1e64f5dc79900434cff1785
Summary:
RCTUITextView has two instances where it references some magic constants for font size and color. We inherited these in React Native macOS, and now I want to remove that diff & implement these properly :D.
Looking at commit history, these constants were found by UI inspecting a UITextView several years ago. We don't need to do this.. Apple provides API's for accessing these constants through the system. This gives us slightly better support for things like Large Text support (where 17 needs to be scaled) and Dark Mode (where the old placeholderFontColor is just wrong). Granted, these constants are overwritten almost immediately, I still thought it worth using the proper OS APIs.
The other nice thing about this API is they have very nice macOS equivalents, making the diffs nicer :).
## Changelog:
Pick one each for the category and type tags:
[IOS] [FIXED] - Remove some magic constants from RCTUITextView
Pull Request resolved: https://github.com/facebook/react-native/pull/37875
Test Plan: Verified that the default UIFont is still 17 after this change.
Reviewed By: philIip
Differential Revision: D46770167
Pulled By: dmytrorykun
fbshipit-source-id: f577b5242a0c896d232f090ef2ffa5f452f8a191
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37975
AsyncLocalStorage is no longer distributed with react-native, so neither should this test mock be.
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D46857153
fbshipit-source-id: 3fdb2d95f3185b85a0777fde6ce59165c8ace8e9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37019
This bumps the version of AGP to the latest stable.
There was a breaking change in how buildConfig are built which I had to handle.
This also requires a bump of RNGP to work correctly.
Moreover, we now required Java 17 to build Android apps (as that's a AGP requirement).
Changelog:
[Android] [Changed] - Java to 17 and AGP to 8.0.2
Reviewed By: cipolleschi
Differential Revision: D45178748
fbshipit-source-id: 0f302e1f2f2ee56bd3566202fbb5ef67c9b220db
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37661
~~As title, Hermes will be supported. JSC not yet.~~
**Update 8th June:**
Split the original diff to 3 diffs, this one will simply change the head file path.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D46324942
fbshipit-source-id: ab2e54d0d8104d635b2405a818d5413adba304a6