Handle fabric root level fragment with compareDocumentPosition (#34533)

The root instance doesn't have a canonical property so we were not
returning a public instance that we can call compareDocumentPosition on
when a Fragment had no other host parent in Fabric. In this case we need
to get the ReactNativeElement from the ReactNativeDocument.

I've also added test coverage for this case in DOM for consistency,
though it was already working there because we use DOM elements as root.
This same test will be copied to RN using Fantom.

DiffTrain build for [83c88ad470](https://github.com/facebook/react/commit/83c88ad470d680060f807ef81ed4c14b3b71fd3b)
This commit is contained in:
jackpope
2025-09-23 08:03:02 -07:00
parent cc7cac5538
commit be952bbae2
24 changed files with 170 additions and 185 deletions
+1 -1
View File
@@ -1 +1 @@
19.2.0-native-fb-720bb130-20250922
19.2.0-native-fb-83c88ad4-20250923
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<e2c3a6d6120e131282a29302357c4829>>
* @generated SignedSource<<a60917f117c065916a594b76e28c0e95>>
*/
"use strict";
@@ -404,5 +404,5 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.2.0-native-fb-720bb130-20250922";
exports.version = "19.2.0-native-fb-83c88ad4-20250923";
})();
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<68b64643c8163c3183a50e2203ca85a0>>
* @generated SignedSource<<d852c0a8dc885d19ad24f32dae025670>>
*/
"use strict";
@@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.2.0-native-fb-720bb130-20250922";
exports.version = "19.2.0-native-fb-83c88ad4-20250923";
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<68b64643c8163c3183a50e2203ca85a0>>
* @generated SignedSource<<d852c0a8dc885d19ad24f32dae025670>>
*/
"use strict";
@@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.2.0-native-fb-720bb130-20250922";
exports.version = "19.2.0-native-fb-83c88ad4-20250923";
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<cac287fa200d4ca597d9eb14e76b2ffb>>
* @generated SignedSource<<9afdaab737b4532bdc5238d781909377>>
*/
/*
@@ -29923,11 +29923,11 @@ __DEV__ &&
};
(function () {
var isomorphicReactPackageVersion = React.version;
if ("19.2.0-native-fb-720bb130-20250922" !== isomorphicReactPackageVersion)
if ("19.2.0-native-fb-83c88ad4-20250923" !== 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.2.0-native-fb-720bb130-20250922\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-dom: 19.2.0-native-fb-83c88ad4-20250923\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
@@ -29964,10 +29964,10 @@ __DEV__ &&
!(function () {
var internals = {
bundleType: 1,
version: "19.2.0-native-fb-720bb130-20250922",
version: "19.2.0-native-fb-83c88ad4-20250923",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-720bb130-20250922"
reconcilerVersion: "19.2.0-native-fb-83c88ad4-20250923"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -30116,5 +30116,5 @@ __DEV__ &&
listenToAllSupportedEvents(container);
return new ReactDOMHydrationRoot(initialChildren);
};
exports.version = "19.2.0-native-fb-720bb130-20250922";
exports.version = "19.2.0-native-fb-83c88ad4-20250923";
})();
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<43f258e98e350171a9b847b8964bc0ae>>
* @generated SignedSource<<d19b05dee13081d2ce6ac205b90af7f9>>
*/
/*
@@ -17529,14 +17529,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
};
var isomorphicReactPackageVersion$jscomp$inline_2052 = React.version;
if (
"19.2.0-native-fb-720bb130-20250922" !==
"19.2.0-native-fb-83c88ad4-20250923" !==
isomorphicReactPackageVersion$jscomp$inline_2052
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_2052,
"19.2.0-native-fb-720bb130-20250922"
"19.2.0-native-fb-83c88ad4-20250923"
)
);
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -17558,10 +17558,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
};
var internals$jscomp$inline_2625 = {
bundleType: 0,
version: "19.2.0-native-fb-720bb130-20250922",
version: "19.2.0-native-fb-83c88ad4-20250923",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-720bb130-20250922"
reconcilerVersion: "19.2.0-native-fb-83c88ad4-20250923"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2626 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -17668,4 +17668,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
listenToAllSupportedEvents(container);
return new ReactDOMHydrationRoot(initialChildren);
};
exports.version = "19.2.0-native-fb-720bb130-20250922";
exports.version = "19.2.0-native-fb-83c88ad4-20250923";
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<2a7c96e08f1a65dcc5ce5036b3d91baf>>
* @generated SignedSource<<2176a293b309a694f96f1b6f642f1287>>
*/
/*
@@ -19624,14 +19624,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
};
var isomorphicReactPackageVersion$jscomp$inline_2323 = React.version;
if (
"19.2.0-native-fb-720bb130-20250922" !==
"19.2.0-native-fb-83c88ad4-20250923" !==
isomorphicReactPackageVersion$jscomp$inline_2323
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_2323,
"19.2.0-native-fb-720bb130-20250922"
"19.2.0-native-fb-83c88ad4-20250923"
)
);
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -19653,10 +19653,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
};
var internals$jscomp$inline_2330 = {
bundleType: 0,
version: "19.2.0-native-fb-720bb130-20250922",
version: "19.2.0-native-fb-83c88ad4-20250923",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-720bb130-20250922",
reconcilerVersion: "19.2.0-native-fb-83c88ad4-20250923",
getLaneLabelMap: function () {
for (
var map = new Map(), lane = 1, index$325 = 0;
@@ -19779,4 +19779,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
listenToAllSupportedEvents(container);
return new ReactDOMHydrationRoot(initialChildren);
};
exports.version = "19.2.0-native-fb-720bb130-20250922";
exports.version = "19.2.0-native-fb-83c88ad4-20250923";
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<0aceb7d61968f0f74282f2603c1edfbd>>
* @generated SignedSource<<42c3c6aeb85be0b40d30dbe9ea4b52eb>>
*/
/*
@@ -29979,11 +29979,11 @@ __DEV__ &&
};
(function () {
var isomorphicReactPackageVersion = React.version;
if ("19.2.0-native-fb-720bb130-20250922" !== isomorphicReactPackageVersion)
if ("19.2.0-native-fb-83c88ad4-20250923" !== 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.2.0-native-fb-720bb130-20250922\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-dom: 19.2.0-native-fb-83c88ad4-20250923\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
@@ -30020,10 +30020,10 @@ __DEV__ &&
!(function () {
var internals = {
bundleType: 1,
version: "19.2.0-native-fb-720bb130-20250922",
version: "19.2.0-native-fb-83c88ad4-20250923",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-720bb130-20250922"
reconcilerVersion: "19.2.0-native-fb-83c88ad4-20250923"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -30488,7 +30488,7 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.2.0-native-fb-720bb130-20250922";
exports.version = "19.2.0-native-fb-83c88ad4-20250923";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<b1194292c80342ffa34505d89177bbbd>>
* @generated SignedSource<<ca6e991c16154ce7a5db8116b6b34d8f>>
*/
/*
@@ -17540,14 +17540,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
};
var isomorphicReactPackageVersion$jscomp$inline_2053 = React.version;
if (
"19.2.0-native-fb-720bb130-20250922" !==
"19.2.0-native-fb-83c88ad4-20250923" !==
isomorphicReactPackageVersion$jscomp$inline_2053
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_2053,
"19.2.0-native-fb-720bb130-20250922"
"19.2.0-native-fb-83c88ad4-20250923"
)
);
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -17569,10 +17569,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
};
var internals$jscomp$inline_2628 = {
bundleType: 0,
version: "19.2.0-native-fb-720bb130-20250922",
version: "19.2.0-native-fb-83c88ad4-20250923",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-720bb130-20250922"
reconcilerVersion: "19.2.0-native-fb-83c88ad4-20250923"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2629 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -17832,4 +17832,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.2.0-native-fb-720bb130-20250922";
exports.version = "19.2.0-native-fb-83c88ad4-20250923";
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<351b3d57ec4d1611aec6e49be227151c>>
* @generated SignedSource<<82a1b27c82f245c2db8611424d8ee805>>
*/
/*
@@ -19639,14 +19639,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
};
var isomorphicReactPackageVersion$jscomp$inline_2324 = React.version;
if (
"19.2.0-native-fb-720bb130-20250922" !==
"19.2.0-native-fb-83c88ad4-20250923" !==
isomorphicReactPackageVersion$jscomp$inline_2324
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_2324,
"19.2.0-native-fb-720bb130-20250922"
"19.2.0-native-fb-83c88ad4-20250923"
)
);
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -19668,10 +19668,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
};
var internals$jscomp$inline_2331 = {
bundleType: 0,
version: "19.2.0-native-fb-720bb130-20250922",
version: "19.2.0-native-fb-83c88ad4-20250923",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-720bb130-20250922",
reconcilerVersion: "19.2.0-native-fb-83c88ad4-20250923",
getLaneLabelMap: function () {
for (
var map = new Map(), lane = 1, index$325 = 0;
@@ -19947,7 +19947,7 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.2.0-native-fb-720bb130-20250922";
exports.version = "19.2.0-native-fb-83c88ad4-20250923";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<bc4ee7b4912af67b0f82a8920af7a688>>
* @generated SignedSource<<c812802ace7cab20c4c1ea0ef398427c>>
*/
"use strict";
@@ -15920,10 +15920,10 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
version: "19.2.0-native-fb-720bb130-20250922",
version: "19.2.0-native-fb-83c88ad4-20250923",
rendererPackageName: "react-test-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-720bb130-20250922"
reconcilerVersion: "19.2.0-native-fb-83c88ad4-20250923"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -16068,5 +16068,5 @@ __DEV__ &&
flushSyncWorkAcrossRoots_impl(0, !0));
}
};
exports.version = "19.2.0-native-fb-720bb130-20250922";
exports.version = "19.2.0-native-fb-83c88ad4-20250923";
})();
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<8f52aeee4fa7e23a5eb1efb381a03c56>>
* @generated SignedSource<<c29c2d8cfa300a1a91c610a738d7cefe>>
*/
"use strict";
@@ -10054,10 +10054,10 @@ function wrapFiber(fiber) {
}
var internals$jscomp$inline_1482 = {
bundleType: 0,
version: "19.2.0-native-fb-720bb130-20250922",
version: "19.2.0-native-fb-83c88ad4-20250923",
rendererPackageName: "react-test-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-720bb130-20250922"
reconcilerVersion: "19.2.0-native-fb-83c88ad4-20250923"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1483 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -10193,4 +10193,4 @@ exports.unstable_batchedUpdates = function (fn, a) {
flushSyncWorkAcrossRoots_impl(0, !0));
}
};
exports.version = "19.2.0-native-fb-720bb130-20250922";
exports.version = "19.2.0-native-fb-83c88ad4-20250923";
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<836c5b89e0122fa6aac0117d09931265>>
* @generated SignedSource<<0229b9dd91c1000fb8aee1444f35f690>>
*/
"use strict";
@@ -10675,10 +10675,10 @@ function wrapFiber(fiber) {
}
var internals$jscomp$inline_1267 = {
bundleType: 0,
version: "19.2.0-native-fb-720bb130-20250922",
version: "19.2.0-native-fb-83c88ad4-20250923",
rendererPackageName: "react-test-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-720bb130-20250922",
reconcilerVersion: "19.2.0-native-fb-83c88ad4-20250923",
getLaneLabelMap: function () {
for (
var map = new Map(), lane = 1, index$145 = 0;
@@ -10829,4 +10829,4 @@ exports.unstable_batchedUpdates = function (fn, a) {
flushSyncWorkAcrossRoots_impl(0, !0));
}
};
exports.version = "19.2.0-native-fb-720bb130-20250922";
exports.version = "19.2.0-native-fb-83c88ad4-20250923";
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<7732cfbffc0a7e6f04b0f42b5c1a0379>>
* @generated SignedSource<<3ab34f8bbbdc50892ae523c0909c3238>>
*/
"use strict";
@@ -1398,7 +1398,7 @@ __DEV__ &&
exports.useTransition = function () {
return resolveDispatcher().useTransition();
};
exports.version = "19.2.0-native-fb-720bb130-20250922";
exports.version = "19.2.0-native-fb-83c88ad4-20250923";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<0e63f043e1ec7b2020b25926eb3564c1>>
* @generated SignedSource<<78a5b21f3d8362384d7533bcdfe4dba7>>
*/
"use strict";
@@ -581,4 +581,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.2.0-native-fb-720bb130-20250922";
exports.version = "19.2.0-native-fb-83c88ad4-20250923";
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<6e4ca6d454385c233dfc61d580de146a>>
* @generated SignedSource<<f1aff6b07ebf07cde6cf09a5fc8ac7d7>>
*/
"use strict";
@@ -585,7 +585,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.2.0-native-fb-720bb130-20250922";
exports.version = "19.2.0-native-fb-83c88ad4-20250923";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
@@ -1 +1 @@
720bb130694169f8d1bf1e8001a2177dd18cdf92
83c88ad470d680060f807ef81ed4c14b3b71fd3b
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<222457fca27889b8b1b03135ab424542>>
* @generated SignedSource<<5ea87b1cf1de1467b3f3aae37b8df9a3>>
*/
"use strict";
@@ -16777,21 +16777,16 @@ __DEV__ &&
}
return instance.canonical.publicInstance;
}
return null != instance._nativeTag ? instance : null;
return null != instance.containerInfo &&
null != instance.containerInfo.publicInstance
? instance.containerInfo.publicInstance
: null != instance._nativeTag
? instance
: null;
}
function getPublicInstanceFromHostFiber(fiber) {
a: switch (fiber.tag) {
case 5:
fiber = fiber.stateNode;
break a;
case 3:
fiber = fiber.stateNode.containerInfo;
break a;
default:
throw Error("Expected to find a host node. This is a bug in React.");
}
fiber = getPublicInstance(fiber);
if (null == fiber)
fiber = getPublicInstance(fiber.stateNode);
if (null === fiber)
throw Error("Expected to find a host node. This is a bug in React.");
return fiber;
}
@@ -19741,7 +19736,6 @@ __DEV__ &&
parentHostFiber = null;
}
if (null === parentHostFiber) return Node.DOCUMENT_POSITION_DISCONNECTED;
parentHostFiber = getPublicInstanceFromHostFiber(parentHostFiber);
var children = [];
traverseVisibleHostChildren(
this._fragmentFiber.child,
@@ -19752,6 +19746,7 @@ __DEV__ &&
void 0
);
if (0 === children.length) {
parentHostFiber = getPublicInstanceFromHostFiber(parentHostFiber);
children = this._fragmentFiber;
var parentResult = parentHostFiber.compareDocumentPosition(otherNode);
var result = parentResult;
@@ -19876,10 +19871,10 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
version: "19.2.0-native-fb-720bb130-20250922",
version: "19.2.0-native-fb-83c88ad4-20250923",
rendererPackageName: "react-native-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-720bb130-20250922"
reconcilerVersion: "19.2.0-native-fb-83c88ad4-20250923"
};
null !== extraDevToolsConfig &&
(internals.rendererConfig = extraDevToolsConfig);
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<591822dc855ad664167d7117286302fd>>
* @generated SignedSource<<63147b3afdb8df1cb72b9cdffb659230>>
*/
"use strict";
@@ -1243,7 +1243,7 @@ eventPluginOrder = Array.prototype.slice.call([
"ReactNativeBridgeEventPlugin"
]);
recomputePluginOrdering();
var injectedNamesToPlugins$jscomp$inline_283 = {
var injectedNamesToPlugins$jscomp$inline_282 = {
ResponderEventPlugin: ResponderEventPlugin,
ReactNativeBridgeEventPlugin: {
eventTypes: {},
@@ -1289,32 +1289,32 @@ var injectedNamesToPlugins$jscomp$inline_283 = {
}
}
},
isOrderingDirty$jscomp$inline_284 = !1,
pluginName$jscomp$inline_285;
for (pluginName$jscomp$inline_285 in injectedNamesToPlugins$jscomp$inline_283)
isOrderingDirty$jscomp$inline_283 = !1,
pluginName$jscomp$inline_284;
for (pluginName$jscomp$inline_284 in injectedNamesToPlugins$jscomp$inline_282)
if (
injectedNamesToPlugins$jscomp$inline_283.hasOwnProperty(
pluginName$jscomp$inline_285
injectedNamesToPlugins$jscomp$inline_282.hasOwnProperty(
pluginName$jscomp$inline_284
)
) {
var pluginModule$jscomp$inline_286 =
injectedNamesToPlugins$jscomp$inline_283[pluginName$jscomp$inline_285];
var pluginModule$jscomp$inline_285 =
injectedNamesToPlugins$jscomp$inline_282[pluginName$jscomp$inline_284];
if (
!namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_285) ||
namesToPlugins[pluginName$jscomp$inline_285] !==
pluginModule$jscomp$inline_286
!namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_284) ||
namesToPlugins[pluginName$jscomp$inline_284] !==
pluginModule$jscomp$inline_285
) {
if (namesToPlugins[pluginName$jscomp$inline_285])
if (namesToPlugins[pluginName$jscomp$inline_284])
throw Error(
"EventPluginRegistry: Cannot inject two different event plugins using the same name, `" +
(pluginName$jscomp$inline_285 + "`.")
(pluginName$jscomp$inline_284 + "`.")
);
namesToPlugins[pluginName$jscomp$inline_285] =
pluginModule$jscomp$inline_286;
isOrderingDirty$jscomp$inline_284 = !0;
namesToPlugins[pluginName$jscomp$inline_284] =
pluginModule$jscomp$inline_285;
isOrderingDirty$jscomp$inline_283 = !0;
}
}
isOrderingDirty$jscomp$inline_284 && recomputePluginOrdering();
isOrderingDirty$jscomp$inline_283 && recomputePluginOrdering();
function batchedUpdatesImpl(fn, bookkeeping) {
return fn(bookkeeping);
}
@@ -10963,21 +10963,16 @@ function getPublicInstance(instance) {
}
return instance.canonical.publicInstance;
}
return null != instance._nativeTag ? instance : null;
return null != instance.containerInfo &&
null != instance.containerInfo.publicInstance
? instance.containerInfo.publicInstance
: null != instance._nativeTag
? instance
: null;
}
function getPublicInstanceFromHostFiber(fiber) {
a: switch (fiber.tag) {
case 5:
fiber = fiber.stateNode;
break a;
case 3:
fiber = fiber.stateNode.containerInfo;
break a;
default:
throw Error("Expected to find a host node. This is a bug in React.");
}
fiber = getPublicInstance(fiber);
if (null == fiber)
fiber = getPublicInstance(fiber.stateNode);
if (null === fiber)
throw Error("Expected to find a host node. This is a bug in React.");
return fiber;
}
@@ -11070,9 +11065,6 @@ FragmentInstance.prototype.compareDocumentPosition = function (otherNode) {
}
if (null === JSCompiler_inline_result)
return Node.DOCUMENT_POSITION_DISCONNECTED;
JSCompiler_inline_result = getPublicInstanceFromHostFiber(
JSCompiler_inline_result
);
var children = [];
traverseVisibleHostChildren(
this._fragmentFiber.child,
@@ -11083,6 +11075,9 @@ FragmentInstance.prototype.compareDocumentPosition = function (otherNode) {
void 0
);
if (0 === children.length) {
JSCompiler_inline_result = getPublicInstanceFromHostFiber(
JSCompiler_inline_result
);
children = this._fragmentFiber;
var parentResult =
JSCompiler_inline_result.compareDocumentPosition(otherNode);
@@ -11218,26 +11213,26 @@ batchedUpdatesImpl = function (fn, a) {
}
};
var roots = new Map(),
internals$jscomp$inline_1311 = {
internals$jscomp$inline_1308 = {
bundleType: 0,
version: "19.2.0-native-fb-720bb130-20250922",
version: "19.2.0-native-fb-83c88ad4-20250923",
rendererPackageName: "react-native-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-720bb130-20250922"
reconcilerVersion: "19.2.0-native-fb-83c88ad4-20250923"
};
null !== extraDevToolsConfig &&
(internals$jscomp$inline_1311.rendererConfig = extraDevToolsConfig);
(internals$jscomp$inline_1308.rendererConfig = extraDevToolsConfig);
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1641 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
var hook$jscomp$inline_1638 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
if (
!hook$jscomp$inline_1641.isDisabled &&
hook$jscomp$inline_1641.supportsFiber
!hook$jscomp$inline_1638.isDisabled &&
hook$jscomp$inline_1638.supportsFiber
)
try {
(rendererID = hook$jscomp$inline_1641.inject(
internals$jscomp$inline_1311
(rendererID = hook$jscomp$inline_1638.inject(
internals$jscomp$inline_1308
)),
(injectedHook = hook$jscomp$inline_1641);
(injectedHook = hook$jscomp$inline_1638);
} catch (err) {}
}
exports.createPortal = function (children, containerTag) {
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<47fe1d409f5d1eda09ee77bfb437e5d2>>
* @generated SignedSource<<f877dbf05e56b62ef52e2fc54f25872d>>
*/
"use strict";
@@ -1249,7 +1249,7 @@ eventPluginOrder = Array.prototype.slice.call([
"ReactNativeBridgeEventPlugin"
]);
recomputePluginOrdering();
var injectedNamesToPlugins$jscomp$inline_322 = {
var injectedNamesToPlugins$jscomp$inline_321 = {
ResponderEventPlugin: ResponderEventPlugin,
ReactNativeBridgeEventPlugin: {
eventTypes: {},
@@ -1295,32 +1295,32 @@ var injectedNamesToPlugins$jscomp$inline_322 = {
}
}
},
isOrderingDirty$jscomp$inline_323 = !1,
pluginName$jscomp$inline_324;
for (pluginName$jscomp$inline_324 in injectedNamesToPlugins$jscomp$inline_322)
isOrderingDirty$jscomp$inline_322 = !1,
pluginName$jscomp$inline_323;
for (pluginName$jscomp$inline_323 in injectedNamesToPlugins$jscomp$inline_321)
if (
injectedNamesToPlugins$jscomp$inline_322.hasOwnProperty(
pluginName$jscomp$inline_324
injectedNamesToPlugins$jscomp$inline_321.hasOwnProperty(
pluginName$jscomp$inline_323
)
) {
var pluginModule$jscomp$inline_325 =
injectedNamesToPlugins$jscomp$inline_322[pluginName$jscomp$inline_324];
var pluginModule$jscomp$inline_324 =
injectedNamesToPlugins$jscomp$inline_321[pluginName$jscomp$inline_323];
if (
!namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_324) ||
namesToPlugins[pluginName$jscomp$inline_324] !==
pluginModule$jscomp$inline_325
!namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_323) ||
namesToPlugins[pluginName$jscomp$inline_323] !==
pluginModule$jscomp$inline_324
) {
if (namesToPlugins[pluginName$jscomp$inline_324])
if (namesToPlugins[pluginName$jscomp$inline_323])
throw Error(
"EventPluginRegistry: Cannot inject two different event plugins using the same name, `" +
(pluginName$jscomp$inline_324 + "`.")
(pluginName$jscomp$inline_323 + "`.")
);
namesToPlugins[pluginName$jscomp$inline_324] =
pluginModule$jscomp$inline_325;
isOrderingDirty$jscomp$inline_323 = !0;
namesToPlugins[pluginName$jscomp$inline_323] =
pluginModule$jscomp$inline_324;
isOrderingDirty$jscomp$inline_322 = !0;
}
}
isOrderingDirty$jscomp$inline_323 && recomputePluginOrdering();
isOrderingDirty$jscomp$inline_322 && recomputePluginOrdering();
function batchedUpdatesImpl(fn, bookkeeping) {
return fn(bookkeeping);
}
@@ -12987,21 +12987,16 @@ function getPublicInstance(instance) {
}
return instance.canonical.publicInstance;
}
return null != instance._nativeTag ? instance : null;
return null != instance.containerInfo &&
null != instance.containerInfo.publicInstance
? instance.containerInfo.publicInstance
: null != instance._nativeTag
? instance
: null;
}
function getPublicInstanceFromHostFiber(fiber) {
a: switch (fiber.tag) {
case 5:
fiber = fiber.stateNode;
break a;
case 3:
fiber = fiber.stateNode.containerInfo;
break a;
default:
throw Error("Expected to find a host node. This is a bug in React.");
}
fiber = getPublicInstance(fiber);
if (null == fiber)
fiber = getPublicInstance(fiber.stateNode);
if (null === fiber)
throw Error("Expected to find a host node. This is a bug in React.");
return fiber;
}
@@ -13094,9 +13089,6 @@ FragmentInstance.prototype.compareDocumentPosition = function (otherNode) {
}
if (null === JSCompiler_inline_result)
return Node.DOCUMENT_POSITION_DISCONNECTED;
JSCompiler_inline_result = getPublicInstanceFromHostFiber(
JSCompiler_inline_result
);
var children = [];
traverseVisibleHostChildren(
this._fragmentFiber.child,
@@ -13107,6 +13099,9 @@ FragmentInstance.prototype.compareDocumentPosition = function (otherNode) {
void 0
);
if (0 === children.length) {
JSCompiler_inline_result = getPublicInstanceFromHostFiber(
JSCompiler_inline_result
);
children = this._fragmentFiber;
var parentResult =
JSCompiler_inline_result.compareDocumentPosition(otherNode);
@@ -13242,16 +13237,16 @@ batchedUpdatesImpl = function (fn, a) {
}
};
var roots = new Map(),
internals$jscomp$inline_1575 = {
internals$jscomp$inline_1572 = {
bundleType: 0,
version: "19.2.0-native-fb-720bb130-20250922",
version: "19.2.0-native-fb-83c88ad4-20250923",
rendererPackageName: "react-native-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-720bb130-20250922"
reconcilerVersion: "19.2.0-native-fb-83c88ad4-20250923"
};
null !== extraDevToolsConfig &&
(internals$jscomp$inline_1575.rendererConfig = extraDevToolsConfig);
internals$jscomp$inline_1575.getLaneLabelMap = function () {
(internals$jscomp$inline_1572.rendererConfig = extraDevToolsConfig);
internals$jscomp$inline_1572.getLaneLabelMap = function () {
for (
var map = new Map(), lane = 1, index$168 = 0;
31 > index$168;
@@ -13263,20 +13258,20 @@ internals$jscomp$inline_1575.getLaneLabelMap = function () {
}
return map;
};
internals$jscomp$inline_1575.injectProfilingHooks = function (profilingHooks) {
internals$jscomp$inline_1572.injectProfilingHooks = function (profilingHooks) {
injectedProfilingHooks = profilingHooks;
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1908 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
var hook$jscomp$inline_1905 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
if (
!hook$jscomp$inline_1908.isDisabled &&
hook$jscomp$inline_1908.supportsFiber
!hook$jscomp$inline_1905.isDisabled &&
hook$jscomp$inline_1905.supportsFiber
)
try {
(rendererID = hook$jscomp$inline_1908.inject(
internals$jscomp$inline_1575
(rendererID = hook$jscomp$inline_1905.inject(
internals$jscomp$inline_1572
)),
(injectedHook = hook$jscomp$inline_1908);
(injectedHook = hook$jscomp$inline_1905);
} catch (err) {}
}
exports.createPortal = function (children, containerTag) {
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<39e52a935e686a53e3c4bf9162e6bb3e>>
* @generated SignedSource<<bac0d2f49d54c8c216baee5a94613481>>
*/
"use strict";
@@ -20156,11 +20156,11 @@ __DEV__ &&
shouldSuspendImpl = newShouldSuspendImpl;
};
var isomorphicReactPackageVersion = React.version;
if ("19.2.0-native-fb-720bb130-20250922" !== isomorphicReactPackageVersion)
if ("19.2.0-native-fb-83c88ad4-20250923" !== isomorphicReactPackageVersion)
throw Error(
'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n - react: ' +
(isomorphicReactPackageVersion +
"\n - react-native-renderer: 19.2.0-native-fb-720bb130-20250922\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-native-renderer: 19.2.0-native-fb-83c88ad4-20250923\nLearn more: https://react.dev/warnings/version-mismatch")
);
if (
"function" !==
@@ -20186,10 +20186,10 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
version: "19.2.0-native-fb-720bb130-20250922",
version: "19.2.0-native-fb-83c88ad4-20250923",
rendererPackageName: "react-native-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-720bb130-20250922"
reconcilerVersion: "19.2.0-native-fb-83c88ad4-20250923"
};
null !== extraDevToolsConfig &&
(internals.rendererConfig = extraDevToolsConfig);
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<ee0c6922bdb0e448dc13bb47f8e6d554>>
* @generated SignedSource<<cf7cf10c2d022be864de40bac29efd0a>>
*/
"use strict";
@@ -11379,11 +11379,11 @@ function updateContainer(element, container, parentComponent, callback) {
return lane;
}
var isomorphicReactPackageVersion = React.version;
if ("19.2.0-native-fb-720bb130-20250922" !== isomorphicReactPackageVersion)
if ("19.2.0-native-fb-83c88ad4-20250923" !== isomorphicReactPackageVersion)
throw Error(
'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n - react: ' +
(isomorphicReactPackageVersion +
"\n - react-native-renderer: 19.2.0-native-fb-720bb130-20250922\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-native-renderer: 19.2.0-native-fb-83c88ad4-20250923\nLearn more: https://react.dev/warnings/version-mismatch")
);
if (
"function" !==
@@ -11433,10 +11433,10 @@ batchedUpdatesImpl = function (fn, a) {
var roots = new Map(),
internals$jscomp$inline_1319 = {
bundleType: 0,
version: "19.2.0-native-fb-720bb130-20250922",
version: "19.2.0-native-fb-83c88ad4-20250923",
rendererPackageName: "react-native-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-720bb130-20250922"
reconcilerVersion: "19.2.0-native-fb-83c88ad4-20250923"
};
null !== extraDevToolsConfig &&
(internals$jscomp$inline_1319.rendererConfig = extraDevToolsConfig);
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<c22d4f3aeee20bd46b7f2f905eed4692>>
* @generated SignedSource<<861ea45ffb0943654e47b89c9d0cdadc>>
*/
"use strict";
@@ -13393,11 +13393,11 @@ function updateContainer(element, container, parentComponent, callback) {
return lane;
}
var isomorphicReactPackageVersion = React.version;
if ("19.2.0-native-fb-720bb130-20250922" !== isomorphicReactPackageVersion)
if ("19.2.0-native-fb-83c88ad4-20250923" !== isomorphicReactPackageVersion)
throw Error(
'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n - react: ' +
(isomorphicReactPackageVersion +
"\n - react-native-renderer: 19.2.0-native-fb-720bb130-20250922\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-native-renderer: 19.2.0-native-fb-83c88ad4-20250923\nLearn more: https://react.dev/warnings/version-mismatch")
);
if (
"function" !==
@@ -13447,10 +13447,10 @@ batchedUpdatesImpl = function (fn, a) {
var roots = new Map(),
internals$jscomp$inline_1583 = {
bundleType: 0,
version: "19.2.0-native-fb-720bb130-20250922",
version: "19.2.0-native-fb-83c88ad4-20250923",
rendererPackageName: "react-native-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-720bb130-20250922"
reconcilerVersion: "19.2.0-native-fb-83c88ad4-20250923"
};
null !== extraDevToolsConfig &&
(internals$jscomp$inline_1583.rendererConfig = extraDevToolsConfig);
@@ -1,7 +1,7 @@
{
"name": "eslint-plugin-react-hooks",
"description": "ESLint rules for React Hooks",
"version": "0.0.0-experimental-720bb130-20250922",
"version": "0.0.0-experimental-83c88ad4-20250923",
"repository": {
"type": "git",
"url": "https://github.com/facebook/react.git",