Skip to content

Commit 337d0da

Browse files
author
Cameron Chisholm
committed
Merge upstream main into fix/ios-refresh-control-appearance
2 parents 44275e0 + 43c9b88 commit 337d0da

955 files changed

Lines changed: 58112 additions & 66711 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: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ module.exports = {
5151
files: [
5252
'./packages/react-native/Libraries/**/*.{js,flow}',
5353
'./packages/react-native/src/**/*.{js,flow}',
54-
'./packages/assets-registry/registry.js',
5554
],
5655
parser: 'flow-eslint',
5756
rules: {

‎.flowconfig‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeEnumTurboModul
1616
**/*.windows.js
1717

1818
**/node_modules/resolve/test/resolver/malformed_package_json/package.json
19+
**/node_modules/invariant/**
1920

2021
; Checked-in build output
2122
packages/debugger-frontend/dist/**
@@ -52,6 +53,9 @@ experimental.multi_platform=true
5253
experimental.multi_platform.extensions=.ios
5354
experimental.multi_platform.extensions=.android
5455

56+
experimental.assertion_functions=true
57+
experimental.disable_invariant_special_casing=true
58+
5559
munge_underscores=true
5660

5761
module.name_mapper='^react-native$' -> '<PROJECT_ROOT>/packages/react-native/index.js'
@@ -96,4 +100,4 @@ untyped-import
96100
untyped-type-import
97101

98102
[version]
99-
^0.333.0
103+
^0.335.0
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Download artifact with retries
2+
description: Downloads an artifact, retrying transient failures up to two times
3+
4+
inputs:
5+
name:
6+
description: Artifact name
7+
required: true
8+
path:
9+
description: Destination path
10+
required: true
11+
12+
outputs:
13+
download-path:
14+
description: Absolute path where the artifact was downloaded
15+
value: ${{ steps.download-3.outputs.download-path || steps.download-2.outputs.download-path || steps.download-1.outputs.download-path }}
16+
17+
runs:
18+
using: composite
19+
steps:
20+
- name: Download artifact (attempt 1 of 3)
21+
id: download-1
22+
if: ${{ always() }}
23+
continue-on-error: true
24+
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7
25+
with:
26+
name: ${{ inputs.name }}
27+
path: ${{ inputs.path }}
28+
29+
- name: Wait before attempt 2
30+
if: ${{ always() && steps.download-1.outcome == 'failure' }}
31+
shell: bash
32+
run: |
33+
echo "::warning::Artifact download failed; retrying in 10 seconds"
34+
sleep 10
35+
36+
- name: Download artifact (attempt 2 of 3)
37+
id: download-2
38+
if: ${{ always() && steps.download-1.outcome == 'failure' }}
39+
continue-on-error: true
40+
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7
41+
with:
42+
name: ${{ inputs.name }}
43+
path: ${{ inputs.path }}
44+
45+
- name: Wait before attempt 3
46+
if: ${{ always() && steps.download-2.outcome == 'failure' }}
47+
shell: bash
48+
run: |
49+
echo "::warning::Artifact download failed again; retrying in 20 seconds"
50+
sleep 20
51+
52+
- name: Download artifact (attempt 3 of 3)
53+
id: download-3
54+
if: ${{ always() && steps.download-2.outcome == 'failure' }}
55+
# Deliberately do not continue on error: the last failure must fail the caller.
56+
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7
57+
with:
58+
name: ${{ inputs.name }}
59+
path: ${{ inputs.path }}

‎.github/actions/test-ios-helloworld/action.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ name: test-ios-helloworld
22
description: Test iOS Hello World
33
inputs:
44
use-frameworks:
5-
description: The dependency building and linking strategy to use. Must be one of "StaticLibraries", "DynamicFrameworks"
6-
default: StaticLibraries
5+
description: Whether to build with dynamic frameworks.
6+
default: false
77
ruby-version:
88
description: The version of ruby that must be used
99
default: 2.6.10
@@ -51,7 +51,7 @@ runs:
5151
cd private/helloworld
5252
args=()
5353
54-
if [[ ${{ inputs.use-frameworks }} == "DynamicFrameworks" ]]; then
54+
if [[ "${{ inputs.use-frameworks }}" == "true" ]]; then
5555
args+=(--frameworks dynamic)
5656
fi
5757

‎.github/actions/test-ios-rntester/action.yml‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,27 @@ runs:
4141
uses: ruby/setup-ruby@v1
4242
with:
4343
ruby-version: ${{ inputs.ruby-version }}
44+
bundler: none
45+
- name: Install Bundler
46+
shell: bash
47+
run: |
48+
BUNDLER_VERSION="$(awk '/BUNDLED WITH/{getline; print $1}' Gemfile.lock)"
49+
if [ -z "$BUNDLER_VERSION" ]; then
50+
echo "Could not determine Bundler version from Gemfile.lock." >&2
51+
exit 1
52+
fi
53+
for attempt in 1 2 3; do
54+
echo "Attempt $attempt of 3"
55+
if gem install bundler --version "$BUNDLER_VERSION" --no-document; then
56+
exit 0
57+
fi
58+
if [ "$attempt" -lt 3 ]; then
59+
echo "Attempt $attempt failed. Retrying..."
60+
sleep "$((attempt * 10))"
61+
fi
62+
done
63+
echo "All 3 attempts failed."
64+
exit 1
4465
- name: Set Hermes prebuilt version
4566
shell: bash
4667
run: |

‎.github/workflows/e2e-ios-rntester.yml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ jobs:
6060
steps:
6161
- id: check
6262
run: |
63-
if [[ "${{ needs.test.outputs.status }}" == "failure" ]]; then
63+
if [[ "${{ needs.test.result }}" != "success" ||
64+
"${{ needs.test.outputs.status }}" == "failure" ]]; then
6465
echo "status=failure" >> $GITHUB_OUTPUT
6566
else
6667
echo "status=success" >> $GITHUB_OUTPUT

‎.github/workflows/e2e-ios-templateapp.yml‎

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,22 +33,22 @@ jobs:
3333
with:
3434
ruby-version: 2.6.10
3535
- name: Download React Native Package
36-
uses: actions/download-artifact@v7
36+
uses: ./.github/actions/download-artifact
3737
with:
3838
name: react-native-package
3939
path: /tmp/react-native-tmp
4040
- name: Print /tmp folder
4141
run: ls -lR /tmp/react-native-tmp
4242
- name: Download ReactNativeDependencies
43-
uses: actions/download-artifact@v7
43+
uses: ./.github/actions/download-artifact
4444
with:
4545
name: ReactNativeDependencies${{ matrix.flavor }}.xcframework.tar.gz
4646
path: /tmp/third-party
4747
- name: Print third-party folder
4848
shell: bash
4949
run: ls -lR /tmp/third-party
5050
- name: Download React Native Prebuilds
51-
uses: actions/download-artifact@v7
51+
uses: ./.github/actions/download-artifact
5252
with:
5353
name: ReactCore${{ matrix.flavor }}.xcframework.tar.gz
5454
path: /tmp/ReactCore
@@ -114,15 +114,15 @@ jobs:
114114
- name: Run yarn
115115
uses: ./.github/actions/yarn-install
116116
- name: Download app
117-
uses: actions/download-artifact@v7
117+
uses: ./.github/actions/download-artifact
118118
with:
119119
name: RNTestProject-${{ matrix.flavor }}
120120
path: /tmp/RNTestProjectBuild/RNTestProject.app
121121
- name: Check downloaded folder content
122122
run: ls -l /tmp/RNTestProjectBuild/RNTestProject.app
123123
- name: Download React Native Package
124124
if: ${{ matrix.flavor == 'Debug' }}
125-
uses: actions/download-artifact@v7
125+
uses: ./.github/actions/download-artifact
126126
with:
127127
name: react-native-package
128128
path: /tmp/react-native-tmp
@@ -163,15 +163,17 @@ jobs:
163163
run: echo "status=failure" >> $GITHUB_OUTPUT
164164

165165
report:
166-
needs: test
166+
needs: [build, test]
167167
if: always()
168168
runs-on: ubuntu-latest
169169
outputs:
170170
status: ${{ steps.check.outputs.status }}
171171
steps:
172172
- id: check
173173
run: |
174-
if [[ "${{ needs.test.outputs.status }}" == "failure" ]]; then
174+
if [[ "${{ needs.build.result }}" != "success" ||
175+
"${{ needs.test.result }}" != "success" ||
176+
"${{ needs.test.outputs.status }}" == "failure" ]]; then
175177
echo "status=failure" >> $GITHUB_OUTPUT
176178
else
177179
echo "status=success" >> $GITHUB_OUTPUT

‎.github/workflows/test-all.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ jobs:
534534
exclude:
535535
# This config is tested with Ruby 3.2.0. Let's not double test it.
536536
- flavor: Debug
537-
use_frameworks: StaticLibraries
537+
use_frameworks: false
538538
env:
539539
PROJECT_NAME: iOSTemplateProject
540540
YARN_ENABLE_IMMUTABLE_INSTALLS: false

‎.github/workflows/test-ios-spm-newapp.yml‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,27 +40,27 @@ jobs:
4040
# release/ artifact slots together (and `--download skip` refuses an
4141
# incomplete slot). Please don't "optimise" this down to one flavor.
4242
- name: Download ReactCore (Debug)
43-
uses: actions/download-artifact@v7
43+
uses: ./.github/actions/download-artifact
4444
with:
4545
name: ReactCoreDebug.xcframework.tar.gz
4646
path: /tmp/rc-debug
4747
- name: Download ReactCore (Release)
48-
uses: actions/download-artifact@v7
48+
uses: ./.github/actions/download-artifact
4949
with:
5050
name: ReactCoreRelease.xcframework.tar.gz
5151
path: /tmp/rc-release
5252
- name: Download ReactNativeDependencies (Debug)
53-
uses: actions/download-artifact@v7
53+
uses: ./.github/actions/download-artifact
5454
with:
5555
name: ReactNativeDependenciesDebug.xcframework.tar.gz
5656
path: /tmp/deps-debug
5757
- name: Download ReactNativeDependencies (Release)
58-
uses: actions/download-artifact@v7
58+
uses: ./.github/actions/download-artifact
5959
with:
6060
name: ReactNativeDependenciesRelease.xcframework.tar.gz
6161
path: /tmp/deps-release
6262
- name: Download React Native package
63-
uses: actions/download-artifact@v7
63+
uses: ./.github/actions/download-artifact
6464
with:
6565
name: react-native-package
6666
path: /tmp/react-native-tmp

‎.prettierrc.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ module.exports = {
2323
},
2424
},
2525
{
26-
files: ['*.js', '*.js.flow'],
26+
files: ['*.js', '*.js.flow', '*.json.flow'],
2727
options: {
2828
parser: 'flow',
2929
},

0 commit comments

Comments
 (0)