Files
flipper/desktop/patches/@emotion+react++@emotion+cache+11.6.0.patch
Michel Weststrate 35c482ac92 Fix emotion cache output garbage in unit tests
Summary:
emotion/cache started generating nonsense warnings about SSR again when running unit tests. This is because atm emotion/cache is 3(!) times in our dep tree, and the wrong one got patched. Tried to dedupe that, but it seems inevitable:

- emotion/react requires v. 11.6.0 of it
- emotion/css requires v. 11.5.0 because a newer version of that package hasn't been released
- console-feed still uses emotion 10.

So instead, just added an other patch

Reviewed By: passy

Differential Revision: D32557413

fbshipit-source-id: 8a61a8065d21123453b3345b25ff87a9865094ed
2021-11-19 04:01:02 -08:00

19 lines
1.1 KiB
Diff

diff --git a/node_modules/@emotion/react/node_modules/@emotion/cache/dist/emotion-cache.cjs.dev.js b/node_modules/@emotion/react/node_modules/@emotion/cache/dist/emotion-cache.cjs.dev.js
index b1ad6ac..e577f28 100644
--- a/node_modules/@emotion/react/node_modules/@emotion/cache/dist/emotion-cache.cjs.dev.js
+++ b/node_modules/@emotion/react/node_modules/@emotion/cache/dist/emotion-cache.cjs.dev.js
@@ -158,9 +158,10 @@ var createUnsafeSelectorsAlarm = function createUnsafeSelectorsAlarm(cache) {
return;
}
- unsafePseudoClasses.forEach(function (unsafePseudoClass) {
- console.error("The pseudo class \"" + unsafePseudoClass + "\" is potentially unsafe when doing server-side rendering. Try changing it to \"" + unsafePseudoClass.split('-child')[0] + "-of-type\".");
- });
+ // messes up unit tests, and we don't do SSR!
+ // unsafePseudoClasses.forEach(function (unsafePseudoClass) {
+ // console.error("The pseudo class \"" + unsafePseudoClass + "\" is potentially unsafe when doing server-side rendering. Try changing it to \"" + unsafePseudoClass.split('-child')[0] + "-of-type\".");
+ // });
}
};
};