Skip to content

Commit 28fcf2f

Browse files
committed
Delete use of source in JSX runtime (#28433)
Only remaining place it was being used was in a warning message. DiffTrain build for [16d3f78](16d3f78)
1 parent d7e7f6c commit 28fcf2f

File tree

7 files changed

+5
-153
lines changed

7 files changed

+5
-153
lines changed

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

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1104,14 +1104,6 @@ if (__DEV__) {
11041104
"it's defined in, or you might have mixed up default and named imports.";
11051105
}
11061106

1107-
var sourceInfo = getSourceInfoErrorAddendum(source);
1108-
1109-
if (sourceInfo) {
1110-
info += sourceInfo;
1111-
} else {
1112-
info += getDeclarationErrorAddendum();
1113-
}
1114-
11151107
var typeString;
11161108

11171109
if (type === null) {
@@ -1301,18 +1293,6 @@ if (__DEV__) {
13011293
return "";
13021294
}
13031295
}
1304-
1305-
function getSourceInfoErrorAddendum(source) {
1306-
{
1307-
if (source !== undefined) {
1308-
var fileName = source.fileName.replace(/^.*[\\\/]/, "");
1309-
var lineNumber = source.lineNumber;
1310-
return "\n\nCheck your code at " + fileName + ":" + lineNumber + ".";
1311-
}
1312-
1313-
return "";
1314-
}
1315-
}
13161296
/**
13171297
* Ensure that every element either is passed in a static location, in an
13181298
* array with an explicit keys property defined, or in an object literal

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

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1104,14 +1104,6 @@ if (__DEV__) {
11041104
"it's defined in, or you might have mixed up default and named imports.";
11051105
}
11061106

1107-
var sourceInfo = getSourceInfoErrorAddendum(source);
1108-
1109-
if (sourceInfo) {
1110-
info += sourceInfo;
1111-
} else {
1112-
info += getDeclarationErrorAddendum();
1113-
}
1114-
11151107
var typeString;
11161108

11171109
if (type === null) {
@@ -1301,18 +1293,6 @@ if (__DEV__) {
13011293
return "";
13021294
}
13031295
}
1304-
1305-
function getSourceInfoErrorAddendum(source) {
1306-
{
1307-
if (source !== undefined) {
1308-
var fileName = source.fileName.replace(/^.*[\\\/]/, "");
1309-
var lineNumber = source.lineNumber;
1310-
return "\n\nCheck your code at " + fileName + ":" + lineNumber + ".";
1311-
}
1312-
1313-
return "";
1314-
}
1315-
}
13161296
/**
13171297
* Ensure that every element either is passed in a static location, in an
13181298
* array with an explicit keys property defined, or in an object literal

compiled/facebook-www/REVISION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
d579e7748218920331252b0528850943d5e2dd31
1+
16d3f7833d25b1ea026add83dd109601b60f138e

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

Lines changed: 1 addition & 37 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-7910dce1";
27+
var ReactVersion = "18.3.0-www-classic-bce6b49b";
2828

2929
// ATTENTION
3030
// When adding new symbols to this file,
@@ -1509,14 +1509,6 @@ if (__DEV__) {
15091509
"it's defined in, or you might have mixed up default and named imports.";
15101510
}
15111511

1512-
var sourceInfo = getSourceInfoErrorAddendum(source);
1513-
1514-
if (sourceInfo) {
1515-
info += sourceInfo;
1516-
} else {
1517-
info += getDeclarationErrorAddendum();
1518-
}
1519-
15201512
var typeString;
15211513

15221514
if (type === null) {
@@ -1717,14 +1709,6 @@ if (__DEV__) {
17171709
"it's defined in, or you might have mixed up default and named imports.";
17181710
}
17191711

1720-
var sourceInfo = getSourceInfoErrorAddendumForProps(config);
1721-
1722-
if (sourceInfo) {
1723-
info += sourceInfo;
1724-
} else {
1725-
info += getDeclarationErrorAddendum();
1726-
}
1727-
17281712
var typeString;
17291713

17301714
if (type === null) {
@@ -2042,26 +2026,6 @@ if (__DEV__) {
20422026
return "";
20432027
}
20442028
}
2045-
2046-
function getSourceInfoErrorAddendumForProps(elementProps) {
2047-
if (elementProps !== null && elementProps !== undefined) {
2048-
return getSourceInfoErrorAddendum(elementProps.__source);
2049-
}
2050-
2051-
return "";
2052-
}
2053-
2054-
function getSourceInfoErrorAddendum(source) {
2055-
{
2056-
if (source !== undefined) {
2057-
var fileName = source.fileName.replace(/^.*[\\\/]/, "");
2058-
var lineNumber = source.lineNumber;
2059-
return "\n\nCheck your code at " + fileName + ":" + lineNumber + ".";
2060-
}
2061-
2062-
return "";
2063-
}
2064-
}
20652029
/**
20662030
* Ensure that every element either is passed in a static location, in an
20672031
* array with an explicit keys property defined, or in an object literal

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

Lines changed: 1 addition & 37 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-a1866c69";
27+
var ReactVersion = "18.3.0-www-modern-93c46cbf";
2828

2929
// ATTENTION
3030
// When adding new symbols to this file,
@@ -1509,14 +1509,6 @@ if (__DEV__) {
15091509
"it's defined in, or you might have mixed up default and named imports.";
15101510
}
15111511

1512-
var sourceInfo = getSourceInfoErrorAddendum(source);
1513-
1514-
if (sourceInfo) {
1515-
info += sourceInfo;
1516-
} else {
1517-
info += getDeclarationErrorAddendum();
1518-
}
1519-
15201512
var typeString;
15211513

15221514
if (type === null) {
@@ -1717,14 +1709,6 @@ if (__DEV__) {
17171709
"it's defined in, or you might have mixed up default and named imports.";
17181710
}
17191711

1720-
var sourceInfo = getSourceInfoErrorAddendumForProps(config);
1721-
1722-
if (sourceInfo) {
1723-
info += sourceInfo;
1724-
} else {
1725-
info += getDeclarationErrorAddendum();
1726-
}
1727-
17281712
var typeString;
17291713

17301714
if (type === null) {
@@ -1998,26 +1982,6 @@ if (__DEV__) {
19981982
return "";
19991983
}
20001984
}
2001-
2002-
function getSourceInfoErrorAddendumForProps(elementProps) {
2003-
if (elementProps !== null && elementProps !== undefined) {
2004-
return getSourceInfoErrorAddendum(elementProps.__source);
2005-
}
2006-
2007-
return "";
2008-
}
2009-
2010-
function getSourceInfoErrorAddendum(source) {
2011-
{
2012-
if (source !== undefined) {
2013-
var fileName = source.fileName.replace(/^.*[\\\/]/, "");
2014-
var lineNumber = source.lineNumber;
2015-
return "\n\nCheck your code at " + fileName + ":" + lineNumber + ".";
2016-
}
2017-
2018-
return "";
2019-
}
2020-
}
20211985
/**
20221986
* Ensure that every element either is passed in a static location, in an
20231987
* array with an explicit keys property defined, or in an object literal

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,4 +625,4 @@ exports.useSyncExternalStore = function (
625625
exports.useTransition = function () {
626626
return ReactCurrentDispatcher.current.useTransition();
627627
};
628-
exports.version = "18.3.0-www-modern-9a917e2a";
628+
exports.version = "18.3.0-www-modern-9b3a58e1";

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

Lines changed: 1 addition & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1222,14 +1222,6 @@ if (__DEV__) {
12221222
"it's defined in, or you might have mixed up default and named imports.";
12231223
}
12241224

1225-
var sourceInfo = getSourceInfoErrorAddendum(source);
1226-
1227-
if (sourceInfo) {
1228-
info += sourceInfo;
1229-
} else {
1230-
info += getDeclarationErrorAddendum();
1231-
}
1232-
12331225
var typeString;
12341226

12351227
if (type === null) {
@@ -1430,14 +1422,6 @@ if (__DEV__) {
14301422
"it's defined in, or you might have mixed up default and named imports.";
14311423
}
14321424

1433-
var sourceInfo = getSourceInfoErrorAddendumForProps(config);
1434-
1435-
if (sourceInfo) {
1436-
info += sourceInfo;
1437-
} else {
1438-
info += getDeclarationErrorAddendum();
1439-
}
1440-
14411425
var typeString;
14421426

14431427
if (type === null) {
@@ -1711,26 +1695,6 @@ if (__DEV__) {
17111695
return "";
17121696
}
17131697
}
1714-
1715-
function getSourceInfoErrorAddendumForProps(elementProps) {
1716-
if (elementProps !== null && elementProps !== undefined) {
1717-
return getSourceInfoErrorAddendum(elementProps.__source);
1718-
}
1719-
1720-
return "";
1721-
}
1722-
1723-
function getSourceInfoErrorAddendum(source) {
1724-
{
1725-
if (source !== undefined) {
1726-
var fileName = source.fileName.replace(/^.*[\\\/]/, "");
1727-
var lineNumber = source.lineNumber;
1728-
return "\n\nCheck your code at " + fileName + ":" + lineNumber + ".";
1729-
}
1730-
1731-
return "";
1732-
}
1733-
}
17341698
/**
17351699
* Ensure that every element either is passed in a static location, in an
17361700
* array with an explicit keys property defined, or in an object literal
@@ -2836,7 +2800,7 @@ if (__DEV__) {
28362800
console["error"](error);
28372801
};
28382802

2839-
var ReactVersion = "18.3.0-www-modern-915264c7";
2803+
var ReactVersion = "18.3.0-www-modern-c59d517b";
28402804

28412805
// Patch fetch
28422806
var Children = {

0 commit comments

Comments
 (0)