Skip to content

Commit b361acb

Browse files
committed
Merge branch 'main' into improve-lineheight-calc-ios
2 parents cbb8efe + 9be5ac1 commit b361acb

1,630 files changed

Lines changed: 21964 additions & 11074 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: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,10 @@ module.exports = {
6464
},
6565
},
6666
{
67-
files: ['flow-typed/**/*.js'],
67+
files: ['flow-typed/**/*.js', 'packages/react-native/flow/**/*'],
6868
rules: {
6969
'lint/valid-flow-typed-signature': 2,
70+
'no-shadow': 0,
7071
'no-unused-vars': 0,
7172
quotes: 0,
7273
},
@@ -136,7 +137,7 @@ module.exports = {
136137
},
137138
},
138139
{
139-
files: ['**/*-itest{.fb,}.js'],
140+
files: ['**/__tests__/**'],
140141
rules: {
141142
'lint/no-react-native-imports': 'off',
142143
},

.flowconfig

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
flow-typed/
4545
packages/react-native/interface.js
4646
packages/react-native/flow/
47-
packages/react-native/src/types/
4847

4948
[options]
5049
enums=true
@@ -101,4 +100,4 @@ untyped-import
101100
untyped-type-import
102101

103102
[version]
104-
^0.269.1
103+
^0.272.1

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

Lines changed: 2 additions & 16 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
89+
name: rntester-debug
9090
path: packages/rn-tester/android/app/build/outputs/apk/hermes/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
96+
name: rntester-release
9797
path: packages/rn-tester/android/app/build/outputs/apk/hermes/release/
9898
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/
112-
compression-level: 0

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ inputs:
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
@@ -79,13 +76,13 @@ runs:
7976
uses: actions/upload-artifact@v4.3.4
8077
if: always()
8178
with:
82-
name: e2e_android_${{ steps.normalize-app-id.outputs.app-id }}_report_${{ inputs.jsengine }}_${{ inputs.flavor }}_${{ inputs.architecture }}
79+
name: e2e_android_${{ steps.normalize-app-id.outputs.app-id }}_report_${{ inputs.flavor }}_${{ inputs.architecture }}
8380
path: |
8481
report.xml
8582
screen.mp4
8683
- name: Store Logs
8784
if: steps.run-tests.outcome == 'failure'
8885
uses: actions/upload-artifact@v4.3.4
8986
with:
90-
name: maestro-logs-android-${{ steps.normalize-app-id.outputs.app-id }}-${{ inputs.jsengine }}-${{ inputs.flavor }}-${{ inputs.architecture }}
87+
name: maestro-logs-android-${{ steps.normalize-app-id.outputs.app-id }}-${{ inputs.flavor }}-${{ inputs.architecture }}
9188
path: /tmp/MaestroLogs

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

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ inputs:
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
@@ -66,24 +63,24 @@ runs:
6663
"${{ inputs.app-path }}" \
6764
"${{ inputs.app-id }}" \
6865
"${{ inputs.maestro-flow }}" \
69-
"${{ inputs.jsengine }}" \
66+
"Hermes" \
7067
"${{ inputs.flavor }}" \
7168
"${{ inputs.working-directory }}"
7269
- name: Store video record
7370
if: always()
7471
uses: actions/upload-artifact@v4.3.4
7572
with:
76-
name: e2e_ios_${{ inputs.app-id }}_report_${{ inputs.jsengine }}_${{ inputs.flavor }}_${{ inputs.architecture }}
73+
name: e2e_ios_${{ inputs.app-id }}_report_${{ inputs.flavor }}_${{ inputs.architecture }}
7774
path: |
78-
video_record_${{ inputs.jsengine }}_1.mov
79-
video_record_${{ inputs.jsengine }}_2.mov
80-
video_record_${{ inputs.jsengine }}_3.mov
81-
video_record_${{ inputs.jsengine }}_4.mov
82-
video_record_${{ inputs.jsengine }}_5.mov
75+
video_record_1.mov
76+
video_record_2.mov
77+
video_record_3.mov
78+
video_record_4.mov
79+
video_record_5.mov
8380
report.xml
8481
- name: Store Logs
8582
if: failure() && steps.run-tests.outcome == 'failure'
8683
uses: actions/upload-artifact@v4.3.4
8784
with:
88-
name: maestro-logs-${{ inputs.app-id }}-${{ inputs.jsengine }}-${{ inputs.flavor }}-${{ inputs.architecture }}
85+
name: maestro-logs-${{ inputs.app-id }}-${{ inputs.flavor }}-${{ inputs.architecture }}
8986
path: /tmp/MaestroLogs

.github/actions/setup-xcode-build-cache/action.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ inputs:
44
hermes-version:
55
description: The version of hermes
66
required: true
7-
jsengine:
8-
dscription: The js engine in use
9-
default: Hermes
107
flavor:
118
description: The flavor that is going to be built
129
default: Debug
@@ -30,9 +27,9 @@ runs:
3027
uses: actions/cache@v4
3128
with:
3229
path: packages/rn-tester/Podfile.lock
33-
key: v13-podfilelock-${{ github.job }}-${{ inputs.architecture }}-${{ inputs.jsengine }}-${{ inputs.flavor }}-${{ inputs.use-frameworks }}-${{ inputs.ruby-version }}-${{ hashfiles('packages/rn-tester/Podfile') }}-${{ inputs.hermes-version }}
30+
key: v13-podfilelock-${{ github.job }}-${{ inputs.architecture }}-${{ inputs.flavor }}-${{ inputs.use-frameworks }}-${{ inputs.ruby-version }}-${{ hashfiles('packages/rn-tester/Podfile') }}-${{ inputs.hermes-version }}
3431
- name: Cache cocoapods
3532
uses: actions/cache@v4
3633
with:
3734
path: packages/rn-tester/Pods
38-
key: v15-cocoapods-${{ github.job }}-${{ inputs.architecture }}-${{ inputs.jsengine }}-${{ inputs.flavor }}-${{ inputs.use-frameworks }}-${{ inputs.ruby-version }}-${{ hashfiles('packages/rn-tester/Podfile.lock') }}-${{ hashfiles('packages/rn-tester/Podfile') }}-${{ inputs.hermes-version}}
35+
key: v15-cocoapods-${{ github.job }}-${{ inputs.architecture }}-${{ inputs.flavor }}-${{ inputs.use-frameworks }}-${{ inputs.ruby-version }}-${{ hashfiles('packages/rn-tester/Podfile.lock') }}-${{ hashfiles('packages/rn-tester/Podfile') }}-${{ inputs.hermes-version}}

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

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
name: test-ios-helloworld
22
description: Test iOS Hello World
33
inputs:
4-
jsengine:
5-
description: Which JavaScript engine to use. Must be one of "Hermes", "JSC".
6-
default: Hermes
74
use-frameworks:
85
description: The dependency building and linking strategy to use. Must be one of "StaticLibraries", "DynamicFrameworks"
96
default: StaticLibraries
@@ -54,7 +51,7 @@ runs:
5451
- name: Print third-party folder
5552
shell: bash
5653
run: ls -lR /tmp/third-party
57-
- name: Install iOS dependencies - Configuration ${{ inputs.flavor }}; New Architecture ${{ inputs.architecture }}; JS Engine ${{ inputs.jsengine }}
54+
- name: Install iOS dependencies - Configuration ${{ inputs.flavor }}; New Architecture ${{ inputs.architecture }}
5855
shell: bash
5956
run: |
6057
cd packages/helloworld
@@ -68,29 +65,31 @@ runs:
6865
args+=(--frameworks dynamic)
6966
fi
7067
71-
if [[ ${{ inputs.jsengine }} == "JSC" ]]; then
72-
args+=(--jsvm jsc)
73-
yarn bootstrap ios "${args[@]}" | cat
74-
else
75-
# Tarball is restored with capital flavors suffix, but somehow the tarball name from JS at line 96 returns as lowercased.
76-
# Let's ensure that the tarballs have the right names
68+
# Tarball is restored with capital flavors suffix, but somehow the tarball name from JS at line 96 returns as lowercased.
69+
# Let's ensure that the tarballs have the right names
7770
78-
if [[ -f "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-Debug.tar.gz" ]]; then
79-
mv "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-Debug.tar.gz" "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-debug.tar.gz"
80-
fi
71+
if [[ -f "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-Debug.tar.gz" ]]; then
72+
mv "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-Debug.tar.gz" "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-debug.tar.gz"
73+
fi
74+
75+
if [[ -f "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-Release.tar.gz" ]]; then
76+
mv "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-Release.tar.gz" "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-release.tar.gz"
77+
fi
8178
82-
if [[ -f "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-Release.tar.gz" ]]; then
83-
mv "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-Release.tar.gz" "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-release.tar.gz"
84-
fi
79+
BUILD_TYPE="${{ inputs.flavor }}"
80+
TARBALL_FILENAME=$(node ../react-native/scripts/hermes/get-tarball-name.js --buildType "$BUILD_TYPE")
81+
export HERMES_ENGINE_TARBALL_PATH="$HERMES_WS_DIR/hermes-runtime-darwin/$TARBALL_FILENAME"
82+
export RCT_USE_LOCAL_RN_DEP="/tmp/third-party/ReactNativeDependencies${{ inputs.flavor }}.xcframework.tar.gz"
8583
86-
BUILD_TYPE="${{ inputs.flavor }}"
87-
TARBALL_FILENAME=$(node ../react-native/scripts/hermes/get-tarball-name.js --buildType "$BUILD_TYPE")
88-
export HERMES_ENGINE_TARBALL_PATH="$HERMES_WS_DIR/hermes-runtime-darwin/$TARBALL_FILENAME"
89-
export RCT_USE_LOCAL_RN_DEP="/tmp/third-party/ReactNativeDependencies${{ inputs.flavor }}.xcframework.tar.gz"
84+
yarn bootstrap ios "${args[@]}" | cat
9085
91-
yarn bootstrap ios "${args[@]}" | cat
92-
fi
93-
- name: Build HelloWorld project
86+
- name: Run Helloworld tests
87+
shell: bash
88+
run: |
89+
cd packages/helloworld
90+
yarn test
91+
92+
- name: Build HelloWorld project
9493
shell: bash
9594
run: |
9695
cd packages/helloworld

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

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
name: test-ios-rntester
22
description: Test iOS RNTester
33
inputs:
4-
jsengine:
5-
description: Which JavaScript engine to use. Must be one of "Hermes", "JSC".
6-
default: Hermes
74
use-frameworks:
85
description: The dependency building and linking strategy to use. Must be one of "StaticLibraries", "DynamicFrameworks"
96
default: StaticLibraries
@@ -104,19 +101,14 @@ runs:
104101
uses: ./.github/actions/setup-xcode-build-cache
105102
with:
106103
hermes-version: ${{ inputs.hermes-version }}
107-
jsengine: ${{ inputs.jsengine }}
108104
architecture: ${{ inputs.architecture }}
109105
use-frameworks: ${{ inputs.use-frameworks }}
110106
flavor: ${{ inputs.flavor }}
111107
ruby-version: ${{ inputs.ruby-version }}
112108
- name: Install CocoaPods dependencies
113109
shell: bash
114110
run: |
115-
if [[ ${{ inputs.jsengine }} == "JSC" ]]; then
116-
export USE_HERMES=0
117-
else
118-
export HERMES_ENGINE_TARBALL_PATH=$HERMES_ENGINE_TARBALL_PATH
119-
fi
111+
export HERMES_ENGINE_TARBALL_PATH=$HERMES_ENGINE_TARBALL_PATH
120112
121113
if [[ ${{ inputs.use-frameworks }} == "DynamicFrameworks" ]]; then
122114
export USE_FRAMEWORKS=dynamic
@@ -170,7 +162,7 @@ runs:
170162
if: ${{ inputs.use-frameworks == 'StaticLibraries' && inputs.ruby-version == '2.6.10' }} # This is needed to avoid conflicts with the artifacts
171163
uses: actions/upload-artifact@v4.3.4
172164
with:
173-
name: RNTesterApp-${{ inputs.architecture }}-${{ inputs.jsengine }}-${{ inputs.flavor }}
165+
name: RNTesterApp-${{ inputs.architecture }}-${{ inputs.flavor }}
174166
path: ${{ env.app-path }}
175167
- name: Store test results
176168
if: ${{ inputs.run-unit-tests == 'true' }}

.github/workflow-scripts/actOnLabel.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,6 @@ module.exports = async (github, context, labelWithContext) => {
9595
);
9696
await requestAuthorFeedback();
9797
return;
98-
case 'Newer Patch Available':
99-
await addComment(
100-
`> [!TIP]\n` +
101-
`> **Newer version available**: You are on a supported minor version, but it looks like there's a newer patch available - ${labelWithContext.newestPatch}. Please [upgrade](https://reactnative.dev/docs/upgrading) to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.`,
102-
);
103-
return;
10498
case 'Needs: Version Info':
10599
await addComment(
106100
`> [!WARNING]\n` +

.github/workflow-scripts/verifyVersion.js

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,6 @@ module.exports = async (github, context) => {
4545
if (!isVersionSupported(issueVersion, latestVersion)) {
4646
return {label: 'Type: Unsupported Version'};
4747
}
48-
49-
// We want to encourage users to repro the issue on the highest available patch for the given minor.
50-
const latestPatchForVersion = getLatestPatchForVersion(
51-
issueVersion,
52-
recentReleases,
53-
);
54-
if (latestPatchForVersion > issueVersion.patch) {
55-
return {
56-
label: 'Newer Patch Available',
57-
newestPatch: `${issueVersion.major}.${issueVersion.minor}.${latestPatchForVersion}`,
58-
};
59-
}
6048
};
6149

6250
/**
@@ -87,22 +75,6 @@ function isVersionTooOld(actualVersion, latestVersion) {
8775
);
8876
}
8977

90-
// Assumes that releases are sorted in the order of recency (i.e. most recent releases are earlier in the list)
91-
// This enables us to stop looking as soon as we find the first release with a matching major/minor version, since
92-
// we know it's the most recent release, therefore the highest patch available.
93-
function getLatestPatchForVersion(version, releases) {
94-
for (releaseName of releases) {
95-
const release = parseVersionFromString(releaseName);
96-
if (
97-
release &&
98-
release.major == version.major &&
99-
release.minor == version.minor
100-
) {
101-
return release.patch;
102-
}
103-
}
104-
}
105-
10678
function getReactNativeVersionFromIssueBodyIfExists(issue) {
10779
if (!issue || !issue.body) return;
10880
const rnVersionRegex = /React Native Version[\r\n]+(?<version>.+)[\r\n]*/;

0 commit comments

Comments
 (0)