Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade React to 18.3.0-canary-aef7ce554-20230503 #49181

Merged
merged 2 commits into from
May 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -197,14 +197,14 @@
"random-seed": "0.3.0",
"react": "18.2.0",
"react-17": "npm:[email protected]",
"react-builtin": "npm:[email protected]b7972822b-20230503",
"react-experimental-builtin": "npm:[email protected]b7972822b-20230503",
"react-builtin": "npm:[email protected]aef7ce554-20230503",
"react-experimental-builtin": "npm:[email protected]aef7ce554-20230503",
"react-dom": "18.2.0",
"react-dom-17": "npm:[email protected]",
"react-dom-builtin": "npm:[email protected]b7972822b-20230503",
"react-dom-experimental-builtin": "npm:[email protected]b7972822b-20230503",
"react-server-dom-webpack": "18.3.0-canary-b7972822b-20230503",
"react-server-dom-webpack-experimental": "npm:[email protected]b7972822b-20230503",
"react-dom-builtin": "npm:[email protected]aef7ce554-20230503",
"react-dom-experimental-builtin": "npm:[email protected]aef7ce554-20230503",
"react-server-dom-webpack": "18.3.0-canary-aef7ce554-20230503",
"react-server-dom-webpack-experimental": "npm:[email protected]aef7ce554-20230503",
"react-ssr-prepass": "1.0.8",
"react-virtualized": "9.22.3",
"relay-compiler": "13.0.2",
Expand All @@ -215,8 +215,8 @@
"rimraf": "3.0.2",
"sass": "1.54.0",
"satori": "0.4.4",
"scheduler-builtin": "npm:[email protected]b7972822b-20230503",
"scheduler-experimental-builtin": "npm:[email protected]b7972822b-20230503",
"scheduler-builtin": "npm:[email protected]aef7ce554-20230503",
"scheduler-experimental-builtin": "npm:[email protected]aef7ce554-20230503",
"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-b7972822b-20230503';
var ReactVersion = '18.3.0-experimental-aef7ce554-20230503';

var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;

Expand Down Expand Up @@ -2250,7 +2250,7 @@ function makeFormFieldPrefix(responseState) {
// I'm just reusing this counter. It's not really the same namespace as "name".
// It could just be its own counter.
var id = responseState.nextSuspenseID++;
return responseState.idPrefix + '$ACTION:' + id + ':';
return responseState.idPrefix + id;
} // Since this will likely be repeated a lot in the HTML, we use a more concise message
// than on the client and hopefully it's googleable.

Expand Down Expand Up @@ -2333,23 +2333,23 @@ function pushFormActionAttribute(target, responseState, formAction, formEncType,
}
}

if (name !== null) {
if (name != null) {
pushAttribute(target, 'name', name);
}

if (formAction !== null) {
if (formAction != null) {
pushAttribute(target, 'formAction', formAction);
}

if (formEncType !== null) {
if (formEncType != null) {
pushAttribute(target, 'formEncType', formEncType);
}

if (formMethod !== null) {
if (formMethod != null) {
pushAttribute(target, 'formMethod', formMethod);
}

if (formTarget !== null) {
if (formTarget != null) {
pushAttribute(target, 'formTarget', formTarget);
}

Expand Down Expand Up @@ -2963,19 +2963,19 @@ function pushStartForm(target, props, responseState) {
}
}

if (formAction !== null) {
if (formAction != null) {
pushAttribute(target, 'action', formAction);
}

if (formEncType !== null) {
if (formEncType != null) {
pushAttribute(target, 'encType', formEncType);
}

if (formMethod !== null) {
if (formMethod != null) {
pushAttribute(target, 'method', formMethod);
}

if (formTarget !== null) {
if (formTarget != null) {
pushAttribute(target, 'target', formTarget);
}

Expand Down Expand Up @@ -9555,10 +9555,13 @@ function spawnNewSuspendedTask(request, task, thenableState, x) {


function renderNode(request, task, node) {
// TODO: Store segment.children.length here and reset it in case something
// Store how much we've pushed at this point so we can reset it in case something
// suspended partially through writing something.
// Snapshot the current context in case something throws to interrupt the
var segment = task.blockedSegment;
var childrenLength = segment.children.length;
var chunkLength = segment.chunks.length; // Snapshot the current context in case something throws to interrupt the
// process.

var previousFormatContext = task.blockedSegment.formatContext;
var previousLegacyContext = task.legacyContext;
var previousContext = task.context;
Expand All @@ -9571,7 +9574,10 @@ function renderNode(request, task, node) {
try {
return renderNodeDestructive(request, task, null, node);
} catch (thrownValue) {
resetHooksState();
resetHooksState(); // Reset the write pointers to where we started.

segment.children.length = childrenLength;
segment.chunks.length = chunkLength;
var x = thrownValue === SuspenseException ? // This is a special type of exception used for Suspense. For historical
// reasons, the rest of the Suspense implementation expects the thrown
// value to be a thenable, because before `use` existed that was the
Expand Down Expand Up @@ -9843,6 +9849,9 @@ function retryTask(request, task) {
currentTaskInDEV = task;
}

var childrenLength = segment.children.length;
var chunkLength = segment.chunks.length;

try {
// We call the destructive form that mutates this task. That way if something
// suspends again, we can reuse the same task instead of spawning a new one.
Expand All @@ -9857,7 +9866,10 @@ function retryTask(request, task) {
segment.status = COMPLETED;
finishedTask(request, task.blockedBoundary, segment);
} catch (thrownValue) {
resetHooksState();
resetHooksState(); // Reset the write pointers to where we started.

segment.children.length = childrenLength;
segment.chunks.length = chunkLength;
var x = thrownValue === SuspenseException ? // This is a special type of exception used for Suspense. For historical
// reasons, the rest of the Suspense implementation expects the thrown
// value to be a thenable, because before `use` existed that was the
Expand Down
Loading