Skip to content

Commit 789bae0

Browse files
committed
[compiler] Add definitions for Object entries/keys/values (#34047)
Fixes remaining issue in #32261, where passing a previously useMemo()-d value to `Object.entries()` makes the compiler think the value is mutated and fail validatePreserveExistingMemo. While I was there I added Object.keys() and Object.values() too. --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/34047). * #34049 * __->__ #34047 * #34044 DiffTrain build for [0860b9c](0860b9c)
1 parent ad524e5 commit 789bae0

26 files changed

+283
-89
lines changed

compiled-rn/VERSION_NATIVE_FB

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
19.2.0-native-fb-52612a7c-20250801
1+
19.2.0-native-fb-0860b9cc-20250801

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-dev.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<cddf7ed26a27c94555fb54a572a2dee1>>
10+
* @generated SignedSource<<aa187066c30394a3c15629e5abdf9c4e>>
1111
*/
1212

1313
"use strict";
@@ -404,5 +404,5 @@ __DEV__ &&
404404
exports.useFormStatus = function () {
405405
return resolveDispatcher().useHostTransitionStatus();
406406
};
407-
exports.version = "19.2.0-native-fb-52612a7c-20250801";
407+
exports.version = "19.2.0-native-fb-0860b9cc-20250801";
408408
})();

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-prod.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<213f0a51106d5a8ee1fc66ad41221d79>>
10+
* @generated SignedSource<<1acfed59bbd6b544d14b343d95fa59f6>>
1111
*/
1212

