Skip to content

Commit 07e6503

Browse files
committed
Make enableBigIntSupport a dynamic flag for Meta (#28617)
Make enableBigIntSupport a dynamic flag for Meta Should be an easy launch, but let's make this a dynamic flag to be safe. DiffTrain build for [5a75f9e](5a75f9e)
1 parent 97218a1 commit 07e6503

31 files changed

+405
-249
lines changed

compiled/facebook-www/REVISION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
527ed72bfd9f5c0045da468ad01db968a9961ad7
1+
5a75f9e78544fa6d052aff7fe99607e48f35b979

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

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ if (__DEV__) {
2424
) {
2525
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
2626
}
27-
var ReactVersion = "18.3.0-www-classic-e33483b4";
27+
var ReactVersion = "18.3.0-www-classic-1c9d7bd1";
2828

2929
// ATTENTION
3030
// When adding new symbols to this file,
@@ -399,7 +399,8 @@ if (__DEV__) {
399399
// Re-export dynamic flags from the www version.
400400
var dynamicFeatureFlags = require("ReactFeatureFlags");
401401

402-
var enableDebugTracing = dynamicFeatureFlags.enableDebugTracing,
402+
var enableBigIntSupport = dynamicFeatureFlags.enableBigIntSupport,
403+
enableDebugTracing = dynamicFeatureFlags.enableDebugTracing,
403404
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
404405
enableRenderableContext = dynamicFeatureFlags.enableRenderableContext,
405406
enableRefAsProp = dynamicFeatureFlags.enableRefAsProp;
@@ -2359,9 +2360,10 @@ if (__DEV__) {
23592360
invokeCallback = true;
23602361
} else {
23612362
switch (type) {
2362-
case "bigint": {
2363-
break;
2364-
}
2363+
case "bigint":
2364+
if (!enableBigIntSupport) {
2365+
break;
2366+
}
23652367

23662368
// fallthrough for enabled BigInt support
23672369

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

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ if (__DEV__) {
2424
) {
2525
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
2626
}
27-
var ReactVersion = "18.3.0-www-modern-5840c08e";
27+
var ReactVersion = "18.3.0-www-modern-bbec48f4";
2828

2929
// ATTENTION
3030
// When adding new symbols to this file,
@@ -399,7 +399,8 @@ if (__DEV__) {
399399
// Re-export dynamic flags from the www version.
400400
var dynamicFeatureFlags = require("ReactFeatureFlags");
401401

402-
var enableDebugTracing = dynamicFeatureFlags.enableDebugTracing,
402+
var enableBigIntSupport = dynamicFeatureFlags.enableBigIntSupport,
403+
enableDebugTracing = dynamicFeatureFlags.enableDebugTracing,
403404
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
404405
enableRenderableContext = dynamicFeatureFlags.enableRenderableContext,
405406
enableRefAsProp = dynamicFeatureFlags.enableRefAsProp;
@@ -2315,9 +2316,10 @@ if (__DEV__) {
23152316
invokeCallback = true;
23162317
} else {
23172318
switch (type) {
2318-
case "bigint": {
2319-
break;
2320-
}
2319+
case "bigint":
2320+
if (!enableBigIntSupport) {
2321+
break;
2322+
}
23212323

23222324
// fallthrough for enabled BigInt support
23232325

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ assign(pureComponentPrototype, Component.prototype);
8383
pureComponentPrototype.isPureReactComponent = !0;
8484
var isArrayImpl = Array.isArray,
8585
dynamicFeatureFlags = require("ReactFeatureFlags"),
86+
enableBigIntSupport = dynamicFeatureFlags.enableBigIntSupport,
8687
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
8788
enableRenderableContext = dynamicFeatureFlags.enableRenderableContext,
8889
enableRefAsProp = dynamicFeatureFlags.enableRefAsProp,
@@ -246,6 +247,8 @@ function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
246247
if (null === children) invokeCallback = !0;
247248
else
248249
switch (type) {
250+
case "bigint":
251+
if (!enableBigIntSupport) break;
249252
case "string":
250253
case "number":
251254
invokeCallback = !0;
@@ -640,4 +643,4 @@ exports.useSyncExternalStore = function (
640643
exports.useTransition = function () {
641644
return ReactCurrentDispatcher.current.useTransition();
642645
};
643-
exports.version = "18.3.0-www-classic-af285d7f";
646+
exports.version = "18.3.0-www-classic-3f1a7fba";

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ assign(pureComponentPrototype, Component.prototype);
8282
pureComponentPrototype.isPureReactComponent = !0;
8383
var isArrayImpl = Array.isArray,
8484
dynamicFeatureFlags = require("ReactFeatureFlags"),
85+
enableBigIntSupport = dynamicFeatureFlags.enableBigIntSupport,
8586
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
8687
enableRenderableContext = dynamicFeatureFlags.enableRenderableContext,
8788
enableRefAsProp = dynamicFeatureFlags.enableRefAsProp,
@@ -207,6 +208,8 @@ function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
207208
if (null === children) invokeCallback = !0;
208209
else
209210
switch (type) {
211+
case "bigint":
212+
if (!enableBigIntSupport) break;
210213
case "string":
211214
case "number":
212215
invokeCallback = !0;
@@ -632,4 +635,4 @@ exports.useSyncExternalStore = function (
632635
exports.useTransition = function () {
633636
return ReactCurrentDispatcher.current.useTransition();
634637
};
635-
exports.version = "18.3.0-www-modern-6932c29f";
638+
exports.version = "18.3.0-www-modern-e00f2544";

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ assign(pureComponentPrototype, Component.prototype);
8787
pureComponentPrototype.isPureReactComponent = !0;
8888
var isArrayImpl = Array.isArray,
8989
dynamicFeatureFlags = require("ReactFeatureFlags"),
90+
enableBigIntSupport = dynamicFeatureFlags.enableBigIntSupport,
9091
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
9192
enableRenderableContext = dynamicFeatureFlags.enableRenderableContext,
9293
enableRefAsProp = dynamicFeatureFlags.enableRefAsProp,
@@ -250,6 +251,8 @@ function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
250251
if (null === children) invokeCallback = !0;
251252
else
252253
switch (type) {
254+
case "bigint":
255+
if (!enableBigIntSupport) break;
253256
case "string":
254257
case "number":
255258
invokeCallback = !0;
@@ -644,7 +647,7 @@ exports.useSyncExternalStore = function (
644647
exports.useTransition = function () {
645648
return ReactCurrentDispatcher.current.useTransition();
646649
};
647-
exports.version = "18.3.0-www-classic-07a53cb8";
650+
exports.version = "18.3.0-www-classic-b4c99f99";
648651
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
649652
"function" ===
650653
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ assign(pureComponentPrototype, Component.prototype);
8686
pureComponentPrototype.isPureReactComponent = !0;
8787
var isArrayImpl = Array.isArray,
8888
dynamicFeatureFlags = require("ReactFeatureFlags"),
89+
enableBigIntSupport = dynamicFeatureFlags.enableBigIntSupport,
8990
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
9091
enableRenderableContext = dynamicFeatureFlags.enableRenderableContext,
9192
enableRefAsProp = dynamicFeatureFlags.enableRefAsProp,
@@ -211,6 +212,8 @@ function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
211212
if (null === children) invokeCallback = !0;
212213
else
213214
switch (type) {
215+
case "bigint":
216+
if (!enableBigIntSupport) break;
214217
case "string":
215218
case "number":
216219
invokeCallback = !0;
@@ -636,7 +639,7 @@ exports.useSyncExternalStore = function (
636639
exports.useTransition = function () {
637640
return ReactCurrentDispatcher.current.useTransition();
638641
};
639-
exports.version = "18.3.0-www-modern-d0117e88";
642+
exports.version = "18.3.0-www-modern-ef66ad17";
640643
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
641644
"function" ===
642645
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ if (__DEV__) {
6666
return self;
6767
}
6868

69-
var ReactVersion = "18.3.0-www-classic-c5031154";
69+
var ReactVersion = "18.3.0-www-classic-df608462";
7070

7171
var LegacyRoot = 0;
7272
var ConcurrentRoot = 1;
@@ -163,7 +163,8 @@ if (__DEV__) {
163163
// Re-export dynamic flags from the www version.
164164
var dynamicFeatureFlags = require("ReactFeatureFlags");
165165

166-
var enableDebugTracing = dynamicFeatureFlags.enableDebugTracing,
166+
var enableBigIntSupport = dynamicFeatureFlags.enableBigIntSupport,
167+
enableDebugTracing = dynamicFeatureFlags.enableDebugTracing,
167168
enableUseRefAccessWarning = dynamicFeatureFlags.enableUseRefAccessWarning,
168169
enableLazyContextPropagation =
169170
dynamicFeatureFlags.enableLazyContextPropagation,
@@ -197,7 +198,6 @@ if (__DEV__) {
197198
var enableAsyncActions = true; // Logs additional User Timing API marks for use with an experimental profiling tool.
198199

199200
var enableSchedulingProfiler = dynamicFeatureFlags.enableSchedulingProfiler;
200-
var enableBigIntSupport = false; // TODO: Roll out with GK. Don't keep as dynamic flag for too long, though,
201201

202202
var FunctionComponent = 0;
203203
var ClassComponent = 1;
@@ -6865,7 +6865,7 @@ if (__DEV__) {
68656865
if (
68666866
(typeof newChild === "string" && newChild !== "") ||
68676867
typeof newChild === "number" ||
6868-
enableBigIntSupport
6868+
(enableBigIntSupport && typeof newChild === "bigint")
68696869
) {
68706870
// Text nodes don't have keys. If the previous node is implicitly keyed
68716871
// we can continue to replace it without aborting even if it is not a text
@@ -7000,7 +7000,7 @@ if (__DEV__) {
70007000
if (
70017001
(typeof newChild === "string" && newChild !== "") ||
70027002
typeof newChild === "number" ||
7003-
enableBigIntSupport
7003+
(enableBigIntSupport && typeof newChild === "bigint")
70047004
) {
70057005
// Text nodes don't have keys. If the previous node is implicitly keyed
70067006
// we can continue to replace it without aborting even if it is not a text
@@ -7127,7 +7127,7 @@ if (__DEV__) {
71277127
if (
71287128
(typeof newChild === "string" && newChild !== "") ||
71297129
typeof newChild === "number" ||
7130-
enableBigIntSupport
7130+
(enableBigIntSupport && typeof newChild === "bigint")
71317131
) {
71327132
// Text nodes don't have keys, so we neither have to check the old nor
71337133
// new node for the key. If both are text nodes, they match.
@@ -7976,7 +7976,7 @@ if (__DEV__) {
79767976
if (
79777977
(typeof newChild === "string" && newChild !== "") ||
79787978
typeof newChild === "number" ||
7979-
enableBigIntSupport
7979+
(enableBigIntSupport && typeof newChild === "bigint")
79807980
) {
79817981
return placeSingleChild(
79827982
reconcileSingleTextNode(

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ if (__DEV__) {
6666
return self;
6767
}
6868

69-
var ReactVersion = "18.3.0-www-modern-f907edbd";
69+
var ReactVersion = "18.3.0-www-modern-b2ca28f2";
7070

7171
var LegacyRoot = 0;
7272
var ConcurrentRoot = 1;
@@ -163,7 +163,8 @@ if (__DEV__) {
163163
// Re-export dynamic flags from the www version.
164164
var dynamicFeatureFlags = require("ReactFeatureFlags");
165165

166-
var enableDebugTracing = dynamicFeatureFlags.enableDebugTracing,
166+
var enableBigIntSupport = dynamicFeatureFlags.enableBigIntSupport,
167+
enableDebugTracing = dynamicFeatureFlags.enableDebugTracing,
167168
enableUseRefAccessWarning = dynamicFeatureFlags.enableUseRefAccessWarning,
168169
enableLazyContextPropagation =
169170
dynamicFeatureFlags.enableLazyContextPropagation,
@@ -197,7 +198,6 @@ if (__DEV__) {
197198
var enableAsyncActions = true; // Logs additional User Timing API marks for use with an experimental profiling tool.
198199

199200
var enableSchedulingProfiler = dynamicFeatureFlags.enableSchedulingProfiler;
200-
var enableBigIntSupport = false; // TODO: Roll out with GK. Don't keep as dynamic flag for too long, though,
201201

202202
var FunctionComponent = 0;
203203
var ClassComponent = 1;
@@ -6630,7 +6630,7 @@ if (__DEV__) {
66306630
if (
66316631
(typeof newChild === "string" && newChild !== "") ||
66326632
typeof newChild === "number" ||
6633-
enableBigIntSupport
6633+
(enableBigIntSupport && typeof newChild === "bigint")
66346634
) {
66356635
// Text nodes don't have keys. If the previous node is implicitly keyed
66366636
// we can continue to replace it without aborting even if it is not a text
@@ -6765,7 +6765,7 @@ if (__DEV__) {
67656765
if (
67666766
(typeof newChild === "string" && newChild !== "") ||
67676767
typeof newChild === "number" ||
6768-
enableBigIntSupport
6768+
(enableBigIntSupport && typeof newChild === "bigint")
67696769
) {
67706770
// Text nodes don't have keys. If the previous node is implicitly keyed
67716771
// we can continue to replace it without aborting even if it is not a text
@@ -6892,7 +6892,7 @@ if (__DEV__) {
68926892
if (
68936893
(typeof newChild === "string" && newChild !== "") ||
68946894
typeof newChild === "number" ||
6895-
enableBigIntSupport
6895+
(enableBigIntSupport && typeof newChild === "bigint")
68966896
) {
68976897
// Text nodes don't have keys, so we neither have to check the old nor
68986898
// new node for the key. If both are text nodes, they match.
@@ -7741,7 +7741,7 @@ if (__DEV__) {
77417741
if (
77427742
(typeof newChild === "string" && newChild !== "") ||
77437743
typeof newChild === "number" ||
7744-
enableBigIntSupport
7744+
(enableBigIntSupport && typeof newChild === "bigint")
77457745
) {
77467746
return placeSingleChild(
77477747
reconcileSingleTextNode(

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

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ function formatProdErrorMessage(code) {
6262
var ReactSharedInternals =
6363
React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
6464
dynamicFeatureFlags = require("ReactFeatureFlags"),
65+
enableBigIntSupport = dynamicFeatureFlags.enableBigIntSupport,
6566
enableDebugTracing = dynamicFeatureFlags.enableDebugTracing,
6667
enableUseRefAccessWarning = dynamicFeatureFlags.enableUseRefAccessWarning,
6768
enableLazyContextPropagation =
@@ -2032,7 +2033,8 @@ function createChildReconciler(shouldTrackSideEffects) {
20322033
function createChild(returnFiber, newChild, lanes) {
20332034
if (
20342035
("string" === typeof newChild && "" !== newChild) ||
2035-
"number" === typeof newChild
2036+
"number" === typeof newChild ||
2037+
(enableBigIntSupport && "bigint" === typeof newChild)
20362038
)
20372039
return (
20382040
(newChild = createFiberFromText(
@@ -2100,7 +2102,8 @@ function createChildReconciler(shouldTrackSideEffects) {
21002102
var key = null !== oldFiber ? oldFiber.key : null;
21012103
if (
21022104
("string" === typeof newChild && "" !== newChild) ||
2103-
"number" === typeof newChild
2105+
"number" === typeof newChild ||
2106+
(enableBigIntSupport && "bigint" === typeof newChild)
21042107
)
21052108
return null !== key
21062109
? null
@@ -2152,7 +2155,8 @@ function createChildReconciler(shouldTrackSideEffects) {
21522155
) {
21532156
if (
21542157
("string" === typeof newChild && "" !== newChild) ||
2155-
"number" === typeof newChild
2158+
"number" === typeof newChild ||
2159+
(enableBigIntSupport && "bigint" === typeof newChild)
21562160
)
21572161
return (
21582162
(existingChildren = existingChildren.get(newIdx) || null),
@@ -2529,7 +2533,8 @@ function createChildReconciler(shouldTrackSideEffects) {
25292533
throwOnInvalidObjectType(returnFiber, newChild);
25302534
}
25312535
return ("string" === typeof newChild && "" !== newChild) ||
2532-
"number" === typeof newChild
2536+
"number" === typeof newChild ||
2537+
(enableBigIntSupport && "bigint" === typeof newChild)
25332538
? ((newChild = "" + newChild),
25342539
null !== currentFirstChild && 6 === currentFirstChild.tag
25352540
? (deleteRemainingChildren(returnFiber, currentFirstChild.sibling),
@@ -10636,7 +10641,7 @@ var slice = Array.prototype.slice,
1063610641
return null;
1063710642
},
1063810643
bundleType: 0,
10639-
version: "18.3.0-www-classic-4a28a0e2",
10644+
version: "18.3.0-www-classic-0830bd6c",
1064010645
rendererPackageName: "react-art"
1064110646
};
1064210647
var internals$jscomp$inline_1320 = {
@@ -10667,7 +10672,7 @@ var internals$jscomp$inline_1320 = {
1066710672
scheduleRoot: null,
1066810673
setRefreshHandler: null,
1066910674
getCurrentFiber: null,
10670-
reconcilerVersion: "18.3.0-www-classic-4a28a0e2"
10675+
reconcilerVersion: "18.3.0-www-classic-0830bd6c"
1067110676
};
1067210677
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
1067310678
var hook$jscomp$inline_1321 = __REACT_DEVTOOLS_GLOBAL_HOOK__;

0 commit comments

Comments
 (0)