Skip to content

File tree

52 files changed

+9354
-4540
lines changed

Some content is hidden

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

52 files changed

+9354
-4540
lines changed

package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -193,16 +193,16 @@
193193
"random-seed": "0.3.0",
194194
"react": "18.2.0",
195195
"react-17": "npm:[email protected]",
196-
"react-builtin": "npm:[email protected]08a39539f-20231031",
196+
"react-builtin": "npm:[email protected]2983249dd-20231107",
197197
"react-dom": "18.2.0",
198198
"react-dom-17": "npm:[email protected]",
199-
"react-dom-builtin": "npm:[email protected]08a39539f-20231031",
200-
"react-dom-experimental-builtin": "npm:[email protected]08a39539f-20231031",
201-
"react-experimental-builtin": "npm:[email protected]08a39539f-20231031",
202-
"react-server-dom-turbopack": "18.3.0-canary-08a39539f-20231031",
203-
"react-server-dom-turbopack-experimental": "npm:[email protected]08a39539f-20231031",
204-
"react-server-dom-webpack": "18.3.0-canary-08a39539f-20231031",
205-
"react-server-dom-webpack-experimental": "npm:[email protected]08a39539f-20231031",
199+
"react-dom-builtin": "npm:[email protected]2983249dd-20231107",
200+
"react-dom-experimental-builtin": "npm:[email protected]2983249dd-20231107",
201+
"react-experimental-builtin": "npm:[email protected]2983249dd-20231107",
202+
"react-server-dom-turbopack": "18.3.0-canary-2983249dd-20231107",
203+
"react-server-dom-turbopack-experimental": "npm:[email protected]2983249dd-20231107",
204+
"react-server-dom-webpack": "18.3.0-canary-2983249dd-20231107",
205+
"react-server-dom-webpack-experimental": "npm:[email protected]2983249dd-20231107",
206206
"react-ssr-prepass": "1.0.8",
207207
"react-virtualized": "9.22.3",
208208
"relay-compiler": "13.0.2",
@@ -212,8 +212,8 @@
212212
"resolve-from": "5.0.0",
213213
"sass": "1.54.0",
214214
"satori": "0.10.6",
215-
"scheduler-builtin": "npm:[email protected]08a39539f-20231031",
216-
"scheduler-experimental-builtin": "npm:[email protected]08a39539f-20231031",
215+
"scheduler-builtin": "npm:[email protected]2983249dd-20231107",
216+
"scheduler-experimental-builtin": "npm:[email protected]2983249dd-20231107",
217217
"seedrandom": "3.0.5",
218218
"selenium-webdriver": "4.0.0-beta.4",
219219
"semver": "7.3.7",

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

Lines changed: 558 additions & 96 deletions
Large diffs are not rendered by default.

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

Lines changed: 156 additions & 147 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 558 additions & 96 deletions
Large diffs are not rendered by default.

packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.node.production.min.js

Lines changed: 171 additions & 162 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-rendering-stub.development.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ function printWarning(level, format, args) {
5555
}
5656
}
5757

58-
var ReactVersion = '18.3.0-experimental-08a39539f-20231031';
58+
var ReactVersion = '18.3.0-experimental-2983249dd-20231107';
5959

6060
var Internals = {
6161
usingClientEntryPoint: false,

packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-rendering-stub.production.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 583 additions & 108 deletions
Large diffs are not rendered by default.

packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.browser.production.min.js

Lines changed: 174 additions & 164 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 587 additions & 108 deletions
Large diffs are not rendered by default.

packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.edge.production.min.js

Lines changed: 185 additions & 175 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 581 additions & 107 deletions
Large diffs are not rendered by default.

packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.node.production.min.js

Lines changed: 185 additions & 174 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/next/src/compiled/react-dom-experimental/cjs/react-dom-unstable_testing.development.js

Lines changed: 47 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -12201,28 +12201,43 @@ function runFormStateAction(actionQueue, setState, payload) {
1220112201
}
1220212202

1220312203
try {
12204-
var promise = action(prevState, payload);
12205-
12206-
if (true) {
12207-
if (promise === null || typeof promise !== 'object' || typeof promise.then !== 'function') {
12208-
error('The action passed to useFormState must be an async function.');
12209-
}
12210-
} // Attach a listener to read the return state of the action. As soon as this
12211-
// resolves, we can run the next action in the sequence.
12212-
12204+
var returnValue = action(prevState, payload);
12205+
12206+
if (returnValue !== null && typeof returnValue === 'object' && // $FlowFixMe[method-unbinding]
12207+
typeof returnValue.then === 'function') {
12208+
var thenable = returnValue; // Attach a listener to read the return state of the action. As soon as
12209+
// this resolves, we can run the next action in the sequence.
12210+
12211+
thenable.then(function (nextState) {
12212+
actionQueue.state = nextState;
12213+
finishRunningFormStateAction(actionQueue, setState);
12214+
}, function () {
12215+
return finishRunningFormStateAction(actionQueue, setState);
12216+
});
12217+
var entangledResult = requestAsyncActionContext(thenable, null);
12218+
setState(entangledResult);
12219+
} else {
12220+
// This is either `returnValue` or a thenable that resolves to
12221+
// `returnValue`, depending on whether we're inside an async action scope.
12222+
var _entangledResult = requestSyncActionContext(returnValue, null);
1221312223

12214-
promise.then(function (nextState) {
12224+
setState(_entangledResult);
12225+
var nextState = returnValue;
1221512226
actionQueue.state = nextState;
1221612227
finishRunningFormStateAction(actionQueue, setState);
12217-
}, function () {
12218-
return finishRunningFormStateAction(actionQueue, setState);
12219-
}); // Create a thenable that resolves once the current async action scope has
12220-
// finished. Then stash that thenable in state. We'll unwrap it with the
12221-
// `use` algorithm during render. This is the same logic used
12222-
// by startTransition.
12223-
12224-
var entangledThenable = requestAsyncActionContext(promise, null);
12225-
setState(entangledThenable);
12228+
}
12229+
} catch (error) {
12230+
// This is a trick to get the `useFormState` hook to rethrow the error.
12231+
// When it unwraps the thenable with the `use` algorithm, the error
12232+
// will be thrown.
12233+
var rejectedThenable = {
12234+
then: function () {},
12235+
status: 'rejected',
12236+
reason: error // $FlowFixMe: Not sure why this doesn't work
12237+
12238+
};
12239+
setState(rejectedThenable);
12240+
finishRunningFormStateAction(actionQueue, setState);
1222612241
} finally {
1222712242
ReactCurrentBatchConfig$3.transition = prevTransition;
1222812243

@@ -12281,23 +12296,20 @@ function mountFormState(action, initialStateProp, permalink) {
1228112296
initialState = ssrFormState[0];
1228212297
}
1228312298
}
12284-
}
12285-
12286-
var initialStateThenable = {
12287-
status: 'fulfilled',
12288-
value: initialState,
12289-
then: function () {}
12290-
}; // State hook. The state is stored in a thenable which is then unwrapped by
12299+
} // State hook. The state is stored in a thenable which is then unwrapped by
1229112300
// the `use` algorithm during render.
1229212301

