Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54729
Changelog: [Internal]
- Created new build-fantom-runner action to compile the Fantom runner binary
- Modified run-fantom-tests action to download and use pre-built binary
- Updated test-all.yml workflow to run build and test as separate jobs
- Removed build dependencies and ccache configuration from test job
Reviewed By: cortinico
Differential Revision: D88012198
fbshipit-source-id: cd1c91b18cccc3c62b9edbcbeb131e80551369f1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55867
Changelog: [Internal]
The build_android workflow was incorrectly using for dry-run
builds on stable branches (e.g., 0.85-stable), causing it to append suffix
to the Hermes version. This resulted in trying to fetch non-existent SNAPSHOT artifacts
like in https://github.com/facebook/react-native/actions/runs/22592250332/job/65471130298.
This fix adds a check to detect stable branches (via github.ref_name or github.base_ref)
and uses instead, which fetches the stable Hermes release from
Maven Central without the -SNAPSHOT suffix.
We check both github.ref_name and github.base_ref to cover two scenarios:
* ref_name: Direct pushes to stable branches (e.g. pushing to 0.85-stable)
* base_ref: Pull requests targeting stable branches (e.g. cherry-pick PRs where the source branch isn't named -stable but the target is)
Reviewed By: cipolleschi
Differential Revision: D95022571
fbshipit-source-id: d5888a00b29c9b5a22328fa794070c317671db2b
Summary:
When a PR targets a `-stable` branch, `github.ref_name` is the PR branch (not ending in `-stable`), so the version script was incorrectly running. Added a check for `github.base_ref` to also skip the script when the PR target branch is a stable branch.
## Changelog:
[Internal] - Skip set-rn-artifacts-version for PRs targeting stable branches
Pull Request resolved: https://github.com/facebook/react-native/pull/55809
Test Plan: CI should pass without running the artifacts version script on PRs targeting stable branches.
Reviewed By: cortinico
Differential Revision: D94678295
Pulled By: cipolleschi
fbshipit-source-id: 5809ec710c191075f1bc1528ecff95f8bd745257
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55341
Changelog:
[INTERNAL] [CHANGED] - Add api-changes.yml workflow to replace danger-pr for detecting changes in the js api
The workflow:
- Triggers on `pull_request_target` for opened, edited, reopened, and synchronize events
- Checks out the main branch (for security, using trusted code)
- Runs the `diff-js-api-changes` action to detect API changes
- Posts a PR comment using the generic `post-pr-comment` action
The PR comment script creates, updates, or deletes a bot comment based on whether
there are any sections to report, using a marker to identify existing bot comments.
Reviewed By: huntie
Differential Revision: D90991845
fbshipit-source-id: 753475a7c24df8bc581b2ab47bfad1f5551c823c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55427
Following previous diffs, this now promotes the `lint` action to direct job steps.
**Motivation**
This has the advantage of making sub-steps in the GitHub UI visible, rather than running the 7 lint steps under a single banner.
I feel this is justified in the case of `lint`, although increasing the size of `.github/workflowsl/test-all.yml` slightly, because:
- Each step in this job is a distinct tool run with differing output, rather than one logical "action" — and this grouped output is therefore useful to the user.
- Lint failures are reasonably frequent for users, emphasising the above.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D92417807
fbshipit-source-id: ed24cfa2e581a528e80faec4128d280926f56613
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55425
See blame — this script lints for a `"PATENTS"` string inside any Git changes, which should not occur any more.
> D7119356 (8 years ago)
>
> [react-native][PR] Check PATENTS does not creep into files
>
> Summary:
> Some files have crept into the repo with the old license header. These are usually from PRs that were opened prior to the re-licensing of the project.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D92417808
fbshipit-source-id: 36e3507f835fe5df99644eb1a47cdc60fa68f88c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55421
Deletes the largely unused `analyze_code`/`code-analysis-bot` script, which was part of our earlier CircleCI infra.
**Motivation**
- **Security**: Removes another use of a `GITHUB_TOKEN` env var being loaded into a script in our CI (similar to S603729).
- **Cleanup**: This script attempted to read various lint job results (including google-java-format, which is no longer present), and post a GitHub PR comment for >5 issues. In a GitHub Actions world, we don't really need this functionality.
**Other changes**
- The `yarn shellcheck` run from this script was load bearing, and is moved directly into the `lint` action.
Changelog: [Internal]
Reviewed By: cipolleschi
Differential Revision: D92407627
fbshipit-source-id: ef5664a273ad4aac721dbb53de73f2b96b47d75b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55420
After https://github.com/facebook/react-native/pull/54857 (use of the "publishConfig" field), this check is no longer necessary, since `yarn build` will no longer make changes to any checked in files.
In the (expectedly) rare case that `yarn build --prepack` changes are committed (only intended for CI), Flow will also fail independently.
Changelog: [Internal]
Reviewed By: cipolleschi
Differential Revision: D92397786
fbshipit-source-id: 872cc91b62295cdb6d8c2799cffb8a4cadc4106e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55245
Changelog: [INTERNAL] [FIXED] - Fix diff-js-api-changes workflow to correctly compare PR head vs merge base
The `diff-js-api-changes` action was comparing main to main instead of comparing the PR head to the point of main it branched from.
The workflow now:
1. Checks out main in `danger-pr.yml` to get the trusted scripts
2. Fetches the PR head commit and computes the merge base (the point it branched from main)
3. Extracts the API snapshots from both refs using `git show` to read-only temp files
4. Runs main's diff script to compare the two snapshots
**Security notes:**
- `git fetch` only downloads git objects, it does not modify the working directory
- `git show <sha>:path` extracts a file as read-only data, not executable code
- All executed scripts come from main (trusted), PR content is only used as data
- The PR's `.d.ts` file is written to a temp directory and passed as input to main's diff script
Reviewed By: huntie
Differential Revision: D90978905
fbshipit-source-id: fc9b420a27c84f1812b436f41d3169fad4f91291
Summary:
Fixes a typo on the step name of `maestro-ios` gh action:
From `Set up JDK 11` -? `Set up JDK 17`
to match the actual version and be in sync with the rest of the other actions (e.g. maestro-android)
## Changelog:
<!-- Help reviewers and the release process by writing your own changelog entry.
Pick one each for the category and type tags:
[GENERAL] [FIXED] - typo on maestro ios gh action for jdk step
For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
Pull Request resolved: https://github.com/facebook/react-native/pull/55167
Test Plan: No testing required
Reviewed By: cipolleschi
Differential Revision: D90688156
Pulled By: cortinico
fbshipit-source-id: d2f4ff27bd6cee18c5931ff81df5f965ddf6d01b
Summary:
When setting up Xcode, we also download the SDKs that is needed.
There might be cases where we can save money and time and skip the download
## Changelog:
[Internal] -
Pull Request resolved: https://github.com/facebook/react-native/pull/55147
Test Plan: GHA
Reviewed By: javache
Differential Revision: D90594740
Pulled By: cipolleschi
fbshipit-source-id: 2923d891d626dfbb8446641d37b4b3f896c1daf2
Summary:
This is a pick of 4cac35f7d0 inside `main`.
The commit is already on the `0.84-stable` branch.
The reasoning here is that `cat` + `jq` failed to run with:
```
Run echo "rn-version=$(cat packages/react-native/package.json | jq -r 'version')" >> $GITHUB_OUTPUT
echo "rn-version=$(cat packages/react-native/package.json | jq -r 'version')" >> $GITHUB_OUTPUT
shell: bash --noprofile --norc -e -o pipefail {0}
jq: error: version/0 is not defined at <top-level>, line 1:
version
jq: 1 compile error
```
I'm moving to a single `jq` invocation as it's more resilient.
## Changelog:
[INTERNAL] -
Pull Request resolved: https://github.com/facebook/react-native/pull/55057
Test Plan: N/A
Reviewed By: fabriziocucci, alanleedev
Differential Revision: D90189240
Pulled By: cortinico
fbshipit-source-id: 9b1cd6ad6d37913f8a468892cedce5f808c8c33e
Summary:
This is a cherry-pick of dc90b0b7f3 on main from 0.83 and 0.84
## Changelog:
[INTERNAL] -
Pull Request resolved: https://github.com/facebook/react-native/pull/55054
Test Plan: CI
Reviewed By: cipolleschi
Differential Revision: D90174387
Pulled By: cortinico
fbshipit-source-id: 74b0ec3b853f2654ce140b9af27f13fe22c81f4a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54865
Removes introduced in D88654826, replaced with a `git fetch` with `--depth`.
This should fix CI runs on `main` (where we believe the extra checkout is clobbering the `yarn-install` step), and improve execution time.
Also shorten action name.
Changelog: [Internal]
Reviewed By: cipolleschi
Differential Revision: D89044330
fbshipit-source-id: 690eb5c7db9490e5f160e933d64eae6ac21464c8
Summary:
Updates the `diff-js-api-breaking-changes` action to compare the PR's changes against the merge base (where the branch diverged from main) instead of the current tip of main.
### Problem
The previous implementation compared the current state of `main` to the PR head. This could produce false positive results when main had new commits to reactNativeApi.d.ts reporting breaking changes from main as if they were introduced by the PR.
### Solution
- Calculate the merge base between the PR head and `origin/main`
- Compare the API snapshot at the merge base to the snapshot at the PR head
## Changelog:
[GENERAL] [FIXED] - Updates the `diff-js-api-breaking-changes` action to compare the PR's changes against the merge base (where the branch diverged from main) instead of the current tip of main.
Pull Request resolved: https://github.com/facebook/react-native/pull/54819
Test Plan:
(outputs shown for https://github.com/facebook/react-native/pull/54815)
Tested locally on branch that previously got false positive:
Mirror old approach:
```
mkdir -p /tmp/api-diff-old
git show origin/main:packages/react-native/ReactNativeApi.d.ts > /tmp/api-diff-old/before.d.ts
git show HEAD:packages/react-native/ReactNativeApi.d.ts > /tmp/api-diff-old/after.d.ts
node ./scripts/js-api/diff-api-snapshot /tmp/api-diff-old/before.d.ts /tmp/api-diff-old/after.d.ts
```
output:
```
{
"result": "BREAKING",
"changedApis": [
"ActivityIndicatorProps",
"Animated",
"DrawerLayoutAndroidProps",
"FlatList",
"FlatListProps",
"ImageBackground",
"ImageBackgroundProps",
"ImageProps",
"ImagePropsBase",
"KeyDownEvent",
"KeyEvent",
"KeyUpEvent",
"KeyboardAvoidingView",
"KeyboardAvoidingViewProps",
"ModalProps",
"PressableProps",
"ProgressBarAndroidProps",
"RefreshControl",
"RefreshControlProps",
"ScrollViewProps",
"SectionList",
"SectionListProps",
"SwitchProps",
"TextInputProps",
"ViewProps",
"VirtualizedListProps",
"VirtualizedSectionListProps"
]
}
```
Mirror new approach:
```
git fetch origin main
MERGE_BASE=$(git merge-base HEAD origin/main)
echo "Merge base: $MERGE_BASE"
mkdir -p /tmp/api-diff
git show $MERGE_BASE:packages/react-native/ReactNativeApi.d.ts > /tmp/api-diff/before.d.ts
git show HEAD:packages/react-native/ReactNativeApi.d.ts > /tmp/api-diff/after.d.ts
node ./scripts/js-api/diff-api-snapshot /tmp/api-diff/before.d.ts /tmp/api-diff/after.d.ts
```
output:
```
{
"result": "NON_BREAKING",
"changedApis": []
}
```
Reviewed By: huntie
Differential Revision: D88654826
Pulled By: emily8rown
fbshipit-source-id: 5dc2e295d7d527899b5cb6a643c4878aeebf7f0b
Summary:
Adds a new action that will run every day after the nightly build is published. This action will set up a blank app from the template, enable Hermes V1, and run a simple E2E test on Android and iOS in both Debug and Release configurations.
## Changelog:
[INTERNAL] [ADDED] - Added basic E2E tests for Hermes V1
Pull Request resolved: https://github.com/facebook/react-native/pull/54576
Test Plan: I haven't tested the changes since they require larger action runners, but the changes are additive and don't impact existing infra (besides adding an optional parameter).
Reviewed By: cortinico
Differential Revision: D87331639
Pulled By: j-piasecki
fbshipit-source-id: 8d26cb7df66f2588b49f86f01ff0b623501e7f2b
Summary:
After moving to SwiftPM, we stopped testing the build from source using Cocoapods and dynamic frameworks. Given that the migration will take some more time, this change reintroduces a job to keep the build from source using dynamic frameworks in check
## Changelog:
[Internal] -
Pull Request resolved: https://github.com/facebook/react-native/pull/54482
Test Plan: GHA
Reviewed By: javache
Differential Revision: D86760336
Pulled By: cipolleschi
fbshipit-source-id: c131af44209de40f2ee7f7d08fa61d88aa48d3ee
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53837
Changelog: [Internal]
Replaces usage of Hermes built inside the React Native repository with the release published from the Hermes repo.
Reviewed By: cipolleschi
Differential Revision: D82721725
fbshipit-source-id: 357d5e2b914675ec6e60f810c382a945aa461732
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53817
What is currently happening, is that the various commits on the release branches like `0.82-stable` are resetting the version of native artifacts to `1000.0.0-<SHA>`.
The reason is that during the `test-all` workflow, we pass the `dry-run` as release type.
That's to prevent the various tools from calling `npm publish` and so on.
The problem is that on the releases branches, the version was already set at branch cut time.
Therefore, we see the version 1000.0.0 reappearing during Android E2E test in the emulator. Similary this is also affecting iOS prebuilds so I'm attempting to fix it here.
Changelog:
[Internal] [Changed] -
Reviewed By: huntie
Differential Revision: D82553599
fbshipit-source-id: 31a52e7df036e700663b3d3dd677973a7a210a30
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53280
I've moved a lot of the nightly testing infrastructure on a RNC repo here:
https://github.com/react-native-community/nightly-tests/
This allows us to iterate faster without having to wait for diffs to be
imported and test inside fbsource.
Changelog:
[Internal] [Changed] -
Reviewed By: cipolleschi
Differential Revision: D80262856
fbshipit-source-id: dc2dfe75901ac78ec9f6e940540102276d34acdf
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53177
This action is used only when running tests for RNTester. Now that we are using prebuilds, this is a liability, because Cocoapods and Xcode would not update the binary if a new one is provided.
With prebuild, this caching does not provide a lot of benefits, so we can remove it.
## Changelog
[Internal] -
Reviewed By: cortinico
Differential Revision: D79893870
fbshipit-source-id: 0773f910f418cf9ebd5d557d563160993084e83a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52225
## Changelog:
[Internal] - Fantom in RN CLI
This diff prepares the RN CI to build and run Fantom Tests
Reviewed By: cortinico
Differential Revision: D70097944
fbshipit-source-id: 163cb3f5204f7e5491f94f2fbebe11b514919cdf
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52711
The ccache cache is not really working. That's because we don't have a way to
properly compute the cache.
I'm adding has `hashFiles` to collect all the C++ and CMake files that are used
by ccache to fix this.
Changelog:
[Internal] [Changed] -
Reviewed By: cipolleschi
Differential Revision: D78560946
fbshipit-source-id: 8d521d01386b62d3cfbd485f8e6fcf5f66eba71b
Summary:
I've noticed that test_js (20) and test_js (24) are actually running on Node 22.
That's because the `yarn-install` action is invoking setup-node again with the default value (22).
This changes it. Also I'm cleaning up the workflows so that every `yarn-install` invocation is happening just after the `setup-node` invocation.
## Changelog:
[INTERNAL] -
Pull Request resolved: https://github.com/facebook/react-native/pull/52737
Test Plan: CI which will most likely be red for test_js (20) so will need a follow-up
Reviewed By: cipolleschi
Differential Revision: D78664671
Pulled By: cortinico
fbshipit-source-id: c73390930d1511d1bf0f2d4ea92e83f50b10247f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52197
This Diff enables E2E tests to run on every PR.
We estimated that, now that we removed JSC and the legacy arch, the cost of running E2E tests on each PR should not be that high.
## Changelog:
[Internal] - Run E2E tests on each PR
Reviewed By: cortinico
Differential Revision: D77148473
fbshipit-source-id: 68191ff81c197d4c4ff9d6e71a41b7253971ddfb
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52562
This change use the prebuilds we build in CI i other iOS jobs to speed-up the iOS CI
## Changelog:
[Internal] -
Reviewed By: cortinico
Differential Revision: D78159367
fbshipit-source-id: 64486c99fdbc54487dbcff786209cacac304b9b7
Summary:
This PR connects breaking change detection with a danger bot. The action takes snapshot from main branch and from the PR as inputs to`diff-api-snapshot` (saved in runner temp directory).
## Changelog:
[Internal]
For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
Pull Request resolved: https://github.com/facebook/react-native/pull/52045
Reviewed By: huntie
Differential Revision: D76735630
Pulled By: coado
fbshipit-source-id: 9208117340c1e0bf10d58b67892727717d22e62f
Summary:
Following up from https://github.com/facebook/react-native/pull/52064#discussion_r2151906096, this PR removes lint-java and its related files.
The codebase is moving entirely to Kotlin and a Kotlin linter is being setup as well, the usage of the Java linter will become unnecessary.
## Changelog:
[INTERNAL] - Remove lint-java
Pull Request resolved: https://github.com/facebook/react-native/pull/52092
Test Plan: Relying on CI here to be green.
Reviewed By: cortinico
Differential Revision: D76880712
Pulled By: sbuggay
fbshipit-source-id: 2736772e7347f435b17d007e0322e1afc2fb2d7b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51923
This diff publishes the Reactcore prebuilds to Maven central so that apps can use it when integrating with React Native
## Changelog:
[Internal] -
Reviewed By: cortinico
Differential Revision: D76338793
fbshipit-source-id: 777c91805573b90ef15209e196cd66801908a5ce
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/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/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