Skip to content

Commit

Permalink
Update React from 6c3b8dbfe to 14898b6a9 (#63439)
Browse files Browse the repository at this point in the history
Update React from 6c3b8dbfe to 14898b6a9.

### React upstream changes

- facebook/react#28580

Closes NEXT-2853
  • Loading branch information
ztanner authored Mar 19, 2024
1 parent 229cb14 commit 15e76ea
Show file tree
Hide file tree
Showing 111 changed files with 417 additions and 651 deletions.
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -194,16 +194,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-6c3b8dbfe-20240226",
"react-builtin": "npm:react@18.3.0-canary-14898b6a9-20240318",
"react-dom": "18.2.0",
"react-dom-17": "npm:react-dom@17.0.2",
"react-dom-builtin": "npm:react-dom@18.3.0-canary-6c3b8dbfe-20240226",
"react-dom-experimental-builtin": "npm:react-dom@0.0.0-experimental-6c3b8dbfe-20240226",
"react-experimental-builtin": "npm:react@0.0.0-experimental-6c3b8dbfe-20240226",
"react-server-dom-turbopack": "18.3.0-canary-6c3b8dbfe-20240226",
"react-server-dom-turbopack-experimental": "npm:react-server-dom-turbopack@0.0.0-experimental-6c3b8dbfe-20240226",
"react-server-dom-webpack": "18.3.0-canary-6c3b8dbfe-20240226",
"react-server-dom-webpack-experimental": "npm:react-server-dom-webpack@0.0.0-experimental-6c3b8dbfe-20240226",
"react-dom-builtin": "npm:react-dom@18.3.0-canary-14898b6a9-20240318",
"react-dom-experimental-builtin": "npm:react-dom@0.0.0-experimental-14898b6a9-20240318",
"react-experimental-builtin": "npm:react@0.0.0-experimental-14898b6a9-20240318",
"react-server-dom-turbopack": "18.3.0-canary-14898b6a9-20240318",
"react-server-dom-turbopack-experimental": "npm:react-server-dom-turbopack@0.0.0-experimental-14898b6a9-20240318",
"react-server-dom-webpack": "18.3.0-canary-14898b6a9-20240318",
"react-server-dom-webpack-experimental": "npm:react-server-dom-webpack@0.0.0-experimental-14898b6a9-20240318",
"react-ssr-prepass": "1.0.8",
"react-virtualized": "9.22.3",
"relay-compiler": "13.0.2",
Expand All @@ -213,8 +213,8 @@
"resolve-from": "5.0.0",
"sass": "1.54.0",
"satori": "0.10.9",
"scheduler-builtin": "npm:scheduler@0.24.0-canary-6c3b8dbfe-20240226",
"scheduler-experimental-builtin": "npm:scheduler@0.0.0-experimental-6c3b8dbfe-20240226",
"scheduler-builtin": "npm:scheduler@0.24.0-canary-14898b6a9-20240318",
"scheduler-experimental-builtin": "npm:scheduler@0.0.0-experimental-14898b6a9-20240318",
"seedrandom": "3.0.5",
"selenium-webdriver": "4.0.0-beta.4",
"semver": "7.3.7",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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-6c3b8dbfe-20240226';
var ReactVersion = '18.3.0-experimental-14898b6a9-20240318';

var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;

Expand Down Expand Up @@ -506,9 +506,6 @@ function stringToChunk(content) {
function stringToPrecomputedChunk(content) {
return content;
}
function clonePrecomputedChunk(chunk) {
return chunk;
}
function closeWithError(destination, error) {
// $FlowFixMe[incompatible-call]: This is an Error object or the destination accepts other types.
destination.destroy(error);
Expand Down Expand Up @@ -5124,7 +5121,7 @@ function writeCompletedBoundaryInstruction(destination, resumableState, renderSt
if (requiresStyleInsertion) {
if ((resumableState.instructions & SentCompleteBoundaryFunction) === NothingSent) {
resumableState.instructions |= SentStyleInsertionFunction | SentCompleteBoundaryFunction;
writeChunk(destination, clonePrecomputedChunk(completeBoundaryWithStylesScript1FullBoth));
writeChunk(destination, completeBoundaryWithStylesScript1FullBoth);
} else if ((resumableState.instructions & SentStyleInsertionFunction) === NothingSent) {
resumableState.instructions |= SentStyleInsertionFunction;
writeChunk(destination, completeBoundaryWithStylesScript1FullPartial);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function formatProdErrorMessage(code) {
return "Minified React error #" + code + "; visit " + url + " for the full message or " + 'use the non-minified dev environment for full errors and additional ' + 'helpful warnings.';
}

var ReactVersion = '18.3.0-experimental-6c3b8dbfe-20240226';
var ReactVersion = '18.3.0-experimental-14898b6a9-20240318';

// ATTENTION
// When adding new symbols to this file,
Expand Down Expand Up @@ -191,9 +191,6 @@ function stringToChunk(content) {
function stringToPrecomputedChunk(content) {
return content;
}
function clonePrecomputedChunk(chunk) {
return chunk;
}
function closeWithError(destination, error) {
// $FlowFixMe[incompatible-call]: This is an Error object or the destination accepts other types.
destination.destroy(error);
Expand Down Expand Up @@ -3240,7 +3237,7 @@ function writeCompletedBoundaryInstruction(destination, resumableState, renderSt
if (requiresStyleInsertion) {
if ((resumableState.instructions & SentCompleteBoundaryFunction) === NothingSent) {
resumableState.instructions |= SentStyleInsertionFunction | SentCompleteBoundaryFunction;
writeChunk(destination, clonePrecomputedChunk(completeBoundaryWithStylesScript1FullBoth));
writeChunk(destination, completeBoundaryWithStylesScript1FullBoth);
} else if ((resumableState.instructions & SentStyleInsertionFunction) === NothingSent) {
resumableState.instructions |= SentStyleInsertionFunction;
writeChunk(destination, completeBoundaryWithStylesScript1FullPartial);
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var React = require("next/dist/compiled/react-experimental");
var ReactDOM = require('react-dom');
var stream = require('stream');

var ReactVersion = '18.3.0-experimental-6c3b8dbfe-20240226';
var ReactVersion = '18.3.0-experimental-14898b6a9-20240318';

var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;

Expand Down Expand Up @@ -507,9 +507,6 @@ function stringToChunk(content) {
function stringToPrecomputedChunk(content) {
return content;
}
function clonePrecomputedChunk(chunk) {
return chunk;
}
function closeWithError(destination, error) {
// $FlowFixMe[incompatible-call]: This is an Error object or the destination accepts other types.
destination.destroy(error);
Expand Down Expand Up @@ -5125,7 +5122,7 @@ function writeCompletedBoundaryInstruction(destination, resumableState, renderSt
if (requiresStyleInsertion) {
if ((resumableState.instructions & SentCompleteBoundaryFunction) === NothingSent) {
resumableState.instructions |= SentStyleInsertionFunction | SentCompleteBoundaryFunction;
writeChunk(destination, clonePrecomputedChunk(completeBoundaryWithStylesScript1FullBoth));
writeChunk(destination, completeBoundaryWithStylesScript1FullBoth);
} else if ((resumableState.instructions & SentStyleInsertionFunction) === NothingSent) {
resumableState.instructions |= SentStyleInsertionFunction;
writeChunk(destination, completeBoundaryWithStylesScript1FullPartial);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ var React = require("next/dist/compiled/react-experimental");
var ReactDOM = require('react-dom');
var stream = require('stream');

var ReactVersion = '18.3.0-experimental-6c3b8dbfe-20240226';
var ReactVersion = '18.3.0-experimental-14898b6a9-20240318';

// ATTENTION
// When adding new symbols to this file,
Expand Down Expand Up @@ -175,9 +175,6 @@ function stringToChunk(content) {
function stringToPrecomputedChunk(content) {
return content;
}
function clonePrecomputedChunk(chunk) {
return chunk;
}
function closeWithError(destination, error) {
// $FlowFixMe[incompatible-call]: This is an Error object or the destination accepts other types.
destination.destroy(error);
Expand Down Expand Up @@ -3224,7 +3221,7 @@ function writeCompletedBoundaryInstruction(destination, resumableState, renderSt
if (requiresStyleInsertion) {
if ((resumableState.instructions & SentCompleteBoundaryFunction) === NothingSent) {
resumableState.instructions |= SentStyleInsertionFunction | SentCompleteBoundaryFunction;
writeChunk(destination, clonePrecomputedChunk(completeBoundaryWithStylesScript1FullBoth));
writeChunk(destination, completeBoundaryWithStylesScript1FullBoth);
} else if ((resumableState.instructions & SentStyleInsertionFunction) === NothingSent) {
resumableState.instructions |= SentStyleInsertionFunction;
writeChunk(destination, completeBoundaryWithStylesScript1FullPartial);
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function printWarning(level, format, args) {
}
}

var ReactVersion = '18.3.0-experimental-6c3b8dbfe-20240226';
var ReactVersion = '18.3.0-experimental-14898b6a9-20240318';

var Internals = {
usingClientEntryPoint: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

var React = require("next/dist/compiled/react-experimental");

var ReactVersion = '18.3.0-experimental-6c3b8dbfe-20240226';
var ReactVersion = '18.3.0-experimental-14898b6a9-20240318';

const Internals = {
usingClientEntryPoint: false,
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -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-6c3b8dbfe-20240226';
var ReactVersion = '18.3.0-experimental-14898b6a9-20240318';

var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;

Expand Down Expand Up @@ -489,7 +489,7 @@ function murmurhash3_32_gc(key, seed) {
function scheduleWork(callback) {
callback();
}
var VIEW_SIZE = 512;
var VIEW_SIZE = 2048;
var currentView = null;
var writtenBytes = 0;
function beginWriting(destination) {
Expand All @@ -502,15 +502,9 @@ function writeChunk(destination, chunk) {
}

if (chunk.byteLength > VIEW_SIZE) {
{
if (precomputedChunkSet.has(chunk)) {
error('A large precomputed chunk was passed to writeChunk without being copied.' + ' Large chunks get enqueued directly and are not copied. This is incompatible with precomputed chunks because you cannot enqueue the same precomputed chunk twice.' + ' Use "cloneChunk" to make a copy of this large precomputed chunk before writing it. This is a bug in React.');
}
} // this chunk may overflow a single view which implies it was not
// this chunk may overflow a single view which implies it was not
// one that is cached by the streaming renderer. We will enqueu
// it directly and expect it is not re-used


if (writtenBytes > 0) {
destination.enqueue(new Uint8Array(currentView.buffer, 0, writtenBytes));
currentView = new Uint8Array(VIEW_SIZE);
Expand Down Expand Up @@ -565,19 +559,17 @@ var textEncoder = new TextEncoder();
function stringToChunk(content) {
return textEncoder.encode(content);
}
var precomputedChunkSet = new Set() ;
function stringToPrecomputedChunk(content) {
var precomputedChunk = textEncoder.encode(content);

{
precomputedChunkSet.add(precomputedChunk);
if (precomputedChunk.byteLength > VIEW_SIZE) {
error('precomputed chunks must be smaller than the view size configured for this host. This is a bug in React.');
}
}

return precomputedChunk;
}
function clonePrecomputedChunk(precomputedChunk) {
return precomputedChunk.byteLength > VIEW_SIZE ? precomputedChunk.slice() : precomputedChunk;
}
function closeWithError(destination, error) {
// $FlowFixMe[method-unbinding]
if (typeof destination.error === 'function') {
Expand Down Expand Up @@ -5232,7 +5224,7 @@ function writeCompletedBoundaryInstruction(destination, resumableState, renderSt
if (requiresStyleInsertion) {
if ((resumableState.instructions & SentCompleteBoundaryFunction) === NothingSent) {
resumableState.instructions |= SentStyleInsertionFunction | SentCompleteBoundaryFunction;
writeChunk(destination, clonePrecomputedChunk(completeBoundaryWithStylesScript1FullBoth));
writeChunk(destination, completeBoundaryWithStylesScript1FullBoth);
} else if ((resumableState.instructions & SentStyleInsertionFunction) === NothingSent) {
resumableState.instructions |= SentStyleInsertionFunction;
writeChunk(destination, completeBoundaryWithStylesScript1FullPartial);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
var React = require("next/dist/compiled/react-experimental");
var ReactDOM = require('react-dom');

var ReactVersion = '18.3.0-experimental-6c3b8dbfe-20240226';
var ReactVersion = '18.3.0-experimental-14898b6a9-20240318';

// Do not require this module directly! Use normal `invariant` calls with
// template literal strings. The messages will be replaced with error codes
Expand Down Expand Up @@ -174,7 +174,7 @@ function murmurhash3_32_gc(key, seed) {
function scheduleWork(callback) {
callback();
}
const VIEW_SIZE = 512;
const VIEW_SIZE = 2048;
let currentView = null;
let writtenBytes = 0;
function beginWriting(destination) {
Expand All @@ -187,10 +187,9 @@ function writeChunk(destination, chunk) {
}

if (chunk.byteLength > VIEW_SIZE) {
// this chunk may overflow a single view which implies it was not
// one that is cached by the streaming renderer. We will enqueu
// it directly and expect it is not re-used


if (writtenBytes > 0) {
destination.enqueue(new Uint8Array(currentView.buffer, 0, writtenBytes));
currentView = new Uint8Array(VIEW_SIZE);
Expand Down Expand Up @@ -250,9 +249,6 @@ function stringToPrecomputedChunk(content) {

return precomputedChunk;
}
function clonePrecomputedChunk(precomputedChunk) {
return precomputedChunk.byteLength > VIEW_SIZE ? precomputedChunk.slice() : precomputedChunk;
}
function closeWithError(destination, error) {
// $FlowFixMe[method-unbinding]
if (typeof destination.error === 'function') {
Expand Down Expand Up @@ -3340,7 +3336,7 @@ function writeCompletedBoundaryInstruction(destination, resumableState, renderSt
if (requiresStyleInsertion) {
if ((resumableState.instructions & SentCompleteBoundaryFunction) === NothingSent) {
resumableState.instructions |= SentStyleInsertionFunction | SentCompleteBoundaryFunction;
writeChunk(destination, clonePrecomputedChunk(completeBoundaryWithStylesScript1FullBoth));
writeChunk(destination, completeBoundaryWithStylesScript1FullBoth);
} else if ((resumableState.instructions & SentStyleInsertionFunction) === NothingSent) {
resumableState.instructions |= SentStyleInsertionFunction;
writeChunk(destination, completeBoundaryWithStylesScript1FullPartial);
Expand Down
Loading

0 comments on commit 15e76ea

Please sign in to comment.