12302+
1229312303
var stateHook = mountWorkInProgressHook();
12294-
stateHook.memoizedState = stateHook.baseState = initialStateThenable;
12304+
stateHook.memoizedState = stateHook.baseState = initialState; // TODO: Typing this "correctly" results in recursion limit errors
12305+
// const stateQueue: UpdateQueue<S | Awaited<S>, S | Awaited<S>> = {
12306+
1229512307
var stateQueue = {
1229612308
pending: null,
1229712309
lanes: NoLanes,
1229812310
dispatch: null,
1229912311
lastRenderedReducer: formStateReducer,
12300-
lastRenderedState: initialStateThenable
12312+
lastRenderedState: initialState
1230112313
};
1230212314
stateHook.queue = stateQueue;
1230312315
var setState = dispatchSetState.bind(null, currentlyRenderingFiber$1, stateQueue);
@@ -12332,10 +12344,11 @@ function updateFormState(action, initialState, permalink) {
1233212344

1233312345
function updateFormStateImpl(stateHook, currentStateHook, action, initialState, permalink) {
1233412346
var _updateReducerImpl = updateReducerImpl(stateHook, currentStateHook, formStateReducer),
12335-
thenable = _updateReducerImpl[0]; // This will suspend until the action finishes.
12347+
actionResult = _updateReducerImpl[0]; // This will suspend until the action finishes.
1233612348

1233712349

12338-
var state = useThenable(thenable);
12350+
var state = typeof actionResult === 'object' && actionResult !== null && // $FlowFixMe[method-unbinding]
12351+
typeof actionResult.then === 'function' ? useThenable(actionResult) : actionResult;
1233912352
var actionQueueHook = updateWorkInProgressHook();
1234012353
var actionQueue = actionQueueHook.queue;
1234112354
var dispatch = actionQueue.dispatch; // Check if a new action was passed. If so, update it in an effect.
@@ -12371,8 +12384,7 @@ function rerenderFormState(action, initialState, permalink) {
1237112384
} // This is a mount. No updates to process.
1237212385

1237312386

12374-
var thenable = stateHook.memoizedState;
12375-
var state = useThenable(thenable);
12387+
var state = stateHook.memoizedState;
1237612388
var actionQueueHook = updateWorkInProgressHook();
1237712389
var actionQueue = actionQueueHook.queue;
1237812390
var dispatch = actionQueue.dispatch; // This may have changed during the rerender.
@@ -12804,9 +12816,9 @@ function startTransition(fiber, queue, pendingState, finishedState, callback, op
1280412816
// This is either `finishedState` or a thenable that resolves to
1280512817
// `finishedState`, depending on whether we're inside an async
1280612818
// action scope.
12807-
var _entangledResult = requestSyncActionContext(returnValue, finishedState);
12819+
var _entangledResult2 = requestSyncActionContext(returnValue, finishedState);
1280812820

12809-
dispatchSetState(fiber, queue, _entangledResult);
12821+
dispatchSetState(fiber, queue, _entangledResult2);
1281012822
}
1281112823
}
1281212824
} catch (error) {
@@ -28828,7 +28840,7 @@ identifierPrefix, onRecoverableError, transitionCallbacks, formState) {
2882828840
return root;
2882928841
}
2883028842

28831-
var ReactVersion = '18.3.0-experimental-08a39539f-20231031';
28843+
var ReactVersion = '18.3.0-experimental-2983249dd-20231107';
2883228844

2883328845
function createPortal$1(children, containerInfo, // TODO: figure out the API for cross-renderer implementation.
2883428846
implementation) {

0 commit comments

Comments
 (0)