Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45945
This code is forked on iOS, where we have been, as a policy, avoiding Paper-specific changes. This code is shared between renderers on Android, but it is confusing developer experience to have it work on Android Paper, to then fail on iOS unless it is on new arch.
This change disables support on Android Paper for consistency.
Changelog:
[Android][Removed] - Gate off % border radii on Android Paper
Reviewed By: cortinico
Differential Revision: D60967347
fbshipit-source-id: 1d26bc71aee677aa9a0dc9bb38f781a99c7762a8
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45946
This code is forked on iOS, where we have been, as a policy, avoiding Paper-specific changes. This code is shared between renderers on Android, but it is confusing developer experience to have it work on Android Paper, to then fail on iOS unless it is on new arch.
This change disables support on Android Paper for consistency.
Changelog:
[Android][Removed] - Gate off % translate on Android Paper
Reviewed By: joevilches
Differential Revision: D60970266
fbshipit-source-id: 5df73b948464f5093941528b0af2e694827a9460
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45590
This gives us more wiggle room with the release of 0.76.
Changelog: [General][Changed] Move init deprecation notice 30 Sept → 31 Dec
Reviewed By: cortinico
Differential Revision: D60105868
fbshipit-source-id: d03fcf5d4a97db9b21792eff6f993e2671b276ef
Summary:
React-native 0.75 RC7 gradle sync is currently broken due to the fact that the `shared-testutil` folder is missing from the `react-native/gradle-plugin` npm package
## Changelog:
[INTERNAL] [ADDED] - Add shared-testutil folder to NPM files to be published
Pull Request resolved: https://github.com/facebook/react-native/pull/45936
Test Plan: N/A
Reviewed By: cipolleschi
Differential Revision: D60969631
Pulled By: cortinico
fbshipit-source-id: 850edfe0cf6b0e8174a1df9ea962d207d2ce0112
* Revert ReacRevert React from 19 to 18.3.1 due to React 19 not being out as stable
\## Changelog
[General][Changed] - Revert from React 19 RC to React 18.3.1
* Revert from React 19 RC to React 18.3.1
\## Changelog
[General][Changed] - Revert from React 19RC to React 18.3.1
* Fix ruby tests
Summary:
`getGradleDependenciesToApply` tries to call `implementation:` in all libraries, including the ones that are not supported on Android.
## Changelog:
[INTERNAL] [FIXED] - Filter out platform-specific libraries from the auto-linking gradle plugin
Pull Request resolved: https://github.com/facebook/react-native/pull/45749
Test Plan: CI should be green
Reviewed By: cipolleschi
Differential Revision: D60374769
Pulled By: cortinico
fbshipit-source-id: 33c83e9cc39d81b0e5c497570a936831ebb345f9
Summary:
In Node 20, the script to run unit tests in CI (`scripts/run-ci-javascript-tests.js`) will fail, even when all the Jest tests pass. This happens because one of the JS modules being tested is setting `process.exitCode` (see https://github.com/jestjs/jest/issues/9324#issuecomment-1808090455).
Changes:
- Modified the affected module to throw an exception when failing, instead of setting the exit code
- Adjusted the unit test for that module
## Changelog:
[General] [Fixed] - Remove setting of process.exitCode that breaks Jest tests
Pull Request resolved: https://github.com/facebook/react-native/pull/45562
Test Plan:
Before this change, running `node scripts/run-ci-javascript-tests.js` would fail with Node 20.
After this change, it succeeds.
Reviewed By: blakef
Differential Revision: D60033582
Pulled By: cipolleschi
fbshipit-source-id: 71b7f4495d414e719a9bd2d892bd1bc3045ddd5d
Summary:
Added space to $(inherited) string to avoid creation of wrong cpp flags in RCTAppDelegate podspec
<img width="1157" alt="Screenshot 2024-07-18 at 8 51 19 PM" src="https://github.com/user-attachments/assets/29d32d08-e81f-4c25-b8ee-5dccc0f620ea">
## Changelog:
[IOS] [FIXED] - Building of iOS project when RCTAppDelegate is used in the project
Pull Request resolved: https://github.com/facebook/react-native/pull/45520
Test Plan: To test this you can simply change in your node modules and run pod install, the build will now work successfully
Reviewed By: cipolleschi
Differential Revision: D59950906
Pulled By: arushikesarwani94
fbshipit-source-id: 0d58620aa0be7ac4fcbcd309f06df0eef7844016
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/43333
This change fixes https://github.com/facebook/react-native/issues/43285.
Basically, when using a `yarn` alias to install pods, yarn creates a copy of the `node` and `yarn` executables and the `command -v node` command will return the path to that executable.
## Changelog
[iOS][Fixed] - Do not use temporary node when creating the .xcode.env.local
Reviewed By: dmytrorykun
Differential Revision: D54542774
fbshipit-source-id: 3ab0d0bb441988026feff9d5390dcfd10869a1b5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45511
This adds react-native.config.js to autolinking default lockfiles
so autolinking can account for changes in that file.
Changelog:
[Internal] [Changed] - Add react-native.config.js to autolinking lockfiles
Reviewed By: blakef
Differential Revision: D59907268
fbshipit-source-id: d5893a3f7b4d5d9f6c6c13042aa6866ad16b2ea4
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45464
Previous work would cause versions >= react-native 0.76 to exit if called through `npx react-native <cmd>`. This was intended to be full deprecated and removed. The intention was to shift users to calling react-native-community/cli directly.
This change allows commands to be proxied to react-native-community/cli but with no guarantees of success. It's up to each framework / project to explicitly create that dependency.
This also provides warnings, which won't go away, suggesting the supported method of calling the community CLI directly.
The outcome is that we're not going to break existing workflows.
closes: #45461
Changelog: [General][Fixed] allow proxying commands from react-native to react-native-community/cli with explicit warning
Reviewed By: cortinico
Differential Revision: D59805357
fbshipit-source-id: 21e23b082a9c709effa050d8e7dd04a40f5ab0e6
Summary:
Call the react-native-community/template GHA to trigger a new release when we publish a react-native release. This then waits to confirm that the package is published.
See react-native-community/template#36 for the matching change
Changelog: [General][Added] trigger template publish
Pull Request resolved: https://github.com/facebook/react-native/pull/45327
Test Plan: Not sure on the best way forward here.
Reviewed By: cipolleschi
Differential Revision: D59467829
Pulled By: blakef
fbshipit-source-id: 091269e7ecdae5801ac7c03a1ede54452ae99b24
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45374
This change factors out the language standard in a separate constant so we can easily control it from a single place.
There are only 2 exception to this:
1. hermes-engine: the podspec is used in CI and it has no access to the rct_cxx_language_standard variable
2. Yoga: it can be used as a separate pod, outside of React Native, so it makes sense to leave it alone.
This change also fixes a problem where, in some setup, the language was set to C++14
[Internal] - Refactor Cxx language standard in a single constant
Reviewed By: dmytrorykun, blakef
Differential Revision: D59629061
fbshipit-source-id: 41eac64e47c14e239d8ee78bd88ea30af244d695
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45329
Thanks to [#45232](https://github.com/facebook/react-native/issues/45232) we found a bug in the interop layer, where we were not passing the BridgeProxy in bridgeless mode to the view managers.
This Change should fix that issue.
## Changelog:
[iOS][Fixed] - Make sure to pass the RCTBridgeProxy to ViewManagers
Reviewed By: dmytrorykun
Differential Revision: D59468292
fbshipit-source-id: 00666be21385a735878eb567c4b8a0986c609c5f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45256
The actual stamped versions here are all strings.
Android interface for constants is untyped, and we always return a string here. iOS, we will try to parse the string into a double, which will fail for every prerelease version RN has ever published.
Platform on Windows seems to uniquely be doing the right thing.
Changelog:
[General][Fixed] - Fix Platform.constants.reactNativeVersion type
Reviewed By: robhogan, necolas
Differential Revision: D59141948
fbshipit-source-id: 9c758e5eb8796b03197258d87ec06b31018e211c
Summary:
In recent commits, some new targets have been added, and they are not exposed as prefabs, yet are used in e.g. `TextLayoutManager`. They are needed then for `react-native-live-markdown`: https://github.com/Expensify/react-native-live-markdown/pull/428/commits/c1611cd98ed5009fd66c871b9999b55941086af0
## 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
-->
[ANDROID] [ADDED] - expose prefabs for newly added targets
Pull Request resolved: https://github.com/facebook/react-native/pull/45386
Test Plan: It cannot be tested inside the repo, but try to build the `example` app with new arch enabled on `Android` in the `react-native-live-markdown` repo to see that those are needed.
Reviewed By: NickGerleman
Differential Revision: D59638801
Pulled By: cortinico
fbshipit-source-id: 3d09507d72a0c4d3dbb3a2a81b753625230a04a3
Summary:
Fixes: https://github.com/facebook/react-native/issues/45307
## Changelog:
[Android] [Fixed] - if `npx react-native-community/cli config` fails or timeouts proper error is shown and built is aborted, instead of leaving and empty autolinking.json
During build `npx react-native-community/cli config` is generated into autolinking.json. When command fails, we should error and should not leave and empty `autolinking.json`
Pull Request resolved: https://github.com/facebook/react-native/pull/45333
Test Plan:
Output of the reproducer in https://github.com/facebook/react-native/issues/45307 looks like this:
```log
android % ./gradlew assembleDebug
Starting a Gradle Daemon (subsequent builds will be faster)
ERROR: autolinkLibrariesFromCommand: Failed to create /Users/boga/Work/OSS/RNMBGL/rn-fabric-boolattribute/ReproducerApp/android/build/generated/autolinking/autolinking.json - process npx react-native-community/cli config exited with error code: 126
FAILURE: Build failed with an exception.
* Where:
Settings file '/Users/boga/Work/OSS/RNMBGL/rn-fabric-boolattribute/ReproducerApp/android/settings.gradle' line: 3
* What went wrong:
A problem occurred evaluating settings 'android'.
> ERROR: autolinkLibrariesFromCommand: Failed to create /Users/boga/Work/OSS/RNMBGL/rn-fabric-boolattribute/ReproducerApp/android/build/generated/autolinking/autolinking.json - process npx react-native-community/cli config exited with error code: 126
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
BUILD FAILED in 10s
8 actionable tasks: 4 executed, 4 up-to-date
```
Output if you modify the package.json to be invalid looks like this:
```log
android % ./gradlew assembleDebug
ERROR: autolinkLibrariesFromCommand: process npx react-native-community/cli config exited with error code: 1
JSONError: JSON Error in /Users/boga/Work/OSS/RNMBGL/rn-fabric-boolattribute/ReproducerApp/package.json:
35 | "node": ">=18"
36 | },
> 37 | SOMETHING_NON_JSON
| ^
38 | "packageManager": "yarn@3.6.4",
39 | "resolutions": {
40 | "rtn-centered-text": "portal:../RTNCenteredText"
Unexpected token "S" (0x53) in JSON at position 1019 while parsing near "...ode\": \">=18\"\n },\n SOMETHING_NON_JSON\n ..."
35 | "node": ">=18"
36 | },
> 37 | SOMETHING_NON_JSON
| ^
38 | "packageManager": "yarn@3.6.4",
39 | "resolutions": {
40 | "rtn-centered-text": "portal:../RTNCenteredText"
at parseJson (/Users/boga/Work/OSS/RNMBGL/rn-fabric-boolattribute/ReproducerApp/node_modules/parse-json/index.js:29:21)
at loadJson (/Users/boga/Work/OSS/RNMBGL/rn-fabric-boolattribute/ReproducerApp/node_modules/react-native-community/cli-config/node_modules/cosmiconfig/dist/loaders.js:48:16)
at #loadConfiguration (/Users/boga/Work/OSS/RNMBGL/rn-fabric-boolattribute/ReproducerApp/node_modules/react-native-community/cli-config/node_modules/cosmiconfig/dist/ExplorerSync.js:116:36)
at #loadConfigFileWithImports (/Users/boga/Work/OSS/RNMBGL/rn-fabric-boolattribute/ReproducerApp/node_modules/react-native-community/cli-config/node_modules/cosmiconfig/dist/ExplorerSync.js:87:54)
at #readConfiguration (/Users/boga/Work/OSS/RNMBGL/rn-fabric-boolattribute/ReproducerApp/node_modules/react-native-community/cli-config/node_modules/cosmiconfig/dist/ExplorerSync.js:84:82)
at search (/Users/boga/Work/OSS/RNMBGL/rn-fabric-boolattribute/ReproducerApp/node_modules/react-native-community/cli-config/node_modules/cosmiconfig/dist/ExplorerSync.js:50:63)
at emplace (/Users/boga/Work/OSS/RNMBGL/rn-fabric-boolattribute/ReproducerApp/node_modules/react-native-community/cli-config/node_modules/cosmiconfig/dist/util.js:36:20)
at ExplorerSync.search (/Users/boga/Work/OSS/RNMBGL/rn-fabric-boolattribute/ReproducerApp/node_modules/react-native-community/cli-config/node_modules/cosmiconfig/dist/ExplorerSync.js:78:42)
at getUserDefinedOptionsFromMetaConfig (/Users/boga/Work/OSS/RNMBGL/rn-fabric-boolattribute/ReproducerApp/node_modules/react-native-community/cli-config/node_modules/cosmiconfig/dist/index.js:32:37)
at mergeOptionsBase (/Users/boga/Work/OSS/RNMBGL/rn-fabric-boolattribute/ReproducerApp/node_modules/react-native-community/cli-config/node_modules/cosmiconfig/dist/index.js:60:31)
FAILURE: Build failed with an exception.
* Where:
Settings file '/Users/boga/Work/OSS/RNMBGL/rn-fabric-boolattribute/ReproducerApp/android/settings.gradle' line: 3
* What went wrong:
A problem occurred evaluating settings 'android'.
> ERROR: autolinkLibrariesFromCommand: process npx react-native-community/cli config exited with error code: 1
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
BUILD FAILED in 2s
8 actionable tasks: 4 executed, 4 up-to-date
```
Reviewed By: cipolleschi
Differential Revision: D59582430
Pulled By: cortinico
fbshipit-source-id: bedb9563175cc5c46f5af80cf309769e56b803cc
Summary:
Use the hard-coded config for Helloworld instead of assuming the community cli is there to generate a config, which we can no longer assume.
Changelog: [Internal]
Pull Request resolved: https://github.com/facebook/react-native/pull/45221
Test Plan:
This works in my local environment:
```
bundle exec pod install
```
and
```
./gradlew generateAutolinkingPackageList
```
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D59162715
Pulled By: blakef
fbshipit-source-id: 95ff2c3929f12ee0ecf468cb80d2df1281eb746e
Summary:
After upgrading my project to the latest version of react native i.e, 0.74.2, i was getting an error when running `pod install` an the error was coming from the post install hook. Going deeper into the file tree, i found that some of the things are Nil and react native is trying to use some methods on them, so fixed those issues by using chaining operators to conditionally apply the path method on them.
## Changelog:
[Internal] - fixes the post install issue when running pod install with react native version, 0.74.2
Pull Request resolved: https://github.com/facebook/react-native/pull/45095
Test Plan: Manually tested the fix. Works perfectly fine in both debug and production mode.
Reviewed By: cortinico
Differential Revision: D58863666
Pulled By: cipolleschi
fbshipit-source-id: 64459711dcf926b7544b99b542e9861c1c0f05ca
Summary:
https://github.com/facebook/react-native/pull/45409 broke CI because it didn't set up dependencies correctly. This should fix it.
Changelog: [internal]
Reviewed By: cipolleschi
Differential Revision: D59751194
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45409
Changelog: [internal]
This removes `BridgelessJSCallInvoker` in favor of `RuntimeSchedulerCallInvoker`. This change should be transparent when not invoking JS callbacks using priorities, as both of them would just go directly to the scheduler using `scheduleWork`, but when priorities are specified, they'd now be honored in `RuntimeSchedulerCallInvoker`.
I realized this wasn't being used when I saw that `PerformanceObserver` callbacks were always scheduled with the highest priority, instead of with idle priority as specified in code.
Reviewed By: sammy-SC
Differential Revision: D59679512
fbshipit-source-id: 51d36d56ef1ff0b34e5157ed7b5e08de0a3884d2
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45408
Changelog: [General][Fixed] Fixed prioritization of idle priority tasks
We recently found out that idle priority tasks were never scheduled with the lowest priority possible. We didn't realize before because idle priority tasks weren't used, but now they are via `requestIdleCallback` and other mechanisms.
The problem was that the timeout for idle priority tasks was `std::chrono:milliseconds::max()`, and we compute the expiration time adding that to the current time. Doing that operation is always guaranteed to overflow, and the resulting expiration time was always in the past, resulting in the task having higher priority than any other tasks with any other priorities.
Instead of using `max()` we can just use a sensible value for idle priorities. In this case, 5 minutes should be more than enough.
Reviewed By: sammy-SC
Differential Revision: D59679513
fbshipit-source-id: 6c0f9e275818737ce804f05615c01f7ea6c126ab