Skip to content

Commit 7c39333

Browse files
committed
[Fizz] Always load the external runtime if one is provided (facebook#33091)
Because we now decided whether to outline in the flushing phase, when we're writing the preamble we don't yet know if we will make that decision so we don't know if it's safe to omit the external runtime. However, if you are providing an external runtime it's probably a pretty safe bet you're streaming something dynamically that's likely to need it so we can always include it. The main thing is that this makes it hard to test it because it affects our tests in ways it wouldn't otherwise so we have to add a bunch of conditions. DiffTrain build for [f739642](facebook@f739642)
1 parent 4d78e93 commit 7c39333

37 files changed

+838
-458
lines changed

compiled/facebook-www/REVISION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
bb57fa7351776a86448c1a094bea8108fd6b34ff
1+
f739642745577a8e4dcb9753836ac3589b9c590a
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
bb57fa7351776a86448c1a094bea8108fd6b34ff
1+
f739642745577a8e4dcb9753836ac3589b9c590a

compiled/facebook-www/React-dev.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1538,7 +1538,7 @@ __DEV__ &&
15381538
exports.useTransition = function () {
15391539
return resolveDispatcher().useTransition();
15401540
};
1541-
exports.version = "19.2.0-www-classic-bb57fa73-20250501";
1541+
exports.version = "19.2.0-www-classic-f7396427-20250501";
15421542
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
15431543
"function" ===
15441544
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-dev.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1538,7 +1538,7 @@ __DEV__ &&
15381538
exports.useTransition = function () {
15391539
return resolveDispatcher().useTransition();
15401540
};
1541-
exports.version = "19.2.0-www-modern-bb57fa73-20250501";
1541+
exports.version = "19.2.0-www-modern-f7396427-20250501";
15421542
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
15431543
"function" ===
15441544
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-prod.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,4 +636,4 @@ exports.useSyncExternalStore = function (
636636
exports.useTransition = function () {
637637
return ReactSharedInternals.H.useTransition();
638638
};
639-
exports.version = "19.2.0-www-classic-bb57fa73-20250501";
639+
exports.version = "19.2.0-www-classic-f7396427-20250501";

compiled/facebook-www/React-prod.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,4 +636,4 @@ exports.useSyncExternalStore = function (
636636
exports.useTransition = function () {
637637
return ReactSharedInternals.H.useTransition();
638638
};
639-
exports.version = "19.2.0-www-modern-bb57fa73-20250501";
639+
exports.version = "19.2.0-www-modern-f7396427-20250501";

compiled/facebook-www/React-profiling.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ exports.useSyncExternalStore = function (
640640
exports.useTransition = function () {
641641
return ReactSharedInternals.H.useTransition();
642642
};
643-
exports.version = "19.2.0-www-classic-bb57fa73-20250501";
643+
exports.version = "19.2.0-www-classic-f7396427-20250501";
644644
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
645645
"function" ===
646646
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-profiling.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ exports.useSyncExternalStore = function (
640640
exports.useTransition = function () {
641641
return ReactSharedInternals.H.useTransition();
642642
};
643-
exports.version = "19.2.0-www-modern-bb57fa73-20250501";
643+
exports.version = "19.2.0-www-modern-f7396427-20250501";
644644
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
645645
"function" ===
646646
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/ReactART-dev.classic.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19014,10 +19014,10 @@ __DEV__ &&
1901419014
(function () {
1901519015
var internals = {
1901619016
bundleType: 1,
19017-
version: "19.2.0-www-classic-bb57fa73-20250501",
19017+
version: "19.2.0-www-classic-f7396427-20250501",
1901819018
rendererPackageName: "react-art",
1901919019
currentDispatcherRef: ReactSharedInternals,
19020-
reconcilerVersion: "19.2.0-www-classic-bb57fa73-20250501"
19020+
reconcilerVersion: "19.2.0-www-classic-f7396427-20250501"
1902119021
};
1902219022
internals.overrideHookState = overrideHookState;
1902319023
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -19051,7 +19051,7 @@ __DEV__ &&
1905119051
exports.Shape = Shape;
1905219052
exports.Surface = Surface;
1905319053
exports.Text = Text;
19054-
exports.version = "19.2.0-www-classic-bb57fa73-20250501";
19054+
exports.version = "19.2.0-www-classic-f7396427-20250501";
1905519055
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
1905619056
"function" ===
1905719057
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/ReactART-dev.modern.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18786,10 +18786,10 @@ __DEV__ &&
1878618786
(function () {
1878718787
var internals = {
1878818788
bundleType: 1,
18789-
version: "19.2.0-www-modern-bb57fa73-20250501",
18789+
version: "19.2.0-www-modern-f7396427-20250501",
1879018790
rendererPackageName: "react-art",
1879118791
currentDispatcherRef: ReactSharedInternals,
18792-
reconcilerVersion: "19.2.0-www-modern-bb57fa73-20250501"
18792+
reconcilerVersion: "19.2.0-www-modern-f7396427-20250501"
1879318793
};
1879418794
internals.overrideHookState = overrideHookState;
1879518795
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -18823,7 +18823,7 @@ __DEV__ &&
1882318823
exports.Shape = Shape;
1882418824
exports.Surface = Surface;
1882518825
exports.Text = Text;
18826-
exports.version = "19.2.0-www-modern-bb57fa73-20250501";
18826+
exports.version = "19.2.0-www-modern-f7396427-20250501";
1882718827
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
1882818828
"function" ===
1882918829
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/ReactART-prod.classic.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11412,10 +11412,10 @@ var slice = Array.prototype.slice,
1141211412
})(React.Component);
1141311413
var internals$jscomp$inline_1619 = {
1141411414
bundleType: 0,
11415-
version: "19.2.0-www-classic-bb57fa73-20250501",
11415+
version: "19.2.0-www-classic-f7396427-20250501",
1141611416
rendererPackageName: "react-art",
1141711417
currentDispatcherRef: ReactSharedInternals,
11418-
reconcilerVersion: "19.2.0-www-classic-bb57fa73-20250501"
11418+
reconcilerVersion: "19.2.0-www-classic-f7396427-20250501"
1141911419
};
1142011420
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
1142111421
var hook$jscomp$inline_1620 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -11441,4 +11441,4 @@ exports.RadialGradient = RadialGradient;
1144111441
exports.Shape = TYPES.SHAPE;
1144211442
exports.Surface = Surface;
1144311443
exports.Text = Text;
11444-
exports.version = "19.2.0-www-classic-bb57fa73-20250501";
11444+
exports.version = "19.2.0-www-classic-f7396427-20250501";

compiled/facebook-www/ReactART-prod.modern.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11125,10 +11125,10 @@ var slice = Array.prototype.slice,
1112511125
})(React.Component);
1112611126
var internals$jscomp$inline_1592 = {
1112711127
bundleType: 0,
11128-
version: "19.2.0-www-modern-bb57fa73-20250501",
11128+
version: "19.2.0-www-modern-f7396427-20250501",
1112911129
rendererPackageName: "react-art",
1113011130
currentDispatcherRef: ReactSharedInternals,
11131-
reconcilerVersion: "19.2.0-www-modern-bb57fa73-20250501"
11131+
reconcilerVersion: "19.2.0-www-modern-f7396427-20250501"
1113211132
};
1113311133
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
1113411134
var hook$jscomp$inline_1593 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -11154,4 +11154,4 @@ exports.RadialGradient = RadialGradient;
1115411154
exports.Shape = TYPES.SHAPE;
1115511155
exports.Surface = Surface;
1115611156
exports.Text = Text;
11157-
exports.version = "19.2.0-www-modern-bb57fa73-20250501";
11157+
exports.version = "19.2.0-www-modern-f7396427-20250501";

compiled/facebook-www/ReactDOM-dev.classic.js

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6614,7 +6614,7 @@ __DEV__ &&
66146614
null !== state &&
66156615
((state = state.dehydrated),
66166616
null === state ||
6617-
state.data === SUSPENSE_PENDING_START_DATA ||
6617+
isSuspenseInstancePending(state) ||
66186618
isSuspenseInstanceFallback(state))
66196619
)
66206620
return node;
@@ -10322,16 +10322,18 @@ __DEV__ &&
1032210322
),
1032310323
SelectiveHydrationException)
1032410324
);
10325-
JSCompiler_object_inline_componentStack_2960.data ===
10326-
SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible();
10325+
isSuspenseInstancePending(
10326+
JSCompiler_object_inline_componentStack_2960
10327+
) || renderDidSuspendDelayIfPossible();
1032710328
workInProgress = retrySuspenseComponentWithoutHydrating(
1032810329
current,
1032910330
workInProgress,
1033010331
renderLanes
1033110332
);
1033210333
} else
10333-
JSCompiler_object_inline_componentStack_2960.data ===
10334-
SUSPENSE_PENDING_START_DATA
10334+
isSuspenseInstancePending(
10335+
JSCompiler_object_inline_componentStack_2960
10336+
)
1033510337
? ((workInProgress.flags |= 192),
1033610338
(workInProgress.child = current.child),
1033710339
(workInProgress = null))
@@ -24864,6 +24866,7 @@ __DEV__ &&
2486424866
} else if (
2486524867
node === SUSPENSE_START_DATA ||
2486624868
node === SUSPENSE_PENDING_START_DATA ||
24869+
node === SUSPENSE_QUEUED_START_DATA ||
2486724870
node === SUSPENSE_FALLBACK_START_DATA ||
2486824871
node === ACTIVITY_START_DATA
2486924872
)
@@ -24916,6 +24919,7 @@ __DEV__ &&
2491624919
else
2491724920
(node !== SUSPENSE_START_DATA &&
2491824921
node !== SUSPENSE_PENDING_START_DATA &&
24922+
node !== SUSPENSE_QUEUED_START_DATA &&
2491924923
node !== SUSPENSE_FALLBACK_START_DATA) ||
2492024924
suspenseInstance++;
2492124925
node = nextNode;
@@ -25450,18 +25454,26 @@ __DEV__ &&
2545025454
}
2545125455
return instance;
2545225456
}
25457+
function isSuspenseInstancePending(instance) {
25458+
return (
25459+
instance.data === SUSPENSE_PENDING_START_DATA ||
25460+
instance.data === SUSPENSE_QUEUED_START_DATA
25461+
);
25462+
}
2545325463
function isSuspenseInstanceFallback(instance) {
2545425464
return (
2545525465
instance.data === SUSPENSE_FALLBACK_START_DATA ||
2545625466
(instance.data === SUSPENSE_PENDING_START_DATA &&
25457-
instance.ownerDocument.readyState === DOCUMENT_READY_STATE_COMPLETE)
25467+
instance.ownerDocument.readyState !== DOCUMENT_READY_STATE_LOADING)
2545825468
);
2545925469
}
2546025470
function registerSuspenseInstanceRetry(instance, callback) {
2546125471
var ownerDocument = instance.ownerDocument;
25462-
if (
25472+
if (instance.data === SUSPENSE_QUEUED_START_DATA)
25473+
instance._reactRetry = callback;
25474+
else if (
2546325475
instance.data !== SUSPENSE_PENDING_START_DATA ||
25464-
ownerDocument.readyState === DOCUMENT_READY_STATE_COMPLETE
25476+
ownerDocument.readyState !== DOCUMENT_READY_STATE_LOADING
2546525477
)
2546625478
callback();
2546725479
else {
@@ -25483,6 +25495,7 @@ __DEV__ &&
2548325495
nodeType === SUSPENSE_START_DATA ||
2548425496
nodeType === SUSPENSE_FALLBACK_START_DATA ||
2548525497
nodeType === SUSPENSE_PENDING_START_DATA ||
25498+
nodeType === SUSPENSE_QUEUED_START_DATA ||
2548625499
nodeType === ACTIVITY_START_DATA ||
2548725500
nodeType === FORM_STATE_IS_MATCHING ||
2548825501
nodeType === FORM_STATE_IS_NOT_MATCHING
@@ -25547,6 +25560,7 @@ __DEV__ &&
2554725560
(data !== SUSPENSE_START_DATA &&
2554825561
data !== SUSPENSE_FALLBACK_START_DATA &&
2554925562
data !== SUSPENSE_PENDING_START_DATA &&
25563+
data !== SUSPENSE_QUEUED_START_DATA &&
2555025564
data !== ACTIVITY_START_DATA) ||
2555125565
depth++;
2555225566
}
@@ -25563,6 +25577,7 @@ __DEV__ &&
2556325577
data === SUSPENSE_START_DATA ||
2556425578
data === SUSPENSE_FALLBACK_START_DATA ||
2556525579
data === SUSPENSE_PENDING_START_DATA ||
25580+
data === SUSPENSE_QUEUED_START_DATA ||
2556625581
data === ACTIVITY_START_DATA
2556725582
) {
2556825583
if (0 === depth) return targetInstance;
@@ -30626,13 +30641,14 @@ __DEV__ &&
3062630641
SUSPENSE_START_DATA = "$",
3062730642
SUSPENSE_END_DATA = "/$",
3062830643
SUSPENSE_PENDING_START_DATA = "$?",
30644+
SUSPENSE_QUEUED_START_DATA = "$~",
3062930645
SUSPENSE_FALLBACK_START_DATA = "$!",
3063030646
PREAMBLE_CONTRIBUTION_HTML = "html",
3063130647
PREAMBLE_CONTRIBUTION_BODY = "body",
3063230648
PREAMBLE_CONTRIBUTION_HEAD = "head",
3063330649
FORM_STATE_IS_MATCHING = "F!",
3063430650
FORM_STATE_IS_NOT_MATCHING = "F",
30635-
DOCUMENT_READY_STATE_COMPLETE = "complete",
30651+
DOCUMENT_READY_STATE_LOADING = "loading",
3063630652
STYLE = "style",
3063730653
HostContextNamespaceNone = 0,
3063830654
HostContextNamespaceSvg = 1,
@@ -31126,11 +31142,11 @@ __DEV__ &&
3112631142
return_targetInst = null;
3112731143
(function () {
3112831144
var isomorphicReactPackageVersion = React.version;
31129-
if ("19.2.0-www-classic-bb57fa73-20250501" !== isomorphicReactPackageVersion)
31145+
if ("19.2.0-www-classic-f7396427-20250501" !== isomorphicReactPackageVersion)
3113031146
throw Error(
3113131147
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
3113231148
(isomorphicReactPackageVersion +
31133-
"\n - react-dom: 19.2.0-www-classic-bb57fa73-20250501\nLearn more: https://react.dev/warnings/version-mismatch")
31149+
"\n - react-dom: 19.2.0-www-classic-f7396427-20250501\nLearn more: https://react.dev/warnings/version-mismatch")
3113431150
);
3113531151
})();
3113631152
("function" === typeof Map &&
@@ -31173,10 +31189,10 @@ __DEV__ &&
3117331189
!(function () {
3117431190
var internals = {
3117531191
bundleType: 1,
31176-
version: "19.2.0-www-classic-bb57fa73-20250501",
31192+
version: "19.2.0-www-classic-f7396427-20250501",
3117731193
rendererPackageName: "react-dom",
3117831194
currentDispatcherRef: ReactSharedInternals,
31179-
reconcilerVersion: "19.2.0-www-classic-bb57fa73-20250501"
31195+
reconcilerVersion: "19.2.0-www-classic-f7396427-20250501"
3118031196
};
3118131197
internals.overrideHookState = overrideHookState;
3118231198
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -31774,7 +31790,7 @@ __DEV__ &&
3177431790
exports.useFormStatus = function () {
3177531791
return resolveDispatcher().useHostTransitionStatus();
3177631792
};
31777-
exports.version = "19.2.0-www-classic-bb57fa73-20250501";
31793+
exports.version = "19.2.0-www-classic-f7396427-20250501";
3177831794
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
3177931795
"function" ===
3178031796
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

0 commit comments

Comments
 (0)