From 7b3e586892330e4aea600f91b7508a75513b96fd Mon Sep 17 00:00:00 2001 From: Josh Story Date: Tue, 7 Nov 2023 15:06:45 -0800 Subject: [PATCH] Successfully updated React from 08a39539f to 2983249dd. - https://github.com/facebook/react/pull/27641 - https://github.com/facebook/react/pull/27661 - https://github.com/facebook/react/pull/27640 - https://github.com/facebook/react/pull/27595 - https://github.com/facebook/react/pull/27600 - https://github.com/facebook/react/pull/27598 - https://github.com/facebook/react/pull/27590 - https://github.com/facebook/react/pull/27606 - https://github.com/facebook/react/pull/27608 - https://github.com/facebook/react/pull/27601 - https://github.com/facebook/react/pull/27616 - https://github.com/facebook/react/pull/27615 - https://github.com/facebook/react/pull/27614 - https://github.com/facebook/react/pull/27599 - https://github.com/facebook/react/pull/27597 - https://github.com/facebook/react/pull/27525 - https://github.com/facebook/react/pull/27571 --- package.json | 20 +- ...t-dom-server-legacy.browser.development.js | 654 +++++++++++++--- ...om-server-legacy.browser.production.min.js | 303 ++++---- ...eact-dom-server-legacy.node.development.js | 654 +++++++++++++--- ...t-dom-server-legacy.node.production.min.js | 333 ++++---- ...t-dom-server-rendering-stub.development.js | 2 +- ...om-server-rendering-stub.production.min.js | 2 +- .../react-dom-server.browser.development.js | 691 ++++++++++++++--- ...react-dom-server.browser.production.min.js | 338 +++++---- .../cjs/react-dom-server.edge.development.js | 695 ++++++++++++++--- .../react-dom-server.edge.production.min.js | 360 ++++----- .../cjs/react-dom-server.node.development.js | 688 ++++++++++++++--- .../react-dom-server.node.production.min.js | 359 ++++----- .../react-dom-unstable_testing.development.js | 82 +- ...act-dom-unstable_testing.production.min.js | 712 +++++++++--------- .../cjs/react-dom.development.js | 82 +- .../cjs/react-dom.production.min.js | 670 ++++++++-------- .../cjs/react-dom.profiling.min.js | 702 ++++++++--------- .../react-dom-experimental/package.json | 4 +- ...t-dom-server-legacy.browser.development.js | 654 +++++++++++++--- ...om-server-legacy.browser.production.min.js | 298 ++++---- ...eact-dom-server-legacy.node.development.js | 654 +++++++++++++--- ...t-dom-server-legacy.node.production.min.js | 327 ++++---- ...t-dom-server-rendering-stub.development.js | 2 +- ...om-server-rendering-stub.production.min.js | 2 +- .../react-dom-server.browser.development.js | 660 +++++++++++++--- ...react-dom-server.browser.production.min.js | 318 ++++---- .../cjs/react-dom-server.edge.development.js | 664 +++++++++++++--- .../react-dom-server.edge.production.min.js | 338 +++++---- .../cjs/react-dom-server.node.development.js | 666 +++++++++++++--- .../react-dom-server.node.production.min.js | 336 +++++---- .../react-dom/cjs/react-dom.development.js | 82 +- .../react-dom/cjs/react-dom.production.min.js | 665 ++++++++-------- .../react-dom/cjs/react-dom.profiling.min.js | 693 ++++++++--------- .../next/src/compiled/react-dom/package.json | 4 +- .../cjs/react.development.js | 4 +- .../cjs/react.production.min.js | 6 +- .../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 +- ...cheduler-unstable_post_task.development.js | 10 +- ...duler-unstable_post_task.production.min.js | 8 +- ...cheduler-unstable_post_task.development.js | 10 +- ...duler-unstable_post_task.production.min.js | 8 +- pnpm-lock.yaml | 106 +-- 52 files changed, 9354 insertions(+), 4540 deletions(-) diff --git a/package.json b/package.json index 0f30740850f13..c37a92ebaff06 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-08a39539f-20231031", + "react-builtin": "npm:react@18.3.0-canary-2983249dd-20231107", "react-dom": "18.2.0", "react-dom-17": "npm:react-dom@17.0.2", - "react-dom-builtin": "npm:react-dom@18.3.0-canary-08a39539f-20231031", - "react-dom-experimental-builtin": "npm:react-dom@0.0.0-experimental-08a39539f-20231031", - "react-experimental-builtin": "npm:react@0.0.0-experimental-08a39539f-20231031", - "react-server-dom-turbopack": "18.3.0-canary-08a39539f-20231031", - "react-server-dom-turbopack-experimental": "npm:react-server-dom-turbopack@0.0.0-experimental-08a39539f-20231031", - "react-server-dom-webpack": "18.3.0-canary-08a39539f-20231031", - "react-server-dom-webpack-experimental": "npm:react-server-dom-webpack@0.0.0-experimental-08a39539f-20231031", + "react-dom-builtin": "npm:react-dom@18.3.0-canary-2983249dd-20231107", + "react-dom-experimental-builtin": "npm:react-dom@0.0.0-experimental-2983249dd-20231107", + "react-experimental-builtin": "npm:react@0.0.0-experimental-2983249dd-20231107", + "react-server-dom-turbopack": "18.3.0-canary-2983249dd-20231107", + "react-server-dom-turbopack-experimental": "npm:react-server-dom-turbopack@0.0.0-experimental-2983249dd-20231107", + "react-server-dom-webpack": "18.3.0-canary-2983249dd-20231107", + "react-server-dom-webpack-experimental": "npm:react-server-dom-webpack@0.0.0-experimental-2983249dd-20231107", "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-08a39539f-20231031", - "scheduler-experimental-builtin": "npm:scheduler@0.0.0-experimental-08a39539f-20231031", + "scheduler-builtin": "npm:scheduler@0.24.0-canary-2983249dd-20231107", + "scheduler-experimental-builtin": "npm:scheduler@0.0.0-experimental-2983249dd-20231107", "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 a739d153c87e9..e42b81e70af15 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-08a39539f-20231031'; +var ReactVersion = '18.3.0-experimental-2983249dd-20231107'; var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; @@ -264,6 +264,15 @@ function checkAttributeStringCoercion(value, attributeName) { } } } +function checkOptionStringCoercion(value, propName) { + { + if (willCoercionThrow(value)) { + error('The provided `%s` option is an unsupported type %s.' + ' This value must be coerced to a string before using it here.', propName, typeName(value)); + + return testStringCoercion(value); // throw (to help callers find troubleshooting comments) + } + } +} function checkCSSPropertyStringCoercion(value, propName) { { if (willCoercionThrow(value)) { @@ -1448,6 +1457,14 @@ function warnValidStyle(name, value) { } } +function getCrossOriginString(input) { + if (typeof input === 'string') { + return input === 'use-credentials' ? input : ''; + } + + return undefined; +} + // code copied and modified from escape-html var matchHtmlRegExp = /["'&<>]/; /** @@ -1628,7 +1645,7 @@ var ReactDOMServerDispatcher = { }; function prepareHostDispatcher() { ReactDOMCurrentDispatcher.current = ReactDOMServerDispatcher; -} // Used to distinguish these contexts from ones used in other renderers. +} // We make every property of the descriptor optional because it is not a contract that var ScriptStreamingFormat = 0; var DataStreamingFormat = 1; var NothingSent @@ -1707,11 +1724,19 @@ var scriptReplacer = function (match, prefix, s, suffix) { }; var importMapScriptStart = stringToPrecomputedChunk(''); // Allows us to keep track of what we've already written so we can refer back to it. +var importMapScriptEnd = stringToPrecomputedChunk(''); // Since we store headers as strings we deal with their length in utf16 code units +// rather than visual characters or the utf8 encoding that is used for most binary +// serialization. Some common HTTP servers only allow for headers to be 4kB in length. +// We choose a default length that is likely to be well under this already limited length however +// pathological cases may still cause the utf-8 encoding of the headers to approach this limit. +// It should also be noted that this maximum is a soft maximum. we have not reached the limit we will +// allow one more header to be captured which means in practice if the limit is approached it will be exceeded + +var DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000; // Allows us to keep track of what we've already written so we can refer back to it. // if passed externalRuntimeConfig and the enableFizzExternalRuntime feature flag // is set, the server will send instructions via data attributes (instead of inline scripts) -function createRenderState$1(resumableState, nonce, bootstrapScriptContent, bootstrapScripts, bootstrapModules, externalRuntimeConfig, importMap) { +function createRenderState$1(resumableState, nonce, bootstrapScriptContent, bootstrapScripts, bootstrapModules, externalRuntimeConfig, importMap, onHeaders, maxHeadersLength) { var inlineScriptWithNonce = nonce === undefined ? startInlineScript : stringToPrecomputedChunk(''); // Allows us to keep track of what we've already written so we can refer back to it. +var importMapScriptEnd = stringToPrecomputedChunk(''); // Since we store headers as strings we deal with their length in utf16 code units +// rather than visual characters or the utf8 encoding that is used for most binary +// serialization. Some common HTTP servers only allow for headers to be 4kB in length. +// We choose a default length that is likely to be well under this already limited length however +// pathological cases may still cause the utf-8 encoding of the headers to approach this limit. +// It should also be noted that this maximum is a soft maximum. we have not reached the limit we will +// allow one more header to be captured which means in practice if the limit is approached it will be exceeded + +var DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000; // Allows us to keep track of what we've already written so we can refer back to it. // if passed externalRuntimeConfig and the enableFizzExternalRuntime feature flag // is set, the server will send instructions via data attributes (instead of inline scripts) -function createRenderState$1(resumableState, nonce, bootstrapScriptContent, bootstrapScripts, bootstrapModules, externalRuntimeConfig, importMap) { +function createRenderState$1(resumableState, nonce, bootstrapScriptContent, bootstrapScripts, bootstrapModules, externalRuntimeConfig, importMap, onHeaders, maxHeadersLength) { var inlineScriptWithNonce = nonce === undefined ? startInlineScript : stringToPrecomputedChunk(''); // Allows us to keep track of what we've already written so we can refer back to it. +var importMapScriptEnd = stringToPrecomputedChunk(''); // Since we store headers as strings we deal with their length in utf16 code units +// rather than visual characters or the utf8 encoding that is used for most binary +// serialization. Some common HTTP servers only allow for headers to be 4kB in length. +// We choose a default length that is likely to be well under this already limited length however +// pathological cases may still cause the utf-8 encoding of the headers to approach this limit. +// It should also be noted that this maximum is a soft maximum. we have not reached the limit we will +// allow one more header to be captured which means in practice if the limit is approached it will be exceeded + +var DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000; // Allows us to keep track of what we've already written so we can refer back to it. // if passed externalRuntimeConfig and the enableFizzExternalRuntime feature flag // is set, the server will send instructions via data attributes (instead of inline scripts) -function createRenderState(resumableState, nonce, bootstrapScriptContent, bootstrapScripts, bootstrapModules, externalRuntimeConfig, importMap) { +function createRenderState(resumableState, nonce, bootstrapScriptContent, bootstrapScripts, bootstrapModules, externalRuntimeConfig, importMap, onHeaders, maxHeadersLength) { var inlineScriptWithNonce = nonce === undefined ? startInlineScript : stringToPrecomputedChunk(''); // Allows us to keep track of what we've already written so we can refer back to it. +var importMapScriptEnd = stringToPrecomputedChunk(''); // Since we store headers as strings we deal with their length in utf16 code units +// rather than visual characters or the utf8 encoding that is used for most binary +// serialization. Some common HTTP servers only allow for headers to be 4kB in length. +// We choose a default length that is likely to be well under this already limited length however +// pathological cases may still cause the utf-8 encoding of the headers to approach this limit. +// It should also be noted that this maximum is a soft maximum. we have not reached the limit we will +// allow one more header to be captured which means in practice if the limit is approached it will be exceeded + +var DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000; // Allows us to keep track of what we've already written so we can refer back to it. // if passed externalRuntimeConfig and the enableFizzExternalRuntime feature flag // is set, the server will send instructions via data attributes (instead of inline scripts) -function createRenderState(resumableState, nonce, bootstrapScriptContent, bootstrapScripts, bootstrapModules, externalRuntimeConfig, importMap) { +function createRenderState(resumableState, nonce, bootstrapScriptContent, bootstrapScripts, bootstrapModules, externalRuntimeConfig, importMap, onHeaders, maxHeadersLength) { var inlineScriptWithNonce = nonce === undefined ? startInlineScript : stringToPrecomputedChunk(''); // Allows us to keep track of what we've already written so we can refer back to it. +var importMapScriptEnd = stringToPrecomputedChunk(''); // Since we store headers as strings we deal with their length in utf16 code units +// rather than visual characters or the utf8 encoding that is used for most binary +// serialization. Some common HTTP servers only allow for headers to be 4kB in length. +// We choose a default length that is likely to be well under this already limited length however +// pathological cases may still cause the utf-8 encoding of the headers to approach this limit. +// It should also be noted that this maximum is a soft maximum. we have not reached the limit we will +// allow one more header to be captured which means in practice if the limit is approached it will be exceeded + +var DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000; // Allows us to keep track of what we've already written so we can refer back to it. // if passed externalRuntimeConfig and the enableFizzExternalRuntime feature flag // is set, the server will send instructions via data attributes (instead of inline scripts) -function createRenderState(resumableState, nonce, bootstrapScriptContent, bootstrapScripts, bootstrapModules, externalRuntimeConfig, importMap) { +function createRenderState(resumableState, nonce, bootstrapScriptContent, bootstrapScripts, bootstrapModules, externalRuntimeConfig, importMap, onHeaders, maxHeadersLength) { var inlineScriptWithNonce = nonce === undefined ? startInlineScript : stringToPrecomputedChunk(''); // Allows us to keep track of what we've already written so we can refer back to it. +var importMapScriptEnd = stringToPrecomputedChunk(''); // Since we store headers as strings we deal with their length in utf16 code units +// rather than visual characters or the utf8 encoding that is used for most binary +// serialization. Some common HTTP servers only allow for headers to be 4kB in length. +// We choose a default length that is likely to be well under this already limited length however +// pathological cases may still cause the utf-8 encoding of the headers to approach this limit. +// It should also be noted that this maximum is a soft maximum. we have not reached the limit we will +// allow one more header to be captured which means in practice if the limit is approached it will be exceeded + +var DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000; // Allows us to keep track of what we've already written so we can refer back to it. // if passed externalRuntimeConfig and the enableFizzExternalRuntime feature flag // is set, the server will send instructions via data attributes (instead of inline scripts) -function createRenderState$1(resumableState, nonce, bootstrapScriptContent, bootstrapScripts, bootstrapModules, externalRuntimeConfig, importMap) { +function createRenderState$1(resumableState, nonce, bootstrapScriptContent, bootstrapScripts, bootstrapModules, externalRuntimeConfig, importMap, onHeaders, maxHeadersLength) { var inlineScriptWithNonce = nonce === undefined ? startInlineScript : stringToPrecomputedChunk(''); // Allows us to keep track of what we've already written so we can refer back to it. +var importMapScriptEnd = stringToPrecomputedChunk(''); // Since we store headers as strings we deal with their length in utf16 code units +// rather than visual characters or the utf8 encoding that is used for most binary +// serialization. Some common HTTP servers only allow for headers to be 4kB in length. +// We choose a default length that is likely to be well under this already limited length however +// pathological cases may still cause the utf-8 encoding of the headers to approach this limit. +// It should also be noted that this maximum is a soft maximum. we have not reached the limit we will +// allow one more header to be captured which means in practice if the limit is approached it will be exceeded + +var DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000; // Allows us to keep track of what we've already written so we can refer back to it. // if passed externalRuntimeConfig and the enableFizzExternalRuntime feature flag // is set, the server will send instructions via data attributes (instead of inline scripts) -function createRenderState$1(resumableState, nonce, bootstrapScriptContent, bootstrapScripts, bootstrapModules, externalRuntimeConfig, importMap) { +function createRenderState$1(resumableState, nonce, bootstrapScriptContent, bootstrapScripts, bootstrapModules, externalRuntimeConfig, importMap, onHeaders, maxHeadersLength) { var inlineScriptWithNonce = nonce === undefined ? startInlineScript : stringToPrecomputedChunk(''); // Allows us to keep track of what we've already written so we can refer back to it. +var importMapScriptEnd = stringToPrecomputedChunk(''); // Since we store headers as strings we deal with their length in utf16 code units +// rather than visual characters or the utf8 encoding that is used for most binary +// serialization. Some common HTTP servers only allow for headers to be 4kB in length. +// We choose a default length that is likely to be well under this already limited length however +// pathological cases may still cause the utf-8 encoding of the headers to approach this limit. +// It should also be noted that this maximum is a soft maximum. we have not reached the limit we will +// allow one more header to be captured which means in practice if the limit is approached it will be exceeded + +var DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000; // Allows us to keep track of what we've already written so we can refer back to it. // if passed externalRuntimeConfig and the enableFizzExternalRuntime feature flag // is set, the server will send instructions via data attributes (instead of inline scripts) -function createRenderState(resumableState, nonce, bootstrapScriptContent, bootstrapScripts, bootstrapModules, externalRuntimeConfig, importMap) { +function createRenderState(resumableState, nonce, bootstrapScriptContent, bootstrapScripts, bootstrapModules, externalRuntimeConfig, importMap, onHeaders, maxHeadersLength) { var inlineScriptWithNonce = nonce === undefined ? startInlineScript : stringToPrecomputedChunk(''); // Allows us to keep track of what we've already written so we can refer back to it. +var importMapScriptEnd = stringToPrecomputedChunk(''); // Since we store headers as strings we deal with their length in utf16 code units +// rather than visual characters or the utf8 encoding that is used for most binary +// serialization. Some common HTTP servers only allow for headers to be 4kB in length. +// We choose a default length that is likely to be well under this already limited length however +// pathological cases may still cause the utf-8 encoding of the headers to approach this limit. +// It should also be noted that this maximum is a soft maximum. we have not reached the limit we will +// allow one more header to be captured which means in practice if the limit is approached it will be exceeded + +var DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000; // Allows us to keep track of what we've already written so we can refer back to it. // if passed externalRuntimeConfig and the enableFizzExternalRuntime feature flag // is set, the server will send instructions via data attributes (instead of inline scripts) -function createRenderState(resumableState, nonce, bootstrapScriptContent, bootstrapScripts, bootstrapModules, externalRuntimeConfig, importMap) { +function createRenderState(resumableState, nonce, bootstrapScriptContent, bootstrapScripts, bootstrapModules, externalRuntimeConfig, importMap, onHeaders, maxHeadersLength) { var inlineScriptWithNonce = nonce === undefined ? startInlineScript : stringToPrecomputedChunk(''); // Allows us to keep track of what we've already written so we can refer back to it. +var importMapScriptEnd = stringToPrecomputedChunk(''); // Since we store headers as strings we deal with their length in utf16 code units +// rather than visual characters or the utf8 encoding that is used for most binary +// serialization. Some common HTTP servers only allow for headers to be 4kB in length. +// We choose a default length that is likely to be well under this already limited length however +// pathological cases may still cause the utf-8 encoding of the headers to approach this limit. +// It should also be noted that this maximum is a soft maximum. we have not reached the limit we will +// allow one more header to be captured which means in practice if the limit is approached it will be exceeded + +var DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000; // Allows us to keep track of what we've already written so we can refer back to it. // if passed externalRuntimeConfig and the enableFizzExternalRuntime feature flag // is set, the server will send instructions via data attributes (instead of inline scripts) -function createRenderState(resumableState, nonce, bootstrapScriptContent, bootstrapScripts, bootstrapModules, externalRuntimeConfig, importMap) { +function createRenderState(resumableState, nonce, bootstrapScriptContent, bootstrapScripts, bootstrapModules, externalRuntimeConfig, importMap, onHeaders, maxHeadersLength) { var inlineScriptWithNonce = nonce === undefined ? startInlineScript : stringToPrecomputedChunk('