From 2849c6b5623b9675d4d79a5109632ecbd2ec3271 Mon Sep 17 00:00:00 2001 From: Michel Weststrate Date: Mon, 8 Nov 2021 04:35:03 -0800 Subject: [PATCH] Fix emotion patch issue for 11.5 Summary: Fixed the patch of emotion/cache, which should fix failing master builds Reviewed By: lblasa Differential Revision: D32244641 fbshipit-source-id: becde569aa712f36ea63af6ce130aceff5807610 --- desktop/patches/@emotion+cache+11.4.0.patch | 13 -------- desktop/patches/@emotion+cache+11.5.0.patch | 36 +++++++++++++++++++++ 2 files changed, 36 insertions(+), 13 deletions(-) delete mode 100644 desktop/patches/@emotion+cache+11.4.0.patch create mode 100644 desktop/patches/@emotion+cache+11.5.0.patch diff --git a/desktop/patches/@emotion+cache+11.4.0.patch b/desktop/patches/@emotion+cache+11.4.0.patch deleted file mode 100644 index 2682cc5d3..000000000 --- a/desktop/patches/@emotion+cache+11.4.0.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/node_modules/@emotion/cache/dist/emotion-cache.cjs.dev.js b/node_modules/@emotion/cache/dist/emotion-cache.cjs.dev.js -index 5aae7dd..0f3e4c9 100644 ---- a/node_modules/@emotion/cache/dist/emotion-cache.cjs.dev.js -+++ b/node_modules/@emotion/cache/dist/emotion-cache.cjs.dev.js -@@ -136,7 +136,7 @@ var createUnsafeSelectorsAlarm = function createUnsafeSelectorsAlarm(cache) { - } - - 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\"."); -+// we're not doing SSR and not interested in pedantic errors: console.error("The pseudo class \"" + unsafePseudoClass + "\" is potentially unsafe when doing server-side rendering. Try changing it to \"" + unsafePseudoClass.split('-child')[0] + "-of-type\"."); - }); - } - }; diff --git a/desktop/patches/@emotion+cache+11.5.0.patch b/desktop/patches/@emotion+cache+11.5.0.patch new file mode 100644 index 000000000..c77129dd9 --- /dev/null +++ b/desktop/patches/@emotion+cache+11.5.0.patch @@ -0,0 +1,36 @@ +diff --git a/node_modules/@emotion/cache/dist/emotion-cache.cjs.dev.js b/node_modules/@emotion/cache/dist/emotion-cache.cjs.dev.js +index 9a906b4..57f9d9d 100644 +--- a/node_modules/@emotion/cache/dist/emotion-cache.cjs.dev.js ++++ b/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\"."); +- }); ++ // we're not doing SSR and not interested in pedantic errors ++ // 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\"."); ++ // }); + } + }; + }; +diff --git a/node_modules/@emotion/cache/dist/emotion-cache.esm.js b/node_modules/@emotion/cache/dist/emotion-cache.esm.js +index 5e5fa89..781c69a 100644 +--- a/node_modules/@emotion/cache/dist/emotion-cache.esm.js ++++ b/node_modules/@emotion/cache/dist/emotion-cache.esm.js +@@ -149,9 +149,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\"."); +- }); ++ // we're not doing SSR and not interested in pedantic errors ++ // 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\"."); ++ // }); + } + }; + };