diff --git a/.github/.react-version b/.github/.react-version index 6fbe3e9d0ac9a..4c946f78dd695 100644 --- a/.github/.react-version +++ b/.github/.react-version @@ -1 +1 @@ -19.0.0-rc-1eaccd82-20240816 \ No newline at end of file +19.0.0-rc-eb3ad065-20240822 \ No newline at end of file diff --git a/examples/reproduction-template/package.json b/examples/reproduction-template/package.json index cda84906633ca..520483482558f 100644 --- a/examples/reproduction-template/package.json +++ b/examples/reproduction-template/package.json @@ -7,8 +7,8 @@ }, "dependencies": { "next": "canary", - "react": "19.0.0-rc-1eaccd82-20240816", - "react-dom": "19.0.0-rc-1eaccd82-20240816" + "react": "19.0.0-rc-eb3ad065-20240822", + "react-dom": "19.0.0-rc-eb3ad065-20240822" }, "devDependencies": { "@types/node": "20.12.12", diff --git a/package.json b/package.json index 937d1c9d72749..127e8076071b9 100644 --- a/package.json +++ b/package.json @@ -206,19 +206,19 @@ "pretty-bytes": "5.3.0", "pretty-ms": "7.0.0", "random-seed": "0.3.0", - "react": "19.0.0-rc-1eaccd82-20240816", + "react": "19.0.0-rc-eb3ad065-20240822", "react-17": "npm:react@17.0.2", - "react-builtin": "npm:react@19.0.0-rc-1eaccd82-20240816", - "react-dom": "19.0.0-rc-1eaccd82-20240816", + "react-builtin": "npm:react@19.0.0-rc-eb3ad065-20240822", + "react-dom": "19.0.0-rc-eb3ad065-20240822", "react-dom-17": "npm:react-dom@17.0.2", - "react-dom-builtin": "npm:react-dom@19.0.0-rc-1eaccd82-20240816", - "react-dom-experimental-builtin": "npm:react-dom@0.0.0-experimental-1eaccd82-20240816", - "react-experimental-builtin": "npm:react@0.0.0-experimental-1eaccd82-20240816", - "react-is-builtin": "npm:react-is@19.0.0-rc-1eaccd82-20240816", - "react-server-dom-turbopack": "19.0.0-rc-1eaccd82-20240816", - "react-server-dom-turbopack-experimental": "npm:react-server-dom-turbopack@0.0.0-experimental-1eaccd82-20240816", - "react-server-dom-webpack": "19.0.0-rc-1eaccd82-20240816", - "react-server-dom-webpack-experimental": "npm:react-server-dom-webpack@0.0.0-experimental-1eaccd82-20240816", + "react-dom-builtin": "npm:react-dom@19.0.0-rc-eb3ad065-20240822", + "react-dom-experimental-builtin": "npm:react-dom@0.0.0-experimental-eb3ad065-20240822", + "react-experimental-builtin": "npm:react@0.0.0-experimental-eb3ad065-20240822", + "react-is-builtin": "npm:react-is@19.0.0-rc-eb3ad065-20240822", + "react-server-dom-turbopack": "19.0.0-rc-eb3ad065-20240822", + "react-server-dom-turbopack-experimental": "npm:react-server-dom-turbopack@0.0.0-experimental-eb3ad065-20240822", + "react-server-dom-webpack": "19.0.0-rc-eb3ad065-20240822", + "react-server-dom-webpack-experimental": "npm:react-server-dom-webpack@0.0.0-experimental-eb3ad065-20240822", "react-ssr-prepass": "1.0.8", "react-virtualized": "9.22.3", "relay-compiler": "13.0.2", @@ -228,8 +228,8 @@ "resolve-from": "5.0.0", "sass": "1.54.0", "satori": "0.10.9", - "scheduler-builtin": "npm:scheduler@0.25.0-rc-1eaccd82-20240816", - "scheduler-experimental-builtin": "npm:scheduler@0.0.0-experimental-1eaccd82-20240816", + "scheduler-builtin": "npm:scheduler@0.25.0-rc-eb3ad065-20240822", + "scheduler-experimental-builtin": "npm:scheduler@0.0.0-experimental-eb3ad065-20240822", "seedrandom": "3.0.5", "semver": "7.3.7", "shell-quote": "1.7.3", @@ -269,10 +269,10 @@ "@babel/traverse": "7.22.5", "@types/react": "npm:types-react@19.0.0-rc.0", "@types/react-dom": "npm:types-react-dom@19.0.0-rc.0", - "react": "19.0.0-rc-1eaccd82-20240816", - "react-dom": "19.0.0-rc-1eaccd82-20240816", - "react-is": "19.0.0-rc-1eaccd82-20240816", - "scheduler": "0.25.0-rc-1eaccd82-20240816" + "react": "19.0.0-rc-eb3ad065-20240822", + "react-dom": "19.0.0-rc-eb3ad065-20240822", + "react-is": "19.0.0-rc-eb3ad065-20240822", + "scheduler": "0.25.0-rc-eb3ad065-20240822" }, "patchedDependencies": { "webpack-sources@3.2.3": "patches/webpack-sources@3.2.3.patch" diff --git a/packages/create-next-app/templates/index.ts b/packages/create-next-app/templates/index.ts index 109698c01c26c..460cb26637afc 100644 --- a/packages/create-next-app/templates/index.ts +++ b/packages/create-next-app/templates/index.ts @@ -13,7 +13,7 @@ import { GetTemplateFileArgs, InstallTemplateArgs } from "./types"; // Do not rename or format. sync-react script relies on this line. // prettier-ignore -const nextjsReactPeerVersion = "19.0.0-rc-1eaccd82-20240816"; +const nextjsReactPeerVersion = "19.0.0-rc-eb3ad065-20240822"; /** * Get the file path for a given file in a template, e.g. "next.config.js". diff --git a/packages/next/package.json b/packages/next/package.json index 6b316e76d9bcf..a0ccdae32c66e 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -108,8 +108,8 @@ "@opentelemetry/api": "^1.1.0", "@playwright/test": "^1.41.2", "babel-plugin-react-compiler": "*", - "react": "19.0.0-rc-1eaccd82-20240816", - "react-dom": "19.0.0-rc-1eaccd82-20240816", + "react": "19.0.0-rc-eb3ad065-20240822", + "react-dom": "19.0.0-rc-eb3ad065-20240822", "sass": "^1.3.0" }, "peerDependenciesMeta": { diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.development.js index dd839ad378d84..5c0da199afab2 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.development.js @@ -24604,11 +24604,11 @@ }; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-experimental-1eaccd82-20240816" !== isomorphicReactPackageVersion) + if ("19.0.0-experimental-eb3ad065-20240822" !== 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.0.0-experimental-1eaccd82-20240816\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-experimental-eb3ad065-20240822\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -24645,11 +24645,11 @@ !(function () { var internals = { bundleType: 1, - version: "19.0.0-experimental-1eaccd82-20240816", + version: "19.0.0-experimental-eb3ad065-20240822", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-experimental-1eaccd82-20240816" + reconcilerVersion: "19.0.0-experimental-eb3ad065-20240822" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -24793,7 +24793,7 @@ listenToAllSupportedEvents(container); return new ReactDOMHydrationRoot(initialChildren); }; - exports.version = "19.0.0-experimental-1eaccd82-20240816"; + exports.version = "19.0.0-experimental-eb3ad065-20240822"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.production.js index 5f6d432ff1011..a497c2a383b5d 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.production.js @@ -14993,14 +14993,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) { }; var isomorphicReactPackageVersion$jscomp$inline_1640 = React.version; if ( - "19.0.0-experimental-1eaccd82-20240816" !== + "19.0.0-experimental-eb3ad065-20240822" !== isomorphicReactPackageVersion$jscomp$inline_1640 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_1640, - "19.0.0-experimental-1eaccd82-20240816" + "19.0.0-experimental-eb3ad065-20240822" ) ); ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { @@ -15022,11 +15022,11 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { }; var internals$jscomp$inline_2039 = { bundleType: 0, - version: "19.0.0-experimental-1eaccd82-20240816", + version: "19.0.0-experimental-eb3ad065-20240822", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-experimental-1eaccd82-20240816" + reconcilerVersion: "19.0.0-experimental-eb3ad065-20240822" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_2040 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -15130,4 +15130,4 @@ exports.hydrateRoot = function (container, initialChildren, options) { listenToAllSupportedEvents(container); return new ReactDOMHydrationRoot(initialChildren); }; -exports.version = "19.0.0-experimental-1eaccd82-20240816"; +exports.version = "19.0.0-experimental-eb3ad065-20240822"; diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-profiling.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-profiling.development.js index e1c18ab895b6a..4b4f4fa19d58d 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-profiling.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-profiling.development.js @@ -24661,11 +24661,11 @@ }; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-experimental-1eaccd82-20240816" !== isomorphicReactPackageVersion) + if ("19.0.0-experimental-eb3ad065-20240822" !== 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.0.0-experimental-1eaccd82-20240816\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-experimental-eb3ad065-20240822\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -24702,11 +24702,11 @@ !(function () { var internals = { bundleType: 1, - version: "19.0.0-experimental-1eaccd82-20240816", + version: "19.0.0-experimental-eb3ad065-20240822", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-experimental-1eaccd82-20240816" + reconcilerVersion: "19.0.0-experimental-eb3ad065-20240822" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -25180,7 +25180,7 @@ exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.0.0-experimental-1eaccd82-20240816"; + exports.version = "19.0.0-experimental-eb3ad065-20240822"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-profiling.profiling.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-profiling.profiling.js index 7de45db3eeb50..76cc66bc54ca7 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-profiling.profiling.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-profiling.profiling.js @@ -15696,14 +15696,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) { }; var isomorphicReactPackageVersion$jscomp$inline_1729 = React.version; if ( - "19.0.0-experimental-1eaccd82-20240816" !== + "19.0.0-experimental-eb3ad065-20240822" !== isomorphicReactPackageVersion$jscomp$inline_1729 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_1729, - "19.0.0-experimental-1eaccd82-20240816" + "19.0.0-experimental-eb3ad065-20240822" ) ); ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { @@ -15725,11 +15725,11 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { }; var internals$jscomp$inline_1736 = { bundleType: 0, - version: "19.0.0-experimental-1eaccd82-20240816", + version: "19.0.0-experimental-eb3ad065-20240822", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-experimental-1eaccd82-20240816", + reconcilerVersion: "19.0.0-experimental-eb3ad065-20240822", getLaneLabelMap: function () { for ( var map = new Map(), lane = 1, index$291 = 0; @@ -16009,7 +16009,7 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-experimental-1eaccd82-20240816"; +exports.version = "19.0.0-experimental-eb3ad065-20240822"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.development.js index e0d68ef275385..97c197c647dfb 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.development.js @@ -5131,7 +5131,7 @@ } else internalInstance.queue = null; } var nextChildren = callRenderInDEV(instance); - if (1 === request.status) throw AbortSigil; + if (1 === request.status) throw null; instance.props !== resolvedProps && (didWarnAboutReassigningProps || console.error( @@ -5163,7 +5163,7 @@ props, void 0 ); - if (1 === request.status) throw AbortSigil; + if (1 === request.status) throw null; var hasId = 0 !== localIdCounter, actionStateCount = actionStateCounter, actionStateMatchingIndex$jscomp$0 = actionStateMatchingIndex; @@ -5387,8 +5387,7 @@ (boundarySegment.status = COMPLETED); } catch (thrownValue) { throw ( - ((boundarySegment.status = - thrownValue === AbortSigil ? 3 : 4), + ((boundarySegment.status = 1 === request.status ? 3 : 4), thrownValue) ); } finally { @@ -5440,7 +5439,7 @@ } } catch (thrownValue$2) { newBoundary.status = CLIENT_RENDERED; - if (thrownValue$2 === AbortSigil) { + if (1 === request.status) { contentRootSegment.status = 3; var error = request.fatalError; } else @@ -5601,7 +5600,7 @@ return; case REACT_LAZY_TYPE: var Component = callLazyInitInDEV(type); - if (1 === request.status) throw AbortSigil; + if (1 === request.status) throw null; renderElement(request, task, keyPath, Component, props, ref); return; } @@ -5892,7 +5891,7 @@ ); case REACT_LAZY_TYPE: node = callLazyInitInDEV(node); - if (1 === request.status) throw AbortSigil; + if (1 === request.status) throw null; renderNodeDestructive(request, task, node, childIndex); return; } @@ -6580,8 +6579,13 @@ )), logRecoverableError(request, task, boundary, null), fatalError(request, task, boundary, null))) - : (logRecoverableError(request, error, boundary, null), - fatalError(request, error, boundary, null)); + : null !== request.trackedPostpones && null !== segment + ? ((replay = request.trackedPostpones), + logRecoverableError(request, error, boundary, null), + trackPostpone(request, replay, task, segment), + finishedTask(request, null, segment)) + : (logRecoverableError(request, error, boundary, null), + fatalError(request, error, boundary, null)); return; } replay.pendingTasks--; @@ -6606,25 +6610,54 @@ request.pendingRootTasks--; 0 === request.pendingRootTasks && completeShell(request); } - } else - boundary.pendingTasks--, - boundary.status !== CLIENT_RENDERED && - ((boundary.status = CLIENT_RENDERED), - (task = getThrownInfo(task.componentStack)), + } else { + boundary.pendingTasks--; + replay = getThrownInfo(task.componentStack); + var _trackedPostpones2 = request.trackedPostpones; + if (boundary.status !== CLIENT_RENDERED) { + if (null !== _trackedPostpones2 && null !== segment) + return ( + "object" === typeof error && + null !== error && + error.$$typeof === REACT_POSTPONE_TYPE + ? logPostpone(request, error.message, replay, null) + : logRecoverableError(request, error, replay, null), + trackPostpone(request, _trackedPostpones2, task, segment), + boundary.fallbackAbortableTasks.forEach(function (fallbackTask) { + return abortTask(fallbackTask, request, error); + }), + boundary.fallbackAbortableTasks.clear(), + finishedTask(request, boundary, segment) + ); + boundary.status = CLIENT_RENDERED; + if ( "object" === typeof error && null !== error && error.$$typeof === REACT_POSTPONE_TYPE - ? (logPostpone(request, error.message, task, null), - (segment = "POSTPONE")) - : (segment = logRecoverableError(request, error, task, null)), - encodeErrorForBoundary(boundary, segment, error, task, !0), - untrackBoundary(request, boundary), - boundary.parentFlushed && - request.clientRenderedBoundaries.push(boundary)), - boundary.fallbackAbortableTasks.forEach(function (fallbackTask) { - return abortTask(fallbackTask, request, error); - }), - boundary.fallbackAbortableTasks.clear(); + ) { + logPostpone(request, error.message, replay, null); + if (null !== request.trackedPostpones && null !== segment) { + trackPostpone(request, request.trackedPostpones, task, segment); + finishedTask(request, task.blockedBoundary, segment); + boundary.fallbackAbortableTasks.forEach(function (fallbackTask) { + return abortTask(fallbackTask, request, error); + }); + boundary.fallbackAbortableTasks.clear(); + return; + } + task = "POSTPONE"; + } else task = logRecoverableError(request, error, replay, null); + boundary.status = CLIENT_RENDERED; + encodeErrorForBoundary(boundary, task, error, replay, !0); + untrackBoundary(request, boundary); + boundary.parentFlushed && + request.clientRenderedBoundaries.push(boundary); + } + boundary.fallbackAbortableTasks.forEach(function (fallbackTask) { + return abortTask(fallbackTask, request, error); + }); + boundary.fallbackAbortableTasks.clear(); + } request.allPendingTasks--; 0 === request.allPendingTasks && completeAll(request); } @@ -6831,7 +6864,9 @@ erroredReplay( request$jscomp$0, request.blockedBoundary, - x === AbortSigil ? request$jscomp$0.fatalError : x, + 1 === request$jscomp$0.status + ? request$jscomp$0.fatalError + : x, errorInfo, request.replay.nodes, request.replay.slots, @@ -6882,92 +6917,132 @@ var x$jscomp$0 = thrownValue === SuspenseException ? getSuspendedThenable() - : thrownValue === AbortSigil + : 1 === request.status ? request.fatalError : thrownValue; - if ("object" === typeof x$jscomp$0 && null !== x$jscomp$0) { - if ("function" === typeof x$jscomp$0.then) { - segment$jscomp$0.status = PENDING; - task$jscomp$0.thenableState = - getThenableStateAfterSuspending(); - var ping$jscomp$0 = task$jscomp$0.ping; - x$jscomp$0.then(ping$jscomp$0, ping$jscomp$0); - break a; - } - if ( - null !== request.trackedPostpones && - x$jscomp$0.$$typeof === REACT_POSTPONE_TYPE - ) { - var trackedPostpones = request.trackedPostpones; - task$jscomp$0.abortSet.delete(task$jscomp$0); - var postponeInfo = getThrownInfo( + if ( + 1 === request.status && + null !== request.trackedPostpones + ) { + var trackedPostpones = request.trackedPostpones, + thrownInfo = getThrownInfo( task$jscomp$0.componentStack ); - logPostpone( - request, - x$jscomp$0.message, - postponeInfo, - task$jscomp$0.debugTask - ); - trackPostpone( - request, - trackedPostpones, - task$jscomp$0, - segment$jscomp$0 - ); - finishedTask( - request, - task$jscomp$0.blockedBoundary, - segment$jscomp$0 - ); - break a; - } - } - var errorInfo$jscomp$0 = getThrownInfo( - task$jscomp$0.componentStack - ); - task$jscomp$0.abortSet.delete(task$jscomp$0); - segment$jscomp$0.status = 4; - var boundary = task$jscomp$0.blockedBoundary, - debugTask = task$jscomp$0.debugTask; - "object" === typeof x$jscomp$0 && - null !== x$jscomp$0 && - x$jscomp$0.$$typeof === REACT_POSTPONE_TYPE - ? (logPostpone( - request, - x$jscomp$0.message, - errorInfo$jscomp$0, - debugTask - ), - (prevTaskInDEV = "POSTPONE")) - : (prevTaskInDEV = logRecoverableError( - request, - x$jscomp$0, - errorInfo$jscomp$0, - debugTask - )); - null === boundary - ? fatalError( - request, - x$jscomp$0, - errorInfo$jscomp$0, - debugTask - ) - : (boundary.pendingTasks--, - boundary.status !== CLIENT_RENDERED && - ((boundary.status = CLIENT_RENDERED), - encodeErrorForBoundary( - boundary, - prevTaskInDEV, + task$jscomp$0.abortSet.delete(task$jscomp$0); + "object" === typeof x$jscomp$0 && + null !== x$jscomp$0 && + x$jscomp$0.$$typeof === REACT_POSTPONE_TYPE + ? logPostpone( + request, + x$jscomp$0.message, + thrownInfo, + task$jscomp$0.debugTask + ) + : logRecoverableError( + request, x$jscomp$0, + thrownInfo, + task$jscomp$0.debugTask + ); + trackPostpone( + request, + trackedPostpones, + task$jscomp$0, + segment$jscomp$0 + ); + finishedTask( + request, + task$jscomp$0.blockedBoundary, + segment$jscomp$0 + ); + } else { + if ( + "object" === typeof x$jscomp$0 && + null !== x$jscomp$0 + ) { + if ("function" === typeof x$jscomp$0.then) { + segment$jscomp$0.status = PENDING; + task$jscomp$0.thenableState = + getThenableStateAfterSuspending(); + var ping$jscomp$0 = task$jscomp$0.ping; + x$jscomp$0.then(ping$jscomp$0, ping$jscomp$0); + break a; + } + if ( + null !== request.trackedPostpones && + x$jscomp$0.$$typeof === REACT_POSTPONE_TYPE + ) { + var _trackedPostpones3 = request.trackedPostpones; + task$jscomp$0.abortSet.delete(task$jscomp$0); + var postponeInfo = getThrownInfo( + task$jscomp$0.componentStack + ); + logPostpone( + request, + x$jscomp$0.message, + postponeInfo, + task$jscomp$0.debugTask + ); + trackPostpone( + request, + _trackedPostpones3, + task$jscomp$0, + segment$jscomp$0 + ); + finishedTask( + request, + task$jscomp$0.blockedBoundary, + segment$jscomp$0 + ); + break a; + } + } + var errorInfo$jscomp$0 = getThrownInfo( + task$jscomp$0.componentStack + ); + task$jscomp$0.abortSet.delete(task$jscomp$0); + segment$jscomp$0.status = 4; + var boundary = task$jscomp$0.blockedBoundary, + debugTask = task$jscomp$0.debugTask; + "object" === typeof x$jscomp$0 && + null !== x$jscomp$0 && + x$jscomp$0.$$typeof === REACT_POSTPONE_TYPE + ? (logPostpone( + request, + x$jscomp$0.message, errorInfo$jscomp$0, - !1 + debugTask ), - untrackBoundary(request, boundary), - boundary.parentFlushed && - request.clientRenderedBoundaries.push(boundary))); - request.allPendingTasks--; - 0 === request.allPendingTasks && completeAll(request); + (prevTaskInDEV = "POSTPONE")) + : (prevTaskInDEV = logRecoverableError( + request, + x$jscomp$0, + errorInfo$jscomp$0, + debugTask + )); + null === boundary + ? fatalError( + request, + x$jscomp$0, + errorInfo$jscomp$0, + debugTask + ) + : (boundary.pendingTasks--, + boundary.status !== CLIENT_RENDERED && + ((boundary.status = CLIENT_RENDERED), + encodeErrorForBoundary( + boundary, + prevTaskInDEV, + x$jscomp$0, + errorInfo$jscomp$0, + !1 + ), + untrackBoundary(request, boundary), + boundary.parentFlushed && + request.clientRenderedBoundaries.push(boundary))); + request.allPendingTasks--; + 0 === request.allPendingTasks && completeAll(request); + } } finally { currentTaskInDEV = request$jscomp$0; } @@ -7593,9 +7668,10 @@ } function startWork(request) { request.flushScheduled = null !== request.destination; - performWork(request); - null === request.trackedPostpones && - safelyEmitEarlyPreloads(request, 0 === request.pendingRootTasks); + null !== request.trackedPostpones + ? performWork(request) + : (performWork(request), + safelyEmitEarlyPreloads(request, 0 === request.pendingRootTasks)); } function enqueueFlush(request) { if ( @@ -9151,7 +9227,6 @@ FLUSHED = 2, POSTPONED = 5, CLOSED = 3, - AbortSigil = {}, currentRequest = null, didWarnAboutBadClass = {}, didWarnAboutContextTypes = {}, @@ -9176,5 +9251,5 @@ 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server' ); }; - exports.version = "19.0.0-experimental-1eaccd82-20240816"; + exports.version = "19.0.0-experimental-eb3ad065-20240822"; })(); diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.production.js index fc716d8f62854..fc83754136d82 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.production.js @@ -2668,16 +2668,16 @@ function createRenderState(resumableState, generateStaticMarkup) { "\x3c/script>" ); bootstrapScriptContent = idPrefix + "P:"; - var JSCompiler_object_inline_segmentPrefix_1648 = idPrefix + "S:"; + var JSCompiler_object_inline_segmentPrefix_1658 = idPrefix + "S:"; idPrefix += "B:"; - var JSCompiler_object_inline_preconnects_1662 = new Set(), - JSCompiler_object_inline_fontPreloads_1663 = new Set(), - JSCompiler_object_inline_highImagePreloads_1664 = new Set(), - JSCompiler_object_inline_styles_1665 = new Map(), - JSCompiler_object_inline_bootstrapScripts_1666 = new Set(), - JSCompiler_object_inline_scripts_1667 = new Set(), - JSCompiler_object_inline_bulkPreloads_1668 = new Set(), - JSCompiler_object_inline_preloads_1669 = { + var JSCompiler_object_inline_preconnects_1672 = new Set(), + JSCompiler_object_inline_fontPreloads_1673 = new Set(), + JSCompiler_object_inline_highImagePreloads_1674 = new Set(), + JSCompiler_object_inline_styles_1675 = new Map(), + JSCompiler_object_inline_bootstrapScripts_1676 = new Set(), + JSCompiler_object_inline_scripts_1677 = new Set(), + JSCompiler_object_inline_bulkPreloads_1678 = new Set(), + JSCompiler_object_inline_preloads_1679 = { images: new Map(), stylesheets: new Map(), scripts: new Map(), @@ -2714,7 +2714,7 @@ function createRenderState(resumableState, generateStaticMarkup) { scriptConfig.moduleScriptResources[href] = null; scriptConfig = []; pushLinkImpl(scriptConfig, props); - JSCompiler_object_inline_bootstrapScripts_1666.add(scriptConfig); + JSCompiler_object_inline_bootstrapScripts_1676.add(scriptConfig); bootstrapChunks.push('