diff --git a/.github/.react-version b/.github/.react-version index bbe85eaea0cd3..6fbe3e9d0ac9a 100644 --- a/.github/.react-version +++ b/.github/.react-version @@ -1 +1 @@ -19.0.0-rc-49496d49-20240814 \ No newline at end of file +19.0.0-rc-1eaccd82-20240816 \ No newline at end of file diff --git a/examples/reproduction-template/package.json b/examples/reproduction-template/package.json index f88b10131b1f5..cda84906633ca 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-49496d49-20240814", - "react-dom": "19.0.0-rc-49496d49-20240814" + "react": "19.0.0-rc-1eaccd82-20240816", + "react-dom": "19.0.0-rc-1eaccd82-20240816" }, "devDependencies": { "@types/node": "20.12.12", diff --git a/package.json b/package.json index 329318e6b10e5..937d1c9d72749 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-49496d49-20240814", + "react": "19.0.0-rc-1eaccd82-20240816", "react-17": "npm:react@17.0.2", - "react-builtin": "npm:react@19.0.0-rc-49496d49-20240814", - "react-dom": "19.0.0-rc-49496d49-20240814", + "react-builtin": "npm:react@19.0.0-rc-1eaccd82-20240816", + "react-dom": "19.0.0-rc-1eaccd82-20240816", "react-dom-17": "npm:react-dom@17.0.2", - "react-dom-builtin": "npm:react-dom@19.0.0-rc-49496d49-20240814", - "react-dom-experimental-builtin": "npm:react-dom@0.0.0-experimental-49496d49-20240814", - "react-experimental-builtin": "npm:react@0.0.0-experimental-49496d49-20240814", - "react-is-builtin": "npm:react-is@19.0.0-rc-49496d49-20240814", - "react-server-dom-turbopack": "19.0.0-rc-49496d49-20240814", - "react-server-dom-turbopack-experimental": "npm:react-server-dom-turbopack@0.0.0-experimental-49496d49-20240814", - "react-server-dom-webpack": "19.0.0-rc-49496d49-20240814", - "react-server-dom-webpack-experimental": "npm:react-server-dom-webpack@0.0.0-experimental-49496d49-20240814", + "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-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-49496d49-20240814", - "scheduler-experimental-builtin": "npm:scheduler@0.0.0-experimental-49496d49-20240814", + "scheduler-builtin": "npm:scheduler@0.25.0-rc-1eaccd82-20240816", + "scheduler-experimental-builtin": "npm:scheduler@0.0.0-experimental-1eaccd82-20240816", "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-49496d49-20240814", - "react-dom": "19.0.0-rc-49496d49-20240814", - "react-is": "19.0.0-rc-49496d49-20240814", - "scheduler": "0.25.0-rc-49496d49-20240814" + "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" }, "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 8f38cb1c21dc0..e7338f1560197 100644 --- a/packages/create-next-app/templates/index.ts +++ b/packages/create-next-app/templates/index.ts @@ -184,8 +184,8 @@ export const installTemplate = async ({ * Default dependencies. */ dependencies: { - react: "19.0.0-rc-49496d49-20240814", - "react-dom": "19.0.0-rc-49496d49-20240814", + react: "19.0.0-rc-1eaccd82-20240816", + "react-dom": "19.0.0-rc-1eaccd82-20240816", next: version, }, devDependencies: {}, diff --git a/packages/next/package.json b/packages/next/package.json index 524a9ee4034a0..0989c69c109be 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-49496d49-20240814", - "react-dom": "19.0.0-rc-49496d49-20240814", + "react": "19.0.0-rc-1eaccd82-20240816", + "react-dom": "19.0.0-rc-1eaccd82-20240816", "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 15990da6bd4a6..dd839ad378d84 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 @@ -6065,7 +6065,7 @@ (currentlyRenderingFiber$1.updateQueue = updateQueue)); updateQueue.memoCache = memoCache; updateQueue = memoCache.data[memoCache.index]; - if (void 0 === updateQueue) + if (void 0 === updateQueue || ignorePreviousDependencies) for ( updateQueue = memoCache.data[memoCache.index] = Array(size), current = 0; @@ -24604,11 +24604,11 @@ }; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-experimental-49496d49-20240814" !== isomorphicReactPackageVersion) + if ("19.0.0-experimental-1eaccd82-20240816" !== 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-49496d49-20240814\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-experimental-1eaccd82-20240816\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-49496d49-20240814", + version: "19.0.0-experimental-1eaccd82-20240816", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-experimental-49496d49-20240814" + reconcilerVersion: "19.0.0-experimental-1eaccd82-20240816" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -24793,7 +24793,7 @@ listenToAllSupportedEvents(container); return new ReactDOMHydrationRoot(initialChildren); }; - exports.version = "19.0.0-experimental-49496d49-20240814"; + exports.version = "19.0.0-experimental-1eaccd82-20240816"; "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 c2361f5297dbe..5f6d432ff1011 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-49496d49-20240814" !== + "19.0.0-experimental-1eaccd82-20240816" !== isomorphicReactPackageVersion$jscomp$inline_1640 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_1640, - "19.0.0-experimental-49496d49-20240814" + "19.0.0-experimental-1eaccd82-20240816" ) ); ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { @@ -15022,11 +15022,11 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { }; var internals$jscomp$inline_2039 = { bundleType: 0, - version: "19.0.0-experimental-49496d49-20240814", + version: "19.0.0-experimental-1eaccd82-20240816", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-experimental-49496d49-20240814" + reconcilerVersion: "19.0.0-experimental-1eaccd82-20240816" }; 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-49496d49-20240814"; +exports.version = "19.0.0-experimental-1eaccd82-20240816"; 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 97c876bf43b08..e1c18ab895b6a 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 @@ -6073,7 +6073,7 @@ (currentlyRenderingFiber$1.updateQueue = updateQueue)); updateQueue.memoCache = memoCache; updateQueue = memoCache.data[memoCache.index]; - if (void 0 === updateQueue) + if (void 0 === updateQueue || ignorePreviousDependencies) for ( updateQueue = memoCache.data[memoCache.index] = Array(size), current = 0; @@ -24661,11 +24661,11 @@ }; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-experimental-49496d49-20240814" !== isomorphicReactPackageVersion) + if ("19.0.0-experimental-1eaccd82-20240816" !== 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-49496d49-20240814\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-experimental-1eaccd82-20240816\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-49496d49-20240814", + version: "19.0.0-experimental-1eaccd82-20240816", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-experimental-49496d49-20240814" + reconcilerVersion: "19.0.0-experimental-1eaccd82-20240816" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -25180,7 +25180,7 @@ exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.0.0-experimental-49496d49-20240814"; + exports.version = "19.0.0-experimental-1eaccd82-20240816"; "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 0993dc834f8ea..7de45db3eeb50 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-49496d49-20240814" !== + "19.0.0-experimental-1eaccd82-20240816" !== isomorphicReactPackageVersion$jscomp$inline_1729 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_1729, - "19.0.0-experimental-49496d49-20240814" + "19.0.0-experimental-1eaccd82-20240816" ) ); ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { @@ -15725,11 +15725,11 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { }; var internals$jscomp$inline_1736 = { bundleType: 0, - version: "19.0.0-experimental-49496d49-20240814", + version: "19.0.0-experimental-1eaccd82-20240816", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-experimental-49496d49-20240814", + reconcilerVersion: "19.0.0-experimental-1eaccd82-20240816", 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-49496d49-20240814"; +exports.version = "19.0.0-experimental-1eaccd82-20240816"; "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 16bd24c61769e..e0d68ef275385 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 @@ -9176,5 +9176,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-49496d49-20240814"; + exports.version = "19.0.0-experimental-1eaccd82-20240816"; })(); 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 9b2c480f0bb78..fc716d8f62854 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 @@ -5971,4 +5971,4 @@ exports.renderToString = function (children, options) { '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-49496d49-20240814"; +exports.version = "19.0.0-experimental-1eaccd82-20240816"; diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.node.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.node.development.js index 463898c0fae6e..4e71cfc12dda8 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.node.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.node.development.js @@ -9176,5 +9176,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 "renderToPipeableStream" which supports Suspense on the server' ); }; - exports.version = "19.0.0-experimental-49496d49-20240814"; + exports.version = "19.0.0-experimental-1eaccd82-20240816"; })(); diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.node.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.node.production.js index 22ebb007d3d17..2317451253da8 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.node.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.node.production.js @@ -6063,4 +6063,4 @@ exports.renderToString = function (children, options) { '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 "renderToPipeableStream" which supports Suspense on the server' ); }; -exports.version = "19.0.0-experimental-49496d49-20240814"; +exports.version = "19.0.0-experimental-1eaccd82-20240816"; diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.browser.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.browser.development.js index cd991bb45cfcf..43858f6d2e2d4 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.browser.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.browser.development.js @@ -8050,11 +8050,11 @@ } function ensureCorrectIsomorphicReactVersion() { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-experimental-49496d49-20240814" !== isomorphicReactPackageVersion) + if ("19.0.0-experimental-1eaccd82-20240816" !== 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-49496d49-20240814\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-experimental-1eaccd82-20240816\nLearn more: https://react.dev/warnings/version-mismatch") ); } var React = require("next/dist/compiled/react-experimental"), @@ -9776,5 +9776,5 @@ startWork(request); }); }; - exports.version = "19.0.0-experimental-49496d49-20240814"; + exports.version = "19.0.0-experimental-1eaccd82-20240816"; })(); diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.browser.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.browser.production.js index 4022ba172a1c9..12975c66a43e9 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.browser.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.browser.production.js @@ -6468,12 +6468,12 @@ function getPostponedState(request) { } function ensureCorrectIsomorphicReactVersion() { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-experimental-49496d49-20240814" !== isomorphicReactPackageVersion) + if ("19.0.0-experimental-1eaccd82-20240816" !== isomorphicReactPackageVersion) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion, - "19.0.0-experimental-49496d49-20240814" + "19.0.0-experimental-1eaccd82-20240816" ) ); } @@ -6678,4 +6678,4 @@ exports.resume = function (children, postponedState, options) { startWork(request); }); }; -exports.version = "19.0.0-experimental-49496d49-20240814"; +exports.version = "19.0.0-experimental-1eaccd82-20240816"; diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.bun.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.bun.production.js index e467a3a5b614f..332eccd68fe41 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.bun.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.bun.production.js @@ -5977,13 +5977,13 @@ function addToReplayParent(node, parentKeyPath, trackedPostpones) { } var isomorphicReactPackageVersion$jscomp$inline_789 = React.version; if ( - "19.0.0-experimental-49496d49-20240814" !== + "19.0.0-experimental-1eaccd82-20240816" !== isomorphicReactPackageVersion$jscomp$inline_789 ) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion$jscomp$inline_789 + - "\n - react-dom: 19.0.0-experimental-49496d49-20240814\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-experimental-1eaccd82-20240816\nLearn more: https://react.dev/warnings/version-mismatch") ); exports.renderToReadableStream = function (children, options) { return new Promise(function (resolve, reject) { @@ -6071,4 +6071,4 @@ exports.renderToReadableStream = function (children, options) { startWork(request); }); }; -exports.version = "19.0.0-experimental-49496d49-20240814"; +exports.version = "19.0.0-experimental-1eaccd82-20240816"; diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.edge.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.edge.development.js index 591a8e46c8359..70aed41e848a5 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.edge.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.edge.development.js @@ -8069,11 +8069,11 @@ } function ensureCorrectIsomorphicReactVersion() { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-experimental-49496d49-20240814" !== isomorphicReactPackageVersion) + if ("19.0.0-experimental-1eaccd82-20240816" !== 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-49496d49-20240814\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-experimental-1eaccd82-20240816\nLearn more: https://react.dev/warnings/version-mismatch") ); } var React = require("next/dist/compiled/react-experimental"), @@ -9802,5 +9802,5 @@ const setTimeoutOrImmediate = ? globalThis['set' + 'Immediate'] : setTimeout; - exports.version = "19.0.0-experimental-49496d49-20240814"; + exports.version = "19.0.0-experimental-1eaccd82-20240816"; })(); diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.edge.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.edge.production.js index 6b402e4982222..758bd3165c62c 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.edge.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.edge.production.js @@ -6572,11 +6572,11 @@ function getPostponedState(request) { } function ensureCorrectIsomorphicReactVersion() { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-experimental-49496d49-20240814" !== isomorphicReactPackageVersion) + if ("19.0.0-experimental-1eaccd82-20240816" !== 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-49496d49-20240814\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-experimental-1eaccd82-20240816\nLearn more: https://react.dev/warnings/version-mismatch") ); } ensureCorrectIsomorphicReactVersion(); @@ -6791,4 +6791,4 @@ const setTimeoutOrImmediate = ? globalThis['set' + 'Immediate'] : setTimeout; -exports.version = "19.0.0-experimental-49496d49-20240814"; +exports.version = "19.0.0-experimental-1eaccd82-20240816"; diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.node.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.node.development.js index 65482acb380a1..89151ea86417d 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.node.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.node.development.js @@ -7806,11 +7806,11 @@ } function ensureCorrectIsomorphicReactVersion() { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-experimental-49496d49-20240814" !== isomorphicReactPackageVersion) + if ("19.0.0-experimental-1eaccd82-20240816" !== 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-49496d49-20240814\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-experimental-1eaccd82-20240816\nLearn more: https://react.dev/warnings/version-mismatch") ); } function createDrainHandler(destination, request) { @@ -9618,5 +9618,5 @@ } }; }; - exports.version = "19.0.0-experimental-49496d49-20240814"; + exports.version = "19.0.0-experimental-1eaccd82-20240816"; })(); diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.node.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.node.production.js index f4e8224f6e1d1..63c8806298107 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.node.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.node.production.js @@ -6336,11 +6336,11 @@ function getPostponedState(request) { } function ensureCorrectIsomorphicReactVersion() { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-experimental-49496d49-20240814" !== isomorphicReactPackageVersion) + if ("19.0.0-experimental-1eaccd82-20240816" !== 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-49496d49-20240814\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-experimental-1eaccd82-20240816\nLearn more: https://react.dev/warnings/version-mismatch") ); } ensureCorrectIsomorphicReactVersion(); @@ -6625,4 +6625,4 @@ exports.resumeToPipeableStream = function (children, postponedState, options) { } }; }; -exports.version = "19.0.0-experimental-49496d49-20240814"; +exports.version = "19.0.0-experimental-1eaccd82-20240816"; diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-unstable_testing.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-unstable_testing.development.js index ff3ff025c4f8a..e3004ab394c9e 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-unstable_testing.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-unstable_testing.development.js @@ -6106,7 +6106,7 @@ (currentlyRenderingFiber$1.updateQueue = updateQueue)); updateQueue.memoCache = memoCache; updateQueue = memoCache.data[memoCache.index]; - if (void 0 === updateQueue) + if (void 0 === updateQueue || ignorePreviousDependencies) for ( updateQueue = memoCache.data[memoCache.index] = Array(size), current = 0; @@ -24938,11 +24938,11 @@ }; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-experimental-49496d49-20240814" !== isomorphicReactPackageVersion) + if ("19.0.0-experimental-1eaccd82-20240816" !== 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-49496d49-20240814\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-experimental-1eaccd82-20240816\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -24979,11 +24979,11 @@ !(function () { var internals = { bundleType: 1, - version: "19.0.0-experimental-49496d49-20240814", + version: "19.0.0-experimental-1eaccd82-20240816", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-experimental-49496d49-20240814" + reconcilerVersion: "19.0.0-experimental-1eaccd82-20240816" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -25293,5 +25293,5 @@ } }; }; - exports.version = "19.0.0-experimental-49496d49-20240814"; + exports.version = "19.0.0-experimental-1eaccd82-20240816"; })(); diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-unstable_testing.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-unstable_testing.production.js index 2f575ee482cac..a870a25c11325 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-unstable_testing.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-unstable_testing.production.js @@ -15322,14 +15322,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) { }; var isomorphicReactPackageVersion$jscomp$inline_1669 = React.version; if ( - "19.0.0-experimental-49496d49-20240814" !== + "19.0.0-experimental-1eaccd82-20240816" !== isomorphicReactPackageVersion$jscomp$inline_1669 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_1669, - "19.0.0-experimental-49496d49-20240814" + "19.0.0-experimental-1eaccd82-20240816" ) ); ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { @@ -15351,11 +15351,11 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { }; var internals$jscomp$inline_2073 = { bundleType: 0, - version: "19.0.0-experimental-49496d49-20240814", + version: "19.0.0-experimental-1eaccd82-20240816", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-experimental-49496d49-20240814" + reconcilerVersion: "19.0.0-experimental-1eaccd82-20240816" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_2074 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -15610,4 +15610,4 @@ exports.observeVisibleRects = function ( } }; }; -exports.version = "19.0.0-experimental-49496d49-20240814"; +exports.version = "19.0.0-experimental-1eaccd82-20240816"; diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.development.js index 7d4e455c40536..547023ad94d4e 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.development.js @@ -416,7 +416,7 @@ exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.0.0-experimental-49496d49-20240814"; + exports.version = "19.0.0-experimental-1eaccd82-20240816"; "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.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.production.js index 7328d80501024..cd57fdee1b76f 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.production.js @@ -207,4 +207,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-experimental-49496d49-20240814"; +exports.version = "19.0.0-experimental-1eaccd82-20240816"; diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.react-server.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.react-server.development.js index 25dda439d75c7..319d53366b0aa 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.react-server.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.react-server.development.js @@ -336,5 +336,5 @@ })) : Internals.d.m(href)); }; - exports.version = "19.0.0-experimental-49496d49-20240814"; + exports.version = "19.0.0-experimental-1eaccd82-20240816"; })(); diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.react-server.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.react-server.production.js index 9eff5fc78fff8..2b7eed8c0bd84 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.react-server.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.react-server.production.js @@ -149,4 +149,4 @@ exports.preloadModule = function (href, options) { }); } else Internals.d.m(href); }; -exports.version = "19.0.0-experimental-49496d49-20240814"; +exports.version = "19.0.0-experimental-1eaccd82-20240816"; diff --git a/packages/next/src/compiled/react-dom-experimental/package.json b/packages/next/src/compiled/react-dom-experimental/package.json index 90f63a9845ade..242a6f20e1b92 100644 --- a/packages/next/src/compiled/react-dom-experimental/package.json +++ b/packages/next/src/compiled/react-dom-experimental/package.json @@ -72,10 +72,10 @@ "./package.json": "./package.json" }, "dependencies": { - "scheduler": "0.0.0-experimental-49496d49-20240814" + "scheduler": "0.0.0-experimental-1eaccd82-20240816" }, "peerDependencies": { - "react": "0.0.0-experimental-49496d49-20240814" + "react": "0.0.0-experimental-1eaccd82-20240816" }, "browser": { "./server.js": "./server.browser.js", diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-client.development.js b/packages/next/src/compiled/react-dom/cjs/react-dom-client.development.js index 4212b7c43c135..f2125faf63839 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-client.development.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-client.development.js @@ -5899,7 +5899,7 @@ (currentlyRenderingFiber$1.updateQueue = updateQueue)); updateQueue.memoCache = memoCache; updateQueue = memoCache.data[memoCache.index]; - if (void 0 === updateQueue) + if (void 0 === updateQueue || ignorePreviousDependencies) for ( updateQueue = memoCache.data[memoCache.index] = Array(size), current = 0; @@ -24210,11 +24210,11 @@ }; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-rc-49496d49-20240814" !== isomorphicReactPackageVersion) + if ("19.0.0-rc-1eaccd82-20240816" !== 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-rc-49496d49-20240814\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-rc-1eaccd82-20240816\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -24251,11 +24251,11 @@ !(function () { var internals = { bundleType: 1, - version: "19.0.0-rc-49496d49-20240814", + version: "19.0.0-rc-1eaccd82-20240816", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-rc-49496d49-20240814" + reconcilerVersion: "19.0.0-rc-1eaccd82-20240816" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -24399,7 +24399,7 @@ listenToAllSupportedEvents(container); return new ReactDOMHydrationRoot(initialChildren); }; - exports.version = "19.0.0-rc-49496d49-20240814"; + exports.version = "19.0.0-rc-1eaccd82-20240816"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-client.production.js b/packages/next/src/compiled/react-dom/cjs/react-dom-client.production.js index bf4e6c22f2922..c49952f855d78 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-client.production.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-client.production.js @@ -14740,14 +14740,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) { }; var isomorphicReactPackageVersion$jscomp$inline_1669 = React.version; if ( - "19.0.0-rc-49496d49-20240814" !== + "19.0.0-rc-1eaccd82-20240816" !== isomorphicReactPackageVersion$jscomp$inline_1669 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_1669, - "19.0.0-rc-49496d49-20240814" + "19.0.0-rc-1eaccd82-20240816" ) ); ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { @@ -14769,11 +14769,11 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { }; var internals$jscomp$inline_2045 = { bundleType: 0, - version: "19.0.0-rc-49496d49-20240814", + version: "19.0.0-rc-1eaccd82-20240816", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-rc-49496d49-20240814" + reconcilerVersion: "19.0.0-rc-1eaccd82-20240816" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_2046 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -14877,4 +14877,4 @@ exports.hydrateRoot = function (container, initialChildren, options) { listenToAllSupportedEvents(container); return new ReactDOMHydrationRoot(initialChildren); }; -exports.version = "19.0.0-rc-49496d49-20240814"; +exports.version = "19.0.0-rc-1eaccd82-20240816"; diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-profiling.development.js b/packages/next/src/compiled/react-dom/cjs/react-dom-profiling.development.js index acad86f4469c4..38312eb3273e2 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-profiling.development.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-profiling.development.js @@ -5907,7 +5907,7 @@ (currentlyRenderingFiber$1.updateQueue = updateQueue)); updateQueue.memoCache = memoCache; updateQueue = memoCache.data[memoCache.index]; - if (void 0 === updateQueue) + if (void 0 === updateQueue || ignorePreviousDependencies) for ( updateQueue = memoCache.data[memoCache.index] = Array(size), current = 0; @@ -24267,11 +24267,11 @@ }; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-rc-49496d49-20240814" !== isomorphicReactPackageVersion) + if ("19.0.0-rc-1eaccd82-20240816" !== 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-rc-49496d49-20240814\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-rc-1eaccd82-20240816\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -24308,11 +24308,11 @@ !(function () { var internals = { bundleType: 1, - version: "19.0.0-rc-49496d49-20240814", + version: "19.0.0-rc-1eaccd82-20240816", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-rc-49496d49-20240814" + reconcilerVersion: "19.0.0-rc-1eaccd82-20240816" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -24786,7 +24786,7 @@ exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.0.0-rc-49496d49-20240814"; + exports.version = "19.0.0-rc-1eaccd82-20240816"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-profiling.profiling.js b/packages/next/src/compiled/react-dom/cjs/react-dom-profiling.profiling.js index 19ee057663e60..205ad6deb0454 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-profiling.profiling.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-profiling.profiling.js @@ -15443,14 +15443,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) { }; var isomorphicReactPackageVersion$jscomp$inline_1758 = React.version; if ( - "19.0.0-rc-49496d49-20240814" !== + "19.0.0-rc-1eaccd82-20240816" !== isomorphicReactPackageVersion$jscomp$inline_1758 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_1758, - "19.0.0-rc-49496d49-20240814" + "19.0.0-rc-1eaccd82-20240816" ) ); ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { @@ -15472,11 +15472,11 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { }; var internals$jscomp$inline_1765 = { bundleType: 0, - version: "19.0.0-rc-49496d49-20240814", + version: "19.0.0-rc-1eaccd82-20240816", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-rc-49496d49-20240814", + reconcilerVersion: "19.0.0-rc-1eaccd82-20240816", getLaneLabelMap: function () { for ( var map = new Map(), lane = 1, index$287 = 0; @@ -15756,7 +15756,7 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-rc-49496d49-20240814"; +exports.version = "19.0.0-rc-1eaccd82-20240816"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.development.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.development.js index 754d589e52aef..96a3ee36c578f 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.development.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.development.js @@ -8526,5 +8526,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-rc-49496d49-20240814"; + exports.version = "19.0.0-rc-1eaccd82-20240816"; })(); diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.production.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.production.js index 192f7de7d438b..459564b4403c7 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.production.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.production.js @@ -5589,4 +5589,4 @@ exports.renderToString = function (children, options) { '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-rc-49496d49-20240814"; +exports.version = "19.0.0-rc-1eaccd82-20240816"; diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.node.development.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.node.development.js index 66f59b210f0c4..80c1d3f2a97e3 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.node.development.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.node.development.js @@ -8526,5 +8526,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 "renderToPipeableStream" which supports Suspense on the server' ); }; - exports.version = "19.0.0-rc-49496d49-20240814"; + exports.version = "19.0.0-rc-1eaccd82-20240816"; })(); diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.node.production.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.node.production.js index f5e77525ee927..cad3da58dfaef 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.node.production.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.node.production.js @@ -5667,4 +5667,4 @@ exports.renderToString = function (children, options) { '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 "renderToPipeableStream" which supports Suspense on the server' ); }; -exports.version = "19.0.0-rc-49496d49-20240814"; +exports.version = "19.0.0-rc-1eaccd82-20240816"; diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server.browser.development.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server.browser.development.js index 92bcc2c2ba258..d4998c691d783 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server.browser.development.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server.browser.development.js @@ -8693,11 +8693,11 @@ didWarnAboutMaps = !1; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-rc-49496d49-20240814" !== isomorphicReactPackageVersion) + if ("19.0.0-rc-1eaccd82-20240816" !== 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-rc-49496d49-20240814\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-rc-1eaccd82-20240816\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); exports.renderToReadableStream = function (children, options) { @@ -8790,5 +8790,5 @@ startWork(request$jscomp$0); }); }; - exports.version = "19.0.0-rc-49496d49-20240814"; + exports.version = "19.0.0-rc-1eaccd82-20240816"; })(); diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server.browser.production.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server.browser.production.js index c71a17369fac2..bab3e807cd707 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server.browser.production.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server.browser.production.js @@ -5858,14 +5858,14 @@ function abort(request, reason) { } var isomorphicReactPackageVersion$jscomp$inline_742 = React.version; if ( - "19.0.0-rc-49496d49-20240814" !== + "19.0.0-rc-1eaccd82-20240816" !== isomorphicReactPackageVersion$jscomp$inline_742 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_742, - "19.0.0-rc-49496d49-20240814" + "19.0.0-rc-1eaccd82-20240816" ) ); exports.renderToReadableStream = function (children, options) { @@ -5954,4 +5954,4 @@ exports.renderToReadableStream = function (children, options) { startWork(request); }); }; -exports.version = "19.0.0-rc-49496d49-20240814"; +exports.version = "19.0.0-rc-1eaccd82-20240816"; diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server.bun.production.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server.bun.production.js index 3eeb5586deaea..06abbfd08f63b 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server.bun.production.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server.bun.production.js @@ -5555,13 +5555,13 @@ function abort(request, reason) { } var isomorphicReactPackageVersion$jscomp$inline_746 = React.version; if ( - "19.0.0-rc-49496d49-20240814" !== + "19.0.0-rc-1eaccd82-20240816" !== isomorphicReactPackageVersion$jscomp$inline_746 ) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion$jscomp$inline_746 + - "\n - react-dom: 19.0.0-rc-49496d49-20240814\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-rc-1eaccd82-20240816\nLearn more: https://react.dev/warnings/version-mismatch") ); exports.renderToReadableStream = function (children, options) { return new Promise(function (resolve, reject) { @@ -5649,4 +5649,4 @@ exports.renderToReadableStream = function (children, options) { startWork(request); }); }; -exports.version = "19.0.0-rc-49496d49-20240814"; +exports.version = "19.0.0-rc-1eaccd82-20240816"; diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server.edge.development.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server.edge.development.js index 577f72ca16192..5d0b17b80e254 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server.edge.development.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server.edge.development.js @@ -8708,11 +8708,11 @@ didWarnAboutMaps = !1; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-rc-49496d49-20240814" !== isomorphicReactPackageVersion) + if ("19.0.0-rc-1eaccd82-20240816" !== 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-rc-49496d49-20240814\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-rc-1eaccd82-20240816\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); exports.renderToReadableStream = function (children, options) { @@ -8816,5 +8816,5 @@ const setTimeoutOrImmediate = ? globalThis['set' + 'Immediate'] : setTimeout; - exports.version = "19.0.0-rc-49496d49-20240814"; + exports.version = "19.0.0-rc-1eaccd82-20240816"; })(); diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server.edge.production.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server.edge.production.js index ab597c79ddb0a..0042ef430a00f 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server.edge.production.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server.edge.production.js @@ -5948,13 +5948,13 @@ function abort(request, reason) { } var isomorphicReactPackageVersion$jscomp$inline_750 = React.version; if ( - "19.0.0-rc-49496d49-20240814" !== + "19.0.0-rc-1eaccd82-20240816" !== isomorphicReactPackageVersion$jscomp$inline_750 ) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion$jscomp$inline_750 + - "\n - react-dom: 19.0.0-rc-49496d49-20240814\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-rc-1eaccd82-20240816\nLearn more: https://react.dev/warnings/version-mismatch") ); exports.renderToReadableStream = function (children, options) { return new Promise(function (resolve, reject) { @@ -6053,4 +6053,4 @@ const setTimeoutOrImmediate = ? globalThis['set' + 'Immediate'] : setTimeout; -exports.version = "19.0.0-rc-49496d49-20240814"; +exports.version = "19.0.0-rc-1eaccd82-20240816"; diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server.node.development.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server.node.development.js index 75720c41f0fd1..5aba7cfda5243 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server.node.development.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server.node.development.js @@ -8583,11 +8583,11 @@ didWarnAboutMaps = !1; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-rc-49496d49-20240814" !== isomorphicReactPackageVersion) + if ("19.0.0-rc-1eaccd82-20240816" !== 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-rc-49496d49-20240814\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-rc-1eaccd82-20240816\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); exports.renderToPipeableStream = function (children, options) { @@ -8629,5 +8629,5 @@ } }; }; - exports.version = "19.0.0-rc-49496d49-20240814"; + exports.version = "19.0.0-rc-1eaccd82-20240816"; })(); diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server.node.production.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server.node.production.js index 8b5ce83de16bb..41a6efb738527 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server.node.production.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server.node.production.js @@ -5614,13 +5614,13 @@ function abort(request, reason) { } var isomorphicReactPackageVersion$jscomp$inline_773 = React.version; if ( - "19.0.0-rc-49496d49-20240814" !== + "19.0.0-rc-1eaccd82-20240816" !== isomorphicReactPackageVersion$jscomp$inline_773 ) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion$jscomp$inline_773 + - "\n - react-dom: 19.0.0-rc-49496d49-20240814\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-rc-1eaccd82-20240816\nLearn more: https://react.dev/warnings/version-mismatch") ); function createDrainHandler(destination, request) { return function () { @@ -5895,4 +5895,4 @@ exports.renderToPipeableStream = function (children, options) { } }; }; -exports.version = "19.0.0-rc-49496d49-20240814"; +exports.version = "19.0.0-rc-1eaccd82-20240816"; diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom.development.js b/packages/next/src/compiled/react-dom/cjs/react-dom.development.js index 68e4198bb4571..461bbe0a3856f 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom.development.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom.development.js @@ -416,7 +416,7 @@ exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.0.0-rc-49496d49-20240814"; + exports.version = "19.0.0-rc-1eaccd82-20240816"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom.production.js b/packages/next/src/compiled/react-dom/cjs/react-dom.production.js index 16351b2a5f9f8..df777687085dc 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom.production.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom.production.js @@ -207,4 +207,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-rc-49496d49-20240814"; +exports.version = "19.0.0-rc-1eaccd82-20240816"; diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom.react-server.development.js b/packages/next/src/compiled/react-dom/cjs/react-dom.react-server.development.js index 562dce71723f3..a86cf13fd13a1 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom.react-server.development.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom.react-server.development.js @@ -336,5 +336,5 @@ })) : Internals.d.m(href)); }; - exports.version = "19.0.0-rc-49496d49-20240814"; + exports.version = "19.0.0-rc-1eaccd82-20240816"; })(); diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom.react-server.production.js b/packages/next/src/compiled/react-dom/cjs/react-dom.react-server.production.js index d2645469cb3aa..c47d64e5d2197 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom.react-server.production.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom.react-server.production.js @@ -149,4 +149,4 @@ exports.preloadModule = function (href, options) { }); } else Internals.d.m(href); }; -exports.version = "19.0.0-rc-49496d49-20240814"; +exports.version = "19.0.0-rc-1eaccd82-20240816"; diff --git a/packages/next/src/compiled/react-dom/package.json b/packages/next/src/compiled/react-dom/package.json index 828d3cce38b39..9a4086de03895 100644 --- a/packages/next/src/compiled/react-dom/package.json +++ b/packages/next/src/compiled/react-dom/package.json @@ -67,10 +67,10 @@ "./package.json": "./package.json" }, "dependencies": { - "scheduler": "0.25.0-rc-49496d49-20240814" + "scheduler": "0.25.0-rc-1eaccd82-20240816" }, "peerDependencies": { - "react": "19.0.0-rc-49496d49-20240814" + "react": "19.0.0-rc-1eaccd82-20240816" }, "browser": { "./server.js": "./server.browser.js", diff --git a/packages/next/src/compiled/react-experimental/cjs/react.development.js b/packages/next/src/compiled/react-experimental/cjs/react.development.js index e9cae47f5ef1c..0b5389f394d0b 100644 --- a/packages/next/src/compiled/react-experimental/cjs/react.development.js +++ b/packages/next/src/compiled/react-experimental/cjs/react.development.js @@ -1233,7 +1233,7 @@ exports.useTransition = function () { return resolveDispatcher().useTransition(); }; - exports.version = "19.0.0-experimental-49496d49-20240814"; + exports.version = "19.0.0-experimental-1eaccd82-20240816"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/packages/next/src/compiled/react-experimental/cjs/react.production.js b/packages/next/src/compiled/react-experimental/cjs/react.production.js index 8132c34b11ae3..81e22ec6b224e 100644 --- a/packages/next/src/compiled/react-experimental/cjs/react.production.js +++ b/packages/next/src/compiled/react-experimental/cjs/react.production.js @@ -562,4 +562,4 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.0.0-experimental-49496d49-20240814"; +exports.version = "19.0.0-experimental-1eaccd82-20240816"; diff --git a/packages/next/src/compiled/react-experimental/cjs/react.react-server.development.js b/packages/next/src/compiled/react-experimental/cjs/react.react-server.development.js index 6f2067cc66a71..53b063d9ebb29 100644 --- a/packages/next/src/compiled/react-experimental/cjs/react.react-server.development.js +++ b/packages/next/src/compiled/react-experimental/cjs/react.react-server.development.js @@ -979,5 +979,5 @@ exports.useMemo = function (create, deps) { return resolveDispatcher().useMemo(create, deps); }; - exports.version = "19.0.0-experimental-49496d49-20240814"; + exports.version = "19.0.0-experimental-1eaccd82-20240816"; })(); diff --git a/packages/next/src/compiled/react-experimental/cjs/react.react-server.production.js b/packages/next/src/compiled/react-experimental/cjs/react.react-server.production.js index 91ea802a3e49a..80d58c1fcc6d2 100644 --- a/packages/next/src/compiled/react-experimental/cjs/react.react-server.production.js +++ b/packages/next/src/compiled/react-experimental/cjs/react.react-server.production.js @@ -567,4 +567,4 @@ exports.useId = function () { exports.useMemo = function (create, deps) { return ReactSharedInternals.H.useMemo(create, deps); }; -exports.version = "19.0.0-experimental-49496d49-20240814"; +exports.version = "19.0.0-experimental-1eaccd82-20240816"; diff --git a/packages/next/src/compiled/react-is/package.json b/packages/next/src/compiled/react-is/package.json index e4515b5bf0a26..ab42e227944d4 100644 --- a/packages/next/src/compiled/react-is/package.json +++ b/packages/next/src/compiled/react-is/package.json @@ -1,6 +1,6 @@ { "name": "react-is", - "version": "19.0.0-rc-49496d49-20240814", + "version": "19.0.0-rc-1eaccd82-20240816", "description": "Brand checking of React Elements.", "main": "index.js", "sideEffects": false, diff --git a/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.browser.development.js b/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.browser.development.js index ce658d71d4104..cceb1bf3ecdba 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.browser.development.js +++ b/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.browser.development.js @@ -206,12 +206,13 @@ maybeIterable["@@iterator"]; return "function" === typeof maybeIterable ? maybeIterable : null; } - function noop() {} + function noop$1() {} function trackUsedThenable(thenableState, thenable, index) { index = thenableState[index]; void 0 === index ? thenableState.push(thenable) - : index !== thenable && (thenable.then(noop, noop), (thenable = index)); + : index !== thenable && + (thenable.then(noop$1, noop$1), (thenable = index)); switch (thenable.status) { case "fulfilled": return thenable.value; @@ -219,7 +220,7 @@ throw thenable.reason; default: "string" === typeof thenable.status - ? thenable.then(noop, noop) + ? thenable.then(noop$1, noop$1) : ((thenableState = thenable), (thenableState.status = "pending"), thenableState.then( @@ -643,7 +644,9 @@ onPostpone, temporaryReferences, environmentName, - filterStackFrame + filterStackFrame, + onAllReady, + onFatalError ) { if ( null !== ReactSharedInternalsServer.A && @@ -684,6 +687,8 @@ this.onError = void 0 === onError ? defaultErrorHandler : onError; this.onPostpone = void 0 === onPostpone ? defaultPostponeHandler : onPostpone; + this.onAllReady = void 0 === onAllReady ? noop : onAllReady; + this.onFatalError = void 0 === onFatalError ? noop : onFatalError; this.environmentName = void 0 === environmentName ? function () { @@ -702,6 +707,7 @@ model = createTask(this, model, null, !1, abortSet, null, null, null); pingedTasks.push(model); } + function noop() {} function serializeThenable(request, task, thenable) { var newTask = createTask( request, @@ -972,6 +978,7 @@ var componentDebugInfo = { name: "", env: task.environmentName, + key: null, owner: task.debugOwner }; componentDebugInfo.stack = @@ -1008,6 +1015,7 @@ componentDebugInfo = { name: componentDebugInfo, env: componentEnv, + key: key, owner: task.debugOwner }; componentDebugInfo.stack = @@ -1210,6 +1218,7 @@ ((validated = { name: "Fragment", env: (0, request.environmentName)(), + key: key, owner: task.debugOwner, stack: null === task.debugStack @@ -1813,6 +1822,7 @@ (request = { name: value.name, env: value.env, + key: value.key, owner: value.owner }), (request.stack = value.stack), @@ -1974,6 +1984,8 @@ return errorDigest || ""; } function fatalError(request, error) { + var onFatalError = request.onFatalError; + onFatalError(error); cleanupTaintQueue(request); null !== request.destination ? ((request.status = CLOSED), @@ -2191,6 +2203,7 @@ ? ((request = { name: value.name, env: value.env, + key: value.key, owner: value.owner }), (request.stack = @@ -2423,6 +2436,10 @@ retryTask(request, pingedTasks[i]); null !== request.destination && flushCompletedChunks(request, request.destination); + if (0 === request.abortableTasks.size) { + var onAllReady = request.onAllReady; + onAllReady(); + } } catch (error) { logRecoverableError(request, error, null), fatalError(request, error); } finally { @@ -2512,6 +2529,19 @@ destination && flushCompletedChunks(request, destination); })); } + function startFlowing(request, destination) { + if (request.status === CLOSING) + (request.status = CLOSED), + closeWithError(destination, request.fatalError); + else if (request.status !== CLOSED && null === request.destination) { + request.destination = destination; + try { + flushCompletedChunks(request, destination); + } catch (error) { + logRecoverableError(request, error, null), fatalError(request, error); + } + } + } function abort(request, reason) { try { 0 === request.status && (request.status = ABORTING); @@ -3842,6 +3872,52 @@ close(body); return turbopackMap; }; + exports.prerender = function (model, turbopackMap, options) { + return new Promise(function (resolve, reject) { + var request = new RequestInstance( + model, + turbopackMap, + options ? options.onError : void 0, + options ? options.identifierPrefix : void 0, + options ? options.onPostpone : void 0, + options ? options.temporaryReferences : void 0, + options ? options.environmentName : void 0, + options ? options.filterStackFrame : void 0, + function () { + var stream = new ReadableStream( + { + type: "bytes", + start: function () { + startWork(request); + }, + pull: function (controller) { + startFlowing(request, controller); + }, + cancel: function (reason) { + request.destination = null; + abort(request, reason); + } + }, + { highWaterMark: 0 } + ); + resolve({ prelude: stream }); + }, + reject + ); + if (options && options.signal) { + var signal = options.signal; + if (signal.aborted) abort(request, signal.reason); + else { + var listener = function () { + abort(request, signal.reason); + signal.removeEventListener("abort", listener); + }; + signal.addEventListener("abort", listener); + } + } + startWork(request); + }); + }; exports.registerClientReference = function ( proxyImplementation, id, @@ -3873,7 +3949,9 @@ options ? options.onPostpone : void 0, options ? options.temporaryReferences : void 0, options ? options.environmentName : void 0, - options ? options.filterStackFrame : void 0 + options ? options.filterStackFrame : void 0, + void 0, + void 0 ); if (options && options.signal) { var signal = options.signal; @@ -3893,21 +3971,7 @@ startWork(request); }, pull: function (controller) { - if (request.status === CLOSING) - (request.status = CLOSED), - closeWithError(controller, request.fatalError); - else if ( - request.status !== CLOSED && - null === request.destination - ) { - request.destination = controller; - try { - flushCompletedChunks(request, controller); - } catch (error) { - logRecoverableError(request, error, null), - fatalError(request, error); - } - } + startFlowing(request, controller); }, cancel: function (reason) { request.destination = null; diff --git a/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.browser.production.js b/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.browser.production.js index e406b98dba70b..0bdac7d061335 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.browser.production.js +++ b/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.browser.production.js @@ -443,12 +443,12 @@ var ASYNC_ITERATOR = Symbol.asyncIterator, SuspenseException = Error( "Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`" ); -function noop() {} +function noop$1() {} function trackUsedThenable(thenableState, thenable, index) { index = thenableState[index]; void 0 === index ? thenableState.push(thenable) - : index !== thenable && (thenable.then(noop, noop), (thenable = index)); + : index !== thenable && (thenable.then(noop$1, noop$1), (thenable = index)); switch (thenable.status) { case "fulfilled": return thenable.value; @@ -456,7 +456,7 @@ function trackUsedThenable(thenableState, thenable, index) { throw thenable.reason; default: "string" === typeof thenable.status - ? thenable.then(noop, noop) + ? thenable.then(noop$1, noop$1) : ((thenableState = thenable), (thenableState.status = "pending"), thenableState.then( @@ -734,7 +734,11 @@ function RequestInstance( onError, identifierPrefix, onPostpone, - temporaryReferences + temporaryReferences, + environmentName, + filterStackFrame, + onAllReady, + onFatalError ) { if ( null !== ReactSharedInternalsServer.A && @@ -742,9 +746,9 @@ function RequestInstance( ) throw Error("Currently React only supports one RSC renderer at a time."); ReactSharedInternalsServer.A = DefaultAsyncDispatcher; - var abortSet = new Set(), - pingedTasks = [], - cleanupQueue = []; + filterStackFrame = new Set(); + environmentName = []; + var cleanupQueue = []; TaintRegistryPendingRequests.add(cleanupQueue); var hints = new Set(); this.status = 0; @@ -755,8 +759,8 @@ function RequestInstance( this.pendingChunks = this.nextChunkId = 0; this.hints = hints; this.abortListeners = new Set(); - this.abortableTasks = abortSet; - this.pingedTasks = pingedTasks; + this.abortableTasks = filterStackFrame; + this.pingedTasks = environmentName; this.completedImportChunks = []; this.completedHintChunks = []; this.completedRegularChunks = []; @@ -771,9 +775,12 @@ function RequestInstance( this.taintCleanupQueue = cleanupQueue; this.onError = void 0 === onError ? defaultErrorHandler : onError; this.onPostpone = void 0 === onPostpone ? defaultPostponeHandler : onPostpone; - model = createTask(this, model, null, !1, abortSet); - pingedTasks.push(model); + this.onAllReady = void 0 === onAllReady ? noop : onAllReady; + this.onFatalError = void 0 === onFatalError ? noop : onFatalError; + model = createTask(this, model, null, !1, filterStackFrame); + environmentName.push(model); } +function noop() {} var currentRequest = null; function serializeThenable(request, task, thenable) { var newTask = createTask( @@ -1678,6 +1685,8 @@ function logRecoverableError(request, error) { return errorDigest || ""; } function fatalError(request, error) { + var onFatalError = request.onFatalError; + onFatalError(error); cleanupTaintQueue(request); null !== request.destination ? ((request.status = 3), closeWithError(request.destination, error)) @@ -1852,6 +1861,10 @@ function performWork(request) { retryTask(request, pingedTasks[i]); null !== request.destination && flushCompletedChunks(request, request.destination); + if (0 === request.abortableTasks.size) { + var onAllReady = request.onAllReady; + onAllReady(); + } } catch (error) { logRecoverableError(request, error, null), fatalError(request, error); } finally { @@ -1918,6 +1931,18 @@ function enqueueFlush(request) { destination && flushCompletedChunks(request, destination); })); } +function startFlowing(request, destination) { + if (2 === request.status) + (request.status = 3), closeWithError(destination, request.fatalError); + else if (3 !== request.status && null === request.destination) { + request.destination = destination; + try { + flushCompletedChunks(request, destination); + } catch (error) { + logRecoverableError(request, error, null), fatalError(request, error); + } + } +} function abort(request, reason) { try { 0 === request.status && (request.status = 1); @@ -2749,6 +2774,52 @@ exports.decodeReply = function (body, turbopackMap, options) { close(body); return turbopackMap; }; +exports.prerender = function (model, turbopackMap, options) { + return new Promise(function (resolve, reject) { + var request = new RequestInstance( + model, + turbopackMap, + options ? options.onError : void 0, + options ? options.identifierPrefix : void 0, + options ? options.onPostpone : void 0, + options ? options.temporaryReferences : void 0, + void 0, + void 0, + function () { + var stream = new ReadableStream( + { + type: "bytes", + start: function () { + startWork(request); + }, + pull: function (controller) { + startFlowing(request, controller); + }, + cancel: function (reason) { + request.destination = null; + abort(request, reason); + } + }, + { highWaterMark: 0 } + ); + resolve({ prelude: stream }); + }, + reject + ); + if (options && options.signal) { + var signal = options.signal; + if (signal.aborted) abort(request, signal.reason); + else { + var listener = function () { + abort(request, signal.reason); + signal.removeEventListener("abort", listener); + }; + signal.addEventListener("abort", listener); + } + } + startWork(request); + }); +}; exports.registerClientReference = function ( proxyImplementation, id, @@ -2778,7 +2849,11 @@ exports.renderToReadableStream = function (model, turbopackMap, options) { options ? options.onError : void 0, options ? options.identifierPrefix : void 0, options ? options.onPostpone : void 0, - options ? options.temporaryReferences : void 0 + options ? options.temporaryReferences : void 0, + void 0, + void 0, + void 0, + void 0 ); if (options && options.signal) { var signal = options.signal; @@ -2798,17 +2873,7 @@ exports.renderToReadableStream = function (model, turbopackMap, options) { startWork(request); }, pull: function (controller) { - if (2 === request.status) - (request.status = 3), closeWithError(controller, request.fatalError); - else if (3 !== request.status && null === request.destination) { - request.destination = controller; - try { - flushCompletedChunks(request, controller); - } catch (error) { - logRecoverableError(request, error, null), - fatalError(request, error); - } - } + startFlowing(request, controller); }, cancel: function (reason) { request.destination = null; diff --git a/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.edge.development.js b/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.edge.development.js index 69f821f926c02..2c3781b94ab90 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.edge.development.js +++ b/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.edge.development.js @@ -202,12 +202,13 @@ maybeIterable["@@iterator"]; return "function" === typeof maybeIterable ? maybeIterable : null; } - function noop() {} + function noop$1() {} function trackUsedThenable(thenableState, thenable, index) { index = thenableState[index]; void 0 === index ? thenableState.push(thenable) - : index !== thenable && (thenable.then(noop, noop), (thenable = index)); + : index !== thenable && + (thenable.then(noop$1, noop$1), (thenable = index)); switch (thenable.status) { case "fulfilled": return thenable.value; @@ -215,7 +216,7 @@ throw thenable.reason; default: "string" === typeof thenable.status - ? thenable.then(noop, noop) + ? thenable.then(noop$1, noop$1) : ((thenableState = thenable), (thenableState.status = "pending"), thenableState.then( @@ -644,7 +645,9 @@ onPostpone, temporaryReferences, environmentName, - filterStackFrame + filterStackFrame, + onAllReady, + onFatalError ) { if ( null !== ReactSharedInternalsServer.A && @@ -685,6 +688,8 @@ this.onError = void 0 === onError ? defaultErrorHandler : onError; this.onPostpone = void 0 === onPostpone ? defaultPostponeHandler : onPostpone; + this.onAllReady = void 0 === onAllReady ? noop : onAllReady; + this.onFatalError = void 0 === onFatalError ? noop : onFatalError; this.environmentName = void 0 === environmentName ? function () { @@ -703,6 +708,7 @@ model = createTask(this, model, null, !1, abortSet, null, null, null); pingedTasks.push(model); } + function noop() {} function resolveRequest() { if (currentRequest) return currentRequest; if (supportsRequestStorage) { @@ -981,6 +987,7 @@ var componentDebugInfo = { name: "", env: task.environmentName, + key: null, owner: task.debugOwner }; componentDebugInfo.stack = @@ -1017,6 +1024,7 @@ componentDebugInfo = { name: componentDebugInfo, env: componentEnv, + key: key, owner: task.debugOwner }; componentDebugInfo.stack = @@ -1267,6 +1275,7 @@ ((validated = { name: "Fragment", env: (0, request.environmentName)(), + key: key, owner: task.debugOwner, stack: null === task.debugStack @@ -1870,6 +1879,7 @@ (request = { name: value.name, env: value.env, + key: value.key, owner: value.owner }), (request.stack = value.stack), @@ -2053,6 +2063,8 @@ return errorDigest || ""; } function fatalError(request, error) { + var onFatalError = request.onFatalError; + onFatalError(error); cleanupTaintQueue(request); null !== request.destination ? ((request.status = CLOSED), @@ -2270,6 +2282,7 @@ ? ((request = { name: value.name, env: value.env, + key: value.key, owner: value.owner }), (request.stack = @@ -2502,6 +2515,10 @@ retryTask(request, pingedTasks[i]); null !== request.destination && flushCompletedChunks(request, request.destination); + if (0 === request.abortableTasks.size) { + var onAllReady = request.onAllReady; + onAllReady(); + } } catch (error) { logRecoverableError(request, error, null), fatalError(request, error); } finally { @@ -2595,6 +2612,19 @@ destination && flushCompletedChunks(request, destination); }, 0)); } + function startFlowing(request, destination) { + if (request.status === CLOSING) + (request.status = CLOSED), + closeWithError(destination, request.fatalError); + else if (request.status !== CLOSED && null === request.destination) { + request.destination = destination; + try { + flushCompletedChunks(request, destination); + } catch (error) { + logRecoverableError(request, error, null), fatalError(request, error); + } + } + } function abort(request, reason) { try { 0 === request.status && (request.status = ABORTING); @@ -3940,6 +3970,52 @@ close(body); return turbopackMap; }; + exports.prerender = function (model, turbopackMap, options) { + return new Promise(function (resolve, reject) { + var request = new RequestInstance( + model, + turbopackMap, + options ? options.onError : void 0, + options ? options.identifierPrefix : void 0, + options ? options.onPostpone : void 0, + options ? options.temporaryReferences : void 0, + options ? options.environmentName : void 0, + options ? options.filterStackFrame : void 0, + function () { + var stream = new ReadableStream( + { + type: "bytes", + start: function () { + startWork(request); + }, + pull: function (controller) { + startFlowing(request, controller); + }, + cancel: function (reason) { + request.destination = null; + abort(request, reason); + } + }, + { highWaterMark: 0 } + ); + resolve({ prelude: stream }); + }, + reject + ); + if (options && options.signal) { + var signal = options.signal; + if (signal.aborted) abort(request, signal.reason); + else { + var listener = function () { + abort(request, signal.reason); + signal.removeEventListener("abort", listener); + }; + signal.addEventListener("abort", listener); + } + } + startWork(request); + }); + }; exports.registerClientReference = function ( proxyImplementation, id, @@ -3982,7 +4058,9 @@ const setTimeoutOrImmediate = options ? options.onPostpone : void 0, options ? options.temporaryReferences : void 0, options ? options.environmentName : void 0, - options ? options.filterStackFrame : void 0 + options ? options.filterStackFrame : void 0, + void 0, + void 0 ); if (options && options.signal) { var signal = options.signal; @@ -4002,21 +4080,7 @@ const setTimeoutOrImmediate = startWork(request); }, pull: function (controller) { - if (request.status === CLOSING) - (request.status = CLOSED), - closeWithError(controller, request.fatalError); - else if ( - request.status !== CLOSED && - null === request.destination - ) { - request.destination = controller; - try { - flushCompletedChunks(request, controller); - } catch (error) { - logRecoverableError(request, error, null), - fatalError(request, error); - } - } + startFlowing(request, controller); }, cancel: function (reason) { request.destination = null; diff --git a/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.edge.production.js b/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.edge.production.js index 0ae6251815ab9..582ddf068d0e4 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.edge.production.js +++ b/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.edge.production.js @@ -441,12 +441,12 @@ var ASYNC_ITERATOR = Symbol.asyncIterator, SuspenseException = Error( "Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`" ); -function noop() {} +function noop$1() {} function trackUsedThenable(thenableState, thenable, index) { index = thenableState[index]; void 0 === index ? thenableState.push(thenable) - : index !== thenable && (thenable.then(noop, noop), (thenable = index)); + : index !== thenable && (thenable.then(noop$1, noop$1), (thenable = index)); switch (thenable.status) { case "fulfilled": return thenable.value; @@ -454,7 +454,7 @@ function trackUsedThenable(thenableState, thenable, index) { throw thenable.reason; default: "string" === typeof thenable.status - ? thenable.then(noop, noop) + ? thenable.then(noop$1, noop$1) : ((thenableState = thenable), (thenableState.status = "pending"), thenableState.then( @@ -731,7 +731,11 @@ function RequestInstance( onError, identifierPrefix, onPostpone, - temporaryReferences + temporaryReferences, + environmentName, + filterStackFrame, + onAllReady, + onFatalError ) { if ( null !== ReactSharedInternalsServer.A && @@ -739,9 +743,9 @@ function RequestInstance( ) throw Error("Currently React only supports one RSC renderer at a time."); ReactSharedInternalsServer.A = DefaultAsyncDispatcher; - var abortSet = new Set(), - pingedTasks = [], - cleanupQueue = []; + filterStackFrame = new Set(); + environmentName = []; + var cleanupQueue = []; TaintRegistryPendingRequests.add(cleanupQueue); var hints = new Set(); this.status = 0; @@ -752,8 +756,8 @@ function RequestInstance( this.pendingChunks = this.nextChunkId = 0; this.hints = hints; this.abortListeners = new Set(); - this.abortableTasks = abortSet; - this.pingedTasks = pingedTasks; + this.abortableTasks = filterStackFrame; + this.pingedTasks = environmentName; this.completedImportChunks = []; this.completedHintChunks = []; this.completedRegularChunks = []; @@ -768,9 +772,12 @@ function RequestInstance( this.taintCleanupQueue = cleanupQueue; this.onError = void 0 === onError ? defaultErrorHandler : onError; this.onPostpone = void 0 === onPostpone ? defaultPostponeHandler : onPostpone; - model = createTask(this, model, null, !1, abortSet); - pingedTasks.push(model); + this.onAllReady = void 0 === onAllReady ? noop : onAllReady; + this.onFatalError = void 0 === onFatalError ? noop : onFatalError; + model = createTask(this, model, null, !1, filterStackFrame); + environmentName.push(model); } +function noop() {} var currentRequest = null; function resolveRequest() { if (currentRequest) return currentRequest; @@ -1687,6 +1694,8 @@ function logRecoverableError(request, error) { return errorDigest || ""; } function fatalError(request, error) { + var onFatalError = request.onFatalError; + onFatalError(error); cleanupTaintQueue(request); null !== request.destination ? ((request.status = 3), closeWithError(request.destination, error)) @@ -1861,6 +1870,10 @@ function performWork(request) { retryTask(request, pingedTasks[i]); null !== request.destination && flushCompletedChunks(request, request.destination); + if (0 === request.abortableTasks.size) { + var onAllReady = request.onAllReady; + onAllReady(); + } } catch (error) { logRecoverableError(request, error, null), fatalError(request, error); } finally { @@ -1931,6 +1944,18 @@ function enqueueFlush(request) { destination && flushCompletedChunks(request, destination); }, 0)); } +function startFlowing(request, destination) { + if (2 === request.status) + (request.status = 3), closeWithError(destination, request.fatalError); + else if (3 !== request.status && null === request.destination) { + request.destination = destination; + try { + flushCompletedChunks(request, destination); + } catch (error) { + logRecoverableError(request, error, null), fatalError(request, error); + } + } +} function abort(request, reason) { try { 0 === request.status && (request.status = 1); @@ -2762,6 +2787,52 @@ exports.decodeReply = function (body, turbopackMap, options) { close(body); return turbopackMap; }; +exports.prerender = function (model, turbopackMap, options) { + return new Promise(function (resolve, reject) { + var request = new RequestInstance( + model, + turbopackMap, + options ? options.onError : void 0, + options ? options.identifierPrefix : void 0, + options ? options.onPostpone : void 0, + options ? options.temporaryReferences : void 0, + void 0, + void 0, + function () { + var stream = new ReadableStream( + { + type: "bytes", + start: function () { + startWork(request); + }, + pull: function (controller) { + startFlowing(request, controller); + }, + cancel: function (reason) { + request.destination = null; + abort(request, reason); + } + }, + { highWaterMark: 0 } + ); + resolve({ prelude: stream }); + }, + reject + ); + if (options && options.signal) { + var signal = options.signal; + if (signal.aborted) abort(request, signal.reason); + else { + var listener = function () { + abort(request, signal.reason); + signal.removeEventListener("abort", listener); + }; + signal.addEventListener("abort", listener); + } + } + startWork(request); + }); +}; exports.registerClientReference = function ( proxyImplementation, id, @@ -2802,7 +2873,11 @@ exports.renderToReadableStream = function (model, turbopackMap, options) { options ? options.onError : void 0, options ? options.identifierPrefix : void 0, options ? options.onPostpone : void 0, - options ? options.temporaryReferences : void 0 + options ? options.temporaryReferences : void 0, + void 0, + void 0, + void 0, + void 0 ); if (options && options.signal) { var signal = options.signal; @@ -2822,17 +2897,7 @@ exports.renderToReadableStream = function (model, turbopackMap, options) { startWork(request); }, pull: function (controller) { - if (2 === request.status) - (request.status = 3), closeWithError(controller, request.fatalError); - else if (3 !== request.status && null === request.destination) { - request.destination = controller; - try { - flushCompletedChunks(request, controller); - } catch (error) { - logRecoverableError(request, error, null), - fatalError(request, error); - } - } + startFlowing(request, controller); }, cancel: function (reason) { request.destination = null; diff --git a/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.node.development.js b/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.node.development.js index 3ef0183102e93..81fc9706d5a1b 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.node.development.js +++ b/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.node.development.js @@ -229,12 +229,13 @@ maybeIterable["@@iterator"]; return "function" === typeof maybeIterable ? maybeIterable : null; } - function noop() {} + function noop$1() {} function trackUsedThenable(thenableState, thenable, index) { index = thenableState[index]; void 0 === index ? thenableState.push(thenable) - : index !== thenable && (thenable.then(noop, noop), (thenable = index)); + : index !== thenable && + (thenable.then(noop$1, noop$1), (thenable = index)); switch (thenable.status) { case "fulfilled": return thenable.value; @@ -242,7 +243,7 @@ throw thenable.reason; default: "string" === typeof thenable.status - ? thenable.then(noop, noop) + ? thenable.then(noop$1, noop$1) : ((thenableState = thenable), (thenableState.status = "pending"), thenableState.then( @@ -668,7 +669,9 @@ onPostpone, temporaryReferences, environmentName, - filterStackFrame + filterStackFrame, + onAllReady, + onFatalError ) { if ( null !== ReactSharedInternalsServer.A && @@ -709,6 +712,8 @@ this.onError = void 0 === onError ? defaultErrorHandler : onError; this.onPostpone = void 0 === onPostpone ? defaultPostponeHandler : onPostpone; + this.onAllReady = void 0 === onAllReady ? noop : onAllReady; + this.onFatalError = void 0 === onFatalError ? noop : onFatalError; this.environmentName = void 0 === environmentName ? function () { @@ -727,6 +732,7 @@ model = createTask(this, model, null, !1, abortSet, null, null, null); pingedTasks.push(model); } + function noop() {} function resolveRequest() { if (currentRequest) return currentRequest; var store = requestStorage.getStore(); @@ -1001,6 +1007,7 @@ var componentDebugInfo = { name: "", env: task.environmentName, + key: null, owner: task.debugOwner }; componentDebugInfo.stack = @@ -1037,6 +1044,7 @@ componentDebugInfo = { name: componentDebugInfo, env: componentEnv, + key: key, owner: task.debugOwner }; componentDebugInfo.stack = @@ -1265,6 +1273,7 @@ ((validated = { name: "Fragment", env: (0, request.environmentName)(), + key: key, owner: task.debugOwner, stack: null === task.debugStack @@ -1866,6 +1875,7 @@ (request = { name: value.name, env: value.env, + key: value.key, owner: value.owner }), (request.stack = value.stack), @@ -2041,6 +2051,8 @@ return errorDigest || ""; } function fatalError(request, error) { + var onFatalError = request.onFatalError; + onFatalError(error); cleanupTaintQueue(request); null !== request.destination ? ((request.status = CLOSED), request.destination.destroy(error)) @@ -2249,6 +2261,7 @@ ? ((request = { name: value.name, env: value.env, + key: value.key, owner: value.owner }), (request.stack = @@ -2479,6 +2492,10 @@ retryTask(request, pingedTasks[i]); null !== request.destination && flushCompletedChunks(request, request.destination); + if (0 === request.abortableTasks.size) { + var onAllReady = request.onAllReady; + onAllReady(); + } } catch (error) { logRecoverableError(request, error, null), fatalError(request, error); } finally { @@ -3406,7 +3423,21 @@ abort(request, Error(reason)); }; } - var util = require("util"); + function createFakeWritable(readable) { + return { + write: function (chunk) { + return readable.push(chunk); + }, + end: function () { + readable.push(null); + }, + destroy: function (error) { + readable.destroy(error); + } + }; + } + var stream = require("stream"), + util = require("util"); require("crypto"); var async_hooks = require("async_hooks"), ReactDOM = require("react-dom"), @@ -3985,6 +4016,42 @@ }); return getChunk(response, 0); }; + exports.prerenderToNodeStream = function (model, turbopackMap, options) { + return new Promise(function (resolve, reject) { + var request = new RequestInstance( + model, + turbopackMap, + options ? options.onError : void 0, + options ? options.identifierPrefix : void 0, + options ? options.onPostpone : void 0, + options ? options.temporaryReferences : void 0, + options ? options.environmentName : void 0, + options ? options.filterStackFrame : void 0, + function () { + var readable = new stream.Readable({ + read: function () { + startFlowing(request, writable); + } + }), + writable = createFakeWritable(readable); + resolve({ prelude: readable }); + }, + reject + ); + if (options && options.signal) { + var signal = options.signal; + if (signal.aborted) abort(request, signal.reason); + else { + var listener = function () { + abort(request, signal.reason); + signal.removeEventListener("abort", listener); + }; + signal.addEventListener("abort", listener); + } + } + startWork(request); + }); + }; exports.registerClientReference = function ( proxyImplementation, id, @@ -4016,7 +4083,9 @@ options ? options.onPostpone : void 0, options ? options.temporaryReferences : void 0, options ? options.environmentName : void 0, - options ? options.filterStackFrame : void 0 + options ? options.filterStackFrame : void 0, + void 0, + void 0 ), hasStartedFlowing = !1; startWork(request); diff --git a/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.node.production.js b/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.node.production.js index aeb9846b77b76..2263de6fb9eee 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.node.production.js +++ b/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.node.production.js @@ -9,7 +9,8 @@ */ "use strict"; -var util = require("util"); +var stream = require("stream"), + util = require("util"); require("crypto"); var async_hooks = require("async_hooks"), ReactDOM = require("react-dom"), @@ -460,12 +461,12 @@ var ASYNC_ITERATOR = Symbol.asyncIterator, SuspenseException = Error( "Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`" ); -function noop() {} +function noop$1() {} function trackUsedThenable(thenableState, thenable, index) { index = thenableState[index]; void 0 === index ? thenableState.push(thenable) - : index !== thenable && (thenable.then(noop, noop), (thenable = index)); + : index !== thenable && (thenable.then(noop$1, noop$1), (thenable = index)); switch (thenable.status) { case "fulfilled": return thenable.value; @@ -473,7 +474,7 @@ function trackUsedThenable(thenableState, thenable, index) { throw thenable.reason; default: "string" === typeof thenable.status - ? thenable.then(noop, noop) + ? thenable.then(noop$1, noop$1) : ((thenableState = thenable), (thenableState.status = "pending"), thenableState.then( @@ -750,7 +751,11 @@ function RequestInstance( onError, identifierPrefix, onPostpone, - temporaryReferences + temporaryReferences, + environmentName, + filterStackFrame, + onAllReady, + onFatalError ) { if ( null !== ReactSharedInternalsServer.A && @@ -758,9 +763,9 @@ function RequestInstance( ) throw Error("Currently React only supports one RSC renderer at a time."); ReactSharedInternalsServer.A = DefaultAsyncDispatcher; - var abortSet = new Set(), - pingedTasks = [], - cleanupQueue = []; + filterStackFrame = new Set(); + environmentName = []; + var cleanupQueue = []; TaintRegistryPendingRequests.add(cleanupQueue); var hints = new Set(); this.status = 0; @@ -771,8 +776,8 @@ function RequestInstance( this.pendingChunks = this.nextChunkId = 0; this.hints = hints; this.abortListeners = new Set(); - this.abortableTasks = abortSet; - this.pingedTasks = pingedTasks; + this.abortableTasks = filterStackFrame; + this.pingedTasks = environmentName; this.completedImportChunks = []; this.completedHintChunks = []; this.completedRegularChunks = []; @@ -787,9 +792,12 @@ function RequestInstance( this.taintCleanupQueue = cleanupQueue; this.onError = void 0 === onError ? defaultErrorHandler : onError; this.onPostpone = void 0 === onPostpone ? defaultPostponeHandler : onPostpone; - model = createTask(this, model, null, !1, abortSet); - pingedTasks.push(model); + this.onAllReady = void 0 === onAllReady ? noop : onAllReady; + this.onFatalError = void 0 === onFatalError ? noop : onFatalError; + model = createTask(this, model, null, !1, filterStackFrame); + environmentName.push(model); } +function noop() {} var currentRequest = null; function resolveRequest() { if (currentRequest) return currentRequest; @@ -1694,6 +1702,8 @@ function logRecoverableError(request, error) { return errorDigest || ""; } function fatalError(request, error) { + var onFatalError = request.onFatalError; + onFatalError(error); cleanupTaintQueue(request); null !== request.destination ? ((request.status = 3), request.destination.destroy(error)) @@ -1861,6 +1871,10 @@ function performWork(request) { retryTask(request, pingedTasks[i]); null !== request.destination && flushCompletedChunks(request, request.destination); + if (0 === request.abortableTasks.size) { + var onAllReady = request.onAllReady; + onAllReady(); + } } catch (error) { logRecoverableError(request, error, null), fatalError(request, error); } finally { @@ -2753,6 +2767,19 @@ function createCancelHandler(request, reason) { abort(request, Error(reason)); }; } +function createFakeWritable(readable) { + return { + write: function (chunk) { + return readable.push(chunk); + }, + end: function () { + readable.push(null); + }, + destroy: function (error) { + readable.destroy(error); + } + }; +} exports.createClientModuleProxy = function (moduleId) { moduleId = registerClientReferenceImpl({}, moduleId, !1); return new Proxy(moduleId, proxyHandlers$1); @@ -2859,6 +2886,42 @@ exports.decodeReplyFromBusboy = function (busboyStream, turbopackMap, options) { }); return getChunk(response, 0); }; +exports.prerenderToNodeStream = function (model, turbopackMap, options) { + return new Promise(function (resolve, reject) { + var request = new RequestInstance( + model, + turbopackMap, + options ? options.onError : void 0, + options ? options.identifierPrefix : void 0, + options ? options.onPostpone : void 0, + options ? options.temporaryReferences : void 0, + void 0, + void 0, + function () { + var readable = new stream.Readable({ + read: function () { + startFlowing(request, writable); + } + }), + writable = createFakeWritable(readable); + resolve({ prelude: readable }); + }, + reject + ); + if (options && options.signal) { + var signal = options.signal; + if (signal.aborted) abort(request, signal.reason); + else { + var listener = function () { + abort(request, signal.reason); + signal.removeEventListener("abort", listener); + }; + signal.addEventListener("abort", listener); + } + } + startWork(request); + }); +}; exports.registerClientReference = function ( proxyImplementation, id, @@ -2888,7 +2951,11 @@ exports.renderToPipeableStream = function (model, turbopackMap, options) { options ? options.onError : void 0, options ? options.identifierPrefix : void 0, options ? options.onPostpone : void 0, - options ? options.temporaryReferences : void 0 + options ? options.temporaryReferences : void 0, + void 0, + void 0, + void 0, + void 0 ), hasStartedFlowing = !1; startWork(request); diff --git a/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.node.unbundled.development.js b/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.node.unbundled.development.js index 1bb42c1c90b09..9184d8e2dee32 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.node.unbundled.development.js +++ b/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.node.unbundled.development.js @@ -229,12 +229,13 @@ maybeIterable["@@iterator"]; return "function" === typeof maybeIterable ? maybeIterable : null; } - function noop() {} + function noop$1() {} function trackUsedThenable(thenableState, thenable, index) { index = thenableState[index]; void 0 === index ? thenableState.push(thenable) - : index !== thenable && (thenable.then(noop, noop), (thenable = index)); + : index !== thenable && + (thenable.then(noop$1, noop$1), (thenable = index)); switch (thenable.status) { case "fulfilled": return thenable.value; @@ -242,7 +243,7 @@ throw thenable.reason; default: "string" === typeof thenable.status - ? thenable.then(noop, noop) + ? thenable.then(noop$1, noop$1) : ((thenableState = thenable), (thenableState.status = "pending"), thenableState.then( @@ -668,7 +669,9 @@ onPostpone, temporaryReferences, environmentName, - filterStackFrame + filterStackFrame, + onAllReady, + onFatalError ) { if ( null !== ReactSharedInternalsServer.A && @@ -709,6 +712,8 @@ this.onError = void 0 === onError ? defaultErrorHandler : onError; this.onPostpone = void 0 === onPostpone ? defaultPostponeHandler : onPostpone; + this.onAllReady = void 0 === onAllReady ? noop : onAllReady; + this.onFatalError = void 0 === onFatalError ? noop : onFatalError; this.environmentName = void 0 === environmentName ? function () { @@ -727,6 +732,7 @@ model = createTask(this, model, null, !1, abortSet, null, null, null); pingedTasks.push(model); } + function noop() {} function resolveRequest() { if (currentRequest) return currentRequest; var store = requestStorage.getStore(); @@ -1001,6 +1007,7 @@ var componentDebugInfo = { name: "", env: task.environmentName, + key: null, owner: task.debugOwner }; componentDebugInfo.stack = @@ -1037,6 +1044,7 @@ componentDebugInfo = { name: componentDebugInfo, env: componentEnv, + key: key, owner: task.debugOwner }; componentDebugInfo.stack = @@ -1265,6 +1273,7 @@ ((validated = { name: "Fragment", env: (0, request.environmentName)(), + key: key, owner: task.debugOwner, stack: null === task.debugStack @@ -1866,6 +1875,7 @@ (request = { name: value.name, env: value.env, + key: value.key, owner: value.owner }), (request.stack = value.stack), @@ -2041,6 +2051,8 @@ return errorDigest || ""; } function fatalError(request, error) { + var onFatalError = request.onFatalError; + onFatalError(error); cleanupTaintQueue(request); null !== request.destination ? ((request.status = CLOSED), request.destination.destroy(error)) @@ -2249,6 +2261,7 @@ ? ((request = { name: value.name, env: value.env, + key: value.key, owner: value.owner }), (request.stack = @@ -2479,6 +2492,10 @@ retryTask(request, pingedTasks[i]); null !== request.destination && flushCompletedChunks(request, request.destination); + if (0 === request.abortableTasks.size) { + var onAllReady = request.onAllReady; + onAllReady(); + } } catch (error) { logRecoverableError(request, error, null), fatalError(request, error); } finally { @@ -3372,7 +3389,21 @@ abort(request, Error(reason)); }; } - var util = require("util"); + function createFakeWritable(readable) { + return { + write: function (chunk) { + return readable.push(chunk); + }, + end: function () { + readable.push(null); + }, + destroy: function (error) { + readable.destroy(error); + } + }; + } + var stream = require("stream"), + util = require("util"); require("crypto"); var async_hooks = require("async_hooks"), ReactDOM = require("react-dom"), @@ -3951,6 +3982,42 @@ }); return getChunk(response, 0); }; + exports.prerenderToNodeStream = function (model, turbopackMap, options) { + return new Promise(function (resolve, reject) { + var request = new RequestInstance( + model, + turbopackMap, + options ? options.onError : void 0, + options ? options.identifierPrefix : void 0, + options ? options.onPostpone : void 0, + options ? options.temporaryReferences : void 0, + options ? options.environmentName : void 0, + options ? options.filterStackFrame : void 0, + function () { + var readable = new stream.Readable({ + read: function () { + startFlowing(request, writable); + } + }), + writable = createFakeWritable(readable); + resolve({ prelude: readable }); + }, + reject + ); + if (options && options.signal) { + var signal = options.signal; + if (signal.aborted) abort(request, signal.reason); + else { + var listener = function () { + abort(request, signal.reason); + signal.removeEventListener("abort", listener); + }; + signal.addEventListener("abort", listener); + } + } + startWork(request); + }); + }; exports.registerClientReference = function ( proxyImplementation, id, @@ -3982,7 +4049,9 @@ options ? options.onPostpone : void 0, options ? options.temporaryReferences : void 0, options ? options.environmentName : void 0, - options ? options.filterStackFrame : void 0 + options ? options.filterStackFrame : void 0, + void 0, + void 0 ), hasStartedFlowing = !1; startWork(request); diff --git a/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.node.unbundled.production.js b/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.node.unbundled.production.js index 1d94eefe6bea7..16439ffdd5b3f 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.node.unbundled.production.js +++ b/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.node.unbundled.production.js @@ -9,7 +9,8 @@ */ "use strict"; -var util = require("util"); +var stream = require("stream"), + util = require("util"); require("crypto"); var async_hooks = require("async_hooks"), ReactDOM = require("react-dom"), @@ -460,12 +461,12 @@ var ASYNC_ITERATOR = Symbol.asyncIterator, SuspenseException = Error( "Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`" ); -function noop() {} +function noop$1() {} function trackUsedThenable(thenableState, thenable, index) { index = thenableState[index]; void 0 === index ? thenableState.push(thenable) - : index !== thenable && (thenable.then(noop, noop), (thenable = index)); + : index !== thenable && (thenable.then(noop$1, noop$1), (thenable = index)); switch (thenable.status) { case "fulfilled": return thenable.value; @@ -473,7 +474,7 @@ function trackUsedThenable(thenableState, thenable, index) { throw thenable.reason; default: "string" === typeof thenable.status - ? thenable.then(noop, noop) + ? thenable.then(noop$1, noop$1) : ((thenableState = thenable), (thenableState.status = "pending"), thenableState.then( @@ -750,7 +751,11 @@ function RequestInstance( onError, identifierPrefix, onPostpone, - temporaryReferences + temporaryReferences, + environmentName, + filterStackFrame, + onAllReady, + onFatalError ) { if ( null !== ReactSharedInternalsServer.A && @@ -758,9 +763,9 @@ function RequestInstance( ) throw Error("Currently React only supports one RSC renderer at a time."); ReactSharedInternalsServer.A = DefaultAsyncDispatcher; - var abortSet = new Set(), - pingedTasks = [], - cleanupQueue = []; + filterStackFrame = new Set(); + environmentName = []; + var cleanupQueue = []; TaintRegistryPendingRequests.add(cleanupQueue); var hints = new Set(); this.status = 0; @@ -771,8 +776,8 @@ function RequestInstance( this.pendingChunks = this.nextChunkId = 0; this.hints = hints; this.abortListeners = new Set(); - this.abortableTasks = abortSet; - this.pingedTasks = pingedTasks; + this.abortableTasks = filterStackFrame; + this.pingedTasks = environmentName; this.completedImportChunks = []; this.completedHintChunks = []; this.completedRegularChunks = []; @@ -787,9 +792,12 @@ function RequestInstance( this.taintCleanupQueue = cleanupQueue; this.onError = void 0 === onError ? defaultErrorHandler : onError; this.onPostpone = void 0 === onPostpone ? defaultPostponeHandler : onPostpone; - model = createTask(this, model, null, !1, abortSet); - pingedTasks.push(model); + this.onAllReady = void 0 === onAllReady ? noop : onAllReady; + this.onFatalError = void 0 === onFatalError ? noop : onFatalError; + model = createTask(this, model, null, !1, filterStackFrame); + environmentName.push(model); } +function noop() {} var currentRequest = null; function resolveRequest() { if (currentRequest) return currentRequest; @@ -1694,6 +1702,8 @@ function logRecoverableError(request, error) { return errorDigest || ""; } function fatalError(request, error) { + var onFatalError = request.onFatalError; + onFatalError(error); cleanupTaintQueue(request); null !== request.destination ? ((request.status = 3), request.destination.destroy(error)) @@ -1861,6 +1871,10 @@ function performWork(request) { retryTask(request, pingedTasks[i]); null !== request.destination && flushCompletedChunks(request, request.destination); + if (0 === request.abortableTasks.size) { + var onAllReady = request.onAllReady; + onAllReady(); + } } catch (error) { logRecoverableError(request, error, null), fatalError(request, error); } finally { @@ -2722,6 +2736,19 @@ function createCancelHandler(request, reason) { abort(request, Error(reason)); }; } +function createFakeWritable(readable) { + return { + write: function (chunk) { + return readable.push(chunk); + }, + end: function () { + readable.push(null); + }, + destroy: function (error) { + readable.destroy(error); + } + }; +} exports.createClientModuleProxy = function (moduleId) { moduleId = registerClientReferenceImpl({}, moduleId, !1); return new Proxy(moduleId, proxyHandlers$1); @@ -2828,6 +2855,42 @@ exports.decodeReplyFromBusboy = function (busboyStream, turbopackMap, options) { }); return getChunk(response, 0); }; +exports.prerenderToNodeStream = function (model, turbopackMap, options) { + return new Promise(function (resolve, reject) { + var request = new RequestInstance( + model, + turbopackMap, + options ? options.onError : void 0, + options ? options.identifierPrefix : void 0, + options ? options.onPostpone : void 0, + options ? options.temporaryReferences : void 0, + void 0, + void 0, + function () { + var readable = new stream.Readable({ + read: function () { + startFlowing(request, writable); + } + }), + writable = createFakeWritable(readable); + resolve({ prelude: readable }); + }, + reject + ); + if (options && options.signal) { + var signal = options.signal; + if (signal.aborted) abort(request, signal.reason); + else { + var listener = function () { + abort(request, signal.reason); + signal.removeEventListener("abort", listener); + }; + signal.addEventListener("abort", listener); + } + } + startWork(request); + }); +}; exports.registerClientReference = function ( proxyImplementation, id, @@ -2857,7 +2920,11 @@ exports.renderToPipeableStream = function (model, turbopackMap, options) { options ? options.onError : void 0, options ? options.identifierPrefix : void 0, options ? options.onPostpone : void 0, - options ? options.temporaryReferences : void 0 + options ? options.temporaryReferences : void 0, + void 0, + void 0, + void 0, + void 0 ), hasStartedFlowing = !1; startWork(request); diff --git a/packages/next/src/compiled/react-server-dom-turbopack-experimental/package.json b/packages/next/src/compiled/react-server-dom-turbopack-experimental/package.json index ab3a0e63b678d..4b438fbc8c5c6 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack-experimental/package.json +++ b/packages/next/src/compiled/react-server-dom-turbopack-experimental/package.json @@ -38,6 +38,24 @@ "./server.edge": "./server.edge.js", "./server.node": "./server.node.js", "./server.node.unbundled": "./server.node.unbundled.js", + "./static": { + "react-server": { + "workerd": "./static.edge.js", + "deno": "./static.browser.js", + "node": { + "turbopack": "./static.node.js", + "webpack": "./static.node.js", + "default": "./static.node.unbundled.js" + }, + "edge-light": "./static.edge.js", + "browser": "./static.browser.js" + }, + "default": "./static.js" + }, + "./static.browser": "./static.browser.js", + "./static.edge": "./static.edge.js", + "./static.node": "./static.node.js", + "./static.node.unbundled": "./static.node.unbundled.js", "./node-loader": "./esm/react-server-dom-turbopack-node-loader.production.js", "./node-register": "./node-register.js", "./package.json": "./package.json" @@ -47,7 +65,7 @@ "neo-async": "^2.6.1" }, "peerDependencies": { - "react": "0.0.0-experimental-49496d49-20240814", - "react-dom": "0.0.0-experimental-49496d49-20240814" + "react": "0.0.0-experimental-1eaccd82-20240816", + "react-dom": "0.0.0-experimental-1eaccd82-20240816" } } \ No newline at end of file diff --git a/packages/next/src/compiled/react-server-dom-turbopack-experimental/server.browser.js b/packages/next/src/compiled/react-server-dom-turbopack-experimental/server.browser.js index 1d0364c5d392b..ec8d6b013e0bd 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack-experimental/server.browser.js +++ b/packages/next/src/compiled/react-server-dom-turbopack-experimental/server.browser.js @@ -1,7 +1,17 @@ 'use strict'; +var s; if (process.env.NODE_ENV === 'production') { - module.exports = require('./cjs/react-server-dom-turbopack-server.browser.production.js'); + s = require('./cjs/react-server-dom-turbopack-server.browser.production.js'); } else { - module.exports = require('./cjs/react-server-dom-turbopack-server.browser.development.js'); + s = require('./cjs/react-server-dom-turbopack-server.browser.development.js'); } + +exports.renderToReadableStream = s.renderToReadableStream; +exports.decodeReply = s.decodeReply; +exports.decodeAction = s.decodeAction; +exports.decodeFormState = s.decodeFormState; +exports.registerServerReference = s.registerServerReference; +exports.registerClientReference = s.registerClientReference; +exports.createClientModuleProxy = s.createClientModuleProxy; +exports.createTemporaryReferenceSet = s.createTemporaryReferenceSet; diff --git a/packages/next/src/compiled/react-server-dom-turbopack-experimental/server.edge.js b/packages/next/src/compiled/react-server-dom-turbopack-experimental/server.edge.js index c893cc3cdfa6e..e34b18fa0156a 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack-experimental/server.edge.js +++ b/packages/next/src/compiled/react-server-dom-turbopack-experimental/server.edge.js @@ -1,7 +1,17 @@ 'use strict'; +var s; if (process.env.NODE_ENV === 'production') { - module.exports = require('./cjs/react-server-dom-turbopack-server.edge.production.js'); + s = require('./cjs/react-server-dom-turbopack-server.edge.production.js'); } else { - module.exports = require('./cjs/react-server-dom-turbopack-server.edge.development.js'); + s = require('./cjs/react-server-dom-turbopack-server.edge.development.js'); } + +exports.renderToReadableStream = s.renderToReadableStream; +exports.decodeReply = s.decodeReply; +exports.decodeAction = s.decodeAction; +exports.decodeFormState = s.decodeFormState; +exports.registerServerReference = s.registerServerReference; +exports.registerClientReference = s.registerClientReference; +exports.createClientModuleProxy = s.createClientModuleProxy; +exports.createTemporaryReferenceSet = s.createTemporaryReferenceSet; diff --git a/packages/next/src/compiled/react-server-dom-turbopack-experimental/server.node.js b/packages/next/src/compiled/react-server-dom-turbopack-experimental/server.node.js index ac6128983dc6b..f9a4cf31f6e8c 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack-experimental/server.node.js +++ b/packages/next/src/compiled/react-server-dom-turbopack-experimental/server.node.js @@ -1,7 +1,18 @@ 'use strict'; +var s; if (process.env.NODE_ENV === 'production') { - module.exports = require('./cjs/react-server-dom-turbopack-server.node.production.js'); + s = require('./cjs/react-server-dom-turbopack-server.node.production.js'); } else { - module.exports = require('./cjs/react-server-dom-turbopack-server.node.development.js'); + s = require('./cjs/react-server-dom-turbopack-server.node.development.js'); } + +exports.renderToPipeableStream = s.renderToPipeableStream; +exports.decodeReplyFromBusboy = s.decodeReplyFromBusboy; +exports.decodeReply = s.decodeReply; +exports.decodeAction = s.decodeAction; +exports.decodeFormState = s.decodeFormState; +exports.registerServerReference = s.registerServerReference; +exports.registerClientReference = s.registerClientReference; +exports.createClientModuleProxy = s.createClientModuleProxy; +exports.createTemporaryReferenceSet = s.createTemporaryReferenceSet; diff --git a/packages/next/src/compiled/react-server-dom-turbopack-experimental/server.node.unbundled.js b/packages/next/src/compiled/react-server-dom-turbopack-experimental/server.node.unbundled.js index 86f9dcdefb1d7..1e8648ccef133 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack-experimental/server.node.unbundled.js +++ b/packages/next/src/compiled/react-server-dom-turbopack-experimental/server.node.unbundled.js @@ -1,7 +1,18 @@ 'use strict'; +var s; if (process.env.NODE_ENV === 'production') { - module.exports = require('./cjs/react-server-dom-turbopack-server.node.unbundled.production.js'); + s = require('./cjs/react-server-dom-turbopack-server.node.unbundled.production.js'); } else { - module.exports = require('./cjs/react-server-dom-turbopack-server.node.unbundled.development.js'); + s = require('./cjs/react-server-dom-turbopack-server.node.unbundled.development.js'); } + +exports.renderToPipeableStream = s.renderToPipeableStream; +exports.decodeReplyFromBusboy = s.decodeReplyFromBusboy; +exports.decodeReply = s.decodeReply; +exports.decodeAction = s.decodeAction; +exports.decodeFormState = s.decodeFormState; +exports.registerServerReference = s.registerServerReference; +exports.registerClientReference = s.registerClientReference; +exports.createClientModuleProxy = s.createClientModuleProxy; +exports.createTemporaryReferenceSet = s.createTemporaryReferenceSet; diff --git a/packages/next/src/compiled/react-server-dom-turbopack-experimental/static.browser.js b/packages/next/src/compiled/react-server-dom-turbopack-experimental/static.browser.js new file mode 100644 index 0000000000000..edc104a459383 --- /dev/null +++ b/packages/next/src/compiled/react-server-dom-turbopack-experimental/static.browser.js @@ -0,0 +1,12 @@ +'use strict'; + +var s; +if (process.env.NODE_ENV === 'production') { + s = require('./cjs/react-server-dom-turbopack-server.browser.production.js'); +} else { + s = require('./cjs/react-server-dom-turbopack-server.browser.development.js'); +} + +if (s.prerender) { + exports.prerender = s.prerender; +} diff --git a/packages/next/src/compiled/react-server-dom-turbopack-experimental/static.edge.js b/packages/next/src/compiled/react-server-dom-turbopack-experimental/static.edge.js new file mode 100644 index 0000000000000..c074f8ffe7ee4 --- /dev/null +++ b/packages/next/src/compiled/react-server-dom-turbopack-experimental/static.edge.js @@ -0,0 +1,12 @@ +'use strict'; + +var s; +if (process.env.NODE_ENV === 'production') { + s = require('./cjs/react-server-dom-turbopack-server.edge.production.js'); +} else { + s = require('./cjs/react-server-dom-turbopack-server.edge.development.js'); +} + +if (s.prerender) { + exports.prerender = s.prerender; +} diff --git a/packages/next/src/compiled/react-server-dom-turbopack-experimental/static.js b/packages/next/src/compiled/react-server-dom-turbopack-experimental/static.js new file mode 100644 index 0000000000000..13a632e641179 --- /dev/null +++ b/packages/next/src/compiled/react-server-dom-turbopack-experimental/static.js @@ -0,0 +1,6 @@ +'use strict'; + +throw new Error( + 'The React Server Writer cannot be used outside a react-server environment. ' + + 'You must configure Node.js using the `--conditions react-server` flag.' +); diff --git a/packages/next/src/compiled/react-server-dom-turbopack-experimental/static.node.js b/packages/next/src/compiled/react-server-dom-turbopack-experimental/static.node.js new file mode 100644 index 0000000000000..84083a965189b --- /dev/null +++ b/packages/next/src/compiled/react-server-dom-turbopack-experimental/static.node.js @@ -0,0 +1,12 @@ +'use strict'; + +var s; +if (process.env.NODE_ENV === 'production') { + s = require('./cjs/react-server-dom-turbopack-server.node.production.js'); +} else { + s = require('./cjs/react-server-dom-turbopack-server.node.development.js'); +} + +if (s.prerenderToNodeStream) { + exports.prerenderToNodeStream = s.prerenderToNodeStream; +} diff --git a/packages/next/src/compiled/react-server-dom-turbopack-experimental/static.node.unbundled.js b/packages/next/src/compiled/react-server-dom-turbopack-experimental/static.node.unbundled.js new file mode 100644 index 0000000000000..e77863bf36a60 --- /dev/null +++ b/packages/next/src/compiled/react-server-dom-turbopack-experimental/static.node.unbundled.js @@ -0,0 +1,12 @@ +'use strict'; + +var s; +if (process.env.NODE_ENV === 'production') { + s = require('./cjs/react-server-dom-turbopack-server.node.unbundled.production.js'); +} else { + s = require('./cjs/react-server-dom-turbopack-server.node.unbundled.development.js'); +} + +if (s.prerenderToNodeStream) { + exports.prerenderToNodeStream = s.prerenderToNodeStream; +} diff --git a/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.browser.development.js b/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.browser.development.js index 5041dc0fb67d6..51997ab6894f5 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.browser.development.js +++ b/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.browser.development.js @@ -206,12 +206,13 @@ maybeIterable["@@iterator"]; return "function" === typeof maybeIterable ? maybeIterable : null; } - function noop() {} + function noop$1() {} function trackUsedThenable(thenableState, thenable, index) { index = thenableState[index]; void 0 === index ? thenableState.push(thenable) - : index !== thenable && (thenable.then(noop, noop), (thenable = index)); + : index !== thenable && + (thenable.then(noop$1, noop$1), (thenable = index)); switch (thenable.status) { case "fulfilled": return thenable.value; @@ -219,7 +220,7 @@ throw thenable.reason; default: "string" === typeof thenable.status - ? thenable.then(noop, noop) + ? thenable.then(noop$1, noop$1) : ((thenableState = thenable), (thenableState.status = "pending"), thenableState.then( @@ -494,7 +495,9 @@ onPostpone, temporaryReferences, environmentName, - filterStackFrame + filterStackFrame, + onAllReady, + onFatalError ) { if ( null !== ReactSharedInternalsServer.A && @@ -533,6 +536,8 @@ this.onError = void 0 === onError ? defaultErrorHandler : onError; this.onPostpone = void 0 === onPostpone ? defaultPostponeHandler : onPostpone; + this.onAllReady = void 0 === onAllReady ? noop : onAllReady; + this.onFatalError = void 0 === onFatalError ? noop : onFatalError; this.environmentName = void 0 === environmentName ? function () { @@ -551,6 +556,7 @@ model = createTask(this, model, null, !1, abortSet, null); pingedTasks.push(model); } + function noop() {} function serializeThenable(request, task, thenable) { var newTask = createTask( request, @@ -780,6 +786,7 @@ currentOwner = { name: "", env: task.environmentName, + key: null, owner: task.debugOwner }; try { @@ -802,6 +809,7 @@ componentDebugInfo = { name: componentDebugInfo, env: componentEnv, + key: key, owner: task.debugOwner }; outlineModel(request, componentDebugInfo); @@ -1495,7 +1503,12 @@ describeObjectForErrorMessage(parent, parentPropertyName) ); if (isReactComponentInfo(value)) - return { name: value.name, env: value.env, owner: value.owner }; + return { + name: value.name, + env: value.env, + key: value.key, + owner: value.owner + }; if ("Object" !== objectName(value)) callWithDebugContextInDEV(request, task, function () { console.error( @@ -1629,6 +1642,8 @@ return errorDigest || ""; } function fatalError(request, error) { + var onFatalError = request.onFatalError; + onFatalError(error); null !== request.destination ? ((request.status = CLOSED), closeWithError(request.destination, error)) @@ -1869,6 +1884,7 @@ ? { name: value.name, env: value.env, + key: value.key, owner: value.owner } : value; @@ -2060,6 +2076,10 @@ retryTask(request, pingedTasks[i]); null !== request.destination && flushCompletedChunks(request, request.destination); + if (0 === request.abortableTasks.size) { + var onAllReady = request.onAllReady; + onAllReady(); + } } catch (error) { logRecoverableError(request, error, null), fatalError(request, error); } finally { @@ -3465,7 +3485,9 @@ options ? options.onPostpone : void 0, options ? options.temporaryReferences : void 0, options ? options.environmentName : void 0, - options ? options.filterStackFrame : void 0 + options ? options.filterStackFrame : void 0, + void 0, + void 0 ); if (options && options.signal) { var signal = options.signal; diff --git a/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.browser.production.js b/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.browser.production.js index aba01d6385101..6e51443ca000f 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.browser.production.js +++ b/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.browser.production.js @@ -443,12 +443,12 @@ var ASYNC_ITERATOR = Symbol.asyncIterator, SuspenseException = Error( "Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`" ); -function noop() {} +function noop$1() {} function trackUsedThenable(thenableState, thenable, index) { index = thenableState[index]; void 0 === index ? thenableState.push(thenable) - : index !== thenable && (thenable.then(noop, noop), (thenable = index)); + : index !== thenable && (thenable.then(noop$1, noop$1), (thenable = index)); switch (thenable.status) { case "fulfilled": return thenable.value; @@ -456,7 +456,7 @@ function trackUsedThenable(thenableState, thenable, index) { throw thenable.reason; default: "string" === typeof thenable.status - ? thenable.then(noop, noop) + ? thenable.then(noop$1, noop$1) : ((thenableState = thenable), (thenableState.status = "pending"), thenableState.then( @@ -712,7 +712,11 @@ function RequestInstance( onError, identifierPrefix, onPostpone, - temporaryReferences + temporaryReferences, + environmentName, + filterStackFrame, + onAllReady, + onFatalError ) { if ( null !== ReactSharedInternalsServer.A && @@ -720,9 +724,9 @@ function RequestInstance( ) throw Error("Currently React only supports one RSC renderer at a time."); ReactSharedInternalsServer.A = DefaultAsyncDispatcher; - var abortSet = new Set(), - pingedTasks = [], - hints = new Set(); + filterStackFrame = new Set(); + environmentName = []; + var hints = new Set(); this.status = 0; this.flushScheduled = !1; this.destination = this.fatalError = null; @@ -731,8 +735,8 @@ function RequestInstance( this.pendingChunks = this.nextChunkId = 0; this.hints = hints; this.abortListeners = new Set(); - this.abortableTasks = abortSet; - this.pingedTasks = pingedTasks; + this.abortableTasks = filterStackFrame; + this.pingedTasks = environmentName; this.completedImportChunks = []; this.completedHintChunks = []; this.completedRegularChunks = []; @@ -747,9 +751,12 @@ function RequestInstance( this.taintCleanupQueue = []; this.onError = void 0 === onError ? defaultErrorHandler : onError; this.onPostpone = void 0 === onPostpone ? defaultPostponeHandler : onPostpone; - model = createTask(this, model, null, !1, abortSet); - pingedTasks.push(model); + this.onAllReady = void 0 === onAllReady ? noop : onAllReady; + this.onFatalError = void 0 === onFatalError ? noop : onFatalError; + model = createTask(this, model, null, !1, filterStackFrame); + environmentName.push(model); } +function noop() {} var currentRequest = null; function serializeThenable(request, task, thenable) { var newTask = createTask( @@ -1602,6 +1609,8 @@ function logRecoverableError(request, error) { return errorDigest || ""; } function fatalError(request, error) { + var onFatalError = request.onFatalError; + onFatalError(error); null !== request.destination ? ((request.status = 3), closeWithError(request.destination, error)) : ((request.status = 2), (request.fatalError = error)); @@ -1744,6 +1753,10 @@ function performWork(request) { retryTask(request, pingedTasks[i]); null !== request.destination && flushCompletedChunks(request, request.destination); + if (0 === request.abortableTasks.size) { + var onAllReady = request.onAllReady; + onAllReady(); + } } catch (error) { logRecoverableError(request, error, null), fatalError(request, error); } finally { @@ -2654,7 +2667,11 @@ exports.renderToReadableStream = function (model, turbopackMap, options) { options ? options.onError : void 0, options ? options.identifierPrefix : void 0, options ? options.onPostpone : void 0, - options ? options.temporaryReferences : void 0 + options ? options.temporaryReferences : void 0, + void 0, + void 0, + void 0, + void 0 ); if (options && options.signal) { var signal = options.signal; diff --git a/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.edge.development.js b/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.edge.development.js index b4af7606289ec..67a5ded2d7ed7 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.edge.development.js +++ b/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.edge.development.js @@ -202,12 +202,13 @@ maybeIterable["@@iterator"]; return "function" === typeof maybeIterable ? maybeIterable : null; } - function noop() {} + function noop$1() {} function trackUsedThenable(thenableState, thenable, index) { index = thenableState[index]; void 0 === index ? thenableState.push(thenable) - : index !== thenable && (thenable.then(noop, noop), (thenable = index)); + : index !== thenable && + (thenable.then(noop$1, noop$1), (thenable = index)); switch (thenable.status) { case "fulfilled": return thenable.value; @@ -215,7 +216,7 @@ throw thenable.reason; default: "string" === typeof thenable.status - ? thenable.then(noop, noop) + ? thenable.then(noop$1, noop$1) : ((thenableState = thenable), (thenableState.status = "pending"), thenableState.then( @@ -490,7 +491,9 @@ onPostpone, temporaryReferences, environmentName, - filterStackFrame + filterStackFrame, + onAllReady, + onFatalError ) { if ( null !== ReactSharedInternalsServer.A && @@ -529,6 +532,8 @@ this.onError = void 0 === onError ? defaultErrorHandler : onError; this.onPostpone = void 0 === onPostpone ? defaultPostponeHandler : onPostpone; + this.onAllReady = void 0 === onAllReady ? noop : onAllReady; + this.onFatalError = void 0 === onFatalError ? noop : onFatalError; this.environmentName = void 0 === environmentName ? function () { @@ -547,6 +552,7 @@ model = createTask(this, model, null, !1, abortSet, null); pingedTasks.push(model); } + function noop() {} function resolveRequest() { if (currentRequest) return currentRequest; if (supportsRequestStorage) { @@ -784,6 +790,7 @@ currentOwner = { name: "", env: task.environmentName, + key: null, owner: task.debugOwner }; try { @@ -806,6 +813,7 @@ componentDebugInfo = { name: componentDebugInfo, env: componentEnv, + key: key, owner: task.debugOwner }; outlineModel(request, componentDebugInfo); @@ -1507,7 +1515,12 @@ describeObjectForErrorMessage(parent, parentPropertyName) ); if (isReactComponentInfo(value)) - return { name: value.name, env: value.env, owner: value.owner }; + return { + name: value.name, + env: value.env, + key: value.key, + owner: value.owner + }; if ("Object" !== objectName(value)) callWithDebugContextInDEV(request, task, function () { console.error( @@ -1652,6 +1665,8 @@ return errorDigest || ""; } function fatalError(request, error) { + var onFatalError = request.onFatalError; + onFatalError(error); null !== request.destination ? ((request.status = CLOSED), closeWithError(request.destination, error)) @@ -1892,6 +1907,7 @@ ? { name: value.name, env: value.env, + key: value.key, owner: value.owner } : value; @@ -2083,6 +2099,10 @@ retryTask(request, pingedTasks[i]); null !== request.destination && flushCompletedChunks(request, request.destination); + if (0 === request.abortableTasks.size) { + var onAllReady = request.onAllReady; + onAllReady(); + } } catch (error) { logRecoverableError(request, error, null), fatalError(request, error); } finally { @@ -3512,7 +3532,9 @@ const setTimeoutOrImmediate = options ? options.onPostpone : void 0, options ? options.temporaryReferences : void 0, options ? options.environmentName : void 0, - options ? options.filterStackFrame : void 0 + options ? options.filterStackFrame : void 0, + void 0, + void 0 ); if (options && options.signal) { var signal = options.signal; diff --git a/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.edge.production.js b/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.edge.production.js index 849034e2d3213..7f5c213df101c 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.edge.production.js +++ b/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.edge.production.js @@ -441,12 +441,12 @@ var ASYNC_ITERATOR = Symbol.asyncIterator, SuspenseException = Error( "Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`" ); -function noop() {} +function noop$1() {} function trackUsedThenable(thenableState, thenable, index) { index = thenableState[index]; void 0 === index ? thenableState.push(thenable) - : index !== thenable && (thenable.then(noop, noop), (thenable = index)); + : index !== thenable && (thenable.then(noop$1, noop$1), (thenable = index)); switch (thenable.status) { case "fulfilled": return thenable.value; @@ -454,7 +454,7 @@ function trackUsedThenable(thenableState, thenable, index) { throw thenable.reason; default: "string" === typeof thenable.status - ? thenable.then(noop, noop) + ? thenable.then(noop$1, noop$1) : ((thenableState = thenable), (thenableState.status = "pending"), thenableState.then( @@ -709,7 +709,11 @@ function RequestInstance( onError, identifierPrefix, onPostpone, - temporaryReferences + temporaryReferences, + environmentName, + filterStackFrame, + onAllReady, + onFatalError ) { if ( null !== ReactSharedInternalsServer.A && @@ -717,9 +721,9 @@ function RequestInstance( ) throw Error("Currently React only supports one RSC renderer at a time."); ReactSharedInternalsServer.A = DefaultAsyncDispatcher; - var abortSet = new Set(), - pingedTasks = [], - hints = new Set(); + filterStackFrame = new Set(); + environmentName = []; + var hints = new Set(); this.status = 0; this.flushScheduled = !1; this.destination = this.fatalError = null; @@ -728,8 +732,8 @@ function RequestInstance( this.pendingChunks = this.nextChunkId = 0; this.hints = hints; this.abortListeners = new Set(); - this.abortableTasks = abortSet; - this.pingedTasks = pingedTasks; + this.abortableTasks = filterStackFrame; + this.pingedTasks = environmentName; this.completedImportChunks = []; this.completedHintChunks = []; this.completedRegularChunks = []; @@ -744,9 +748,12 @@ function RequestInstance( this.taintCleanupQueue = []; this.onError = void 0 === onError ? defaultErrorHandler : onError; this.onPostpone = void 0 === onPostpone ? defaultPostponeHandler : onPostpone; - model = createTask(this, model, null, !1, abortSet); - pingedTasks.push(model); + this.onAllReady = void 0 === onAllReady ? noop : onAllReady; + this.onFatalError = void 0 === onFatalError ? noop : onFatalError; + model = createTask(this, model, null, !1, filterStackFrame); + environmentName.push(model); } +function noop() {} var currentRequest = null; function resolveRequest() { if (currentRequest) return currentRequest; @@ -1609,6 +1616,8 @@ function logRecoverableError(request, error) { return errorDigest || ""; } function fatalError(request, error) { + var onFatalError = request.onFatalError; + onFatalError(error); null !== request.destination ? ((request.status = 3), closeWithError(request.destination, error)) : ((request.status = 2), (request.fatalError = error)); @@ -1751,6 +1760,10 @@ function performWork(request) { retryTask(request, pingedTasks[i]); null !== request.destination && flushCompletedChunks(request, request.destination); + if (0 === request.abortableTasks.size) { + var onAllReady = request.onAllReady; + onAllReady(); + } } catch (error) { logRecoverableError(request, error, null), fatalError(request, error); } finally { @@ -2676,7 +2689,11 @@ exports.renderToReadableStream = function (model, turbopackMap, options) { options ? options.onError : void 0, options ? options.identifierPrefix : void 0, options ? options.onPostpone : void 0, - options ? options.temporaryReferences : void 0 + options ? options.temporaryReferences : void 0, + void 0, + void 0, + void 0, + void 0 ); if (options && options.signal) { var signal = options.signal; diff --git a/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.node.development.js b/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.node.development.js index 3357b217fd7ce..8b45acdacfc8a 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.node.development.js +++ b/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.node.development.js @@ -229,12 +229,13 @@ maybeIterable["@@iterator"]; return "function" === typeof maybeIterable ? maybeIterable : null; } - function noop() {} + function noop$1() {} function trackUsedThenable(thenableState, thenable, index) { index = thenableState[index]; void 0 === index ? thenableState.push(thenable) - : index !== thenable && (thenable.then(noop, noop), (thenable = index)); + : index !== thenable && + (thenable.then(noop$1, noop$1), (thenable = index)); switch (thenable.status) { case "fulfilled": return thenable.value; @@ -242,7 +243,7 @@ throw thenable.reason; default: "string" === typeof thenable.status - ? thenable.then(noop, noop) + ? thenable.then(noop$1, noop$1) : ((thenableState = thenable), (thenableState.status = "pending"), thenableState.then( @@ -517,7 +518,9 @@ onPostpone, temporaryReferences, environmentName, - filterStackFrame + filterStackFrame, + onAllReady, + onFatalError ) { if ( null !== ReactSharedInternalsServer.A && @@ -556,6 +559,8 @@ this.onError = void 0 === onError ? defaultErrorHandler : onError; this.onPostpone = void 0 === onPostpone ? defaultPostponeHandler : onPostpone; + this.onAllReady = void 0 === onAllReady ? noop : onAllReady; + this.onFatalError = void 0 === onFatalError ? noop : onFatalError; this.environmentName = void 0 === environmentName ? function () { @@ -574,6 +579,7 @@ model = createTask(this, model, null, !1, abortSet, null); pingedTasks.push(model); } + function noop() {} function resolveRequest() { if (currentRequest) return currentRequest; var store = requestStorage.getStore(); @@ -807,6 +813,7 @@ currentOwner = { name: "", env: task.environmentName, + key: null, owner: task.debugOwner }; try { @@ -829,6 +836,7 @@ componentDebugInfo = { name: componentDebugInfo, env: componentEnv, + key: key, owner: task.debugOwner }; outlineModel(request, componentDebugInfo); @@ -1526,7 +1534,12 @@ describeObjectForErrorMessage(parent, parentPropertyName) ); if (isReactComponentInfo(value)) - return { name: value.name, env: value.env, owner: value.owner }; + return { + name: value.name, + env: value.env, + key: value.key, + owner: value.owner + }; if ("Object" !== objectName(value)) callWithDebugContextInDEV(request, task, function () { console.error( @@ -1667,6 +1680,8 @@ return errorDigest || ""; } function fatalError(request, error) { + var onFatalError = request.onFatalError; + onFatalError(error); null !== request.destination ? ((request.status = CLOSED), request.destination.destroy(error)) : ((request.status = 2), (request.fatalError = error)); @@ -1899,6 +1914,7 @@ ? { name: value.name, env: value.env, + key: value.key, owner: value.owner } : value; @@ -2089,6 +2105,10 @@ retryTask(request, pingedTasks[i]); null !== request.destination && flushCompletedChunks(request, request.destination); + if (0 === request.abortableTasks.size) { + var onAllReady = request.onAllReady; + onAllReady(); + } } catch (error) { logRecoverableError(request, error, null), fatalError(request, error); } finally { @@ -3572,7 +3592,9 @@ options ? options.onPostpone : void 0, options ? options.temporaryReferences : void 0, options ? options.environmentName : void 0, - options ? options.filterStackFrame : void 0 + options ? options.filterStackFrame : void 0, + void 0, + void 0 ), hasStartedFlowing = !1; startWork(request); diff --git a/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.node.production.js b/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.node.production.js index 9eb2f011086f8..9d8d1ebb8cb34 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.node.production.js +++ b/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.node.production.js @@ -460,12 +460,12 @@ var ASYNC_ITERATOR = Symbol.asyncIterator, SuspenseException = Error( "Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`" ); -function noop() {} +function noop$1() {} function trackUsedThenable(thenableState, thenable, index) { index = thenableState[index]; void 0 === index ? thenableState.push(thenable) - : index !== thenable && (thenable.then(noop, noop), (thenable = index)); + : index !== thenable && (thenable.then(noop$1, noop$1), (thenable = index)); switch (thenable.status) { case "fulfilled": return thenable.value; @@ -473,7 +473,7 @@ function trackUsedThenable(thenableState, thenable, index) { throw thenable.reason; default: "string" === typeof thenable.status - ? thenable.then(noop, noop) + ? thenable.then(noop$1, noop$1) : ((thenableState = thenable), (thenableState.status = "pending"), thenableState.then( @@ -728,7 +728,11 @@ function RequestInstance( onError, identifierPrefix, onPostpone, - temporaryReferences + temporaryReferences, + environmentName, + filterStackFrame, + onAllReady, + onFatalError ) { if ( null !== ReactSharedInternalsServer.A && @@ -736,9 +740,9 @@ function RequestInstance( ) throw Error("Currently React only supports one RSC renderer at a time."); ReactSharedInternalsServer.A = DefaultAsyncDispatcher; - var abortSet = new Set(), - pingedTasks = [], - hints = new Set(); + filterStackFrame = new Set(); + environmentName = []; + var hints = new Set(); this.status = 0; this.flushScheduled = !1; this.destination = this.fatalError = null; @@ -747,8 +751,8 @@ function RequestInstance( this.pendingChunks = this.nextChunkId = 0; this.hints = hints; this.abortListeners = new Set(); - this.abortableTasks = abortSet; - this.pingedTasks = pingedTasks; + this.abortableTasks = filterStackFrame; + this.pingedTasks = environmentName; this.completedImportChunks = []; this.completedHintChunks = []; this.completedRegularChunks = []; @@ -763,9 +767,12 @@ function RequestInstance( this.taintCleanupQueue = []; this.onError = void 0 === onError ? defaultErrorHandler : onError; this.onPostpone = void 0 === onPostpone ? defaultPostponeHandler : onPostpone; - model = createTask(this, model, null, !1, abortSet); - pingedTasks.push(model); + this.onAllReady = void 0 === onAllReady ? noop : onAllReady; + this.onFatalError = void 0 === onFatalError ? noop : onFatalError; + model = createTask(this, model, null, !1, filterStackFrame); + environmentName.push(model); } +function noop() {} var currentRequest = null; function resolveRequest() { if (currentRequest) return currentRequest; @@ -1619,6 +1626,8 @@ function logRecoverableError(request, error) { return errorDigest || ""; } function fatalError(request, error) { + var onFatalError = request.onFatalError; + onFatalError(error); null !== request.destination ? ((request.status = 3), request.destination.destroy(error)) : ((request.status = 2), (request.fatalError = error)); @@ -1755,6 +1764,10 @@ function performWork(request) { retryTask(request, pingedTasks[i]); null !== request.destination && flushCompletedChunks(request, request.destination); + if (0 === request.abortableTasks.size) { + var onAllReady = request.onAllReady; + onAllReady(); + } } catch (error) { logRecoverableError(request, error, null), fatalError(request, error); } finally { @@ -2766,7 +2779,11 @@ exports.renderToPipeableStream = function (model, turbopackMap, options) { options ? options.onError : void 0, options ? options.identifierPrefix : void 0, options ? options.onPostpone : void 0, - options ? options.temporaryReferences : void 0 + options ? options.temporaryReferences : void 0, + void 0, + void 0, + void 0, + void 0 ), hasStartedFlowing = !1; startWork(request); diff --git a/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.node.unbundled.development.js b/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.node.unbundled.development.js index 3a43467dbbe8d..d3032c2f65563 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.node.unbundled.development.js +++ b/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.node.unbundled.development.js @@ -229,12 +229,13 @@ maybeIterable["@@iterator"]; return "function" === typeof maybeIterable ? maybeIterable : null; } - function noop() {} + function noop$1() {} function trackUsedThenable(thenableState, thenable, index) { index = thenableState[index]; void 0 === index ? thenableState.push(thenable) - : index !== thenable && (thenable.then(noop, noop), (thenable = index)); + : index !== thenable && + (thenable.then(noop$1, noop$1), (thenable = index)); switch (thenable.status) { case "fulfilled": return thenable.value; @@ -242,7 +243,7 @@ throw thenable.reason; default: "string" === typeof thenable.status - ? thenable.then(noop, noop) + ? thenable.then(noop$1, noop$1) : ((thenableState = thenable), (thenableState.status = "pending"), thenableState.then( @@ -517,7 +518,9 @@ onPostpone, temporaryReferences, environmentName, - filterStackFrame + filterStackFrame, + onAllReady, + onFatalError ) { if ( null !== ReactSharedInternalsServer.A && @@ -556,6 +559,8 @@ this.onError = void 0 === onError ? defaultErrorHandler : onError; this.onPostpone = void 0 === onPostpone ? defaultPostponeHandler : onPostpone; + this.onAllReady = void 0 === onAllReady ? noop : onAllReady; + this.onFatalError = void 0 === onFatalError ? noop : onFatalError; this.environmentName = void 0 === environmentName ? function () { @@ -574,6 +579,7 @@ model = createTask(this, model, null, !1, abortSet, null); pingedTasks.push(model); } + function noop() {} function resolveRequest() { if (currentRequest) return currentRequest; var store = requestStorage.getStore(); @@ -807,6 +813,7 @@ currentOwner = { name: "", env: task.environmentName, + key: null, owner: task.debugOwner }; try { @@ -829,6 +836,7 @@ componentDebugInfo = { name: componentDebugInfo, env: componentEnv, + key: key, owner: task.debugOwner }; outlineModel(request, componentDebugInfo); @@ -1526,7 +1534,12 @@ describeObjectForErrorMessage(parent, parentPropertyName) ); if (isReactComponentInfo(value)) - return { name: value.name, env: value.env, owner: value.owner }; + return { + name: value.name, + env: value.env, + key: value.key, + owner: value.owner + }; if ("Object" !== objectName(value)) callWithDebugContextInDEV(request, task, function () { console.error( @@ -1667,6 +1680,8 @@ return errorDigest || ""; } function fatalError(request, error) { + var onFatalError = request.onFatalError; + onFatalError(error); null !== request.destination ? ((request.status = CLOSED), request.destination.destroy(error)) : ((request.status = 2), (request.fatalError = error)); @@ -1899,6 +1914,7 @@ ? { name: value.name, env: value.env, + key: value.key, owner: value.owner } : value; @@ -2089,6 +2105,10 @@ retryTask(request, pingedTasks[i]); null !== request.destination && flushCompletedChunks(request, request.destination); + if (0 === request.abortableTasks.size) { + var onAllReady = request.onAllReady; + onAllReady(); + } } catch (error) { logRecoverableError(request, error, null), fatalError(request, error); } finally { @@ -3538,7 +3558,9 @@ options ? options.onPostpone : void 0, options ? options.temporaryReferences : void 0, options ? options.environmentName : void 0, - options ? options.filterStackFrame : void 0 + options ? options.filterStackFrame : void 0, + void 0, + void 0 ), hasStartedFlowing = !1; startWork(request); diff --git a/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.node.unbundled.production.js b/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.node.unbundled.production.js index dd47a139aebe9..7fe2b1847af1e 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.node.unbundled.production.js +++ b/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.node.unbundled.production.js @@ -460,12 +460,12 @@ var ASYNC_ITERATOR = Symbol.asyncIterator, SuspenseException = Error( "Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`" ); -function noop() {} +function noop$1() {} function trackUsedThenable(thenableState, thenable, index) { index = thenableState[index]; void 0 === index ? thenableState.push(thenable) - : index !== thenable && (thenable.then(noop, noop), (thenable = index)); + : index !== thenable && (thenable.then(noop$1, noop$1), (thenable = index)); switch (thenable.status) { case "fulfilled": return thenable.value; @@ -473,7 +473,7 @@ function trackUsedThenable(thenableState, thenable, index) { throw thenable.reason; default: "string" === typeof thenable.status - ? thenable.then(noop, noop) + ? thenable.then(noop$1, noop$1) : ((thenableState = thenable), (thenableState.status = "pending"), thenableState.then( @@ -728,7 +728,11 @@ function RequestInstance( onError, identifierPrefix, onPostpone, - temporaryReferences + temporaryReferences, + environmentName, + filterStackFrame, + onAllReady, + onFatalError ) { if ( null !== ReactSharedInternalsServer.A && @@ -736,9 +740,9 @@ function RequestInstance( ) throw Error("Currently React only supports one RSC renderer at a time."); ReactSharedInternalsServer.A = DefaultAsyncDispatcher; - var abortSet = new Set(), - pingedTasks = [], - hints = new Set(); + filterStackFrame = new Set(); + environmentName = []; + var hints = new Set(); this.status = 0; this.flushScheduled = !1; this.destination = this.fatalError = null; @@ -747,8 +751,8 @@ function RequestInstance( this.pendingChunks = this.nextChunkId = 0; this.hints = hints; this.abortListeners = new Set(); - this.abortableTasks = abortSet; - this.pingedTasks = pingedTasks; + this.abortableTasks = filterStackFrame; + this.pingedTasks = environmentName; this.completedImportChunks = []; this.completedHintChunks = []; this.completedRegularChunks = []; @@ -763,9 +767,12 @@ function RequestInstance( this.taintCleanupQueue = []; this.onError = void 0 === onError ? defaultErrorHandler : onError; this.onPostpone = void 0 === onPostpone ? defaultPostponeHandler : onPostpone; - model = createTask(this, model, null, !1, abortSet); - pingedTasks.push(model); + this.onAllReady = void 0 === onAllReady ? noop : onAllReady; + this.onFatalError = void 0 === onFatalError ? noop : onFatalError; + model = createTask(this, model, null, !1, filterStackFrame); + environmentName.push(model); } +function noop() {} var currentRequest = null; function resolveRequest() { if (currentRequest) return currentRequest; @@ -1619,6 +1626,8 @@ function logRecoverableError(request, error) { return errorDigest || ""; } function fatalError(request, error) { + var onFatalError = request.onFatalError; + onFatalError(error); null !== request.destination ? ((request.status = 3), request.destination.destroy(error)) : ((request.status = 2), (request.fatalError = error)); @@ -1755,6 +1764,10 @@ function performWork(request) { retryTask(request, pingedTasks[i]); null !== request.destination && flushCompletedChunks(request, request.destination); + if (0 === request.abortableTasks.size) { + var onAllReady = request.onAllReady; + onAllReady(); + } } catch (error) { logRecoverableError(request, error, null), fatalError(request, error); } finally { @@ -2735,7 +2748,11 @@ exports.renderToPipeableStream = function (model, turbopackMap, options) { options ? options.onError : void 0, options ? options.identifierPrefix : void 0, options ? options.onPostpone : void 0, - options ? options.temporaryReferences : void 0 + options ? options.temporaryReferences : void 0, + void 0, + void 0, + void 0, + void 0 ), hasStartedFlowing = !1; startWork(request); diff --git a/packages/next/src/compiled/react-server-dom-turbopack/package.json b/packages/next/src/compiled/react-server-dom-turbopack/package.json index 7cfcef715914a..133f9066fdbcf 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack/package.json +++ b/packages/next/src/compiled/react-server-dom-turbopack/package.json @@ -38,6 +38,24 @@ "./server.edge": "./server.edge.js", "./server.node": "./server.node.js", "./server.node.unbundled": "./server.node.unbundled.js", + "./static": { + "react-server": { + "workerd": "./static.edge.js", + "deno": "./static.browser.js", + "node": { + "turbopack": "./static.node.js", + "webpack": "./static.node.js", + "default": "./static.node.unbundled.js" + }, + "edge-light": "./static.edge.js", + "browser": "./static.browser.js" + }, + "default": "./static.js" + }, + "./static.browser": "./static.browser.js", + "./static.edge": "./static.edge.js", + "./static.node": "./static.node.js", + "./static.node.unbundled": "./static.node.unbundled.js", "./node-loader": "./esm/react-server-dom-turbopack-node-loader.production.js", "./node-register": "./node-register.js", "./package.json": "./package.json" @@ -47,7 +65,7 @@ "neo-async": "^2.6.1" }, "peerDependencies": { - "react": "19.0.0-rc-49496d49-20240814", - "react-dom": "19.0.0-rc-49496d49-20240814" + "react": "19.0.0-rc-1eaccd82-20240816", + "react-dom": "19.0.0-rc-1eaccd82-20240816" } } \ No newline at end of file diff --git a/packages/next/src/compiled/react-server-dom-turbopack/server.browser.js b/packages/next/src/compiled/react-server-dom-turbopack/server.browser.js index 1d0364c5d392b..ec8d6b013e0bd 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack/server.browser.js +++ b/packages/next/src/compiled/react-server-dom-turbopack/server.browser.js @@ -1,7 +1,17 @@ 'use strict'; +var s; if (process.env.NODE_ENV === 'production') { - module.exports = require('./cjs/react-server-dom-turbopack-server.browser.production.js'); + s = require('./cjs/react-server-dom-turbopack-server.browser.production.js'); } else { - module.exports = require('./cjs/react-server-dom-turbopack-server.browser.development.js'); + s = require('./cjs/react-server-dom-turbopack-server.browser.development.js'); } + +exports.renderToReadableStream = s.renderToReadableStream; +exports.decodeReply = s.decodeReply; +exports.decodeAction = s.decodeAction; +exports.decodeFormState = s.decodeFormState; +exports.registerServerReference = s.registerServerReference; +exports.registerClientReference = s.registerClientReference; +exports.createClientModuleProxy = s.createClientModuleProxy; +exports.createTemporaryReferenceSet = s.createTemporaryReferenceSet; diff --git a/packages/next/src/compiled/react-server-dom-turbopack/server.edge.js b/packages/next/src/compiled/react-server-dom-turbopack/server.edge.js index c893cc3cdfa6e..e34b18fa0156a 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack/server.edge.js +++ b/packages/next/src/compiled/react-server-dom-turbopack/server.edge.js @@ -1,7 +1,17 @@ 'use strict'; +var s; if (process.env.NODE_ENV === 'production') { - module.exports = require('./cjs/react-server-dom-turbopack-server.edge.production.js'); + s = require('./cjs/react-server-dom-turbopack-server.edge.production.js'); } else { - module.exports = require('./cjs/react-server-dom-turbopack-server.edge.development.js'); + s = require('./cjs/react-server-dom-turbopack-server.edge.development.js'); } + +exports.renderToReadableStream = s.renderToReadableStream; +exports.decodeReply = s.decodeReply; +exports.decodeAction = s.decodeAction; +exports.decodeFormState = s.decodeFormState; +exports.registerServerReference = s.registerServerReference; +exports.registerClientReference = s.registerClientReference; +exports.createClientModuleProxy = s.createClientModuleProxy; +exports.createTemporaryReferenceSet = s.createTemporaryReferenceSet; diff --git a/packages/next/src/compiled/react-server-dom-turbopack/server.node.js b/packages/next/src/compiled/react-server-dom-turbopack/server.node.js index ac6128983dc6b..f9a4cf31f6e8c 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack/server.node.js +++ b/packages/next/src/compiled/react-server-dom-turbopack/server.node.js @@ -1,7 +1,18 @@ 'use strict'; +var s; if (process.env.NODE_ENV === 'production') { - module.exports = require('./cjs/react-server-dom-turbopack-server.node.production.js'); + s = require('./cjs/react-server-dom-turbopack-server.node.production.js'); } else { - module.exports = require('./cjs/react-server-dom-turbopack-server.node.development.js'); + s = require('./cjs/react-server-dom-turbopack-server.node.development.js'); } + +exports.renderToPipeableStream = s.renderToPipeableStream; +exports.decodeReplyFromBusboy = s.decodeReplyFromBusboy; +exports.decodeReply = s.decodeReply; +exports.decodeAction = s.decodeAction; +exports.decodeFormState = s.decodeFormState; +exports.registerServerReference = s.registerServerReference; +exports.registerClientReference = s.registerClientReference; +exports.createClientModuleProxy = s.createClientModuleProxy; +exports.createTemporaryReferenceSet = s.createTemporaryReferenceSet; diff --git a/packages/next/src/compiled/react-server-dom-turbopack/server.node.unbundled.js b/packages/next/src/compiled/react-server-dom-turbopack/server.node.unbundled.js index 86f9dcdefb1d7..1e8648ccef133 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack/server.node.unbundled.js +++ b/packages/next/src/compiled/react-server-dom-turbopack/server.node.unbundled.js @@ -1,7 +1,18 @@ 'use strict'; +var s; if (process.env.NODE_ENV === 'production') { - module.exports = require('./cjs/react-server-dom-turbopack-server.node.unbundled.production.js'); + s = require('./cjs/react-server-dom-turbopack-server.node.unbundled.production.js'); } else { - module.exports = require('./cjs/react-server-dom-turbopack-server.node.unbundled.development.js'); + s = require('./cjs/react-server-dom-turbopack-server.node.unbundled.development.js'); } + +exports.renderToPipeableStream = s.renderToPipeableStream; +exports.decodeReplyFromBusboy = s.decodeReplyFromBusboy; +exports.decodeReply = s.decodeReply; +exports.decodeAction = s.decodeAction; +exports.decodeFormState = s.decodeFormState; +exports.registerServerReference = s.registerServerReference; +exports.registerClientReference = s.registerClientReference; +exports.createClientModuleProxy = s.createClientModuleProxy; +exports.createTemporaryReferenceSet = s.createTemporaryReferenceSet; diff --git a/packages/next/src/compiled/react-server-dom-turbopack/static.browser.js b/packages/next/src/compiled/react-server-dom-turbopack/static.browser.js new file mode 100644 index 0000000000000..edc104a459383 --- /dev/null +++ b/packages/next/src/compiled/react-server-dom-turbopack/static.browser.js @@ -0,0 +1,12 @@ +'use strict'; + +var s; +if (process.env.NODE_ENV === 'production') { + s = require('./cjs/react-server-dom-turbopack-server.browser.production.js'); +} else { + s = require('./cjs/react-server-dom-turbopack-server.browser.development.js'); +} + +if (s.prerender) { + exports.prerender = s.prerender; +} diff --git a/packages/next/src/compiled/react-server-dom-turbopack/static.edge.js b/packages/next/src/compiled/react-server-dom-turbopack/static.edge.js new file mode 100644 index 0000000000000..c074f8ffe7ee4 --- /dev/null +++ b/packages/next/src/compiled/react-server-dom-turbopack/static.edge.js @@ -0,0 +1,12 @@ +'use strict'; + +var s; +if (process.env.NODE_ENV === 'production') { + s = require('./cjs/react-server-dom-turbopack-server.edge.production.js'); +} else { + s = require('./cjs/react-server-dom-turbopack-server.edge.development.js'); +} + +if (s.prerender) { + exports.prerender = s.prerender; +} diff --git a/packages/next/src/compiled/react-server-dom-turbopack/static.js b/packages/next/src/compiled/react-server-dom-turbopack/static.js new file mode 100644 index 0000000000000..13a632e641179 --- /dev/null +++ b/packages/next/src/compiled/react-server-dom-turbopack/static.js @@ -0,0 +1,6 @@ +'use strict'; + +throw new Error( + 'The React Server Writer cannot be used outside a react-server environment. ' + + 'You must configure Node.js using the `--conditions react-server` flag.' +); diff --git a/packages/next/src/compiled/react-server-dom-turbopack/static.node.js b/packages/next/src/compiled/react-server-dom-turbopack/static.node.js new file mode 100644 index 0000000000000..84083a965189b --- /dev/null +++ b/packages/next/src/compiled/react-server-dom-turbopack/static.node.js @@ -0,0 +1,12 @@ +'use strict'; + +var s; +if (process.env.NODE_ENV === 'production') { + s = require('./cjs/react-server-dom-turbopack-server.node.production.js'); +} else { + s = require('./cjs/react-server-dom-turbopack-server.node.development.js'); +} + +if (s.prerenderToNodeStream) { + exports.prerenderToNodeStream = s.prerenderToNodeStream; +} diff --git a/packages/next/src/compiled/react-server-dom-turbopack/static.node.unbundled.js b/packages/next/src/compiled/react-server-dom-turbopack/static.node.unbundled.js new file mode 100644 index 0000000000000..e77863bf36a60 --- /dev/null +++ b/packages/next/src/compiled/react-server-dom-turbopack/static.node.unbundled.js @@ -0,0 +1,12 @@ +'use strict'; + +var s; +if (process.env.NODE_ENV === 'production') { + s = require('./cjs/react-server-dom-turbopack-server.node.unbundled.production.js'); +} else { + s = require('./cjs/react-server-dom-turbopack-server.node.unbundled.development.js'); +} + +if (s.prerenderToNodeStream) { + exports.prerenderToNodeStream = s.prerenderToNodeStream; +} diff --git a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.browser.development.js b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.browser.development.js index c4bdd60d1011c..2dcf39c5141e6 100644 --- a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.browser.development.js +++ b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.browser.development.js @@ -210,12 +210,13 @@ maybeIterable["@@iterator"]; return "function" === typeof maybeIterable ? maybeIterable : null; } - function noop() {} + function noop$1() {} function trackUsedThenable(thenableState, thenable, index) { index = thenableState[index]; void 0 === index ? thenableState.push(thenable) - : index !== thenable && (thenable.then(noop, noop), (thenable = index)); + : index !== thenable && + (thenable.then(noop$1, noop$1), (thenable = index)); switch (thenable.status) { case "fulfilled": return thenable.value; @@ -223,7 +224,7 @@ throw thenable.reason; default: "string" === typeof thenable.status - ? thenable.then(noop, noop) + ? thenable.then(noop$1, noop$1) : ((thenableState = thenable), (thenableState.status = "pending"), thenableState.then( @@ -647,7 +648,9 @@ onPostpone, temporaryReferences, environmentName, - filterStackFrame + filterStackFrame, + onAllReady, + onFatalError ) { if ( null !== ReactSharedInternalsServer.A && @@ -688,6 +691,8 @@ this.onError = void 0 === onError ? defaultErrorHandler : onError; this.onPostpone = void 0 === onPostpone ? defaultPostponeHandler : onPostpone; + this.onAllReady = void 0 === onAllReady ? noop : onAllReady; + this.onFatalError = void 0 === onFatalError ? noop : onFatalError; this.environmentName = void 0 === environmentName ? function () { @@ -706,6 +711,7 @@ model = createTask(this, model, null, !1, abortSet, null, null, null); pingedTasks.push(model); } + function noop() {} function serializeThenable(request, task, thenable) { var newTask = createTask( request, @@ -976,6 +982,7 @@ var componentDebugInfo = { name: "", env: task.environmentName, + key: null, owner: task.debugOwner }; componentDebugInfo.stack = @@ -1012,6 +1019,7 @@ componentDebugInfo = { name: componentDebugInfo, env: componentEnv, + key: key, owner: task.debugOwner }; componentDebugInfo.stack = @@ -1214,6 +1222,7 @@ ((validated = { name: "Fragment", env: (0, request.environmentName)(), + key: key, owner: task.debugOwner, stack: null === task.debugStack @@ -1817,6 +1826,7 @@ (request = { name: value.name, env: value.env, + key: value.key, owner: value.owner }), (request.stack = value.stack), @@ -1978,6 +1988,8 @@ return errorDigest || ""; } function fatalError(request, error) { + var onFatalError = request.onFatalError; + onFatalError(error); cleanupTaintQueue(request); null !== request.destination ? ((request.status = CLOSED), @@ -2195,6 +2207,7 @@ ? ((request = { name: value.name, env: value.env, + key: value.key, owner: value.owner }), (request.stack = @@ -2427,6 +2440,10 @@ retryTask(request, pingedTasks[i]); null !== request.destination && flushCompletedChunks(request, request.destination); + if (0 === request.abortableTasks.size) { + var onAllReady = request.onAllReady; + onAllReady(); + } } catch (error) { logRecoverableError(request, error, null), fatalError(request, error); } finally { @@ -2516,6 +2533,19 @@ destination && flushCompletedChunks(request, destination); })); } + function startFlowing(request, destination) { + if (request.status === CLOSING) + (request.status = CLOSED), + closeWithError(destination, request.fatalError); + else if (request.status !== CLOSED && null === request.destination) { + request.destination = destination; + try { + flushCompletedChunks(request, destination); + } catch (error) { + logRecoverableError(request, error, null), fatalError(request, error); + } + } + } function abort(request, reason) { try { 0 === request.status && (request.status = ABORTING); @@ -3859,6 +3889,52 @@ close(body); return webpackMap; }; + exports.prerender = function (model, webpackMap, options) { + return new Promise(function (resolve, reject) { + var request = new RequestInstance( + model, + webpackMap, + options ? options.onError : void 0, + options ? options.identifierPrefix : void 0, + options ? options.onPostpone : void 0, + options ? options.temporaryReferences : void 0, + options ? options.environmentName : void 0, + options ? options.filterStackFrame : void 0, + function () { + var stream = new ReadableStream( + { + type: "bytes", + start: function () { + startWork(request); + }, + pull: function (controller) { + startFlowing(request, controller); + }, + cancel: function (reason) { + request.destination = null; + abort(request, reason); + } + }, + { highWaterMark: 0 } + ); + resolve({ prelude: stream }); + }, + reject + ); + if (options && options.signal) { + var signal = options.signal; + if (signal.aborted) abort(request, signal.reason); + else { + var listener = function () { + abort(request, signal.reason); + signal.removeEventListener("abort", listener); + }; + signal.addEventListener("abort", listener); + } + } + startWork(request); + }); + }; exports.registerClientReference = function ( proxyImplementation, id, @@ -3890,7 +3966,9 @@ options ? options.onPostpone : void 0, options ? options.temporaryReferences : void 0, options ? options.environmentName : void 0, - options ? options.filterStackFrame : void 0 + options ? options.filterStackFrame : void 0, + void 0, + void 0 ); if (options && options.signal) { var signal = options.signal; @@ -3910,21 +3988,7 @@ startWork(request); }, pull: function (controller) { - if (request.status === CLOSING) - (request.status = CLOSED), - closeWithError(controller, request.fatalError); - else if ( - request.status !== CLOSED && - null === request.destination - ) { - request.destination = controller; - try { - flushCompletedChunks(request, controller); - } catch (error) { - logRecoverableError(request, error, null), - fatalError(request, error); - } - } + startFlowing(request, controller); }, cancel: function (reason) { request.destination = null; diff --git a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.browser.production.js b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.browser.production.js index 57edd79c57251..29e72c1496b59 100644 --- a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.browser.production.js +++ b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.browser.production.js @@ -443,12 +443,12 @@ var ASYNC_ITERATOR = Symbol.asyncIterator, SuspenseException = Error( "Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`" ); -function noop() {} +function noop$1() {} function trackUsedThenable(thenableState, thenable, index) { index = thenableState[index]; void 0 === index ? thenableState.push(thenable) - : index !== thenable && (thenable.then(noop, noop), (thenable = index)); + : index !== thenable && (thenable.then(noop$1, noop$1), (thenable = index)); switch (thenable.status) { case "fulfilled": return thenable.value; @@ -456,7 +456,7 @@ function trackUsedThenable(thenableState, thenable, index) { throw thenable.reason; default: "string" === typeof thenable.status - ? thenable.then(noop, noop) + ? thenable.then(noop$1, noop$1) : ((thenableState = thenable), (thenableState.status = "pending"), thenableState.then( @@ -734,7 +734,11 @@ function RequestInstance( onError, identifierPrefix, onPostpone, - temporaryReferences + temporaryReferences, + environmentName, + filterStackFrame, + onAllReady, + onFatalError ) { if ( null !== ReactSharedInternalsServer.A && @@ -742,9 +746,9 @@ function RequestInstance( ) throw Error("Currently React only supports one RSC renderer at a time."); ReactSharedInternalsServer.A = DefaultAsyncDispatcher; - var abortSet = new Set(), - pingedTasks = [], - cleanupQueue = []; + filterStackFrame = new Set(); + environmentName = []; + var cleanupQueue = []; TaintRegistryPendingRequests.add(cleanupQueue); var hints = new Set(); this.status = 0; @@ -755,8 +759,8 @@ function RequestInstance( this.pendingChunks = this.nextChunkId = 0; this.hints = hints; this.abortListeners = new Set(); - this.abortableTasks = abortSet; - this.pingedTasks = pingedTasks; + this.abortableTasks = filterStackFrame; + this.pingedTasks = environmentName; this.completedImportChunks = []; this.completedHintChunks = []; this.completedRegularChunks = []; @@ -771,9 +775,12 @@ function RequestInstance( this.taintCleanupQueue = cleanupQueue; this.onError = void 0 === onError ? defaultErrorHandler : onError; this.onPostpone = void 0 === onPostpone ? defaultPostponeHandler : onPostpone; - model = createTask(this, model, null, !1, abortSet); - pingedTasks.push(model); + this.onAllReady = void 0 === onAllReady ? noop : onAllReady; + this.onFatalError = void 0 === onFatalError ? noop : onFatalError; + model = createTask(this, model, null, !1, filterStackFrame); + environmentName.push(model); } +function noop() {} var currentRequest = null; function serializeThenable(request, task, thenable) { var newTask = createTask( @@ -1678,6 +1685,8 @@ function logRecoverableError(request, error) { return errorDigest || ""; } function fatalError(request, error) { + var onFatalError = request.onFatalError; + onFatalError(error); cleanupTaintQueue(request); null !== request.destination ? ((request.status = 3), closeWithError(request.destination, error)) @@ -1852,6 +1861,10 @@ function performWork(request) { retryTask(request, pingedTasks[i]); null !== request.destination && flushCompletedChunks(request, request.destination); + if (0 === request.abortableTasks.size) { + var onAllReady = request.onAllReady; + onAllReady(); + } } catch (error) { logRecoverableError(request, error, null), fatalError(request, error); } finally { @@ -1918,6 +1931,18 @@ function enqueueFlush(request) { destination && flushCompletedChunks(request, destination); })); } +function startFlowing(request, destination) { + if (2 === request.status) + (request.status = 3), closeWithError(destination, request.fatalError); + else if (3 !== request.status && null === request.destination) { + request.destination = destination; + try { + flushCompletedChunks(request, destination); + } catch (error) { + logRecoverableError(request, error, null), fatalError(request, error); + } + } +} function abort(request, reason) { try { 0 === request.status && (request.status = 1); @@ -2759,6 +2784,52 @@ exports.decodeReply = function (body, webpackMap, options) { close(body); return webpackMap; }; +exports.prerender = function (model, webpackMap, options) { + return new Promise(function (resolve, reject) { + var request = new RequestInstance( + model, + webpackMap, + options ? options.onError : void 0, + options ? options.identifierPrefix : void 0, + options ? options.onPostpone : void 0, + options ? options.temporaryReferences : void 0, + void 0, + void 0, + function () { + var stream = new ReadableStream( + { + type: "bytes", + start: function () { + startWork(request); + }, + pull: function (controller) { + startFlowing(request, controller); + }, + cancel: function (reason) { + request.destination = null; + abort(request, reason); + } + }, + { highWaterMark: 0 } + ); + resolve({ prelude: stream }); + }, + reject + ); + if (options && options.signal) { + var signal = options.signal; + if (signal.aborted) abort(request, signal.reason); + else { + var listener = function () { + abort(request, signal.reason); + signal.removeEventListener("abort", listener); + }; + signal.addEventListener("abort", listener); + } + } + startWork(request); + }); +}; exports.registerClientReference = function ( proxyImplementation, id, @@ -2788,7 +2859,11 @@ exports.renderToReadableStream = function (model, webpackMap, options) { options ? options.onError : void 0, options ? options.identifierPrefix : void 0, options ? options.onPostpone : void 0, - options ? options.temporaryReferences : void 0 + options ? options.temporaryReferences : void 0, + void 0, + void 0, + void 0, + void 0 ); if (options && options.signal) { var signal = options.signal; @@ -2808,17 +2883,7 @@ exports.renderToReadableStream = function (model, webpackMap, options) { startWork(request); }, pull: function (controller) { - if (2 === request.status) - (request.status = 3), closeWithError(controller, request.fatalError); - else if (3 !== request.status && null === request.destination) { - request.destination = controller; - try { - flushCompletedChunks(request, controller); - } catch (error) { - logRecoverableError(request, error, null), - fatalError(request, error); - } - } + startFlowing(request, controller); }, cancel: function (reason) { request.destination = null; diff --git a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.edge.development.js b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.edge.development.js index eaa50c089a26c..3090f705dfb9e 100644 --- a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.edge.development.js +++ b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.edge.development.js @@ -206,12 +206,13 @@ maybeIterable["@@iterator"]; return "function" === typeof maybeIterable ? maybeIterable : null; } - function noop() {} + function noop$1() {} function trackUsedThenable(thenableState, thenable, index) { index = thenableState[index]; void 0 === index ? thenableState.push(thenable) - : index !== thenable && (thenable.then(noop, noop), (thenable = index)); + : index !== thenable && + (thenable.then(noop$1, noop$1), (thenable = index)); switch (thenable.status) { case "fulfilled": return thenable.value; @@ -219,7 +220,7 @@ throw thenable.reason; default: "string" === typeof thenable.status - ? thenable.then(noop, noop) + ? thenable.then(noop$1, noop$1) : ((thenableState = thenable), (thenableState.status = "pending"), thenableState.then( @@ -648,7 +649,9 @@ onPostpone, temporaryReferences, environmentName, - filterStackFrame + filterStackFrame, + onAllReady, + onFatalError ) { if ( null !== ReactSharedInternalsServer.A && @@ -689,6 +692,8 @@ this.onError = void 0 === onError ? defaultErrorHandler : onError; this.onPostpone = void 0 === onPostpone ? defaultPostponeHandler : onPostpone; + this.onAllReady = void 0 === onAllReady ? noop : onAllReady; + this.onFatalError = void 0 === onFatalError ? noop : onFatalError; this.environmentName = void 0 === environmentName ? function () { @@ -707,6 +712,7 @@ model = createTask(this, model, null, !1, abortSet, null, null, null); pingedTasks.push(model); } + function noop() {} function resolveRequest() { if (currentRequest) return currentRequest; if (supportsRequestStorage) { @@ -985,6 +991,7 @@ var componentDebugInfo = { name: "", env: task.environmentName, + key: null, owner: task.debugOwner }; componentDebugInfo.stack = @@ -1021,6 +1028,7 @@ componentDebugInfo = { name: componentDebugInfo, env: componentEnv, + key: key, owner: task.debugOwner }; componentDebugInfo.stack = @@ -1271,6 +1279,7 @@ ((validated = { name: "Fragment", env: (0, request.environmentName)(), + key: key, owner: task.debugOwner, stack: null === task.debugStack @@ -1874,6 +1883,7 @@ (request = { name: value.name, env: value.env, + key: value.key, owner: value.owner }), (request.stack = value.stack), @@ -2057,6 +2067,8 @@ return errorDigest || ""; } function fatalError(request, error) { + var onFatalError = request.onFatalError; + onFatalError(error); cleanupTaintQueue(request); null !== request.destination ? ((request.status = CLOSED), @@ -2274,6 +2286,7 @@ ? ((request = { name: value.name, env: value.env, + key: value.key, owner: value.owner }), (request.stack = @@ -2506,6 +2519,10 @@ retryTask(request, pingedTasks[i]); null !== request.destination && flushCompletedChunks(request, request.destination); + if (0 === request.abortableTasks.size) { + var onAllReady = request.onAllReady; + onAllReady(); + } } catch (error) { logRecoverableError(request, error, null), fatalError(request, error); } finally { @@ -2599,6 +2616,19 @@ destination && flushCompletedChunks(request, destination); }, 0)); } + function startFlowing(request, destination) { + if (request.status === CLOSING) + (request.status = CLOSED), + closeWithError(destination, request.fatalError); + else if (request.status !== CLOSED && null === request.destination) { + request.destination = destination; + try { + flushCompletedChunks(request, destination); + } catch (error) { + logRecoverableError(request, error, null), fatalError(request, error); + } + } + } function abort(request, reason) { try { 0 === request.status && (request.status = ABORTING); @@ -3945,6 +3975,52 @@ close(body); return webpackMap; }; + exports.prerender = function (model, webpackMap, options) { + return new Promise(function (resolve, reject) { + var request = new RequestInstance( + model, + webpackMap, + options ? options.onError : void 0, + options ? options.identifierPrefix : void 0, + options ? options.onPostpone : void 0, + options ? options.temporaryReferences : void 0, + options ? options.environmentName : void 0, + options ? options.filterStackFrame : void 0, + function () { + var stream = new ReadableStream( + { + type: "bytes", + start: function () { + startWork(request); + }, + pull: function (controller) { + startFlowing(request, controller); + }, + cancel: function (reason) { + request.destination = null; + abort(request, reason); + } + }, + { highWaterMark: 0 } + ); + resolve({ prelude: stream }); + }, + reject + ); + if (options && options.signal) { + var signal = options.signal; + if (signal.aborted) abort(request, signal.reason); + else { + var listener = function () { + abort(request, signal.reason); + signal.removeEventListener("abort", listener); + }; + signal.addEventListener("abort", listener); + } + } + startWork(request); + }); + }; exports.registerClientReference = function ( proxyImplementation, id, @@ -3987,7 +4063,9 @@ const setTimeoutOrImmediate = options ? options.onPostpone : void 0, options ? options.temporaryReferences : void 0, options ? options.environmentName : void 0, - options ? options.filterStackFrame : void 0 + options ? options.filterStackFrame : void 0, + void 0, + void 0 ); if (options && options.signal) { var signal = options.signal; @@ -4007,21 +4085,7 @@ const setTimeoutOrImmediate = startWork(request); }, pull: function (controller) { - if (request.status === CLOSING) - (request.status = CLOSED), - closeWithError(controller, request.fatalError); - else if ( - request.status !== CLOSED && - null === request.destination - ) { - request.destination = controller; - try { - flushCompletedChunks(request, controller); - } catch (error) { - logRecoverableError(request, error, null), - fatalError(request, error); - } - } + startFlowing(request, controller); }, cancel: function (reason) { request.destination = null; diff --git a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.edge.production.js b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.edge.production.js index 6113876232cad..e2b41f72b371c 100644 --- a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.edge.production.js +++ b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.edge.production.js @@ -441,12 +441,12 @@ var ASYNC_ITERATOR = Symbol.asyncIterator, SuspenseException = Error( "Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`" ); -function noop() {} +function noop$1() {} function trackUsedThenable(thenableState, thenable, index) { index = thenableState[index]; void 0 === index ? thenableState.push(thenable) - : index !== thenable && (thenable.then(noop, noop), (thenable = index)); + : index !== thenable && (thenable.then(noop$1, noop$1), (thenable = index)); switch (thenable.status) { case "fulfilled": return thenable.value; @@ -454,7 +454,7 @@ function trackUsedThenable(thenableState, thenable, index) { throw thenable.reason; default: "string" === typeof thenable.status - ? thenable.then(noop, noop) + ? thenable.then(noop$1, noop$1) : ((thenableState = thenable), (thenableState.status = "pending"), thenableState.then( @@ -731,7 +731,11 @@ function RequestInstance( onError, identifierPrefix, onPostpone, - temporaryReferences + temporaryReferences, + environmentName, + filterStackFrame, + onAllReady, + onFatalError ) { if ( null !== ReactSharedInternalsServer.A && @@ -739,9 +743,9 @@ function RequestInstance( ) throw Error("Currently React only supports one RSC renderer at a time."); ReactSharedInternalsServer.A = DefaultAsyncDispatcher; - var abortSet = new Set(), - pingedTasks = [], - cleanupQueue = []; + filterStackFrame = new Set(); + environmentName = []; + var cleanupQueue = []; TaintRegistryPendingRequests.add(cleanupQueue); var hints = new Set(); this.status = 0; @@ -752,8 +756,8 @@ function RequestInstance( this.pendingChunks = this.nextChunkId = 0; this.hints = hints; this.abortListeners = new Set(); - this.abortableTasks = abortSet; - this.pingedTasks = pingedTasks; + this.abortableTasks = filterStackFrame; + this.pingedTasks = environmentName; this.completedImportChunks = []; this.completedHintChunks = []; this.completedRegularChunks = []; @@ -768,9 +772,12 @@ function RequestInstance( this.taintCleanupQueue = cleanupQueue; this.onError = void 0 === onError ? defaultErrorHandler : onError; this.onPostpone = void 0 === onPostpone ? defaultPostponeHandler : onPostpone; - model = createTask(this, model, null, !1, abortSet); - pingedTasks.push(model); + this.onAllReady = void 0 === onAllReady ? noop : onAllReady; + this.onFatalError = void 0 === onFatalError ? noop : onFatalError; + model = createTask(this, model, null, !1, filterStackFrame); + environmentName.push(model); } +function noop() {} var currentRequest = null; function resolveRequest() { if (currentRequest) return currentRequest; @@ -1687,6 +1694,8 @@ function logRecoverableError(request, error) { return errorDigest || ""; } function fatalError(request, error) { + var onFatalError = request.onFatalError; + onFatalError(error); cleanupTaintQueue(request); null !== request.destination ? ((request.status = 3), closeWithError(request.destination, error)) @@ -1861,6 +1870,10 @@ function performWork(request) { retryTask(request, pingedTasks[i]); null !== request.destination && flushCompletedChunks(request, request.destination); + if (0 === request.abortableTasks.size) { + var onAllReady = request.onAllReady; + onAllReady(); + } } catch (error) { logRecoverableError(request, error, null), fatalError(request, error); } finally { @@ -1931,6 +1944,18 @@ function enqueueFlush(request) { destination && flushCompletedChunks(request, destination); }, 0)); } +function startFlowing(request, destination) { + if (2 === request.status) + (request.status = 3), closeWithError(destination, request.fatalError); + else if (3 !== request.status && null === request.destination) { + request.destination = destination; + try { + flushCompletedChunks(request, destination); + } catch (error) { + logRecoverableError(request, error, null), fatalError(request, error); + } + } +} function abort(request, reason) { try { 0 === request.status && (request.status = 1); @@ -2763,6 +2788,52 @@ exports.decodeReply = function (body, webpackMap, options) { close(body); return webpackMap; }; +exports.prerender = function (model, webpackMap, options) { + return new Promise(function (resolve, reject) { + var request = new RequestInstance( + model, + webpackMap, + options ? options.onError : void 0, + options ? options.identifierPrefix : void 0, + options ? options.onPostpone : void 0, + options ? options.temporaryReferences : void 0, + void 0, + void 0, + function () { + var stream = new ReadableStream( + { + type: "bytes", + start: function () { + startWork(request); + }, + pull: function (controller) { + startFlowing(request, controller); + }, + cancel: function (reason) { + request.destination = null; + abort(request, reason); + } + }, + { highWaterMark: 0 } + ); + resolve({ prelude: stream }); + }, + reject + ); + if (options && options.signal) { + var signal = options.signal; + if (signal.aborted) abort(request, signal.reason); + else { + var listener = function () { + abort(request, signal.reason); + signal.removeEventListener("abort", listener); + }; + signal.addEventListener("abort", listener); + } + } + startWork(request); + }); +}; exports.registerClientReference = function ( proxyImplementation, id, @@ -2803,7 +2874,11 @@ exports.renderToReadableStream = function (model, webpackMap, options) { options ? options.onError : void 0, options ? options.identifierPrefix : void 0, options ? options.onPostpone : void 0, - options ? options.temporaryReferences : void 0 + options ? options.temporaryReferences : void 0, + void 0, + void 0, + void 0, + void 0 ); if (options && options.signal) { var signal = options.signal; @@ -2823,17 +2898,7 @@ exports.renderToReadableStream = function (model, webpackMap, options) { startWork(request); }, pull: function (controller) { - if (2 === request.status) - (request.status = 3), closeWithError(controller, request.fatalError); - else if (3 !== request.status && null === request.destination) { - request.destination = controller; - try { - flushCompletedChunks(request, controller); - } catch (error) { - logRecoverableError(request, error, null), - fatalError(request, error); - } - } + startFlowing(request, controller); }, cancel: function (reason) { request.destination = null; diff --git a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.node.development.js b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.node.development.js index 37125a3d3e5c4..02b71e90bb189 100644 --- a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.node.development.js +++ b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.node.development.js @@ -233,12 +233,13 @@ maybeIterable["@@iterator"]; return "function" === typeof maybeIterable ? maybeIterable : null; } - function noop() {} + function noop$1() {} function trackUsedThenable(thenableState, thenable, index) { index = thenableState[index]; void 0 === index ? thenableState.push(thenable) - : index !== thenable && (thenable.then(noop, noop), (thenable = index)); + : index !== thenable && + (thenable.then(noop$1, noop$1), (thenable = index)); switch (thenable.status) { case "fulfilled": return thenable.value; @@ -246,7 +247,7 @@ throw thenable.reason; default: "string" === typeof thenable.status - ? thenable.then(noop, noop) + ? thenable.then(noop$1, noop$1) : ((thenableState = thenable), (thenableState.status = "pending"), thenableState.then( @@ -672,7 +673,9 @@ onPostpone, temporaryReferences, environmentName, - filterStackFrame + filterStackFrame, + onAllReady, + onFatalError ) { if ( null !== ReactSharedInternalsServer.A && @@ -713,6 +716,8 @@ this.onError = void 0 === onError ? defaultErrorHandler : onError; this.onPostpone = void 0 === onPostpone ? defaultPostponeHandler : onPostpone; + this.onAllReady = void 0 === onAllReady ? noop : onAllReady; + this.onFatalError = void 0 === onFatalError ? noop : onFatalError; this.environmentName = void 0 === environmentName ? function () { @@ -731,6 +736,7 @@ model = createTask(this, model, null, !1, abortSet, null, null, null); pingedTasks.push(model); } + function noop() {} function resolveRequest() { if (currentRequest) return currentRequest; var store = requestStorage.getStore(); @@ -1005,6 +1011,7 @@ var componentDebugInfo = { name: "", env: task.environmentName, + key: null, owner: task.debugOwner }; componentDebugInfo.stack = @@ -1041,6 +1048,7 @@ componentDebugInfo = { name: componentDebugInfo, env: componentEnv, + key: key, owner: task.debugOwner }; componentDebugInfo.stack = @@ -1269,6 +1277,7 @@ ((validated = { name: "Fragment", env: (0, request.environmentName)(), + key: key, owner: task.debugOwner, stack: null === task.debugStack @@ -1870,6 +1879,7 @@ (request = { name: value.name, env: value.env, + key: value.key, owner: value.owner }), (request.stack = value.stack), @@ -2045,6 +2055,8 @@ return errorDigest || ""; } function fatalError(request, error) { + var onFatalError = request.onFatalError; + onFatalError(error); cleanupTaintQueue(request); null !== request.destination ? ((request.status = CLOSED), request.destination.destroy(error)) @@ -2253,6 +2265,7 @@ ? ((request = { name: value.name, env: value.env, + key: value.key, owner: value.owner }), (request.stack = @@ -2483,6 +2496,10 @@ retryTask(request, pingedTasks[i]); null !== request.destination && flushCompletedChunks(request, request.destination); + if (0 === request.abortableTasks.size) { + var onAllReady = request.onAllReady; + onAllReady(); + } } catch (error) { logRecoverableError(request, error, null), fatalError(request, error); } finally { @@ -3411,7 +3428,21 @@ abort(request, Error(reason)); }; } - var util = require("util"); + function createFakeWritable(readable) { + return { + write: function (chunk) { + return readable.push(chunk); + }, + end: function () { + readable.push(null); + }, + destroy: function (error) { + readable.destroy(error); + } + }; + } + var stream = require("stream"), + util = require("util"); require("crypto"); var async_hooks = require("async_hooks"), ReactDOM = require("react-dom"), @@ -3990,6 +4021,42 @@ }); return getChunk(response, 0); }; + exports.prerenderToNodeStream = function (model, webpackMap, options) { + return new Promise(function (resolve, reject) { + var request = new RequestInstance( + model, + webpackMap, + options ? options.onError : void 0, + options ? options.identifierPrefix : void 0, + options ? options.onPostpone : void 0, + options ? options.temporaryReferences : void 0, + options ? options.environmentName : void 0, + options ? options.filterStackFrame : void 0, + function () { + var readable = new stream.Readable({ + read: function () { + startFlowing(request, writable); + } + }), + writable = createFakeWritable(readable); + resolve({ prelude: readable }); + }, + reject + ); + if (options && options.signal) { + var signal = options.signal; + if (signal.aborted) abort(request, signal.reason); + else { + var listener = function () { + abort(request, signal.reason); + signal.removeEventListener("abort", listener); + }; + signal.addEventListener("abort", listener); + } + } + startWork(request); + }); + }; exports.registerClientReference = function ( proxyImplementation, id, @@ -4021,7 +4088,9 @@ options ? options.onPostpone : void 0, options ? options.temporaryReferences : void 0, options ? options.environmentName : void 0, - options ? options.filterStackFrame : void 0 + options ? options.filterStackFrame : void 0, + void 0, + void 0 ), hasStartedFlowing = !1; startWork(request); diff --git a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.node.production.js b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.node.production.js index 3a2198074a6a4..50cace4e0b6e7 100644 --- a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.node.production.js +++ b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.node.production.js @@ -9,7 +9,8 @@ */ "use strict"; -var util = require("util"); +var stream = require("stream"), + util = require("util"); require("crypto"); var async_hooks = require("async_hooks"), ReactDOM = require("react-dom"), @@ -460,12 +461,12 @@ var ASYNC_ITERATOR = Symbol.asyncIterator, SuspenseException = Error( "Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`" ); -function noop() {} +function noop$1() {} function trackUsedThenable(thenableState, thenable, index) { index = thenableState[index]; void 0 === index ? thenableState.push(thenable) - : index !== thenable && (thenable.then(noop, noop), (thenable = index)); + : index !== thenable && (thenable.then(noop$1, noop$1), (thenable = index)); switch (thenable.status) { case "fulfilled": return thenable.value; @@ -473,7 +474,7 @@ function trackUsedThenable(thenableState, thenable, index) { throw thenable.reason; default: "string" === typeof thenable.status - ? thenable.then(noop, noop) + ? thenable.then(noop$1, noop$1) : ((thenableState = thenable), (thenableState.status = "pending"), thenableState.then( @@ -750,7 +751,11 @@ function RequestInstance( onError, identifierPrefix, onPostpone, - temporaryReferences + temporaryReferences, + environmentName, + filterStackFrame, + onAllReady, + onFatalError ) { if ( null !== ReactSharedInternalsServer.A && @@ -758,9 +763,9 @@ function RequestInstance( ) throw Error("Currently React only supports one RSC renderer at a time."); ReactSharedInternalsServer.A = DefaultAsyncDispatcher; - var abortSet = new Set(), - pingedTasks = [], - cleanupQueue = []; + filterStackFrame = new Set(); + environmentName = []; + var cleanupQueue = []; TaintRegistryPendingRequests.add(cleanupQueue); var hints = new Set(); this.status = 0; @@ -771,8 +776,8 @@ function RequestInstance( this.pendingChunks = this.nextChunkId = 0; this.hints = hints; this.abortListeners = new Set(); - this.abortableTasks = abortSet; - this.pingedTasks = pingedTasks; + this.abortableTasks = filterStackFrame; + this.pingedTasks = environmentName; this.completedImportChunks = []; this.completedHintChunks = []; this.completedRegularChunks = []; @@ -787,9 +792,12 @@ function RequestInstance( this.taintCleanupQueue = cleanupQueue; this.onError = void 0 === onError ? defaultErrorHandler : onError; this.onPostpone = void 0 === onPostpone ? defaultPostponeHandler : onPostpone; - model = createTask(this, model, null, !1, abortSet); - pingedTasks.push(model); + this.onAllReady = void 0 === onAllReady ? noop : onAllReady; + this.onFatalError = void 0 === onFatalError ? noop : onFatalError; + model = createTask(this, model, null, !1, filterStackFrame); + environmentName.push(model); } +function noop() {} var currentRequest = null; function resolveRequest() { if (currentRequest) return currentRequest; @@ -1694,6 +1702,8 @@ function logRecoverableError(request, error) { return errorDigest || ""; } function fatalError(request, error) { + var onFatalError = request.onFatalError; + onFatalError(error); cleanupTaintQueue(request); null !== request.destination ? ((request.status = 3), request.destination.destroy(error)) @@ -1861,6 +1871,10 @@ function performWork(request) { retryTask(request, pingedTasks[i]); null !== request.destination && flushCompletedChunks(request, request.destination); + if (0 === request.abortableTasks.size) { + var onAllReady = request.onAllReady; + onAllReady(); + } } catch (error) { logRecoverableError(request, error, null), fatalError(request, error); } finally { @@ -2754,6 +2768,19 @@ function createCancelHandler(request, reason) { abort(request, Error(reason)); }; } +function createFakeWritable(readable) { + return { + write: function (chunk) { + return readable.push(chunk); + }, + end: function () { + readable.push(null); + }, + destroy: function (error) { + readable.destroy(error); + } + }; +} exports.createClientModuleProxy = function (moduleId) { moduleId = registerClientReferenceImpl({}, moduleId, !1); return new Proxy(moduleId, proxyHandlers$1); @@ -2860,6 +2887,42 @@ exports.decodeReplyFromBusboy = function (busboyStream, webpackMap, options) { }); return getChunk(response, 0); }; +exports.prerenderToNodeStream = function (model, webpackMap, options) { + return new Promise(function (resolve, reject) { + var request = new RequestInstance( + model, + webpackMap, + options ? options.onError : void 0, + options ? options.identifierPrefix : void 0, + options ? options.onPostpone : void 0, + options ? options.temporaryReferences : void 0, + void 0, + void 0, + function () { + var readable = new stream.Readable({ + read: function () { + startFlowing(request, writable); + } + }), + writable = createFakeWritable(readable); + resolve({ prelude: readable }); + }, + reject + ); + if (options && options.signal) { + var signal = options.signal; + if (signal.aborted) abort(request, signal.reason); + else { + var listener = function () { + abort(request, signal.reason); + signal.removeEventListener("abort", listener); + }; + signal.addEventListener("abort", listener); + } + } + startWork(request); + }); +}; exports.registerClientReference = function ( proxyImplementation, id, @@ -2889,7 +2952,11 @@ exports.renderToPipeableStream = function (model, webpackMap, options) { options ? options.onError : void 0, options ? options.identifierPrefix : void 0, options ? options.onPostpone : void 0, - options ? options.temporaryReferences : void 0 + options ? options.temporaryReferences : void 0, + void 0, + void 0, + void 0, + void 0 ), hasStartedFlowing = !1; startWork(request); diff --git a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.node.unbundled.development.js b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.node.unbundled.development.js index 00b626175af2d..f60df85db9a35 100644 --- a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.node.unbundled.development.js +++ b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.node.unbundled.development.js @@ -233,12 +233,13 @@ maybeIterable["@@iterator"]; return "function" === typeof maybeIterable ? maybeIterable : null; } - function noop() {} + function noop$1() {} function trackUsedThenable(thenableState, thenable, index) { index = thenableState[index]; void 0 === index ? thenableState.push(thenable) - : index !== thenable && (thenable.then(noop, noop), (thenable = index)); + : index !== thenable && + (thenable.then(noop$1, noop$1), (thenable = index)); switch (thenable.status) { case "fulfilled": return thenable.value; @@ -246,7 +247,7 @@ throw thenable.reason; default: "string" === typeof thenable.status - ? thenable.then(noop, noop) + ? thenable.then(noop$1, noop$1) : ((thenableState = thenable), (thenableState.status = "pending"), thenableState.then( @@ -672,7 +673,9 @@ onPostpone, temporaryReferences, environmentName, - filterStackFrame + filterStackFrame, + onAllReady, + onFatalError ) { if ( null !== ReactSharedInternalsServer.A && @@ -713,6 +716,8 @@ this.onError = void 0 === onError ? defaultErrorHandler : onError; this.onPostpone = void 0 === onPostpone ? defaultPostponeHandler : onPostpone; + this.onAllReady = void 0 === onAllReady ? noop : onAllReady; + this.onFatalError = void 0 === onFatalError ? noop : onFatalError; this.environmentName = void 0 === environmentName ? function () { @@ -731,6 +736,7 @@ model = createTask(this, model, null, !1, abortSet, null, null, null); pingedTasks.push(model); } + function noop() {} function resolveRequest() { if (currentRequest) return currentRequest; var store = requestStorage.getStore(); @@ -1005,6 +1011,7 @@ var componentDebugInfo = { name: "", env: task.environmentName, + key: null, owner: task.debugOwner }; componentDebugInfo.stack = @@ -1041,6 +1048,7 @@ componentDebugInfo = { name: componentDebugInfo, env: componentEnv, + key: key, owner: task.debugOwner }; componentDebugInfo.stack = @@ -1269,6 +1277,7 @@ ((validated = { name: "Fragment", env: (0, request.environmentName)(), + key: key, owner: task.debugOwner, stack: null === task.debugStack @@ -1870,6 +1879,7 @@ (request = { name: value.name, env: value.env, + key: value.key, owner: value.owner }), (request.stack = value.stack), @@ -2045,6 +2055,8 @@ return errorDigest || ""; } function fatalError(request, error) { + var onFatalError = request.onFatalError; + onFatalError(error); cleanupTaintQueue(request); null !== request.destination ? ((request.status = CLOSED), request.destination.destroy(error)) @@ -2253,6 +2265,7 @@ ? ((request = { name: value.name, env: value.env, + key: value.key, owner: value.owner }), (request.stack = @@ -2483,6 +2496,10 @@ retryTask(request, pingedTasks[i]); null !== request.destination && flushCompletedChunks(request, request.destination); + if (0 === request.abortableTasks.size) { + var onAllReady = request.onAllReady; + onAllReady(); + } } catch (error) { logRecoverableError(request, error, null), fatalError(request, error); } finally { @@ -3376,7 +3393,21 @@ abort(request, Error(reason)); }; } - var util = require("util"); + function createFakeWritable(readable) { + return { + write: function (chunk) { + return readable.push(chunk); + }, + end: function () { + readable.push(null); + }, + destroy: function (error) { + readable.destroy(error); + } + }; + } + var stream = require("stream"), + util = require("util"); require("crypto"); var async_hooks = require("async_hooks"), ReactDOM = require("react-dom"), @@ -3955,6 +3986,42 @@ }); return getChunk(response, 0); }; + exports.prerenderToNodeStream = function (model, webpackMap, options) { + return new Promise(function (resolve, reject) { + var request = new RequestInstance( + model, + webpackMap, + options ? options.onError : void 0, + options ? options.identifierPrefix : void 0, + options ? options.onPostpone : void 0, + options ? options.temporaryReferences : void 0, + options ? options.environmentName : void 0, + options ? options.filterStackFrame : void 0, + function () { + var readable = new stream.Readable({ + read: function () { + startFlowing(request, writable); + } + }), + writable = createFakeWritable(readable); + resolve({ prelude: readable }); + }, + reject + ); + if (options && options.signal) { + var signal = options.signal; + if (signal.aborted) abort(request, signal.reason); + else { + var listener = function () { + abort(request, signal.reason); + signal.removeEventListener("abort", listener); + }; + signal.addEventListener("abort", listener); + } + } + startWork(request); + }); + }; exports.registerClientReference = function ( proxyImplementation, id, @@ -3986,7 +4053,9 @@ options ? options.onPostpone : void 0, options ? options.temporaryReferences : void 0, options ? options.environmentName : void 0, - options ? options.filterStackFrame : void 0 + options ? options.filterStackFrame : void 0, + void 0, + void 0 ), hasStartedFlowing = !1; startWork(request); diff --git a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.node.unbundled.production.js b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.node.unbundled.production.js index f1d7b7e72b569..168c2d6513f57 100644 --- a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.node.unbundled.production.js +++ b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-server.node.unbundled.production.js @@ -9,7 +9,8 @@ */ "use strict"; -var util = require("util"); +var stream = require("stream"), + util = require("util"); require("crypto"); var async_hooks = require("async_hooks"), ReactDOM = require("react-dom"), @@ -460,12 +461,12 @@ var ASYNC_ITERATOR = Symbol.asyncIterator, SuspenseException = Error( "Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`" ); -function noop() {} +function noop$1() {} function trackUsedThenable(thenableState, thenable, index) { index = thenableState[index]; void 0 === index ? thenableState.push(thenable) - : index !== thenable && (thenable.then(noop, noop), (thenable = index)); + : index !== thenable && (thenable.then(noop$1, noop$1), (thenable = index)); switch (thenable.status) { case "fulfilled": return thenable.value; @@ -473,7 +474,7 @@ function trackUsedThenable(thenableState, thenable, index) { throw thenable.reason; default: "string" === typeof thenable.status - ? thenable.then(noop, noop) + ? thenable.then(noop$1, noop$1) : ((thenableState = thenable), (thenableState.status = "pending"), thenableState.then( @@ -750,7 +751,11 @@ function RequestInstance( onError, identifierPrefix, onPostpone, - temporaryReferences + temporaryReferences, + environmentName, + filterStackFrame, + onAllReady, + onFatalError ) { if ( null !== ReactSharedInternalsServer.A && @@ -758,9 +763,9 @@ function RequestInstance( ) throw Error("Currently React only supports one RSC renderer at a time."); ReactSharedInternalsServer.A = DefaultAsyncDispatcher; - var abortSet = new Set(), - pingedTasks = [], - cleanupQueue = []; + filterStackFrame = new Set(); + environmentName = []; + var cleanupQueue = []; TaintRegistryPendingRequests.add(cleanupQueue); var hints = new Set(); this.status = 0; @@ -771,8 +776,8 @@ function RequestInstance( this.pendingChunks = this.nextChunkId = 0; this.hints = hints; this.abortListeners = new Set(); - this.abortableTasks = abortSet; - this.pingedTasks = pingedTasks; + this.abortableTasks = filterStackFrame; + this.pingedTasks = environmentName; this.completedImportChunks = []; this.completedHintChunks = []; this.completedRegularChunks = []; @@ -787,9 +792,12 @@ function RequestInstance( this.taintCleanupQueue = cleanupQueue; this.onError = void 0 === onError ? defaultErrorHandler : onError; this.onPostpone = void 0 === onPostpone ? defaultPostponeHandler : onPostpone; - model = createTask(this, model, null, !1, abortSet); - pingedTasks.push(model); + this.onAllReady = void 0 === onAllReady ? noop : onAllReady; + this.onFatalError = void 0 === onFatalError ? noop : onFatalError; + model = createTask(this, model, null, !1, filterStackFrame); + environmentName.push(model); } +function noop() {} var currentRequest = null; function resolveRequest() { if (currentRequest) return currentRequest; @@ -1694,6 +1702,8 @@ function logRecoverableError(request, error) { return errorDigest || ""; } function fatalError(request, error) { + var onFatalError = request.onFatalError; + onFatalError(error); cleanupTaintQueue(request); null !== request.destination ? ((request.status = 3), request.destination.destroy(error)) @@ -1861,6 +1871,10 @@ function performWork(request) { retryTask(request, pingedTasks[i]); null !== request.destination && flushCompletedChunks(request, request.destination); + if (0 === request.abortableTasks.size) { + var onAllReady = request.onAllReady; + onAllReady(); + } } catch (error) { logRecoverableError(request, error, null), fatalError(request, error); } finally { @@ -2722,6 +2736,19 @@ function createCancelHandler(request, reason) { abort(request, Error(reason)); }; } +function createFakeWritable(readable) { + return { + write: function (chunk) { + return readable.push(chunk); + }, + end: function () { + readable.push(null); + }, + destroy: function (error) { + readable.destroy(error); + } + }; +} exports.createClientModuleProxy = function (moduleId) { moduleId = registerClientReferenceImpl({}, moduleId, !1); return new Proxy(moduleId, proxyHandlers$1); @@ -2828,6 +2855,42 @@ exports.decodeReplyFromBusboy = function (busboyStream, webpackMap, options) { }); return getChunk(response, 0); }; +exports.prerenderToNodeStream = function (model, webpackMap, options) { + return new Promise(function (resolve, reject) { + var request = new RequestInstance( + model, + webpackMap, + options ? options.onError : void 0, + options ? options.identifierPrefix : void 0, + options ? options.onPostpone : void 0, + options ? options.temporaryReferences : void 0, + void 0, + void 0, + function () { + var readable = new stream.Readable({ + read: function () { + startFlowing(request, writable); + } + }), + writable = createFakeWritable(readable); + resolve({ prelude: readable }); + }, + reject + ); + if (options && options.signal) { + var signal = options.signal; + if (signal.aborted) abort(request, signal.reason); + else { + var listener = function () { + abort(request, signal.reason); + signal.removeEventListener("abort", listener); + }; + signal.addEventListener("abort", listener); + } + } + startWork(request); + }); +}; exports.registerClientReference = function ( proxyImplementation, id, @@ -2857,7 +2920,11 @@ exports.renderToPipeableStream = function (model, webpackMap, options) { options ? options.onError : void 0, options ? options.identifierPrefix : void 0, options ? options.onPostpone : void 0, - options ? options.temporaryReferences : void 0 + options ? options.temporaryReferences : void 0, + void 0, + void 0, + void 0, + void 0 ), hasStartedFlowing = !1; startWork(request); diff --git a/packages/next/src/compiled/react-server-dom-webpack-experimental/package.json b/packages/next/src/compiled/react-server-dom-webpack-experimental/package.json index 5114b4144ac64..ab7a039ac5172 100644 --- a/packages/next/src/compiled/react-server-dom-webpack-experimental/package.json +++ b/packages/next/src/compiled/react-server-dom-webpack-experimental/package.json @@ -37,6 +37,23 @@ "./server.edge": "./server.edge.js", "./server.node": "./server.node.js", "./server.node.unbundled": "./server.node.unbundled.js", + "./static": { + "react-server": { + "workerd": "./static.edge.js", + "deno": "./static.browser.js", + "node": { + "webpack": "./static.node.js", + "default": "./static.node.unbundled.js" + }, + "edge-light": "./static.edge.js", + "browser": "./static.browser.js" + }, + "default": "./static.js" + }, + "./static.browser": "./static.browser.js", + "./static.edge": "./static.edge.js", + "./static.node": "./static.node.js", + "./static.node.unbundled": "./static.node.unbundled.js", "./node-loader": "./esm/react-server-dom-webpack-node-loader.production.js", "./node-register": "./node-register.js", "./package.json": "./package.json" @@ -46,8 +63,8 @@ "neo-async": "^2.6.1" }, "peerDependencies": { - "react": "0.0.0-experimental-49496d49-20240814", - "react-dom": "0.0.0-experimental-49496d49-20240814", + "react": "0.0.0-experimental-1eaccd82-20240816", + "react-dom": "0.0.0-experimental-1eaccd82-20240816", "webpack": "^5.59.0" } } \ No newline at end of file diff --git a/packages/next/src/compiled/react-server-dom-webpack-experimental/server.browser.js b/packages/next/src/compiled/react-server-dom-webpack-experimental/server.browser.js index 12fe5da29af0f..326cc56b6587b 100644 --- a/packages/next/src/compiled/react-server-dom-webpack-experimental/server.browser.js +++ b/packages/next/src/compiled/react-server-dom-webpack-experimental/server.browser.js @@ -1,7 +1,17 @@ 'use strict'; +var s; if (process.env.NODE_ENV === 'production') { - module.exports = require('./cjs/react-server-dom-webpack-server.browser.production.js'); + s = require('./cjs/react-server-dom-webpack-server.browser.production.js'); } else { - module.exports = require('./cjs/react-server-dom-webpack-server.browser.development.js'); + s = require('./cjs/react-server-dom-webpack-server.browser.development.js'); } + +exports.renderToReadableStream = s.renderToReadableStream; +exports.decodeReply = s.decodeReply; +exports.decodeAction = s.decodeAction; +exports.decodeFormState = s.decodeFormState; +exports.registerServerReference = s.registerServerReference; +exports.registerClientReference = s.registerClientReference; +exports.createClientModuleProxy = s.createClientModuleProxy; +exports.createTemporaryReferenceSet = s.createTemporaryReferenceSet; diff --git a/packages/next/src/compiled/react-server-dom-webpack-experimental/server.edge.js b/packages/next/src/compiled/react-server-dom-webpack-experimental/server.edge.js index ceab7b1ea0626..591b84476884d 100644 --- a/packages/next/src/compiled/react-server-dom-webpack-experimental/server.edge.js +++ b/packages/next/src/compiled/react-server-dom-webpack-experimental/server.edge.js @@ -1,7 +1,17 @@ 'use strict'; +var s; if (process.env.NODE_ENV === 'production') { - module.exports = require('./cjs/react-server-dom-webpack-server.edge.production.js'); + s = require('./cjs/react-server-dom-webpack-server.edge.production.js'); } else { - module.exports = require('./cjs/react-server-dom-webpack-server.edge.development.js'); + s = require('./cjs/react-server-dom-webpack-server.edge.development.js'); } + +exports.renderToReadableStream = s.renderToReadableStream; +exports.decodeReply = s.decodeReply; +exports.decodeAction = s.decodeAction; +exports.decodeFormState = s.decodeFormState; +exports.registerServerReference = s.registerServerReference; +exports.registerClientReference = s.registerClientReference; +exports.createClientModuleProxy = s.createClientModuleProxy; +exports.createTemporaryReferenceSet = s.createTemporaryReferenceSet; diff --git a/packages/next/src/compiled/react-server-dom-webpack-experimental/server.node.js b/packages/next/src/compiled/react-server-dom-webpack-experimental/server.node.js index 84da8eda2a247..6885e43a44fc0 100644 --- a/packages/next/src/compiled/react-server-dom-webpack-experimental/server.node.js +++ b/packages/next/src/compiled/react-server-dom-webpack-experimental/server.node.js @@ -1,7 +1,18 @@ 'use strict'; +var s; if (process.env.NODE_ENV === 'production') { - module.exports = require('./cjs/react-server-dom-webpack-server.node.production.js'); + s = require('./cjs/react-server-dom-webpack-server.node.production.js'); } else { - module.exports = require('./cjs/react-server-dom-webpack-server.node.development.js'); + s = require('./cjs/react-server-dom-webpack-server.node.development.js'); } + +exports.renderToPipeableStream = s.renderToPipeableStream; +exports.decodeReplyFromBusboy = s.decodeReplyFromBusboy; +exports.decodeReply = s.decodeReply; +exports.decodeAction = s.decodeAction; +exports.decodeFormState = s.decodeFormState; +exports.registerServerReference = s.registerServerReference; +exports.registerClientReference = s.registerClientReference; +exports.createClientModuleProxy = s.createClientModuleProxy; +exports.createTemporaryReferenceSet = s.createTemporaryReferenceSet; diff --git a/packages/next/src/compiled/react-server-dom-webpack-experimental/server.node.unbundled.js b/packages/next/src/compiled/react-server-dom-webpack-experimental/server.node.unbundled.js index 26e6677eed9bc..333b6b0d3122e 100644 --- a/packages/next/src/compiled/react-server-dom-webpack-experimental/server.node.unbundled.js +++ b/packages/next/src/compiled/react-server-dom-webpack-experimental/server.node.unbundled.js @@ -1,7 +1,18 @@ 'use strict'; +var s; if (process.env.NODE_ENV === 'production') { - module.exports = require('./cjs/react-server-dom-webpack-server.node.unbundled.production.js'); + s = require('./cjs/react-server-dom-webpack-server.node.unbundled.production.js'); } else { - module.exports = require('./cjs/react-server-dom-webpack-server.node.unbundled.development.js'); + s = require('./cjs/react-server-dom-webpack-server.node.unbundled.development.js'); } + +exports.renderToPipeableStream = s.renderToPipeableStream; +exports.decodeReplyFromBusboy = s.decodeReplyFromBusboy; +exports.decodeReply = s.decodeReply; +exports.decodeAction = s.decodeAction; +exports.decodeFormState = s.decodeFormState; +exports.registerServerReference = s.registerServerReference; +exports.registerClientReference = s.registerClientReference; +exports.createClientModuleProxy = s.createClientModuleProxy; +exports.createTemporaryReferenceSet = s.createTemporaryReferenceSet; diff --git a/packages/next/src/compiled/react-server-dom-webpack-experimental/static.browser.js b/packages/next/src/compiled/react-server-dom-webpack-experimental/static.browser.js new file mode 100644 index 0000000000000..7d514abd6bf71 --- /dev/null +++ b/packages/next/src/compiled/react-server-dom-webpack-experimental/static.browser.js @@ -0,0 +1,12 @@ +'use strict'; + +var s; +if (process.env.NODE_ENV === 'production') { + s = require('./cjs/react-server-dom-webpack-server.browser.production.js'); +} else { + s = require('./cjs/react-server-dom-webpack-server.browser.development.js'); +} + +if (s.prerender) { + exports.prerender = s.prerender; +} diff --git a/packages/next/src/compiled/react-server-dom-webpack-experimental/static.edge.js b/packages/next/src/compiled/react-server-dom-webpack-experimental/static.edge.js new file mode 100644 index 0000000000000..a4ae48f55eb1b --- /dev/null +++ b/packages/next/src/compiled/react-server-dom-webpack-experimental/static.edge.js @@ -0,0 +1,12 @@ +'use strict'; + +var s; +if (process.env.NODE_ENV === 'production') { + s = require('./cjs/react-server-dom-webpack-server.edge.production.js'); +} else { + s = require('./cjs/react-server-dom-webpack-server.edge.development.js'); +} + +if (s.prerender) { + exports.prerender = s.prerender; +} diff --git a/packages/next/src/compiled/react-server-dom-webpack-experimental/static.js b/packages/next/src/compiled/react-server-dom-webpack-experimental/static.js new file mode 100644 index 0000000000000..13a632e641179 --- /dev/null +++ b/packages/next/src/compiled/react-server-dom-webpack-experimental/static.js @@ -0,0 +1,6 @@ +'use strict'; + +throw new Error( + 'The React Server Writer cannot be used outside a react-server environment. ' + + 'You must configure Node.js using the `--conditions react-server` flag.' +); diff --git a/packages/next/src/compiled/react-server-dom-webpack-experimental/static.node.js b/packages/next/src/compiled/react-server-dom-webpack-experimental/static.node.js new file mode 100644 index 0000000000000..dbc4179d3e788 --- /dev/null +++ b/packages/next/src/compiled/react-server-dom-webpack-experimental/static.node.js @@ -0,0 +1,12 @@ +'use strict'; + +var s; +if (process.env.NODE_ENV === 'production') { + s = require('./cjs/react-server-dom-webpack-server.node.production.js'); +} else { + s = require('./cjs/react-server-dom-webpack-server.node.development.js'); +} + +if (s.prerenderToNodeStream) { + exports.prerenderToNodeStream = s.prerenderToNodeStream; +} diff --git a/packages/next/src/compiled/react-server-dom-webpack-experimental/static.node.unbundled.js b/packages/next/src/compiled/react-server-dom-webpack-experimental/static.node.unbundled.js new file mode 100644 index 0000000000000..73c8a3b86e9c7 --- /dev/null +++ b/packages/next/src/compiled/react-server-dom-webpack-experimental/static.node.unbundled.js @@ -0,0 +1,12 @@ +'use strict'; + +var s; +if (process.env.NODE_ENV === 'production') { + s = require('./cjs/react-server-dom-webpack-server.node.unbundled.production.js'); +} else { + s = require('./cjs/react-server-dom-webpack-server.node.unbundled.development.js'); +} + +if (s.prerenderToNodeStream) { + exports.prerenderToNodeStream = s.prerenderToNodeStream; +} diff --git a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.development.js b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.development.js index aedafa422736b..a43c1bc10dbcf 100644 --- a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.development.js +++ b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.development.js @@ -210,12 +210,13 @@ maybeIterable["@@iterator"]; return "function" === typeof maybeIterable ? maybeIterable : null; } - function noop() {} + function noop$1() {} function trackUsedThenable(thenableState, thenable, index) { index = thenableState[index]; void 0 === index ? thenableState.push(thenable) - : index !== thenable && (thenable.then(noop, noop), (thenable = index)); + : index !== thenable && + (thenable.then(noop$1, noop$1), (thenable = index)); switch (thenable.status) { case "fulfilled": return thenable.value; @@ -223,7 +224,7 @@ throw thenable.reason; default: "string" === typeof thenable.status - ? thenable.then(noop, noop) + ? thenable.then(noop$1, noop$1) : ((thenableState = thenable), (thenableState.status = "pending"), thenableState.then( @@ -498,7 +499,9 @@ onPostpone, temporaryReferences, environmentName, - filterStackFrame + filterStackFrame, + onAllReady, + onFatalError ) { if ( null !== ReactSharedInternalsServer.A && @@ -537,6 +540,8 @@ this.onError = void 0 === onError ? defaultErrorHandler : onError; this.onPostpone = void 0 === onPostpone ? defaultPostponeHandler : onPostpone; + this.onAllReady = void 0 === onAllReady ? noop : onAllReady; + this.onFatalError = void 0 === onFatalError ? noop : onFatalError; this.environmentName = void 0 === environmentName ? function () { @@ -555,6 +560,7 @@ model = createTask(this, model, null, !1, abortSet, null); pingedTasks.push(model); } + function noop() {} function serializeThenable(request, task, thenable) { var newTask = createTask( request, @@ -784,6 +790,7 @@ currentOwner = { name: "", env: task.environmentName, + key: null, owner: task.debugOwner }; try { @@ -806,6 +813,7 @@ componentDebugInfo = { name: componentDebugInfo, env: componentEnv, + key: key, owner: task.debugOwner }; outlineModel(request, componentDebugInfo); @@ -1499,7 +1507,12 @@ describeObjectForErrorMessage(parent, parentPropertyName) ); if (isReactComponentInfo(value)) - return { name: value.name, env: value.env, owner: value.owner }; + return { + name: value.name, + env: value.env, + key: value.key, + owner: value.owner + }; if ("Object" !== objectName(value)) callWithDebugContextInDEV(request, task, function () { console.error( @@ -1633,6 +1646,8 @@ return errorDigest || ""; } function fatalError(request, error) { + var onFatalError = request.onFatalError; + onFatalError(error); null !== request.destination ? ((request.status = CLOSED), closeWithError(request.destination, error)) @@ -1873,6 +1888,7 @@ ? { name: value.name, env: value.env, + key: value.key, owner: value.owner } : value; @@ -2064,6 +2080,10 @@ retryTask(request, pingedTasks[i]); null !== request.destination && flushCompletedChunks(request, request.destination); + if (0 === request.abortableTasks.size) { + var onAllReady = request.onAllReady; + onAllReady(); + } } catch (error) { logRecoverableError(request, error, null), fatalError(request, error); } finally { @@ -3482,7 +3502,9 @@ options ? options.onPostpone : void 0, options ? options.temporaryReferences : void 0, options ? options.environmentName : void 0, - options ? options.filterStackFrame : void 0 + options ? options.filterStackFrame : void 0, + void 0, + void 0 ); if (options && options.signal) { var signal = options.signal; diff --git a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.production.js b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.production.js index f7994a3c905f9..704974b3259e7 100644 --- a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.production.js +++ b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.production.js @@ -443,12 +443,12 @@ var ASYNC_ITERATOR = Symbol.asyncIterator, SuspenseException = Error( "Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`" ); -function noop() {} +function noop$1() {} function trackUsedThenable(thenableState, thenable, index) { index = thenableState[index]; void 0 === index ? thenableState.push(thenable) - : index !== thenable && (thenable.then(noop, noop), (thenable = index)); + : index !== thenable && (thenable.then(noop$1, noop$1), (thenable = index)); switch (thenable.status) { case "fulfilled": return thenable.value; @@ -456,7 +456,7 @@ function trackUsedThenable(thenableState, thenable, index) { throw thenable.reason; default: "string" === typeof thenable.status - ? thenable.then(noop, noop) + ? thenable.then(noop$1, noop$1) : ((thenableState = thenable), (thenableState.status = "pending"), thenableState.then( @@ -712,7 +712,11 @@ function RequestInstance( onError, identifierPrefix, onPostpone, - temporaryReferences + temporaryReferences, + environmentName, + filterStackFrame, + onAllReady, + onFatalError ) { if ( null !== ReactSharedInternalsServer.A && @@ -720,9 +724,9 @@ function RequestInstance( ) throw Error("Currently React only supports one RSC renderer at a time."); ReactSharedInternalsServer.A = DefaultAsyncDispatcher; - var abortSet = new Set(), - pingedTasks = [], - hints = new Set(); + filterStackFrame = new Set(); + environmentName = []; + var hints = new Set(); this.status = 0; this.flushScheduled = !1; this.destination = this.fatalError = null; @@ -731,8 +735,8 @@ function RequestInstance( this.pendingChunks = this.nextChunkId = 0; this.hints = hints; this.abortListeners = new Set(); - this.abortableTasks = abortSet; - this.pingedTasks = pingedTasks; + this.abortableTasks = filterStackFrame; + this.pingedTasks = environmentName; this.completedImportChunks = []; this.completedHintChunks = []; this.completedRegularChunks = []; @@ -747,9 +751,12 @@ function RequestInstance( this.taintCleanupQueue = []; this.onError = void 0 === onError ? defaultErrorHandler : onError; this.onPostpone = void 0 === onPostpone ? defaultPostponeHandler : onPostpone; - model = createTask(this, model, null, !1, abortSet); - pingedTasks.push(model); + this.onAllReady = void 0 === onAllReady ? noop : onAllReady; + this.onFatalError = void 0 === onFatalError ? noop : onFatalError; + model = createTask(this, model, null, !1, filterStackFrame); + environmentName.push(model); } +function noop() {} var currentRequest = null; function serializeThenable(request, task, thenable) { var newTask = createTask( @@ -1602,6 +1609,8 @@ function logRecoverableError(request, error) { return errorDigest || ""; } function fatalError(request, error) { + var onFatalError = request.onFatalError; + onFatalError(error); null !== request.destination ? ((request.status = 3), closeWithError(request.destination, error)) : ((request.status = 2), (request.fatalError = error)); @@ -1744,6 +1753,10 @@ function performWork(request) { retryTask(request, pingedTasks[i]); null !== request.destination && flushCompletedChunks(request, request.destination); + if (0 === request.abortableTasks.size) { + var onAllReady = request.onAllReady; + onAllReady(); + } } catch (error) { logRecoverableError(request, error, null), fatalError(request, error); } finally { @@ -2664,7 +2677,11 @@ exports.renderToReadableStream = function (model, webpackMap, options) { options ? options.onError : void 0, options ? options.identifierPrefix : void 0, options ? options.onPostpone : void 0, - options ? options.temporaryReferences : void 0 + options ? options.temporaryReferences : void 0, + void 0, + void 0, + void 0, + void 0 ); if (options && options.signal) { var signal = options.signal; diff --git a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.development.js b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.development.js index 27c81dd891ed9..2a8a144f40fbd 100644 --- a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.development.js +++ b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.development.js @@ -206,12 +206,13 @@ maybeIterable["@@iterator"]; return "function" === typeof maybeIterable ? maybeIterable : null; } - function noop() {} + function noop$1() {} function trackUsedThenable(thenableState, thenable, index) { index = thenableState[index]; void 0 === index ? thenableState.push(thenable) - : index !== thenable && (thenable.then(noop, noop), (thenable = index)); + : index !== thenable && + (thenable.then(noop$1, noop$1), (thenable = index)); switch (thenable.status) { case "fulfilled": return thenable.value; @@ -219,7 +220,7 @@ throw thenable.reason; default: "string" === typeof thenable.status - ? thenable.then(noop, noop) + ? thenable.then(noop$1, noop$1) : ((thenableState = thenable), (thenableState.status = "pending"), thenableState.then( @@ -494,7 +495,9 @@ onPostpone, temporaryReferences, environmentName, - filterStackFrame + filterStackFrame, + onAllReady, + onFatalError ) { if ( null !== ReactSharedInternalsServer.A && @@ -533,6 +536,8 @@ this.onError = void 0 === onError ? defaultErrorHandler : onError; this.onPostpone = void 0 === onPostpone ? defaultPostponeHandler : onPostpone; + this.onAllReady = void 0 === onAllReady ? noop : onAllReady; + this.onFatalError = void 0 === onFatalError ? noop : onFatalError; this.environmentName = void 0 === environmentName ? function () { @@ -551,6 +556,7 @@ model = createTask(this, model, null, !1, abortSet, null); pingedTasks.push(model); } + function noop() {} function resolveRequest() { if (currentRequest) return currentRequest; if (supportsRequestStorage) { @@ -788,6 +794,7 @@ currentOwner = { name: "", env: task.environmentName, + key: null, owner: task.debugOwner }; try { @@ -810,6 +817,7 @@ componentDebugInfo = { name: componentDebugInfo, env: componentEnv, + key: key, owner: task.debugOwner }; outlineModel(request, componentDebugInfo); @@ -1511,7 +1519,12 @@ describeObjectForErrorMessage(parent, parentPropertyName) ); if (isReactComponentInfo(value)) - return { name: value.name, env: value.env, owner: value.owner }; + return { + name: value.name, + env: value.env, + key: value.key, + owner: value.owner + }; if ("Object" !== objectName(value)) callWithDebugContextInDEV(request, task, function () { console.error( @@ -1656,6 +1669,8 @@ return errorDigest || ""; } function fatalError(request, error) { + var onFatalError = request.onFatalError; + onFatalError(error); null !== request.destination ? ((request.status = CLOSED), closeWithError(request.destination, error)) @@ -1896,6 +1911,7 @@ ? { name: value.name, env: value.env, + key: value.key, owner: value.owner } : value; @@ -2087,6 +2103,10 @@ retryTask(request, pingedTasks[i]); null !== request.destination && flushCompletedChunks(request, request.destination); + if (0 === request.abortableTasks.size) { + var onAllReady = request.onAllReady; + onAllReady(); + } } catch (error) { logRecoverableError(request, error, null), fatalError(request, error); } finally { @@ -3517,7 +3537,9 @@ const setTimeoutOrImmediate = options ? options.onPostpone : void 0, options ? options.temporaryReferences : void 0, options ? options.environmentName : void 0, - options ? options.filterStackFrame : void 0 + options ? options.filterStackFrame : void 0, + void 0, + void 0 ); if (options && options.signal) { var signal = options.signal; diff --git a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.production.js b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.production.js index b80d2be4cc69d..268eaacf9c3da 100644 --- a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.production.js +++ b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.production.js @@ -441,12 +441,12 @@ var ASYNC_ITERATOR = Symbol.asyncIterator, SuspenseException = Error( "Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`" ); -function noop() {} +function noop$1() {} function trackUsedThenable(thenableState, thenable, index) { index = thenableState[index]; void 0 === index ? thenableState.push(thenable) - : index !== thenable && (thenable.then(noop, noop), (thenable = index)); + : index !== thenable && (thenable.then(noop$1, noop$1), (thenable = index)); switch (thenable.status) { case "fulfilled": return thenable.value; @@ -454,7 +454,7 @@ function trackUsedThenable(thenableState, thenable, index) { throw thenable.reason; default: "string" === typeof thenable.status - ? thenable.then(noop, noop) + ? thenable.then(noop$1, noop$1) : ((thenableState = thenable), (thenableState.status = "pending"), thenableState.then( @@ -709,7 +709,11 @@ function RequestInstance( onError, identifierPrefix, onPostpone, - temporaryReferences + temporaryReferences, + environmentName, + filterStackFrame, + onAllReady, + onFatalError ) { if ( null !== ReactSharedInternalsServer.A && @@ -717,9 +721,9 @@ function RequestInstance( ) throw Error("Currently React only supports one RSC renderer at a time."); ReactSharedInternalsServer.A = DefaultAsyncDispatcher; - var abortSet = new Set(), - pingedTasks = [], - hints = new Set(); + filterStackFrame = new Set(); + environmentName = []; + var hints = new Set(); this.status = 0; this.flushScheduled = !1; this.destination = this.fatalError = null; @@ -728,8 +732,8 @@ function RequestInstance( this.pendingChunks = this.nextChunkId = 0; this.hints = hints; this.abortListeners = new Set(); - this.abortableTasks = abortSet; - this.pingedTasks = pingedTasks; + this.abortableTasks = filterStackFrame; + this.pingedTasks = environmentName; this.completedImportChunks = []; this.completedHintChunks = []; this.completedRegularChunks = []; @@ -744,9 +748,12 @@ function RequestInstance( this.taintCleanupQueue = []; this.onError = void 0 === onError ? defaultErrorHandler : onError; this.onPostpone = void 0 === onPostpone ? defaultPostponeHandler : onPostpone; - model = createTask(this, model, null, !1, abortSet); - pingedTasks.push(model); + this.onAllReady = void 0 === onAllReady ? noop : onAllReady; + this.onFatalError = void 0 === onFatalError ? noop : onFatalError; + model = createTask(this, model, null, !1, filterStackFrame); + environmentName.push(model); } +function noop() {} var currentRequest = null; function resolveRequest() { if (currentRequest) return currentRequest; @@ -1609,6 +1616,8 @@ function logRecoverableError(request, error) { return errorDigest || ""; } function fatalError(request, error) { + var onFatalError = request.onFatalError; + onFatalError(error); null !== request.destination ? ((request.status = 3), closeWithError(request.destination, error)) : ((request.status = 2), (request.fatalError = error)); @@ -1751,6 +1760,10 @@ function performWork(request) { retryTask(request, pingedTasks[i]); null !== request.destination && flushCompletedChunks(request, request.destination); + if (0 === request.abortableTasks.size) { + var onAllReady = request.onAllReady; + onAllReady(); + } } catch (error) { logRecoverableError(request, error, null), fatalError(request, error); } finally { @@ -2677,7 +2690,11 @@ exports.renderToReadableStream = function (model, webpackMap, options) { options ? options.onError : void 0, options ? options.identifierPrefix : void 0, options ? options.onPostpone : void 0, - options ? options.temporaryReferences : void 0 + options ? options.temporaryReferences : void 0, + void 0, + void 0, + void 0, + void 0 ); if (options && options.signal) { var signal = options.signal; diff --git a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.development.js b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.development.js index 3c9a8cb95d99a..3ef1d3f8d040e 100644 --- a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.development.js +++ b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.development.js @@ -233,12 +233,13 @@ maybeIterable["@@iterator"]; return "function" === typeof maybeIterable ? maybeIterable : null; } - function noop() {} + function noop$1() {} function trackUsedThenable(thenableState, thenable, index) { index = thenableState[index]; void 0 === index ? thenableState.push(thenable) - : index !== thenable && (thenable.then(noop, noop), (thenable = index)); + : index !== thenable && + (thenable.then(noop$1, noop$1), (thenable = index)); switch (thenable.status) { case "fulfilled": return thenable.value; @@ -246,7 +247,7 @@ throw thenable.reason; default: "string" === typeof thenable.status - ? thenable.then(noop, noop) + ? thenable.then(noop$1, noop$1) : ((thenableState = thenable), (thenableState.status = "pending"), thenableState.then( @@ -521,7 +522,9 @@ onPostpone, temporaryReferences, environmentName, - filterStackFrame + filterStackFrame, + onAllReady, + onFatalError ) { if ( null !== ReactSharedInternalsServer.A && @@ -560,6 +563,8 @@ this.onError = void 0 === onError ? defaultErrorHandler : onError; this.onPostpone = void 0 === onPostpone ? defaultPostponeHandler : onPostpone; + this.onAllReady = void 0 === onAllReady ? noop : onAllReady; + this.onFatalError = void 0 === onFatalError ? noop : onFatalError; this.environmentName = void 0 === environmentName ? function () { @@ -578,6 +583,7 @@ model = createTask(this, model, null, !1, abortSet, null); pingedTasks.push(model); } + function noop() {} function resolveRequest() { if (currentRequest) return currentRequest; var store = requestStorage.getStore(); @@ -811,6 +817,7 @@ currentOwner = { name: "", env: task.environmentName, + key: null, owner: task.debugOwner }; try { @@ -833,6 +840,7 @@ componentDebugInfo = { name: componentDebugInfo, env: componentEnv, + key: key, owner: task.debugOwner }; outlineModel(request, componentDebugInfo); @@ -1530,7 +1538,12 @@ describeObjectForErrorMessage(parent, parentPropertyName) ); if (isReactComponentInfo(value)) - return { name: value.name, env: value.env, owner: value.owner }; + return { + name: value.name, + env: value.env, + key: value.key, + owner: value.owner + }; if ("Object" !== objectName(value)) callWithDebugContextInDEV(request, task, function () { console.error( @@ -1671,6 +1684,8 @@ return errorDigest || ""; } function fatalError(request, error) { + var onFatalError = request.onFatalError; + onFatalError(error); null !== request.destination ? ((request.status = CLOSED), request.destination.destroy(error)) : ((request.status = 2), (request.fatalError = error)); @@ -1903,6 +1918,7 @@ ? { name: value.name, env: value.env, + key: value.key, owner: value.owner } : value; @@ -2093,6 +2109,10 @@ retryTask(request, pingedTasks[i]); null !== request.destination && flushCompletedChunks(request, request.destination); + if (0 === request.abortableTasks.size) { + var onAllReady = request.onAllReady; + onAllReady(); + } } catch (error) { logRecoverableError(request, error, null), fatalError(request, error); } finally { @@ -3577,7 +3597,9 @@ options ? options.onPostpone : void 0, options ? options.temporaryReferences : void 0, options ? options.environmentName : void 0, - options ? options.filterStackFrame : void 0 + options ? options.filterStackFrame : void 0, + void 0, + void 0 ), hasStartedFlowing = !1; startWork(request); diff --git a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.production.js b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.production.js index eb41232888863..a31ea67802249 100644 --- a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.production.js +++ b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.production.js @@ -460,12 +460,12 @@ var ASYNC_ITERATOR = Symbol.asyncIterator, SuspenseException = Error( "Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`" ); -function noop() {} +function noop$1() {} function trackUsedThenable(thenableState, thenable, index) { index = thenableState[index]; void 0 === index ? thenableState.push(thenable) - : index !== thenable && (thenable.then(noop, noop), (thenable = index)); + : index !== thenable && (thenable.then(noop$1, noop$1), (thenable = index)); switch (thenable.status) { case "fulfilled": return thenable.value; @@ -473,7 +473,7 @@ function trackUsedThenable(thenableState, thenable, index) { throw thenable.reason; default: "string" === typeof thenable.status - ? thenable.then(noop, noop) + ? thenable.then(noop$1, noop$1) : ((thenableState = thenable), (thenableState.status = "pending"), thenableState.then( @@ -728,7 +728,11 @@ function RequestInstance( onError, identifierPrefix, onPostpone, - temporaryReferences + temporaryReferences, + environmentName, + filterStackFrame, + onAllReady, + onFatalError ) { if ( null !== ReactSharedInternalsServer.A && @@ -736,9 +740,9 @@ function RequestInstance( ) throw Error("Currently React only supports one RSC renderer at a time."); ReactSharedInternalsServer.A = DefaultAsyncDispatcher; - var abortSet = new Set(), - pingedTasks = [], - hints = new Set(); + filterStackFrame = new Set(); + environmentName = []; + var hints = new Set(); this.status = 0; this.flushScheduled = !1; this.destination = this.fatalError = null; @@ -747,8 +751,8 @@ function RequestInstance( this.pendingChunks = this.nextChunkId = 0; this.hints = hints; this.abortListeners = new Set(); - this.abortableTasks = abortSet; - this.pingedTasks = pingedTasks; + this.abortableTasks = filterStackFrame; + this.pingedTasks = environmentName; this.completedImportChunks = []; this.completedHintChunks = []; this.completedRegularChunks = []; @@ -763,9 +767,12 @@ function RequestInstance( this.taintCleanupQueue = []; this.onError = void 0 === onError ? defaultErrorHandler : onError; this.onPostpone = void 0 === onPostpone ? defaultPostponeHandler : onPostpone; - model = createTask(this, model, null, !1, abortSet); - pingedTasks.push(model); + this.onAllReady = void 0 === onAllReady ? noop : onAllReady; + this.onFatalError = void 0 === onFatalError ? noop : onFatalError; + model = createTask(this, model, null, !1, filterStackFrame); + environmentName.push(model); } +function noop() {} var currentRequest = null; function resolveRequest() { if (currentRequest) return currentRequest; @@ -1619,6 +1626,8 @@ function logRecoverableError(request, error) { return errorDigest || ""; } function fatalError(request, error) { + var onFatalError = request.onFatalError; + onFatalError(error); null !== request.destination ? ((request.status = 3), request.destination.destroy(error)) : ((request.status = 2), (request.fatalError = error)); @@ -1755,6 +1764,10 @@ function performWork(request) { retryTask(request, pingedTasks[i]); null !== request.destination && flushCompletedChunks(request, request.destination); + if (0 === request.abortableTasks.size) { + var onAllReady = request.onAllReady; + onAllReady(); + } } catch (error) { logRecoverableError(request, error, null), fatalError(request, error); } finally { @@ -2767,7 +2780,11 @@ exports.renderToPipeableStream = function (model, webpackMap, options) { options ? options.onError : void 0, options ? options.identifierPrefix : void 0, options ? options.onPostpone : void 0, - options ? options.temporaryReferences : void 0 + options ? options.temporaryReferences : void 0, + void 0, + void 0, + void 0, + void 0 ), hasStartedFlowing = !1; startWork(request); diff --git a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.unbundled.development.js b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.unbundled.development.js index 10fe6a5caca54..ddd40271352c0 100644 --- a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.unbundled.development.js +++ b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.unbundled.development.js @@ -233,12 +233,13 @@ maybeIterable["@@iterator"]; return "function" === typeof maybeIterable ? maybeIterable : null; } - function noop() {} + function noop$1() {} function trackUsedThenable(thenableState, thenable, index) { index = thenableState[index]; void 0 === index ? thenableState.push(thenable) - : index !== thenable && (thenable.then(noop, noop), (thenable = index)); + : index !== thenable && + (thenable.then(noop$1, noop$1), (thenable = index)); switch (thenable.status) { case "fulfilled": return thenable.value; @@ -246,7 +247,7 @@ throw thenable.reason; default: "string" === typeof thenable.status - ? thenable.then(noop, noop) + ? thenable.then(noop$1, noop$1) : ((thenableState = thenable), (thenableState.status = "pending"), thenableState.then( @@ -521,7 +522,9 @@ onPostpone, temporaryReferences, environmentName, - filterStackFrame + filterStackFrame, + onAllReady, + onFatalError ) { if ( null !== ReactSharedInternalsServer.A && @@ -560,6 +563,8 @@ this.onError = void 0 === onError ? defaultErrorHandler : onError; this.onPostpone = void 0 === onPostpone ? defaultPostponeHandler : onPostpone; + this.onAllReady = void 0 === onAllReady ? noop : onAllReady; + this.onFatalError = void 0 === onFatalError ? noop : onFatalError; this.environmentName = void 0 === environmentName ? function () { @@ -578,6 +583,7 @@ model = createTask(this, model, null, !1, abortSet, null); pingedTasks.push(model); } + function noop() {} function resolveRequest() { if (currentRequest) return currentRequest; var store = requestStorage.getStore(); @@ -811,6 +817,7 @@ currentOwner = { name: "", env: task.environmentName, + key: null, owner: task.debugOwner }; try { @@ -833,6 +840,7 @@ componentDebugInfo = { name: componentDebugInfo, env: componentEnv, + key: key, owner: task.debugOwner }; outlineModel(request, componentDebugInfo); @@ -1530,7 +1538,12 @@ describeObjectForErrorMessage(parent, parentPropertyName) ); if (isReactComponentInfo(value)) - return { name: value.name, env: value.env, owner: value.owner }; + return { + name: value.name, + env: value.env, + key: value.key, + owner: value.owner + }; if ("Object" !== objectName(value)) callWithDebugContextInDEV(request, task, function () { console.error( @@ -1671,6 +1684,8 @@ return errorDigest || ""; } function fatalError(request, error) { + var onFatalError = request.onFatalError; + onFatalError(error); null !== request.destination ? ((request.status = CLOSED), request.destination.destroy(error)) : ((request.status = 2), (request.fatalError = error)); @@ -1903,6 +1918,7 @@ ? { name: value.name, env: value.env, + key: value.key, owner: value.owner } : value; @@ -2093,6 +2109,10 @@ retryTask(request, pingedTasks[i]); null !== request.destination && flushCompletedChunks(request, request.destination); + if (0 === request.abortableTasks.size) { + var onAllReady = request.onAllReady; + onAllReady(); + } } catch (error) { logRecoverableError(request, error, null), fatalError(request, error); } finally { @@ -3542,7 +3562,9 @@ options ? options.onPostpone : void 0, options ? options.temporaryReferences : void 0, options ? options.environmentName : void 0, - options ? options.filterStackFrame : void 0 + options ? options.filterStackFrame : void 0, + void 0, + void 0 ), hasStartedFlowing = !1; startWork(request); diff --git a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.unbundled.production.js b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.unbundled.production.js index adb4cf85db574..90acd07983d4f 100644 --- a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.unbundled.production.js +++ b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.unbundled.production.js @@ -460,12 +460,12 @@ var ASYNC_ITERATOR = Symbol.asyncIterator, SuspenseException = Error( "Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`" ); -function noop() {} +function noop$1() {} function trackUsedThenable(thenableState, thenable, index) { index = thenableState[index]; void 0 === index ? thenableState.push(thenable) - : index !== thenable && (thenable.then(noop, noop), (thenable = index)); + : index !== thenable && (thenable.then(noop$1, noop$1), (thenable = index)); switch (thenable.status) { case "fulfilled": return thenable.value; @@ -473,7 +473,7 @@ function trackUsedThenable(thenableState, thenable, index) { throw thenable.reason; default: "string" === typeof thenable.status - ? thenable.then(noop, noop) + ? thenable.then(noop$1, noop$1) : ((thenableState = thenable), (thenableState.status = "pending"), thenableState.then( @@ -728,7 +728,11 @@ function RequestInstance( onError, identifierPrefix, onPostpone, - temporaryReferences + temporaryReferences, + environmentName, + filterStackFrame, + onAllReady, + onFatalError ) { if ( null !== ReactSharedInternalsServer.A && @@ -736,9 +740,9 @@ function RequestInstance( ) throw Error("Currently React only supports one RSC renderer at a time."); ReactSharedInternalsServer.A = DefaultAsyncDispatcher; - var abortSet = new Set(), - pingedTasks = [], - hints = new Set(); + filterStackFrame = new Set(); + environmentName = []; + var hints = new Set(); this.status = 0; this.flushScheduled = !1; this.destination = this.fatalError = null; @@ -747,8 +751,8 @@ function RequestInstance( this.pendingChunks = this.nextChunkId = 0; this.hints = hints; this.abortListeners = new Set(); - this.abortableTasks = abortSet; - this.pingedTasks = pingedTasks; + this.abortableTasks = filterStackFrame; + this.pingedTasks = environmentName; this.completedImportChunks = []; this.completedHintChunks = []; this.completedRegularChunks = []; @@ -763,9 +767,12 @@ function RequestInstance( this.taintCleanupQueue = []; this.onError = void 0 === onError ? defaultErrorHandler : onError; this.onPostpone = void 0 === onPostpone ? defaultPostponeHandler : onPostpone; - model = createTask(this, model, null, !1, abortSet); - pingedTasks.push(model); + this.onAllReady = void 0 === onAllReady ? noop : onAllReady; + this.onFatalError = void 0 === onFatalError ? noop : onFatalError; + model = createTask(this, model, null, !1, filterStackFrame); + environmentName.push(model); } +function noop() {} var currentRequest = null; function resolveRequest() { if (currentRequest) return currentRequest; @@ -1619,6 +1626,8 @@ function logRecoverableError(request, error) { return errorDigest || ""; } function fatalError(request, error) { + var onFatalError = request.onFatalError; + onFatalError(error); null !== request.destination ? ((request.status = 3), request.destination.destroy(error)) : ((request.status = 2), (request.fatalError = error)); @@ -1755,6 +1764,10 @@ function performWork(request) { retryTask(request, pingedTasks[i]); null !== request.destination && flushCompletedChunks(request, request.destination); + if (0 === request.abortableTasks.size) { + var onAllReady = request.onAllReady; + onAllReady(); + } } catch (error) { logRecoverableError(request, error, null), fatalError(request, error); } finally { @@ -2735,7 +2748,11 @@ exports.renderToPipeableStream = function (model, webpackMap, options) { options ? options.onError : void 0, options ? options.identifierPrefix : void 0, options ? options.onPostpone : void 0, - options ? options.temporaryReferences : void 0 + options ? options.temporaryReferences : void 0, + void 0, + void 0, + void 0, + void 0 ), hasStartedFlowing = !1; startWork(request); diff --git a/packages/next/src/compiled/react-server-dom-webpack/package.json b/packages/next/src/compiled/react-server-dom-webpack/package.json index d0cc2a87c7490..19b4a94ca8528 100644 --- a/packages/next/src/compiled/react-server-dom-webpack/package.json +++ b/packages/next/src/compiled/react-server-dom-webpack/package.json @@ -37,6 +37,23 @@ "./server.edge": "./server.edge.js", "./server.node": "./server.node.js", "./server.node.unbundled": "./server.node.unbundled.js", + "./static": { + "react-server": { + "workerd": "./static.edge.js", + "deno": "./static.browser.js", + "node": { + "webpack": "./static.node.js", + "default": "./static.node.unbundled.js" + }, + "edge-light": "./static.edge.js", + "browser": "./static.browser.js" + }, + "default": "./static.js" + }, + "./static.browser": "./static.browser.js", + "./static.edge": "./static.edge.js", + "./static.node": "./static.node.js", + "./static.node.unbundled": "./static.node.unbundled.js", "./node-loader": "./esm/react-server-dom-webpack-node-loader.production.js", "./node-register": "./node-register.js", "./package.json": "./package.json" @@ -46,8 +63,8 @@ "neo-async": "^2.6.1" }, "peerDependencies": { - "react": "19.0.0-rc-49496d49-20240814", - "react-dom": "19.0.0-rc-49496d49-20240814", + "react": "19.0.0-rc-1eaccd82-20240816", + "react-dom": "19.0.0-rc-1eaccd82-20240816", "webpack": "^5.59.0" } } \ No newline at end of file diff --git a/packages/next/src/compiled/react-server-dom-webpack/server.browser.js b/packages/next/src/compiled/react-server-dom-webpack/server.browser.js index 12fe5da29af0f..326cc56b6587b 100644 --- a/packages/next/src/compiled/react-server-dom-webpack/server.browser.js +++ b/packages/next/src/compiled/react-server-dom-webpack/server.browser.js @@ -1,7 +1,17 @@ 'use strict'; +var s; if (process.env.NODE_ENV === 'production') { - module.exports = require('./cjs/react-server-dom-webpack-server.browser.production.js'); + s = require('./cjs/react-server-dom-webpack-server.browser.production.js'); } else { - module.exports = require('./cjs/react-server-dom-webpack-server.browser.development.js'); + s = require('./cjs/react-server-dom-webpack-server.browser.development.js'); } + +exports.renderToReadableStream = s.renderToReadableStream; +exports.decodeReply = s.decodeReply; +exports.decodeAction = s.decodeAction; +exports.decodeFormState = s.decodeFormState; +exports.registerServerReference = s.registerServerReference; +exports.registerClientReference = s.registerClientReference; +exports.createClientModuleProxy = s.createClientModuleProxy; +exports.createTemporaryReferenceSet = s.createTemporaryReferenceSet; diff --git a/packages/next/src/compiled/react-server-dom-webpack/server.edge.js b/packages/next/src/compiled/react-server-dom-webpack/server.edge.js index ceab7b1ea0626..591b84476884d 100644 --- a/packages/next/src/compiled/react-server-dom-webpack/server.edge.js +++ b/packages/next/src/compiled/react-server-dom-webpack/server.edge.js @@ -1,7 +1,17 @@ 'use strict'; +var s; if (process.env.NODE_ENV === 'production') { - module.exports = require('./cjs/react-server-dom-webpack-server.edge.production.js'); + s = require('./cjs/react-server-dom-webpack-server.edge.production.js'); } else { - module.exports = require('./cjs/react-server-dom-webpack-server.edge.development.js'); + s = require('./cjs/react-server-dom-webpack-server.edge.development.js'); } + +exports.renderToReadableStream = s.renderToReadableStream; +exports.decodeReply = s.decodeReply; +exports.decodeAction = s.decodeAction; +exports.decodeFormState = s.decodeFormState; +exports.registerServerReference = s.registerServerReference; +exports.registerClientReference = s.registerClientReference; +exports.createClientModuleProxy = s.createClientModuleProxy; +exports.createTemporaryReferenceSet = s.createTemporaryReferenceSet; diff --git a/packages/next/src/compiled/react-server-dom-webpack/server.node.js b/packages/next/src/compiled/react-server-dom-webpack/server.node.js index 84da8eda2a247..6885e43a44fc0 100644 --- a/packages/next/src/compiled/react-server-dom-webpack/server.node.js +++ b/packages/next/src/compiled/react-server-dom-webpack/server.node.js @@ -1,7 +1,18 @@ 'use strict'; +var s; if (process.env.NODE_ENV === 'production') { - module.exports = require('./cjs/react-server-dom-webpack-server.node.production.js'); + s = require('./cjs/react-server-dom-webpack-server.node.production.js'); } else { - module.exports = require('./cjs/react-server-dom-webpack-server.node.development.js'); + s = require('./cjs/react-server-dom-webpack-server.node.development.js'); } + +exports.renderToPipeableStream = s.renderToPipeableStream; +exports.decodeReplyFromBusboy = s.decodeReplyFromBusboy; +exports.decodeReply = s.decodeReply; +exports.decodeAction = s.decodeAction; +exports.decodeFormState = s.decodeFormState; +exports.registerServerReference = s.registerServerReference; +exports.registerClientReference = s.registerClientReference; +exports.createClientModuleProxy = s.createClientModuleProxy; +exports.createTemporaryReferenceSet = s.createTemporaryReferenceSet; diff --git a/packages/next/src/compiled/react-server-dom-webpack/server.node.unbundled.js b/packages/next/src/compiled/react-server-dom-webpack/server.node.unbundled.js index 26e6677eed9bc..333b6b0d3122e 100644 --- a/packages/next/src/compiled/react-server-dom-webpack/server.node.unbundled.js +++ b/packages/next/src/compiled/react-server-dom-webpack/server.node.unbundled.js @@ -1,7 +1,18 @@ 'use strict'; +var s; if (process.env.NODE_ENV === 'production') { - module.exports = require('./cjs/react-server-dom-webpack-server.node.unbundled.production.js'); + s = require('./cjs/react-server-dom-webpack-server.node.unbundled.production.js'); } else { - module.exports = require('./cjs/react-server-dom-webpack-server.node.unbundled.development.js'); + s = require('./cjs/react-server-dom-webpack-server.node.unbundled.development.js'); } + +exports.renderToPipeableStream = s.renderToPipeableStream; +exports.decodeReplyFromBusboy = s.decodeReplyFromBusboy; +exports.decodeReply = s.decodeReply; +exports.decodeAction = s.decodeAction; +exports.decodeFormState = s.decodeFormState; +exports.registerServerReference = s.registerServerReference; +exports.registerClientReference = s.registerClientReference; +exports.createClientModuleProxy = s.createClientModuleProxy; +exports.createTemporaryReferenceSet = s.createTemporaryReferenceSet; diff --git a/packages/next/src/compiled/react-server-dom-webpack/static.browser.js b/packages/next/src/compiled/react-server-dom-webpack/static.browser.js new file mode 100644 index 0000000000000..7d514abd6bf71 --- /dev/null +++ b/packages/next/src/compiled/react-server-dom-webpack/static.browser.js @@ -0,0 +1,12 @@ +'use strict'; + +var s; +if (process.env.NODE_ENV === 'production') { + s = require('./cjs/react-server-dom-webpack-server.browser.production.js'); +} else { + s = require('./cjs/react-server-dom-webpack-server.browser.development.js'); +} + +if (s.prerender) { + exports.prerender = s.prerender; +} diff --git a/packages/next/src/compiled/react-server-dom-webpack/static.edge.js b/packages/next/src/compiled/react-server-dom-webpack/static.edge.js new file mode 100644 index 0000000000000..a4ae48f55eb1b --- /dev/null +++ b/packages/next/src/compiled/react-server-dom-webpack/static.edge.js @@ -0,0 +1,12 @@ +'use strict'; + +var s; +if (process.env.NODE_ENV === 'production') { + s = require('./cjs/react-server-dom-webpack-server.edge.production.js'); +} else { + s = require('./cjs/react-server-dom-webpack-server.edge.development.js'); +} + +if (s.prerender) { + exports.prerender = s.prerender; +} diff --git a/packages/next/src/compiled/react-server-dom-webpack/static.js b/packages/next/src/compiled/react-server-dom-webpack/static.js new file mode 100644 index 0000000000000..13a632e641179 --- /dev/null +++ b/packages/next/src/compiled/react-server-dom-webpack/static.js @@ -0,0 +1,6 @@ +'use strict'; + +throw new Error( + 'The React Server Writer cannot be used outside a react-server environment. ' + + 'You must configure Node.js using the `--conditions react-server` flag.' +); diff --git a/packages/next/src/compiled/react-server-dom-webpack/static.node.js b/packages/next/src/compiled/react-server-dom-webpack/static.node.js new file mode 100644 index 0000000000000..dbc4179d3e788 --- /dev/null +++ b/packages/next/src/compiled/react-server-dom-webpack/static.node.js @@ -0,0 +1,12 @@ +'use strict'; + +var s; +if (process.env.NODE_ENV === 'production') { + s = require('./cjs/react-server-dom-webpack-server.node.production.js'); +} else { + s = require('./cjs/react-server-dom-webpack-server.node.development.js'); +} + +if (s.prerenderToNodeStream) { + exports.prerenderToNodeStream = s.prerenderToNodeStream; +} diff --git a/packages/next/src/compiled/react-server-dom-webpack/static.node.unbundled.js b/packages/next/src/compiled/react-server-dom-webpack/static.node.unbundled.js new file mode 100644 index 0000000000000..73c8a3b86e9c7 --- /dev/null +++ b/packages/next/src/compiled/react-server-dom-webpack/static.node.unbundled.js @@ -0,0 +1,12 @@ +'use strict'; + +var s; +if (process.env.NODE_ENV === 'production') { + s = require('./cjs/react-server-dom-webpack-server.node.unbundled.production.js'); +} else { + s = require('./cjs/react-server-dom-webpack-server.node.unbundled.development.js'); +} + +if (s.prerenderToNodeStream) { + exports.prerenderToNodeStream = s.prerenderToNodeStream; +} diff --git a/packages/next/src/compiled/react/cjs/react.development.js b/packages/next/src/compiled/react/cjs/react.development.js index 331a9e60ca342..1c6b39d303c5f 100644 --- a/packages/next/src/compiled/react/cjs/react.development.js +++ b/packages/next/src/compiled/react/cjs/react.development.js @@ -1517,7 +1517,7 @@ exports.useTransition = function () { return resolveDispatcher().useTransition(); }; - exports.version = "19.0.0-rc-49496d49-20240814"; + exports.version = "19.0.0-rc-1eaccd82-20240816"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/packages/next/src/compiled/react/cjs/react.production.js b/packages/next/src/compiled/react/cjs/react.production.js index 4e7360c4360f2..19dfdf9754662 100644 --- a/packages/next/src/compiled/react/cjs/react.production.js +++ b/packages/next/src/compiled/react/cjs/react.production.js @@ -536,4 +536,4 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.0.0-rc-49496d49-20240814"; +exports.version = "19.0.0-rc-1eaccd82-20240816"; diff --git a/packages/next/src/compiled/react/cjs/react.react-server.development.js b/packages/next/src/compiled/react/cjs/react.react-server.development.js index c6eb2d0c0e9ac..c738d559c99fe 100644 --- a/packages/next/src/compiled/react/cjs/react.react-server.development.js +++ b/packages/next/src/compiled/react/cjs/react.react-server.development.js @@ -1113,5 +1113,5 @@ exports.useMemo = function (create, deps) { return resolveDispatcher().useMemo(create, deps); }; - exports.version = "19.0.0-rc-49496d49-20240814"; + exports.version = "19.0.0-rc-1eaccd82-20240816"; })(); diff --git a/packages/next/src/compiled/react/cjs/react.react-server.production.js b/packages/next/src/compiled/react/cjs/react.react-server.production.js index 60698fe7b0687..b128eeae76149 100644 --- a/packages/next/src/compiled/react/cjs/react.react-server.production.js +++ b/packages/next/src/compiled/react/cjs/react.react-server.production.js @@ -424,4 +424,4 @@ exports.useId = function () { exports.useMemo = function (create, deps) { return ReactSharedInternals.H.useMemo(create, deps); }; -exports.version = "19.0.0-rc-49496d49-20240814"; +exports.version = "19.0.0-rc-1eaccd82-20240816"; diff --git a/packages/next/src/compiled/unistore/unistore.js b/packages/next/src/compiled/unistore/unistore.js index 2054003f3f0ef..dc855f9daf817 100644 --- a/packages/next/src/compiled/unistore/unistore.js +++ b/packages/next/src/compiled/unistore/unistore.js @@ -1 +1 @@ -(()=>{var t={841:t=>{function n(t,i){for(var _ in i)t[_]=i[_];return t}t.exports=function(t){var i=[];function u(t){for(var _=[],a=0;a{var t={502:t=>{function n(t,i){for(var _ in i)t[_]=i[_];return t}t.exports=function(t){var i=[];function u(t){for(var _=[],a=0;a=18'} peerDependencies: '@types/react': npm:types-react@19.0.0-rc.0 - react: 19.0.0-rc-49496d49-20240814 - react-dom: 19.0.0-rc-49496d49-20240814 + react: 19.0.0-rc-1eaccd82-20240816 + react-dom: 19.0.0-rc-1eaccd82-20240816 peerDependenciesMeta: '@types/react': optional: true @@ -10438,7 +10438,7 @@ packages: lucide-react@0.383.0: resolution: {integrity: sha512-13xlG0CQCJtzjSQYwwJ3WRqMHtRj3EXmLlorrARt7y+IHnxUCp3XyFNL1DfaGySWxHObDvnu1u1dV+0VMKHUSg==} peerDependencies: - react: 19.0.0-rc-49496d49-20240814 + react: 19.0.0-rc-1eaccd82-20240816 lz-string@1.5.0: resolution: {integrity: sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==} @@ -12674,28 +12674,28 @@ packages: resolution: {integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==} hasBin: true - react-dom@0.0.0-experimental-49496d49-20240814: - resolution: {integrity: sha512-o6OY2GsKlobxRyqaUFaaWVhMuj6F445Z2pOFTXLJk3JBwW2c//Os2hOh9UaCv0nSY+8TJHS8JpiAyF4cxqwKqA==} + react-dom@0.0.0-experimental-1eaccd82-20240816: + resolution: {integrity: sha512-UzTjxv3wO05t7eNuJ5s2fCaG0tiWkEz2KZbVNuDKEBZXxoOkkUiotsM18O6BSLFZHLnPfL5V4A6AsXSm7lhqxQ==} peerDependencies: - react: 19.0.0-rc-49496d49-20240814 + react: 19.0.0-rc-1eaccd82-20240816 react-dom@17.0.2: resolution: {integrity: sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==} peerDependencies: - react: 19.0.0-rc-49496d49-20240814 + react: 19.0.0-rc-1eaccd82-20240816 - react-dom@19.0.0-rc-49496d49-20240814: - resolution: {integrity: sha512-Z6duEWrNFiok7cjThEOxy0a+IMDC+qN25ZZHDdj/MJ33rRuOdJ8ZUebm+yvMnX73KozqX0WYthT1RVMex5R6qg==} + react-dom@19.0.0-rc-1eaccd82-20240816: + resolution: {integrity: sha512-8HXIHjY9tQUU4Hf5e/QNwVbNLXO+QJkjyCentxKNNc2vn/UjWc5lL782ZTkqII7xBzA/DhC6UdJi83Vr24cDIQ==} peerDependencies: - react: 19.0.0-rc-49496d49-20240814 + react: 19.0.0-rc-1eaccd82-20240816 react-dom@19.0.0-rc-6230622a1a-20240610: resolution: {integrity: sha512-56G4Pum5E7FeGL1rwHX5IxidSJxQnXP4yORRo0pVeOJuu5DQJvNKpUwmJoftMP/ez0AiglYTY77L2Gs8iyt1Hg==} peerDependencies: - react: 19.0.0-rc-49496d49-20240814 + react: 19.0.0-rc-1eaccd82-20240816 - react-is@19.0.0-rc-49496d49-20240814: - resolution: {integrity: sha512-cchiWMXEw4BedaCDmq0InzeHmI23RLOhFtGkf5dXNCiQjEiorJ1IoyrTxhSxT1w7fFI/iutwVyeb8sT8SgkvgA==} + react-is@19.0.0-rc-1eaccd82-20240816: + resolution: {integrity: sha512-b0QyPaFBPCWbJlmttSm9ZLpZdVaHMl4Y+P+b4fOHKDr15ROwFT22eFeX7S3FNv+WOGHH9p9lcpE/Hh1xykeLgQ==} react-is@19.0.0-rc-6230622a1a-20240610: resolution: {integrity: sha512-6BH4F/xpoTJ+BTcb2AmZAzWXInEPUNKgL4u4C1BssZmFkGsvUpZmllLgCEVa105omvex85ZWwKHCy22KftGwDw==} @@ -12706,8 +12706,8 @@ packages: react-number-format@5.4.0: resolution: {integrity: sha512-NWdICrqLhI7rAS8yUeLVd6Wr4cN7UjJ9IBTS0f/a9i7UB4x4Ti70kGnksBtZ7o4Z7YRbvCMMR/jQmkoOBa/4fg==} peerDependencies: - react: 19.0.0-rc-49496d49-20240814 - react-dom: 19.0.0-rc-49496d49-20240814 + react: 19.0.0-rc-1eaccd82-20240816 + react-dom: 19.0.0-rc-1eaccd82-20240816 react-refresh@0.12.0: resolution: {integrity: sha512-suLIhrU2IHKL5JEKR/fAwJv7bbeq4kJ+pJopf77jHwuR+HmJS/HbrPIGsTBUVfw7tXPOmYv7UJ7PCaN49e8x4A==} @@ -12718,7 +12718,7 @@ packages: engines: {node: '>=10'} peerDependencies: '@types/react': npm:types-react@19.0.0-rc.0 - react: 19.0.0-rc-49496d49-20240814 + react: 19.0.0-rc-1eaccd82-20240816 peerDependenciesMeta: '@types/react': optional: true @@ -12728,58 +12728,58 @@ packages: engines: {node: '>=10'} peerDependencies: '@types/react': npm:types-react@19.0.0-rc.0 - react: 19.0.0-rc-49496d49-20240814 + react: 19.0.0-rc-1eaccd82-20240816 peerDependenciesMeta: '@types/react': optional: true - react-server-dom-turbopack@0.0.0-experimental-49496d49-20240814: - resolution: {integrity: sha512-gn48gAsaAUXdXt1XYYXX3Hg01431Yfz5Oc37/yn1h2H/IniIjs8tloZo74wK6P0UJZmU+JaLJl8TdRi985V46A==} + react-server-dom-turbopack@0.0.0-experimental-1eaccd82-20240816: + resolution: {integrity: sha512-fmufqTLEwJbDSQr37WEhvcMtczcHJEpNKvpHk4pTs2uqo6/QMqsXeV9CL3qSz/yqsHg1A7NnTyRZbPe3VW5XRQ==} engines: {node: '>=0.10.0'} peerDependencies: - react: 19.0.0-rc-49496d49-20240814 - react-dom: 19.0.0-rc-49496d49-20240814 + react: 19.0.0-rc-1eaccd82-20240816 + react-dom: 19.0.0-rc-1eaccd82-20240816 - react-server-dom-turbopack@19.0.0-rc-49496d49-20240814: - resolution: {integrity: sha512-Nb+n40n2XIVEvGHuAaPCNqLCSrrMaRn1BN363LDm0Tvvjn1ngffshzUDNd6Il1pfZioAJSnf2Hs+Zk+hzcZofw==} + react-server-dom-turbopack@19.0.0-rc-1eaccd82-20240816: + resolution: {integrity: sha512-W32F9+bjElAMy6rG14/Zl9jPY0W4C0hLslbyHFImtOPnwTv+H1+sXdbrI0kZKQ98T1jE3qGjM4lg1eheg4XSpg==} engines: {node: '>=0.10.0'} peerDependencies: - react: 19.0.0-rc-49496d49-20240814 - react-dom: 19.0.0-rc-49496d49-20240814 + react: 19.0.0-rc-1eaccd82-20240816 + react-dom: 19.0.0-rc-1eaccd82-20240816 - react-server-dom-webpack@0.0.0-experimental-49496d49-20240814: - resolution: {integrity: sha512-dxKiDYWcwwlHfEFiwrra7VwZLdeFJUJv60dC2FoeRYVRxdgL1GvOLakIKKAFcvzhkebxl9B22cuZmoH2nKH4qg==} + react-server-dom-webpack@0.0.0-experimental-1eaccd82-20240816: + resolution: {integrity: sha512-Hk2msw1X7DA5fYA6X8LxXIt4J3pIGEqbK7OL4mLZs5i9R5R0J56/0wOf2quRvNsSVj3lgqn5/rbs5I5fUrb+Dw==} engines: {node: '>=0.10.0'} peerDependencies: - react: 19.0.0-rc-49496d49-20240814 - react-dom: 19.0.0-rc-49496d49-20240814 + react: 19.0.0-rc-1eaccd82-20240816 + react-dom: 19.0.0-rc-1eaccd82-20240816 webpack: 5.90.0 - react-server-dom-webpack@19.0.0-rc-49496d49-20240814: - resolution: {integrity: sha512-lWFbxApYplWO6PQ8cCupobO627fup+yHwJsyLDUUCzMn0yQMsGjgvQhEfm0YYfrxomVGepACngCj4WerhFmsBw==} + react-server-dom-webpack@19.0.0-rc-1eaccd82-20240816: + resolution: {integrity: sha512-Rxiue9D2jLicKaPI/NCU7ChlhhdpibeGf0a3VS6vbWb2+O/J1kX6h7t17cXPQ3xaFUzx7eCe5fXicOiNCsZ+Tw==} engines: {node: '>=0.10.0'} peerDependencies: - react: 19.0.0-rc-49496d49-20240814 - react-dom: 19.0.0-rc-49496d49-20240814 + react: 19.0.0-rc-1eaccd82-20240816 + react-dom: 19.0.0-rc-1eaccd82-20240816 webpack: 5.90.0 react-shallow-renderer@16.15.0: resolution: {integrity: sha512-oScf2FqQ9LFVQgA73vr86xl2NaOIX73rh+YFqcOp68CWj56tSfgtGKrEbyhCj0rSijyG9M1CYprTh39fBi5hzA==} peerDependencies: - react: 19.0.0-rc-49496d49-20240814 + react: 19.0.0-rc-1eaccd82-20240816 react-ssr-prepass@1.0.8: resolution: {integrity: sha512-O0gfRA1SaK+9ITKxqfnXsej2jF+OHGP/+GxD4unROQaM/0/UczGF9fuF+wTboxaQoKdIf4FvS3h/OigWh704VA==} peerDependencies: - react: 19.0.0-rc-49496d49-20240814 - react-is: 19.0.0-rc-49496d49-20240814 + react: 19.0.0-rc-1eaccd82-20240816 + react-is: 19.0.0-rc-1eaccd82-20240816 react-style-singleton@2.2.1: resolution: {integrity: sha512-ZWj0fHEMyWkHzKYUr2Bs/4zU6XLmq9HsgBURm7g5pAVfyn49DgUiNgY2d4lXRlYSiCif9YBGpQleewkcqddc7g==} engines: {node: '>=10'} peerDependencies: '@types/react': npm:types-react@19.0.0-rc.0 - react: 19.0.0-rc-49496d49-20240814 + react: 19.0.0-rc-1eaccd82-20240816 peerDependenciesMeta: '@types/react': optional: true @@ -12787,30 +12787,30 @@ packages: react-test-renderer@18.2.0: resolution: {integrity: sha512-JWD+aQ0lh2gvh4NM3bBM42Kx+XybOxCpgYK7F8ugAlpaTSnWsX+39Z4XkOykGZAHrjwwTZT3x3KxswVWxHPUqA==} peerDependencies: - react: 19.0.0-rc-49496d49-20240814 + react: 19.0.0-rc-1eaccd82-20240816 react-textarea-autosize@8.5.3: resolution: {integrity: sha512-XT1024o2pqCuZSuBt9FwHlaDeNtVrtCXu0Rnz88t1jUGheCLa3PhjE1GH8Ctm2axEtvdCl5SUHYschyQ0L5QHQ==} engines: {node: '>=10'} peerDependencies: - react: 19.0.0-rc-49496d49-20240814 + react: 19.0.0-rc-1eaccd82-20240816 react-virtualized@9.22.3: resolution: {integrity: sha512-MKovKMxWTcwPSxE1kK1HcheQTWfuCxAuBoSTf2gwyMM21NdX/PXUhnoP8Uc5dRKd+nKm8v41R36OellhdCpkrw==} peerDependencies: - react: 19.0.0-rc-49496d49-20240814 - react-dom: 19.0.0-rc-49496d49-20240814 + react: 19.0.0-rc-1eaccd82-20240816 + react-dom: 19.0.0-rc-1eaccd82-20240816 - react@0.0.0-experimental-49496d49-20240814: - resolution: {integrity: sha512-/iqhucnvuKKDMUCKp6iFkqk2bFyMUjgOSCLViE878C2wktDiwEu6vD4X9bQMEFygVhuyJ0hP3McndiWP5j0KYA==} + react@0.0.0-experimental-1eaccd82-20240816: + resolution: {integrity: sha512-sZrvODfvf7dkRmqqZ6DH9OyfYHcOpVVEBPzIDquiPxHyGyUiUu6oGl7gaXDHNQtUHFzqM5I9ZL9In+UkUc1Idg==} engines: {node: '>=0.10.0'} react@17.0.2: resolution: {integrity: sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==} engines: {node: '>=0.10.0'} - react@19.0.0-rc-49496d49-20240814: - resolution: {integrity: sha512-mviEqI/3kwcDoAX0hlzEberb26DD4HGCVy7lFBErqKIcgo11m1R83E8i6V3AK+kPZz1CszcAytU3+taJBcTnpA==} + react@19.0.0-rc-1eaccd82-20240816: + resolution: {integrity: sha512-jQ/NAywTe/dTHMYcNTR9FvPShpX2e8QrRb2xWBrE/dNqMzbmFynghdMNFlekbBx4PNKdWByVgR7MEakhAfV5rQ==} engines: {node: '>=0.10.0'} react@19.0.0-rc-6230622a1a-20240610: @@ -13336,11 +13336,11 @@ packages: resolution: {integrity: sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==} engines: {node: '>=v12.22.7'} - scheduler@0.0.0-experimental-49496d49-20240814: - resolution: {integrity: sha512-ljg4Uqrexq0nZFmNXa9UkV+6xKtfUCN9W5XtJ50KWeOE5olVNDNpkMsm7lUdoJSXJRFZjz8NJkOQTjj8SynSlQ==} + scheduler@0.0.0-experimental-1eaccd82-20240816: + resolution: {integrity: sha512-K895AjhNQEj05ldAckmgGhOr54JE5NMU/9oLlGNcGHG+SAjo4mlXQVmOTCZGMjtQ87QoBvPNgsudZXFlcjJf8w==} - scheduler@0.25.0-rc-49496d49-20240814: - resolution: {integrity: sha512-CnS0z+a+x/QlIAMyqU0o3czfJkf68Q4Oryxl/4eeucuh6/c0vMg68AOa7og/O8lenjYezX87G/jodjj5TqOUAQ==} + scheduler@0.25.0-rc-1eaccd82-20240816: + resolution: {integrity: sha512-R2SIZf9OVNrl+X31RejZK+25c9dFBS5GqCLOkID1MCMI2WQbaLsrbQKcO6Dz6+7+NEUx8rXT6FjmjuXplTWamg==} schema-utils@2.7.1: resolution: {integrity: sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==} @@ -13909,8 +13909,8 @@ packages: engines: {node: '>= 16'} peerDependencies: babel-plugin-styled-components: '>= 2' - react: 19.0.0-rc-49496d49-20240814 - react-dom: 19.0.0-rc-49496d49-20240814 + react: 19.0.0-rc-1eaccd82-20240816 + react-dom: 19.0.0-rc-1eaccd82-20240816 peerDependenciesMeta: babel-plugin-styled-components: optional: true @@ -13924,7 +13924,7 @@ packages: peerDependencies: '@babel/core': '*' babel-plugin-macros: '*' - react: 19.0.0-rc-49496d49-20240814 + react: 19.0.0-rc-1eaccd82-20240816 peerDependenciesMeta: '@babel/core': optional: true @@ -14001,7 +14001,7 @@ packages: swr@2.2.4: resolution: {integrity: sha512-njiZ/4RiIhoOlAaLYDqwz5qH/KZXVilRLvomrx83HjzCWTfa+InyfAjv05PSFxnmLzZkNO9ZfvgoqzAaEI4sGQ==} peerDependencies: - react: 19.0.0-rc-49496d49-20240814 + react: 19.0.0-rc-1eaccd82-20240816 symbol-observable@1.0.1: resolution: {integrity: sha512-Kb3PrPYz4HanVF1LVGuAdW6LoVgIwjUYJGzFe7NDrBLCN4lsV/5J0MFurV+ygS4bRVwrCEt2c7MQ1R2a72oJDw==} @@ -14745,7 +14745,7 @@ packages: engines: {node: '>=10'} peerDependencies: '@types/react': npm:types-react@19.0.0-rc.0 - react: 19.0.0-rc-49496d49-20240814 + react: 19.0.0-rc-1eaccd82-20240816 peerDependenciesMeta: '@types/react': optional: true @@ -14753,13 +14753,13 @@ packages: use-composed-ref@1.3.0: resolution: {integrity: sha512-GLMG0Jc/jiKov/3Ulid1wbv3r54K9HlMW29IWcDFPEqFkSO2nS0MuefWgMJpeHQ9YJeXDL3ZUF+P3jdXlZX/cQ==} peerDependencies: - react: 19.0.0-rc-49496d49-20240814 + react: 19.0.0-rc-1eaccd82-20240816 use-isomorphic-layout-effect@1.1.2: resolution: {integrity: sha512-49L8yCO3iGT/ZF9QttjwLF/ZD9Iwto5LnH5LmEdk/6cFmXddqi2ulF0edxTwjj+7mqvpVVGQWvbXZdn32wRSHA==} peerDependencies: '@types/react': '*' - react: 19.0.0-rc-49496d49-20240814 + react: 19.0.0-rc-1eaccd82-20240816 peerDependenciesMeta: '@types/react': optional: true @@ -14768,7 +14768,7 @@ packages: resolution: {integrity: sha512-xA+AVm/Wlg3e2P/JiItTziwS7FK92LWrDB0p+hgXloIMuVCeJJ8v6f0eeHyPZaJrM+usM1FkFfbNCrJGs8A/zw==} peerDependencies: '@types/react': '*' - react: 19.0.0-rc-49496d49-20240814 + react: 19.0.0-rc-1eaccd82-20240816 peerDependenciesMeta: '@types/react': optional: true @@ -14778,7 +14778,7 @@ packages: engines: {node: '>=10'} peerDependencies: '@types/react': npm:types-react@19.0.0-rc.0 - react: 19.0.0-rc-49496d49-20240814 + react: 19.0.0-rc-1eaccd82-20240816 peerDependenciesMeta: '@types/react': optional: true @@ -14786,7 +14786,7 @@ packages: use-sync-external-store@1.2.0: resolution: {integrity: sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==} peerDependencies: - react: 19.0.0-rc-49496d49-20240814 + react: 19.0.0-rc-1eaccd82-20240816 use@3.1.1: resolution: {integrity: sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==} @@ -17174,17 +17174,17 @@ snapshots: '@emotion/memoize@0.8.1': {} - '@emotion/react@11.11.1(react@19.0.0-rc-49496d49-20240814)(types-react@19.0.0-rc.0)': + '@emotion/react@11.11.1(react@19.0.0-rc-1eaccd82-20240816)(types-react@19.0.0-rc.0)': dependencies: '@babel/runtime': 7.22.5 '@emotion/babel-plugin': 11.11.0 '@emotion/cache': 11.11.0 '@emotion/serialize': 1.1.2 - '@emotion/use-insertion-effect-with-fallbacks': 1.0.1(react@19.0.0-rc-49496d49-20240814) + '@emotion/use-insertion-effect-with-fallbacks': 1.0.1(react@19.0.0-rc-1eaccd82-20240816) '@emotion/utils': 1.2.1 '@emotion/weak-memoize': 0.3.1 hoist-non-react-statics: 3.3.2 - react: 19.0.0-rc-49496d49-20240814 + react: 19.0.0-rc-1eaccd82-20240816 optionalDependencies: '@types/react': types-react@19.0.0-rc.0 @@ -17200,9 +17200,9 @@ snapshots: '@emotion/unitless@0.8.1': {} - '@emotion/use-insertion-effect-with-fallbacks@1.0.1(react@19.0.0-rc-49496d49-20240814)': + '@emotion/use-insertion-effect-with-fallbacks@1.0.1(react@19.0.0-rc-1eaccd82-20240816)': dependencies: - react: 19.0.0-rc-49496d49-20240814 + react: 19.0.0-rc-1eaccd82-20240816 '@emotion/utils@1.2.1': {} @@ -18564,11 +18564,11 @@ snapshots: transitivePeerDependencies: - supports-color - '@mdx-js/react@2.2.1(react@19.0.0-rc-49496d49-20240814)': + '@mdx-js/react@2.2.1(react@19.0.0-rc-1eaccd82-20240816)': dependencies: '@types/mdx': 2.0.3 '@types/react': types-react@19.0.0-rc.0 - react: 19.0.0-rc-49496d49-20240814 + react: 19.0.0-rc-1eaccd82-20240816 '@mdx-js/react@2.2.1(react@19.0.0-rc-6230622a1a-20240610)': dependencies: @@ -19387,13 +19387,13 @@ snapshots: '@types/jest': 29.5.5 jest: 29.7.0(@types/node@20.12.3)(babel-plugin-macros@3.1.0) - '@testing-library/react@15.0.7(react-dom@19.0.0-rc-49496d49-20240814(react@19.0.0-rc-49496d49-20240814))(react@19.0.0-rc-49496d49-20240814)(types-react@19.0.0-rc.0)': + '@testing-library/react@15.0.7(react-dom@19.0.0-rc-1eaccd82-20240816(react@19.0.0-rc-1eaccd82-20240816))(react@19.0.0-rc-1eaccd82-20240816)(types-react@19.0.0-rc.0)': dependencies: '@babel/runtime': 7.22.5 '@testing-library/dom': 10.1.0 '@types/react-dom': types-react-dom@19.0.0-rc.0 - react: 19.0.0-rc-49496d49-20240814 - react-dom: 19.0.0-rc-49496d49-20240814(react@19.0.0-rc-49496d49-20240814) + react: 19.0.0-rc-1eaccd82-20240816 + react-dom: 19.0.0-rc-1eaccd82-20240816(react@19.0.0-rc-1eaccd82-20240816) optionalDependencies: '@types/react': types-react@19.0.0-rc.0 @@ -24415,7 +24415,7 @@ snapshots: hoist-non-react-statics@3.3.2: dependencies: - react-is: 19.0.0-rc-49496d49-20240814 + react-is: 19.0.0-rc-1eaccd82-20240816 homedir-polyfill@1.0.3: dependencies: @@ -28854,25 +28854,25 @@ snapshots: '@jest/types': 24.9.0 ansi-regex: 4.1.0 ansi-styles: 3.2.1 - react-is: 19.0.0-rc-49496d49-20240814 + react-is: 19.0.0-rc-1eaccd82-20240816 pretty-format@27.5.1: dependencies: ansi-regex: 5.0.1 ansi-styles: 5.2.0 - react-is: 19.0.0-rc-49496d49-20240814 + react-is: 19.0.0-rc-1eaccd82-20240816 pretty-format@29.5.0: dependencies: '@jest/schemas': 29.4.3 ansi-styles: 5.2.0 - react-is: 19.0.0-rc-49496d49-20240814 + react-is: 19.0.0-rc-1eaccd82-20240816 pretty-format@29.7.0: dependencies: '@jest/schemas': 29.6.3 ansi-styles: 5.2.0 - react-is: 19.0.0-rc-49496d49-20240814 + react-is: 19.0.0-rc-1eaccd82-20240816 pretty-ms@7.0.0: dependencies: @@ -28929,7 +28929,7 @@ snapshots: dependencies: loose-envify: 1.4.0 object-assign: 4.1.1 - react-is: 19.0.0-rc-49496d49-20240814 + react-is: 19.0.0-rc-1eaccd82-20240816 property-information@5.6.0: dependencies: @@ -29101,29 +29101,29 @@ snapshots: minimist: 1.2.8 strip-json-comments: 2.0.1 - react-dom@0.0.0-experimental-49496d49-20240814(react@19.0.0-rc-49496d49-20240814): + react-dom@0.0.0-experimental-1eaccd82-20240816(react@19.0.0-rc-1eaccd82-20240816): dependencies: - react: 19.0.0-rc-49496d49-20240814 - scheduler: 0.25.0-rc-49496d49-20240814 + react: 19.0.0-rc-1eaccd82-20240816 + scheduler: 0.25.0-rc-1eaccd82-20240816 - react-dom@17.0.2(react@19.0.0-rc-49496d49-20240814): + react-dom@17.0.2(react@19.0.0-rc-1eaccd82-20240816): dependencies: loose-envify: 1.4.0 object-assign: 4.1.1 - react: 19.0.0-rc-49496d49-20240814 - scheduler: 0.25.0-rc-49496d49-20240814 + react: 19.0.0-rc-1eaccd82-20240816 + scheduler: 0.25.0-rc-1eaccd82-20240816 - react-dom@19.0.0-rc-49496d49-20240814(react@19.0.0-rc-49496d49-20240814): + react-dom@19.0.0-rc-1eaccd82-20240816(react@19.0.0-rc-1eaccd82-20240816): dependencies: - react: 19.0.0-rc-49496d49-20240814 - scheduler: 0.25.0-rc-49496d49-20240814 + react: 19.0.0-rc-1eaccd82-20240816 + scheduler: 0.25.0-rc-1eaccd82-20240816 react-dom@19.0.0-rc-6230622a1a-20240610(react@19.0.0-rc-6230622a1a-20240610): dependencies: react: 19.0.0-rc-6230622a1a-20240610 - scheduler: 0.25.0-rc-49496d49-20240814 + scheduler: 0.25.0-rc-1eaccd82-20240816 - react-is@19.0.0-rc-49496d49-20240814: {} + react-is@19.0.0-rc-1eaccd82-20240816: {} react-is@19.0.0-rc-6230622a1a-20240610: {} @@ -29156,46 +29156,46 @@ snapshots: optionalDependencies: '@types/react': types-react@19.0.0-rc.0 - react-server-dom-turbopack@0.0.0-experimental-49496d49-20240814(react-dom@19.0.0-rc-49496d49-20240814(react@19.0.0-rc-49496d49-20240814))(react@19.0.0-rc-49496d49-20240814): + react-server-dom-turbopack@0.0.0-experimental-1eaccd82-20240816(react-dom@19.0.0-rc-1eaccd82-20240816(react@19.0.0-rc-1eaccd82-20240816))(react@19.0.0-rc-1eaccd82-20240816): dependencies: acorn-loose: 8.3.0 neo-async: 2.6.1 - react: 19.0.0-rc-49496d49-20240814 - react-dom: 19.0.0-rc-49496d49-20240814(react@19.0.0-rc-49496d49-20240814) + react: 19.0.0-rc-1eaccd82-20240816 + react-dom: 19.0.0-rc-1eaccd82-20240816(react@19.0.0-rc-1eaccd82-20240816) - react-server-dom-turbopack@19.0.0-rc-49496d49-20240814(react-dom@19.0.0-rc-49496d49-20240814(react@19.0.0-rc-49496d49-20240814))(react@19.0.0-rc-49496d49-20240814): + react-server-dom-turbopack@19.0.0-rc-1eaccd82-20240816(react-dom@19.0.0-rc-1eaccd82-20240816(react@19.0.0-rc-1eaccd82-20240816))(react@19.0.0-rc-1eaccd82-20240816): dependencies: acorn-loose: 8.3.0 neo-async: 2.6.1 - react: 19.0.0-rc-49496d49-20240814 - react-dom: 19.0.0-rc-49496d49-20240814(react@19.0.0-rc-49496d49-20240814) + react: 19.0.0-rc-1eaccd82-20240816 + react-dom: 19.0.0-rc-1eaccd82-20240816(react@19.0.0-rc-1eaccd82-20240816) - react-server-dom-webpack@0.0.0-experimental-49496d49-20240814(react-dom@19.0.0-rc-49496d49-20240814(react@19.0.0-rc-49496d49-20240814))(react@19.0.0-rc-49496d49-20240814)(webpack@5.90.0(@swc/core@1.6.13(@swc/helpers@0.5.12))): + react-server-dom-webpack@0.0.0-experimental-1eaccd82-20240816(react-dom@19.0.0-rc-1eaccd82-20240816(react@19.0.0-rc-1eaccd82-20240816))(react@19.0.0-rc-1eaccd82-20240816)(webpack@5.90.0(@swc/core@1.6.13(@swc/helpers@0.5.12))): dependencies: acorn-loose: 8.3.0 neo-async: 2.6.1 - react: 19.0.0-rc-49496d49-20240814 - react-dom: 19.0.0-rc-49496d49-20240814(react@19.0.0-rc-49496d49-20240814) + react: 19.0.0-rc-1eaccd82-20240816 + react-dom: 19.0.0-rc-1eaccd82-20240816(react@19.0.0-rc-1eaccd82-20240816) webpack: 5.90.0(@swc/core@1.6.13(@swc/helpers@0.5.12)) - react-server-dom-webpack@19.0.0-rc-49496d49-20240814(react-dom@19.0.0-rc-49496d49-20240814(react@19.0.0-rc-49496d49-20240814))(react@19.0.0-rc-49496d49-20240814)(webpack@5.90.0(@swc/core@1.6.13(@swc/helpers@0.5.12))): + react-server-dom-webpack@19.0.0-rc-1eaccd82-20240816(react-dom@19.0.0-rc-1eaccd82-20240816(react@19.0.0-rc-1eaccd82-20240816))(react@19.0.0-rc-1eaccd82-20240816)(webpack@5.90.0(@swc/core@1.6.13(@swc/helpers@0.5.12))): dependencies: acorn-loose: 8.3.0 neo-async: 2.6.1 - react: 19.0.0-rc-49496d49-20240814 - react-dom: 19.0.0-rc-49496d49-20240814(react@19.0.0-rc-49496d49-20240814) + react: 19.0.0-rc-1eaccd82-20240816 + react-dom: 19.0.0-rc-1eaccd82-20240816(react@19.0.0-rc-1eaccd82-20240816) webpack: 5.90.0(@swc/core@1.6.13(@swc/helpers@0.5.12)) - react-shallow-renderer@16.15.0(react@19.0.0-rc-49496d49-20240814): + react-shallow-renderer@16.15.0(react@19.0.0-rc-1eaccd82-20240816): dependencies: object-assign: 4.1.1 - react: 19.0.0-rc-49496d49-20240814 - react-is: 19.0.0-rc-49496d49-20240814 + react: 19.0.0-rc-1eaccd82-20240816 + react-is: 19.0.0-rc-1eaccd82-20240816 - react-ssr-prepass@1.0.8(react-is@19.0.0-rc-6230622a1a-20240610)(react@19.0.0-rc-49496d49-20240814): + react-ssr-prepass@1.0.8(react-is@19.0.0-rc-6230622a1a-20240610)(react@19.0.0-rc-1eaccd82-20240816): dependencies: object-is: 1.0.2 - react: 19.0.0-rc-49496d49-20240814 + react: 19.0.0-rc-1eaccd82-20240816 react-is: 19.0.0-rc-6230622a1a-20240610 react-style-singleton@2.2.1(react@19.0.0-rc-6230622a1a-20240610)(types-react@19.0.0-rc.0): @@ -29207,12 +29207,12 @@ snapshots: optionalDependencies: '@types/react': types-react@19.0.0-rc.0 - react-test-renderer@18.2.0(react@19.0.0-rc-49496d49-20240814): + react-test-renderer@18.2.0(react@19.0.0-rc-1eaccd82-20240816): dependencies: - react: 19.0.0-rc-49496d49-20240814 - react-is: 19.0.0-rc-49496d49-20240814 - react-shallow-renderer: 16.15.0(react@19.0.0-rc-49496d49-20240814) - scheduler: 0.25.0-rc-49496d49-20240814 + react: 19.0.0-rc-1eaccd82-20240816 + react-is: 19.0.0-rc-1eaccd82-20240816 + react-shallow-renderer: 16.15.0(react@19.0.0-rc-1eaccd82-20240816) + scheduler: 0.25.0-rc-1eaccd82-20240816 react-textarea-autosize@8.5.3(react@19.0.0-rc-6230622a1a-20240610)(types-react@19.0.0-rc.0): dependencies: @@ -29223,25 +29223,25 @@ snapshots: transitivePeerDependencies: - '@types/react' - react-virtualized@9.22.3(react-dom@19.0.0-rc-49496d49-20240814(react@19.0.0-rc-49496d49-20240814))(react@19.0.0-rc-49496d49-20240814): + react-virtualized@9.22.3(react-dom@19.0.0-rc-1eaccd82-20240816(react@19.0.0-rc-1eaccd82-20240816))(react@19.0.0-rc-1eaccd82-20240816): dependencies: '@babel/runtime': 7.22.5 clsx: 1.1.1 dom-helpers: 5.2.1 loose-envify: 1.4.0 prop-types: 15.8.1 - react: 19.0.0-rc-49496d49-20240814 - react-dom: 19.0.0-rc-49496d49-20240814(react@19.0.0-rc-49496d49-20240814) + react: 19.0.0-rc-1eaccd82-20240816 + react-dom: 19.0.0-rc-1eaccd82-20240816(react@19.0.0-rc-1eaccd82-20240816) react-lifecycles-compat: 3.0.4 - react@0.0.0-experimental-49496d49-20240814: {} + react@0.0.0-experimental-1eaccd82-20240816: {} react@17.0.2: dependencies: loose-envify: 1.4.0 object-assign: 4.1.1 - react@19.0.0-rc-49496d49-20240814: {} + react@19.0.0-rc-1eaccd82-20240816: {} react@19.0.0-rc-6230622a1a-20240610: {} @@ -29931,9 +29931,9 @@ snapshots: dependencies: xmlchars: 2.2.0 - scheduler@0.0.0-experimental-49496d49-20240814: {} + scheduler@0.0.0-experimental-1eaccd82-20240816: {} - scheduler@0.25.0-rc-49496d49-20240814: {} + scheduler@0.25.0-rc-1eaccd82-20240816: {} schema-utils@2.7.1: dependencies: @@ -30582,7 +30582,7 @@ snapshots: dependencies: inline-style-parser: 0.1.1 - styled-components@6.0.0-rc.3(react-dom@19.0.0-rc-49496d49-20240814(react@19.0.0-rc-49496d49-20240814))(react@19.0.0-rc-49496d49-20240814): + styled-components@6.0.0-rc.3(react-dom@19.0.0-rc-1eaccd82-20240816(react@19.0.0-rc-1eaccd82-20240816))(react@19.0.0-rc-1eaccd82-20240816): dependencies: '@babel/cli': 7.21.5(@babel/core@7.22.5) '@babel/core': 7.22.5 @@ -30597,8 +30597,8 @@ snapshots: '@emotion/unitless': 0.8.1 css-to-react-native: 3.2.0 postcss: 8.4.31 - react: 19.0.0-rc-49496d49-20240814 - react-dom: 19.0.0-rc-49496d49-20240814(react@19.0.0-rc-49496d49-20240814) + react: 19.0.0-rc-1eaccd82-20240816 + react-dom: 19.0.0-rc-1eaccd82-20240816(react@19.0.0-rc-1eaccd82-20240816) shallowequal: 1.1.0 stylis: 4.2.0 tslib: 2.5.3 @@ -30610,10 +30610,10 @@ snapshots: postcss: 7.0.32 postcss-load-plugins: 2.3.0 - styled-jsx@5.1.6(@babel/core@7.22.5)(babel-plugin-macros@3.1.0)(react@19.0.0-rc-49496d49-20240814): + styled-jsx@5.1.6(@babel/core@7.22.5)(babel-plugin-macros@3.1.0)(react@19.0.0-rc-1eaccd82-20240816): dependencies: client-only: 0.0.1 - react: 19.0.0-rc-49496d49-20240814 + react: 19.0.0-rc-1eaccd82-20240816 optionalDependencies: '@babel/core': 7.22.5 babel-plugin-macros: 3.1.0 @@ -30703,11 +30703,11 @@ snapshots: picocolors: 1.0.1 stable: 0.1.8 - swr@2.2.4(react@19.0.0-rc-49496d49-20240814): + swr@2.2.4(react@19.0.0-rc-1eaccd82-20240816): dependencies: client-only: 0.0.1 - react: 19.0.0-rc-49496d49-20240814 - use-sync-external-store: 1.2.0(react@19.0.0-rc-49496d49-20240814) + react: 19.0.0-rc-1eaccd82-20240816 + use-sync-external-store: 1.2.0(react@19.0.0-rc-1eaccd82-20240816) symbol-observable@1.0.1: {} @@ -31396,9 +31396,9 @@ snapshots: unist-util-is: 5.2.0 unist-util-visit-parents: 5.1.3 - unistore@3.4.1(react@19.0.0-rc-49496d49-20240814): + unistore@3.4.1(react@19.0.0-rc-1eaccd82-20240816): optionalDependencies: - react: 19.0.0-rc-49496d49-20240814 + react: 19.0.0-rc-1eaccd82-20240816 universal-github-app-jwt@1.1.1: dependencies: @@ -31523,9 +31523,9 @@ snapshots: optionalDependencies: '@types/react': types-react@19.0.0-rc.0 - use-sync-external-store@1.2.0(react@19.0.0-rc-49496d49-20240814): + use-sync-external-store@1.2.0(react@19.0.0-rc-1eaccd82-20240816): dependencies: - react: 19.0.0-rc-49496d49-20240814 + react: 19.0.0-rc-1eaccd82-20240816 use@3.1.1: {} diff --git a/run-tests.js b/run-tests.js index 75a4a1158e440..42af4b8b886d2 100644 --- a/run-tests.js +++ b/run-tests.js @@ -409,7 +409,7 @@ ${ENDGROUP}`) // run `pnpm install` each time. console.log(`${GROUP}Creating shared Next.js install`) const reactVersion = - process.env.NEXT_TEST_REACT_VERSION || '19.0.0-rc-49496d49-20240814' + process.env.NEXT_TEST_REACT_VERSION || '19.0.0-rc-1eaccd82-20240816' const { installDir, pkgPaths, tmpRepoDir } = await createNextInstall({ parentSpan: mockTrace(), dependencies: { diff --git a/test/.stats-app/package.json b/test/.stats-app/package.json index 590808a226e90..d39aafde68f94 100644 --- a/test/.stats-app/package.json +++ b/test/.stats-app/package.json @@ -4,8 +4,8 @@ "license": "MIT", "dependencies": { "next": "latest", - "react": "19.0.0-rc-49496d49-20240814", - "react-dom": "19.0.0-rc-49496d49-20240814" + "react": "19.0.0-rc-1eaccd82-20240816", + "react-dom": "19.0.0-rc-1eaccd82-20240816" }, "engines": { "node": ">=18.18.0" diff --git a/test/e2e/next-test/first-time-setup-js/package.json b/test/e2e/next-test/first-time-setup-js/package.json index d111dcbb25e68..06f58054bf3bf 100644 --- a/test/e2e/next-test/first-time-setup-js/package.json +++ b/test/e2e/next-test/first-time-setup-js/package.json @@ -8,7 +8,7 @@ }, "dependencies": { "next": "canary", - "react": "19.0.0-rc-49496d49-20240814", - "react-dom": "19.0.0-rc-49496d49-20240814" + "react": "19.0.0-rc-1eaccd82-20240816", + "react-dom": "19.0.0-rc-1eaccd82-20240816" } } diff --git a/test/e2e/next-test/first-time-setup-ts/package.json b/test/e2e/next-test/first-time-setup-ts/package.json index ec2c33e2312ed..751b3f23474dc 100644 --- a/test/e2e/next-test/first-time-setup-ts/package.json +++ b/test/e2e/next-test/first-time-setup-ts/package.json @@ -8,8 +8,8 @@ }, "dependencies": { "next": "canary", - "react": "19.0.0-rc-49496d49-20240814", - "react-dom": "19.0.0-rc-49496d49-20240814" + "react": "19.0.0-rc-1eaccd82-20240816", + "react-dom": "19.0.0-rc-1eaccd82-20240816" }, "devDependencies": { "@types/react": "^18", diff --git a/test/lib/next-modes/base.ts b/test/lib/next-modes/base.ts index 733cc731fae0a..1c03e4e91a38b 100644 --- a/test/lib/next-modes/base.ts +++ b/test/lib/next-modes/base.ts @@ -163,7 +163,7 @@ export class NextInstance { ) const reactVersion = - process.env.NEXT_TEST_REACT_VERSION || '19.0.0-rc-49496d49-20240814' + process.env.NEXT_TEST_REACT_VERSION || '19.0.0-rc-1eaccd82-20240816' const finalDependencies = { react: reactVersion, 'react-dom': reactVersion,