[compiler] Errors for eval(), with statments, class declarations (#33746)

* Error for `eval()`
* More specific error message for `with (expr) { ... }` syntax
* More specific error message for class declarations

---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/facebook/react/pull/33746).
* #33752
* #33751
* #33750
* #33748
* #33747
* __->__ #33746

DiffTrain build for [4a3ff8eed6](https://github.com/facebook/react/commit/4a3ff8eed65f96cda7617150f92de3544d5ddf6a)
This commit is contained in:
josephsavona
2025-07-09 22:25:09 -07:00
parent 1ee60a49ed
commit 1f5d41f4df
26 changed files with 175 additions and 103 deletions
+1 -1
View File
@@ -1 +1 @@
19.2.0-native-fb-956d770a-20250708
19.2.0-native-fb-4a3ff8ee-20250709
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<161d8243fbb2f475e38ef5e2fa01f8ba>>
* @generated SignedSource<<3a0fd774632d3b1f5552a480f160aadc>>
*/
"use strict";
@@ -404,5 +404,5 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.2.0-native-fb-956d770a-20250708";
exports.version = "19.2.0-native-fb-4a3ff8ee-20250709";
})();
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<46ff823f63a0fc26abd9ab383c5442fb>>
* @generated SignedSource<<50552cda67f78f62d2e365ec6b206154>>
*/
"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-956d770a-20250708";
exports.version = "19.2.0-native-fb-4a3ff8ee-20250709";
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<46ff823f63a0fc26abd9ab383c5442fb>>
* @generated SignedSource<<50552cda67f78f62d2e365ec6b206154>>
*/
"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-956d770a-20250708";
exports.version = "19.2.0-native-fb-4a3ff8ee-20250709";
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<c151de2ea281c1e4ce729d666773eed4>>
* @generated SignedSource<<e3b87d446ffbc63d2c591c52a3a094c1>>
*/
/*
@@ -29006,11 +29006,11 @@ __DEV__ &&
};
(function () {
var isomorphicReactPackageVersion = React.version;
if ("19.2.0-native-fb-956d770a-20250708" !== isomorphicReactPackageVersion)
if ("19.2.0-native-fb-4a3ff8ee-20250709" !== 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-956d770a-20250708\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-dom: 19.2.0-native-fb-4a3ff8ee-20250709\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
@@ -29047,10 +29047,10 @@ __DEV__ &&
!(function () {
var internals = {
bundleType: 1,
version: "19.2.0-native-fb-956d770a-20250708",
version: "19.2.0-native-fb-4a3ff8ee-20250709",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-956d770a-20250708"
reconcilerVersion: "19.2.0-native-fb-4a3ff8ee-20250709"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -29188,5 +29188,5 @@ __DEV__ &&
listenToAllSupportedEvents(container);
return new ReactDOMHydrationRoot(initialChildren);
};
exports.version = "19.2.0-native-fb-956d770a-20250708";
exports.version = "19.2.0-native-fb-4a3ff8ee-20250709";
})();
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<4888b3518fbbd294a3c7e3822492926a>>
* @generated SignedSource<<96dc211584be2a66dd86851ebae6f576>>
*/
/*
@@ -17123,14 +17123,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
};
var isomorphicReactPackageVersion$jscomp$inline_2004 = React.version;
if (
"19.2.0-native-fb-956d770a-20250708" !==
"19.2.0-native-fb-4a3ff8ee-20250709" !==
isomorphicReactPackageVersion$jscomp$inline_2004
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_2004,
"19.2.0-native-fb-956d770a-20250708"
"19.2.0-native-fb-4a3ff8ee-20250709"
)
);
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -17152,10 +17152,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
};
var internals$jscomp$inline_2523 = {
bundleType: 0,
version: "19.2.0-native-fb-956d770a-20250708",
version: "19.2.0-native-fb-4a3ff8ee-20250709",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-956d770a-20250708"
reconcilerVersion: "19.2.0-native-fb-4a3ff8ee-20250709"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2524 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -17253,4 +17253,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
listenToAllSupportedEvents(container);
return new ReactDOMHydrationRoot(initialChildren);
};
exports.version = "19.2.0-native-fb-956d770a-20250708";
exports.version = "19.2.0-native-fb-4a3ff8ee-20250709";
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<060559a1a04b20b157c26a6e8ccde044>>
* @generated SignedSource<<b8248fff460bad5413b96510e2e0d3df>>
*/
/*
@@ -19080,14 +19080,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
};
var isomorphicReactPackageVersion$jscomp$inline_2244 = React.version;
if (
"19.2.0-native-fb-956d770a-20250708" !==
"19.2.0-native-fb-4a3ff8ee-20250709" !==
isomorphicReactPackageVersion$jscomp$inline_2244
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_2244,
"19.2.0-native-fb-956d770a-20250708"
"19.2.0-native-fb-4a3ff8ee-20250709"
)
);
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -19109,10 +19109,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
};
var internals$jscomp$inline_2251 = {
bundleType: 0,
version: "19.2.0-native-fb-956d770a-20250708",
version: "19.2.0-native-fb-4a3ff8ee-20250709",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-956d770a-20250708",
reconcilerVersion: "19.2.0-native-fb-4a3ff8ee-20250709",
getLaneLabelMap: function () {
for (
var map = new Map(), lane = 1, index$319 = 0;
@@ -19225,4 +19225,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
listenToAllSupportedEvents(container);
return new ReactDOMHydrationRoot(initialChildren);
};
exports.version = "19.2.0-native-fb-956d770a-20250708";
exports.version = "19.2.0-native-fb-4a3ff8ee-20250709";
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<1e752d8eda32bcd9909680d6e6538532>>
* @generated SignedSource<<89bba1425bab112526c3c5f1fca6705d>>
*/
/*
@@ -29062,11 +29062,11 @@ __DEV__ &&
};
(function () {
var isomorphicReactPackageVersion = React.version;
if ("19.2.0-native-fb-956d770a-20250708" !== isomorphicReactPackageVersion)
if ("19.2.0-native-fb-4a3ff8ee-20250709" !== 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-956d770a-20250708\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-dom: 19.2.0-native-fb-4a3ff8ee-20250709\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
@@ -29103,10 +29103,10 @@ __DEV__ &&
!(function () {
var internals = {
bundleType: 1,
version: "19.2.0-native-fb-956d770a-20250708",
version: "19.2.0-native-fb-4a3ff8ee-20250709",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-956d770a-20250708"
reconcilerVersion: "19.2.0-native-fb-4a3ff8ee-20250709"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -29560,7 +29560,7 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.2.0-native-fb-956d770a-20250708";
exports.version = "19.2.0-native-fb-4a3ff8ee-20250709";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<56908d98b20b6ae1ba5c7ea9ef6e3eac>>
* @generated SignedSource<<614c4f598264e557bb0901a9e194803b>>
*/
/*
@@ -17134,14 +17134,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
};
var isomorphicReactPackageVersion$jscomp$inline_2005 = React.version;
if (
"19.2.0-native-fb-956d770a-20250708" !==
"19.2.0-native-fb-4a3ff8ee-20250709" !==
isomorphicReactPackageVersion$jscomp$inline_2005
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_2005,
"19.2.0-native-fb-956d770a-20250708"
"19.2.0-native-fb-4a3ff8ee-20250709"
)
);
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -17163,10 +17163,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
};
var internals$jscomp$inline_2526 = {
bundleType: 0,
version: "19.2.0-native-fb-956d770a-20250708",
version: "19.2.0-native-fb-4a3ff8ee-20250709",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-956d770a-20250708"
reconcilerVersion: "19.2.0-native-fb-4a3ff8ee-20250709"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2527 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -17417,4 +17417,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.2.0-native-fb-956d770a-20250708";
exports.version = "19.2.0-native-fb-4a3ff8ee-20250709";
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<b42270bb6134442c3d4cd3e4822c9911>>
* @generated SignedSource<<a408c5aaab2cd99e2942db7e0a2ecf4d>>
*/
/*
@@ -19095,14 +19095,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
};
var isomorphicReactPackageVersion$jscomp$inline_2245 = React.version;
if (
"19.2.0-native-fb-956d770a-20250708" !==
"19.2.0-native-fb-4a3ff8ee-20250709" !==
isomorphicReactPackageVersion$jscomp$inline_2245
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_2245,
"19.2.0-native-fb-956d770a-20250708"
"19.2.0-native-fb-4a3ff8ee-20250709"
)
);
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -19124,10 +19124,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
};
var internals$jscomp$inline_2252 = {
bundleType: 0,
version: "19.2.0-native-fb-956d770a-20250708",
version: "19.2.0-native-fb-4a3ff8ee-20250709",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-956d770a-20250708",
reconcilerVersion: "19.2.0-native-fb-4a3ff8ee-20250709",
getLaneLabelMap: function () {
for (
var map = new Map(), lane = 1, index$319 = 0;
@@ -19393,7 +19393,7 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.2.0-native-fb-956d770a-20250708";
exports.version = "19.2.0-native-fb-4a3ff8ee-20250709";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<6a7d2638ad404202f0a4939ed304a156>>
* @generated SignedSource<<f92eca5428dd783e568bffb49d0a9d5f>>
*/
"use strict";
@@ -15727,10 +15727,10 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
version: "19.2.0-native-fb-956d770a-20250708",
version: "19.2.0-native-fb-4a3ff8ee-20250709",
rendererPackageName: "react-test-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-956d770a-20250708"
reconcilerVersion: "19.2.0-native-fb-4a3ff8ee-20250709"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -15875,5 +15875,5 @@ __DEV__ &&
flushSyncWorkAcrossRoots_impl(0, !0));
}
};
exports.version = "19.2.0-native-fb-956d770a-20250708";
exports.version = "19.2.0-native-fb-4a3ff8ee-20250709";
})();
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<24ccc6329cf9927c7d2f3acee460ad85>>
* @generated SignedSource<<33d512bf73c6b388af81cfbbe0ae7d12>>
*/
"use strict";
@@ -9907,10 +9907,10 @@ function wrapFiber(fiber) {
}
var internals$jscomp$inline_1434 = {
bundleType: 0,
version: "19.2.0-native-fb-956d770a-20250708",
version: "19.2.0-native-fb-4a3ff8ee-20250709",
rendererPackageName: "react-test-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-956d770a-20250708"
reconcilerVersion: "19.2.0-native-fb-4a3ff8ee-20250709"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1435 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -10046,4 +10046,4 @@ exports.unstable_batchedUpdates = function (fn, a) {
flushSyncWorkAcrossRoots_impl(0, !0));
}
};
exports.version = "19.2.0-native-fb-956d770a-20250708";
exports.version = "19.2.0-native-fb-4a3ff8ee-20250709";
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<b740f8aa77f0f4429b6dd7940e9b75f7>>
* @generated SignedSource<<eafa155dbb0f8f6363427d5de593b3c1>>
*/
"use strict";
@@ -10527,10 +10527,10 @@ function wrapFiber(fiber) {
}
var internals$jscomp$inline_1241 = {
bundleType: 0,
version: "19.2.0-native-fb-956d770a-20250708",
version: "19.2.0-native-fb-4a3ff8ee-20250709",
rendererPackageName: "react-test-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-956d770a-20250708",
reconcilerVersion: "19.2.0-native-fb-4a3ff8ee-20250709",
getLaneLabelMap: function () {
for (
var map = new Map(), lane = 1, index$143 = 0;
@@ -10681,4 +10681,4 @@ exports.unstable_batchedUpdates = function (fn, a) {
flushSyncWorkAcrossRoots_impl(0, !0));
}
};
exports.version = "19.2.0-native-fb-956d770a-20250708";
exports.version = "19.2.0-native-fb-4a3ff8ee-20250709";
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<c1489e01a3e8811f4b3bc4bb06b75e5a>>
* @generated SignedSource<<ffd3c951acde1606856fb31811a5b858>>
*/
"use strict";
@@ -1413,7 +1413,7 @@ __DEV__ &&
exports.useTransition = function () {
return resolveDispatcher().useTransition();
};
exports.version = "19.2.0-native-fb-956d770a-20250708";
exports.version = "19.2.0-native-fb-4a3ff8ee-20250709";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<0b33c4d00977a3291996b61e8d3411fb>>
* @generated SignedSource<<5a2ce806fdd979dcfb074eea36fa5c15>>
*/
"use strict";
@@ -589,4 +589,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.2.0-native-fb-956d770a-20250708";
exports.version = "19.2.0-native-fb-4a3ff8ee-20250709";
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<3866ba3a6c63e026a426c82574b53f0e>>
* @generated SignedSource<<a340d0081fb79af3b4e7938426e3c9d7>>
*/
"use strict";
@@ -593,7 +593,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.2.0-native-fb-956d770a-20250708";
exports.version = "19.2.0-native-fb-4a3ff8ee-20250709";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
@@ -1 +1 @@
956d770adf59e1f8a00a7b7c52b5727ef9e353e7
4a3ff8eed65f96cda7617150f92de3544d5ddf6a
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<d8c4af1d7bf9b8e37a8ca2129e946d5f>>
* @generated SignedSource<<4101b8f8bf2a01358e1f5bbe4f5e91e1>>
*/
"use strict";
@@ -19236,10 +19236,10 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
version: "19.2.0-native-fb-956d770a-20250708",
version: "19.2.0-native-fb-4a3ff8ee-20250709",
rendererPackageName: "react-native-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-956d770a-20250708"
reconcilerVersion: "19.2.0-native-fb-4a3ff8ee-20250709"
};
null !== extraDevToolsConfig &&
(internals.rendererConfig = extraDevToolsConfig);
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<42bc305f33f405d4d9ae0a7b2ef996a2>>
* @generated SignedSource<<88947c4ee598cdbc7b64566631436d87>>
*/
"use strict";
@@ -11031,10 +11031,10 @@ batchedUpdatesImpl = function (fn, a) {
var roots = new Map(),
internals$jscomp$inline_1238 = {
bundleType: 0,
version: "19.2.0-native-fb-956d770a-20250708",
version: "19.2.0-native-fb-4a3ff8ee-20250709",
rendererPackageName: "react-native-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-956d770a-20250708"
reconcilerVersion: "19.2.0-native-fb-4a3ff8ee-20250709"
};
null !== extraDevToolsConfig &&
(internals$jscomp$inline_1238.rendererConfig = extraDevToolsConfig);
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<14037a8ebd92086a9eacde76d4d0450e>>
* @generated SignedSource<<8178f6230db6ef932917bc60f02e1bf3>>
*/
"use strict";
@@ -12959,10 +12959,10 @@ batchedUpdatesImpl = function (fn, a) {
var roots = new Map(),
internals$jscomp$inline_1473 = {
bundleType: 0,
version: "19.2.0-native-fb-956d770a-20250708",
version: "19.2.0-native-fb-4a3ff8ee-20250709",
rendererPackageName: "react-native-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-956d770a-20250708"
reconcilerVersion: "19.2.0-native-fb-4a3ff8ee-20250709"
};
null !== extraDevToolsConfig &&
(internals$jscomp$inline_1473.rendererConfig = extraDevToolsConfig);
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<9eba882e24dd4aab2592241c5a31ebff>>
* @generated SignedSource<<9c248e654306949ce01bb40284314193>>
*/
"use strict";
@@ -19569,11 +19569,11 @@ __DEV__ &&
shouldSuspendImpl = newShouldSuspendImpl;
};
var isomorphicReactPackageVersion = React.version;
if ("19.2.0-native-fb-956d770a-20250708" !== isomorphicReactPackageVersion)
if ("19.2.0-native-fb-4a3ff8ee-20250709" !== 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-956d770a-20250708\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-native-renderer: 19.2.0-native-fb-4a3ff8ee-20250709\nLearn more: https://react.dev/warnings/version-mismatch")
);
if (
"function" !==
@@ -19599,10 +19599,10 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
version: "19.2.0-native-fb-956d770a-20250708",
version: "19.2.0-native-fb-4a3ff8ee-20250709",
rendererPackageName: "react-native-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-956d770a-20250708"
reconcilerVersion: "19.2.0-native-fb-4a3ff8ee-20250709"
};
null !== extraDevToolsConfig &&
(internals.rendererConfig = extraDevToolsConfig);
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<a50852166ed45d941e05a96becbec208>>
* @generated SignedSource<<5387bfac95d1ad93ffc0315e04d941f6>>
*/
"use strict";
@@ -11223,11 +11223,11 @@ function updateContainer(element, container, parentComponent, callback) {
return lane;
}
var isomorphicReactPackageVersion = React.version;
if ("19.2.0-native-fb-956d770a-20250708" !== isomorphicReactPackageVersion)
if ("19.2.0-native-fb-4a3ff8ee-20250709" !== 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-956d770a-20250708\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-native-renderer: 19.2.0-native-fb-4a3ff8ee-20250709\nLearn more: https://react.dev/warnings/version-mismatch")
);
if (
"function" !==
@@ -11277,10 +11277,10 @@ batchedUpdatesImpl = function (fn, a) {
var roots = new Map(),
internals$jscomp$inline_1294 = {
bundleType: 0,
version: "19.2.0-native-fb-956d770a-20250708",
version: "19.2.0-native-fb-4a3ff8ee-20250709",
rendererPackageName: "react-native-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-956d770a-20250708"
reconcilerVersion: "19.2.0-native-fb-4a3ff8ee-20250709"
};
null !== extraDevToolsConfig &&
(internals$jscomp$inline_1294.rendererConfig = extraDevToolsConfig);
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<43504eba982bd030425af523ee455026>>
* @generated SignedSource<<8dfb07c6106b574ddf771151b9e24c9c>>
*/
"use strict";
@@ -13140,11 +13140,11 @@ function updateContainer(element, container, parentComponent, callback) {
return lane;
}
var isomorphicReactPackageVersion = React.version;
if ("19.2.0-native-fb-956d770a-20250708" !== isomorphicReactPackageVersion)
if ("19.2.0-native-fb-4a3ff8ee-20250709" !== 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-956d770a-20250708\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-native-renderer: 19.2.0-native-fb-4a3ff8ee-20250709\nLearn more: https://react.dev/warnings/version-mismatch")
);
if (
"function" !==
@@ -13194,10 +13194,10 @@ batchedUpdatesImpl = function (fn, a) {
var roots = new Map(),
internals$jscomp$inline_1529 = {
bundleType: 0,
version: "19.2.0-native-fb-956d770a-20250708",
version: "19.2.0-native-fb-4a3ff8ee-20250709",
rendererPackageName: "react-native-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-956d770a-20250708"
reconcilerVersion: "19.2.0-native-fb-4a3ff8ee-20250709"
};
null !== extraDevToolsConfig &&
(internals$jscomp$inline_1529.rendererConfig = extraDevToolsConfig);
@@ -12,7 +12,7 @@
* @lightSyntaxTransform
* @preventMunge
* @oncall react_core
* @generated SignedSource<<11c701821a63844c339e1f1e10f64598>>
* @generated SignedSource<<f237eedb027a5132f418bc406602e382>>
*/
'use strict';
@@ -30937,7 +30937,7 @@ function lower$1(func, env, bindings = null, capturedRefs = new Map()) {
});
}
function lowerStatement(builder, stmtPath, label = null) {
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29;
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33;
const stmtNode = stmtPath.node;
switch (stmtNode.type) {
case 'ThrowStatement': {
@@ -31824,12 +31824,40 @@ function lowerStatement(builder, stmtPath, label = null) {
}, continuationBlock);
return;
}
case 'WithStatement': {
builder.errors.push({
reason: `JavaScript 'with' syntax is not supported`,
description: `'with' syntax is considered deprecated and removed from JavaScript standards, consider alternatives`,
severity: ErrorSeverity.InvalidJS,
loc: (_28 = stmtPath.node.loc) !== null && _28 !== void 0 ? _28 : null,
suggestions: null,
});
lowerValueToTemporary(builder, {
kind: 'UnsupportedNode',
loc: (_29 = stmtPath.node.loc) !== null && _29 !== void 0 ? _29 : GeneratedSource,
node: stmtPath.node,
});
return;
}
case 'ClassDeclaration': {
builder.errors.push({
reason: `Support nested class declarations`,
severity: ErrorSeverity.Todo,
loc: (_30 = stmtPath.node.loc) !== null && _30 !== void 0 ? _30 : null,
suggestions: null,
});
lowerValueToTemporary(builder, {
kind: 'UnsupportedNode',
loc: (_31 = stmtPath.node.loc) !== null && _31 !== void 0 ? _31 : GeneratedSource,
node: stmtPath.node,
});
return;
}
case 'TypeAlias':
case 'TSInterfaceDeclaration':
case 'TSTypeAliasDeclaration': {
return;
}
case 'ClassDeclaration':
case 'DeclareClass':
case 'DeclareExportAllDeclaration':
case 'DeclareExportDeclaration':
@@ -31852,17 +31880,16 @@ function lowerStatement(builder, stmtPath, label = null) {
case 'TSExportAssignment':
case 'TSImportEqualsDeclaration':
case 'TSModuleDeclaration':
case 'TSNamespaceExportDeclaration':
case 'WithStatement': {
case 'TSNamespaceExportDeclaration': {
builder.errors.push({
reason: `(BuildHIR::lowerStatement) Handle ${stmtPath.type} statements`,
severity: ErrorSeverity.Todo,
loc: (_28 = stmtPath.node.loc) !== null && _28 !== void 0 ? _28 : null,
loc: (_32 = stmtPath.node.loc) !== null && _32 !== void 0 ? _32 : null,
suggestions: null,
});
lowerValueToTemporary(builder, {
kind: 'UnsupportedNode',
loc: (_29 = stmtPath.node.loc) !== null && _29 !== void 0 ? _29 : GeneratedSource,
loc: (_33 = stmtPath.node.loc) !== null && _33 !== void 0 ? _33 : GeneratedSource,
node: stmtPath.node,
});
return;
@@ -33635,7 +33662,7 @@ function lowerValueToTemporary(builder, value) {
return place;
}
function lowerIdentifier(builder, exprPath) {
var _a;
var _a, _b;
const exprNode = exprPath.node;
const exprLoc = (_a = exprNode.loc) !== null && _a !== void 0 ? _a : GeneratedSource;
const binding = builder.resolveIdentifier(exprPath);
@@ -33651,6 +33678,15 @@ function lowerIdentifier(builder, exprPath) {
return place;
}
default: {
if (binding.kind === 'Global' && binding.name === 'eval') {
builder.errors.push({
reason: `The 'eval' function is not supported`,
description: 'Eval is an anti-pattern in JavaScript, and the code executed cannot be evaluated by React Compiler',
severity: ErrorSeverity.InvalidJS,
loc: (_b = exprPath.node.loc) !== null && _b !== void 0 ? _b : null,
suggestions: null,
});
}
return lowerValueToTemporary(builder, {
kind: 'LoadGlobal',
binding,
@@ -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<<3d2d4f8bc316ffe54682b4ca8857e771>>
* @generated SignedSource<<97ca780167dfb44fffa80063333be3fa>>
*/
'use strict';
@@ -30922,7 +30922,7 @@ function lower$1(func, env, bindings = null, capturedRefs = new Map()) {
});
}
function lowerStatement(builder, stmtPath, label = null) {
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29;
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33;
const stmtNode = stmtPath.node;
switch (stmtNode.type) {
case 'ThrowStatement': {
@@ -31809,12 +31809,40 @@ function lowerStatement(builder, stmtPath, label = null) {
}, continuationBlock);
return;
}
case 'WithStatement': {
builder.errors.push({
reason: `JavaScript 'with' syntax is not supported`,
description: `'with' syntax is considered deprecated and removed from JavaScript standards, consider alternatives`,
severity: ErrorSeverity.InvalidJS,
loc: (_28 = stmtPath.node.loc) !== null && _28 !== void 0 ? _28 : null,
suggestions: null,
});
lowerValueToTemporary(builder, {
kind: 'UnsupportedNode',
loc: (_29 = stmtPath.node.loc) !== null && _29 !== void 0 ? _29 : GeneratedSource,
node: stmtPath.node,
});
return;
}
case 'ClassDeclaration': {
builder.errors.push({
reason: `Support nested class declarations`,
severity: ErrorSeverity.Todo,
loc: (_30 = stmtPath.node.loc) !== null && _30 !== void 0 ? _30 : null,
suggestions: null,
});
lowerValueToTemporary(builder, {
kind: 'UnsupportedNode',
loc: (_31 = stmtPath.node.loc) !== null && _31 !== void 0 ? _31 : GeneratedSource,
node: stmtPath.node,
});
return;
}
case 'TypeAlias':
case 'TSInterfaceDeclaration':
case 'TSTypeAliasDeclaration': {
return;
}
case 'ClassDeclaration':
case 'DeclareClass':
case 'DeclareExportAllDeclaration':
case 'DeclareExportDeclaration':
@@ -31837,17 +31865,16 @@ function lowerStatement(builder, stmtPath, label = null) {
case 'TSExportAssignment':
case 'TSImportEqualsDeclaration':
case 'TSModuleDeclaration':
case 'TSNamespaceExportDeclaration':
case 'WithStatement': {
case 'TSNamespaceExportDeclaration': {
builder.errors.push({
reason: `(BuildHIR::lowerStatement) Handle ${stmtPath.type} statements`,
severity: ErrorSeverity.Todo,
loc: (_28 = stmtPath.node.loc) !== null && _28 !== void 0 ? _28 : null,
loc: (_32 = stmtPath.node.loc) !== null && _32 !== void 0 ? _32 : null,
suggestions: null,
});
lowerValueToTemporary(builder, {
kind: 'UnsupportedNode',
loc: (_29 = stmtPath.node.loc) !== null && _29 !== void 0 ? _29 : GeneratedSource,
loc: (_33 = stmtPath.node.loc) !== null && _33 !== void 0 ? _33 : GeneratedSource,
node: stmtPath.node,
});
return;
@@ -33620,7 +33647,7 @@ function lowerValueToTemporary(builder, value) {
return place;
}
function lowerIdentifier(builder, exprPath) {
var _a;
var _a, _b;
const exprNode = exprPath.node;
const exprLoc = (_a = exprNode.loc) !== null && _a !== void 0 ? _a : GeneratedSource;
const binding = builder.resolveIdentifier(exprPath);
@@ -33636,6 +33663,15 @@ function lowerIdentifier(builder, exprPath) {
return place;
}
default: {
if (binding.kind === 'Global' && binding.name === 'eval') {
builder.errors.push({
reason: `The 'eval' function is not supported`,
description: 'Eval is an anti-pattern in JavaScript, and the code executed cannot be evaluated by React Compiler',
severity: ErrorSeverity.InvalidJS,
loc: (_b = exprPath.node.loc) !== null && _b !== void 0 ? _b : null,
suggestions: null,
});
}
return lowerValueToTemporary(builder, {
kind: 'LoadGlobal',
binding,
@@ -1,7 +1,7 @@
{
"name": "eslint-plugin-react-hooks",
"description": "ESLint rules for React Hooks",
"version": "0.0.0-experimental-956d770a-20250708",
"version": "0.0.0-experimental-4a3ff8ee-20250709",
"repository": {
"type": "git",
"url": "https://github.com/facebook/react.git",