Skip to content

Commit

Permalink
Update React from d900fadbf to db69f95e4
Browse files Browse the repository at this point in the history
  • Loading branch information
acdlite committed Oct 4, 2023
1 parent a46c5af commit d082ee5
Show file tree
Hide file tree
Showing 80 changed files with 3,221 additions and 2,593 deletions.
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -192,16 +192,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-d900fadbf-20230929",
"react-builtin": "npm:react@18.3.0-canary-db69f95e4-20231002",
"react-dom": "18.2.0",
"react-dom-17": "npm:react-dom@17.0.2",
"react-dom-builtin": "npm:react-dom@18.3.0-canary-d900fadbf-20230929",
"react-dom-experimental-builtin": "npm:react-dom@0.0.0-experimental-d900fadbf-20230929",
"react-experimental-builtin": "npm:react@0.0.0-experimental-d900fadbf-20230929",
"react-server-dom-turbopack": "18.3.0-canary-d900fadbf-20230929",
"react-server-dom-turbopack-experimental": "npm:react-server-dom-webpack@0.0.0-experimental-d900fadbf-20230929",
"react-server-dom-webpack": "18.3.0-canary-d900fadbf-20230929",
"react-server-dom-webpack-experimental": "npm:react-server-dom-webpack@0.0.0-experimental-d900fadbf-20230929",
"react-dom-builtin": "npm:react-dom@18.3.0-canary-db69f95e4-20231002",
"react-dom-experimental-builtin": "npm:react-dom@0.0.0-experimental-db69f95e4-20231002",
"react-experimental-builtin": "npm:react@0.0.0-experimental-db69f95e4-20231002",
"react-server-dom-turbopack": "18.3.0-canary-db69f95e4-20231002",
"react-server-dom-turbopack-experimental": "npm:react-server-dom-webpack@0.0.0-experimental-db69f95e4-20231002",
"react-server-dom-webpack": "18.3.0-canary-db69f95e4-20231002",
"react-server-dom-webpack-experimental": "npm:react-server-dom-webpack@0.0.0-experimental-db69f95e4-20231002",
"react-ssr-prepass": "1.0.8",
"react-virtualized": "9.22.3",
"relay-compiler": "13.0.2",
Expand All @@ -211,8 +211,8 @@
"resolve-from": "5.0.0",
"sass": "1.54.0",
"satori": "0.10.6",
"scheduler-builtin": "npm:scheduler@0.24.0-canary-d900fadbf-20230929",
"scheduler-experimental-builtin": "npm:scheduler@0.0.0-experimental-d900fadbf-20230929",
"scheduler-builtin": "npm:scheduler@0.24.0-canary-db69f95e4-20231002",
"scheduler-experimental-builtin": "npm:scheduler@0.0.0-experimental-db69f95e4-20231002",
"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-d900fadbf-20230929';
var ReactVersion = '18.3.0-experimental-db69f95e4-20231002';

var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;

