Skip to content

Commit 15dbef3

Browse files
committed
Merge remote-tracking branch 'upstream/main' into feat/css-lab-lch-oklab-oklch-colors
# Conflicts: # packages/react-native/ReactCommon/react/renderer/css/CSSColorFunction.h # scripts/cxx-api/api-snapshots/ReactAndroidDebugCxx.api # scripts/cxx-api/api-snapshots/ReactAndroidNewarchCxx.api # scripts/cxx-api/api-snapshots/ReactAndroidReleaseCxx.api # scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api # scripts/cxx-api/api-snapshots/ReactAppleNewarchCxx.api # scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api # scripts/cxx-api/api-snapshots/ReactCommonDebugCxx.api # scripts/cxx-api/api-snapshots/ReactCommonNewarchCxx.api # scripts/cxx-api/api-snapshots/ReactCommonReleaseCxx.api
2 parents c5f4782 + 27e7721 commit 15dbef3

878 files changed

Lines changed: 58306 additions & 67078 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.336.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: |
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
/**
2+
* Copyright (c) Meta Platforms, Inc. and affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*
7+
* @format
8+
*/
9+
10+
'use strict';
11+
12+
const checkForReproducer = require('../checkForReproducer');
13+
14+
const ISSUE_AUTHOR = 'issue-author';
15+
16+
function buildGithub(body) {
17+
return {
18+
rest: {
19+
issues: {
20+
get: jest.fn().mockResolvedValue({
21+
data: {
22+
user: {login: ISSUE_AUTHOR},
23+
created_at: '2026-10-01T00:00:00Z',
24+
body,
25+
},
26+
}),
27+
listComments: jest.fn().mockResolvedValue({data: []}),
28+
listEventsForTimeline: jest.fn().mockResolvedValue({data: []}),
29+
removeLabel: jest.fn().mockResolvedValue({}),
30+
addLabels: jest.fn().mockResolvedValue({}),
31+
},
32+
},
33+
};
34+
}
35+
36+
const context = {
37+
repo: {owner: 'react', repo: 'react-native'},
38+
payload: {issue: {number: 1}},
39+
};
40+
41+
describe('checkForReproducer reproducer links', () => {
42+
test.each([
43+
'https://github.com/react/react-native/pull/58972',
44+
'https://github.com/facebook/react-native/pull/58972',
45+
])('accepts a pull request link as a reproducer: %s', async link => {
46+
const github = buildGithub(`Reproducer: ${link}`);
47+
48+
await checkForReproducer(github, context);
49+
50+
expect(github.rest.issues.removeLabel).toHaveBeenCalledWith(
51+
expect.objectContaining({name: 'Needs: Repro'}),
52+
);
53+
expect(github.rest.issues.addLabels).not.toHaveBeenCalled();
54+
});
55+
56+
test.each([
57+
'Reproducer: https://github.com/someone-else/some-repo/pull/12',
58+
'It crashes when I scroll.',
59+
])('asks for a reproducer when there is none: %s', async body => {
60+
const github = buildGithub(body);
61+
62+
await checkForReproducer(github, context);
63+
64+
expect(github.rest.issues.addLabels).toHaveBeenCalledWith(
65+
expect.objectContaining({
66+
labels: ['Needs: Repro', 'Needs: Author Feedback'],
67+
}),
68+
);
69+
expect(github.rest.issues.removeLabel).not.toHaveBeenCalled();
70+
});
71+
});

‎.github/workflow-scripts/checkForReproducer.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ module.exports = async (github, context) => {
4343
const hasValidReproducer = entities.some(entity => {
4444
const hasPullRequestRepoLink = containsPattern(
4545
entity.body,
46-
`https?:\/\/github\.com\/facebook\/react-native\/pull\/\d+\/?`,
46+
`https?:\\/\\/github\\.com\\/(?:facebook|react)\\/react-native\\/pull\\/\\d+\\/?`,
4747
);
4848

4949
const hasExpoSnackLink = containsPattern(

‎.github/workflows/close-pr.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
// Looking at the commit message, checks which PR number, if any, was closed by this commit
2727
const getClosedPrIfExists = (commit) => {
2828
if(!commit || !commit.message) return;
29-
const prClosingRegex = /Closes https:\/\/github.com\/facebook\/react-native\/pull\/([0-9]+)|Pull Request resolved: https:\/\/github.com\/facebook\/react-native\/pull\/([0-9]+)/;
29+
const prClosingRegex = /Closes https:\/\/github.com\/(?:facebook|react)\/react-native\/pull\/([0-9]+)|Pull Request resolved: https:\/\/github.com\/(?:facebook|react)\/react-native\/pull\/([0-9]+)/;
3030
const prClosingMatch = commit.message.match(prClosingRegex);
3131
if(!prClosingMatch || (!prClosingMatch[1] && ! prClosingMatch[2])) return;
3232
return prClosingMatch[1] ?? prClosingMatch[2];

‎.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

0 commit comments

Comments
 (0)