Skip to content

Commit fc58bbc

Browse files
committed
Update React from 14898b6a9 to c3048aab4.
### React upstream changes - facebook/react#28643 - facebook/react#28628 - facebook/react#28361 - facebook/react#28513 - facebook/react#28299 - facebook/react#28617 - facebook/react#28618 - facebook/react#28621 - facebook/react#28614 - facebook/react#28596 - facebook/react#28625 - facebook/react#28616 - facebook/react#28491 - facebook/react#28583 - facebook/react#28427 - facebook/react#28613 - facebook/react#28599 - facebook/react#28611 - facebook/react#28610 - facebook/react#28606 - facebook/react#28598 - facebook/react#28549 - facebook/react#28557 - facebook/react#28467 - facebook/react#28591 - facebook/react#28459 - facebook/react#28590 - facebook/react#28564 - facebook/react#28582 - facebook/react#28579 - facebook/react#28578 - facebook/react#28521 - facebook/react#28550 - facebook/react#28576 - facebook/react#28577 - facebook/react#28571 - facebook/react#28572 - facebook/react#28560 - facebook/react#28569 - facebook/react#28573 - facebook/react#28546 - facebook/react#28568 - facebook/react#28562 - facebook/react#28566 - facebook/react#28565 - facebook/react#28559 - facebook/react#28508 - facebook/react#20432 - facebook/react#28555 - facebook/react#24730 - facebook/react#28472 - facebook/react#27991 - facebook/react#28514 - facebook/react#28548 - facebook/react#28526 - facebook/react#28515 - facebook/react#28533 - facebook/react#28532 - facebook/react#28531 - facebook/react#28407 - facebook/react#28522 - facebook/react#28538 - facebook/react#28509 - facebook/react#28534 - facebook/react#28527 - facebook/react#28528 - facebook/react#28519 - facebook/react#28411 - facebook/react#28520 - facebook/react#28518 - facebook/react#28493 - facebook/react#28504 - facebook/react#28499 - facebook/react#28501 - facebook/react#28496 - facebook/react#28471 - facebook/react#28351 - facebook/react#28486 - facebook/react#28490 - facebook/react#28488 - facebook/react#28468 - facebook/react#28321 - facebook/react#28477 - facebook/react#28479 - facebook/react#28480 - facebook/react#28478 - facebook/react#28464 - facebook/react#28475 - facebook/react#28456 - facebook/react#28319 - facebook/react#28345 - facebook/react#28337 - facebook/react#28335 - facebook/react#28466 - facebook/react#28462 - facebook/react#28322 - facebook/react#28444 - facebook/react#28448 - facebook/react#28449 - facebook/react#28446 - facebook/react#28447 - facebook/react#24580 - facebook/react#28514 - facebook/react#28548 - facebook/react#28526 - facebook/react#28515 - facebook/react#28533 - facebook/react#28532 - facebook/react#28531 - facebook/react#28407 - facebook/react#28522 - facebook/react#28538 - facebook/react#28509 - facebook/react#28534 - facebook/react#28527 - facebook/react#28528 - facebook/react#28519 - facebook/react#28411 - facebook/react#28520 - facebook/react#28518 - facebook/react#28493 - facebook/react#28504 - facebook/react#28499 - facebook/react#28501 - facebook/react#28496 - facebook/react#28471 - facebook/react#28351 - facebook/react#28486 - facebook/react#28490 - facebook/react#28488 - facebook/react#28468 - facebook/react#28321 - facebook/react#28477 - facebook/react#28479 - facebook/react#28480 - facebook/react#28478 - facebook/react#28464 - facebook/react#28475 - facebook/react#28456 - facebook/react#28319 - facebook/react#28345 - facebook/react#28337 - facebook/react#28335 - facebook/react#28466 - facebook/react#28462 - facebook/react#28322 - facebook/react#28444 - facebook/react#28448 - facebook/react#28449 - facebook/react#28446 - facebook/react#28447 - facebook/react#24580
1 parent dd8a935 commit fc58bbc

File tree

204 files changed

+31704
-30368
lines changed

Some content is hidden

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

204 files changed

+31704
-30368
lines changed

