Skip to content

Commit 84ffb9c

Browse files
committed
Merge branch 'main' into add-event-count-property
2 parents 618ef02 + 0e65df9 commit 84ffb9c

4,197 files changed

Lines changed: 320118 additions & 145197 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ packages/*/dist
1313
packages/*/types_generated
1414
packages/debugger-frontend/dist/**/*
1515
packages/react-native-codegen/lib
16+
private/react-native-codegen-typescript-test/lib/**/*
1617
**/Pods/*
1718
**/*.macos.js
1819
**/*.windows.js
20+
**/__fixtures__/**

.eslintrc.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ module.exports = {
3535
// Flow handles these checks for us, so they aren't required
3636
'no-undef': 'off',
3737
'no-unreachable': 'off',
38+
// Throwing from function or rejecting promises with non-error values could result in unclear error stack traces and lead to harder debugging
39+
'prefer-promise-reject-errors': 'error',
40+
'no-throw-literal': 'error',
3841
},
3942
},
4043
{
@@ -95,7 +98,7 @@ module.exports = {
9598
'**/__fixtures__/**/*.js',
9699
'**/__mocks__/**/*.js',
97100
'**/__tests__/**/*.js',
98-
'packages/react-native/jest/**/*.js',
101+
'packages/jest-preset/jest/**/*.js',
99102
'packages/rn-tester/**/*.js',
100103
],
101104
globals: {

.flowconfig

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
; Ignore the codegen e2e tests
99
<PROJECT_ROOT>/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeEnumTurboModule.js
1010

11-
; Ignore the Dangerfile
12-
<PROJECT_ROOT>/private/react-native-bots/dangerfile.js
13-
1411
; Ignore "BUCK" generated dirs
1512
<PROJECT_ROOT>/\.buckd/
1613

@@ -51,6 +48,8 @@ experimental.pattern_matching=true
5148
casting_syntax=both
5249
component_syntax=true
5350

51+
check_is_status=true
52+
5453
emoji=true
5554

5655
exact_by_default=true
@@ -69,14 +68,12 @@ munge_underscores=true
6968
module.name_mapper='^react-native$' -> '<PROJECT_ROOT>/packages/react-native/index.js'
7069
module.name_mapper='^react-native/\(.*\)$' -> '<PROJECT_ROOT>/packages/react-native/\1'
7170
module.name_mapper='^@react-native/dev-middleware$' -> '<PROJECT_ROOT>/packages/dev-middleware'
72-
module.name_mapper='^@?[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\|xml\)$' -> '<PROJECT_ROOT>/packages/react-native/Libraries/Image/RelativeImageStub'
71+
module.name_mapper='^@?[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\|xml\|ktx\|heic\|heif\)$' -> '<PROJECT_ROOT>/packages/react-native/Libraries/Image/RelativeImageStub'
7372

7473
module.system.haste.module_ref_prefix=m#
7574

7675
react.runtime=automatic
7776

78-
suppress_type=$FlowFixMe
79-
8077
ban_spread_key_props=true
8178

8279
[lints]
@@ -100,4 +97,4 @@ untyped-import
10097
untyped-type-import
10198

10299
[version]
103-
^0.279.0
100+
^0.307.1

.github/actions/build-android/action.yml

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,19 @@ runs:
1616
uses: ./.github/actions/setup-node
1717
- name: Install node dependencies
1818
uses: ./.github/actions/yarn-install
19+
- name: Read current RNVersion
20+
shell: bash
21+
id: read-rn-version
22+
run: |
23+
echo "rn-version=$(jq -r '.version' packages/react-native/package.json)" >> $GITHUB_OUTPUT
1924
- name: Set React Native Version
25+
# We don't want to set the version for stable branches, because this has been
26+
# already set from the 'create release' commits on the release branch.
27+
# For testing RC.0, though, the version has not been set yet. In that case, we are on Stable branch and
28+
# it is the only case when the version is still 1000.0.0
29+
# We also skip this when the PR targets a stable branch (github.base_ref ends with '-stable'),
30+
# since the version is already set on the stable branch.
31+
if: ${{ !endsWith(github.ref_name, '-stable') && !endsWith(github.base_ref || '', '-stable') || endsWith(github.ref_name, '-stable') && steps.read-rn-version.outputs.rn-version == '1000.0.0' }}
2032
shell: bash
2133
run: node ./scripts/releases/set-rn-artifacts-version.js --build-type ${{ inputs.release-type }}
2234
- name: Setup gradle
@@ -25,7 +37,7 @@ runs:
2537
cache-read-only: "false"
2638
cache-encryption-key: ${{ inputs.gradle-cache-encryption-key }}
2739
- name: Restore Android ccache
28-
uses: actions/cache/restore@v4
40+
uses: actions/cache/restore@v5
2941
with:
3042
path: /github/home/.cache/ccache
3143
key: v2-ccache-android-${{ github.job }}-${{ github.ref }}-${{ hashFiles('packages/react-native/ReactAndroid/**/*.cpp', 'packages/react-native/ReactAndroid/**/*.h', 'packages/react-native/ReactCommon/**/*.cpp', 'packages/react-native/ReactAndroid/**/CMakeLists.txt', 'packages/react-native/ReactCommon/**/CMakeLists.txt') }}
@@ -42,33 +54,36 @@ runs:
4254
if [[ "${{ inputs.release-type }}" == "dry-run" ]]; then
4355
# dry-run: we only build ARM64 to save time/resources. For release/nightlies the default is to build all archs.
4456
export ORG_GRADLE_PROJECT_reactNativeArchitectures="arm64-v8a,x86" # x86 is required for E2E testing
57+
export HERMES_PREBUILT_FLAG="ORG_GRADLE_PROJECT_react.internal.useHermesNightly=true"
4558
TASKS="publishAllToMavenTempLocal build"
4659
elif [[ "${{ inputs.release-type }}" == "nightly" ]]; then
4760
# nightly: we set isSnapshot to true so artifacts are sent to the right repository on Maven Central.
4861
export ORG_GRADLE_PROJECT_isSnapshot="true"
62+
export HERMES_PREBUILT_FLAG="ORG_GRADLE_PROJECT_react.internal.useHermesNightly=true"
4963
TASKS="publishAllToMavenTempLocal publishAndroidToSonatype build"
5064
else
5165
# release: we want to build all archs (default)
66+
export HERMES_PREBUILT_FLAG="ORG_GRADLE_PROJECT_react.internal.useHermesStable=true"
5267
TASKS="publishAllToMavenTempLocal publishAndroidToSonatype build"
5368
fi
54-
./gradlew $TASKS -PenableWarningsAsErrors=true
69+
env "$HERMES_PREBUILT_FLAG" ./gradlew $TASKS -PenableWarningsAsErrors=true
5570
- name: Save Android ccache
5671
if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, '-stable') }}
57-
uses: actions/cache/save@v4
72+
uses: actions/cache/save@v5
5873
with:
5974
path: /github/home/.cache/ccache
6075
key: v2-ccache-android-${{ github.job }}-${{ github.ref }}-${{ hashFiles('packages/react-native/ReactAndroid/**/*.cpp', 'packages/react-native/ReactAndroid/**/*.h', 'packages/react-native/ReactCommon/**/*.cpp', 'packages/react-native/ReactAndroid/**/CMakeLists.txt', 'packages/react-native/ReactCommon/**/CMakeLists.txt') }}
6176
- name: Show ccache stats
6277
shell: bash
6378
run: ccache -s -v
6479
- name: Upload Maven Artifacts
65-
uses: actions/upload-artifact@v4.3.4
80+
uses: actions/upload-artifact@v6
6681
with:
6782
name: maven-local
6883
path: /tmp/maven-local
6984
- name: Upload test results
7085
if: ${{ always() }}
71-
uses: actions/upload-artifact@v4.3.4
86+
uses: actions/upload-artifact@v6
7287
with:
7388
name: build-android-results
7489
compression-level: 1
@@ -78,14 +93,14 @@ runs:
7893
packages/react-native/ReactAndroid/build/reports
7994
- name: Upload RNTester APK - hermes-debug
8095
if: ${{ always() }}
81-
uses: actions/upload-artifact@v4.3.4
96+
uses: actions/upload-artifact@v6
8297
with:
8398
name: rntester-debug
8499
path: packages/rn-tester/android/app/build/outputs/apk/debug/
85100
compression-level: 0
86101
- name: Upload RNTester APK - hermes-release
87102
if: ${{ always() }}
88-
uses: actions/upload-artifact@v4.3.4
103+
uses: actions/upload-artifact@v6
89104
with:
90105
name: rntester-release
91106
path: packages/rn-tester/android/app/build/outputs/apk/release/

