Skip to content

Commit

Permalink
Ensure function arity is preserved after build (#31808)
Browse files Browse the repository at this point in the history
Co-authored-by: eps1lon <[email protected]>

DiffTrain build for [2bd1c75](2bd1c75)
  • Loading branch information
eps1lon committed Dec 18, 2024
1 parent b34b7cf commit 7ab9a54
Show file tree
Hide file tree
Showing 24 changed files with 235 additions and 372 deletions.
2 changes: 1 addition & 1 deletion compiled-rn/VERSION_NATIVE_FB
Original file line number Diff line number Diff line change
@@ -1 +1 @@
19.1.0-native-fb-6a4b46cd-20241217
19.1.0-native-fb-2bd1c756-20241218
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<46dacfae87e8ca444b422d58261e7b3e>>
* @generated SignedSource<<fba8a166f0ac8f8d9fa862acb9692bd5>>
*/

"use strict";
Expand Down Expand Up @@ -420,5 +420,5 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.1.0-native-fb-6a4b46cd-20241217";
exports.version = "19.1.0-native-fb-2bd1c756-20241218";
})();
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<ac23bad20f89258da38fa4a147ede53b>>
* @generated SignedSource<<8f0c25a2a49b4d0e8a90d09a89f1b78c>>
*/

"use strict";
Expand Down Expand Up @@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.1.0-native-fb-6a4b46cd-20241217";
exports.version = "19.1.0-native-fb-2bd1c756-20241218";
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<ac23bad20f89258da38fa4a147ede53b>>
* @generated SignedSource<<8f0c25a2a49b4d0e8a90d09a89f1b78c>>
*/

"use strict";
Expand Down Expand Up @@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.1.0-native-fb-6a4b46cd-20241217";
exports.version = "19.1.0-native-fb-2bd1c756-20241218";
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<02b345bf6ce9663601cfd805efaacc85>>
* @generated SignedSource<<ca0b107dbc9c3f462267dbc238f5c7c4>>
*/

/*
Expand Down Expand Up @@ -7367,64 +7367,38 @@ __DEV__ &&
provider = provider.return;
}
}
function dispatchReducerAction(
fiber,
queue,
action,
JSCompiler_OptimizeArgumentsArray_p0
) {
"function" === typeof JSCompiler_OptimizeArgumentsArray_p0 &&
function dispatchReducerAction(fiber, queue, action) {
var args = arguments;
"function" === typeof args[3] &&
error$jscomp$0(
"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()."
);
JSCompiler_OptimizeArgumentsArray_p0 = requestUpdateLane(fiber);
action = {
lane: JSCompiler_OptimizeArgumentsArray_p0,
args = requestUpdateLane(fiber);
var update = {
lane: args,
revertLane: 0,
action: action,
hasEagerState: !1,
eagerState: null,
next: null
};
isRenderPhaseUpdate(fiber)
? enqueueRenderPhaseUpdate(queue, action)
: ((action = enqueueConcurrentHookUpdate(
fiber,
queue,
action,
JSCompiler_OptimizeArgumentsArray_p0
)),
null !== action &&
(scheduleUpdateOnFiber(
action,
fiber,
JSCompiler_OptimizeArgumentsArray_p0
),
entangleTransitionUpdate(
action,
queue,
JSCompiler_OptimizeArgumentsArray_p0
)));
markStateUpdateScheduled(fiber, JSCompiler_OptimizeArgumentsArray_p0);
}
function dispatchSetState(
fiber,
queue,
action,
JSCompiler_OptimizeArgumentsArray_p1
) {
"function" === typeof JSCompiler_OptimizeArgumentsArray_p1 &&
? enqueueRenderPhaseUpdate(queue, update)
: ((update = enqueueConcurrentHookUpdate(fiber, queue, update, args)),
null !== update &&
(scheduleUpdateOnFiber(update, fiber, args),
entangleTransitionUpdate(update, queue, args)));
markStateUpdateScheduled(fiber, args);
}
function dispatchSetState(fiber, queue, action) {
var args = arguments;
"function" === typeof args[3] &&
error$jscomp$0(
"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()."
);
JSCompiler_OptimizeArgumentsArray_p1 = requestUpdateLane(fiber);
dispatchSetStateInternal(
fiber,
queue,
action,
JSCompiler_OptimizeArgumentsArray_p1
);
markStateUpdateScheduled(fiber, JSCompiler_OptimizeArgumentsArray_p1);
args = requestUpdateLane(fiber);
dispatchSetStateInternal(fiber, queue, action, args);
markStateUpdateScheduled(fiber, args);
}
function dispatchSetStateInternal(fiber, queue, action, lane) {
var update = {
Expand Down Expand Up @@ -25816,52 +25790,43 @@ __DEV__ &&
),
lastScheduledReplayQueue = null;
ReactDOMHydrationRoot.prototype.render = ReactDOMRoot.prototype.render =
function (children, JSCompiler_OptimizeArgumentsArray_p2) {
function (children) {
var root = this._internalRoot;
if (null === root) throw Error("Cannot update an unmounted root.");
"function" === typeof JSCompiler_OptimizeArgumentsArray_p2
var args = arguments;
"function" === typeof args[1]
? error$jscomp$0(
"does not support the second callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."
)
: isValidContainer(JSCompiler_OptimizeArgumentsArray_p2)
: isValidContainer(args[1])
? error$jscomp$0(
"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."
)
: "undefined" !== typeof JSCompiler_OptimizeArgumentsArray_p2 &&
: "undefined" !== typeof args[1] &&
error$jscomp$0(
"You passed a second argument to root.render(...) but it only accepts one argument."
);
JSCompiler_OptimizeArgumentsArray_p2 = root.current;
var lane = requestUpdateLane(JSCompiler_OptimizeArgumentsArray_p2);
updateContainerImpl(
JSCompiler_OptimizeArgumentsArray_p2,
lane,
children,
root,
null,
null
);
args = children;
var current = root.current,
lane = requestUpdateLane(current);
updateContainerImpl(current, lane, args, root, null, null);
};
ReactDOMHydrationRoot.prototype.unmount = ReactDOMRoot.prototype.unmount =
function (JSCompiler_OptimizeArgumentsArray_p3) {
"function" === typeof JSCompiler_OptimizeArgumentsArray_p3 &&
function () {
var args = arguments;
"function" === typeof args[0] &&
error$jscomp$0(
"does not support a callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."
);
JSCompiler_OptimizeArgumentsArray_p3 = this._internalRoot;
if (null !== JSCompiler_OptimizeArgumentsArray_p3) {
args = this._internalRoot;
if (null !== args) {
this._internalRoot = null;
var container = JSCompiler_OptimizeArgumentsArray_p3.containerInfo;
var container = args.containerInfo;
(executionContext & (RenderContext | CommitContext)) !== NoContext &&
error$jscomp$0(
"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."
);
updateContainerSync(
null,
JSCompiler_OptimizeArgumentsArray_p3,
null,
null
);
updateContainerSync(null, args, null, null);
flushSyncWork();
container[internalContainerInstanceKey] = null;
}
Expand All @@ -25885,11 +25850,11 @@ __DEV__ &&
};
(function () {
var isomorphicReactPackageVersion = React.version;
if ("19.1.0-native-fb-6a4b46cd-20241217" !== isomorphicReactPackageVersion)
if ("19.1.0-native-fb-2bd1c756-20241218" !== isomorphicReactPackageVersion)
throw Error(
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
(isomorphicReactPackageVersion +
"\n - react-dom: 19.1.0-native-fb-6a4b46cd-20241217\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-dom: 19.1.0-native-fb-2bd1c756-20241218\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
Expand Down Expand Up @@ -25926,10 +25891,10 @@ __DEV__ &&
!(function () {
var internals = {
bundleType: 1,
version: "19.1.0-native-fb-6a4b46cd-20241217",
version: "19.1.0-native-fb-2bd1c756-20241218",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-native-fb-6a4b46cd-20241217"
reconcilerVersion: "19.1.0-native-fb-2bd1c756-20241218"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
Expand Down Expand Up @@ -26075,5 +26040,5 @@ __DEV__ &&
listenToAllSupportedEvents(container);
return new ReactDOMHydrationRoot(initialChildren);
};
exports.version = "19.1.0-native-fb-6a4b46cd-20241217";
exports.version = "19.1.0-native-fb-2bd1c756-20241218";
})();
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<c34f2186f82f671d1328c7425fe688ea>>
* @generated SignedSource<<d916b5d7689da5942d203dcceac528e1>>
*/