package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -199,16 +199,16 @@
199199
"random-seed": "0.3.0",
200200
"react": "18.2.0",
201201
"react-17": "npm:[email protected]",
202-
"react-builtin": "npm:[email protected]14898b6a9-20240318",
202+
"react-builtin": "npm:[email protected]c3048aab4-20240326",
203203
"react-dom": "18.2.0",
204204
"react-dom-17": "npm:[email protected]",
205-
"react-dom-builtin": "npm:[email protected]14898b6a9-20240318",
206-
"react-dom-experimental-builtin": "npm:[email protected]14898b6a9-20240318",
207-
"react-experimental-builtin": "npm:[email protected]14898b6a9-20240318",
208-
"react-server-dom-turbopack": "18.3.0-canary-14898b6a9-20240318",
209-
"react-server-dom-turbopack-experimental": "npm:[email protected]14898b6a9-20240318",
210-
"react-server-dom-webpack": "18.3.0-canary-14898b6a9-20240318",
211-
"react-server-dom-webpack-experimental": "npm:[email protected]14898b6a9-20240318",
205+
"react-dom-builtin": "npm:[email protected]c3048aab4-20240326",
206+
"react-dom-experimental-builtin": "npm:[email protected]c3048aab4-20240326",
207+
"react-experimental-builtin": "npm:[email protected]c3048aab4-20240326",
208+
"react-server-dom-turbopack": "18.3.0-canary-c3048aab4-20240326",
209+
"react-server-dom-turbopack-experimental": "npm:[email protected]c3048aab4-20240326",
210+
"react-server-dom-webpack": "18.3.0-canary-c3048aab4-20240326",
211+
"react-server-dom-webpack-experimental": "npm:[email protected]c3048aab4-20240326",
212212
"react-ssr-prepass": "1.0.8",
213213
"react-virtualized": "9.22.3",
214214
"relay-compiler": "13.0.2",
@@ -218,8 +218,8 @@
218218
"resolve-from": "5.0.0",
219219
"sass": "1.54.0",
220220
"satori": "0.10.9",
221-
"scheduler-builtin": "npm:[email protected]14898b6a9-20240318",
222-
"scheduler-experimental-builtin": "npm:[email protected]14898b6a9-20240318",
221+
"scheduler-builtin": "npm:[email protected]c3048aab4-20240326",
222+
"scheduler-experimental-builtin": "npm:[email protected]c3048aab4-20240326",
223223
"seedrandom": "3.0.5",
224224
"selenium-webdriver": "4.0.0-beta.4",
225225
"semver": "7.3.7",
@@ -260,4 +260,4 @@
260260
"pnpm": "8.15.7"
261261
},
262262
"packageManager": "[email protected]"
263-
}
263+
}

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

Lines changed: 442 additions & 495 deletions
Large diffs are not rendered by default.

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

Lines changed: 352 additions & 408 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: 165 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-legacy.node.development.js

Lines changed: 445 additions & 498 deletions
Large diffs are not rendered by default.

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

Lines changed: 358 additions & 414 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: 177 additions & 176 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: 32 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,24 @@ function printWarning(level, format, args) {
5555
}
5656
}
5757

