[compiler] Emit more specific error when making identifiers with reserved words (#34080)

This currently throws an invariant which may be misleading. I checked
the ecma262 spec and used the same list of reserved words in our check.
To err on the side of being conservative, we also error when strict mode
reserved words are used.

DiffTrain build for [52612a7cbd](https://github.com/facebook/react/commit/52612a7cbdd8e1fee9599478247f78725869ebad)
This commit is contained in:
poteto
2025-08-01 12:18:45 -07:00
parent ceea1fc141
commit ad524e50a1
26 changed files with 231 additions and 101 deletions
+1 -1
View File
@@ -1 +1 @@
19.2.0-native-fb-88b40f6e-20250729
19.2.0-native-fb-52612a7c-20250801
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<07cfe1babfcf35887988ff0bdd163526>>
* @generated SignedSource<<cddf7ed26a27c94555fb54a572a2dee1>>
*/
"use strict";
@@ -404,5 +404,5 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.2.0-native-fb-88b40f6e-20250729";
exports.version = "19.2.0-native-fb-52612a7c-20250801";
})();
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<225312cf04b282301d43daa5ddec4efe>>
* @generated SignedSource<<213f0a51106d5a8ee1fc66ad41221d79>>
*/
"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-88b40f6e-20250729";
exports.version = "19.2.0-native-fb-52612a7c-20250801";
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<225312cf04b282301d43daa5ddec4efe>>
* @generated SignedSource<<213f0a51106d5a8ee1fc66ad41221d79>>
*/
"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-88b40f6e-20250729";
exports.version = "19.2.0-native-fb-52612a7c-20250801";
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<262da8e6f3e07ddd4b2deee7386b5c78>>
* @generated SignedSource<<064be4c75314a8d05b2ced7f70db1399>>
*/
/*
@@ -29025,11 +29025,11 @@ __DEV__ &&
};
(function () {
var isomorphicReactPackageVersion = React.version;
if ("19.2.0-native-fb-88b40f6e-20250729" !== isomorphicReactPackageVersion)
if ("19.2.0-native-fb-52612a7c-20250801" !== 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-88b40f6e-20250729\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-dom: 19.2.0-native-fb-52612a7c-20250801\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
@@ -29066,10 +29066,10 @@ __DEV__ &&
!(function () {
var internals = {
bundleType: 1,
version: "19.2.0-native-fb-88b40f6e-20250729",
version: "19.2.0-native-fb-52612a7c-20250801",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-88b40f6e-20250729"
reconcilerVersion: "19.2.0-native-fb-52612a7c-20250801"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -29207,5 +29207,5 @@ __DEV__ &&
listenToAllSupportedEvents(container);
return new ReactDOMHydrationRoot(initialChildren);
};
exports.version = "19.2.0-native-fb-88b40f6e-20250729";
exports.version = "19.2.0-native-fb-52612a7c-20250801";
})();
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<d9bee1c3c2f67ffbe4daa5a6c21c2da0>>
* @generated SignedSource<<8f28bea2074edfe387fe854b3f0041b4>>
*/
/*
@@ -17128,14 +17128,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
};
var isomorphicReactPackageVersion$jscomp$inline_2002 = React.version;
if (
"19.2.0-native-fb-88b40f6e-20250729" !==
"19.2.0-native-fb-52612a7c-20250801" !==
isomorphicReactPackageVersion$jscomp$inline_2002
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_2002,
"19.2.0-native-fb-88b40f6e-20250729"
"19.2.0-native-fb-52612a7c-20250801"
)
);
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -17157,10 +17157,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
};
var internals$jscomp$inline_2521 = {
bundleType: 0,
version: "19.2.0-native-fb-88b40f6e-20250729",
version: "19.2.0-native-fb-52612a7c-20250801",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-88b40f6e-20250729"
reconcilerVersion: "19.2.0-native-fb-52612a7c-20250801"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2522 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -17258,4 +17258,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
listenToAllSupportedEvents(container);
return new ReactDOMHydrationRoot(initialChildren);
};
exports.version = "19.2.0-native-fb-88b40f6e-20250729";
exports.version = "19.2.0-native-fb-52612a7c-20250801";
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<22693102f83cb6d0c3f9fd398cdfa31d>>
* @generated SignedSource<<0b21941db16609e240e340f78c07245b>>
*/
/*
@@ -19086,14 +19086,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
};
var isomorphicReactPackageVersion$jscomp$inline_2242 = React.version;
if (
"19.2.0-native-fb-88b40f6e-20250729" !==
"19.2.0-native-fb-52612a7c-20250801" !==
isomorphicReactPackageVersion$jscomp$inline_2242
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_2242,
"19.2.0-native-fb-88b40f6e-20250729"
"19.2.0-native-fb-52612a7c-20250801"
)
);
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -19115,10 +19115,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
};
var internals$jscomp$inline_2249 = {
bundleType: 0,
version: "19.2.0-native-fb-88b40f6e-20250729",
version: "19.2.0-native-fb-52612a7c-20250801",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-88b40f6e-20250729",
reconcilerVersion: "19.2.0-native-fb-52612a7c-20250801",
getLaneLabelMap: function () {
for (
var map = new Map(), lane = 1, index$319 = 0;
@@ -19231,4 +19231,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
listenToAllSupportedEvents(container);
return new ReactDOMHydrationRoot(initialChildren);
};
exports.version = "19.2.0-native-fb-88b40f6e-20250729";
exports.version = "19.2.0-native-fb-52612a7c-20250801";
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<95881d8c2e7a69054b1ae206afd9b560>>
* @generated SignedSource<<ec8a7a53fafad10aa5c19cb98b75d13a>>
*/
/*
@@ -29081,11 +29081,11 @@ __DEV__ &&
};
(function () {
var isomorphicReactPackageVersion = React.version;
if ("19.2.0-native-fb-88b40f6e-20250729" !== isomorphicReactPackageVersion)
if ("19.2.0-native-fb-52612a7c-20250801" !== 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-88b40f6e-20250729\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-dom: 19.2.0-native-fb-52612a7c-20250801\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
@@ -29122,10 +29122,10 @@ __DEV__ &&
!(function () {
var internals = {
bundleType: 1,
version: "19.2.0-native-fb-88b40f6e-20250729",
version: "19.2.0-native-fb-52612a7c-20250801",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-88b40f6e-20250729"
reconcilerVersion: "19.2.0-native-fb-52612a7c-20250801"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -29579,7 +29579,7 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.2.0-native-fb-88b40f6e-20250729";
exports.version = "19.2.0-native-fb-52612a7c-20250801";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<6ef1bc08041a3c34ceb0498ff067ea1d>>
* @generated SignedSource<<bc051e59507033ad5b3ec9fe9778c9b7>>
*/
/*
@@ -17139,14 +17139,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
};
var isomorphicReactPackageVersion$jscomp$inline_2003 = React.version;
if (
"19.2.0-native-fb-88b40f6e-20250729" !==
"19.2.0-native-fb-52612a7c-20250801" !==
isomorphicReactPackageVersion$jscomp$inline_2003
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_2003,
"19.2.0-native-fb-88b40f6e-20250729"
"19.2.0-native-fb-52612a7c-20250801"
)
);
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -17168,10 +17168,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
};
var internals$jscomp$inline_2524 = {
bundleType: 0,
version: "19.2.0-native-fb-88b40f6e-20250729",
version: "19.2.0-native-fb-52612a7c-20250801",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-88b40f6e-20250729"
reconcilerVersion: "19.2.0-native-fb-52612a7c-20250801"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2525 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -17422,4 +17422,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.2.0-native-fb-88b40f6e-20250729";
exports.version = "19.2.0-native-fb-52612a7c-20250801";
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<129da2d06d8a452e371f5bed99621cc9>>
* @generated SignedSource<<a3dfc00ac4c1d74abc05cff3d3201d66>>
*/
/*
@@ -19101,14 +19101,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
};
var isomorphicReactPackageVersion$jscomp$inline_2243 = React.version;
if (
"19.2.0-native-fb-88b40f6e-20250729" !==
"19.2.0-native-fb-52612a7c-20250801" !==
isomorphicReactPackageVersion$jscomp$inline_2243
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_2243,
"19.2.0-native-fb-88b40f6e-20250729"
"19.2.0-native-fb-52612a7c-20250801"
)
);
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -19130,10 +19130,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
};
var internals$jscomp$inline_2250 = {
bundleType: 0,
version: "19.2.0-native-fb-88b40f6e-20250729",
version: "19.2.0-native-fb-52612a7c-20250801",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-88b40f6e-20250729",
reconcilerVersion: "19.2.0-native-fb-52612a7c-20250801",
getLaneLabelMap: function () {
for (
var map = new Map(), lane = 1, index$319 = 0;
@@ -19399,7 +19399,7 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.2.0-native-fb-88b40f6e-20250729";
exports.version = "19.2.0-native-fb-52612a7c-20250801";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<8335efc5eed6945403e1faca764fa12d>>
* @generated SignedSource<<e152f0547370e2578ca2fc7a5b7880bd>>
*/
"use strict";
@@ -15739,10 +15739,10 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
version: "19.2.0-native-fb-88b40f6e-20250729",
version: "19.2.0-native-fb-52612a7c-20250801",
rendererPackageName: "react-test-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-88b40f6e-20250729"
reconcilerVersion: "19.2.0-native-fb-52612a7c-20250801"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -15887,5 +15887,5 @@ __DEV__ &&
flushSyncWorkAcrossRoots_impl(0, !0));
}
};
exports.version = "19.2.0-native-fb-88b40f6e-20250729";
exports.version = "19.2.0-native-fb-52612a7c-20250801";
})();
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<76c3afc64ca08074d557fd5073aca362>>
* @generated SignedSource<<c738318c3e6b03da8a831d1e1409a002>>
*/
"use strict";
@@ -9912,10 +9912,10 @@ function wrapFiber(fiber) {
}
var internals$jscomp$inline_1432 = {
bundleType: 0,
version: "19.2.0-native-fb-88b40f6e-20250729",
version: "19.2.0-native-fb-52612a7c-20250801",
rendererPackageName: "react-test-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-88b40f6e-20250729"
reconcilerVersion: "19.2.0-native-fb-52612a7c-20250801"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1433 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -10051,4 +10051,4 @@ exports.unstable_batchedUpdates = function (fn, a) {
flushSyncWorkAcrossRoots_impl(0, !0));
}
};
exports.version = "19.2.0-native-fb-88b40f6e-20250729";
exports.version = "19.2.0-native-fb-52612a7c-20250801";
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<cee9c8cd84c9203cea40817daf7ae490>>
* @generated SignedSource<<3461313af326017dedba8ad249491ae4>>
*/
"use strict";
@@ -10532,10 +10532,10 @@ function wrapFiber(fiber) {
}
var internals$jscomp$inline_1239 = {
bundleType: 0,
version: "19.2.0-native-fb-88b40f6e-20250729",
version: "19.2.0-native-fb-52612a7c-20250801",
rendererPackageName: "react-test-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-88b40f6e-20250729",
reconcilerVersion: "19.2.0-native-fb-52612a7c-20250801",
getLaneLabelMap: function () {
for (
var map = new Map(), lane = 1, index$143 = 0;
@@ -10686,4 +10686,4 @@ exports.unstable_batchedUpdates = function (fn, a) {
flushSyncWorkAcrossRoots_impl(0, !0));
}
};
exports.version = "19.2.0-native-fb-88b40f6e-20250729";
exports.version = "19.2.0-native-fb-52612a7c-20250801";
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<7865c894db8e8f7742a9d27575f384c7>>
* @generated SignedSource<<1c13ac85066b9dd21480c460f8909574>>
*/
"use strict";
@@ -1413,7 +1413,7 @@ __DEV__ &&
exports.useTransition = function () {
return resolveDispatcher().useTransition();
};
exports.version = "19.2.0-native-fb-88b40f6e-20250729";
exports.version = "19.2.0-native-fb-52612a7c-20250801";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<277f8deb1caeba4adc4e5bbe20929e14>>
* @generated SignedSource<<8863c71c1c50a94f74002b5e5e1923bc>>
*/
"use strict";
@@ -589,4 +589,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.2.0-native-fb-88b40f6e-20250729";
exports.version = "19.2.0-native-fb-52612a7c-20250801";
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<955ae873197526ebbc3bc80171ae06de>>
* @generated SignedSource<<adc91e7d2c746dba16026715b6e2a6af>>
*/
"use strict";
@@ -593,7 +593,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.2.0-native-fb-88b40f6e-20250729";
exports.version = "19.2.0-native-fb-52612a7c-20250801";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
@@ -1 +1 @@
88b40f6e41004773f19d37827980c66a8cf1865b
52612a7cbdd8e1fee9599478247f78725869ebad
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<8896477577c1a6628efa695e121857df>>
* @generated SignedSource<<cc44e6ceba91b51adf5ba814c1c07b22>>
*/
"use strict";
@@ -19244,10 +19244,10 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
version: "19.2.0-native-fb-88b40f6e-20250729",
version: "19.2.0-native-fb-52612a7c-20250801",
rendererPackageName: "react-native-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-88b40f6e-20250729"
reconcilerVersion: "19.2.0-native-fb-52612a7c-20250801"
};
null !== extraDevToolsConfig &&
(internals.rendererConfig = extraDevToolsConfig);
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<988940a40fe6181f9dc2040a91af705f>>
* @generated SignedSource<<710a7912d0345b302e5e9b543d3c9439>>
*/
"use strict";
@@ -11016,10 +11016,10 @@ batchedUpdatesImpl = function (fn, a) {
var roots = new Map(),
internals$jscomp$inline_1235 = {
bundleType: 0,
version: "19.2.0-native-fb-88b40f6e-20250729",
version: "19.2.0-native-fb-52612a7c-20250801",
rendererPackageName: "react-native-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-88b40f6e-20250729"
reconcilerVersion: "19.2.0-native-fb-52612a7c-20250801"
};
null !== extraDevToolsConfig &&
(internals$jscomp$inline_1235.rendererConfig = extraDevToolsConfig);
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<0e968e826948428d337dab802fe0e322>>
* @generated SignedSource<<00af18a2ce5b562a7caead1fb2d75517>>
*/
"use strict";
@@ -12945,10 +12945,10 @@ batchedUpdatesImpl = function (fn, a) {
var roots = new Map(),
internals$jscomp$inline_1470 = {
bundleType: 0,
version: "19.2.0-native-fb-88b40f6e-20250729",
version: "19.2.0-native-fb-52612a7c-20250801",
rendererPackageName: "react-native-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-88b40f6e-20250729"
reconcilerVersion: "19.2.0-native-fb-52612a7c-20250801"
};
null !== extraDevToolsConfig &&
(internals$jscomp$inline_1470.rendererConfig = extraDevToolsConfig);
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<19b4086810ceac9418bbc4df474337d8>>
* @generated SignedSource<<166cf7d411b19aa65b43b7157f58af3b>>
*/
"use strict";
@@ -19602,11 +19602,11 @@ __DEV__ &&
shouldSuspendImpl = newShouldSuspendImpl;
};
var isomorphicReactPackageVersion = React.version;
if ("19.2.0-native-fb-88b40f6e-20250729" !== isomorphicReactPackageVersion)
if ("19.2.0-native-fb-52612a7c-20250801" !== 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-88b40f6e-20250729\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-native-renderer: 19.2.0-native-fb-52612a7c-20250801\nLearn more: https://react.dev/warnings/version-mismatch")
);
if (
"function" !==
@@ -19632,10 +19632,10 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
version: "19.2.0-native-fb-88b40f6e-20250729",
version: "19.2.0-native-fb-52612a7c-20250801",
rendererPackageName: "react-native-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-88b40f6e-20250729"
reconcilerVersion: "19.2.0-native-fb-52612a7c-20250801"
};
null !== extraDevToolsConfig &&
(internals.rendererConfig = extraDevToolsConfig);
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<0b007f0271900736e30d0d6bef639d62>>
* @generated SignedSource<<819b4d55f0a67b05db3013ef196ca501>>
*/
"use strict";
@@ -11242,11 +11242,11 @@ function updateContainer(element, container, parentComponent, callback) {
return lane;
}
var isomorphicReactPackageVersion = React.version;
if ("19.2.0-native-fb-88b40f6e-20250729" !== isomorphicReactPackageVersion)
if ("19.2.0-native-fb-52612a7c-20250801" !== 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-88b40f6e-20250729\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-native-renderer: 19.2.0-native-fb-52612a7c-20250801\nLearn more: https://react.dev/warnings/version-mismatch")
);
if (
"function" !==
@@ -11296,10 +11296,10 @@ batchedUpdatesImpl = function (fn, a) {
var roots = new Map(),
internals$jscomp$inline_1293 = {
bundleType: 0,
version: "19.2.0-native-fb-88b40f6e-20250729",
version: "19.2.0-native-fb-52612a7c-20250801",
rendererPackageName: "react-native-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-88b40f6e-20250729"
reconcilerVersion: "19.2.0-native-fb-52612a7c-20250801"
};
null !== extraDevToolsConfig &&
(internals$jscomp$inline_1293.rendererConfig = extraDevToolsConfig);
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<1a49c1e7414657b5a5910905481ba855>>
* @generated SignedSource<<91fab1c96f8712060343ee97d8849de5>>
*/
"use strict";
@@ -13160,11 +13160,11 @@ function updateContainer(element, container, parentComponent, callback) {
return lane;
}
var isomorphicReactPackageVersion = React.version;
if ("19.2.0-native-fb-88b40f6e-20250729" !== isomorphicReactPackageVersion)
if ("19.2.0-native-fb-52612a7c-20250801" !== 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-88b40f6e-20250729\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-native-renderer: 19.2.0-native-fb-52612a7c-20250801\nLearn more: https://react.dev/warnings/version-mismatch")
);
if (
"function" !==
@@ -13214,10 +13214,10 @@ batchedUpdatesImpl = function (fn, a) {
var roots = new Map(),
internals$jscomp$inline_1528 = {
bundleType: 0,
version: "19.2.0-native-fb-88b40f6e-20250729",
version: "19.2.0-native-fb-52612a7c-20250801",
rendererPackageName: "react-native-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-88b40f6e-20250729"
reconcilerVersion: "19.2.0-native-fb-52612a7c-20250801"
};
null !== extraDevToolsConfig &&
(internals$jscomp$inline_1528.rendererConfig = extraDevToolsConfig);
@@ -12,7 +12,7 @@
* @lightSyntaxTransform
* @preventMunge
* @oncall react_core
* @generated SignedSource<<3871798f596aa8dcf52018fc7504d978>>
* @generated SignedSource<<c0576f059188ef841e1726fe6ccc7133>>
*/
'use strict';
@@ -18100,6 +18100,61 @@ function phiTypeEquals(tA, tB) {
return false;
}
const RESERVED_WORDS = new Set([
'break',
'case',
'catch',
'class',
'const',
'continue',
'debugger',
'default',
'delete',
'do',
'else',
'enum',
'export',
'extends',
'false',
'finally',
'for',
'function',
'if',
'import',
'in',
'instanceof',
'new',
'null',
'return',
'super',
'switch',
'this',
'throw',
'true',
'try',
'typeof',
'var',
'void',
'while',
'with',
]);
const STRICT_MODE_RESERVED_WORDS = new Set([
'let',
'static',
'implements',
'interface',
'package',
'private',
'protected',
'public',
]);
const STRICT_MODE_RESTRICTED_WORDS = new Set(['eval', 'arguments']);
function isReservedWord(identifierName) {
return (RESERVED_WORDS.has(identifierName) ||
STRICT_MODE_RESERVED_WORDS.has(identifierName) ||
STRICT_MODE_RESTRICTED_WORDS.has(identifierName));
}
const GeneratedSource = Symbol();
function isStatementBlockKind(kind) {
return kind === 'block' || kind === 'catch';
@@ -18157,12 +18212,22 @@ function forkTemporaryIdentifier(id, source) {
return Object.assign(Object.assign({}, source), { mutableRange: { start: makeInstructionId(0), end: makeInstructionId(0) }, id });
}
function makeIdentifierName(name) {
CompilerError.invariant(libExports$1.isValidIdentifier(name), {
reason: `Expected a valid identifier name`,
loc: GeneratedSource,
description: `\`${name}\` is not a valid JavaScript identifier`,
suggestions: null,
});
if (isReservedWord(name)) {
CompilerError.throwInvalidJS({
reason: 'Expected a non-reserved identifier name',
loc: GeneratedSource,
description: `\`${name}\` is a reserved word in JavaScript and cannot be used as an identifier name`,
suggestions: null,
});
}
else {
CompilerError.invariant(libExports$1.isValidIdentifier(name), {
reason: `Expected a valid identifier name`,
loc: GeneratedSource,
description: `\`${name}\` is not a valid JavaScript identifier`,
suggestions: null,
});
}
return {
kind: 'named',
value: name,
@@ -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<<9333c1881d2e38e7a657bf98d1f5f416>>
* @generated SignedSource<<3aa09a7bfbf4db9877c897a661c0558e>>
*/
'use strict';
@@ -18085,6 +18085,61 @@ function phiTypeEquals(tA, tB) {
return false;
}
const RESERVED_WORDS = new Set([
'break',
'case',
'catch',
'class',
'const',
'continue',
'debugger',
'default',
'delete',
'do',
'else',
'enum',
'export',
'extends',
'false',
'finally',
'for',
'function',
'if',
'import',
'in',
'instanceof',
'new',
'null',
'return',
'super',
'switch',
'this',
'throw',
'true',
'try',
'typeof',
'var',
'void',
'while',
'with',
]);
const STRICT_MODE_RESERVED_WORDS = new Set([
'let',
'static',
'implements',
'interface',
'package',
'private',
'protected',
'public',
]);
const STRICT_MODE_RESTRICTED_WORDS = new Set(['eval', 'arguments']);
function isReservedWord(identifierName) {
return (RESERVED_WORDS.has(identifierName) ||
STRICT_MODE_RESERVED_WORDS.has(identifierName) ||
STRICT_MODE_RESTRICTED_WORDS.has(identifierName));
}
const GeneratedSource = Symbol();
function isStatementBlockKind(kind) {
return kind === 'block' || kind === 'catch';
@@ -18142,12 +18197,22 @@ function forkTemporaryIdentifier(id, source) {
return Object.assign(Object.assign({}, source), { mutableRange: { start: makeInstructionId(0), end: makeInstructionId(0) }, id });
}
function makeIdentifierName(name) {
CompilerError.invariant(libExports$1.isValidIdentifier(name), {
reason: `Expected a valid identifier name`,
loc: GeneratedSource,
description: `\`${name}\` is not a valid JavaScript identifier`,
suggestions: null,
});
if (isReservedWord(name)) {
CompilerError.throwInvalidJS({
reason: 'Expected a non-reserved identifier name',
loc: GeneratedSource,
description: `\`${name}\` is a reserved word in JavaScript and cannot be used as an identifier name`,
suggestions: null,
});
}
else {
CompilerError.invariant(libExports$1.isValidIdentifier(name), {
reason: `Expected a valid identifier name`,
loc: GeneratedSource,
description: `\`${name}\` is not a valid JavaScript identifier`,
suggestions: null,
});
}
return {
kind: 'named',
value: name,
@@ -1,7 +1,7 @@
{
"name": "eslint-plugin-react-hooks",
"description": "ESLint rules for React Hooks",
"version": "0.0.0-experimental-88b40f6e-20250729",
"version": "0.0.0-experimental-52612a7c-20250801",
"repository": {
"type": "git",
"url": "https://github.com/facebook/react.git",