Skip to content

Commit dbad6af

Browse files
committed
Merge branch 'main' into feat/scene-delegate
2 parents 37cfa12 + 67381e1 commit dbad6af

3,478 files changed

Lines changed: 306116 additions & 183661 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: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ private/react-native-codegen-typescript-test/lib/**/*
1717
**/Pods/*
1818
**/*.macos.js
1919
**/*.windows.js
20+
**/__fixtures__/**

.eslintrc.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ module.exports = {
5050
files: [
5151
'./packages/react-native/Libraries/**/*.{js,flow}',
5252
'./packages/react-native/src/**/*.{js,flow}',
53-
'./packages/assets/registry.js',
53+
'./packages/assets-registry/registry.js',
5454
],
5555
parser: 'hermes-eslint',
5656
rules: {
@@ -98,7 +98,7 @@ module.exports = {
9898
'**/__fixtures__/**/*.js',
9999
'**/__mocks__/**/*.js',
100100
'**/__tests__/**/*.js',
101-
'packages/react-native/jest/**/*.js',
101+
'packages/jest-preset/jest/**/*.js',
102102
'packages/rn-tester/**/*.js',
103103
],
104104
globals: {

.flowconfig

Lines changed: 6 additions & 12 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

@@ -42,19 +39,11 @@
4239

4340
[libs]
4441
flow-typed/
45-
packages/react-native/interface.js
4642
packages/react-native/flow/
4743

4844
[options]
49-
enums=true
50-
experimental.pattern_matching=true
51-
casting_syntax=both
52-
component_syntax=true
53-
5445
emoji=true
5546

56-
exact_by_default=true
57-
5847
format.bracket_spacing=false
5948

6049
module.file_ext=.js
@@ -75,6 +64,11 @@ module.system.haste.module_ref_prefix=m#
7564

7665
react.runtime=automatic
7766

67+
experimental.deprecated_utilities.excludes=<PROJECT_ROOT>/packages/react-native/Libraries/Renderer/shims/ReactNativeTypes.js
68+
experimental.deprecated_utilities.excludes=<PROJECT_ROOT>/packages/react-native/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js
69+
experimental.deprecated_colon_extends.excludes=<PROJECT_ROOT>/packages/react-native/Libraries/Renderer/shims/ReactNativeTypes.js
70+
experimental.deprecated_variance_sigils.excludes=<PROJECT_ROOT>/packages/react-native/Libraries/Renderer/shims/ReactNativeTypes.js
71+
7872
ban_spread_key_props=true
7973

8074
[lints]
@@ -98,4 +92,4 @@ untyped-import
9892
untyped-type-import
9993

10094
[version]
101-
^0.294.0
95+
^0.319.0

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
name: 🐛 React Native - Bug Report
22
description: Report a reproducible bug or regression in React Native.
3-
labels: ["Needs: Triage :mag:"]
3+
labels: ['Needs: Triage :mag:']
44
body:
55
- type: markdown
66
attributes:
7-
value: "## Reporting a bug to React Native"
7+
value: '## Reporting a bug to React Native'
88
- type: markdown
99
attributes:
1010
value: |
@@ -46,7 +46,7 @@ body:
4646
attributes:
4747
label: React Native Version
4848
description: The version of react-native that this issue reproduces on. Bear in mind that only issues on [supported versions](https://github.com/reactwg/react-native-releases#which-versions-are-currently-supported) will be looked into.
49-
placeholder: "0.73.0"
49+
placeholder: '0.73.0'
5050
validations:
5151
required: true
5252
- type: dropdown
@@ -111,7 +111,7 @@ body:
111111
attributes:
112112
label: MANDATORY Reproducer
113113
description: A link to either a failing RNTesterPlayground.js file, an Expo Snack or a public repository from [this template](https://github.com/react-native-community/reproducer-react-native) that reproduces this bug. Reproducers are **mandatory**, issues without a reproducer will be closed.
114-
placeholder: "https://github.com/<myuser>/<myreproducer>"
114+
placeholder: 'https://github.com/<myuser>/<myreproducer>'
115115
validations:
116116
required: true
117117
- type: textarea

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
blank_issues_enabled: false
22
contact_links:
3-
- name: ⬆️ Upgrade - Build Regression
4-
url: https://github.com/reactwg/react-native-releases/issues/new/choose
5-
about: |
6-
If you are upgrading to a new React Native version (stable or pre-release) and encounter a build regression.
7-
- name: 🚀 Expo Issue
8-
url: https://github.com/expo/expo/issues/new
9-
about: |
10-
If you're using Expo in your project, please report the issue first in the Expo issue tracker.
11-
- name: 📃 Documentation Issue
12-
url: https://github.com/facebook/react-native-website/issues
13-
about: Please report documentation issues in the React Native website repository.
14-
- name: 📦 Metro Issue
15-
url: https://github.com/facebook/metro/issues/new
16-
about: |
17-
If you've encountered a module resolution problem, e.g. "Error: Unable to resolve module ...", or something else that might be related to Metro, please open an issue in the Metro repo instead.
18-
- name: 🤔 Questions and Help
19-
url: https://reactnative.dev/help
20-
about: Looking for help with your app? Please refer to the React Native community's support resources.
21-
- name: 💫 New Architecture - Questions & Technical Deep dive insights
22-
url: https://github.com/reactwg/react-native-new-architecture
23-
about: Questions and doubts related to technical questions for the New Architecture should be directed to the Working Group. Instructions on how to join are available in the README.
24-
- name: 🚀 Discussions and Proposals
25-
url: https://github.com/react-native-community/discussions-and-proposals
26-
about: Discuss the future of React Native in the React Native community's discussions and proposals repository.
3+
- name: ⬆️ Upgrade - Build Regression
4+
url: https://github.com/reactwg/react-native-releases/issues/new/choose
5+
about: |
6+
If you are upgrading to a new React Native version (stable or pre-release) and encounter a build regression.
7+
- name: 🚀 Expo Issue
8+
url: https://github.com/expo/expo/issues/new
9+
about: |
10+
If you're using Expo in your project, please report the issue first in the Expo issue tracker.
11+
- name: 📃 Documentation Issue
12+
url: https://github.com/facebook/react-native-website/issues
13+
about: Please report documentation issues in the React Native website repository.
14+
- name: 📦 Metro Issue
15+
url: https://github.com/facebook/metro/issues/new
16+
about: |
17+
If you've encountered a module resolution problem, e.g. "Error: Unable to resolve module ...", or something else that might be related to Metro, please open an issue in the Metro repo instead.
18+
- name: 🤔 Questions and Help
19+
url: https://reactnative.dev/help
20+
about: Looking for help with your app? Please refer to the React Native community's support resources.
21+
- name: 💫 New Architecture - Questions & Technical Deep dive insights
22+
url: https://github.com/reactwg/react-native-new-architecture
23+
about: Questions and doubts related to technical questions for the New Architecture should be directed to the Working Group. Instructions on how to join are available in the README.
24+
- name: 🚀 Discussions and Proposals
25+
url: https://github.com/react-native-community/discussions-and-proposals
26+
about: Discuss the future of React Native in the React Native community's discussions and proposals repository.

.github/ISSUE_TEMPLATE/debugger_bug_report.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
name: 🔍 Debugger - Bug Report
22
description: Report a bug with React Native DevTools and the New Debugger
3-
labels: ["Needs: Triage :mag:", "Debugging"]
3+
labels: ['Needs: Triage :mag:', 'Debugging']
44

55
body:
66
- type: markdown
77
attributes:
8-
value: "## Reporting a bug for React Native DevTools"
8+
value: '## Reporting a bug for React Native DevTools'
99
- type: markdown
1010
attributes:
1111
value: |
@@ -42,7 +42,7 @@ body:
4242
attributes:
4343
label: React Native Version
4444
description: The version of react-native that this issue reproduces on. Bear in mind that only issues on [supported versions](https://github.com/reactwg/react-native-releases#which-versions-are-currently-supported) will be looked into.
45-
placeholder: "0.76.0"
45+
placeholder: '0.76.0'
4646
validations:
4747
required: true
4848
- type: textarea

.github/ISSUE_TEMPLATE/new_architecture_bug_report.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
name: 💫 New Architecture - Bug Report
22
description: Report a reproducible bug or a build issue when using the New Architecture (Fabric & TurboModules) in React Native.
3-
labels: ["Needs: Triage :mag:", "Type: New Architecture"]
3+
labels: ['Needs: Triage :mag:', 'Type: New Architecture']
44

55
body:
66
- type: markdown
77
attributes:
8-
value: "## New Architecture Related Bugs"
8+
value: '## New Architecture Related Bugs'
99
- type: markdown
1010
attributes:
1111
value: |
@@ -43,7 +43,7 @@ body:
4343
attributes:
4444
label: React Native Version
4545
description: The version of react-native that this issue reproduces on. Bear in mind that only issues on [supported versions](https://github.com/reactwg/react-native-releases#which-versions-are-currently-supported) will be looked into.
46-
placeholder: "0.73.0"
46+
placeholder: '0.73.0'
4747
validations:
4848
required: true
4949
- type: dropdown
@@ -123,7 +123,7 @@ body:
123123
attributes:
124124
label: MANDATORY Reproducer
125125
description: A link to either a failing RNTesterPlayground.js file, an Expo Snack or a public repository from [this template](https://github.com/react-native-community/reproducer-react-native) that reproduces this bug. Reproducers are **mandatory**, issues without a reproducer will be closed.
126-
placeholder: "https://github.com/<myuser>/<myreproducer>"
126+
placeholder: 'https://github.com/<myuser>/<myreproducer>'
127127
validations:
128128
required: true
129129
- type: textarea

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

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ inputs:
55
required: true
66
description: The type of release we are building. It could be nightly, release or dry-run
77
gradle-cache-encryption-key:
8-
description: "The encryption key needed to store the Gradle Configuration cache"
8+
description: 'The encryption key needed to store the Gradle Configuration cache'
99
runs:
1010
using: composite
1111
steps:
@@ -16,16 +16,25 @@ 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
2025
# We don't want to set the version for stable branches, because this has been
2126
# already set from the 'create release' commits on the release branch.
22-
if: ${{ !endsWith(github.ref_name, '-stable') }}
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' }}
2332
shell: bash
2433
run: node ./scripts/releases/set-rn-artifacts-version.js --build-type ${{ inputs.release-type }}
2534
- name: Setup gradle
2635
uses: ./.github/actions/setup-gradle
2736
with:
28-
cache-read-only: "false"
37+
cache-read-only: 'false'
2938
cache-encryption-key: ${{ inputs.gradle-cache-encryption-key }}
3039
- name: Restore Android ccache
3140
uses: actions/cache/restore@v5
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/

.github/actions/build-npm-package/action.yml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ inputs:
44
release-type:
55
required: true
66
description: The type of release we are building. It could be nightly, release or dry-run
7-
gha-npm-token:
8-
required: false
9-
description: The GHA npm token, required only to publish to npm
10-
default: ''
117
gradle-cache-encryption-key:
128
description: The encryption key needed to store the Gradle Configuration cache
9+
skip-apple-prebuilts:
10+
description: When true, skip downloading prebuilt Apple artifacts (use when Apple prebuild jobs were skipped)
11+
required: false
12+
default: 'false'
1313

1414
runs:
1515
using: composite
@@ -18,18 +18,21 @@ runs:
1818
shell: bash
1919
run: git config --global --add safe.directory '*'
2020
- name: Download ReactNativeDependencies
21+
if: ${{ inputs.skip-apple-prebuilts != 'true' }}
2122
uses: actions/download-artifact@v7
2223
with:
2324
pattern: ReactNativeDependencies*
2425
path: ./packages/react-native/ReactAndroid/external-artifacts/artifacts
2526
merge-multiple: true
2627
- name: Download ReactCore artifacts
28+
if: ${{ inputs.skip-apple-prebuilts != 'true' }}
2729
uses: actions/download-artifact@v7
2830
with:
2931
pattern: ReactCore*
3032
path: ./packages/react-native/ReactAndroid/external-artifacts/artifacts
3133
merge-multiple: true
3234
- name: Print Artifacts Directory
35+
if: ${{ inputs.skip-apple-prebuilts != 'true' }}
3336
shell: bash
3437
run: ls -lR ./packages/react-native/ReactAndroid/external-artifacts/artifacts/
3538
- name: Setup gradle
@@ -38,6 +41,9 @@ runs:
3841
cache-encryption-key: ${{ inputs.gradle-cache-encryption-key }}
3942
- name: Setup node.js
4043
uses: ./.github/actions/setup-node
44+
with:
45+
node-version: '24'
46+
registry-url: 'https://registry.npmjs.org'
4147
- name: Install dependencies
4248
uses: ./.github/actions/yarn-install
4349
- name: Build packages
@@ -46,12 +52,9 @@ runs:
4652
- name: Build types
4753
shell: bash
4854
run: yarn build-types --skip-snapshot
49-
# Continue with publish steps
50-
- name: Set npm credentials
51-
if: ${{ inputs.release-type == 'release' ||
52-
inputs.release-type == 'nightly' }}
53-
shell: bash
54-
run: echo "//registry.npmjs.org/:_authToken=${{ inputs.gha-npm-token }}" > ~/.npmrc
55+
# `npm publish` below authenticates via npm Trusted Publishing (OIDC).
56+
# The caller (the reusable `publish-npm.yml` workflow) MUST grant
57+
# `id-token: write`; this composite action runs inside that job.
5558
- name: Publish NPM
5659
shell: bash
5760
run: |

0 commit comments

Comments
 (0)