58-
var ReactVersion = '18.3.0-experimental-14898b6a9-20240318';
59-
58+
var ReactVersion = '18.3.0-experimental-c3048aab4-20240326';
59+
60+
function noop() {}
61+
62+
var DefaultDispatcher = {
63+
prefetchDNS: noop,
64+
preconnect: noop,
65+
preload: noop,
66+
preloadModule: noop,
67+
preinitScript: noop,
68+
preinitStyle: noop,
69+
preinitModuleScript: noop
70+
};
6071
var Internals = {
6172
usingClientEntryPoint: false,
6273
Events: null,
63-
Dispatcher: {
64-
current: null
74+
ReactDOMCurrentDispatcher: {
75+
current: DefaultDispatcher
6576
}
6677
};
6778

@@ -84,7 +95,7 @@ function getCrossOriginStringAs(as, input) {
8495
return undefined;
8596
}
8697

87-
var Dispatcher = Internals.Dispatcher;
98+
var ReactDOMCurrentDispatcher = Internals.ReactDOMCurrentDispatcher;
8899
function prefetchDNS(href) {
89100
{
90101
if (typeof href !== 'string' || !href) {
@@ -100,10 +111,8 @@ function prefetchDNS(href) {
100111
}
101112
}
102113

103-
var dispatcher = Dispatcher.current;
104-
105-
if (dispatcher && typeof href === 'string') {
106-
dispatcher.prefetchDNS(href);
114+
if (typeof href === 'string') {
115+
ReactDOMCurrentDispatcher.current.prefetchDNS(href);
107116
} // We don't error because preconnect needs to be resilient to being called in a variety of scopes
108117
// and the runtime may not be capable of responding. The function is optimistic and not critical
109118
// so we favor silent bailout over warning or erroring.
@@ -120,11 +129,9 @@ function preconnect(href, options) {
120129
}
121130
}
122131

123-
var dispatcher = Dispatcher.current;
124-
125-
if (dispatcher && typeof href === 'string') {
132+
if (typeof href === 'string') {
126133
var crossOrigin = options ? getCrossOriginString(options.crossOrigin) : null;
127-
dispatcher.preconnect(href, crossOrigin);
134+
ReactDOMCurrentDispatcher.current.preconnect(href, crossOrigin);
128135
} // We don't error because preconnect needs to be resilient to being called in a variety of scopes
129136
// and the runtime may not be capable of responding. The function is optimistic and not critical
130137
// so we favor silent bailout over warning or erroring.
@@ -149,13 +156,11 @@ function preload(href, options) {
149156
}
150157
}
151158

152-
var dispatcher = Dispatcher.current;
153-
154-
if (dispatcher && typeof href === 'string' && // We check existence because we cannot enforce this function is actually called with the stated type
159+
if (typeof href === 'string' && // We check existence because we cannot enforce this function is actually called with the stated type
155160
typeof options === 'object' && options !== null && typeof options.as === 'string') {
156161
var as = options.as;
157162
var crossOrigin = getCrossOriginStringAs(as, options.crossOrigin);
158-
dispatcher.preload(href, as, {
163+
ReactDOMCurrentDispatcher.current.preload(href, as, {
159164
crossOrigin: crossOrigin,
160165
integrity: typeof options.integrity === 'string' ? options.integrity : undefined,
161166
nonce: typeof options.nonce === 'string' ? options.nonce : undefined,
@@ -189,18 +194,16 @@ function preloadModule(href, options) {
189194
}
190195
}
191196

192-
var dispatcher = Dispatcher.current;
193-
194-
if (dispatcher && typeof href === 'string') {
197+
if (typeof href === 'string') {
195198
if (options) {
196199
var crossOrigin = getCrossOriginStringAs(options.as, options.crossOrigin);
197-
dispatcher.preloadModule(href, {
200+
ReactDOMCurrentDispatcher.current.preloadModule(href, {
198201
as: typeof options.as === 'string' && options.as !== 'script' ? options.as : undefined,
199202
crossOrigin: crossOrigin,
200203
integrity: typeof options.integrity === 'string' ? options.integrity : undefined
201204
});
202205
} else {
203-
dispatcher.preloadModule(href);
206+
ReactDOMCurrentDispatcher.current.preloadModule(href);
204207
}
205208
} // We don't error because preload needs to be resilient to being called in a variety of scopes
206209
// and the runtime may not be capable of responding. The function is optimistic and not critical
@@ -218,22 +221,20 @@ function preinit(href, options) {
218221
}
219222
}
220223

221-
var dispatcher = Dispatcher.current;
222-
223-
if (dispatcher && typeof href === 'string' && options && typeof options.as === 'string') {
224+
if (typeof href === 'string' && options && typeof options.as === 'string') {
224225
var as = options.as;
225226
var crossOrigin = getCrossOriginStringAs(as, options.crossOrigin);
226227
var integrity = typeof options.integrity === 'string' ? options.integrity : undefined;
227228
var fetchPriority = typeof options.fetchPriority === 'string' ? options.fetchPriority : undefined;
228229

229230
if (as === 'style') {
230-
dispatcher.preinitStyle(href, typeof options.precedence === 'string' ? options.precedence : undefined, {
231+
ReactDOMCurrentDispatcher.current.preinitStyle(href, typeof options.precedence === 'string' ? options.precedence : undefined, {
231232
crossOrigin: crossOrigin,
232233
integrity: integrity,
233234
fetchPriority: fetchPriority
234235
});
235236
} else if (as === 'script') {
236-
dispatcher.preinitScript(href, {
237+
ReactDOMCurrentDispatcher.current.preinitScript(href, {
237238
crossOrigin: crossOrigin,
238239
integrity: integrity,
239240
fetchPriority: fetchPriority,
@@ -281,20 +282,18 @@ function preinitModule(href, options) {
281282
}
282283
}
283284

284-
var dispatcher = Dispatcher.current;
285-
286-
if (dispatcher && typeof href === 'string') {
285+
if (typeof href === 'string') {
287286
if (typeof options === 'object' && options !== null) {
288287
if (options.as == null || options.as === 'script') {
289288
var crossOrigin = getCrossOriginStringAs(options.as, options.crossOrigin);
290-
dispatcher.preinitModuleScript(href, {
289+
ReactDOMCurrentDispatcher.current.preinitModuleScript(href, {
291290
crossOrigin: crossOrigin,
292291
integrity: typeof options.integrity === 'string' ? options.integrity : undefined,
293292
nonce: typeof options.nonce === 'string' ? options.nonce : undefined
294293
});
295294
}
296295
} else if (options == null) {
297-
dispatcher.preinitModuleScript(href);
296+
ReactDOMCurrentDispatcher.current.preinitModuleScript(href);
298297
}
299298
} // We don't error because preinit needs to be resilient to being called in a variety of scopes
300299
// and the runtime may not be capable of responding. The function is optimistic and not critical
@@ -319,7 +318,7 @@ function resolveDispatcher() {
319318

320319
{
321320
if (dispatcher === null) {
322-
error('Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for' + ' one of the following reasons:\n' + '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' + '2. You might be breaking the Rules of Hooks\n' + '3. You might have more than one copy of React in the same app\n' + 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.');
321+
error('Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for' + ' one of the following reasons:\n' + '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' + '2. You might be breaking the Rules of Hooks\n' + '3. You might have more than one copy of React in the same app\n' + 'See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.');
323322
}
324323
} // Will result in a null access error if accessed outside render phase. We
325324
// intentionally don't throw our own error because this is in a hot path.

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

Lines changed: 31 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,24 @@
1212

1313
var React = require("next/dist/compiled/react-experimental");
1414

15-
var ReactVersion = '18.3.0-experimental-14898b6a9-20240318';
16-
15+
var ReactVersion = '18.3.0-experimental-c3048aab4-20240326';
16+
17+
function noop() {}
18+
19+
const DefaultDispatcher = {
20+
prefetchDNS: noop,
21+
preconnect: noop,
22+
preload: noop,
23+
preloadModule: noop,
24+
preinitScript: noop,
25+
preinitStyle: noop,
26+
preinitModuleScript: noop
27+
};
1728
const Internals = {
1829
usingClientEntryPoint: false,
1930
Events: null,
20-
Dispatcher: {
21-
current: null
31+
ReactDOMCurrentDispatcher: {
32+
current: DefaultDispatcher
2233
}
2334
};
2435

@@ -58,39 +69,33 @@ function getCrossOriginStringAs(as, input) {
5869
return undefined;
5970
}
6071

61-
const Dispatcher = Internals.Dispatcher;
72+
const ReactDOMCurrentDispatcher = Internals.ReactDOMCurrentDispatcher;
6273
function prefetchDNS(href) {
6374

64-
const dispatcher = Dispatcher.current;
65-
66-
if (dispatcher && typeof href === 'string') {
67-
dispatcher.prefetchDNS(href);
75+
if (typeof href === 'string') {
76+
ReactDOMCurrentDispatcher.current.prefetchDNS(href);
6877
} // We don't error because preconnect needs to be resilient to being called in a variety of scopes
6978
// and the runtime may not be capable of responding. The function is optimistic and not critical
7079
// so we favor silent bailout over warning or erroring.
7180

7281
}
7382
function preconnect(href, options) {
7483

75-
const dispatcher = Dispatcher.current;
76-
77-
if (dispatcher && typeof href === 'string') {
84+
if (typeof href === 'string') {
7885
const crossOrigin = options ? getCrossOriginString(options.crossOrigin) : null;
79-
dispatcher.preconnect(href, crossOrigin);
86+
ReactDOMCurrentDispatcher.current.preconnect(href, crossOrigin);
8087
} // We don't error because preconnect needs to be resilient to being called in a variety of scopes
8188
// and the runtime may not be capable of responding. The function is optimistic and not critical
8289
// so we favor silent bailout over warning or erroring.
8390

8491
}
8592
function preload(href, options) {
8693

87-
const dispatcher = Dispatcher.current;
88-
89-
if (dispatcher && typeof href === 'string' && // We check existence because we cannot enforce this function is actually called with the stated type
94+
if (typeof href === 'string' && // We check existence because we cannot enforce this function is actually called with the stated type
9095
typeof options === 'object' && options !== null && typeof options.as === 'string') {
9196
const as = options.as;
9297
const crossOrigin = getCrossOriginStringAs(as, options.crossOrigin);
93-
dispatcher.preload(href, as, {
98+
ReactDOMCurrentDispatcher.current.preload(href, as, {
9499
crossOrigin,
95100
integrity: typeof options.integrity === 'string' ? options.integrity : undefined,
96101
nonce: typeof options.nonce === 'string' ? options.nonce : undefined,
@@ -107,18 +112,16 @@ function preload(href, options) {
107112
}
108113
function preloadModule(href, options) {
109114

110-
const dispatcher = Dispatcher.current;
111-
112-
if (dispatcher && typeof href === 'string') {
115+
if (typeof href === 'string') {
113116
if (options) {
114117
const crossOrigin = getCrossOriginStringAs(options.as, options.crossOrigin);
115-
dispatcher.preloadModule(href, {
118+
ReactDOMCurrentDispatcher.current.preloadModule(href, {
116119
as: typeof options.as === 'string' && options.as !== 'script' ? options.as : undefined,
117120
crossOrigin,
118121
integrity: typeof options.integrity === 'string' ? options.integrity : undefined
119122
});
120123
} else {
121-
dispatcher.preloadModule(href);
124+
ReactDOMCurrentDispatcher.current.preloadModule(href);
122125
}
123126
} // We don't error because preload needs to be resilient to being called in a variety of scopes
124127
// and the runtime may not be capable of responding. The function is optimistic and not critical
@@ -127,22 +130,20 @@ function preloadModule(href, options) {
127130
}
128131
function preinit(href, options) {
129132

130-
const dispatcher = Dispatcher.current;
131-
132-
if (dispatcher && typeof href === 'string' && options && typeof options.as === 'string') {
133+
if (typeof href === 'string' && options && typeof options.as === 'string') {
133134
const as = options.as;
134135
const crossOrigin = getCrossOriginStringAs(as, options.crossOrigin);
135136
const integrity = typeof options.integrity === 'string' ? options.integrity : undefined;
136137
const fetchPriority = typeof options.fetchPriority === 'string' ? options.fetchPriority : undefined;
137138

138139
if (as === 'style') {
139-
dispatcher.preinitStyle(href, typeof options.precedence === 'string' ? options.precedence : undefined, {
140+
ReactDOMCurrentDispatcher.current.preinitStyle(href, typeof options.precedence === 'string' ? options.precedence : undefined, {
140141
crossOrigin,
141142
integrity,
142143
fetchPriority
143144
});
144145
} else if (as === 'script') {
145-
dispatcher.preinitScript(href, {
146+
ReactDOMCurrentDispatcher.current.preinitScript(href, {
146147
crossOrigin,
147148
integrity,
148149
fetchPriority,
@@ -156,20 +157,18 @@ function preinit(href, options) {
156157
}
157158
function preinitModule(href, options) {
158159

159-
const dispatcher = Dispatcher.current;
160-
161-
if (dispatcher && typeof href === 'string') {
160+
if (typeof href === 'string') {
162161
if (typeof options === 'object' && options !== null) {
163162
if (options.as == null || options.as === 'script') {
164163
const crossOrigin = getCrossOriginStringAs(options.as, options.crossOrigin);
165-
dispatcher.preinitModuleScript(href, {
164+
ReactDOMCurrentDispatcher.current.preinitModuleScript(href, {
166165
crossOrigin,
167166
integrity: typeof options.integrity === 'string' ? options.integrity : undefined,
168167
nonce: typeof options.nonce === 'string' ? options.nonce : undefined
169168
});
170169
}
171170
} else if (options == null) {
172-
dispatcher.preinitModuleScript(href);
171+
ReactDOMCurrentDispatcher.current.preinitModuleScript(href);
173172
}
174173
} // We don't error because preinit needs to be resilient to being called in a variety of scopes
175174
// and the runtime may not be capable of responding. The function is optimistic and not critical

0 commit comments

Comments
 (0)