.github/actions/build-apple-slices-hermes/action.yml

Lines changed: 0 additions & 103 deletions
This file was deleted.
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: Build Fantom Runner
2+
inputs:
3+
release-type:
4+
required: true
5+
description: The type of release we are building. It could be nightly, release or dry-run
6+
gradle-cache-encryption-key:
7+
description: "The encryption key needed to store the Gradle Configuration cache"
8+
9+
runs:
10+
using: composite
11+
steps:
12+
- name: Install dependencies
13+
shell: bash
14+
run: |
15+
sudo apt update
16+
sudo apt install -y git cmake openssl libssl-dev clang
17+
- name: Setup git safe folders
18+
shell: bash
19+
run: git config --global --add safe.directory '*'
20+
- name: Setup node.js
21+
uses: ./.github/actions/setup-node
22+
- name: Install node dependencies
23+
uses: ./.github/actions/yarn-install
24+
- name: Setup gradle
25+
uses: ./.github/actions/setup-gradle
26+
with:
27+
cache-read-only: "false"
28+
cache-encryption-key: ${{ inputs.gradle-cache-encryption-key }}
29+
- name: Restore Fantom ccache
30+
uses: actions/cache/restore@v5
31+
with:
32+
path: /github/home/.cache/ccache
33+
key: v2-ccache-fantom-${{ github.job }}-${{ github.ref }}-${{ hashFiles(
34+
'packages/react-native/ReactAndroid/**/*.cpp',
35+
'packages/react-native/ReactAndroid/**/*.h',
36+
'packages/react-native/ReactAndroid/**/CMakeLists.txt',
37+
'packages/react-native/ReactCommon/**/*.cpp',
38+
'packages/react-native/ReactCommon/**/*.h',
39+
'packages/react-native/ReactCommon/**/CMakeLists.txt',
40+
'private/react-native-fantom/tester/**/*.cpp',
41+
'private/react-native-fantom/tester/**/*.h',
42+
'private/react-native-fantom/tester/**/CMakeLists.txt'
43+
) }}
44+
restore-keys: |
45+
v2-ccache-fantom-${{ github.job }}-${{ github.ref }}-
46+
v2-ccache-fantom-${{ github.job }}-
47+
v2-ccache-fantom-
48+
- name: Show ccache stats (before)
49+
shell: bash
50+
run: ccache -s -v
51+
- name: Build Fantom Runner
52+
shell: bash
53+
run: yarn workspace @react-native/fantom build
54+
env:
55+
CC: clang
56+
CXX: clang++
57+
- name: Save Fantom ccache
58+
if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, '-stable') }}
59+
uses: actions/cache/save@v5
60+
with:
61+
path: /github/home/.cache/ccache
62+
key: v2-ccache-fantom-${{ github.job }}-${{ github.ref }}-${{ hashFiles(
63+
'packages/react-native/ReactAndroid/**/*.cpp',
64+
'packages/react-native/ReactAndroid/**/*.h',
65+
'packages/react-native/ReactAndroid/**/CMakeLists.txt',
66+
'packages/react-native/ReactCommon/**/*.cpp',
67+
'packages/react-native/ReactCommon/**/*.h',
68+
'packages/react-native/ReactCommon/**/CMakeLists.txt',
69+
'private/react-native-fantom/tester/**/*.cpp',
70+
'private/react-native-fantom/tester/**/*.h',
71+
'private/react-native-fantom/tester/**/CMakeLists.txt'
72+
) }}
73+
- name: Show ccache stats (after)
74+
shell: bash
75+
run: ccache -s -v
76+
- name: Copy shared libraries
77+
shell: bash
78+
run: cp packages/react-native/ReactAndroid/hermes-engine/build/hermes/lib/libhermesvm.so private/react-native-fantom/build/tester/
79+
- name: Upload Fantom Runner binary
80+
uses: actions/upload-artifact@v6
81+
with:
82+
name: fantom-runner-binary
83+
compression-level: 1
84+
path: private/react-native-fantom/build/tester/

0 commit comments

Comments
 (0)