Skip to content

Commit

Permalink
Delete use of source in JSX runtime (#28433)
Browse files Browse the repository at this point in the history
Only remaining place it was being used was in a warning message.

DiffTrain build for [16d3f78](16d3f78)
  • Loading branch information
acdlite committed Feb 23, 2024
1 parent d7e7f6c commit 28fcf2f
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 153 deletions.
20 changes: 0 additions & 20 deletions compiled/facebook-www/JSXDEVRuntime-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -1104,14 +1104,6 @@ if (__DEV__) {
"it's defined in, or you might have mixed up default and named imports.";
}

var sourceInfo = getSourceInfoErrorAddendum(source);

if (sourceInfo) {
info += sourceInfo;
} else {
info += getDeclarationErrorAddendum();
}

var typeString;

if (type === null) {
Expand Down Expand Up @@ -1301,18 +1293,6 @@ if (__DEV__) {
return "";
}
}

function getSourceInfoErrorAddendum(source) {
{
if (source !== undefined) {
var fileName = source.fileName.replace(/^.*[\\\/]/, "");
var lineNumber = source.lineNumber;
return "\n\nCheck your code at " + fileName + ":" + lineNumber + ".";
}

return "";
}
}
/**
* Ensure that every element either is passed in a static location, in an
* array with an explicit keys property defined, or in an object literal
Expand Down
20 changes: 0 additions & 20 deletions compiled/facebook-www/JSXDEVRuntime-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -1104,14 +1104,6 @@ if (__DEV__) {
"it's defined in, or you might have mixed up default and named imports.";
}

var sourceInfo = getSourceInfoErrorAddendum(source);

if (sourceInfo) {
info += sourceInfo;
} else {
info += getDeclarationErrorAddendum();
}

var typeString;

if (type === null) {
Expand Down Expand Up @@ -1301,18 +1293,6 @@ if (__DEV__) {
return "";
}
}

function getSourceInfoErrorAddendum(source) {
{
if (source !== undefined) {
var fileName = source.fileName.replace(/^.*[\\\/]/, "");
var lineNumber = source.lineNumber;
return "\n\nCheck your code at " + fileName + ":" + lineNumber + ".";
}

return "";
}
}
/**
* Ensure that every element either is passed in a static location, in an
* array with an explicit keys property defined, or in an object literal
Expand Down
2 changes: 1 addition & 1 deletion compiled/facebook-www/REVISION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
d579e7748218920331252b0528850943d5e2dd31
16d3f7833d25b1ea026add83dd109601b60f138e
38 changes: 1 addition & 37 deletions compiled/facebook-www/React-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ if (__DEV__) {
) {
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
}
var ReactVersion = "18.3.0-www-classic-7910dce1";
var ReactVersion = "18.3.0-www-classic-bce6b49b";

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

var sourceInfo = getSourceInfoErrorAddendum(source);

if (sourceInfo) {
info += sourceInfo;
} else {
info += getDeclarationErrorAddendum();
}

var typeString;

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

var sourceInfo = getSourceInfoErrorAddendumForProps(config);

if (sourceInfo) {
info += sourceInfo;
} else {
info += getDeclarationErrorAddendum();
}

var typeString;

if (type === null) {
Expand Down Expand Up @@ -2042,26 +2026,6 @@ if (__DEV__) {
return "";
}
}

function getSourceInfoErrorAddendumForProps(elementProps) {
if (elementProps !== null && elementProps !== undefined) {
return getSourceInfoErrorAddendum(elementProps.__source);
}

return "";
}

function getSourceInfoErrorAddendum(source) {
{
if (source !== undefined) {
var fileName = source.fileName.replace(/^.*[\\\/]/, "");
var lineNumber = source.lineNumber;
return "\n\nCheck your code at " + fileName + ":" + lineNumber + ".";
}

return "";
}
}
/**
* Ensure that every element either is passed in a static location, in an
* array with an explicit keys property defined, or in an object literal
Expand Down
38 changes: 1 addition & 37 deletions compiled/facebook-www/React-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ if (__DEV__) {
) {
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
}
var ReactVersion = "18.3.0-www-modern-a1866c69";
var ReactVersion = "18.3.0-www-modern-93c46cbf";

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

var sourceInfo = getSourceInfoErrorAddendum(source);

if (sourceInfo) {
info += sourceInfo;
} else {
info += getDeclarationErrorAddendum();
}

var typeString;

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

var sourceInfo = getSourceInfoErrorAddendumForProps(config);

if (sourceInfo) {
info += sourceInfo;
} else {
info += getDeclarationErrorAddendum();
}

var typeString;

if (type === null) {
Expand Down Expand Up @@ -1998,26 +1982,6 @@ if (__DEV__) {
return "";
}
}

function getSourceInfoErrorAddendumForProps(elementProps) {
if (elementProps !== null && elementProps !== undefined) {
return getSourceInfoErrorAddendum(elementProps.__source);
}

return "";
}

function getSourceInfoErrorAddendum(source) {
{
if (source !== undefined) {
var fileName = source.fileName.replace(/^.*[\\\/]/, "");
var lineNumber = source.lineNumber;
return "\n\nCheck your code at " + fileName + ":" + lineNumber + ".";
}

return "";
}
}
/**
* Ensure that every element either is passed in a static location, in an
* array with an explicit keys property defined, or in an object literal
Expand Down
2 changes: 1 addition & 1 deletion compiled/facebook-www/React-prod.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -625,4 +625,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactCurrentDispatcher.current.useTransition();
};
exports.version = "18.3.0-www-modern-9a917e2a";
exports.version = "18.3.0-www-modern-9b3a58e1";
38 changes: 1 addition & 37 deletions compiled/facebook-www/ReactServer-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -1222,14 +1222,6 @@ if (__DEV__) {
"it's defined in, or you might have mixed up default and named imports.";
}

var sourceInfo = getSourceInfoErrorAddendum(source);

if (sourceInfo) {
info += sourceInfo;
} else {
info += getDeclarationErrorAddendum();
}

var typeString;

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

var sourceInfo = getSourceInfoErrorAddendumForProps(config);

if (sourceInfo) {
info += sourceInfo;
} else {
info += getDeclarationErrorAddendum();
}

var typeString;

if (type === null) {
Expand Down Expand Up @@ -1711,26 +1695,6 @@ if (__DEV__) {
return "";
}
}

function getSourceInfoErrorAddendumForProps(elementProps) {
if (elementProps !== null && elementProps !== undefined) {
return getSourceInfoErrorAddendum(elementProps.__source);
}

return "";
}

function getSourceInfoErrorAddendum(source) {
{
if (source !== undefined) {
var fileName = source.fileName.replace(/^.*[\\\/]/, "");
var lineNumber = source.lineNumber;
return "\n\nCheck your code at " + fileName + ":" + lineNumber + ".";
}

return "";
}
}
/**
* Ensure that every element either is passed in a static location, in an
* array with an explicit keys property defined, or in an object literal
Expand Down Expand Up @@ -2836,7 +2800,7 @@ if (__DEV__) {
console["error"](error);
};

var ReactVersion = "18.3.0-www-modern-915264c7";
var ReactVersion = "18.3.0-www-modern-c59d517b";

// Patch fetch
var Children = {
Expand Down

0 comments on commit 28fcf2f

Please sign in to comment.