Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36217
## Bump minimum Node JS version to 16 via `react-native/package.json#engines`
In https://github.com/facebook/react-native/pull/35443 we stopped running CI in Node 14 - this follows up by formally making Node 16 the minimum supported version ahead of the 0.72 cut.
Node 14 [ends maintenance releases in April](https://github.com/nodejs/release#release-schedule), and bumping this minimum will allow other associated Node JS tools (CLI, Metro, Jest) to reduce their support burden.
## Insert `engines` into `template/package.json`
The constraint at `react-native/package.json#engines` ensures the minimum at install/init time, with package managers providing an actionable error or warning if the constraint is not met. However, it doesn't help guide users to a supported version if on an existing project they run (e.g.) `yarn start`.
Adding a constraint to the template helps prevent accidental use of an older version, as well as providing a clear reference for the current minimum.
Insertion of `engines` below existing `package.json` fields is consistent with [`sort-package-json`](https://github.com/keithamus/sort-package-json/blob/main/defaultRules.md) and [`prettier-package-json`](https://github.com/cameronhunter/prettier-package-json/blob/main/src/defaultOptions.ts) - and keeps it out of the way of fields RN developers are likely to be more concerned about.
## Docs PR
https://github.com/facebook/react-native-website/pull/3580
## Changelog:
[General][Breaking] Bump minimum Node JS version to 16
Reviewed By: jacdebug
Differential Revision: D43436883
fbshipit-source-id: 0b369487fe44fe777e6fedc2299973a5fddd06b2
Summary:
This updates all the package usages after the recent bump on main.
## Changelog
[INTERNAL] - Update all package usage on main after a bump
Pull Request resolved: https://github.com/facebook/react-native/pull/36200
Test Plan: Relying on CI
Reviewed By: hoxyq
Differential Revision: D43397084
Pulled By: cortinico
fbshipit-source-id: 06a13772a627f812d7d39931f32071fa3eaa59f9
Summary:
We do have a lot of changes on `main` to ship to nightlies. This change bump all the packages with pending changes.
## Changelog
[INTERNAL] [CHANGED] - [ci][monorepo] bump package versions
Pull Request resolved: https://github.com/facebook/react-native/pull/36184
Test Plan: Will rely on CI run.
Reviewed By: hoxyq
Differential Revision: D43363981
Pulled By: cortinico
fbshipit-source-id: eba5152dbe007eb3fad43f9088d145b3741fd94e
Summary:
This page is not up to date anymore:
https://reactnative.dev/contributing/how-to-build-from-source
I'm pushing those changes to make it easier to consume our build when building from source.
I'll update the page those change lands.
## Changelog
[Internal] [Changed] - Make it easier for users to build from source if needed
Pull Request resolved: https://github.com/facebook/react-native/pull/36165
Test Plan: If the CI is green, we should be good to merge this
Reviewed By: cipolleschi
Differential Revision: D43303867
Pulled By: cortinico
fbshipit-source-id: c0080b06cbcbf872ee92fcfa82a9f823d5b247f4
Summary:
This diff upgrade dependencies to `react-devtools-core` to 4.27.2, which includes changes I need to unblock trace update highlights.
- Update package.json file for dependencies in all existing deps with latest version (4.26.1): https://fburl.com/code/litgze0m
- Run `yarn` under `xplat/js` and `xplat/js/public`
Changelog:
[General][Internal] - Upgrade react-devtools-core to 4.27.2
Reviewed By: javache
Differential Revision: D43176345
fbshipit-source-id: 8bd5a9eca286bbfbb1630cb92c15f9653fa3534a
Summary:
the current jsc-android is still built based on ndk r21, and react-native is now built based on ndk r23. the unwinder between r21 and r23 is incompatible (libgcc vs libunwind). if there's exceptions throwing from jsc, other react native libraries cannot catch these exceptions and cause runtime crash.
this pr updates jsc-android to 235231.0.0 which is the same webkitgtk version as 235230.2.1 but only built by ndk r23. the jsc-android pr is from https://github.com/react-native-community/jsc-android-buildscripts/pull/179. note that the jsc is based on ndk r23c and react-native is based on ndk r23b. the reason is that i cannot get jsc building successfully on r23b. hopefully r23b and r23c are abi safe.
there is another crash from libjscexecutor when testing the new jsc-android. to fix the issue, i have to explicitly link libunwind.a from libjscexecutor.so. supposedly ndk r23 should help to link libunwind under the hood, i still not figure out why it doesn't. but after linking libunwind.a, i can get new jsc-android work successfully.
```
E/art ( 2669): dlopen("/data/app/com.test-1/lib/x86_64/libjscexecutor.so", RTLD_LAZY) failed: dlopen failed: cannot locate symbol "_Unwind_Resume" referenced by "/data/app/com.test-1/lib/x86_64/libjscexecutor.so"...
W/System.err( 2669): java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "_Unwind_Resume" referenced by "/data/app/com.test-1/lib/x86_64/libjscexecutor.so"...
W/System.err( 2669): at java.lang.Runtime.load(Runtime.java:331)
W/System.err( 2669): at java.lang.System.load(System.java:982)
W/System.err( 2669): at com.facebook.soloader.SoLoader$1.load(SoLoader.java:558)
W/System.err( 2669): at com.facebook.soloader.DirectorySoSource.loadLibraryFrom(DirectorySoSource.java:110)
W/System.err( 2669): at com.facebook.soloader.DirectorySoSource.loadLibrary(DirectorySoSource.java:63)
W/System.err( 2669): at com.facebook.soloader.ApplicationSoSource.loadLibrary(ApplicationSoSource.java:91)
W/System.err( 2669): at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:1067)
W/System.err( 2669): at com.facebook.soloader.SoLoader.loadLibraryBySoNameImpl(SoLoader.java:943)
W/System.err( 2669): at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:855)
W/System.err( 2669): at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:802)
W/System.err( 2669): at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:772)
W/System.err( 2669): at com.facebook.react.jscexecutor.JSCExecutor.loadLibrary(JSCExecutor.java:24)
W/System.err( 2669): at com.facebook.react.jscexecutor.JSCExecutor.<clinit>(JSCExecutor.java:20)
W/System.err( 2669): at com.facebook.react.ReactInstanceManagerBuilder.getDefaultJSExecutorFactory(ReactInstanceManagerBuilder.java:363)
W/System.err( 2669): at com.facebook.react.ReactInstanceManagerBuilder.build(ReactInstanceManagerBuilder.java:316)
W/System.err( 2669): at com.facebook.react.ReactNativeHost.createReactInstanceManager(ReactNativeHost.java:94)
W/System.err( 2669): at com.facebook.react.ReactNativeHost.getReactInstanceManager(ReactNativeHost.java:41)
W/System.err( 2669): at com.test.MainApplication.onCreate(MainApplication.java:60)
W/System.err( 2669): at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1011)
W/System.err( 2669): at androidx.test.runner.MonitoringInstrumentation.callApplicationOnCreate(MonitoringInstrumentation.java:483)
W/System.err( 2669): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4518)
W/System.err( 2669): at android.app.ActivityThread.access$1500(ActivityThread.java:144)
W/System.err( 2669): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1339)
W/System.err( 2669): at android.os.Handler.dispatchMessage(Handler.java:102)
W/System.err( 2669): at android.os.Looper.loop(Looper.java:135)
W/System.err( 2669): at android.app.ActivityThread.main(ActivityThread.java:5221)
W/System.err( 2669): at java.lang.reflect.Method.invoke(Native Method)
W/System.err( 2669): at java.lang.reflect.Method.invoke(Method.java:372)
W/System.err( 2669): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
W/System.err( 2669): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
```
fixes https://github.com/facebook/react-native/issues/36052
## Changelog
[ANDROID][FIXED] - Fixed jscexecutor crash on Android which is caused from NDK incompatibility
Pull Request resolved: https://github.com/facebook/react-native/pull/36062
Test Plan: tested on [jsc-android instrumented test](https://github.com/react-native-community/jsc-android-buildscripts/tree/2.26.1/test) (based on react-native 0.71.2)
Reviewed By: cipolleschi
Differential Revision: D43040295
Pulled By: cortinico
fbshipit-source-id: e0e5b8fb7faa8ee5654d4cde5f274bef4b517376
Summary:
Yesterday CircleCI was extremely flaky due to us trying to `apt install` extra packages. This mitigates one scenario where we try to redownload `jq` and `shellcheck`.
I've moved to use a container which contains those packages already
## Changelog
[INTERNAL] - Reduce flakyness by not downloading extra packages
Pull Request resolved: https://github.com/facebook/react-native/pull/36077
Test Plan: Will wait for a green CI
Reviewed By: cipolleschi
Differential Revision: D43080349
Pulled By: cortinico
fbshipit-source-id: 6527c5ad129f47d8b5f02bf207e1af67a095afa1
Summary:
This change re-applies D41745930 (2e3dbe9c2f) (and D42805202 (1479b2ac26) which was also partially reverted), re-registers additions as moves, then applies D43063551 which has been added to the changes since migration.
Changelog: [Internal]
Reviewed By: hoxyq
Differential Revision: D43068114
fbshipit-source-id: 72997700bf9962d82a988599481e255b69e68a9b
Summary:
This change reverts D41745930 (2e3dbe9c2f) as part of a stack to splice back source history which was lost (Git registered the file moves as additions).
It is expected this diff will individually fail. The entire stack should be applied at once.
Changelog: [Internal]
Reviewed By: hoxyq
Differential Revision: D43068113
fbshipit-source-id: c8398629fe5dcc1ca4bf02f550adc00c78a8487a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35857
It seems like there is an incompatibility between NDK 23 (shipped in 0.71)
and the usage of custom `CMAKE_BUILD_TYPE` we do for Hermes.
Specifically the `-DCMAKE_BUILD_TYPE=Release` we specify for the debug
variant of Hermes is partially ignored by the new Android native build toolchain.
See https://github.com/android/ndk/issues/463 for mentions on how the
toolchains requires CMake 3.20+
As AGP 7.3 defaults to use CMake 3.18 unless specified, and NDK 23 unless specified.
AGP 7.4 defaults to use CMake 3.22 unless specified, and NDK 23 unless specified.
See: https://developer.android.com/studio/releases/gradle-plugin#7-4-0
Here I'm:
1. Bumping the docker image to an image that contains the CMake 3.22
2. Updating the logic for building `react-native` & `hermes-engine` to use 3.22
3. Provide fallbacks if the user specified `CMAKE_VERSION`
Template tests will run on AGP 7.3 and will still use CMake 3.18, but I forecast
no problem there as the user is not supposed to specify custom `CMAKE_BUILD_TYPE`.
This is only a problem as we build `hermes-engine` with custom build types.
Changelog:
[Android] [Fixed] - Bump CMake to 3.22.1 to properly honor CMAKE_BUILD_TYPE
Reviewed By: cipolleschi
Differential Revision: D42544864
fbshipit-source-id: efd0f51120370fb808337c201df31d71f4ddfdbc
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35767
Changelog: [Internal]
Introducing a script, which can be used to identify all packages inside `/packages`, which contain any changes after the last time its version was changed
How it works step by step:
```
check that no git changes are present
for each package:
if package is private -> skip
grep id of the last commit that changed package
grep id of the last commit that changed version of the package
if these ids are different:
bump package patch version
commit changes if required
```
Can be executed only in git environment and by running: `node ./scripts/bump-all-updated-packages`
---
Also adding a separate script `align-package-versions.js`, which can be used to update versions of packages inside consumer packages
```
check that no git changes are present
for each package x:
for each package y:
if y has x as dependency:
validate that y uses the latest version of x
if some changes were made:
run yarn
```
---
Q: Why `run_yarn` step was removed from CircleCI flow?
A: For *-stable branches, there are no yarn workspaces and all packages are specified as direct dependencies, so if we update `react-native/assets-registry` to the next version, we won't be able to run `yarn` for react-native root package, because updated version is not yet published to npm
To avoid this, we first need publish new versions and then update them in consumer packages
---
The final flow:
1. Developer uses `node ./scripts/bump-all-updated-packages` to bump versions of all updated packages.
2. Commit created from step 1 being merged or directly pushed to `main` or `*-stable` branches
3. A workflow from CircleCI publishes all updated versions to npm
4. Developer can use `align-package-versions.js` script to create required changes to align all packages versions
Reviewed By: cortinico
Differential Revision: D42295344
fbshipit-source-id: 54b667adb3ee5f28d19ee9c7991570451549aac2
Summary:
Upgrades `react-native` to `deprecated-react-native-prop-types@4.0.0`, which depends on `react-native/normalize-colors` instead of `react-native/normalize-color` and improves compatibility with React Native 0.72.
Changelog:
[General][Changed] Upgraded to `deprecated-react-native-prop-types@4.0.0` - https://github.com/facebook/react-native-deprecated-modules/blob/main/deprecated-react-native-prop-types/CHANGELOG.md
Reviewed By: cortinico
Differential Revision: D42088315
fbshipit-source-id: d1197e9a7d70654f601b421231b66bd760098ddf
Summary:
This fixes some style errors found by dtslint, along with some test cases for StyleSheet.compose() where the recent change made it slightly too permissive when explicit return types are given. I also added runs of the TS tests to a script which runs in sandcastle so we can catch this at diff-submission time in the future.
Changelog:
[General][Fixed] - Fix Errors with TypeScript Tests
Reviewed By: lunaleaps
Differential Revision: D42085257
fbshipit-source-id: 7e6ca49d3c3aef822c61c97ecc07b55b0a949d51
Summary:
Nightlies are currently broken on main. That's because nightlies rely on packages that got
re-scoped under `react-native`. We need to publish them to NPM.
In order to do so, I'm bumping versions for the one that have changes on main so that they
can be published to NPM to unblock nightlies.
Changelog:
[Internal] [Changed] - Bump all the react-native/ packages to publish on main
Reviewed By: hoxyq
Differential Revision: D41840985
fbshipit-source-id: 45b691611e33668df0922d4ff753738a773f162c
Summary:
Small PR with bump to the new versions of CLI and Metro in preparation of the stable release for 0.71.
## Changelog
[General] [Changed] - Bump CLI to 10.0.0 and Metro to 0.73.5
Pull Request resolved: https://github.com/facebook/react-native/pull/35580
Test Plan: CI green
Reviewed By: cortinico
Differential Revision: D41800580
Pulled By: jacdebug
fbshipit-source-id: 7bf81308eb41490b004e685b1763574bfd3b27fb
Summary:
Changelog:
[General][Changed] - renamed react-native/polyfills -> react-native/js-polyfills and align with other packages versions (0.72.0) as a part of migration to monorepo
Reviewed By: motiz88
Differential Revision: D41553157
fbshipit-source-id: eef70c8e7639080acdeb6716d1a915760a85458a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35539
This file is unused now that we rely on RNGP. We should be able to remove it
in the next stable release 0.72. In 0.71 we shipped it with a removal warning,
and users should not rely on it anymore.
Changelog:
[Android] [Removed] - Remove the react.gradle file as it's unused
Reviewed By: rshest
Differential Revision: D41655709
fbshipit-source-id: 20860da5e596d35738eea5748c791d3d923dc4fb
Summary:
While working on 0.71 we noticed that we were hitting a "mock-fs not found" issue on CI, caused by the fact that the dependency was set in the wrong spot.
This PR backports to main the fix: 05646f8f38 & ceaebc6975
This is related to the black magics of repo-config, and the fact that devDeps from repo-config don't get propagated back to the root package.json when on stable branch. Because of that, this commit doesn't NOT have a yarn.lock entry (the dep is there in main).
I'm confused as to how that dep ended in the devDeps of repo config, it seems something went wrong in migrating some commits from GH to monorepo and back?
check out:
* https://github.com/facebook/react-native/pull/34580
* f0ffd2291c
## Changelog
<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[Internal] [Changed] - move mockfs to the right package.json
Pull Request resolved: https://github.com/facebook/react-native/pull/35476
Test Plan: N/A, change is transparent
Reviewed By: cortinico, cipolleschi, dmytrorykun
Differential Revision: D41530265
Pulled By: jacdebug
fbshipit-source-id: ec7a6426d9a2a766a98a3cccc339ca7ca090c3a0
Summary:
This is just a PR to realign main branch (and put it ahead) of a local change we did in 0.71: 741d102476
## Changelog
<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[General] [Changed] - Bump CLI to v10 alpha5
Pull Request resolved: https://github.com/facebook/react-native/pull/35260
Test Plan: N/A
Reviewed By: christophpurrer
Differential Revision: D41122011
Pulled By: cipolleschi
fbshipit-source-id: 8f01ed94bfd39d58b2e54cd2945fcca5bb8ebd18
Summary:
Just bumping RNGP to make the new sources avialable to the template.
Changelog:
[Internal] [Changed] - Bump RNGP to 0.71.8
Reviewed By: robhogan
Differential Revision: D40948246
fbshipit-source-id: c6a193fcdc0675be9ef7f1320d63e884b8b65daa
Summary:
Quick update (requested by cortinico) ahead of release 0.71. Note that there was not a new release of `react-native-communiity/cli-platform-ios` in f6f23cca4b.
Changelog:
[General][Changed] - Bump CLI to 10.0.0-alpha.2
Reviewed By: robhogan, cortinico
Differential Revision: D40806560
fbshipit-source-id: 5c852a204c3c2d272d0502a34221f24ce7613cb0