1313
"use strict";
@@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) {
203203
exports.useFormStatus = function () {
204204
return ReactSharedInternals.H.useHostTransitionStatus();
205205
};
206-
exports.version = "19.2.0-native-fb-52612a7c-20250801";
206+
exports.version = "19.2.0-native-fb-0860b9cc-20250801";

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-profiling.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<213f0a51106d5a8ee1fc66ad41221d79>>
10+
* @generated SignedSource<<1acfed59bbd6b544d14b343d95fa59f6>>
1111
*/
1212

1313
"use strict";
@@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) {
203203
exports.useFormStatus = function () {
204204
return ReactSharedInternals.H.useHostTransitionStatus();
205205
};
206-
exports.version = "19.2.0-native-fb-52612a7c-20250801";
206+
exports.version = "19.2.0-native-fb-0860b9cc-20250801";

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-dev.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<064be4c75314a8d05b2ced7f70db1399>>
10+
* @generated SignedSource<<f2c939b476d03957d7dac09fc9962896>>
1111
*/
1212

1313
/*
@@ -29025,11 +29025,11 @@ __DEV__ &&
2902529025
};
2902629026
(function () {
2902729027
var isomorphicReactPackageVersion = React.version;
29028-
if ("19.2.0-native-fb-52612a7c-20250801" !== isomorphicReactPackageVersion)
29028+
if ("19.2.0-native-fb-0860b9cc-20250801" !== isomorphicReactPackageVersion)
2902929029
throw Error(
2903029030
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
2903129031
(isomorphicReactPackageVersion +
29032-
"\n - react-dom: 19.2.0-native-fb-52612a7c-20250801\nLearn more: https://react.dev/warnings/version-mismatch")
29032+
"\n - react-dom: 19.2.0-native-fb-0860b9cc-20250801\nLearn more: https://react.dev/warnings/version-mismatch")
2903329033
);
2903429034
})();
2903529035
("function" === typeof Map &&
@@ -29066,10 +29066,10 @@ __DEV__ &&
2906629066
!(function () {
2906729067
var internals = {
2906829068
bundleType: 1,
29069-
version: "19.2.0-native-fb-52612a7c-20250801",
29069+
version: "19.2.0-native-fb-0860b9cc-20250801",
2907029070
rendererPackageName: "react-dom",
2907129071
currentDispatcherRef: ReactSharedInternals,
29072-
reconcilerVersion: "19.2.0-native-fb-52612a7c-20250801"
29072+
reconcilerVersion: "19.2.0-native-fb-0860b9cc-20250801"
2907329073
};
2907429074
internals.overrideHookState = overrideHookState;
2907529075
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -29207,5 +29207,5 @@ __DEV__ &&
2920729207
listenToAllSupportedEvents(container);
2920829208
return new ReactDOMHydrationRoot(initialChildren);
2920929209
};
29210-
exports.version = "19.2.0-native-fb-52612a7c-20250801";
29210+
exports.version = "19.2.0-native-fb-0860b9cc-20250801";
2921129211
})();

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-prod.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<8f28bea2074edfe387fe854b3f0041b4>>
10+
* @generated SignedSource<<051e68eb7de6cb41852b9fd2efb49b5d>>
1111
*/
1212

1313
/*
@@ -17128,14 +17128,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
1712817128
};
1712917129
var isomorphicReactPackageVersion$jscomp$inline_2002 = React.version;
1713017130
if (
17131-
"19.2.0-native-fb-52612a7c-20250801" !==
17131+
"19.2.0-native-fb-0860b9cc-20250801" !==
1713217132
isomorphicReactPackageVersion$jscomp$inline_2002
1713317133
)
1713417134
throw Error(
1713517135
formatProdErrorMessage(
1713617136
527,
1713717137
isomorphicReactPackageVersion$jscomp$inline_2002,
17138-
"19.2.0-native-fb-52612a7c-20250801"
17138+
"19.2.0-native-fb-0860b9cc-20250801"
1713917139
)
1714017140
);
1714117141
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -17157,10 +17157,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
1715717157
};
1715817158
var internals$jscomp$inline_2521 = {
1715917159
bundleType: 0,
17160-
version: "19.2.0-native-fb-52612a7c-20250801",
17160+
version: "19.2.0-native-fb-0860b9cc-20250801",
1716117161
rendererPackageName: "react-dom",
1716217162
currentDispatcherRef: ReactSharedInternals,
17163-
reconcilerVersion: "19.2.0-native-fb-52612a7c-20250801"
17163+
reconcilerVersion: "19.2.0-native-fb-0860b9cc-20250801"
1716417164
};
1716517165
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
1716617166
var hook$jscomp$inline_2522 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -17258,4 +17258,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
1725817258
listenToAllSupportedEvents(container);
1725917259
return new ReactDOMHydrationRoot(initialChildren);
1726017260
};
17261-
exports.version = "19.2.0-native-fb-52612a7c-20250801";
17261+
exports.version = "19.2.0-native-fb-0860b9cc-20250801";

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-profiling.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<0b21941db16609e240e340f78c07245b>>
10+
* @generated SignedSource<<f35f0e88b47254673d7bf39a43fdac80>>
1111
*/
1212

1313
/*
@@ -19086,14 +19086,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
1908619086
};
1908719087
var isomorphicReactPackageVersion$jscomp$inline_2242 = React.version;
1908819088
if (
19089-
"19.2.0-native-fb-52612a7c-20250801" !==
19089+
"19.2.0-native-fb-0860b9cc-20250801" !==
1909019090
isomorphicReactPackageVersion$jscomp$inline_2242
1909119091
)
1909219092
throw Error(
1909319093
formatProdErrorMessage(
1909419094
527,
1909519095
isomorphicReactPackageVersion$jscomp$inline_2242,
19096-
"19.2.0-native-fb-52612a7c-20250801"
19096+
"19.2.0-native-fb-0860b9cc-20250801"
1909719097
)
1909819098
);
1909919099
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -19115,10 +19115,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
1911519115
};
1911619116
var internals$jscomp$inline_2249 = {
1911719117
bundleType: 0,
19118-
version: "19.2.0-native-fb-52612a7c-20250801",
19118+
version: "19.2.0-native-fb-0860b9cc-20250801",
1911919119
rendererPackageName: "react-dom",
1912019120
currentDispatcherRef: ReactSharedInternals,
19121-
reconcilerVersion: "19.2.0-native-fb-52612a7c-20250801",
19121+
reconcilerVersion: "19.2.0-native-fb-0860b9cc-20250801",
1912219122
getLaneLabelMap: function () {
1912319123
for (
1912419124
var map = new Map(), lane = 1, index$319 = 0;
@@ -19231,4 +19231,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
1923119231
listenToAllSupportedEvents(container);
1923219232
return new ReactDOMHydrationRoot(initialChildren);
1923319233
};
19234-
exports.version = "19.2.0-native-fb-52612a7c-20250801";
19234+
exports.version = "19.2.0-native-fb-0860b9cc-20250801";

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-dev.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<ec8a7a53fafad10aa5c19cb98b75d13a>>
10+
* @generated SignedSource<<27906587bd6bdf4327fd8c56f10d4e6c>>
1111
*/
1212

1313
/*
@@ -29081,11 +29081,11 @@ __DEV__ &&
2908129081
};
2908229082
(function () {
2908329083
var isomorphicReactPackageVersion = React.version;
29084-
if ("19.2.0-native-fb-52612a7c-20250801" !== isomorphicReactPackageVersion)
29084+
if ("19.2.0-native-fb-0860b9cc-20250801" !== isomorphicReactPackageVersion)
2908529085
throw Error(
2908629086
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
2908729087
(isomorphicReactPackageVersion +
29088-
"\n - react-dom: 19.2.0-native-fb-52612a7c-20250801\nLearn more: https://react.dev/warnings/version-mismatch")
29088+
"\n - react-dom: 19.2.0-native-fb-0860b9cc-20250801\nLearn more: https://react.dev/warnings/version-mismatch")
2908929089
);
2909029090
})();
2909129091
("function" === typeof Map &&
@@ -29122,10 +29122,10 @@ __DEV__ &&
2912229122
!(function () {
2912329123
var internals = {
2912429124
bundleType: 1,
29125-
version: "19.2.0-native-fb-52612a7c-20250801",
29125+
version: "19.2.0-native-fb-0860b9cc-20250801",
2912629126
rendererPackageName: "react-dom",
2912729127
currentDispatcherRef: ReactSharedInternals,
29128-
reconcilerVersion: "19.2.0-native-fb-52612a7c-20250801"
29128+
reconcilerVersion: "19.2.0-native-fb-0860b9cc-20250801"
2912929129
};
2913029130
internals.overrideHookState = overrideHookState;
2913129131
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -29579,7 +29579,7 @@ __DEV__ &&
2957929579
exports.useFormStatus = function () {
2958029580
return resolveDispatcher().useHostTransitionStatus();
2958129581
};
29582-
exports.version = "19.2.0-native-fb-52612a7c-20250801";
29582+
exports.version = "19.2.0-native-fb-0860b9cc-20250801";
2958329583
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
2958429584
"function" ===
2958529585
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-prod.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<bc051e59507033ad5b3ec9fe9778c9b7>>
10+
* @generated SignedSource<<705aa9eb67bbf9ef17ea29a6545412d0>>
1111
*/
1212

1313
/*
@@ -17139,14 +17139,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
1713917139
};
1714017140
var isomorphicReactPackageVersion$jscomp$inline_2003 = React.version;
1714117141
if (
17142-
"19.2.0-native-fb-52612a7c-20250801" !==
17142+
"19.2.0-native-fb-0860b9cc-20250801" !==
1714317143
isomorphicReactPackageVersion$jscomp$inline_2003
1714417144
)
1714517145
throw Error(
1714617146
formatProdErrorMessage(
1714717147
527,
1714817148
isomorphicReactPackageVersion$jscomp$inline_2003,
17149-
"19.2.0-native-fb-52612a7c-20250801"
17149+
"19.2.0-native-fb-0860b9cc-20250801"
1715017150
)
1715117151
);
1715217152
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -17168,10 +17168,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
1716817168
};
1716917169
var internals$jscomp$inline_2524 = {
1717017170
bundleType: 0,
17171-
version: "19.2.0-native-fb-52612a7c-20250801",
17171+
version: "19.2.0-native-fb-0860b9cc-20250801",
1717217172
rendererPackageName: "react-dom",
1717317173
currentDispatcherRef: ReactSharedInternals,
17174-
reconcilerVersion: "19.2.0-native-fb-52612a7c-20250801"
17174+
reconcilerVersion: "19.2.0-native-fb-0860b9cc-20250801"
1717517175
};
1717617176
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
1717717177
var hook$jscomp$inline_2525 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -17422,4 +17422,4 @@ exports.useFormState = function (action, initialState, permalink) {
1742217422
exports.useFormStatus = function () {
1742317423
return ReactSharedInternals.H.useHostTransitionStatus();
1742417424
};
17425-
exports.version = "19.2.0-native-fb-52612a7c-20250801";
17425+
exports.version = "19.2.0-native-fb-0860b9cc-20250801";

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-profiling.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<a3dfc00ac4c1d74abc05cff3d3201d66>>
10+
* @generated SignedSource<<84791f473f6a48bd038e28998b343334>>
1111
*/
1212

1313
/*
@@ -19101,14 +19101,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
1910119101
};
1910219102
var isomorphicReactPackageVersion$jscomp$inline_2243 = React.version;
1910319103
if (
19104-
"19.2.0-native-fb-52612a7c-20250801" !==
19104+
"19.2.0-native-fb-0860b9cc-20250801" !==
1910519105
isomorphicReactPackageVersion$jscomp$inline_2243
1910619106
)
1910719107
throw Error(
1910819108
formatProdErrorMessage(
1910919109
527,
1911019110
isomorphicReactPackageVersion$jscomp$inline_2243,
19111-
"19.2.0-native-fb-52612a7c-20250801"
19111+
"19.2.0-native-fb-0860b9cc-20250801"
1911219112
)
1911319113
);
1911419114
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -19130,10 +19130,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
1913019130
};
1913119131
var internals$jscomp$inline_2250 = {
1913219132
bundleType: 0,
19133-
version: "19.2.0-native-fb-52612a7c-20250801",
19133+
version: "19.2.0-native-fb-0860b9cc-20250801",
1913419134
rendererPackageName: "react-dom",
1913519135
currentDispatcherRef: ReactSharedInternals,
19136-
reconcilerVersion: "19.2.0-native-fb-52612a7c-20250801",
19136+
reconcilerVersion: "19.2.0-native-fb-0860b9cc-20250801",
1913719137
getLaneLabelMap: function () {
1913819138
for (
1913919139
var map = new Map(), lane = 1, index$319 = 0;
@@ -19399,7 +19399,7 @@ exports.useFormState = function (action, initialState, permalink) {
1939919399
exports.useFormStatus = function () {
1940019400
return ReactSharedInternals.H.useHostTransitionStatus();
1940119401
};
19402-
exports.version = "19.2.0-native-fb-52612a7c-20250801";
19402+
exports.version = "19.2.0-native-fb-0860b9cc-20250801";
1940319403
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
1940419404
"function" ===
1940519405
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

0 commit comments

Comments
 (0)