Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51904
Replaces `chalk` with Node's `util.styleText` in `scripts/build/` and `scripts/build-types/`.
Will follow up with replacing across the entire repo at a later point.
Changelog: [Internal]
Reviewed By: robhogan
Differential Revision: D76037191
fbshipit-source-id: c28352853f22d455a709f4b752f566626e6fb3fe
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51907
changelog: [internal]
fixes a crash that is described by the two tests. The two tests cover both changes made to Differentiator.cpp. If you revert either of the change, a test will crash.
Reviewed By: christophpurrer
Differential Revision: D76231984
fbshipit-source-id: c32ab1851844121095f1dec953befb2e77c83fd4
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51875
This diff raises the logLevel of assertion LegacyArchitecture classes when minimizing of legacy architecture is enabled
Reviewed By: rshest
Differential Revision: D76080325
fbshipit-source-id: 75c92ba7fc54cfbc76bbc2fa3c3dc6a72a376c8f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51876
This diff raises the logLevel of LegacyArchitecture classes when minimizing of legacy architecture is enabled
Reviewed By: cortinico
Differential Revision: D76080324
fbshipit-source-id: 3764c0657b912db81e0dc46b6eb57cbb02b335ba
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51872
This converts to Kotlin and internaline MountingManager.
The only usage in OSS is react-natve-live-markdown:
https://github.com/Expensify/react-native-live-markdown/issues/693
They're using reflection to access Mounting Manager, which they shouldn't.
Other than them, I wasn't able to find meaningful usages of `MountingManager`
Changelog:
[Android] [Breaking] - Convert to Kotlin and internalize MountingManager
Reviewed By: rshest
Differential Revision: D76126338
fbshipit-source-id: 5ab491f86d697a82b8e5b02b031877020dfa3e9e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51836
Currently, `community-cli-plugin` loads the user config and then overrides parts of it - specifically `resolver.resolveRequest` and `serializer.getModulesRunBeforeMainModule`, making it impossible for a user to modify this config.
Instead, treat the CLI's resolver and serializer customisations as "Framework defaults", layered on top of `react-native/metro-config` defaults but beneath a user's `metro.config.js`.
This allows the user to obtain (via `react-native/metro-config`'s `getDefaultConfig`) and extend or override them, if they need to.
This is technically breaking because users who currently have a custom `resolveRequest` or `getModulesRunBeforeMainModule` in their `metro.config.js` will have that config respected from this change, whereas currently they won't have any effect.
Changelog:
[General][Breaking] Community CLI users: user-defined `resolver.resolveRequest` and `serializer.getModulesRunBeforeMainModule` Metro config now takes precedence over CLI defaults
Reviewed By: huntie
Differential Revision: D74811395
fbshipit-source-id: c250caf798fdaedb0822bea3d6e65c0c3ae4d691
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51844
These just redefine the existing `receiveCommand` from the ViewManagerDelegate which already has this codegen'ed
Changelog: [Internal]
Reviewed By: cortinico, rshest
Differential Revision: D75869325
fbshipit-source-id: c8ba482075c2586caf33f46a871b5b5e16fda213
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51890
changelog: [internal]
Fixing possible build failures when targets are built in different context:
- Adding includes to used std functions.
- Using explicit jsi namespace.
- Declaring dependency.
Reviewed By: javache
Differential Revision: D74878821
fbshipit-source-id: 9dfd7ba94651280331be6c9fe6948fce50955589
Summary:
Minor Typo correction.
## Changelog:
[INTERNAL][FIXED] updated description of Maestro E2E Android.
<!-- 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/51887
Test Plan: NA
Reviewed By: cipolleschi
Differential Revision: D76253803
Pulled By: cortinico
fbshipit-source-id: 16e8b793de4f7bb4eba03f20e09c3cf3d05115b9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51806
Correct the type of args, which is always non-null. This is backwards-compatible as subclasses can override this method with a more permissive nullable type and still be substitutable.
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D75869317
fbshipit-source-id: 8f6c9119140794447eca55be24483a35450d7bb6
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51873
After [51865](https://github.com/facebook/react-native/pull/51865), the path were the apk are generated changed. That broke the e2E tests in ci and the local script to test E2E, because the artefacts were not uploaded to CI properly.
This change should fix it
## Changelog:
[Internal] -
Reviewed By: cortinico
Differential Revision: D76133191
fbshipit-source-id: 70d8567dee8dc2a8bcc656cca7e94ad19101fe28
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51850
This change refactors the last compose-xcframework step to intgrate with the cli.js script to coordinate the build process.
## Changelog:
[Internal] -
Reviewed By: cortinico
Differential Revision: D76046443
fbshipit-source-id: 4740bb0869c688611a03d5085771aa6222132e7e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51845
This change refactors the build step of SwiftPM to use the cli.js script to coordinate it.
## Changelog:
[Internal] -
Reviewed By: cortinico
Differential Revision: D76046444
fbshipit-source-id: 7aa4ba55e46c2e4502687f035ba1e7bf772b3079
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51848
This change refactors the script by moving the step to setup the repo properly in a separate `setup.js` file.
This allows to simplify the main script by using the cli task.
## Changelog:
[Internal] -
Reviewed By: cortinico
Differential Revision: D76046441
fbshipit-source-id: 1da6f8dabf75640e455fcb2f543164c6a242abe0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51849
This simple change refactors the code of reactNativeDependencies to have more accurate logging when the step fails in CI
## Changelog:
[Internal] -
Reviewed By: cortinico
Differential Revision: D76046440
fbshipit-source-id: 2a1105285b0b1d5208a99c30d6ec2859bb8a0187
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51846
This change introduces a cli script to simplify handling of tasks when building React Native with Swift PM
## Changelog:
[Internal] -
Reviewed By: cortinico
Differential Revision: D76045574
fbshipit-source-id: 334d0502e781710f3744d9a3585ccfe7f2fa0038
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51847
This change introduces a types.js to add some useful flow types to build React Native with Swift PM.
## Changelog:
[Internal] -
Reviewed By: cortinico
Differential Revision: D76045454
fbshipit-source-id: 352e9f1a2845106c49461c3ac66188f49b520eb3
Summary:
This commit adds support for building XCFrameworks from the prebuild-script
- Added build script to help build xcframeworks
- Added full header file structure
- Added calling the build script from the main prebuild script
TODO: We need to add resources / privacy bundles
## Changelog:
[IOS] [ADDED] - Added building XCFframework from the prebuild script
Pull Request resolved: https://github.com/facebook/react-native/pull/51596
Test Plan: Run prebuild script and verify that XCFrameworks are successfully built.
Reviewed By: cortinico
Differential Revision: D75869879
Pulled By: cipolleschi
fbshipit-source-id: 7da1dfe2bea34966b88bdb0c31bf7c6ada420c57
Summary:
This commit adds building the swift package from the prebuild script:
- Added swiftpackage.js for building the swift package
- Added calling building from the main script
- Added configurable build type from the main script.
- Removed params in jsdoc from the link method
## Changelog:
[IOS] [ADDED] - Added building swift package from the prebuild script
Pull Request resolved: https://github.com/facebook/react-native/pull/51595
Test Plan:
Run prebuild script and verify that the Swift package is successfully built.
Rollback Plan:
Reviewed By: cortinico
Differential Revision: D75865275
Pulled By: cipolleschi
fbshipit-source-id: d4d9f26c817eb15c16f6be52ffa4b9f060e789da
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51840
Bumps the minimum version of Node.js in React Native to the current active LTS release (22.x, upgraded from 18.x which is now out of support).
- CI configurations are reduced from `[22, 20, 18]` to `[24, 22]`.
{F1978909878}
See https://nodejs.org/en/about/previous-releases.
Changelog:
[General][Breaking] - Our new minimum Node version is Node.js 22
Reviewed By: yungsters, cortinico
Differential Revision: D76037015
fbshipit-source-id: b6e4b3ee279a9a93d716a13297420bba73f45250
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51866
We're not really running those tests in OSS. They would require an emulator in OSS CI which
is costly and flaky. I'd rather remove the build logic for them and rely on Fantom for those kind
of tests in the future.
Changelog:
[Internal] [Changed] -
Reviewed By: cipolleschi
Differential Revision: D76050039
fbshipit-source-id: 29789a9c7db5c7108c4536db620d83640819874f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51865
As in 0.81 we're stopping 1st party support for JSC, we can now cleanup the RNTester
flavor for JSC and simplify the setup here.
Changelog:
[Internal] [Changed] -
Reviewed By: rshest
Differential Revision: D76051319
fbshipit-source-id: 79b01cc64af2466a0be47ceaa0cd211cb6b02f53
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51854
AGP 8.10.x comes with a source breaking change:
https://issuetracker.google.com/issues/416890061
This shoudl fix it and unblock us for the 0.81 release.
Changelog:
[Android] [Changed] - Bump AGP to 8.10.x
Reviewed By: huntie
Differential Revision: D76053989
fbshipit-source-id: b0fe19544c79d65002127176f2722cdfd85f0a3c
Summary:
PR https://github.com/facebook/react-native/issues/51078 Implemented finding disabled libraries but the code (below) didn't actually filter any libraries out because destructured name is `undefined`. This pr adds the name to codegenEnabledLibraries so filtering would work.
```js
const libraries = codegenEnabledLibraries.filter(
({name}) => !disabledLibraries.includes(name),
);
```
## Changelog:
[IOS] [FIXED] - Skip codegen for selectively disabled libraries in react-native.config.js
Pull Request resolved: https://github.com/facebook/react-native/pull/51838
Test Plan:
1. Install a library that has the componentProvider field set in the codegen config (for example: react-native-safe-area-context and react-native-screens or see [reproducer](https://github.com/aattola/rn-codegen-exclude))
2. Exclude library with react-native.config.js
3. install pods / run codegen
4. Check that codegen actually excluded the specified dependencies from: `ios/build/generated/ios/RCTThirdPartyComponentsProvider.mm`
Rollback Plan:
Reviewed By: cortinico
Differential Revision: D76044622
Pulled By: cipolleschi
fbshipit-source-id: 9e70c2a263c750edb1ea95305c9e5e178e2ce8d8
Summary:
When building Android in cloud environments, it turns out that in some of the environments, `sdkmanager` is not in any of the paths checked in `packages/react-native/ReactAndroid/hermes-engine/build.gradle.kts`, so the build fails.
I have added the path for the Linux cloud build environments I have been using (EAS).
I have also added the ability to insert a custom value for the path, in case this problem occurs again in future.
## Changelog:
[Internal][Fixed] - Allow more sdkmanager paths in hermes-engine Android build.
Pull Request resolved: https://github.com/facebook/react-native/pull/51829
Test Plan: Tested the changes in CI builds in EAS.
Reviewed By: rshest
Differential Revision: D76117000
Pulled By: cortinico
fbshipit-source-id: 2c8aff1ba4f03dbe77935992a774ed71f85264a3
Summary:
Part of https://github.com/facebook/metro/issues/1480
This PR adds a check in `HMRClient.js` that prevents processing `registerBundle` calls coming from different origin than the one declared in HMR `setup()`.
This is useful in a Module Federation setup, where we have multiple HMRClients present in runtime - when Host loads external remote, the requestURL will have different origin, but it will be processed by the HMRClient from the Host which in turn causes a runtime error.
## 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] [ADDED] - Process HMR registerBundle calls from the same origin only
Pull Request resolved: https://github.com/facebook/react-native/pull/51821
Test Plan: TBD
Reviewed By: christophpurrer
Differential Revision: D76044353
Pulled By: huntie
fbshipit-source-id: 3928347b1e9a90355d02b87b07fde812479bcb67
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51808
Pull Request resolved: https://github.com/facebook/react-native/pull/50292
## This diff
Generates types via `yarn build-types` and verifies them on the basis of react-native/types/__typetests.
Changelog: [Internal]
Reviewed By: robhogan
Differential Revision: D71902007
fbshipit-source-id: 43cb2321e9feea11b0caa4362140c86b1847db85
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51856
Enables the `enableEagerAlternateStateNodeCleanup` feature flag in the open source React Native renderers that are currently targeting React 19.1, by manually patching them in the React Native repository.
This feature flag has been found to significantly improve memory management of parent alternate fibers in persistent modes (i.e. Fabric), and we want this to be available to open source users of React Native before the next scheduled public version release of React.
For more details about the fix, see: https://github.com/facebook/react/pull/33161
Changelog:
[General][Changed] - Reduces memory usage, by improving memory management of parent alternate fibers. (Previously, a parent fiber might retain memory associated with shadow nodes from a previous commit.)
Reviewed By: rickhanlonii
Differential Revision: D76073900
fbshipit-source-id: 6779ea0862d4a1e25354b12ef3d1363dc12d26cc