Skip to content

Commit

Permalink
Update error decoder URL (#27240)
Browse files Browse the repository at this point in the history
Updates the error decoder to the URL for the new docs site.

- Switches the domain from reactjs.org to react.dev
- Switches to put the error code in the URL for SSG
- All params are still in the query

Example without args:

- Before: `https://reactjs.org/docs/error-decoder.html?invariant=200`
- After: ` https://react.dev/errors/200`

Example with args:
- Before:
`https://reactjs.org/docs/error-decoder.html?invariant=124?args[]=foo&args[]=bar
`
- After: ` https://react.dev/errors/124?args[]=foo&args[]=bar`

Requires: reactjs/react.dev#6214

---------

Co-authored-by: Jan Kassens <[email protected]>

DiffTrain build for [b300304](b300304)
  • Loading branch information
rickhanlonii committed Jan 18, 2024
1 parent a2531fa commit d703a87
Show file tree
Hide file tree
Showing 15 changed files with 95 additions and 106 deletions.
2 changes: 1 addition & 1 deletion compiled/facebook-www/REVISION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5c607369ceebe56d85175df84b7b6ad58dd25e1f
b3003047101b4c7a643788a8faf576f7e370fb45
2 changes: 1 addition & 1 deletion 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-dd3d212c";
var ReactVersion = "18.3.0-www-classic-b3341fd5";

// ATTENTION
// When adding new symbols to this file,
Expand Down
2 changes: 1 addition & 1 deletion compiled/facebook-www/ReactART-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ if (__DEV__) {
return self;
}

var ReactVersion = "18.3.0-www-modern-dc8082dd";
var ReactVersion = "18.3.0-www-modern-fbd95320";

var LegacyRoot = 0;
var ConcurrentRoot = 1;
Expand Down
17 changes: 8 additions & 9 deletions compiled/facebook-www/ReactART-prod.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,12 @@ function _assertThisInitialized(self) {
}
var assign = Object.assign;
function formatProdErrorMessage(code) {
for (
var url = "https://reactjs.org/docs/error-decoder.html?invariant=" + code,
i = 1;
i < arguments.length;
i++
)
url += "&args[]=" + encodeURIComponent(arguments[i]);
var url = "https://react.dev/errors/" + code;
if (1 < arguments.length) {
url += "?args[]=" + encodeURIComponent(arguments[1]);
for (var i = 2; i < arguments.length; i++)
url += "&args[]=" + encodeURIComponent(arguments[i]);
}
return (
"Minified React error #" +
code +
Expand Down Expand Up @@ -10292,7 +10291,7 @@ var slice = Array.prototype.slice,
return null;
},
bundleType: 0,
version: "18.3.0-www-classic-c9d1dfab",
version: "18.3.0-www-classic-e0871ebb",
rendererPackageName: "react-art"
};
var internals$jscomp$inline_1325 = {
Expand Down Expand Up @@ -10323,7 +10322,7 @@ var internals$jscomp$inline_1325 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-www-classic-c9d1dfab"
reconcilerVersion: "18.3.0-www-classic-e0871ebb"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1326 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
17 changes: 8 additions & 9 deletions compiled/facebook-www/ReactART-prod.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,12 @@ function _assertThisInitialized(self) {
}
var assign = Object.assign;
function formatProdErrorMessage(code) {
for (
var url = "https://reactjs.org/docs/error-decoder.html?invariant=" + code,
i = 1;
i < arguments.length;
i++
)
url += "&args[]=" + encodeURIComponent(arguments[i]);
var url = "https://react.dev/errors/" + code;
if (1 < arguments.length) {
url += "?args[]=" + encodeURIComponent(arguments[1]);
for (var i = 2; i < arguments.length; i++)
url += "&args[]=" + encodeURIComponent(arguments[i]);
}
return (
"Minified React error #" +
code +
Expand Down Expand Up @@ -9958,7 +9957,7 @@ var slice = Array.prototype.slice,
return null;
},
bundleType: 0,
version: "18.3.0-www-modern-31c1a5e7",
version: "18.3.0-www-modern-c36c8f6b",
rendererPackageName: "react-art"
};
var internals$jscomp$inline_1305 = {
Expand Down Expand Up @@ -9989,7 +9988,7 @@ var internals$jscomp$inline_1305 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-www-modern-31c1a5e7"
reconcilerVersion: "18.3.0-www-modern-c36c8f6b"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1306 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
19 changes: 9 additions & 10 deletions compiled/facebook-www/ReactDOM-prod.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,12 @@ var Scheduler = require("scheduler"),
React = require("react"),
assign = Object.assign;
function formatProdErrorMessage(code) {
for (
var url = "https://reactjs.org/docs/error-decoder.html?invariant=" + code,
i = 1;
i < arguments.length;
i++
)
url += "&args[]=" + encodeURIComponent(arguments[i]);
var url = "https://react.dev/errors/" + code;
if (1 < arguments.length) {
url += "?args[]=" + encodeURIComponent(arguments[1]);
for (var i = 2; i < arguments.length; i++)
url += "&args[]=" + encodeURIComponent(arguments[i]);
}
return (
"Minified React error #" +
code +
Expand Down Expand Up @@ -16596,7 +16595,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1799 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-classic-be8e039e",
version: "18.3.0-www-classic-e005a9cc",
rendererPackageName: "react-dom"
};
var internals$jscomp$inline_2145 = {
Expand Down Expand Up @@ -16626,7 +16625,7 @@ var internals$jscomp$inline_2145 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-www-classic-be8e039e"
reconcilerVersion: "18.3.0-www-classic-e005a9cc"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2146 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down Expand Up @@ -16963,4 +16962,4 @@ exports.useFormState = function () {
exports.useFormStatus = function () {
throw Error(formatProdErrorMessage(248));
};
exports.version = "18.3.0-www-classic-be8e039e";
exports.version = "18.3.0-www-classic-e005a9cc";
19 changes: 9 additions & 10 deletions compiled/facebook-www/ReactDOM-prod.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,12 @@ var React = require("react"),
Dispatcher: { current: null }
};
function formatProdErrorMessage(code) {
for (
var url = "https://reactjs.org/docs/error-decoder.html?invariant=" + code,
i = 1;
i < arguments.length;
i++
)
url += "&args[]=" + encodeURIComponent(arguments[i]);
var url = "https://react.dev/errors/" + code;
if (1 < arguments.length) {
url += "?args[]=" + encodeURIComponent(arguments[1]);
for (var i = 2; i < arguments.length; i++)
url += "&args[]=" + encodeURIComponent(arguments[i]);
}
return (
"Minified React error #" +
code +
Expand Down Expand Up @@ -16119,7 +16118,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1758 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-modern-75306c51",
version: "18.3.0-www-modern-0d510968",
rendererPackageName: "react-dom"
};
var internals$jscomp$inline_2109 = {
Expand Down Expand Up @@ -16150,7 +16149,7 @@ var internals$jscomp$inline_2109 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-www-modern-75306c51"
reconcilerVersion: "18.3.0-www-modern-0d510968"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2110 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down Expand Up @@ -16415,4 +16414,4 @@ exports.useFormState = function () {
exports.useFormStatus = function () {
throw Error(formatProdErrorMessage(248));
};
exports.version = "18.3.0-www-modern-75306c51";
exports.version = "18.3.0-www-modern-0d510968";
19 changes: 9 additions & 10 deletions compiled/facebook-www/ReactDOM-profiling.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,12 @@ var Scheduler = require("scheduler"),
React = require("react"),
assign = Object.assign;
function formatProdErrorMessage(code) {
for (
var url = "https://reactjs.org/docs/error-decoder.html?invariant=" + code,
i = 1;
i < arguments.length;
i++
)
url += "&args[]=" + encodeURIComponent(arguments[i]);
var url = "https://react.dev/errors/" + code;
if (1 < arguments.length) {
url += "?args[]=" + encodeURIComponent(arguments[1]);
for (var i = 2; i < arguments.length; i++)
url += "&args[]=" + encodeURIComponent(arguments[i]);
}
return (
"Minified React error #" +
code +
Expand Down Expand Up @@ -17365,7 +17364,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1884 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-classic-3a859445",
version: "18.3.0-www-classic-227fb93d",
rendererPackageName: "react-dom"
};
(function (internals) {
Expand Down Expand Up @@ -17409,7 +17408,7 @@ var devToolsConfig$jscomp$inline_1884 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-www-classic-3a859445"
reconcilerVersion: "18.3.0-www-classic-227fb93d"
});
assign(Internals, {
ReactBrowserEventEmitter: {
Expand Down Expand Up @@ -17733,7 +17732,7 @@ exports.useFormState = function () {
exports.useFormStatus = function () {
throw Error(formatProdErrorMessage(248));
};
exports.version = "18.3.0-www-classic-3a859445";
exports.version = "18.3.0-www-classic-227fb93d";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
19 changes: 9 additions & 10 deletions compiled/facebook-www/ReactDOM-profiling.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,12 @@ var Scheduler = require("scheduler"),
Dispatcher: { current: null }
};
function formatProdErrorMessage(code) {
for (
var url = "https://reactjs.org/docs/error-decoder.html?invariant=" + code,
i = 1;
i < arguments.length;
i++
)
url += "&args[]=" + encodeURIComponent(arguments[i]);
var url = "https://react.dev/errors/" + code;
if (1 < arguments.length) {
url += "?args[]=" + encodeURIComponent(arguments[1]);
for (var i = 2; i < arguments.length; i++)
url += "&args[]=" + encodeURIComponent(arguments[i]);
}
return (
"Minified React error #" +
code +
Expand Down Expand Up @@ -16882,7 +16881,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1843 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-modern-dc8082dd",
version: "18.3.0-www-modern-fbd95320",
rendererPackageName: "react-dom"
};
(function (internals) {
Expand Down Expand Up @@ -16927,7 +16926,7 @@ var devToolsConfig$jscomp$inline_1843 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-www-modern-dc8082dd"
reconcilerVersion: "18.3.0-www-modern-fbd95320"
});
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals;
exports.createPortal = function (children, container) {
Expand Down Expand Up @@ -17179,7 +17178,7 @@ exports.useFormState = function () {
exports.useFormStatus = function () {
throw Error(formatProdErrorMessage(248));
};
exports.version = "18.3.0-www-modern-dc8082dd";
exports.version = "18.3.0-www-modern-fbd95320";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
2 changes: 1 addition & 1 deletion compiled/facebook-www/ReactDOMServer-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ if (__DEV__) {
var React = require("react");
var ReactDOM = require("react-dom");

var ReactVersion = "18.3.0-www-modern-40768a61";
var ReactVersion = "18.3.0-www-modern-ac3cce8e";

// This refers to a WWW module.
var warningWWW = require("warning");
Expand Down
15 changes: 7 additions & 8 deletions compiled/facebook-www/ReactDOMServer-prod.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,12 @@
var React = require("react"),
ReactDOM = require("react-dom");
function formatProdErrorMessage(code) {
for (
var url = "https://reactjs.org/docs/error-decoder.html?invariant=" + code,
i = 1;
i < arguments.length;
i++
)
url += "&args[]=" + encodeURIComponent(arguments[i]);
var url = "https://react.dev/errors/" + code;
if (1 < arguments.length) {
url += "?args[]=" + encodeURIComponent(arguments[1]);
for (var i = 2; i < arguments.length; i++)
url += "&args[]=" + encodeURIComponent(arguments[i]);
}
return (
"Minified React error #" +
code +
Expand Down Expand Up @@ -5680,4 +5679,4 @@ exports.renderToString = function (children, options) {
'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'
);
};
exports.version = "18.3.0-www-classic-82d2cbd5";
exports.version = "18.3.0-www-classic-d74fa614";
15 changes: 7 additions & 8 deletions compiled/facebook-www/ReactDOMServer-prod.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,12 @@
var React = require("react"),
ReactDOM = require("react-dom");
function formatProdErrorMessage(code) {
for (
var url = "https://reactjs.org/docs/error-decoder.html?invariant=" + code,
i = 1;
i < arguments.length;
i++
)
url += "&args[]=" + encodeURIComponent(arguments[i]);
var url = "https://react.dev/errors/" + code;
if (1 < arguments.length) {
url += "?args[]=" + encodeURIComponent(arguments[1]);
for (var i = 2; i < arguments.length; i++)
url += "&args[]=" + encodeURIComponent(arguments[i]);
}
return (
"Minified React error #" +
code +
Expand Down Expand Up @@ -5605,4 +5604,4 @@ exports.renderToString = function (children, options) {
'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'
);
};
exports.version = "18.3.0-www-modern-16cfbd38";
exports.version = "18.3.0-www-modern-15ac7325";
19 changes: 9 additions & 10 deletions compiled/facebook-www/ReactDOMTesting-prod.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,12 @@ var Scheduler = require("scheduler"),
React = require("react"),
assign = Object.assign;
function formatProdErrorMessage(code) {
for (
var url = "https://reactjs.org/docs/error-decoder.html?invariant=" + code,
i = 1;
i < arguments.length;
i++
)
url += "&args[]=" + encodeURIComponent(arguments[i]);
var url = "https://react.dev/errors/" + code;
if (1 < arguments.length) {
url += "?args[]=" + encodeURIComponent(arguments[1]);
for (var i = 2; i < arguments.length; i++)
url += "&args[]=" + encodeURIComponent(arguments[i]);
}
return (
"Minified React error #" +
code +
Expand Down Expand Up @@ -16925,7 +16924,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1828 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-classic-dd3d212c",
version: "18.3.0-www-classic-b3341fd5",
rendererPackageName: "react-dom"
};
var internals$jscomp$inline_2179 = {
Expand Down Expand Up @@ -16955,7 +16954,7 @@ var internals$jscomp$inline_2179 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-www-classic-dd3d212c"
reconcilerVersion: "18.3.0-www-classic-b3341fd5"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2180 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down Expand Up @@ -17443,4 +17442,4 @@ exports.useFormState = function () {
exports.useFormStatus = function () {
throw Error(formatProdErrorMessage(248));
};
exports.version = "18.3.0-www-classic-dd3d212c";
exports.version = "18.3.0-www-classic-b3341fd5";
Loading

0 comments on commit d703a87

Please sign in to comment.