Fix: error messages (#27523)

<!--
  Thanks for submitting a pull request!
We appreciate you spending the time to work on these changes. Please
provide enough information so that others can review your pull request.
The three fields below are mandatory.

Before submitting a pull request, please make sure the following is
done:

1. Fork [the repository](https://github.com/facebook/react) and create
your branch from `main`.
  2. Run `yarn` in the repository root.
3. If you've fixed a bug or added code that should be tested, add tests!
4. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch
TestName` is helpful in development.
5. Run `yarn test --prod` to test in the production environment. It
supports the same options as `yarn test`.
6. If you need a debugger, run `yarn test --debug --watch TestName`,
open `chrome://inspect`, and press "Inspect".
7. Format your code with
[prettier](https://github.com/prettier/prettier) (`yarn prettier`).
8. Make sure your code lints (`yarn lint`). Tip: `yarn linc` to only
check changed files.
  9. Run the [Flow](https://flowtype.org/) type checks (`yarn flow`).
  10. If you haven't already, complete the CLA.

Learn more about contributing:
https://reactjs.org/docs/how-to-contribute.html
-->

## Summary
Changes `before before` to `before` in error messages.

<!--
Explain the **motivation** for making this change. What existing problem
does the pull request solve?
-->
I want to improve error logs

## How did you test this change?

<!--
Demonstrate the code is solid. Example: The exact commands you ran and
their output, screenshots / videos if the pull request changes the user
interface.
How exactly did you verify that your PR solves the issue you wanted to
solve?
  If you leave this empty, your PR will very likely be closed.
-->

DiffTrain build for [67cc9ba878](https://github.com/facebook/react/commit/67cc9ba8789335b9da0838a446137c1be62adbcd)
This commit is contained in:
hoxyq
2023-10-16 14:10:35 +00:00
parent 40c111874f
commit 1cb4186646
20 changed files with 65 additions and 65 deletions
@@ -788,7 +788,7 @@ function checkKeyStringCoercion(value) {
if (willCoercionThrow(value)) {
error(
"The provided key is an unsupported type %s." +
" This value must be coerced to a string before before using it here.",
" This value must be coerced to a string before using it here.",
typeName(value)
);
@@ -788,7 +788,7 @@ function checkKeyStringCoercion(value) {
if (willCoercionThrow(value)) {
error(
"The provided key is an unsupported type %s." +
" This value must be coerced to a string before before using it here.",
" This value must be coerced to a string before using it here.",
typeName(value)
);
+1 -1
View File
@@ -1 +1 @@
309c8ad9688c491e5b17beb07ab01d65594914ce
67cc9ba8789335b9da0838a446137c1be62adbcd
+2 -2
View File
@@ -27,7 +27,7 @@ if (
}
"use strict";
var ReactVersion = "18.3.0-www-classic-fe25c3f7";
var ReactVersion = "18.3.0-www-classic-b6ac59ca";
// ATTENTION
// When adding new symbols to this file,
@@ -460,7 +460,7 @@ function checkKeyStringCoercion(value) {
if (willCoercionThrow(value)) {
error(
"The provided key is an unsupported type %s." +
" This value must be coerced to a string before before using it here.",
" This value must be coerced to a string before using it here.",
typeName(value)
);
+2 -2
View File
@@ -27,7 +27,7 @@ if (
}
"use strict";
var ReactVersion = "18.3.0-www-modern-872bdfba";
var ReactVersion = "18.3.0-www-modern-8a5fff1f";
// ATTENTION
// When adding new symbols to this file,
@@ -460,7 +460,7 @@ function checkKeyStringCoercion(value) {
if (willCoercionThrow(value)) {
error(
"The provided key is an unsupported type %s." +
" This value must be coerced to a string before before using it here.",
" This value must be coerced to a string before using it here.",
typeName(value)
);
+1 -1
View File
@@ -587,4 +587,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactCurrentDispatcher.current.useTransition();
};
exports.version = "18.3.0-www-classic-c9d845f9";
exports.version = "18.3.0-www-classic-1a677f82";
+1 -1
View File
@@ -579,4 +579,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactCurrentDispatcher.current.useTransition();
};
exports.version = "18.3.0-www-modern-5f20e279";
exports.version = "18.3.0-www-modern-a28e1532";
@@ -69,7 +69,7 @@ function _assertThisInitialized(self) {
return self;
}
var ReactVersion = "18.3.0-www-classic-69d5173c";
var ReactVersion = "18.3.0-www-classic-4668f682";
var LegacyRoot = 0;
var ConcurrentRoot = 1;
@@ -5340,7 +5340,7 @@ function checkPropStringCoercion(value, propName) {
if (willCoercionThrow(value)) {
error(
"The provided `%s` prop is an unsupported type %s." +
" This value must be coerced to a string before before using it here.",
" This value must be coerced to a string before using it here.",
propName,
typeName(value)
);
+2 -2
View File
@@ -69,7 +69,7 @@ function _assertThisInitialized(self) {
return self;
}
var ReactVersion = "18.3.0-www-modern-9f677f37";
var ReactVersion = "18.3.0-www-modern-e16a234e";
var LegacyRoot = 0;
var ConcurrentRoot = 1;
@@ -5096,7 +5096,7 @@ function checkPropStringCoercion(value, propName) {
if (willCoercionThrow(value)) {
error(
"The provided `%s` prop is an unsupported type %s." +
" This value must be coerced to a string before before using it here.",
" This value must be coerced to a string before using it here.",
propName,
typeName(value)
);
@@ -2776,7 +2776,7 @@ function checkAttributeStringCoercion(value, attributeName) {
if (willCoercionThrow(value)) {
error(
"The provided `%s` attribute is an unsupported type %s." +
" This value must be coerced to a string before before using it here.",
" This value must be coerced to a string before using it here.",
attributeName,
typeName(value)
);
@@ -2790,7 +2790,7 @@ function checkKeyStringCoercion(value) {
if (willCoercionThrow(value)) {
error(
"The provided key is an unsupported type %s." +
" This value must be coerced to a string before before using it here.",
" This value must be coerced to a string before using it here.",
typeName(value)
);
@@ -2803,7 +2803,7 @@ function checkPropStringCoercion(value, propName) {
if (willCoercionThrow(value)) {
error(
"The provided `%s` prop is an unsupported type %s." +
" This value must be coerced to a string before before using it here.",
" This value must be coerced to a string before using it here.",
propName,
typeName(value)
);
@@ -2817,7 +2817,7 @@ function checkCSSPropertyStringCoercion(value, propName) {
if (willCoercionThrow(value)) {
error(
"The provided `%s` CSS property is an unsupported type %s." +
" This value must be coerced to a string before before using it here.",
" This value must be coerced to a string before using it here.",
propName,
typeName(value)
);
@@ -2831,7 +2831,7 @@ function checkHtmlStringCoercion(value) {
if (willCoercionThrow(value)) {
error(
"The provided HTML markup uses a value of unsupported type %s." +
" This value must be coerced to a string before before using it here.",
" This value must be coerced to a string before using it here.",
typeName(value)
);
@@ -2845,7 +2845,7 @@ function checkFormFieldValueStringCoercion(value) {
error(
"Form field values (value, checked, defaultValue, or defaultChecked props)" +
" must be strings, not %s." +
" This value must be coerced to a string before before using it here.",
" This value must be coerced to a string before using it here.",
typeName(value)
);
@@ -34071,7 +34071,7 @@ function createFiberRoot(
return root;
}
var ReactVersion = "18.3.0-www-classic-fd47809d";
var ReactVersion = "18.3.0-www-classic-9360aec2";
function createPortal$1(
children,
+7 -7
View File
@@ -2133,7 +2133,7 @@ function checkAttributeStringCoercion(value, attributeName) {
if (willCoercionThrow(value)) {
error(
"The provided `%s` attribute is an unsupported type %s." +
" This value must be coerced to a string before before using it here.",
" This value must be coerced to a string before using it here.",
attributeName,
typeName(value)
);
@@ -2147,7 +2147,7 @@ function checkKeyStringCoercion(value) {
if (willCoercionThrow(value)) {
error(
"The provided key is an unsupported type %s." +
" This value must be coerced to a string before before using it here.",
" This value must be coerced to a string before using it here.",
typeName(value)
);
@@ -2160,7 +2160,7 @@ function checkPropStringCoercion(value, propName) {
if (willCoercionThrow(value)) {
error(
"The provided `%s` prop is an unsupported type %s." +
" This value must be coerced to a string before before using it here.",
" This value must be coerced to a string before using it here.",
propName,
typeName(value)
);
@@ -2174,7 +2174,7 @@ function checkCSSPropertyStringCoercion(value, propName) {
if (willCoercionThrow(value)) {
error(
"The provided `%s` CSS property is an unsupported type %s." +
" This value must be coerced to a string before before using it here.",
" This value must be coerced to a string before using it here.",
propName,
typeName(value)
);
@@ -2188,7 +2188,7 @@ function checkHtmlStringCoercion(value) {
if (willCoercionThrow(value)) {
error(
"The provided HTML markup uses a value of unsupported type %s." +
" This value must be coerced to a string before before using it here.",
" This value must be coerced to a string before using it here.",
typeName(value)
);
@@ -2202,7 +2202,7 @@ function checkFormFieldValueStringCoercion(value) {
error(
"Form field values (value, checked, defaultValue, or defaultChecked props)" +
" must be strings, not %s." +
" This value must be coerced to a string before before using it here.",
" This value must be coerced to a string before using it here.",
typeName(value)
);
@@ -33916,7 +33916,7 @@ function createFiberRoot(
return root;
}
var ReactVersion = "18.3.0-www-modern-527c0eab";
var ReactVersion = "18.3.0-www-modern-a17326c6";
function createPortal$1(
children,
@@ -19,7 +19,7 @@ if (__DEV__) {
var React = require("react");
var ReactDOM = require("react-dom");
var ReactVersion = "18.3.0-www-classic-d0c392db";
var ReactVersion = "18.3.0-www-classic-c2fb22b9";
// This refers to a WWW module.
var warningWWW = require("warning");
@@ -286,7 +286,7 @@ function checkAttributeStringCoercion(value, attributeName) {
if (willCoercionThrow(value)) {
error(
"The provided `%s` attribute is an unsupported type %s." +
" This value must be coerced to a string before before using it here.",
" This value must be coerced to a string before using it here.",
attributeName,
typeName(value)
);
@@ -300,7 +300,7 @@ function checkCSSPropertyStringCoercion(value, propName) {
if (willCoercionThrow(value)) {
error(
"The provided `%s` CSS property is an unsupported type %s." +
" This value must be coerced to a string before before using it here.",
" This value must be coerced to a string before using it here.",
propName,
typeName(value)
);
@@ -314,7 +314,7 @@ function checkHtmlStringCoercion(value) {
if (willCoercionThrow(value)) {
error(
"The provided HTML markup uses a value of unsupported type %s." +
" This value must be coerced to a string before before using it here.",
" This value must be coerced to a string before using it here.",
typeName(value)
);
@@ -19,7 +19,7 @@ if (__DEV__) {
var React = require("react");
var ReactDOM = require("react-dom");
var ReactVersion = "18.3.0-www-modern-9f677f37";
var ReactVersion = "18.3.0-www-modern-e16a234e";
// This refers to a WWW module.
var warningWWW = require("warning");
@@ -286,7 +286,7 @@ function checkAttributeStringCoercion(value, attributeName) {
if (willCoercionThrow(value)) {
error(
"The provided `%s` attribute is an unsupported type %s." +
" This value must be coerced to a string before before using it here.",
" This value must be coerced to a string before using it here.",
attributeName,
typeName(value)
);
@@ -300,7 +300,7 @@ function checkCSSPropertyStringCoercion(value, propName) {
if (willCoercionThrow(value)) {
error(
"The provided `%s` CSS property is an unsupported type %s." +
" This value must be coerced to a string before before using it here.",
" This value must be coerced to a string before using it here.",
propName,
typeName(value)
);
@@ -314,7 +314,7 @@ function checkHtmlStringCoercion(value) {
if (willCoercionThrow(value)) {
error(
"The provided HTML markup uses a value of unsupported type %s." +
" This value must be coerced to a string before before using it here.",
" This value must be coerced to a string before using it here.",
typeName(value)
);
@@ -283,7 +283,7 @@ function checkAttributeStringCoercion(value, attributeName) {
if (willCoercionThrow(value)) {
error(
"The provided `%s` attribute is an unsupported type %s." +
" This value must be coerced to a string before before using it here.",
" This value must be coerced to a string before using it here.",
attributeName,
typeName(value)
);
@@ -297,7 +297,7 @@ function checkCSSPropertyStringCoercion(value, propName) {
if (willCoercionThrow(value)) {
error(
"The provided `%s` CSS property is an unsupported type %s." +
" This value must be coerced to a string before before using it here.",
" This value must be coerced to a string before using it here.",
propName,
typeName(value)
);
@@ -311,7 +311,7 @@ function checkHtmlStringCoercion(value) {
if (willCoercionThrow(value)) {
error(
"The provided HTML markup uses a value of unsupported type %s." +
" This value must be coerced to a string before before using it here.",
" This value must be coerced to a string before using it here.",
typeName(value)
);
@@ -2765,7 +2765,7 @@ function checkAttributeStringCoercion(value, attributeName) {
if (willCoercionThrow(value)) {
error(
"The provided `%s` attribute is an unsupported type %s." +
" This value must be coerced to a string before before using it here.",
" This value must be coerced to a string before using it here.",
attributeName,
typeName(value)
);
@@ -2779,7 +2779,7 @@ function checkKeyStringCoercion(value) {
if (willCoercionThrow(value)) {
error(
"The provided key is an unsupported type %s." +
" This value must be coerced to a string before before using it here.",
" This value must be coerced to a string before using it here.",
typeName(value)
);
@@ -2792,7 +2792,7 @@ function checkPropStringCoercion(value, propName) {
if (willCoercionThrow(value)) {
error(
"The provided `%s` prop is an unsupported type %s." +
" This value must be coerced to a string before before using it here.",
" This value must be coerced to a string before using it here.",
propName,
typeName(value)
);
@@ -2806,7 +2806,7 @@ function checkCSSPropertyStringCoercion(value, propName) {
if (willCoercionThrow(value)) {
error(
"The provided `%s` CSS property is an unsupported type %s." +
" This value must be coerced to a string before before using it here.",
" This value must be coerced to a string before using it here.",
propName,
typeName(value)
);
@@ -2820,7 +2820,7 @@ function checkHtmlStringCoercion(value) {
if (willCoercionThrow(value)) {
error(
"The provided HTML markup uses a value of unsupported type %s." +
" This value must be coerced to a string before before using it here.",
" This value must be coerced to a string before using it here.",
typeName(value)
);
@@ -2834,7 +2834,7 @@ function checkFormFieldValueStringCoercion(value) {
error(
"Form field values (value, checked, defaultValue, or defaultChecked props)" +
" must be strings, not %s." +
" This value must be coerced to a string before before using it here.",
" This value must be coerced to a string before using it here.",
typeName(value)
);
@@ -34688,7 +34688,7 @@ function createFiberRoot(
return root;
}
var ReactVersion = "18.3.0-www-classic-be3ff502";
var ReactVersion = "18.3.0-www-classic-ef12d11d";
function createPortal$1(
children,
@@ -2122,7 +2122,7 @@ function checkAttributeStringCoercion(value, attributeName) {
if (willCoercionThrow(value)) {
error(
"The provided `%s` attribute is an unsupported type %s." +
" This value must be coerced to a string before before using it here.",
" This value must be coerced to a string before using it here.",
attributeName,
typeName(value)
);
@@ -2136,7 +2136,7 @@ function checkKeyStringCoercion(value) {
if (willCoercionThrow(value)) {
error(
"The provided key is an unsupported type %s." +
" This value must be coerced to a string before before using it here.",
" This value must be coerced to a string before using it here.",
typeName(value)
);
@@ -2149,7 +2149,7 @@ function checkPropStringCoercion(value, propName) {
if (willCoercionThrow(value)) {
error(
"The provided `%s` prop is an unsupported type %s." +
" This value must be coerced to a string before before using it here.",
" This value must be coerced to a string before using it here.",
propName,
typeName(value)
);
@@ -2163,7 +2163,7 @@ function checkCSSPropertyStringCoercion(value, propName) {
if (willCoercionThrow(value)) {
error(
"The provided `%s` CSS property is an unsupported type %s." +
" This value must be coerced to a string before before using it here.",
" This value must be coerced to a string before using it here.",
propName,
typeName(value)
);
@@ -2177,7 +2177,7 @@ function checkHtmlStringCoercion(value) {
if (willCoercionThrow(value)) {
error(
"The provided HTML markup uses a value of unsupported type %s." +
" This value must be coerced to a string before before using it here.",
" This value must be coerced to a string before using it here.",
typeName(value)
);
@@ -2191,7 +2191,7 @@ function checkFormFieldValueStringCoercion(value) {
error(
"Form field values (value, checked, defaultValue, or defaultChecked props)" +
" must be strings, not %s." +
" This value must be coerced to a string before before using it here.",
" This value must be coerced to a string before using it here.",
typeName(value)
);
@@ -34533,7 +34533,7 @@ function createFiberRoot(
return root;
}
var ReactVersion = "18.3.0-www-modern-5f20e279";
var ReactVersion = "18.3.0-www-modern-a28e1532";
function createPortal$1(
children,
@@ -16734,7 +16734,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1821 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-classic-fe25c3f7",
version: "18.3.0-www-classic-b6ac59ca",
rendererPackageName: "react-dom"
};
var internals$jscomp$inline_2172 = {
@@ -16764,7 +16764,7 @@ var internals$jscomp$inline_2172 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-www-classic-fe25c3f7"
reconcilerVersion: "18.3.0-www-classic-b6ac59ca"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2173 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -17252,4 +17252,4 @@ exports.useFormState = function () {
exports.useFormStatus = function () {
throw Error(formatProdErrorMessage(248));
};
exports.version = "18.3.0-www-classic-fe25c3f7";
exports.version = "18.3.0-www-classic-b6ac59ca";
@@ -4354,7 +4354,7 @@ function checkPropStringCoercion(value, propName) {
if (willCoercionThrow(value)) {
error(
"The provided `%s` prop is an unsupported type %s." +
" This value must be coerced to a string before before using it here.",
" This value must be coerced to a string before using it here.",
propName,
typeName(value)
);
@@ -25183,7 +25183,7 @@ function createFiberRoot(
return root;
}
var ReactVersion = "18.3.0-www-classic-c9d845f9";
var ReactVersion = "18.3.0-www-classic-1a677f82";
// Might add PROFILE later.
@@ -4354,7 +4354,7 @@ function checkPropStringCoercion(value, propName) {
if (willCoercionThrow(value)) {
error(
"The provided `%s` prop is an unsupported type %s." +
" This value must be coerced to a string before before using it here.",
" This value must be coerced to a string before using it here.",
propName,
typeName(value)
);
@@ -25183,7 +25183,7 @@ function createFiberRoot(
return root;
}
var ReactVersion = "18.3.0-www-modern-aa0a4d63";
var ReactVersion = "18.3.0-www-modern-a3e56735";
// Might add PROFILE later.
+6 -6
View File
@@ -163,7 +163,7 @@
"Extra attributes from the server: %s"
"Factory.type is deprecated. Access the class directly before passing it to createFactory."
"Failed %s type: %s"
"Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before before using it here."
"Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before using it here."
"Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?%s"
"Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render. Or maybe you meant to call this function rather than return it."
"Hooks are not supported inside an async component. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server."
@@ -283,11 +283,11 @@
"The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://reactjs.org/link/react-devtools"
"The main 'use-sync-external-store' entry point is not supported; all it does is re-export useSyncExternalStore from the 'react' package, so it only works with React 18+.\n\nIf you wish to support React 16 and 17, import from 'use-sync-external-store/shim' instead. It will fall back to a shimmed implementation when the native one is not available.\n\nIf you only support React 18+, you can import directly from 'react'."
"The parent context is not the expected context. This is probably a bug in React."
"The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before before using it here."
"The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before before using it here."
"The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before before using it here."
"The provided `%s` prop is an unsupported type %s. This value must be coerced to a string before before using it here."
"The provided key is an unsupported type %s. This value must be coerced to a string before before using it here."
"The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before using it here."
"The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before using it here."
"The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before using it here."
"The provided `%s` prop is an unsupported type %s. This value must be coerced to a string before using it here."
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here."
"The result of getServerSnapshot should be cached to avoid an infinite loop"
"The result of getSnapshot should be cached to avoid an infinite loop"
"The seed argument is not enabled outside experimental channels."