Skip to content

Commit d4914b5

Browse files
committed
Merge branch 'main' into @tjzel/RCTBundleConsumer
2 parents f1d9fa6 + 38a4b62 commit d4914b5

2,543 files changed

Lines changed: 85876 additions & 55944 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.

.eslintrc.js

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7+
* @noflow
78
* @format
89
*/
910

@@ -27,12 +28,16 @@ module.exports = {
2728
files: ['*.js', '*.js.flow', '*.jsx'],
2829
parser: 'hermes-eslint',
2930
rules: {
31+
'ft-flow/require-valid-file-annotation': [2, 'always'],
32+
'no-extra-boolean-cast': 0,
33+
'no-void': 0,
3034
// These rules are not required with hermes-eslint
3135
'ft-flow/define-flow-type': 0,
3236
'ft-flow/use-flow-type': 0,
3337
'lint/sort-imports': 1,
34-
// flow handles this check for us, so it's not required
38+
// Flow handles these checks for us, so they aren't required
3539
'no-undef': 0,
40+
'no-unreachable': 0,
3641
},
3742
},
3843
{
@@ -43,7 +48,8 @@ module.exports = {
4348
},
4449
{
4550
files: [
46-
'./packages/react-native/**/*.{js,flow}',
51+
'./packages/react-native/Libraries/**/*.{js,flow}',
52+
'./packages/react-native/src/**/*.{js,flow}',
4753
'./packages/assets/registry.js',
4854
],
4955
parser: 'hermes-eslint',
@@ -62,9 +68,11 @@ module.exports = {
6268
},
6369
},
6470
{
65-
files: ['flow-typed/**/*.js'],
71+
files: ['flow-typed/**/*.js', 'packages/react-native/flow/**/*'],
6672
rules: {
73+
'ft-flow/require-valid-file-annotation': 0,
6774
'lint/valid-flow-typed-signature': 2,
75+
'no-shadow': 0,
6876
'no-unused-vars': 0,
6977
quotes: 0,
7078
},
@@ -134,7 +142,7 @@ module.exports = {
134142
},
135143
},
136144
{
137-
files: ['**/*-itest{.fb,}.js'],
145+
files: ['**/__tests__/**'],
138146
rules: {
139147
'lint/no-react-native-imports': 'off',
140148
},

.flowconfig

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
; Ignore build cache folder
33
<PROJECT_ROOT>/packages/react-native/sdks/.*
44

5+
; Ignore fb_internal modules
6+
<PROJECT_ROOT>/packages/react-native/src/fb_internal/.*
7+
58
; Ignore the codegen e2e tests
69
<PROJECT_ROOT>/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeEnumTurboModule.js
710

@@ -41,7 +44,6 @@
4144
flow-typed/
4245
packages/react-native/interface.js
4346
packages/react-native/flow/
44-
packages/react-native/src/types/
4547

4648
[options]
4749
enums=true
@@ -67,6 +69,8 @@ module.name_mapper='^react-native/\(.*\)$' -> '<PROJECT_ROOT>/packages/react-nat
6769
module.name_mapper='^@react-native/dev-middleware$' -> '<PROJECT_ROOT>/packages/dev-middleware'
6870
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'
6971

72+
module.system.haste.module_ref_prefix=m#
73+
7074
react.runtime=automatic
7175

7276
suppress_type=$FlowIssue
@@ -98,4 +102,4 @@ untyped-import
98102
untyped-type-import
99103

100104
[version]
101-
^0.268.0
105+
^0.272.2

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ body:
1919
* Please [search for similar issues](https://github.com/facebook/react-native/issues) in our issue tracker.
2020
2121
Make sure that your issue:
22-
* Have a **valid reproducer** (either a [Expo Snack](https://snack.expo.dev/) or a [empty project from template](https://github.com/react-native-community/reproducer-react-native).
22+
* Have a **valid reproducer** (See [How to report a bug](https://reactnative.dev/contributing/how-to-report-a-bug)).
2323
* Is tested against the [**latest stable**](https://github.com/facebook/react-native/releases/) of React Native.
2424
25-
Due to the extreme number of bugs we receive, we will be looking **ONLY** into issues with a reproducer, and on [supported versions](https://github.com/reactwg/react-native-releases#which-versions-are-currently-supported) of React Native.
25+
🚨 IMPORTANT: Due to the extreme number of bugs we receive, issues **without a reproducer** or for an [**unsupported versions**](https://github.com/reactwg/react-native-releases#which-versions-are-currently-supported) of React Native **will be closed**.
2626
- type: textarea
2727
id: description
2828
attributes:
@@ -83,7 +83,7 @@ body:
8383
path: /bin/zsh
8484
Binaries:
8585
Node: ...
86-
version: 18.14.0
86+
version: 22.14.0
8787
...
8888
render: text
8989
validations:
@@ -109,8 +109,8 @@ body:
109109
- type: input
110110
id: reproducer
111111
attributes:
112-
label: Reproducer
113-
description: A link to a Expo Snack or a public repository that reproduces this bug, using [this template](https://github.com/react-native-community/reproducer-react-native). Reproducers are **mandatory**.
112+
label: MANDATORY Reproducer
113+
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.
114114
placeholder: "https://github.com/<myuser>/<myreproducer>"
115115
validations:
116116
required: true

.github/ISSUE_TEMPLATE/debugger_bug_report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ body:
6262
path: /bin/zsh
6363
Binaries:
6464
Node: ...
65-
version: 18.14.0
65+
version: 22.14.0
6666
...
6767
render: text
6868
validations:

.github/ISSUE_TEMPLATE/new_architecture_bug_report.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ body:
1616
Do not attempt to open a bug in this category if you're not using the New Architecture as your bug will be closed.
1717
1818
Make sure that your issue:
19-
* Have a **valid reproducer** (either a [Expo Snack](https://snack.expo.dev/) or a [empty project from template](https://github.com/react-native-community/reproducer-react-native).
19+
* Have a **valid reproducer** (See [How to report a bug](https://reactnative.dev/contributing/how-to-report-a-bug)).
2020
* Is tested against the [**latest stable**](https://github.com/facebook/react-native/releases/) of React Native.
2121
22-
Due to the extreme number of bugs we receive, we will be looking **ONLY** into issues with a reproducer, and on [supported versions](https://github.com/reactwg/react-native-releases#which-versions-are-currently-supported) of React Native.
22+
🚨 IMPORTANT: Due to the extreme number of bugs we receive, issues **without a reproducer** or for an [**unsupported versions**](https://github.com/reactwg/react-native-releases#which-versions-are-currently-supported) of React Native **will be closed**.
2323
- type: textarea
2424
id: description
2525
attributes:
@@ -95,7 +95,7 @@ body:
9595
path: /bin/zsh
9696
Binaries:
9797
Node: ...
98-
version: 18.14.0
98+
version: 22.14.0
9999
...
100100
render: text
101101
validations:
@@ -121,8 +121,8 @@ body:
121121
- type: input
122122
id: reproducer
123123
attributes:
124-
label: Reproducer
125-
description: A link to a Expo Snack or a public repository that reproduces this bug, using [this template](https://github.com/react-native-community/reproducer-react-native). Reproducers are **mandatory**.
124+
label: MANDATORY Reproducer
125+
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.
126126
placeholder: "https://github.com/<myuser>/<myreproducer>"
127127
validations:
128128
required: true

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

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -86,27 +86,13 @@ runs:
8686
if: ${{ always() }}
8787
uses: actions/upload-artifact@v4.3.4
8888
with:
89-
name: rntester-hermes-debug
90-
path: packages/rn-tester/android/app/build/outputs/apk/hermes/debug/
89+
name: rntester-debug
90+
path: packages/rn-tester/android/app/build/outputs/apk/debug/
9191
compression-level: 0
9292
- name: Upload RNTester APK - hermes-release
9393
if: ${{ always() }}
9494
uses: actions/upload-artifact@v4.3.4
9595
with:
96-
name: rntester-hermes-release
97-
path: packages/rn-tester/android/app/build/outputs/apk/hermes/release/
98-
compression-level: 0
99-
- name: Upload RNTester APK - jsc-debug
100-
if: ${{ always() }}
101-
uses: actions/upload-artifact@v4.3.4
102-
with:
103-
name: rntester-jsc-debug
104-
path: packages/rn-tester/android/app/build/outputs/apk/jsc/debug/
105-
compression-level: 0
106-
- name: Upload RNTester APK - jsc-release
107-
if: ${{ always() }}
108-
uses: actions/upload-artifact@v4.3.4
109-
with:
110-
name: rntester-jsc-release
111-
path: packages/rn-tester/android/app/build/outputs/apk/jsc/release/
96+
name: rntester-release
97+
path: packages/rn-tester/android/app/build/outputs/apk/release/
11298
compression-level: 0

.github/actions/build-hermesc-apple/action.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ inputs:
1010
runs:
1111
using: composite
1212
steps:
13+
- name: Setup xcode
14+
uses: ./.github/actions/setup-xcode
1315
- name: Restore Hermes workspace
1416
uses: ./.github/actions/restore-hermes-workspace
1517
- name: Hermes apple cache

.github/actions/build-hermesc-windows/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ runs:
2525
- name: Windows cache
2626
uses: actions/cache@v4
2727
with:
28-
key: v2-hermes-${{ github.job }}-windows-${{ inputs.hermes-version }}-${{ inputs.react-native-version }}
28+
key: v3-hermes-${{ github.job }}-windows-${{ inputs.hermes-version }}-${{ inputs.react-native-version }}
2929
path: |
3030
D:\tmp\hermes\win64-bin\
3131
D:\tmp\hermes\hermes\icu\
@@ -63,7 +63,7 @@ runs:
6363
$Env:PATH += ";$Env:CMAKE_DIR;$Env:MSBUILD_DIR"
6464
$Env:ICU_ROOT = "$Env:HERMES_WS_DIR\icu"
6565
66-
cmake -S hermes -B build_release -G 'Visual Studio 16 2019' -Ax64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=True -DHERMES_ENABLE_WIN10_ICU_FALLBACK=OFF
66+
cmake -S hermes -B build_release -G 'Visual Studio 17 2022' -Ax64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=True -DHERMES_ENABLE_WIN10_ICU_FALLBACK=OFF
6767
if (-not $?) { throw "Failed to configure Hermes" }
6868
echo "Running windows build..."
6969
cd build_release

.github/actions/lint/action.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ inputs:
44
node-version:
55
description: "The node.js version to use"
66
required: false
7-
default: "20"
7+
default: "22"
88
github-token:
99
description: "The GitHub token used by pull-bot"
1010
required: true
@@ -29,9 +29,12 @@ runs:
2929
- name: Lint java
3030
shell: bash
3131
run: ./.github/workflow-scripts/exec_swallow_error.sh yarn lint-java --check
32+
- name: Lint file structure
33+
shell: bash
34+
run: ./.github/workflow-scripts/lint_files.sh
3235
- name: Verify not committing repo after running build
3336
shell: bash
34-
run: yarn run build --check
37+
run: yarn run build --validate
3538
- name: Run flowcheck
3639
shell: bash
3740
run: yarn flow-check
@@ -47,3 +50,9 @@ runs:
4750
- name: Lint markdown
4851
shell: bash
4952
run: yarn run lint-markdown
53+
- name: Build types
54+
shell: bash
55+
run: yarn build-types
56+
- name: Run typescript check of generated types
57+
shell: bash
58+
run: yarn test-generated-typescript

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

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
name: Maestro E2E Android
2-
description: Runs E2E Tests on iOS using Maestro
2+
description: Runs E2E Tests on Android using Maestro
33
inputs:
44
app-path:
55
required: true
66
description: The path to the .apk file
77
app-id:
88
required: true
99
description: The id of the app to test
10-
jsengine:
11-
required: true
12-
description: The js engine we are using
1310
maestro-flow:
1411
required: true
1512
description: the folder that contains the maestro tests
@@ -25,17 +22,13 @@ inputs:
2522
required: false
2623
default: "."
2724
description: The directory from which metro should be started
28-
architecture:
29-
required: false
30-
default: "NewArch"
31-
description: The react native architecture to test
3225

3326
runs:
3427
using: composite
3528
steps:
3629
- name: Installing Maestro
3730
shell: bash
38-
run: export MAESTRO_VERSION=1.39.7; curl -Ls "https://get.maestro.mobile.dev" | bash
31+
run: export MAESTRO_VERSION=1.40.0; curl -Ls "https://get.maestro.mobile.dev" | bash
3932
- name: Set up JDK 17
4033
if: ${{ inputs.install-java == 'true' }}
4134
uses: actions/setup-java@v4
@@ -79,13 +72,13 @@ runs:
7972
uses: actions/upload-artifact@v4.3.4
8073
if: always()
8174
with:
82-
name: e2e_android_${{ steps.normalize-app-id.outputs.app-id }}_report_${{ inputs.jsengine }}_${{ inputs.flavor }}_${{ inputs.architecture }}
75+
name: e2e_android_${{ steps.normalize-app-id.outputs.app-id }}_report_${{ inputs.flavor }}_NewArch
8376
path: |
8477
report.xml
8578
screen.mp4
8679
- name: Store Logs
8780
if: steps.run-tests.outcome == 'failure'
8881
uses: actions/upload-artifact@v4.3.4
8982
with:
90-
name: maestro-logs-android-${{ steps.normalize-app-id.outputs.app-id }}-${{ inputs.jsengine }}-${{ inputs.flavor }}-${{ inputs.architecture }}
83+
name: maestro-logs-android-${{ steps.normalize-app-id.outputs.app-id }}-${{ inputs.flavor }}-NewArch
9184
path: /tmp/MaestroLogs

0 commit comments

Comments
 (0)