Skip to content

Commit 42f60aa

Browse files
committed
Merge branch 'main' into bugfix/ios-pointer-hover-mounting
2 parents 741c783 + 99d327c commit 42f60aa

62 files changed

Lines changed: 342 additions & 159 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.flowconfig‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,4 +96,4 @@ untyped-import
9696
untyped-type-import
9797

9898
[version]
99-
^0.333.0
99+
^0.334.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/workflows/e2e-ios-templateapp.yml‎

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

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

‎flow-typed/npm/commander_v12.x.x.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ declare module 'commander' {
1717
declare type LiteralUnion<LiteralType, BaseType: string | number> =
1818
LiteralType | {...BaseType, ...{[key: empty]: empty, ...}};
1919

20-
declare export class CommanderError mixins Error {
20+
declare export class CommanderError extends Error {
2121
code: string;
2222
exitCode: number;
2323
message: string;

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
"eslint-plugin-relay": "^1.8.3",
9797
"fb-dotslash": "0.5.8",
9898
"flow-api-translator": "0.333.0",
99-
"flow-bin": "^0.333.0",
99+
"flow-bin": "^0.334.0",
100100
"flow-eslint": "0.333.0",
101101
"flow-parser": "0.333.0",
102102
"flow-transform": "0.333.0",
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
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+
* @flow strict
8+
* @format
9+
*/
10+
11+
import '@react-native/fantom/src/setUpDefaultReactNativeEnvironment';
12+
13+
// Must not be a substring of this test's own bundle URL, which appears in
14+
// every stack trace.
15+
const SOURCE_URL = 'split-chunk-under-test.bundle';
16+
17+
function getHelper(): (code: string, sourceUrl?: string) => unknown {
18+
// $FlowFixMe[prop-missing]
19+
const helper = global.globalEvalWithSourceUrl;
20+
if (typeof helper !== 'function') {
21+
throw new Error(
22+
`Expected global.globalEvalWithSourceUrl to be a function, got ${typeof helper}`,
23+
);
24+
}
25+
return helper;
26+
}
27+
28+
function getStack(fn: () => unknown): string {
29+
try {
30+
fn();
31+
} catch (e) {
32+
return String(e?.stack ?? '');
33+
}
34+
throw new Error('Expected the evaluated code to throw');
35+
}
36+
37+
describe('globalEvalWithSourceUrl', () => {
38+
afterEach(() => {
39+
// $FlowFixMe[prop-missing]
40+
delete globalThis.__fantomEvalMarker;
41+
});
42+
43+
it('is installed on the bridgeless runtime', () => {
44+
// $FlowFixMe[prop-missing]
45+
expect(typeof global.globalEvalWithSourceUrl).toBe('function');
46+
});
47+
48+
it('evaluates the same source as JS eval() in the global scope', () => {
49+
const source = 'globalThis.__fantomEvalMarker = 17; 17';
50+
51+
// eslint-disable-next-line no-eval
52+
expect(eval(source)).toBe(17);
53+
// $FlowFixMe[prop-missing]
54+
expect(globalThis.__fantomEvalMarker).toBe(17);
55+
56+
// $FlowFixMe[prop-missing]
57+
delete globalThis.__fantomEvalMarker;
58+
59+
expect(getHelper()(source, SOURCE_URL)).toBe(17);
60+
// $FlowFixMe[prop-missing]
61+
expect(globalThis.__fantomEvalMarker).toBe(17);
62+
});
63+
64+
it('attributes evaluated code to the given source URL, unlike eval()', () => {
65+
const source = 'throw new Error("thrown from evaluated source")';
66+
67+
// eslint-disable-next-line no-eval
68+
const evalStack = getStack(() => eval(source));
69+
const helperStack = getStack(() => getHelper()(source, SOURCE_URL));
70+
71+
expect(evalStack).not.toContain(SOURCE_URL);
72+
expect(helperStack).toContain(SOURCE_URL);
73+
});
74+
75+
it('rejects an invalid argument count', () => {
76+
const helper = getHelper();
77+
// $FlowFixMe[incompatible-type]
78+
expect(() => helper()).toThrow(
79+
'globalEvalWithSourceUrl arg count must be 1 or 2',
80+
);
81+
});
82+
});

‎packages/react-native/ReactAndroid/build.gradle.kts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ val preparePrefab by
143143
Pair("../ReactCommon/react/renderer/core/React/", "React/"),
144144
// react_renderer_css
145145
Pair("../ReactCommon/react/renderer/css/", "react/renderer/css/"),
146-
Pair("../ReactCommon/react/renderer/css/React/", "React/"),
147146
// react_debug
148147
Pair("../ReactCommon/react/debug/", "react/debug/"),
149148
Pair("../ReactCommon/react/debug/React/", "React/"),

‎packages/react-native/ReactCommon/React-Fabric.podspec‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ Pod::Spec.new do |s|
6060

6161
s.subspec "animated" do |ss|
6262
ss.dependency "React-Fabric/animationbackend"
63+
ss.dependency "React-Fabric/coreUmbrella"
64+
ss.dependency "ReactCommon/turbomodule/coreUmbrella"
6365
ss.source_files = podspec_sources("react/renderer/animated/**/*.{m,mm,cpp,h}", "react/renderer/animated/**/*.{h}")
6466
ss.exclude_files = "react/renderer/animated/tests"
6567
ss.header_dir = "react/renderer/animated"

‎packages/react-native/ReactCommon/react/renderer/animated/AnimatedModule.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
#else
1515
#include <FBReactNativeSpec/FBReactNativeSpecJSI.h>
1616
#endif
17-
#include <ReactCommon/TurboModuleWithJSIBindings.h>
17+
#include <React/NativeModuleCore.h>
18+
#include <React/RendererCore.h>
1819
#include <folly/dynamic.h>
1920
#include <react/renderer/animated/NativeAnimatedNodesManager.h>
2021
#include <react/renderer/animated/NativeAnimatedNodesManagerProvider.h>
21-
#include <react/renderer/core/ReactPrimitives.h>
2222
#include <memory>
2323
#include <string>
2424
#include <variant>

0 commit comments

Comments
 (0)