Skip to content

Commit 04e2165

Browse files
committed
Cleanup enableNewBooleanProps (#28712)
DiffTrain build for [28fc980](28fc980)
1 parent f21dee5 commit 04e2165

11 files changed

+76
-137
lines changed

compiled/facebook-www/REVISION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7659c4d9e0e4de2ec758c9a03ad7cbf07fc696d0
1+
28fc980ef2c563e3086ae5b0b2e6293de48ae0d4

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36280,7 +36280,7 @@ if (__DEV__) {
3628036280
return root;
3628136281
}
3628236282

36283-
var ReactVersion = "19.0.0-www-classic-80b168f2";
36283+
var ReactVersion = "19.0.0-www-classic-21bc38d6";
3628436284

3628536285
function createPortal$1(
3628636286
children,
@@ -41439,7 +41439,7 @@ if (__DEV__) {
4143941439
}
4144041440
}
4144141441
}
41442-
// fallthrough for new boolean props without the flag on
41442+
// Fallthrough for boolean props that don't have a warning for empty strings.
4144341443

4144441444
case "allowFullScreen":
4144541445
case "async":
@@ -43862,7 +43862,6 @@ if (__DEV__) {
4386243862
serverDifferences
4386343863
);
4386443864
continue;
43865-
// fallthrough for new boolean props without the flag on
4386643865