Expand Down Expand Up @@ -8983,11 +8983,7 @@ function replaySuspenseBoundary(request, task, keyPath, props, id, childNodes, c

try {
// We use the safe form because we don't handle suspending here. Only error handling.
if (typeof childSlots === 'number') {
resumeNode(request, task, childSlots, content, -1);
} else {
renderNode(request, task, content, -1);
}
renderNode(request, task, content, -1);

if (task.replay.pendingTasks === 1 && task.replay.nodes.length > 0) {
throw new Error("Couldn't find all resumable slots by key/index during replaying. " + "The tree doesn't match so React will fallback to client rendering.");
Expand Down Expand Up @@ -9038,24 +9034,15 @@ function replaySuspenseBoundary(request, task, keyPath, props, id, childNodes, c
task.keyPath = prevKeyPath;
}

var fallbackKeyPath = [keyPath[0], 'Suspense Fallback', keyPath[2]];
var suspendedFallbackTask; // We create suspended task for the fallback because we don't want to actually work
var fallbackKeyPath = [keyPath[0], 'Suspense Fallback', keyPath[2]]; // We create suspended task for the fallback because we don't want to actually work
// on it yet in case we finish the main content, so we queue for later.

if (typeof fallbackSlots === 'number') {
// Resuming directly in the fallback.
var resumedSegment = createPendingSegment(request, 0, null, task.formatContext, false, false);
resumedSegment.id = fallbackSlots;
resumedSegment.parentFlushed = true;
suspendedFallbackTask = createRenderTask(request, null, fallback, -1, parentBoundary, resumedSegment, fallbackAbortSet, fallbackKeyPath, task.formatContext, task.legacyContext, task.context, task.treeContext);
} else {
var fallbackReplay = {
nodes: fallbackNodes,
slots: fallbackSlots,
pendingTasks: 0
};
suspendedFallbackTask = createReplayTask(request, null, fallbackReplay, fallback, -1, parentBoundary, fallbackAbortSet, fallbackKeyPath, task.formatContext, task.legacyContext, task.context, task.treeContext);
}
var fallbackReplay = {
nodes: fallbackNodes,
slots: fallbackSlots,
pendingTasks: 0
};
var suspendedFallbackTask = createReplayTask(request, null, fallbackReplay, fallback, -1, parentBoundary, fallbackAbortSet, fallbackKeyPath, task.formatContext, task.legacyContext, task.context, task.treeContext);

{
suspendedFallbackTask.componentStack = task.componentStack;
Expand Down Expand Up @@ -9605,37 +9592,6 @@ function resumeNode(request, task, segmentId, node, childIndex) {
}
}

function resumeElement(request, task, keyPath, segmentId, prevThenableState, type, props, ref) {
var prevReplay = task.replay;
var blockedBoundary = task.blockedBoundary;
var resumedSegment = createPendingSegment(request, 0, null, task.formatContext, false, false);
resumedSegment.id = segmentId;
resumedSegment.parentFlushed = true;

try {
// Convert the current ReplayTask to a RenderTask.
var renderTask = task;
renderTask.replay = null;
renderTask.blockedSegment = resumedSegment;
renderElement(request, task, keyPath, prevThenableState, type, props, ref);
resumedSegment.status = COMPLETED;

if (blockedBoundary === null) {
request.completedRootSegment = resumedSegment;
} else {
queueCompletedSegment(blockedBoundary, resumedSegment);

if (blockedBoundary.parentFlushed) {
request.partialBoundaries.push(blockedBoundary);
}
}
} finally {
// Restore to a ReplayTask.
task.replay = prevReplay;
task.blockedSegment = null;
}
}

function replayElement(request, task, keyPath, prevThenableState, name, keyOrIndex, childIndex, type, props, ref, replay) {
// We're replaying. Find the path to follow.
var replayNodes = replay.nodes;
Expand Down Expand Up @@ -9664,12 +9620,7 @@ function replayElement(request, task, keyPath, prevThenableState, name, keyOrInd
};

try {
if (typeof childSlots === 'number') {
// Matched a resumable element.
resumeElement(request, task, keyPath, childSlots, prevThenableState, type, props, ref);
} else {
renderElement(request, task, keyPath, prevThenableState, type, props, ref);
}
renderElement(request, task, keyPath, prevThenableState, type, props, ref);

if (task.replay.pendingTasks === 1 && task.replay.nodes.length > 0 // TODO check remaining slots
) {
Expand Down Expand Up @@ -9758,8 +9709,15 @@ prevThenableState, node, childIndex) {


function renderNodeDestructiveImpl(request, task, prevThenableState, node, childIndex) {
// Stash the node we're working on. We'll pick up from this task in case
if (task.replay !== null && typeof task.replay.slots === 'number') {
// TODO: Figure out a cheaper place than this hot path to do this check.
var resumeSegmentID = task.replay.slots;
resumeNode(request, task, resumeSegmentID, node, childIndex);
return;
} // Stash the node we're working on. We'll pick up from this task in case
// something suspends.


task.node = node;
task.childIndex = childIndex; // Handle object types

Expand Down
Loading

0 comments on commit d082ee5

Please sign in to comment.