-
Notifications
You must be signed in to change notification settings - Fork 956
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove deprecation warning for 2 antd components
Summary: There warnings are not actionable and pollute test output. Lets comment these out * antd about deprecated component api (removes ~7k lines) * react-dom about mounting app (removes ~2.5k lines) * a few flipper logs that are commonly used during many test startup (~500 lines) Number of lines that is outputed by `yarn run test` ``` Before: 10139 After: 1065 ``` **New output** {P1486339650} There are still some console logs that are present in the output which are less common. The reason I didn't add process.env.NODE_ENV check in our logger itself is that then people won't be able to use console.XXX methods in tests to inspect values which would be a nightmare to debug. Reviewed By: lblasa Differential Revision: D59962243 fbshipit-source-id: d8096b21deeff555d0025dd1e8814b745283a55c
- Loading branch information
1 parent
5ff667a
commit 2e4e3cc
Showing
5 changed files
with
72 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
desktop/patches/react-dom+0.0.0-experimental-14c2be8da-20220304.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
diff --git a/node_modules/react-dom/cjs/react-dom.development.js b/node_modules/react-dom/cjs/react-dom.development.js | ||
index ae216b2..02c457f 100644 | ||
--- a/node_modules/react-dom/cjs/react-dom.development.js | ||
+++ b/node_modules/react-dom/cjs/react-dom.development.js | ||
@@ -83,7 +83,9 @@ function printWarning(level, format, args) { | ||
// breaks IE9: https://github.com/facebook/react/issues/13610 | ||
// eslint-disable-next-line react-internal/no-production-logging | ||
|
||
- Function.prototype.apply.call(console[level], console, argsWithFormat); | ||
+ if (process.env.NODE_ENV !== "test") { | ||
+ Function.prototype.apply.call(console[level], console, argsWithFormat); | ||
+ } | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters