feat(compiler): Support MetaProperty (#29752)

## Summary
See #29737

## How did you test this change?
As the feature requires module support and the test runner does
currently not support running tests as modules, I could only test it via
playground.

DiffTrain build for commit https://github.com/facebook/react/commit/f5af92d2c47d1e1f455faf912b1d3221d1038c37.
This commit is contained in:
josephsavona
2024-06-08 23:23:31 +00:00
parent 53e0ed175e
commit ebca74354e
14 changed files with 41 additions and 41 deletions
+1 -1
View File
@@ -1 +1 @@
19.0.0-native-fb-c2ae9e28bc-20240608
19.0.0-native-fb-f5af92d2c4-20240608
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<062ecb2c32eb0210cd5d50c0da526b90>>
* @generated SignedSource<<5f8407fc910961f3fb6eb789a1087832>>
*/
"use strict";
@@ -15049,14 +15049,14 @@ __DEV__ &&
scheduleRoot: scheduleRoot,
setRefreshHandler: setRefreshHandler,
getCurrentFiber: getCurrentFiberForDevTools,
reconcilerVersion: "19.0.0-native-fb-c2ae9e28bc-20240608"
reconcilerVersion: "19.0.0-native-fb-f5af92d2c4-20240608"
});
})({
findFiberByHostInstance: function () {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 1,
version: "19.0.0-native-fb-c2ae9e28bc-20240608",
version: "19.0.0-native-fb-f5af92d2c4-20240608",
rendererPackageName: "react-test-renderer"
});
exports._Scheduler = Scheduler;
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<94e566d67888420f42ff0bda89d3730d>>
* @generated SignedSource<<6836e694ae7f0c05d6e75fb162c4d00b>>
*/
"use strict";
@@ -9336,7 +9336,7 @@ var devToolsConfig$jscomp$inline_1048 = {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 0,
version: "19.0.0-native-fb-c2ae9e28bc-20240608",
version: "19.0.0-native-fb-f5af92d2c4-20240608",
rendererPackageName: "react-test-renderer"
};
var internals$jscomp$inline_1235 = {
@@ -9367,7 +9367,7 @@ var internals$jscomp$inline_1235 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-native-fb-c2ae9e28bc-20240608"
reconcilerVersion: "19.0.0-native-fb-f5af92d2c4-20240608"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1236 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<678dfa2f47293463eb753874b2d99f29>>
* @generated SignedSource<<a6fac6100064a804b770a189ba669194>>
*/
"use strict";
@@ -9958,7 +9958,7 @@ var devToolsConfig$jscomp$inline_1131 = {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 0,
version: "19.0.0-native-fb-c2ae9e28bc-20240608",
version: "19.0.0-native-fb-f5af92d2c4-20240608",
rendererPackageName: "react-test-renderer"
};
(function (internals) {
@@ -10002,7 +10002,7 @@ var devToolsConfig$jscomp$inline_1131 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-native-fb-c2ae9e28bc-20240608"
reconcilerVersion: "19.0.0-native-fb-f5af92d2c4-20240608"
});
exports._Scheduler = Scheduler;
exports.act = act;
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<81a7b5bd40cb7dde1dc856611fc8f446>>
* @generated SignedSource<<680429dbb158d9cbf1920b6fcd52770f>>
*/
"use strict";
@@ -1748,7 +1748,7 @@ __DEV__ &&
exports.useTransition = function () {
return resolveDispatcher().useTransition();
};
exports.version = "19.0.0-native-fb-c2ae9e28bc-20240608";
exports.version = "19.0.0-native-fb-f5af92d2c4-20240608";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<687486be88a2288bf837e968da348411>>
* @generated SignedSource<<6e86d58691f89ac82624656aecfc58cf>>
*/
"use strict";
@@ -604,4 +604,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-native-fb-c2ae9e28bc-20240608";
exports.version = "19.0.0-native-fb-f5af92d2c4-20240608";
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<c319fe457f80a05776ed11a1b5d8a03d>>
* @generated SignedSource<<96f43cc950056f99201efa9d8b125a81>>
*/
"use strict";
@@ -608,7 +608,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-native-fb-c2ae9e28bc-20240608";
exports.version = "19.0.0-native-fb-f5af92d2c4-20240608";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
@@ -1 +1 @@
c2ae9e28bc02fdd29c46b247d908e6b467ef06af
f5af92d2c47d1e1f455faf912b1d3221d1038c37
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<d235d6549172f367a3fb76ca0a03b813>>
* @generated SignedSource<<3cffb4ea2e913b768b193946d754f161>>
*/
"use strict";
@@ -16681,12 +16681,12 @@ __DEV__ &&
scheduleRoot: scheduleRoot,
setRefreshHandler: setRefreshHandler,
getCurrentFiber: getCurrentFiberForDevTools,
reconcilerVersion: "19.0.0-native-fb-c2ae9e28bc-20240608"
reconcilerVersion: "19.0.0-native-fb-f5af92d2c4-20240608"
});
})({
findFiberByHostInstance: getInstanceFromNode,
bundleType: 1,
version: "19.0.0-native-fb-c2ae9e28bc-20240608",
version: "19.0.0-native-fb-f5af92d2c4-20240608",
rendererPackageName: "react-native-renderer",
rendererConfig: {
getInspectorDataForInstance: getInspectorDataForInstance,
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<ea6890c87efa5d14885328ddaee860c2>>
* @generated SignedSource<<25c4846a24487e51e79bf5147e4911fc>>
*/
"use strict";
@@ -10591,7 +10591,7 @@ var roots = new Map(),
devToolsConfig$jscomp$inline_1125 = {
findFiberByHostInstance: getInstanceFromNode,
bundleType: 0,
version: "19.0.0-native-fb-c2ae9e28bc-20240608",
version: "19.0.0-native-fb-f5af92d2c4-20240608",
rendererPackageName: "react-native-renderer",
rendererConfig: {
getInspectorDataForInstance: getInspectorDataForInstance,
@@ -10634,7 +10634,7 @@ var internals$jscomp$inline_1351 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-native-fb-c2ae9e28bc-20240608"
reconcilerVersion: "19.0.0-native-fb-f5af92d2c4-20240608"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1352 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<7fd5ac66b459be2afab17b96cc3b9c3f>>
* @generated SignedSource<<e1e5910208ed7444a573ea1eeb08ff1e>>
*/
"use strict";
@@ -11297,7 +11297,7 @@ var roots = new Map(),
devToolsConfig$jscomp$inline_1206 = {
findFiberByHostInstance: getInstanceFromNode,
bundleType: 0,
version: "19.0.0-native-fb-c2ae9e28bc-20240608",
version: "19.0.0-native-fb-f5af92d2c4-20240608",
rendererPackageName: "react-native-renderer",
rendererConfig: {
getInspectorDataForInstance: getInspectorDataForInstance,
@@ -11353,7 +11353,7 @@ var roots = new Map(),
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-native-fb-c2ae9e28bc-20240608"
reconcilerVersion: "19.0.0-native-fb-f5af92d2c4-20240608"
});
exports.createPortal = function (children, containerTag) {
return createPortal$1(
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<08d3af4717c24483545f7f3078338412>>
* @generated SignedSource<<378e40895bfbadb771a427eea9d33fd9>>
*/
"use strict";
@@ -16870,11 +16870,11 @@ __DEV__ &&
var emptyObject = {};
Object.freeze(emptyObject);
var isomorphicReactPackageVersion = React.version;
if ("19.0.0-native-fb-c2ae9e28bc-20240608" !== isomorphicReactPackageVersion)
if ("19.0.0-native-fb-f5af92d2c4-20240608" !== 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.0.0-native-fb-c2ae9e28bc-20240608\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-native-renderer: 19.0.0-native-fb-f5af92d2c4-20240608\nLearn more: https://react.dev/warnings/version-mismatch")
);
if (
"function" !==
@@ -16922,12 +16922,12 @@ __DEV__ &&
scheduleRoot: scheduleRoot,
setRefreshHandler: setRefreshHandler,
getCurrentFiber: getCurrentFiberForDevTools,
reconcilerVersion: "19.0.0-native-fb-c2ae9e28bc-20240608"
reconcilerVersion: "19.0.0-native-fb-f5af92d2c4-20240608"
});
})({
findFiberByHostInstance: getInstanceFromTag,
bundleType: 1,
version: "19.0.0-native-fb-c2ae9e28bc-20240608",
version: "19.0.0-native-fb-f5af92d2c4-20240608",
rendererPackageName: "react-native-renderer",
rendererConfig: {
getInspectorDataForInstance: getInspectorDataForInstance,
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<6ff26ef1a8a3cfba4eb6fc6d57c15efa>>
* @generated SignedSource<<09a7af1b38d83ddef8635100123910c8>>
*/
"use strict";
@@ -10734,11 +10734,11 @@ function traverseOwnerTreeUp(hierarchy, instance) {
traverseOwnerTreeUp(hierarchy, instance);
}
var isomorphicReactPackageVersion = React.version;
if ("19.0.0-native-fb-c2ae9e28bc-20240608" !== isomorphicReactPackageVersion)
if ("19.0.0-native-fb-f5af92d2c4-20240608" !== 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.0.0-native-fb-c2ae9e28bc-20240608\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-native-renderer: 19.0.0-native-fb-f5af92d2c4-20240608\nLearn more: https://react.dev/warnings/version-mismatch")
);
if (
"function" !==
@@ -10788,7 +10788,7 @@ var roots = new Map(),
devToolsConfig$jscomp$inline_1193 = {
findFiberByHostInstance: getInstanceFromTag,
bundleType: 0,
version: "19.0.0-native-fb-c2ae9e28bc-20240608",
version: "19.0.0-native-fb-f5af92d2c4-20240608",
rendererPackageName: "react-native-renderer",
rendererConfig: {
getInspectorDataForInstance: getInspectorDataForInstance,
@@ -10831,7 +10831,7 @@ var internals$jscomp$inline_1440 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-native-fb-c2ae9e28bc-20240608"
reconcilerVersion: "19.0.0-native-fb-f5af92d2c4-20240608"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1441 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<1710d1e9b64d9f929fc8950c733c6777>>
* @generated SignedSource<<b976511042e32a092a9f4f52b03b1587>>
*/
"use strict";
@@ -11441,11 +11441,11 @@ function traverseOwnerTreeUp(hierarchy, instance) {
traverseOwnerTreeUp(hierarchy, instance);
}
var isomorphicReactPackageVersion = React.version;
if ("19.0.0-native-fb-c2ae9e28bc-20240608" !== isomorphicReactPackageVersion)
if ("19.0.0-native-fb-f5af92d2c4-20240608" !== 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.0.0-native-fb-c2ae9e28bc-20240608\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-native-renderer: 19.0.0-native-fb-f5af92d2c4-20240608\nLearn more: https://react.dev/warnings/version-mismatch")
);
if (
"function" !==
@@ -11495,7 +11495,7 @@ var roots = new Map(),
devToolsConfig$jscomp$inline_1274 = {
findFiberByHostInstance: getInstanceFromTag,
bundleType: 0,
version: "19.0.0-native-fb-c2ae9e28bc-20240608",
version: "19.0.0-native-fb-f5af92d2c4-20240608",
rendererPackageName: "react-native-renderer",
rendererConfig: {
getInspectorDataForInstance: getInspectorDataForInstance,
@@ -11551,7 +11551,7 @@ var roots = new Map(),
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-native-fb-c2ae9e28bc-20240608"
reconcilerVersion: "19.0.0-native-fb-f5af92d2c4-20240608"
});
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = {
computeComponentStackForErrorReporting: function (reactTag) {