Skip to content

Commit a340b44

Browse files
acdlitesebmarkbage
authored andcommitted
Upgrade React to 18.3.0-canary-aef7ce554-20230503
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)
1 parent 0aac86e commit a340b44

File tree

84 files changed

+9853
-4532
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+9853
-4532
lines changed

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -197,14 +197,14 @@
197197
"random-seed": "0.3.0",
198198
"react": "18.2.0",
199199
"react-17": "npm:[email protected]",
200-
"react-builtin": "npm:[email protected]b7972822b-20230503",
201-
"react-experimental-builtin": "npm:[email protected]b7972822b-20230503",
200+
"react-builtin": "npm:[email protected]aef7ce554-20230503",
201+
"react-experimental-builtin": "npm:[email protected]aef7ce554-20230503",
202202
"react-dom": "18.2.0",
203203
"react-dom-17": "npm:[email protected]",
204-
"react-dom-builtin": "npm:[email protected]b7972822b-20230503",
205-
"react-dom-experimental-builtin": "npm:[email protected]b7972822b-20230503",
206-
"react-server-dom-webpack": "18.3.0-canary-b7972822b-20230503",
207-
"react-server-dom-webpack-experimental": "npm:[email protected]b7972822b-20230503",
204+
"react-dom-builtin": "npm:[email protected]aef7ce554-20230503",
205+
"react-dom-experimental-builtin": "npm:[email protected]aef7ce554-20230503",
206+
"react-server-dom-webpack": "18.3.0-canary-aef7ce554-20230503",
207+
"react-server-dom-webpack-experimental": "npm:[email protected]aef7ce554-20230503",
208208
"react-ssr-prepass": "1.0.8",
209209
"react-virtualized": "9.22.3",
210210
"relay-compiler": "13.0.2",
@@ -215,8 +215,8 @@
215215
"rimraf": "3.0.2",
216216
"sass": "1.54.0",
217217
"satori": "0.4.4",
218-
"scheduler-builtin": "npm:[email protected]b7972822b-20230503",
219-
"scheduler-experimental-builtin": "npm:[email protected]b7972822b-20230503",
218+
"scheduler-builtin": "npm:[email protected]aef7ce554-20230503",
219+
"scheduler-experimental-builtin": "npm:[email protected]aef7ce554-20230503",
220220
"seedrandom": "3.0.5",
221221
"selenium-webdriver": "4.0.0-beta.4",
222222
"semver": "7.3.7",

packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.development.js

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ if (process.env.NODE_ENV !== "production") {
1717
var React = require("next/dist/compiled/react-experimental");
1818
var ReactDOM = require('react-dom');
1919

20-
var ReactVersion = '18.3.0-experimental-b7972822b-20230503';
20+
var ReactVersion = '18.3.0-experimental-aef7ce554-20230503';
2121

2222
var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
2323

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

@@ -2333,23 +2333,23 @@ function pushFormActionAttribute(target, responseState, formAction, formEncType,
23332333
}
23342334
}
23352335

2336-
if (name !== null) {
2336+
if (name != null) {
23372337
pushAttribute(target, 'name', name);
23382338
}
23392339

2340-
if (formAction !== null) {
2340+
if (formAction != null) {
23412341
pushAttribute(target, 'formAction', formAction);
23422342
}
23432343

2344-
if (formEncType !== null) {
2344+
if (formEncType != null) {
23452345
pushAttribute(target, 'formEncType', formEncType);
23462346
}
23472347

2348-
if (formMethod !== null) {
2348+
if (formMethod != null) {
23492349
pushAttribute(target, 'formMethod', formMethod);
23502350
}
23512351

2352-
if (formTarget !== null) {
2352+
if (formTarget != null) {
23532353
pushAttribute(target, 'formTarget', formTarget);
23542354
}
23552355

@@ -2963,19 +2963,19 @@ function pushStartForm(target, props, responseState) {
29632963
}
29642964
}
29652965

2966-
if (formAction !== null) {
2966+
if (formAction != null) {
29672967
pushAttribute(target, 'action', formAction);
29682968
}
29692969

2970-
if (formEncType !== null) {
2970+
if (formEncType != null) {
29712971
pushAttribute(target, 'encType', formEncType);
29722972
}
29732973

2974-
if (formMethod !== null) {
2974+
if (formMethod != null) {
29752975
pushAttribute(target, 'method', formMethod);
29762976
}
29772977

2978-
if (formTarget !== null) {
2978+
if (formTarget != null) {
29792979
pushAttribute(target, 'target', formTarget);
29802980
}
29812981

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

95569556

95579557
function renderNode(request, task, node) {
9558-
// TODO: Store segment.children.length here and reset it in case something
9558+
// Store how much we've pushed at this point so we can reset it in case something
95599559
// suspended partially through writing something.
9560-
// Snapshot the current context in case something throws to interrupt the
9560+
var segment = task.blockedSegment;
9561+
var childrenLength = segment.children.length;
9562+
var chunkLength = segment.chunks.length; // Snapshot the current context in case something throws to interrupt the
95619563
// process.
9564+
95629565
var previousFormatContext = task.blockedSegment.formatContext;
95639566
var previousLegacyContext = task.legacyContext;
95649567
var previousContext = task.context;
@@ -9571,7 +9574,10 @@ function renderNode(request, task, node) {
95719574
try {
95729575
return renderNodeDestructive(request, task, null, node);
95739576
} catch (thrownValue) {
9574-
resetHooksState();
9577+
resetHooksState(); // Reset the write pointers to where we started.
9578+
9579+
segment.children.length = childrenLength;
9580+
segment.chunks.length = chunkLength;
95759581
var x = thrownValue === SuspenseException ? // This is a special type of exception used for Suspense. For historical
95769582
// reasons, the rest of the Suspense implementation expects the thrown
95779583
// value to be a thenable, because before `use` existed that was the
@@ -9843,6 +9849,9 @@ function retryTask(request, task) {
98439849
currentTaskInDEV = task;
98449850
}
98459851

9852+
var childrenLength = segment.children.length;
9853+
var chunkLength = segment.chunks.length;
9854+
98469855
try {
98479856
// We call the destructive form that mutates this task. That way if something
98489857
// suspends again, we can reuse the same task instead of spawning a new one.
@@ -9857,7 +9866,10 @@ function retryTask(request, task) {
98579866
segment.status = COMPLETED;
98589867
finishedTask(request, task.blockedBoundary, segment);
98599868
} catch (thrownValue) {
9860-
resetHooksState();
9869+
resetHooksState(); // Reset the write pointers to where we started.
9870+
9871+
segment.children.length = childrenLength;
9872+
segment.chunks.length = chunkLength;
98619873
var x = thrownValue === SuspenseException ? // This is a special type of exception used for Suspense. For historical
98629874
// reasons, the rest of the Suspense implementation expects the thrown
98639875
// value to be a thenable, because before `use` existed that was the

0 commit comments

Comments
 (0)