Skip to content

Commit 7ab9a54

Browse files
committed
Ensure function arity is preserved after build (#31808)
Co-authored-by: eps1lon <[email protected]> DiffTrain build for [2bd1c75](2bd1c75)
1 parent b34b7cf commit 7ab9a54

24 files changed

+235
-372
lines changed

compiled-rn/VERSION_NATIVE_FB

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
19.1.0-native-fb-6a4b46cd-20241217
1+
19.1.0-native-fb-2bd1c756-20241218

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-dev.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<46dacfae87e8ca444b422d58261e7b3e>>
10+
* @generated SignedSource<<fba8a166f0ac8f8d9fa862acb9692bd5>>
1111
*/
1212

1313
"use strict";
@@ -420,5 +420,5 @@ __DEV__ &&
420420
exports.useFormStatus = function () {
421421
return resolveDispatcher().useHostTransitionStatus();
422422
};
423-
exports.version = "19.1.0-native-fb-6a4b46cd-20241217";
423+
exports.version = "19.1.0-native-fb-2bd1c756-20241218";
424424
})();

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-prod.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<ac23bad20f89258da38fa4a147ede53b>>
10+
* @generated SignedSource<<8f0c25a2a49b4d0e8a90d09a89f1b78c>>
1111
*/
1212

1313
"use strict";
@@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) {
203203
exports.useFormStatus = function () {
204204
return ReactSharedInternals.H.useHostTransitionStatus();
205205
};
206-
exports.version = "19.1.0-native-fb-6a4b46cd-20241217";
206+
exports.version = "19.1.0-native-fb-2bd1c756-20241218";

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-profiling.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<ac23bad20f89258da38fa4a147ede53b>>
10+
* @generated SignedSource<<8f0c25a2a49b4d0e8a90d09a89f1b78c>>
1111
*/
1212

1313
"use strict";
@@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) {
203203
exports.useFormStatus = function () {
204204
return ReactSharedInternals.H.useHostTransitionStatus();
205205
};
206-
exports.version = "19.1.0-native-fb-6a4b46cd-20241217";
206+
exports.version = "19.1.0-native-fb-2bd1c756-20241218";

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-dev.js

Lines changed: 41 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<02b345bf6ce9663601cfd805efaacc85>>
10+
* @generated SignedSource<<ca0b107dbc9c3f462267dbc238f5c7c4>>
1111
*/
1212

1313
/*
@@ -7367,64 +7367,38 @@ __DEV__ &&
73677367
provider = provider.return;
73687368
}
73697369
}
7370-
function dispatchReducerAction(
7371-
fiber,
7372-
queue,
7373-
action,
7374-
JSCompiler_OptimizeArgumentsArray_p0
7375-
) {
7376-
"function" === typeof JSCompiler_OptimizeArgumentsArray_p0 &&
7370+
function dispatchReducerAction(fiber, queue, action) {
7371+
var args = arguments;
7372+
"function" === typeof args[3] &&
73777373
error$jscomp$0(
73787374
"State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()."
73797375
);
7380-
JSCompiler_OptimizeArgumentsArray_p0 = requestUpdateLane(fiber);
7381-
action = {
7382-
lane: JSCompiler_OptimizeArgumentsArray_p0,
7376+
args = requestUpdateLane(fiber);
7377+
var update = {
7378+
lane: args,
73837379
revertLane: 0,
73847380
action: action,
73857381
hasEagerState: !1,
73867382
eagerState: null,
73877383
next: null
73887384
};
73897385
isRenderPhaseUpdate(fiber)
7390-
? enqueueRenderPhaseUpdate(queue, action)
7391-
: ((action = enqueueConcurrentHookUpdate(
7392-
fiber,
7393-
queue,
7394-
action,
7395-
JSCompiler_OptimizeArgumentsArray_p0
7396-
)),
7397-
null !== action &&
7398-
(scheduleUpdateOnFiber(
7399-
action,
7400-
fiber,
7401-
JSCompiler_OptimizeArgumentsArray_p0
7402-
),
7403-
entangleTransitionUpdate(
7404-
action,
7405-
queue,
7406-
JSCompiler_OptimizeArgumentsArray_p0
7407-
)));
7408-
markStateUpdateScheduled(fiber, JSCompiler_OptimizeArgumentsArray_p0);
7409-
}
7410-
function dispatchSetState(
7411-
fiber,
7412-
queue,
7413-
action,
7414-
JSCompiler_OptimizeArgumentsArray_p1
7415-
) {
7416-
"function" === typeof JSCompiler_OptimizeArgumentsArray_p1 &&
7386+
? enqueueRenderPhaseUpdate(queue, update)
7387+
: ((update = enqueueConcurrentHookUpdate(fiber, queue, update, args)),
7388+
null !== update &&
7389+
(scheduleUpdateOnFiber(update, fiber, args),
7390+
entangleTransitionUpdate(update, queue, args)));
7391+
markStateUpdateScheduled(fiber, args);
7392+
}
7393+
function dispatchSetState(fiber, queue, action) {
7394+
var args = arguments;
7395+
"function" === typeof args[3] &&
74177396
error$jscomp$0(
74187397
"State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()."
74197398
);
7420-
JSCompiler_OptimizeArgumentsArray_p1 = requestUpdateLane(fiber);
7421-
dispatchSetStateInternal(
7422-
fiber,
7423-
queue,
7424-
action,
7425-
JSCompiler_OptimizeArgumentsArray_p1
7426-
);
7427-
markStateUpdateScheduled(fiber, JSCompiler_OptimizeArgumentsArray_p1);
7399+
args = requestUpdateLane(fiber);
7400+
dispatchSetStateInternal(fiber, queue, action, args);
7401+
markStateUpdateScheduled(fiber, args);
74287402
}
74297403
function dispatchSetStateInternal(fiber, queue, action, lane) {
74307404
var update = {
@@ -25816,52 +25790,43 @@ __DEV__ &&
2581625790
),
2581725791
lastScheduledReplayQueue = null;
2581825792
ReactDOMHydrationRoot.prototype.render = ReactDOMRoot.prototype.render =
25819-
function (children, JSCompiler_OptimizeArgumentsArray_p2) {
25793+
function (children) {
2582025794
var root = this._internalRoot;
2582125795
if (null === root) throw Error("Cannot update an unmounted root.");
25822-
"function" === typeof JSCompiler_OptimizeArgumentsArray_p2
25796+
var args = arguments;
25797+
"function" === typeof args[1]
2582325798
? error$jscomp$0(
2582425799
"does not support the second callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."
2582525800
)
25826-
: isValidContainer(JSCompiler_OptimizeArgumentsArray_p2)
25801+
: isValidContainer(args[1])
2582725802
? error$jscomp$0(
2582825803
"You passed a container to the second argument of root.render(...). You don't need to pass it again since you already passed it to create the root."
2582925804
)
25830-
: "undefined" !== typeof JSCompiler_OptimizeArgumentsArray_p2 &&
25805+
: "undefined" !== typeof args[1] &&
2583125806
error$jscomp$0(
2583225807
"You passed a second argument to root.render(...) but it only accepts one argument."
2583325808
);
25834-
JSCompiler_OptimizeArgumentsArray_p2 = root.current;
25835-
var lane = requestUpdateLane(JSCompiler_OptimizeArgumentsArray_p2);
25836-
updateContainerImpl(
25837-
JSCompiler_OptimizeArgumentsArray_p2,
25838-
lane,
25839-
children,
25840-
root,
25841-
null,
25842-
null
25843-
);
25809+
args = children;
25810+
var current = root.current,
25811+
lane = requestUpdateLane(current);
25812+
updateContainerImpl(current, lane, args, root, null, null);
2584425813
};
2584525814
ReactDOMHydrationRoot.prototype.unmount = ReactDOMRoot.prototype.unmount =
25846-
function (JSCompiler_OptimizeArgumentsArray_p3) {
25847-
"function" === typeof JSCompiler_OptimizeArgumentsArray_p3 &&
25815+
function () {
25816+
var args = arguments;
25817+
"function" === typeof args[0] &&
2584825818
error$jscomp$0(
2584925819
"does not support a callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."
2585025820
);
25851-
JSCompiler_OptimizeArgumentsArray_p3 = this._internalRoot;
25852-
if (null !== JSCompiler_OptimizeArgumentsArray_p3) {
25821+
args = this._internalRoot;
25822+
if (null !== args) {
2585325823
this._internalRoot = null;
25854-
var container = JSCompiler_OptimizeArgumentsArray_p3.containerInfo;
25824+
var container = args.containerInfo;
2585525825
(executionContext & (RenderContext | CommitContext)) !== NoContext &&
2585625826
error$jscomp$0(
2585725827
"Attempted to synchronously unmount a root while React was already rendering. React cannot finish unmounting the root until the current render has completed, which may lead to a race condition."
2585825828
);
25859-
updateContainerSync(
25860-
null,
25861-
JSCompiler_OptimizeArgumentsArray_p3,
25862-
null,
25863-
null
25864-
);
25829+
updateContainerSync(null, args, null, null);
2586525830
flushSyncWork();
2586625831
container[internalContainerInstanceKey] = null;
2586725832
}
@@ -25885,11 +25850,11 @@ __DEV__ &&
2588525850
};
2588625851
(function () {
2588725852
var isomorphicReactPackageVersion = React.version;
25888-
if ("19.1.0-native-fb-6a4b46cd-20241217" !== isomorphicReactPackageVersion)
25853+
if ("19.1.0-native-fb-2bd1c756-20241218" !== isomorphicReactPackageVersion)
2588925854
throw Error(
2589025855
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
2589125856
(isomorphicReactPackageVersion +
25892-
"\n - react-dom: 19.1.0-native-fb-6a4b46cd-20241217\nLearn more: https://react.dev/warnings/version-mismatch")
25857+
"\n - react-dom: 19.1.0-native-fb-2bd1c756-20241218\nLearn more: https://react.dev/warnings/version-mismatch")
2589325858
);
2589425859
})();
2589525860
("function" === typeof Map &&
@@ -25926,10 +25891,10 @@ __DEV__ &&
2592625891
!(function () {
2592725892
var internals = {
2592825893
bundleType: 1,
25929-
version: "19.1.0-native-fb-6a4b46cd-20241217",
25894+
version: "19.1.0-native-fb-2bd1c756-20241218",
2593025895
rendererPackageName: "react-dom",
2593125896
currentDispatcherRef: ReactSharedInternals,
25932-
reconcilerVersion: "19.1.0-native-fb-6a4b46cd-20241217"
25897+
reconcilerVersion: "19.1.0-native-fb-2bd1c756-20241218"
2593325898
};
2593425899
internals.overrideHookState = overrideHookState;
2593525900
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -26075,5 +26040,5 @@ __DEV__ &&
2607526040
listenToAllSupportedEvents(container);
2607626041
return new ReactDOMHydrationRoot(initialChildren);
2607726042
};
26078-
exports.version = "19.1.0-native-fb-6a4b46cd-20241217";
26043+
exports.version = "19.1.0-native-fb-2bd1c756-20241218";
2607926044
})();

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-prod.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<c34f2186f82f671d1328c7425fe688ea>>
10+
* @generated SignedSource<<d916b5d7689da5942d203dcceac528e1>>
1111
*/
1212

1313
/*
@@ -15869,14 +15869,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
1586915869
};
1587015870
var isomorphicReactPackageVersion$jscomp$inline_1724 = React.version;
1587115871
if (
15872-
"19.1.0-native-fb-6a4b46cd-20241217" !==
15872+
"19.1.0-native-fb-2bd1c756-20241218" !==
1587315873
isomorphicReactPackageVersion$jscomp$inline_1724
1587415874
)
1587515875
throw Error(
1587615876
formatProdErrorMessage(
1587715877
527,
1587815878
isomorphicReactPackageVersion$jscomp$inline_1724,
15879-
"19.1.0-native-fb-6a4b46cd-20241217"
15879+
"19.1.0-native-fb-2bd1c756-20241218"
1588015880
)
1588115881
);
1588215882
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -15898,10 +15898,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
1589815898
};
1589915899
var internals$jscomp$inline_2179 = {
1590015900
bundleType: 0,
15901-
version: "19.1.0-native-fb-6a4b46cd-20241217",
15901+
version: "19.1.0-native-fb-2bd1c756-20241218",
1590215902
rendererPackageName: "react-dom",
1590315903
currentDispatcherRef: ReactSharedInternals,
15904-
reconcilerVersion: "19.1.0-native-fb-6a4b46cd-20241217"
15904+
reconcilerVersion: "19.1.0-native-fb-2bd1c756-20241218"
1590515905
};
1590615906
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
1590715907
var hook$jscomp$inline_2180 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -16007,4 +16007,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
1600716007
listenToAllSupportedEvents(container);
1600816008
return new ReactDOMHydrationRoot(initialChildren);
1600916009
};
16010-
exports.version = "19.1.0-native-fb-6a4b46cd-20241217";
16010+
exports.version = "19.1.0-native-fb-2bd1c756-20241218";

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-profiling.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<3bb31c69bf2cc763098612269dfeb872>>
10+
* @generated SignedSource<<a812177f6205beaf48bc62277bc322ea>>
1111
*/
1212

1313
/*
@@ -16522,14 +16522,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
1652216522
};
1652316523
var isomorphicReactPackageVersion$jscomp$inline_1814 = React.version;
1652416524
if (
16525-
"19.1.0-native-fb-6a4b46cd-20241217" !==
16525+
"19.1.0-native-fb-2bd1c756-20241218" !==
1652616526
isomorphicReactPackageVersion$jscomp$inline_1814
1652716527
)
1652816528
throw Error(
1652916529
formatProdErrorMessage(
1653016530
527,
1653116531
isomorphicReactPackageVersion$jscomp$inline_1814,
16532-
"19.1.0-native-fb-6a4b46cd-20241217"
16532+
"19.1.0-native-fb-2bd1c756-20241218"
1653316533
)
1653416534
);
1653516535
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -16551,10 +16551,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
1655116551
};
1655216552
var internals$jscomp$inline_1821 = {
1655316553
bundleType: 0,
16554-
version: "19.1.0-native-fb-6a4b46cd-20241217",
16554+
version: "19.1.0-native-fb-2bd1c756-20241218",
1655516555
rendererPackageName: "react-dom",
1655616556
currentDispatcherRef: ReactSharedInternals,
16557-
reconcilerVersion: "19.1.0-native-fb-6a4b46cd-20241217",
16557+
reconcilerVersion: "19.1.0-native-fb-2bd1c756-20241218",
1655816558
getLaneLabelMap: function () {
1655916559
for (
1656016560
var map = new Map(), lane = 1, index$292 = 0;
@@ -16675,4 +16675,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
1667516675
listenToAllSupportedEvents(container);
1667616676
return new ReactDOMHydrationRoot(initialChildren);
1667716677
};
16678-
exports.version = "19.1.0-native-fb-6a4b46cd-20241217";
16678+
exports.version = "19.1.0-native-fb-2bd1c756-20241218";

0 commit comments

Comments
 (0)