/*
Expand Down Expand Up @@ -15869,14 +15869,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
};
var isomorphicReactPackageVersion$jscomp$inline_1724 = React.version;
if (
"19.1.0-native-fb-6a4b46cd-20241217" !==
"19.1.0-native-fb-2bd1c756-20241218" !==
isomorphicReactPackageVersion$jscomp$inline_1724
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1724,
"19.1.0-native-fb-6a4b46cd-20241217"
"19.1.0-native-fb-2bd1c756-20241218"
)
);
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
Expand All @@ -15898,10 +15898,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
};
var internals$jscomp$inline_2179 = {
bundleType: 0,
version: "19.1.0-native-fb-6a4b46cd-20241217",
version: "19.1.0-native-fb-2bd1c756-20241218",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-native-fb-6a4b46cd-20241217"
reconcilerVersion: "19.1.0-native-fb-2bd1c756-20241218"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2180 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down Expand Up @@ -16007,4 +16007,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
listenToAllSupportedEvents(container);
return new ReactDOMHydrationRoot(initialChildren);
};
exports.version = "19.1.0-native-fb-6a4b46cd-20241217";
exports.version = "19.1.0-native-fb-2bd1c756-20241218";
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<3bb31c69bf2cc763098612269dfeb872>>
* @generated SignedSource<<a812177f6205beaf48bc62277bc322ea>>
*/

/*
Expand Down Expand Up @@ -16522,14 +16522,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
};
var isomorphicReactPackageVersion$jscomp$inline_1814 = React.version;
if (
"19.1.0-native-fb-6a4b46cd-20241217" !==
"19.1.0-native-fb-2bd1c756-20241218" !==
isomorphicReactPackageVersion$jscomp$inline_1814
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1814,
"19.1.0-native-fb-6a4b46cd-20241217"
"19.1.0-native-fb-2bd1c756-20241218"
)
);
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
Expand All @@ -16551,10 +16551,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
};
var internals$jscomp$inline_1821 = {
bundleType: 0,
version: "19.1.0-native-fb-6a4b46cd-20241217",
version: "19.1.0-native-fb-2bd1c756-20241218",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-native-fb-6a4b46cd-20241217",
reconcilerVersion: "19.1.0-native-fb-2bd1c756-20241218",
getLaneLabelMap: function () {
for (
var map = new Map(), lane = 1, index$292 = 0;
Expand Down Expand Up @@ -16675,4 +16675,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
listenToAllSupportedEvents(container);
return new ReactDOMHydrationRoot(initialChildren);
};
exports.version = "19.1.0-native-fb-6a4b46cd-20241217";
exports.version = "19.1.0-native-fb-2bd1c756-20241218";
Loading

0 comments on commit 7ab9a54

Please sign in to comment.