Skip to content

Commit

Permalink
Upgrade React to 18.3.0-canary-aef7ce554-20230503
Browse files Browse the repository at this point in the history
Includes the following upstream changes:

- [aef7ce554](https://github.com/facebook/react/commits/aef7ce554) [Flight] Progressively Enhanced Server Actions ([vercel#26774](facebook/react#26774)) (Sebastian Markbåge)
- [c10010a6a](https://github.com/facebook/react/commits/c10010a6a) [Fizz] Gracefully handle suspending in DOM configs ([vercel#26768](facebook/react#26768)) (Sebastian Markbåge)
- [f533cee8c](https://github.com/facebook/react/commits/f533cee8c) Add useFormStatus to Flight fixture ([#26773](facebook/react#26773)) (Andrew Clark)
- [2c1117a8d](https://github.com/facebook/react/commits/2c1117a8d) Reuse request so that a ReabableStream body does not become disturbed ([vercel#26771](facebook/react#26771)) (Andrew Gadzik)
- [fa7a447b9](https://github.com/facebook/react/commits/fa7a447b9) [Fizz] Check for nullish values on ReactCustomFormAction ([vercel#26770](facebook/react#26770)) (Sebastian Markbåge)
  • Loading branch information
acdlite authored and sebmarkbage committed May 4, 2023
1 parent 0aac86e commit a340b44
Show file tree
Hide file tree
Showing 84 changed files with 9,853 additions and 4,532 deletions.
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

0 comments on commit a340b44

Please sign in to comment.