From d9c978d11faaf59fcce3349d106b7853822ecded Mon Sep 17 00:00:00 2001 From: gnoff Date: Thu, 28 Mar 2024 15:06:35 +0000 Subject: [PATCH] [Fiber] Remove the digest property from errorInfo passed to onRecoverableError (#28222) Removes the digest property from errorInfo passed to onRecoverableError when handling an error propagated from the server. Previously we warned in Dev but still provided the digest on the errorInfo object. This change removes digest from error info but continues to warn if it is accessed. The reason for retaining the warning is the version with the warning was not released as stable but we will include this deprecated removal in our next major so we should communicate this change at runtime. DiffTrain build for commit https://github.com/facebook/react/commit/299a9c0598576f7dba170771b1c0b821281b1e15. --- .../cjs/ReactTestRenderer-dev.js | 46 +++++++++++-------- .../cjs/ReactTestRenderer-prod.js | 37 +++++++-------- .../cjs/ReactTestRenderer-profiling.js | 37 +++++++-------- .../Libraries/Renderer/REVISION | 2 +- .../implementations/ReactFabric-dev.fb.js | 46 +++++++++++-------- .../implementations/ReactFabric-prod.fb.js | 37 +++++++-------- .../ReactFabric-profiling.fb.js | 23 ++++------ .../ReactNativeRenderer-dev.fb.js | 46 +++++++++++-------- .../ReactNativeRenderer-prod.fb.js | 37 +++++++-------- .../ReactNativeRenderer-profiling.fb.js | 23 ++++------ 10 files changed, 167 insertions(+), 167 deletions(-) diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js index 8d03e50213746..57b3119d8ca74 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<398013076b718065eff718ae9cda9bc9>> + * @generated SignedSource<<9163dccf70951cc5d1bae88f3bef99d1>> */ "use strict"; @@ -24249,10 +24249,7 @@ if (__DEV__) { for (var i = 0; i < recoverableErrors.length; i++) { var recoverableError = recoverableErrors[i]; - var errorInfo = makeErrorInfo( - recoverableError.digest, - recoverableError.stack - ); + var errorInfo = makeErrorInfo(recoverableError.stack); onRecoverableError(recoverableError.value, errorInfo); } } // If the passive effects are the result of a discrete render, flush them @@ -24304,26 +24301,35 @@ if (__DEV__) { return null; } - function makeErrorInfo(digest, componentStack) { + function makeErrorInfo(componentStack) { { var errorInfo = { - componentStack: componentStack, - digest: digest + componentStack: componentStack }; - Object.defineProperty(errorInfo, "digest", { - configurable: false, - enumerable: true, - get: function () { - error( - 'You are accessing "digest" from the errorInfo object passed to onRecoverableError.' + - " This property is deprecated and will be removed in a future version of React." + - " To access the digest of an Error look for this property on the Error instance itself." - ); + return new Proxy(errorInfo, { + get: function (target, prop, receiver) { + if (prop === "digest") { + error( + 'You are accessing "digest" from the errorInfo object passed to onRecoverableError.' + + " This property is no longer provided as part of errorInfo but can be accessed as a property" + + " of the Error instance itself." + ); + } + + return Reflect.get(target, prop, receiver); + }, + has: function (target, prop) { + if (prop === "digest") { + error( + 'You are accessing "digest" from the errorInfo object passed to onRecoverableError.' + + " This property is no longer provided as part of errorInfo but can be accessed as a property" + + " of the Error instance itself." + ); + } - return digest; + return Reflect.has(target, prop); } }); - return errorInfo; } } @@ -26240,7 +26246,7 @@ if (__DEV__) { return root; } - var ReactVersion = "19.0.0-canary-32f0e114"; + var ReactVersion = "19.0.0-canary-9cf58c47"; // Might add PROFILE later. diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-prod.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-prod.js index e354f5e78a3d3..a7f4e691f954c 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-prod.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-prod.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<0ee47dc3b016f4afd98141a3877b7155>> + * @generated SignedSource<<7497ca87141c739d6dc547bd8e1e7548>> */ "use strict"; @@ -8282,10 +8282,7 @@ function commitRootImpl( finishedWork++ ) (remainingLanes = recoverableErrors[finishedWork]), - (transitions = { - digest: remainingLanes.digest, - componentStack: remainingLanes.stack - }), + (transitions = { componentStack: remainingLanes.stack }), renderPriorityLevel(remainingLanes.value, transitions); 0 !== (pendingPassiveEffectsLanes & 3) && 0 !== root.tag && @@ -9180,19 +9177,19 @@ function wrapFiber(fiber) { fiberToWrapper.set(fiber, wrapper)); return wrapper; } -var devToolsConfig$jscomp$inline_1010 = { +var devToolsConfig$jscomp$inline_1009 = { findFiberByHostInstance: function () { throw Error("TestRenderer does not support findFiberByHostInstance()"); }, bundleType: 0, - version: "19.0.0-canary-c99426f3", + version: "19.0.0-canary-98ee7ddb", rendererPackageName: "react-test-renderer" }; -var internals$jscomp$inline_1198 = { - bundleType: devToolsConfig$jscomp$inline_1010.bundleType, - version: devToolsConfig$jscomp$inline_1010.version, - rendererPackageName: devToolsConfig$jscomp$inline_1010.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1010.rendererConfig, +var internals$jscomp$inline_1197 = { + bundleType: devToolsConfig$jscomp$inline_1009.bundleType, + version: devToolsConfig$jscomp$inline_1009.version, + rendererPackageName: devToolsConfig$jscomp$inline_1009.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1009.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -9209,26 +9206,26 @@ var internals$jscomp$inline_1198 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1010.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1009.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-canary-c99426f3" + reconcilerVersion: "19.0.0-canary-98ee7ddb" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1199 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1198 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1199.isDisabled && - hook$jscomp$inline_1199.supportsFiber + !hook$jscomp$inline_1198.isDisabled && + hook$jscomp$inline_1198.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1199.inject( - internals$jscomp$inline_1198 + (rendererID = hook$jscomp$inline_1198.inject( + internals$jscomp$inline_1197 )), - (injectedHook = hook$jscomp$inline_1199); + (injectedHook = hook$jscomp$inline_1198); } catch (err) {} } exports._Scheduler = Scheduler; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-profiling.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-profiling.js index c43daa634cf83..4cd699be96d92 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-profiling.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-profiling.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<41c82c8e66afe030207944ff087399ac>> + * @generated SignedSource<> */ "use strict"; @@ -8648,10 +8648,7 @@ function commitRootImpl( finishedWork++ ) (remainingLanes = recoverableErrors[finishedWork]), - (transitions = { - digest: remainingLanes.digest, - componentStack: remainingLanes.stack - }), + (transitions = { componentStack: remainingLanes.stack }), renderPriorityLevel(remainingLanes.value, transitions); 0 !== (pendingPassiveEffectsLanes & 3) && 0 !== root.tag && @@ -9606,19 +9603,19 @@ function wrapFiber(fiber) { fiberToWrapper.set(fiber, wrapper)); return wrapper; } -var devToolsConfig$jscomp$inline_1053 = { +var devToolsConfig$jscomp$inline_1052 = { findFiberByHostInstance: function () { throw Error("TestRenderer does not support findFiberByHostInstance()"); }, bundleType: 0, - version: "19.0.0-canary-58a5689a", + version: "19.0.0-canary-cb1ca1a0", rendererPackageName: "react-test-renderer" }; -var internals$jscomp$inline_1239 = { - bundleType: devToolsConfig$jscomp$inline_1053.bundleType, - version: devToolsConfig$jscomp$inline_1053.version, - rendererPackageName: devToolsConfig$jscomp$inline_1053.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1053.rendererConfig, +var internals$jscomp$inline_1238 = { + bundleType: devToolsConfig$jscomp$inline_1052.bundleType, + version: devToolsConfig$jscomp$inline_1052.version, + rendererPackageName: devToolsConfig$jscomp$inline_1052.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1052.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -9635,26 +9632,26 @@ var internals$jscomp$inline_1239 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1053.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1052.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-canary-58a5689a" + reconcilerVersion: "19.0.0-canary-cb1ca1a0" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1240 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1239 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1240.isDisabled && - hook$jscomp$inline_1240.supportsFiber + !hook$jscomp$inline_1239.isDisabled && + hook$jscomp$inline_1239.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1240.inject( - internals$jscomp$inline_1239 + (rendererID = hook$jscomp$inline_1239.inject( + internals$jscomp$inline_1238 )), - (injectedHook = hook$jscomp$inline_1240); + (injectedHook = hook$jscomp$inline_1239); } catch (err) {} } exports._Scheduler = Scheduler; diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION index a3380f6cacc33..da90e5ede2653 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION @@ -1 +1 @@ -e10a7b5cd541882a78ff659147c1a0294413ccb0 +299a9c0598576f7dba170771b1c0b821281b1e15 diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js index ea31b73e4ef04..103a4bd62effd 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<9c81454fac04a284791d0ad56825d16e>> + * @generated SignedSource<> */ "use strict"; @@ -28415,10 +28415,7 @@ to return true:wantsResponderID| | for (var i = 0; i < recoverableErrors.length; i++) { var recoverableError = recoverableErrors[i]; - var errorInfo = makeErrorInfo( - recoverableError.digest, - recoverableError.stack - ); + var errorInfo = makeErrorInfo(recoverableError.stack); onRecoverableError(recoverableError.value, errorInfo); } } // If the passive effects are the result of a discrete render, flush them @@ -28475,26 +28472,35 @@ to return true:wantsResponderID| | return null; } - function makeErrorInfo(digest, componentStack) { + function makeErrorInfo(componentStack) { { var errorInfo = { - componentStack: componentStack, - digest: digest + componentStack: componentStack }; - Object.defineProperty(errorInfo, "digest", { - configurable: false, - enumerable: true, - get: function () { - error( - 'You are accessing "digest" from the errorInfo object passed to onRecoverableError.' + - " This property is deprecated and will be removed in a future version of React." + - " To access the digest of an Error look for this property on the Error instance itself." - ); + return new Proxy(errorInfo, { + get: function (target, prop, receiver) { + if (prop === "digest") { + error( + 'You are accessing "digest" from the errorInfo object passed to onRecoverableError.' + + " This property is no longer provided as part of errorInfo but can be accessed as a property" + + " of the Error instance itself." + ); + } + + return Reflect.get(target, prop, receiver); + }, + has: function (target, prop) { + if (prop === "digest") { + error( + 'You are accessing "digest" from the errorInfo object passed to onRecoverableError.' + + " This property is no longer provided as part of errorInfo but can be accessed as a property" + + " of the Error instance itself." + ); + } - return digest; + return Reflect.has(target, prop); } }); - return errorInfo; } } @@ -30571,7 +30577,7 @@ to return true:wantsResponderID| | return root; } - var ReactVersion = "19.0.0-canary-1f40d31c"; + var ReactVersion = "19.0.0-canary-9d775306"; function createPortal$1( children, diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js index d0a353ed7a5cf..38a064bc29dbf 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<<6ccdfaf53a7b293241845c6ad535ef74>> */ "use strict"; @@ -9865,10 +9865,7 @@ function commitRootImpl( finishedWork++ ) (remainingLanes = recoverableErrors[finishedWork]), - (transitions = { - digest: remainingLanes.digest, - componentStack: remainingLanes.stack - }), + (transitions = { componentStack: remainingLanes.stack }), renderPriorityLevel(remainingLanes.value, transitions); 0 !== (pendingPassiveEffectsLanes & 3) && 0 !== root.tag && @@ -10635,10 +10632,10 @@ batchedUpdatesImpl = function (fn, a) { } }; var roots = new Map(), - devToolsConfig$jscomp$inline_1105 = { + devToolsConfig$jscomp$inline_1104 = { findFiberByHostInstance: getInstanceFromNode, bundleType: 0, - version: "19.0.0-canary-369e456c", + version: "19.0.0-canary-607d62a8", rendererPackageName: "react-native-renderer", rendererConfig: { getInspectorDataForInstance: getInspectorDataForInstance, @@ -10654,11 +10651,11 @@ var roots = new Map(), }.bind(null, findNodeHandle) } }; -var internals$jscomp$inline_1342 = { - bundleType: devToolsConfig$jscomp$inline_1105.bundleType, - version: devToolsConfig$jscomp$inline_1105.version, - rendererPackageName: devToolsConfig$jscomp$inline_1105.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1105.rendererConfig, +var internals$jscomp$inline_1341 = { + bundleType: devToolsConfig$jscomp$inline_1104.bundleType, + version: devToolsConfig$jscomp$inline_1104.version, + rendererPackageName: devToolsConfig$jscomp$inline_1104.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1104.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -10674,26 +10671,26 @@ var internals$jscomp$inline_1342 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1105.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1104.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-canary-369e456c" + reconcilerVersion: "19.0.0-canary-607d62a8" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1343 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1342 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1343.isDisabled && - hook$jscomp$inline_1343.supportsFiber + !hook$jscomp$inline_1342.isDisabled && + hook$jscomp$inline_1342.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1343.inject( - internals$jscomp$inline_1342 + (rendererID = hook$jscomp$inline_1342.inject( + internals$jscomp$inline_1341 )), - (injectedHook = hook$jscomp$inline_1343); + (injectedHook = hook$jscomp$inline_1342); } catch (err) {} } exports.createPortal = function (children, containerTag) { diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js index c12b2c2f70f1a..80c70c13a78c4 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<1559aa190bc5f176834018f226327de0>> + * @generated SignedSource<<0039290ff29d4844481c69218123f3ea>> */ "use strict"; @@ -10486,10 +10486,7 @@ function commitRootImpl( finishedWork++ ) (remainingLanes = recoverableErrors[finishedWork]), - (transitions = { - digest: remainingLanes.digest, - componentStack: remainingLanes.stack - }), + (transitions = { componentStack: remainingLanes.stack }), renderPriorityLevel(remainingLanes.value, transitions); 0 !== (pendingPassiveEffectsLanes & 3) && 0 !== root.tag && @@ -11342,10 +11339,10 @@ batchedUpdatesImpl = function (fn, a) { } }; var roots = new Map(), - devToolsConfig$jscomp$inline_1187 = { + devToolsConfig$jscomp$inline_1186 = { findFiberByHostInstance: getInstanceFromNode, bundleType: 0, - version: "19.0.0-canary-042f4f16", + version: "19.0.0-canary-825ecfa5", rendererPackageName: "react-native-renderer", rendererConfig: { getInspectorDataForInstance: getInspectorDataForInstance, @@ -11375,10 +11372,10 @@ var roots = new Map(), } catch (err) {} return hook.checkDCE ? !0 : !1; })({ - bundleType: devToolsConfig$jscomp$inline_1187.bundleType, - version: devToolsConfig$jscomp$inline_1187.version, - rendererPackageName: devToolsConfig$jscomp$inline_1187.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1187.rendererConfig, + bundleType: devToolsConfig$jscomp$inline_1186.bundleType, + version: devToolsConfig$jscomp$inline_1186.version, + rendererPackageName: devToolsConfig$jscomp$inline_1186.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1186.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -11394,14 +11391,14 @@ var roots = new Map(), return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1187.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1186.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-canary-042f4f16" + reconcilerVersion: "19.0.0-canary-825ecfa5" }); exports.createPortal = function (children, containerTag) { return createPortal$1( diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js index 45fe9e69ab08a..f56834c4a8c0a 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<> */ "use strict"; @@ -28855,10 +28855,7 @@ to return true:wantsResponderID| | for (var i = 0; i < recoverableErrors.length; i++) { var recoverableError = recoverableErrors[i]; - var errorInfo = makeErrorInfo( - recoverableError.digest, - recoverableError.stack - ); + var errorInfo = makeErrorInfo(recoverableError.stack); onRecoverableError(recoverableError.value, errorInfo); } } // If the passive effects are the result of a discrete render, flush them @@ -28915,26 +28912,35 @@ to return true:wantsResponderID| | return null; } - function makeErrorInfo(digest, componentStack) { + function makeErrorInfo(componentStack) { { var errorInfo = { - componentStack: componentStack, - digest: digest + componentStack: componentStack }; - Object.defineProperty(errorInfo, "digest", { - configurable: false, - enumerable: true, - get: function () { - error( - 'You are accessing "digest" from the errorInfo object passed to onRecoverableError.' + - " This property is deprecated and will be removed in a future version of React." + - " To access the digest of an Error look for this property on the Error instance itself." - ); + return new Proxy(errorInfo, { + get: function (target, prop, receiver) { + if (prop === "digest") { + error( + 'You are accessing "digest" from the errorInfo object passed to onRecoverableError.' + + " This property is no longer provided as part of errorInfo but can be accessed as a property" + + " of the Error instance itself." + ); + } + + return Reflect.get(target, prop, receiver); + }, + has: function (target, prop) { + if (prop === "digest") { + error( + 'You are accessing "digest" from the errorInfo object passed to onRecoverableError.' + + " This property is no longer provided as part of errorInfo but can be accessed as a property" + + " of the Error instance itself." + ); + } - return digest; + return Reflect.has(target, prop); } }); - return errorInfo; } } @@ -31011,7 +31017,7 @@ to return true:wantsResponderID| | return root; } - var ReactVersion = "19.0.0-canary-91643e90"; + var ReactVersion = "19.0.0-canary-4d462ef5"; function createPortal$1( children, diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js index 61fa08aef6d01..72090dec09ba0 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<96c8efbd3025d48af64a0646f425c765>> + * @generated SignedSource<> */ "use strict"; @@ -10074,10 +10074,7 @@ function commitRootImpl( finishedWork++ ) (remainingLanes = recoverableErrors[finishedWork]), - (transitions = { - digest: remainingLanes.digest, - componentStack: remainingLanes.stack - }), + (transitions = { componentStack: remainingLanes.stack }), renderPriorityLevel(remainingLanes.value, transitions); 0 !== (pendingPassiveEffectsLanes & 3) && 0 !== root.tag && @@ -10851,10 +10848,10 @@ batchedUpdatesImpl = function (fn, a) { } }; var roots = new Map(), - devToolsConfig$jscomp$inline_1172 = { + devToolsConfig$jscomp$inline_1171 = { findFiberByHostInstance: getInstanceFromTag, bundleType: 0, - version: "19.0.0-canary-f4c7a68d", + version: "19.0.0-canary-94f6094a", rendererPackageName: "react-native-renderer", rendererConfig: { getInspectorDataForInstance: getInspectorDataForInstance, @@ -10870,11 +10867,11 @@ var roots = new Map(), }.bind(null, findNodeHandle) } }; -var internals$jscomp$inline_1423 = { - bundleType: devToolsConfig$jscomp$inline_1172.bundleType, - version: devToolsConfig$jscomp$inline_1172.version, - rendererPackageName: devToolsConfig$jscomp$inline_1172.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1172.rendererConfig, +var internals$jscomp$inline_1422 = { + bundleType: devToolsConfig$jscomp$inline_1171.bundleType, + version: devToolsConfig$jscomp$inline_1171.version, + rendererPackageName: devToolsConfig$jscomp$inline_1171.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1171.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -10890,26 +10887,26 @@ var internals$jscomp$inline_1423 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1172.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1171.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-canary-f4c7a68d" + reconcilerVersion: "19.0.0-canary-94f6094a" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1424 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1423 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1424.isDisabled && - hook$jscomp$inline_1424.supportsFiber + !hook$jscomp$inline_1423.isDisabled && + hook$jscomp$inline_1423.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1424.inject( - internals$jscomp$inline_1423 + (rendererID = hook$jscomp$inline_1423.inject( + internals$jscomp$inline_1422 )), - (injectedHook = hook$jscomp$inline_1424); + (injectedHook = hook$jscomp$inline_1423); } catch (err) {} } exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = { diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js index c0db2c5aa3d38..8d98b90708ded 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<747a3fcb345e723e898836c3648fe48a>> + * @generated SignedSource<> */ "use strict"; @@ -10696,10 +10696,7 @@ function commitRootImpl( finishedWork++ ) (remainingLanes = recoverableErrors[finishedWork]), - (transitions = { - digest: remainingLanes.digest, - componentStack: remainingLanes.stack - }), + (transitions = { componentStack: remainingLanes.stack }), renderPriorityLevel(remainingLanes.value, transitions); 0 !== (pendingPassiveEffectsLanes & 3) && 0 !== root.tag && @@ -11559,10 +11556,10 @@ batchedUpdatesImpl = function (fn, a) { } }; var roots = new Map(), - devToolsConfig$jscomp$inline_1254 = { + devToolsConfig$jscomp$inline_1253 = { findFiberByHostInstance: getInstanceFromTag, bundleType: 0, - version: "19.0.0-canary-7a0cbc16", + version: "19.0.0-canary-bc3b2603", rendererPackageName: "react-native-renderer", rendererConfig: { getInspectorDataForInstance: getInspectorDataForInstance, @@ -11592,10 +11589,10 @@ var roots = new Map(), } catch (err) {} return hook.checkDCE ? !0 : !1; })({ - bundleType: devToolsConfig$jscomp$inline_1254.bundleType, - version: devToolsConfig$jscomp$inline_1254.version, - rendererPackageName: devToolsConfig$jscomp$inline_1254.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1254.rendererConfig, + bundleType: devToolsConfig$jscomp$inline_1253.bundleType, + version: devToolsConfig$jscomp$inline_1253.version, + rendererPackageName: devToolsConfig$jscomp$inline_1253.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1253.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -11611,14 +11608,14 @@ var roots = new Map(), return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1254.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1253.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-canary-7a0cbc16" + reconcilerVersion: "19.0.0-canary-bc3b2603" }); exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = { computeComponentStackForErrorReporting: function (reactTag) {