4386743866
default: {
4386843867
if (

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36128,7 +36128,7 @@ if (__DEV__) {
3612836128
return root;
3612936129
}
3613036130

36131-
var ReactVersion = "19.0.0-www-modern-e4bc2307";
36131+
var ReactVersion = "19.0.0-www-modern-ab0678c9";
3613236132

3613336133
function createPortal$1(
3613436134
children,
@@ -42165,7 +42165,7 @@ if (__DEV__) {
4216542165
}
4216642166
}
4216742167
}
42168-
// fallthrough for new boolean props without the flag on
42168+
// Fallthrough for boolean props that don't have a warning for empty strings.
4216942169

4217042170
case "allowFullScreen":
4217142171
case "async":
@@ -44585,7 +44585,6 @@ if (__DEV__) {
4458544585
serverDifferences
4458644586
);
4458744587
continue;
44588-
// fallthrough for new boolean props without the flag on
4458944588

4459044589
default: {
4459144590
if (

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

Lines changed: 21 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ if (__DEV__) {
1919
var React = require("react");
2020
var ReactDOM = require("react-dom");
2121

22-
var ReactVersion = "19.0.0-www-classic-dd83f61f";
22+
var ReactVersion = "19.0.0-www-classic-e1b06834";
2323

2424
// This refers to a WWW module.
2525
var warningWWW = require("warning");
@@ -3440,6 +3440,26 @@ if (__DEV__) {
34403440
return;
34413441
}
34423442

3443+
case "inert": {
3444+
{
3445+
if (
3446+
value === "" &&
3447+
!didWarnForNewBooleanPropsWithEmptyValue[name]
3448+
) {
3449+
didWarnForNewBooleanPropsWithEmptyValue[name] = true;
3450+
3451+
error(
3452+
"Received an empty string for a boolean attribute `%s`. " +
3453+
"This will treat the attribute as if it were false. " +
3454+
"Either pass `false` to silence this warning, or " +
3455+
"pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.",
3456+
name
3457+
);
3458+
}
3459+
}
3460+
}
3461+
// Fallthrough for boolean props that don't have a warning for empty strings.
3462+
34433463
case "allowFullScreen":
34443464
case "async":
34453465
case "autoPlay":
@@ -3580,40 +3600,6 @@ if (__DEV__) {
35803600
pushStringAttribute(target, "xml:space", value);
35813601
return;
35823602

3583-
case "inert": {
3584-
{
3585-
if (
3586-
value === "" &&
3587-
!didWarnForNewBooleanPropsWithEmptyValue[name]
3588-
) {
3589-
didWarnForNewBooleanPropsWithEmptyValue[name] = true;
3590-
3591-
error(
3592-
"Received an empty string for a boolean attribute `%s`. " +
3593-
"This will treat the attribute as if it were false. " +
3594-
"Either pass `false` to silence this warning, or " +
3595-
"pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.",
3596-
name
3597-
);
3598-
}
3599-
} // Boolean
3600-
3601-
if (
3602-
value &&
3603-
typeof value !== "function" &&
3604-
typeof value !== "symbol"
3605-
) {
3606-
target.push(
3607-
attributeSeparator,
3608-
stringToChunk(name),
3609-
attributeEmptyString
3610-
);
3611-
}
3612-
3613-
return;
3614-
}
3615-
// fallthrough for new boolean props without the flag on
3616-
36173603
default:
36183604
if (
36193605
// shouldIgnoreAttribute

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

Lines changed: 21 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ if (__DEV__) {
1919
var React = require("react");
2020
var ReactDOM = require("react-dom");
2121

22-
var ReactVersion = "19.0.0-www-modern-e7985491";
22+
var ReactVersion = "19.0.0-www-modern-07eca2b1";
2323

2424
// This refers to a WWW module.
2525
var warningWWW = require("warning");
@@ -3440,6 +3440,26 @@ if (__DEV__) {
34403440
return;
34413441
}
34423442

3443+
case "inert": {
3444+
{
3445+
if (
3446+
value === "" &&
3447+
!didWarnForNewBooleanPropsWithEmptyValue[name]
3448+
) {
3449+
didWarnForNewBooleanPropsWithEmptyValue[name] = true;
3450+
3451+
error(
3452+
"Received an empty string for a boolean attribute `%s`. " +
3453+
"This will treat the attribute as if it were false. " +
3454+
"Either pass `false` to silence this warning, or " +
3455+
"pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.",
3456+
name
3457+
);
3458+
}
3459+
}
3460+
}
3461+
// Fallthrough for boolean props that don't have a warning for empty strings.
3462+
34433463
case "allowFullScreen":
34443464
case "async":
34453465
case "autoPlay":
@@ -3580,40 +3600,6 @@ if (__DEV__) {
35803600
pushStringAttribute(target, "xml:space", value);
35813601
return;
35823602

3583-
case "inert": {
3584-
{
3585-
if (
3586-
value === "" &&
3587-
!didWarnForNewBooleanPropsWithEmptyValue[name]
3588-
) {
3589-
didWarnForNewBooleanPropsWithEmptyValue[name] = true;
3590-
3591-
error(
3592-
"Received an empty string for a boolean attribute `%s`. " +
3593-
"This will treat the attribute as if it were false. " +
3594-
"Either pass `false` to silence this warning, or " +
3595-
"pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.",
3596-
name
3597-
);
3598-
}
3599-
} // Boolean
3600-
3601-
if (
3602-
value &&
3603-
typeof value !== "function" &&
3604-
typeof value !== "symbol"
3605-
) {
3606-
target.push(
3607-
attributeSeparator,
3608-
stringToChunk(name),
3609-
attributeEmptyString
3610-
);
3611-
}
3612-
3613-
return;
3614-
}
3615-
// fallthrough for new boolean props without the flag on
3616-
36173603
default:
36183604
if (
36193605
// shouldIgnoreAttribute

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

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -559,6 +559,7 @@ function pushAttribute(target, name, value) {
559559
"symbol" !== typeof value &&
560560
target.push(" ", name, '="', escapeTextForBrowser(value), '"');
561561
break;
562+
case "inert":
562563
case "allowFullScreen":
563564
case "async":
564565
case "autoPlay":
@@ -639,12 +640,6 @@ function pushAttribute(target, name, value) {
639640
case "xmlSpace":
640641
pushStringAttribute(target, "xml:space", value);
641642
break;
642-
case "inert":
643-
value &&
644-
"function" !== typeof value &&
645-
"symbol" !== typeof value &&
646-
target.push(" ", name, '=""');
647-
break;
648643
default:
649644
if (
650645
!(2 < name.length) ||
@@ -5701,4 +5696,4 @@ exports.renderToString = function (children, options) {
57015696
'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server'
57025697
);
57035698
};
5704-
exports.version = "19.0.0-www-classic-3b435a8e";
5699+
exports.version = "19.0.0-www-classic-a95965e6";

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

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -559,6 +559,7 @@ function pushAttribute(target, name, value) {
559559
"symbol" !== typeof value &&
560560
target.push(" ", name, '="', escapeTextForBrowser(value), '"');
561561
break;
562+
case "inert":
562563
case "allowFullScreen":
563564
case "async":
564565
case "autoPlay":
@@ -639,12 +640,6 @@ function pushAttribute(target, name, value) {
639640
case "xmlSpace":
640641
pushStringAttribute(target, "xml:space", value);
641642
break;
642-
case "inert":
643-
value &&
644-
"function" !== typeof value &&
645-
"symbol" !== typeof value &&
646-
target.push(" ", name, '=""');
647-
break;
648643
default:
649644
if (
650645
!(2 < name.length) ||
@@ -5642,4 +5637,4 @@ exports.renderToString = function (children, options) {
56425637
'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server'
56435638
);
56445639
};
5645-
exports.version = "19.0.0-www-modern-f4a18795";
5640+
exports.version = "19.0.0-www-modern-a46dd917";

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

Lines changed: 20 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -3437,6 +3437,26 @@ if (__DEV__) {
34373437
return;
34383438
}
34393439

3440+
case "inert": {
3441+
{
3442+
if (
3443+
value === "" &&
3444+
!didWarnForNewBooleanPropsWithEmptyValue[name]
3445+
) {
3446+
didWarnForNewBooleanPropsWithEmptyValue[name] = true;
3447+
3448+
error(
3449+
"Received an empty string for a boolean attribute `%s`. " +
3450+
"This will treat the attribute as if it were false. " +
3451+
"Either pass `false` to silence this warning, or " +
3452+
"pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.",
3453+
name
3454+
);
3455+
}
3456+
}
3457+
}
3458+
// Fallthrough for boolean props that don't have a warning for empty strings.
3459+
34403460
case "allowFullScreen":
34413461
case "async":
34423462
case "autoPlay":
@@ -3577,40 +3597,6 @@ if (__DEV__) {
35773597
pushStringAttribute(target, "xml:space", value);
35783598
return;
35793599

3580-
case "inert": {
3581-
{
3582-
if (
3583-
value === "" &&
3584-
!didWarnForNewBooleanPropsWithEmptyValue[name]
3585-
) {
3586-
didWarnForNewBooleanPropsWithEmptyValue[name] = true;
3587-
3588-
error(
3589-
"Received an empty string for a boolean attribute `%s`. " +
3590-
"This will treat the attribute as if it were false. " +
3591-
"Either pass `false` to silence this warning, or " +
3592-
"pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.",
3593-
name
3594-
);
3595-
}
3596-
} // Boolean
3597-
3598-
if (
3599-
value &&
3600-
typeof value !== "function" &&
3601-
typeof value !== "symbol"
3602-
) {
3603-
target.push(
3604-
attributeSeparator,
3605-
stringToChunk(name),
3606-
attributeEmptyString
3607-
);
3608-
}
3609-
3610-
return;
3611-
}
3612-
// fallthrough for new boolean props without the flag on
3613-
36143600
default:
36153601
if (
36163602
// shouldIgnoreAttribute

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

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,7 @@ function pushAttribute(target, name, value) {
534534
"symbol" !== typeof value &&
535535
target.push(" ", name, '="', escapeTextForBrowser(value), '"');
536536
break;
537+
case "inert":
537538
case "allowFullScreen":
538539
case "async":
539540
case "autoPlay":
@@ -614,12 +615,6 @@ function pushAttribute(target, name, value) {
614615
case "xmlSpace":
615616
pushStringAttribute(target, "xml:space", value);
616617
break;
617-
case "inert":
618-
value &&
619-
"function" !== typeof value &&
620-
"symbol" !== typeof value &&
621-
target.push(" ", name, '=""');
622-
break;
623618
default:
624619
if (
625620
!(2 < name.length) ||

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36904,7 +36904,7 @@ if (__DEV__) {
3690436904
return root;
3690536905
}
3690636906

36907-
var ReactVersion = "19.0.0-www-classic-8339402b";
36907+
var ReactVersion = "19.0.0-www-classic-81e9ca54";
3690836908

3690936909
function createPortal$1(
3691036910
children,
@@ -42063,7 +42063,7 @@ if (__DEV__) {
4206342063
}
4206442064
}
4206542065
}
42066-
// fallthrough for new boolean props without the flag on
42066+
// Fallthrough for boolean props that don't have a warning for empty strings.
4206742067

4206842068
case "allowFullScreen":
4206942069
case "async":
@@ -44486,7 +44486,6 @@ if (__DEV__) {
4448644486
serverDifferences
4448744487
);
4448844488
continue;
44489-
// fallthrough for new boolean props without the flag on
4449044489

4449144490
default: {
4449244491
if (

0 commit comments

Comments
 (0)