[compiler] Add support for diagnostic hints (#34126)

Hints are meant as additional information to present to the developer
about an error. The first use-case here is for the suggestion to name
refs with "-Ref" if we encounter a mutation that looks like it might be
a ref. The original error printing used a second error detail which
printed the source code twice, a hint with just extra text is less
noisy.

DiffTrain build for [6ffcac8558](https://github.com/facebook/react/commit/6ffcac8558efbd204c7df5d52787a90e507dd8d7)
This commit is contained in:
josephsavona
2025-08-15 15:16:08 -07:00
parent 8ef2e214bb
commit 87b4e0d792
26 changed files with 113 additions and 103 deletions
+1 -1
View File
@@ -1 +1 @@
19.2.0-native-fb-724b324b-20250815
19.2.0-native-fb-6ffcac85-20250815
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<266ca632c8ad19919076eb99ea777680>>
* @generated SignedSource<<a6ca896b5dd65682170ad66d6828fa28>>
*/
"use strict";
@@ -404,5 +404,5 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.2.0-native-fb-724b324b-20250815";
exports.version = "19.2.0-native-fb-6ffcac85-20250815";
})();
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<7d16ca6cedac12328544fc384b86c85d>>
* @generated SignedSource<<55d7349cc02c4d21e074371bc8b4bdfa>>
*/
"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-724b324b-20250815";
exports.version = "19.2.0-native-fb-6ffcac85-20250815";
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<7d16ca6cedac12328544fc384b86c85d>>
* @generated SignedSource<<55d7349cc02c4d21e074371bc8b4bdfa>>
*/
"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-724b324b-20250815";
exports.version = "19.2.0-native-fb-6ffcac85-20250815";
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<cb8069b8e430eed369dcd379dc088625>>
* @generated SignedSource<<9743c85780632962b3e7cde3ce0402ec>>
*/
/*
@@ -29362,11 +29362,11 @@ __DEV__ &&
};
(function () {
var isomorphicReactPackageVersion = React.version;
if ("19.2.0-native-fb-724b324b-20250815" !== isomorphicReactPackageVersion)
if ("19.2.0-native-fb-6ffcac85-20250815" !== 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-724b324b-20250815\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-dom: 19.2.0-native-fb-6ffcac85-20250815\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
@@ -29403,10 +29403,10 @@ __DEV__ &&
!(function () {
var internals = {
bundleType: 1,
version: "19.2.0-native-fb-724b324b-20250815",
version: "19.2.0-native-fb-6ffcac85-20250815",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-724b324b-20250815"
reconcilerVersion: "19.2.0-native-fb-6ffcac85-20250815"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -29545,5 +29545,5 @@ __DEV__ &&
listenToAllSupportedEvents(container);
return new ReactDOMHydrationRoot(initialChildren);
};
exports.version = "19.2.0-native-fb-724b324b-20250815";
exports.version = "19.2.0-native-fb-6ffcac85-20250815";
})();
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<6ebdff98663746c53e80db6cc88c2add>>
* @generated SignedSource<<9892ead95d67cc0305c60fad3f54dda5>>
*/
/*
@@ -17189,14 +17189,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
};
var isomorphicReactPackageVersion$jscomp$inline_2023 = React.version;
if (
"19.2.0-native-fb-724b324b-20250815" !==
"19.2.0-native-fb-6ffcac85-20250815" !==
isomorphicReactPackageVersion$jscomp$inline_2023
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_2023,
"19.2.0-native-fb-724b324b-20250815"
"19.2.0-native-fb-6ffcac85-20250815"
)
);
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -17218,10 +17218,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
};
var internals$jscomp$inline_2554 = {
bundleType: 0,
version: "19.2.0-native-fb-724b324b-20250815",
version: "19.2.0-native-fb-6ffcac85-20250815",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-724b324b-20250815"
reconcilerVersion: "19.2.0-native-fb-6ffcac85-20250815"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2555 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -17319,4 +17319,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
listenToAllSupportedEvents(container);
return new ReactDOMHydrationRoot(initialChildren);
};
exports.version = "19.2.0-native-fb-724b324b-20250815";
exports.version = "19.2.0-native-fb-6ffcac85-20250815";
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<321385d79ff059899370511615d55b9c>>
* @generated SignedSource<<5a05e09fa7151af8e8779b7e4acf412f>>
*/
/*
@@ -19199,14 +19199,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
};
var isomorphicReactPackageVersion$jscomp$inline_2274 = React.version;
if (
"19.2.0-native-fb-724b324b-20250815" !==
"19.2.0-native-fb-6ffcac85-20250815" !==
isomorphicReactPackageVersion$jscomp$inline_2274
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_2274,
"19.2.0-native-fb-724b324b-20250815"
"19.2.0-native-fb-6ffcac85-20250815"
)
);
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -19228,10 +19228,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
};
var internals$jscomp$inline_2281 = {
bundleType: 0,
version: "19.2.0-native-fb-724b324b-20250815",
version: "19.2.0-native-fb-6ffcac85-20250815",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-724b324b-20250815",
reconcilerVersion: "19.2.0-native-fb-6ffcac85-20250815",
getLaneLabelMap: function () {
for (
var map = new Map(), lane = 1, index$321 = 0;
@@ -19345,4 +19345,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
listenToAllSupportedEvents(container);
return new ReactDOMHydrationRoot(initialChildren);
};
exports.version = "19.2.0-native-fb-724b324b-20250815";
exports.version = "19.2.0-native-fb-6ffcac85-20250815";
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<f79d6915a5018073cf17c920d2aa2a58>>
* @generated SignedSource<<bda771cbea55557a5ac6009c3b3ded01>>
*/
/*
@@ -29418,11 +29418,11 @@ __DEV__ &&
};
(function () {
var isomorphicReactPackageVersion = React.version;
if ("19.2.0-native-fb-724b324b-20250815" !== isomorphicReactPackageVersion)
if ("19.2.0-native-fb-6ffcac85-20250815" !== 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-724b324b-20250815\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-dom: 19.2.0-native-fb-6ffcac85-20250815\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
@@ -29459,10 +29459,10 @@ __DEV__ &&
!(function () {
var internals = {
bundleType: 1,
version: "19.2.0-native-fb-724b324b-20250815",
version: "19.2.0-native-fb-6ffcac85-20250815",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-724b324b-20250815"
reconcilerVersion: "19.2.0-native-fb-6ffcac85-20250815"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -29917,7 +29917,7 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.2.0-native-fb-724b324b-20250815";
exports.version = "19.2.0-native-fb-6ffcac85-20250815";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<947ead5518b2be07d5477623e25bebde>>
* @generated SignedSource<<83c293f09cde03cb184da048cb2266dc>>
*/
/*
@@ -17200,14 +17200,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
};
var isomorphicReactPackageVersion$jscomp$inline_2024 = React.version;
if (
"19.2.0-native-fb-724b324b-20250815" !==
"19.2.0-native-fb-6ffcac85-20250815" !==
isomorphicReactPackageVersion$jscomp$inline_2024
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_2024,
"19.2.0-native-fb-724b324b-20250815"
"19.2.0-native-fb-6ffcac85-20250815"
)
);
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -17229,10 +17229,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
};
var internals$jscomp$inline_2557 = {
bundleType: 0,
version: "19.2.0-native-fb-724b324b-20250815",
version: "19.2.0-native-fb-6ffcac85-20250815",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-724b324b-20250815"
reconcilerVersion: "19.2.0-native-fb-6ffcac85-20250815"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2558 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -17483,4 +17483,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.2.0-native-fb-724b324b-20250815";
exports.version = "19.2.0-native-fb-6ffcac85-20250815";
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<a85381b5f33bbbf5e9edc7fd7bd0088c>>
* @generated SignedSource<<ced1a814fb4d05aaea2e25d60c3f7f1a>>
*/
/*
@@ -19214,14 +19214,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
};
var isomorphicReactPackageVersion$jscomp$inline_2275 = React.version;
if (
"19.2.0-native-fb-724b324b-20250815" !==
"19.2.0-native-fb-6ffcac85-20250815" !==
isomorphicReactPackageVersion$jscomp$inline_2275
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_2275,
"19.2.0-native-fb-724b324b-20250815"
"19.2.0-native-fb-6ffcac85-20250815"
)
);
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -19243,10 +19243,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
};
var internals$jscomp$inline_2282 = {
bundleType: 0,
version: "19.2.0-native-fb-724b324b-20250815",
version: "19.2.0-native-fb-6ffcac85-20250815",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-724b324b-20250815",
reconcilerVersion: "19.2.0-native-fb-6ffcac85-20250815",
getLaneLabelMap: function () {
for (
var map = new Map(), lane = 1, index$321 = 0;
@@ -19513,7 +19513,7 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.2.0-native-fb-724b324b-20250815";
exports.version = "19.2.0-native-fb-6ffcac85-20250815";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<6f25b5351fea1157a42e21e0069c2219>>
* @generated SignedSource<<87cf67b2245de3516d74f4b07ab72fc3>>
*/
"use strict";
@@ -15758,10 +15758,10 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
version: "19.2.0-native-fb-724b324b-20250815",
version: "19.2.0-native-fb-6ffcac85-20250815",
rendererPackageName: "react-test-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-724b324b-20250815"
reconcilerVersion: "19.2.0-native-fb-6ffcac85-20250815"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -15906,5 +15906,5 @@ __DEV__ &&
flushSyncWorkAcrossRoots_impl(0, !0));
}
};
exports.version = "19.2.0-native-fb-724b324b-20250815";
exports.version = "19.2.0-native-fb-6ffcac85-20250815";
})();
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<3dab8c2187d56a61f14758f8fc1c0cac>>
* @generated SignedSource<<01fdf0cb70501b7421e56bc141ce0682>>
*/
"use strict";
@@ -9924,10 +9924,10 @@ function wrapFiber(fiber) {
}
var internals$jscomp$inline_1428 = {
bundleType: 0,
version: "19.2.0-native-fb-724b324b-20250815",
version: "19.2.0-native-fb-6ffcac85-20250815",
rendererPackageName: "react-test-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-724b324b-20250815"
reconcilerVersion: "19.2.0-native-fb-6ffcac85-20250815"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1429 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -10063,4 +10063,4 @@ exports.unstable_batchedUpdates = function (fn, a) {
flushSyncWorkAcrossRoots_impl(0, !0));
}
};
exports.version = "19.2.0-native-fb-724b324b-20250815";
exports.version = "19.2.0-native-fb-6ffcac85-20250815";
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<4aac09bd34e628aaba2c50dcc3f25bd7>>
* @generated SignedSource<<f8b903e07b989e6e7ca75c0385bf9d06>>
*/
"use strict";
@@ -10544,10 +10544,10 @@ function wrapFiber(fiber) {
}
var internals$jscomp$inline_1236 = {
bundleType: 0,
version: "19.2.0-native-fb-724b324b-20250815",
version: "19.2.0-native-fb-6ffcac85-20250815",
rendererPackageName: "react-test-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-724b324b-20250815",
reconcilerVersion: "19.2.0-native-fb-6ffcac85-20250815",
getLaneLabelMap: function () {
for (
var map = new Map(), lane = 1, index$142 = 0;
@@ -10698,4 +10698,4 @@ exports.unstable_batchedUpdates = function (fn, a) {
flushSyncWorkAcrossRoots_impl(0, !0));
}
};
exports.version = "19.2.0-native-fb-724b324b-20250815";
exports.version = "19.2.0-native-fb-6ffcac85-20250815";
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<f0eba31964f25e1ed6f1a9fe5f66ec39>>
* @generated SignedSource<<537c27e9af67931d2612abf3ed2421f2>>
*/
"use strict";
@@ -1388,7 +1388,7 @@ __DEV__ &&
exports.useTransition = function () {
return resolveDispatcher().useTransition();
};
exports.version = "19.2.0-native-fb-724b324b-20250815";
exports.version = "19.2.0-native-fb-6ffcac85-20250815";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<e7cd88b39114f12ccdccddef73a27078>>
* @generated SignedSource<<f2bfcc46d5f6d3ebf096296acff2eb3e>>
*/
"use strict";
@@ -579,4 +579,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.2.0-native-fb-724b324b-20250815";
exports.version = "19.2.0-native-fb-6ffcac85-20250815";
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<ce4c9e0f2276d0aaf0855ec01908ca39>>
* @generated SignedSource<<b1726a9da570a9d1c2334b57428a3c2b>>
*/
"use strict";
@@ -583,7 +583,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.2.0-native-fb-724b324b-20250815";
exports.version = "19.2.0-native-fb-6ffcac85-20250815";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
@@ -1 +1 @@
724b324b966343f08ff0cb16ec9d8013e3891dfd
6ffcac8558efbd204c7df5d52787a90e507dd8d7
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<2f618f124af7d2964871e3aecc9c47ff>>
* @generated SignedSource<<4ae05fb7b0f39ad8eef0d0936e259c4b>>
*/
"use strict";
@@ -19593,10 +19593,10 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
version: "19.2.0-native-fb-724b324b-20250815",
version: "19.2.0-native-fb-6ffcac85-20250815",
rendererPackageName: "react-native-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-724b324b-20250815"
reconcilerVersion: "19.2.0-native-fb-6ffcac85-20250815"
};
null !== extraDevToolsConfig &&
(internals.rendererConfig = extraDevToolsConfig);
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<0e6c90a2399b594dc1a7223f7fea0721>>
* @generated SignedSource<<503fb6808d19cbc8f802871aa14684fb>>
*/
"use strict";
@@ -11107,10 +11107,10 @@ batchedUpdatesImpl = function (fn, a) {
var roots = new Map(),
internals$jscomp$inline_1260 = {
bundleType: 0,
version: "19.2.0-native-fb-724b324b-20250815",
version: "19.2.0-native-fb-6ffcac85-20250815",
rendererPackageName: "react-native-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-724b324b-20250815"
reconcilerVersion: "19.2.0-native-fb-6ffcac85-20250815"
};
null !== extraDevToolsConfig &&
(internals$jscomp$inline_1260.rendererConfig = extraDevToolsConfig);
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<aa1468a3958448a80f838c13dc1b9c5c>>
* @generated SignedSource<<aaf037cb4a20e07ff13dcec550be070a>>
*/
"use strict";
@@ -13058,10 +13058,10 @@ batchedUpdatesImpl = function (fn, a) {
var roots = new Map(),
internals$jscomp$inline_1504 = {
bundleType: 0,
version: "19.2.0-native-fb-724b324b-20250815",
version: "19.2.0-native-fb-6ffcac85-20250815",
rendererPackageName: "react-native-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-724b324b-20250815"
reconcilerVersion: "19.2.0-native-fb-6ffcac85-20250815"
};
null !== extraDevToolsConfig &&
(internals$jscomp$inline_1504.rendererConfig = extraDevToolsConfig);
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<30f47dcdb07a357f1f3e94ee7c9f0a3d>>
* @generated SignedSource<<088c9e3a4b9b2e4b050a2131b9f61b3c>>
*/
"use strict";
@@ -19878,11 +19878,11 @@ __DEV__ &&
shouldSuspendImpl = newShouldSuspendImpl;
};
var isomorphicReactPackageVersion = React.version;
if ("19.2.0-native-fb-724b324b-20250815" !== isomorphicReactPackageVersion)
if ("19.2.0-native-fb-6ffcac85-20250815" !== 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-724b324b-20250815\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-native-renderer: 19.2.0-native-fb-6ffcac85-20250815\nLearn more: https://react.dev/warnings/version-mismatch")
);
if (
"function" !==
@@ -19908,10 +19908,10 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
version: "19.2.0-native-fb-724b324b-20250815",
version: "19.2.0-native-fb-6ffcac85-20250815",
rendererPackageName: "react-native-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-724b324b-20250815"
reconcilerVersion: "19.2.0-native-fb-6ffcac85-20250815"
};
null !== extraDevToolsConfig &&
(internals.rendererConfig = extraDevToolsConfig);
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<2190aaf15c61510805dec8131629c2dc>>
* @generated SignedSource<<c5a7dcfc2edc4c80863479a595fbcdee>>
*/
"use strict";
@@ -11254,11 +11254,11 @@ function updateContainer(element, container, parentComponent, callback) {
return lane;
}
var isomorphicReactPackageVersion = React.version;
if ("19.2.0-native-fb-724b324b-20250815" !== isomorphicReactPackageVersion)
if ("19.2.0-native-fb-6ffcac85-20250815" !== 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-724b324b-20250815\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-native-renderer: 19.2.0-native-fb-6ffcac85-20250815\nLearn more: https://react.dev/warnings/version-mismatch")
);
if (
"function" !==
@@ -11308,10 +11308,10 @@ batchedUpdatesImpl = function (fn, a) {
var roots = new Map(),
internals$jscomp$inline_1290 = {
bundleType: 0,
version: "19.2.0-native-fb-724b324b-20250815",
version: "19.2.0-native-fb-6ffcac85-20250815",
rendererPackageName: "react-native-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-724b324b-20250815"
reconcilerVersion: "19.2.0-native-fb-6ffcac85-20250815"
};
null !== extraDevToolsConfig &&
(internals$jscomp$inline_1290.rendererConfig = extraDevToolsConfig);
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<7ae3714985b9e724a0ace1b481a454e9>>
* @generated SignedSource<<1dd6f5fdb469fcb394a015062d671550>>
*/
"use strict";
@@ -13194,11 +13194,11 @@ function updateContainer(element, container, parentComponent, callback) {
return lane;
}
var isomorphicReactPackageVersion = React.version;
if ("19.2.0-native-fb-724b324b-20250815" !== isomorphicReactPackageVersion)
if ("19.2.0-native-fb-6ffcac85-20250815" !== 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-724b324b-20250815\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-native-renderer: 19.2.0-native-fb-6ffcac85-20250815\nLearn more: https://react.dev/warnings/version-mismatch")
);
if (
"function" !==
@@ -13248,10 +13248,10 @@ batchedUpdatesImpl = function (fn, a) {
var roots = new Map(),
internals$jscomp$inline_1534 = {
bundleType: 0,
version: "19.2.0-native-fb-724b324b-20250815",
version: "19.2.0-native-fb-6ffcac85-20250815",
rendererPackageName: "react-native-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-724b324b-20250815"
reconcilerVersion: "19.2.0-native-fb-6ffcac85-20250815"
};
null !== extraDevToolsConfig &&
(internals$jscomp$inline_1534.rendererConfig = extraDevToolsConfig);
@@ -12,7 +12,7 @@
* @lightSyntaxTransform
* @preventMunge
* @oncall react_core
* @generated SignedSource<<022b992a8d8a4233d4f4df69626d4322>>
* @generated SignedSource<<01c6e0f9e38b534264f8b75c421a7c4e>>
*/
'use strict';
@@ -17651,8 +17651,10 @@ class CompilerDiagnostic {
return this;
}
primaryLocation() {
var _a, _b;
return (_b = (_a = this.options.details.filter(d => d.kind === 'error')[0]) === null || _a === void 0 ? void 0 : _a.loc) !== null && _b !== void 0 ? _b : null;
const firstErrorDetail = this.options.details.filter(d => d.kind === 'error')[0];
return firstErrorDetail != null && firstErrorDetail.kind === 'error'
? firstErrorDetail.loc
: null;
}
printErrorMessage(source, options) {
const buffer = [
@@ -17685,8 +17687,13 @@ class CompilerDiagnostic {
buffer.push(codeFrame);
break;
}
case 'hint': {
buffer.push('\n\n');
buffer.push(detail.message);
break;
}
default: {
assertExhaustive$1(detail.kind, `Unexpected detail kind ${detail.kind}`);
assertExhaustive$1(detail, `Unexpected detail kind ${detail.kind}`);
}
}
}
@@ -42155,8 +42162,7 @@ function applySignature(context, state, signature, instruction) {
if (effect.kind === 'Mutate' &&
((_b = effect.reason) === null || _b === void 0 ? void 0 : _b.kind) === 'AssignCurrentProperty') {
diagnostic.withDetail({
kind: 'error',
loc: effect.value.loc,
kind: 'hint',
message: `Hint: If this value is a Ref (value returned by \`useRef()\`), rename the variable to end in "Ref".`,
});
}
@@ -42584,8 +42590,7 @@ function applyEffect(context, state, _effect, initialized, effects) {
if (effect.kind === 'Mutate' &&
((_e = effect.reason) === null || _e === void 0 ? void 0 : _e.kind) === 'AssignCurrentProperty') {
diagnostic.withDetail({
kind: 'error',
loc: effect.value.loc,
kind: 'hint',
message: `Hint: If this value is a Ref (value returned by \`useRef()\`), rename the variable to end in "Ref".`,
});
}
@@ -6,7 +6,7 @@
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
* @generated SignedSource<<a1612b3c621bb25681f51231f5e34ee1>>
* @generated SignedSource<<0b913bdfe75ddc4b4511b0be83778a00>>
*/
'use strict';
@@ -17636,8 +17636,10 @@ class CompilerDiagnostic {
return this;
}
primaryLocation() {
var _a, _b;
return (_b = (_a = this.options.details.filter(d => d.kind === 'error')[0]) === null || _a === void 0 ? void 0 : _a.loc) !== null && _b !== void 0 ? _b : null;
const firstErrorDetail = this.options.details.filter(d => d.kind === 'error')[0];
return firstErrorDetail != null && firstErrorDetail.kind === 'error'
? firstErrorDetail.loc
: null;
}
printErrorMessage(source, options) {
const buffer = [
@@ -17670,8 +17672,13 @@ class CompilerDiagnostic {
buffer.push(codeFrame);
break;
}
case 'hint': {
buffer.push('\n\n');
buffer.push(detail.message);
break;
}
default: {
assertExhaustive$1(detail.kind, `Unexpected detail kind ${detail.kind}`);
assertExhaustive$1(detail, `Unexpected detail kind ${detail.kind}`);
}
}
}
@@ -41934,8 +41941,7 @@ function applySignature(context, state, signature, instruction) {
if (effect.kind === 'Mutate' &&
((_b = effect.reason) === null || _b === void 0 ? void 0 : _b.kind) === 'AssignCurrentProperty') {
diagnostic.withDetail({
kind: 'error',
loc: effect.value.loc,
kind: 'hint',
message: `Hint: If this value is a Ref (value returned by \`useRef()\`), rename the variable to end in "Ref".`,
});
}
@@ -42363,8 +42369,7 @@ function applyEffect(context, state, _effect, initialized, effects) {
if (effect.kind === 'Mutate' &&
((_e = effect.reason) === null || _e === void 0 ? void 0 : _e.kind) === 'AssignCurrentProperty') {
diagnostic.withDetail({
kind: 'error',
loc: effect.value.loc,
kind: 'hint',
message: `Hint: If this value is a Ref (value returned by \`useRef()\`), rename the variable to end in "Ref".`,
});
}
@@ -1,7 +1,7 @@
{
"name": "eslint-plugin-react-hooks",
"description": "ESLint rules for React Hooks",
"version": "0.0.0-experimental-724b324b-20250815",
"version": "0.0.0-experimental-6ffcac85-20250815",
"repository": {
"type": "git",
"url": "https://github.com/facebook/react.git",