From 78c3b44c3bb13fa388185db39a49af05383e5f3f Mon Sep 17 00:00:00 2001 From: Josh Story Date: Wed, 18 Oct 2023 12:25:05 -0700 Subject: [PATCH] Successfully updated React from a41957507 to 9617d39ec. - https://github.com/facebook/react/pull/27543 - https://github.com/facebook/react/pull/27541 - https://github.com/facebook/react/pull/27538 - https://github.com/facebook/react/pull/27536 --- package.json | 20 ++-- ...t-dom-server-legacy.browser.development.js | 21 +++- ...om-server-legacy.browser.production.min.js | 4 +- ...eact-dom-server-legacy.node.development.js | 21 +++- ...t-dom-server-legacy.node.production.min.js | 4 +- ...t-dom-server-rendering-stub.development.js | 2 +- ...om-server-rendering-stub.production.min.js | 2 +- .../react-dom-server.browser.development.js | 24 ++-- ...react-dom-server.browser.production.min.js | 78 ++++++------- .../cjs/react-dom-server.edge.development.js | 24 ++-- .../react-dom-server.edge.production.min.js | 84 +++++++------- .../cjs/react-dom-server.node.development.js | 18 ++- .../react-dom-server.node.production.min.js | 6 +- .../react-dom-unstable_testing.development.js | 2 +- ...act-dom-unstable_testing.production.min.js | 6 +- .../cjs/react-dom.development.js | 2 +- .../cjs/react-dom.production.min.js | 6 +- .../cjs/react-dom.profiling.min.js | 6 +- .../react-dom-experimental/package.json | 4 +- ...t-dom-server-legacy.browser.development.js | 21 +++- ...om-server-legacy.browser.production.min.js | 4 +- ...eact-dom-server-legacy.node.development.js | 21 +++- ...t-dom-server-legacy.node.production.min.js | 6 +- ...t-dom-server-rendering-stub.development.js | 2 +- ...om-server-rendering-stub.production.min.js | 2 +- .../react-dom-server.browser.development.js | 20 +++- ...react-dom-server.browser.production.min.js | 8 +- .../cjs/react-dom-server.edge.development.js | 20 +++- .../react-dom-server.edge.production.min.js | 8 +- .../cjs/react-dom-server.node.development.js | 18 ++- .../react-dom-server.node.production.min.js | 6 +- .../react-dom/cjs/react-dom.development.js | 2 +- .../react-dom/cjs/react-dom.production.min.js | 6 +- .../react-dom/cjs/react-dom.profiling.min.js | 6 +- .../next/src/compiled/react-dom/package.json | 4 +- .../cjs/react.development.js | 2 +- .../cjs/react.production.min.js | 2 +- .../cjs/react.shared-subset.development.js | 2 +- .../cjs/react.shared-subset.production.min.js | 2 +- .../package.json | 4 +- .../react-server-dom-turbopack/package.json | 4 +- .../package.json | 4 +- .../react-server-dom-webpack/package.json | 4 +- .../compiled/react/cjs/react.development.js | 2 +- .../react/cjs/react.production.min.js | 2 +- .../cjs/react.shared-subset.development.js | 2 +- .../cjs/react.shared-subset.production.min.js | 2 +- pnpm-lock.yaml | 104 +++++++++--------- 48 files changed, 368 insertions(+), 256 deletions(-) diff --git a/package.json b/package.json index 0324783aa9cb84..1636b2ea2b6703 100644 --- a/package.json +++ b/package.json @@ -193,16 +193,16 @@ "random-seed": "0.3.0", "react": "18.2.0", "react-17": "npm:react@17.0.2", - "react-builtin": "npm:react@18.3.0-canary-a41957507-20231017", + "react-builtin": "npm:react@18.3.0-canary-9617d39ec-20231018", "react-dom": "18.2.0", "react-dom-17": "npm:react-dom@17.0.2", - "react-dom-builtin": "npm:react-dom@18.3.0-canary-a41957507-20231017", - "react-dom-experimental-builtin": "npm:react-dom@0.0.0-experimental-a41957507-20231017", - "react-experimental-builtin": "npm:react@0.0.0-experimental-a41957507-20231017", - "react-server-dom-turbopack": "18.3.0-canary-a41957507-20231017", - "react-server-dom-turbopack-experimental": "npm:react-server-dom-turbopack@0.0.0-experimental-a41957507-20231017", - "react-server-dom-webpack": "18.3.0-canary-a41957507-20231017", - "react-server-dom-webpack-experimental": "npm:react-server-dom-webpack@0.0.0-experimental-a41957507-20231017", + "react-dom-builtin": "npm:react-dom@18.3.0-canary-9617d39ec-20231018", + "react-dom-experimental-builtin": "npm:react-dom@0.0.0-experimental-9617d39ec-20231018", + "react-experimental-builtin": "npm:react@0.0.0-experimental-9617d39ec-20231018", + "react-server-dom-turbopack": "18.3.0-canary-9617d39ec-20231018", + "react-server-dom-turbopack-experimental": "npm:react-server-dom-turbopack@0.0.0-experimental-9617d39ec-20231018", + "react-server-dom-webpack": "18.3.0-canary-9617d39ec-20231018", + "react-server-dom-webpack-experimental": "npm:react-server-dom-webpack@0.0.0-experimental-9617d39ec-20231018", "react-ssr-prepass": "1.0.8", "react-virtualized": "9.22.3", "relay-compiler": "13.0.2", @@ -212,8 +212,8 @@ "resolve-from": "5.0.0", "sass": "1.54.0", "satori": "0.10.6", - "scheduler-builtin": "npm:scheduler@0.24.0-canary-a41957507-20231017", - "scheduler-experimental-builtin": "npm:scheduler@0.0.0-experimental-a41957507-20231017", + "scheduler-builtin": "npm:scheduler@0.24.0-canary-9617d39ec-20231018", + "scheduler-experimental-builtin": "npm:scheduler@0.0.0-experimental-9617d39ec-20231018", "seedrandom": "3.0.5", "selenium-webdriver": "4.0.0-beta.4", "semver": "7.3.7", 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 0fa29c5711881e..e397aa316b8119 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 @@ -17,7 +17,7 @@ if (process.env.NODE_ENV !== "production") { var React = require("next/dist/compiled/react-experimental"); var ReactDOM = require('react-dom'); -var ReactVersion = '18.3.0-experimental-a41957507-20231017'; +var ReactVersion = '18.3.0-experimental-9617d39ec-20231018'; var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; @@ -11256,7 +11256,10 @@ function flushCompletedQueues(request, destination) { } // We're done. - close(destination); + close(destination); // We need to stop flowing now because we do not want any async contexts which might call + // float methods to initiate any flushes after this point + + stopFlowing(request); } } } @@ -11276,10 +11279,17 @@ function enqueueFlush(request) { request.pingedTasks.length === 0 && // If there is no destination there is nothing we can flush to. A flush will // happen when we start flowing again request.destination !== null) { - var destination = request.destination; request.flushScheduled = true; scheduleWork(function () { - return flushCompletedQueues(request, destination); + // We need to existence check destination again here because it might go away + // in between the enqueueFlush call and the work execution + var destination = request.destination; + + if (destination) { + flushCompletedQueues(request, destination); + } else { + request.flushScheduled = false; + } }); } } @@ -11309,6 +11319,9 @@ function startFlowing(request, destination) { fatalError(request, error); } } +function stopFlowing(request) { + request.destination = null; +} // This is called to early terminate a request. It puts all pending boundaries in client rendered state. function abort(request, reason) { try { diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.production.min.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.production.min.js index 2c549a83c8060e..43440d2f4fd7e2 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.production.min.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.production.min.js @@ -188,8 +188,8 @@ b);q.highImagePreloads.clear();q.styles.forEach(lc,b);q.scripts.forEach(K,b);q.s ba?(q.push(V.startInlineScript),0===(A.instructions&4)?(A.instructions|=4,q.push('$RX=function(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};;$RX("')):q.push('$RX("')):q.push('')){a.destination=null;c++;O.splice(0,c);return}}O.splice(0,c);var W=a.completedBoundaries;for(c=0;c")),a.hasHtml&&(b.push(""))),b.push(null))}}function oc(a){if(!1===a.flushScheduled&&0===a.pingedTasks.length&&null!==a.destination){var b=a.destination;a.flushScheduled=!0;Oe(a,b)}} +0===a.clientRenderedBoundaries.length&&0===a.completedBoundaries.length&&(a.flushScheduled=!1,null===a.trackedPostpones&&(c=a.resumableState,c.hasBody&&(b.push("")),c.hasHtml&&(b.push(""))),b.push(null),a.destination=null)}}function oc(a){if(!1===a.flushScheduled&&0===a.pingedTasks.length&&null!==a.destination){a.flushScheduled=!0;var b=a.destination;b?Oe(a,b):a.flushScheduled=!1}} function Ue(a,b){try{var c=a.abortableTasks;if(0"):!p.push('">')){a.destination=null;c++;N.splice(0,c);return}}N.splice(0,c);var V=a.completedBoundaries;for(c=0;c")),a.hasHtml&&(b.push(""))),b.push(null))}}function pc(a){if(!1===a.flushScheduled&&0===a.pingedTasks.length&&null!==a.destination){var b=a.destination;a.flushScheduled=!0;Pe(a,b)}} +0===a.clientRenderedBoundaries.length&&0===a.completedBoundaries.length&&(a.flushScheduled=!1,null===a.trackedPostpones&&(c=a.resumableState,c.hasBody&&(b.push("")),c.hasHtml&&(b.push(""))),b.push(null),a.destination=null)}}function pc(a){if(!1===a.flushScheduled&&0===a.pingedTasks.length&&null!==a.destination){a.flushScheduled=!0;var b=a.destination;b?Pe(a,b):a.flushScheduled=!1}} function Ve(a,b){if(1===a.status)a.status=2,b.destroy(a.fatalError);else if(2!==a.status&&null===a.destination){a.destination=b;try{Pe(a,b)}catch(c){W(a,c),Ae(a,c)}}}function We(a,b){try{var c=a.abortableTasks;if(0'),cb=A("