Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39619https://github.com/facebook/react-native/pull/39603 unintentionally changed our Gradle distribution type in `gradle.properties` to `bin`. This changes it back to `all` while preserving the upgrade to 8.3.
Generated with
```
./gradlew wrapper --gradle-version=8.3 --distribution-type all
```
Changelog:
[Internal][Changed] Revert Gradle distribution type to ‘all’
Reviewed By: NickGerleman
Differential Revision: D49569492
fbshipit-source-id: fc5b2c8a2c2cea455ed5bd0dbd6743d34b527c9b
Summary:
With this small change, we are binding the cache for the template to the cache of RNTester.
This is helpful because, by default, templates don't have a Podfile.lock of their own. It is normal, as they are app created from the template and we don't enforce the initial
lock of those dependencies.
However, this can cause some hassle when we bump some internal podspec as the cache that is restored in CI will be outdated.
With this change, the podfile.lock for RNTester is different -- we push it when we change the internal podspecs -- so the cache for the template will be invalidated too.
## Changelog:
[Internal] - Invalidate Template caches when we bump internal podspecs
Pull Request resolved: https://github.com/facebook/react-native/pull/39601
Test Plan: CircleCI is green
Reviewed By: christophpurrer
Differential Revision: D49536315
Pulled By: cipolleschi
fbshipit-source-id: 04f1952f029ea643f2d82d2d690fad147faace05
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39513
changelog: [internal]
Using std::hash with const char * is dangerous, as it will not hash the contents but only the pointer itself. We want to adopt std::hash in favour of folly to reduce our dependency on folly. One way to fix the issue with const char * is to use std::string_view.
Reviewed By: rshest, cipolleschi
Differential Revision: D49355536
fbshipit-source-id: fd2a7b4558461e913cdf0ec0e8fe878cae2f6015
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39511
changelog: [internal]
C++ standard library doesn't offer a way to combine hashes together. This is implementation for uses in React Native code.
Reviewed By: javache
Differential Revision: D49349539
fbshipit-source-id: 1e1f47585969181d5910f5bbc5b6ebfffa12e96b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39600
This change will publish all the packages in the monorepo that are not private as during the nightlies, taking also care of keeping the transitive dependencies aligned.
## Changelog:
[Internal] - Bump packages and transitive dependencies when doing nightlies.
Reviewed By: huntie
Differential Revision: D49502330
fbshipit-source-id: 85e2bde13ed2b5dfe33072c9f99f5aaa2c5063ca
Summary:
While merging new commits into React Native macOS, I noticed https://github.com/facebook/react-native/pull/39478/
I would like to also set `MACOS_DEPLOYMENT_TARGET` in our fork, and thought this slight rename would be something I can do upstream
## Changelog:
[Internal] - updateIphoneOSDeploymentTarget -> updateOSDeploymentTarget
Pull Request resolved: https://github.com/facebook/react-native/pull/39570
Test Plan: CI should pass
Reviewed By: NickGerleman
Differential Revision: D49514693
Pulled By: ryancat
fbshipit-source-id: b4dafb1f9736d2977510712652cb8097263c489d
Summary:
These were added quite a while ago, and the proprosed change doesn't really make sense to pursue, since FloatOptional is a C++ wrapper around a Float, and the public API is entirely C.
bypass-github-export-checks
Reviewed By: rshest
Differential Revision: D49476343
fbshipit-source-id: f83cc99adda75fc0dba96e063cca92510c3d2ef0
Summary:
There are two reasons to apply these changes:
- We don't need to re-render the `KeyboardAvoidingView` if it is disabled. It may be especially useful in combination with [react-navigation](https://reactnavigation.org/) where we could disable `KeyboardAvoidingView` for screens that are not focused
- They fix the problem with the `KeyboardAvoidingView` wrapped inside the [react-freeze](https://github.com/software-mansion/react-freeze) component. Similarly, as above, it is useful when we want to freeze screens that are not visible for the user.
## Changelog:
[GENERAL] [CHANGED] Don't use setState for disabled KeyboardAvoidingView to avoid re-renders
<!-- 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/38074
Test Plan: - Check if the KeyboardAvoidingView works as expected.
Reviewed By: sammy-SC
Differential Revision: D49148391
Pulled By: blakef
fbshipit-source-id: c4b7bde696d2249cbf4ad12c77058183b632464d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39580
While testing other features, I realized that the script to generate a project locally, starting from the template, has a bug for which we were using the outdated `hermes-engine.podspec` coming from the Hermes repo to build hermes.
This change fixes this by moving our files to the right folder.
## Changelog:
[Internal] - Fix local e2e test script copying hermes rubyscript over
Reviewed By: dmytrorykun
Differential Revision: D49497716
fbshipit-source-id: f1d582ec9d9c8007cbd2f9c876c061af12735f83
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39534
Fetching native view configs is computationally intensive work, so if some component has both native and static VCs, we should try static first.
This diff changes the `NativeComponentRegistry` so it tries to get static view config first, and then native view config as a fallback.
This diff also removes setting `RuntimeConfigProvider` from RNTester. As it was there for the same purpose of inverting that precedence.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D49413562
fbshipit-source-id: d65776cd43eaa97d880b76385423c65e4e8744ba
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39527
So that Templace is able to switch to Bridgeless
Reviewed By: fkgozali
Differential Revision: D49150891
fbshipit-source-id: 782a6ffc4f8b21c0106458f6f16043df65ccd183
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39532
This change refactors how we handle the parameters of publish-npm so we can only accept the build types we actually support.
## Changelog:
[Internal] - Make publish-npm args stricter
Reviewed By: cortinico
Differential Revision: D49374263
fbshipit-source-id: a17ddecc0ddcb30858dd0baaab8990ae765d304f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39566
Fixes running the `build.sh` script for `react-native-codegen` when on [EdenFS](https://github.com/facebook/sapling). This would previously fail due a filesystem "unable to copy extended attributes" error.
This only affects development within the React Native monorepo. Practically, this equates to a workflow improvement for Meta engineers when creating `RNTester` builds.
NOTE: **This is temporary**. The change from `mv` to `cp -R` makes this script more expensive, which will make Android builds via Gradle take slightly longer. I have a WIP cleanup planned which will 1/ move `react-native-codegen` to the [shared monorepo build setup](https://github.com/facebook/react-native/pull/38718), and 2/ drop this step entirely from the Android Gradle build.
Changelog: [Internal]
Reviewed By: christophpurrer
Differential Revision: D49468891
fbshipit-source-id: 25d5db81798cf8ab150a135174a45f4d4c2cb5a2
Summary:
X-link: https://github.com/facebook/yoga/pull/1402
Pull Request resolved: https://github.com/facebook/react-native/pull/39567
This change hides away most usages of YGDimension as an index. We do this for a couple reasons:
1. Right now the style interface may return a full array of resolved edge or dimension values, as a CompactValue. As we abstract away from CompactValue, and move towards ValuePool, this will no longer be the internal interface, and cheap to return. We instead change the interface to return a single value at once, which lets us resolve values lazily.
2. As we move internal usage to scoped enums, enums are not implicitly convertible to intergers (broadly a good thing). Hiding the enum as index prevents the need for callers to cast or convert to underlying.
Instead of making a new version of `IdxRef` for this, I converted to a more traditional setter. I will be making similar changes later for other styles, when I hide CompactValue from the public interface.
To review I would recommend filtering to changes in `xplat`, or viewing this in a single one of the OSS PRs exported. Everything apart from the below 20 files is a mirror.
{F1096792573}
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D49362819
fbshipit-source-id: 30d730d78e62f36597d43f477120f65694e51ea3
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39561
Trying to investigate an issue where Systrace events aren't properly ended. For correctness, we should make sure to always end markers that we started.
Reviewed By: sammy-SC
Differential Revision: D49413689
fbshipit-source-id: e48e3aef20602e0af9deb924244cdfaf614d11f2
Summary:
Earlier today we bumped boost and removed a fix for Xcode 15.
Boost is a pod we don't consume from source and for the template we don't have a Podfile.lock to update.
However, the pod we don't control are cached as they don't change often.
This PR fixes bumps the cache to fix the CI issue
bypass-github-export-checks
## Changelog:
[Internal] - Bump iOS CI cache keys for the template
Pull Request resolved: https://github.com/facebook/react-native/pull/39560
Test Plan: CircleCI is green
Reviewed By: christophpurrer
Differential Revision: D49458677
Pulled By: cipolleschi
fbshipit-source-id: 957bb5bcc5fe940b9ea08c3f0b9031a39cee37ff
Summary:
issue: https://github.com/facebook/react-native/issues/39441
For the following reasons, I have replaced an object used for id management inside BlobRegistry with `Map`.
- The polyfill used for `fetch`, [whatwg-fetch](https://github.com/JakeChampion/fetch), returns responses as `Blob` objects.
- When a `Blob` is created, it is registered with blobID in the [BlobRegistry](https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Blob/BlobRegistry.js), which is not automatically released.
- This issue was previously reported in https://github.com/facebook/react-native/issues/19248 and was fixed by modifying whatwg-fetch. However, with the implementation of automatic garbage collection in https://github.com/facebook/react-native/issues/24405, the implementation was reverted in commit bccc92dfdd, returning to the original behavior.
- Although https://github.com/facebook/react-native/issues/24405 enables `Blob` objects to be garbage collected, the Blob IDs registered in the BlobRegistry remain, causing the count to increase each time `fetch` is called.
- As a result, the `Property storage exceeds 196607 properties` error occurs
To address this issue, I have modified the implementation of `BlobRegistry` to use a `Map` instead of an object. By using a `Map`, there is no limit to the number of entries.
## Changelog:
[Internal] - [Fixed] - Fixed a bug that caused a "Property storage exceeds 196607 properties" error when sending a certain number of `fetch` requests.
Pull Request resolved: https://github.com/facebook/react-native/pull/39528
Test Plan:
I've added a new tests in `packages/react-native/Libraries/Blob/__tests__/BlobRegistry-test.js` and confirmed the test pass before and after changes.
```
$ yarn run test
...
Test Suites: 1 skipped, 219 passed, 219 of 220 total
Tests: 2 skipped, 4017 passed, 4019 total
Snapshots: 1154 passed, 1154 total
Time: 10.525 s
Ran all test suites.
✨ Done in 12.52s.
```
Reviewed By: javache
Differential Revision: D49423213
Pulled By: NickGerleman
fbshipit-source-id: d5f73d7f5e34d1d2c3969b7dfbc45d3e6196aa30
Summary:
Remove Xcode 15 `_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION` workaround for boost. If we update boost, we don't need the workaround anymore.
This PR is based on https://github.com/facebook/react-native/issues/39552. Not sure how Meta internally deal with stacked PRs. This PR just adds a new commit based on https://github.com/facebook/react-native/issues/39552 anyway.
## Changelog:
[IOS][CHANGED] - Remove Xcode 15 `_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION` workaround for boost
Pull Request resolved: https://github.com/facebook/react-native/pull/39555
Test Plan: RNTester + Xcode 15
Reviewed By: cortinico
Differential Revision: D49454494
Pulled By: cipolleschi
fbshipit-source-id: aacabaa130b61598cf8bd206fdbb96d3b50ba74f
Summary:
Original commit changeset: f069fea8918f
Original Phabricator Diff: D49186069
bypass-github-export-checks
theory: getKeyWindowTraitCollection could get run in an async block, so there's a race to set the value. currently it gets read as nil on the first attempt
Reviewed By: sammy-SC
Differential Revision: D49449392
fbshipit-source-id: 3c71403fb30fa873a49bdc754c77797ed292a3f0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39273
Upgrade Metro dependencies to 0.79.1 in `react-native`
This includes Metro breaking changes for disabling global package resolution by default and adds features like: Haste packages, enable resolution through symlinks and passing custom customTransformOptions and customResolverOptions to bundle_build_started log event so as to refine the bundling message. It also fixes arbitrary transformation of Babel plugins during registration in `metro-babel-register` and fixes "unexpected null" crash when handling a batch of file changes and symlinks with indirections.
**Full Metro Changelog:** https://github.com/facebook/metro/releases/tag/v0.79.1https://github.com/facebook/metro/releases/tag/v0.79.0
Changelog:
[General][Changed] Upgraded Metro to 0.79.1
Reviewed By: motiz88, mdvacca
Differential Revision: D48922815
fbshipit-source-id: 37aea6194fe587e0d094c96ceec1122c588f0fbb