Skip to content

Commit 84471fb

Browse files
Merge branch 'react:main' into feat/use-screen-dimensions
2 parents 7f879ef + 1c6e0c7 commit 84471fb

236 files changed

Lines changed: 39121 additions & 60229 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.

‎.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.334.0
99+
^0.335.0

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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

‎flow-typed/environment/node.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5560,9 +5560,9 @@ type repl$DefineCommandOptions = (...args: Array<any>) => void | {
55605560
...
55615561
};
55625562

5563-
declare class $SymbolReplModeMagic mixins Symbol {}
5564-
declare class $SymbolReplModeSloppy mixins Symbol {}
5565-
declare class $SymbolReplModeStrict mixins Symbol {}
5563+
declare opaque type $SymbolReplModeMagic: symbol;
5564+
declare opaque type $SymbolReplModeSloppy: symbol;
5565+
declare opaque type $SymbolReplModeStrict: symbol;
55665566

55675567
declare module 'repl' {
55685568
declare var REPL_MODE_MAGIC: $SymbolReplModeMagic;

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

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
// Flowgen v1.21.0
1515

1616
declare module 'commander' {
17-
declare type LiteralUnion<LiteralType, BaseType: string | number> =
17+
declare type LiteralUnion<LiteralType, BaseType extends string | number> =
1818
LiteralType | {...BaseType, ...{[key: empty]: empty, ...}};
1919

2020
declare export class CommanderError extends Error {
@@ -77,7 +77,7 @@ declare module 'commander' {
7777
/**
7878
* Set the default value, and optionally supply the description to be displayed in the help.
7979
*/
80-
default(value: mixed, description?: string): this;
80+
default(value: unknown, description?: string): this;
8181

8282
/**
8383
* Set the custom handler for processing CLI command arguments into argument values.
@@ -87,7 +87,7 @@ declare module 'commander' {
8787
/**
8888
* Only allow argument value to be one of choices.
8989
*/
90-
choices(values: $ReadOnlyArray<string>): this;
90+
choices(values: ReadonlyArray<string>): this;
9191

9292
/**
9393
* Make argument required.
@@ -111,7 +111,7 @@ declare module 'commander' {
111111
negate: boolean;
112112
defaultValue?: any;
113113
defaultValueDescription?: string;
114-
presetArg?: mixed;
114+
presetArg?: unknown;
115115
envVar?: string;
116116
parseArg?: <T>(value: string, previous: T) => T;
117117
hidden: boolean;
@@ -121,7 +121,7 @@ declare module 'commander' {
121121
/**
122122
* Set the default value, and optionally supply the description to be displayed in the help.
123123
*/
124-
default(value: mixed, description?: string): this;
124+
default(value: unknown, description?: string): this;
125125

126126
/**
127127
* Preset to use when option used without option-argument, especially optional but also boolean and negated.
@@ -131,7 +131,7 @@ declare module 'commander' {
131131
* new Option('--donate [amount]').preset('20').argParser(parseFloat);
132132
* ```
133133
*/
134-
preset(arg: mixed): this;
134+
preset(arg: unknown): this;
135135

136136
/**
137137
* Add option name(s) that conflict with this option.
@@ -184,7 +184,7 @@ declare module 'commander' {
184184
/**
185185
* Only allow option value to be one of choices.
186186
*/
187-
choices(values: $ReadOnlyArray<string>): this;
187+
choices(values: ReadonlyArray<string>): this;
188188

189189
/**
190190
* Return option name.
@@ -344,9 +344,9 @@ declare module 'commander' {
344344
declare export class Command {
345345
args: string[];
346346
processedArgs: any[];
347-
readonly commands: $ReadOnlyArray<Command>;
348-
readonly options: $ReadOnlyArray<Option>;
349-
readonly registeredArguments: $ReadOnlyArray<Argument>;
347+
readonly commands: ReadonlyArray<Command>;
348+
readonly options: ReadonlyArray<Option>;
349+
readonly registeredArguments: ReadonlyArray<Argument>;
350350
parent: Command | null;
351351
constructor(name?: string): this;
352352

@@ -442,7 +442,7 @@ declare module 'commander' {
442442
fn: (value: string, previous: T) => T,
443443
defaultValue?: T,
444444
): this;
445-
argument(name: string, description?: string, defaultValue?: mixed): this;
445+
argument(name: string, description?: string, defaultValue?: unknown): this;
446446

447447
/**
448448
* Define argument syntax for command, adding a prepared argument.
@@ -666,8 +666,8 @@ declare module 'commander' {
666666
* or store separately (specify false). In both cases the option values can be accessed using .opts().
667667
* @returns `this` command for chaining
668668
*/
669-
storeOptionsAsProperties<T: OptionValues>(): this & T;
670-
storeOptionsAsProperties<T: OptionValues>(
669+
storeOptionsAsProperties<T extends OptionValues>(): this & T;
670+
storeOptionsAsProperties<T extends OptionValues>(
671671
storeAsProperties: true,
672672
): this & T;
673673
storeOptionsAsProperties(storeAsProperties?: boolean): this;
@@ -680,14 +680,14 @@ declare module 'commander' {
680680
/**
681681
* Store option value.
682682
*/
683-
setOptionValue(key: string, value: mixed): this;
683+
setOptionValue(key: string, value: unknown): this;
684684

685685
/**
686686
* Store option value and where the value came from.
687687
*/
688688
setOptionValueWithSource(
689689
key: string,
690-
value: mixed,
690+
value: unknown,
691691
source: OptionValueSource,
692692
): this;
693693

@@ -755,7 +755,7 @@ declare module 'commander' {
755755
* ```
756756
* @returns `this` command for chaining
757757
*/
758-
parse(argv?: $ReadOnlyArray<string>, options?: ParseOptions): this;
758+
parse(argv?: ReadonlyArray<string>, options?: ParseOptions): this;
759759

760760
/**
761761
* Parse `argv`, setting options and invoking commands when defined.
@@ -772,7 +772,7 @@ declare module 'commander' {
772772
* @returns Promise
773773
*/
774774
parseAsync(
775-
argv?: $ReadOnlyArray<string>,
775+
argv?: ReadonlyArray<string>,
776776
options?: ParseOptions,
777777
): Promise<this>;
778778

@@ -791,12 +791,12 @@ declare module 'commander' {
791791
/**
792792
* Return an object containing local option values as key-value pairs
793793
*/
794-
opts<T: OptionValues>(): T;
794+
opts<T extends OptionValues>(): T;
795795

796796
/**
797797
* Return an object containing merged local and global option values as key-value pairs.
798798
*/
799-
optsWithGlobals<T: OptionValues>(): T;
799+
optsWithGlobals<T extends OptionValues>(): T;
800800

801801
/**
802802
* Set the description.
@@ -847,7 +847,7 @@ declare module 'commander' {
847847
* Only the first alias is shown in the auto-generated help.
848848
* @returns `this` command for chaining
849849
*/
850-
aliases(aliases: $ReadOnlyArray<string>): this;
850+
aliases(aliases: ReadonlyArray<string>): this;
851851

852852
/**
853853
* Get aliases for the command.

‎flow-typed/npm/react-test-renderer_v16.x.x.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ declare module 'react-test-renderer/shallow' {
8585
declare export default class ShallowRenderer {
8686
static createRenderer(): ShallowRenderer;
8787
getMountedInstance(): ReactTestInstance;
88-
getRenderOutput<E: React.MixedElement>(): E;
88+
getRenderOutput<E extends React.MixedElement>(): E;
8989
getRenderOutput(): React.MixedElement;
9090
render(element: React.MixedElement, context?: any): void;
9191
unmount(): void;

‎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.334.0",
99+
"flow-bin": "^0.335.0",
100100
"flow-eslint": "0.333.0",
101101
"flow-parser": "0.333.0",
102102
"flow-transform": "0.333.0",

‎packages/gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/GenerateAutolinkingNewArchitecturesFileTask.kt‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -266,11 +266,10 @@ abstract class GenerateAutolinkingNewArchitecturesFileTask : DefaultTask() {
266266
267267
#pragma once
268268
269-
#include <ReactCommon/CallInvoker.h>
270-
#include <ReactCommon/JavaTurboModule.h>
271-
#include <ReactCommon/TurboModule.h>
269+
#include <React/CallInvoker.h>
270+
#include <React/ComponentRegistry.h>
271+
#include <React/NativeModuleCore.h>
272272
#include <jsi/jsi.h>
273-
#include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
274273
275274
namespace facebook {
276275
namespace react {

‎packages/gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/NdkConfiguratorUtils.kt‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,6 @@ internal object NdkConfiguratorUtils {
5555
if (cmakeArgs.none { it.startsWith("-DANDROID_STL") }) {
5656
cmakeArgs.add("-DANDROID_STL=c++_shared")
5757
}
58-
if (cmakeArgs.none { it.startsWith("-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES") }) {
59-
cmakeArgs.add("-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON")
60-
}
6158

6259
val architectures = project.getReactNativeArchitectures()
6360
// abiFilters are split ABI are not compatible each other, so we set the abiFilters

‎packages/react-native/Libraries/Components/View/View.js‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,21 @@
99
*/
1010

1111
import type {HostInstance} from '../../../src/private/types/HostInstance';
12+
import type {SafeAreaInsetsChangeEvent} from '../../Types/CoreEventTypes';
1213
import type {ViewProps} from './ViewPropTypes';
1314

1415
import TextAncestorContext from '../../Text/TextAncestorContext';
1516
import ViewNativeComponent from './ViewNativeComponent';
1617
import * as React from 'react';
1718
import {use} from 'react';
1819

20+
const warnOnRepeatedSafeAreaInsetsChanges: (
21+
onSafeAreaInsetsChange: (event: SafeAreaInsetsChangeEvent) => unknown,
22+
) => (event: SafeAreaInsetsChangeEvent) => unknown = __DEV__
23+
? require('../../../src/private/components/view/warnOnRepeatedSafeAreaInsetsChanges')
24+
.default
25+
: onSafeAreaInsetsChange => onSafeAreaInsetsChange;
26+
1927
export type ViewInstance = HostInstance;
2028

2129
/**
@@ -115,6 +123,15 @@ component View(ref?: React.RefSetter<ViewInstance>, ...props: ViewProps) {
115123
};
116124
}
117125

126+
if (__DEV__) {
127+
const onSafeAreaInsetsChange =
128+
resolvedProps.experimental_onSafeAreaInsetsChange;
129+
if (onSafeAreaInsetsChange != null) {
130+
resolvedProps.experimental_onSafeAreaInsetsChange =
131+
warnOnRepeatedSafeAreaInsetsChanges(onSafeAreaInsetsChange);
132+
}
133+
}
134+
118135
const actualView =
119136
ref == null ? (
120137
<ViewNativeComponent {...resolvedProps} />

‎packages/react-native/Libraries/Components/View/ViewPropTypes.js‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import type {
2323
LayoutRectangle,
2424
MouseEvent,
2525
PointerEvent,
26+
SafeAreaInsetsChangeEvent,
2627
} from '../../Types/CoreEventTypes';
2728
import type {
2829
AccessibilityActionEvent,
@@ -63,6 +64,28 @@ type DirectEventProps = Readonly<{
6364
*/
6465
onLayout?: ?(event: LayoutChangeEvent) => unknown,
6566

67+
/**
68+
* Invoked when the part of this view that is covered by the system UI
69+
* (status bar, navigation bar, home indicator, display cutouts, ...)
70+
* changes, with:
71+
*
72+
* `{nativeEvent: {insets: {top, right, bottom, left}}}`
73+
*
74+
* `insets` are relative to this view: an inset is only non-zero for the part
75+
* of the view that actually overlaps the system UI.
76+
*
77+
* The event is dispatched synchronously, so the rendering it schedules is
78+
* applied in the same frame the insets changed in.
79+
*
80+
* Setting this prop makes the view observe safe area changes; views without
81+
* it are unaffected.
82+
*
83+
* @experimental
84+
*/
85+
experimental_onSafeAreaInsetsChange?: ?(
86+
event: SafeAreaInsetsChangeEvent,
87+
) => unknown,
88+
6689
/**
6790
* When `accessible` is `true`, the system will invoke this function when the
6891
* user performs the magic tap gesture.

0 commit comments

Comments
 (0)