π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[web] Add workaround for dup emotion used by react-select
Manav Rathi3cc1f3e9d7ed
diff --git a/web/docs/dependencies.md b/web/docs/dependencies.mdindex 57d251f347..7451f802bb 100644--- a/web/docs/dependencies.md+++ b/web/docs/dependencies.md@@ -97,6 +97,11 @@ MUI uses [Emotion](https://emotion.sh/) as its preferred CSS-in-JS library, forwhich we need to install install two Emotion packages (`@emotion/react` and`@emotion/styled`) as peer dependencies.+We need to pin the emotion version (using the "resolutions" field in+`package.json`) to those used by MUI since react-select (another package we use)+specify a different emotion version directly instead of as a peer dependency,+and we end up with two emotions at runtime otherwise.+We also use MUI's[@mui/material-icons](https://mui.com/material-ui/material-icons/) package,which provides Material icons exported as React components (a `SvgIcon`).diff --git a/web/package.json b/web/package.jsonindex 1e8b777ad9..3e47fb45d7 100644--- a/web/package.json+++ b/web/package.json@@ -32,6 +32,10 @@"preview:photos": "yarn build:photos && python3 -m http.server -d apps/photos/out 3000","preview:staff": "yarn workspace staff preview"},+ "resolutions": {+ "@emotion/cache": "11.11.0",+ "@emotion/react": "11.11.3"+ },"devDependencies": {"concurrently": "^8.2.2","eslint": "^8",diff --git a/web/yarn.lock b/web/yarn.lockindex 4fcd2a48e1..4a981acdf0 100644--- a/web/yarn.lock+++ b/web/yarn.lock@@ -267,24 +267,7 @@source-map "^0.5.7"stylis "4.2.0"-"@emotion/babel-plugin@^11.12.0":- version "11.12.0"- resolved "https://registry.yarnpkg.com/@emotion/babel-plugin/-/babel-plugin-11.12.0.tgz#7b43debb250c313101b3f885eba634f1d723fcc2"- integrity sha512-y2WQb+oP8Jqvvclh8Q55gLUyb7UFvgv7eJfsj7td5TToBrIUtPay2kMrZi4xjq9qw2vD0ZR5fSho0yqoFgX7Rw==- dependencies:- "@babel/helper-module-imports" "^7.16.7"- "@babel/runtime" "^7.18.3"- "@emotion/hash" "^0.9.2"- "@emotion/memoize" "^0.9.0"- "@emotion/serialize" "^1.2.0"- babel-plugin-macros "^3.1.0"- convert-source-map "^1.5.0"- escape-string-regexp "^4.0.0"- find-root "^1.1.0"- source-map "^0.5.7"- stylis "4.2.0"--"@emotion/cache@^11.11.0", "@emotion/cache@^11.4.0":+"@emotion/[email protected]", "@emotion/cache@^11.11.0", "@emotion/cache@^11.4.0":version "11.11.0"resolved "https://registry.yarnpkg.com/@emotion/cache/-/cache-11.11.0.tgz#809b33ee6b1cb1a625fef7a45bc568ccd9b8f3ff"integrity sha512-P34z9ssTCBi3e9EI1ZsWpNHcfY1r09ZO0rZbRO2ob3ZQMnFI35jB536qoXbkdesr5EUhYi22anuEJuyxifaqAQ==@@ -295,27 +278,11 @@"@emotion/weak-memoize" "^0.3.1"stylis "4.2.0"-"@emotion/cache@^11.13.0":- version "11.13.1"- resolved "https://registry.yarnpkg.com/@emotion/cache/-/cache-11.13.1.tgz#fecfc54d51810beebf05bf2a161271a1a91895d7"- integrity sha512-iqouYkuEblRcXmylXIwwOodiEK5Ifl7JcX7o6V4jI3iW4mLXX3dmt5xwBtIkJiQEXFAI+pC8X0i67yiPkH9Ucw==- dependencies:- "@emotion/memoize" "^0.9.0"- "@emotion/sheet" "^1.4.0"- "@emotion/utils" "^1.4.0"- "@emotion/weak-memoize" "^0.4.0"- stylis "4.2.0"-"@emotion/hash@^0.9.1":version "0.9.1"resolved "https://registry.yarnpkg.com/@emotion/hash/-/hash-0.9.1.tgz#4ffb0055f7ef676ebc3a5a91fb621393294e2f43"integrity sha512-gJB6HLm5rYwSLI6PQa+X1t5CFGrv1J1TWG+sOyMCeKz2ojaj6Fnl/rZEspogG+cvqbt4AE/2eIyD2QfLKTBNlQ==-"@emotion/hash@^0.9.2":- version "0.9.2"- resolved "https://registry.yarnpkg.com/@emotion/hash/-/hash-0.9.2.tgz#ff9221b9f58b4dfe61e619a7788734bd63f6898b"- integrity sha512-MyqliTZGuOm3+5ZRSaaBGP3USLw6+EGykkwZns2EPC5g8jJ4z9OrdZY9apkl3+UP9+sdz76YYkwCKP5gh8iY3g==-"@emotion/is-prop-valid@^1.2.2":version "1.2.2"resolved "https://registry.yarnpkg.com/@emotion/is-prop-valid/-/is-prop-valid-1.2.2.tgz#d4175076679c6a26faa92b03bb786f9e52612337"@@ -328,12 +295,7 @@resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.8.1.tgz#c1ddb040429c6d21d38cc945fe75c818cfb68e17"integrity sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA==-"@emotion/memoize@^0.9.0":- version "0.9.0"- resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.9.0.tgz#745969d649977776b43fc7648c556aaa462b4102"- integrity sha512-30FAj7/EoJ5mwVPOWhAyCX+FPfMDrVecJAM+Iw9NRoSl4BBAQeqj4cApHHUXOVvIPgLVDsCFoz/hGD+5QQD1GQ==--"@emotion/[email protected]":+"@emotion/[email protected]", "@emotion/react@^11.8.1":version "11.11.3"resolved "https://registry.yarnpkg.com/@emotion/react/-/react-11.11.3.tgz#96b855dc40a2a55f52a72f518a41db4f69c31a25"integrity sha512-Cnn0kuq4DoONOMcnoVsTOR8E+AdnKFf//6kUWc4LCdnxj31pZWn7rIULd6Y7/Js1PiPHzn7SKCM9vB/jBni8eA==@@ -347,20 +309,6 @@"@emotion/weak-memoize" "^0.3.1"hoist-non-react-statics "^3.3.1"-"@emotion/react@^11.8.1":- version "11.13.3"- resolved "https://registry.yarnpkg.com/@emotion/react/-/react-11.13.3.tgz#a69d0de2a23f5b48e0acf210416638010e4bd2e4"- integrity sha512-lIsdU6JNrmYfJ5EbUCf4xW1ovy5wKQ2CkPRM4xogziOxH1nXxBSjpC9YqbFAP7circxMfYp+6x676BqWcEiixg==- dependencies:- "@babel/runtime" "^7.18.3"- "@emotion/babel-plugin" "^11.12.0"- "@emotion/cache" "^11.13.0"- "@emotion/serialize" "^1.3.1"- "@emotion/use-insertion-effect-with-fallbacks" "^1.1.0"- "@emotion/utils" "^1.4.0"- "@emotion/weak-memoize" "^0.4.0"- hoist-non-react-statics "^3.3.1"-"@emotion/serialize@^1.1.2", "@emotion/serialize@^1.1.3", "@emotion/serialize@^1.1.4":version "1.1.4"resolved "https://registry.yarnpkg.com/@emotion/serialize/-/serialize-1.1.4.tgz#fc8f6d80c492cfa08801d544a05331d1cc7cd451"@@ -372,27 +320,11 @@"@emotion/utils" "^1.2.1"csstype "^3.0.2"-"@emotion/serialize@^1.2.0", "@emotion/serialize@^1.3.1":- version "1.3.1"- resolved "https://registry.yarnpkg.com/@emotion/serialize/-/serialize-1.3.1.tgz#490b660178f43d2de8e92b278b51079d726c05c3"- integrity sha512-dEPNKzBPU+vFPGa+z3axPRn8XVDetYORmDC0wAiej+TNcOZE70ZMJa0X7JdeoM6q/nWTMZeLpN/fTnD9o8MQBA==- dependencies:- "@emotion/hash" "^0.9.2"- "@emotion/memoize" "^0.9.0"- "@emotion/unitless" "^0.10.0"- "@emotion/utils" "^1.4.0"- csstype "^3.0.2"-"@emotion/sheet@^1.2.2":version "1.2.2"resolved "https://registry.yarnpkg.com/@emotion/sheet/-/sheet-1.2.2.tgz#d58e788ee27267a14342303e1abb3d508b6d0fec"integrity sha512-0QBtGvaqtWi+nx6doRwDdBIzhNdZrXUppvTM4dtZZWEGTXL/XE/yJxLMGlDT1Gt+UHH5IX1n+jkXyytE/av7OA==-"@emotion/sheet@^1.4.0":- version "1.4.0"- resolved "https://registry.yarnpkg.com/@emotion/sheet/-/sheet-1.4.0.tgz#c9299c34d248bc26e82563735f78953d2efca83c"- integrity sha512-fTBW9/8r2w3dXWYM4HCB1Rdp8NLibOw2+XELH5m5+AkWiL/KqYX6dc0kKYlaYyKjrQ6ds33MCdMPEwgs2z1rqg==-"@emotion/styled@^11.11.5":version "11.11.5"resolved "https://registry.yarnpkg.com/@emotion/styled/-/styled-11.11.5.tgz#0c5c8febef9d86e8a926e663b2e5488705545dfb"@@ -405,11 +337,6 @@"@emotion/use-insertion-effect-with-fallbacks" "^1.0.1""@emotion/utils" "^1.2.1"-"@emotion/unitless@^0.10.0":- version "0.10.0"- resolved "https://registry.yarnpkg.com/@emotion/unitless/-/unitless-0.10.0.tgz#2af2f7c7e5150f497bdabd848ce7b218a27cf745"- integrity sha512-dFoMUuQA20zvtVTuxZww6OHoJYgrzfKM1t52mVySDJnMSEa08ruEvdYQbhvyu6soU+NeLVd3yKfTfT0NeV6qGg==-"@emotion/unitless@^0.8.1":version "0.8.1"resolved "https://registry.yarnpkg.com/@emotion/unitless/-/unitless-0.8.1.tgz#182b5a4704ef8ad91bde93f7a860a88fd92c79a3"@@ -420,31 +347,16 @@resolved "https://registry.yarnpkg.com/@emotion/use-insertion-effect-with-fallbacks/-/use-insertion-effect-with-fallbacks-1.0.1.tgz#08de79f54eb3406f9daaf77c76e35313da963963"integrity sha512-jT/qyKZ9rzLErtrjGgdkMBn2OP8wl0G3sQlBb3YPryvKHsjvINUhVaPFfP+fpBcOkmrVOVEEHQFJ7nbj2TH2gw==-"@emotion/use-insertion-effect-with-fallbacks@^1.1.0":- version "1.1.0"- resolved "https://registry.yarnpkg.com/@emotion/use-insertion-effect-with-fallbacks/-/use-insertion-effect-with-fallbacks-1.1.0.tgz#1a818a0b2c481efba0cf34e5ab1e0cb2dcb9dfaf"- integrity sha512-+wBOcIV5snwGgI2ya3u99D7/FJquOIniQT1IKyDsBmEgwvpxMNeS65Oib7OnE2d2aY+3BU4OiH+0Wchf8yk3Hw==-"@emotion/utils@^1.2.1":version "1.2.1"resolved "https://registry.yarnpkg.com/@emotion/utils/-/utils-1.2.1.tgz#bbab58465738d31ae4cb3dbb6fc00a5991f755e4"integrity sha512-Y2tGf3I+XVnajdItskUCn6LX+VUDmP6lTL4fcqsXAv43dnlbZiuW4MWQW38rW/BVWSE7Q/7+XQocmpnRYILUmg==-"@emotion/utils@^1.4.0":- version "1.4.0"- resolved "https://registry.yarnpkg.com/@emotion/utils/-/utils-1.4.0.tgz#262f1d02aaedb2ec91c83a0955dd47822ad5fbdd"- integrity sha512-spEnrA1b6hDR/C68lC2M7m6ALPUHZC0lIY7jAS/B/9DuuO1ZP04eov8SMv/6fwRd8pzmsn2AuJEznRREWlQrlQ==-"@emotion/weak-memoize@^0.3.1":version "0.3.1"resolved "https://registry.yarnpkg.com/@emotion/weak-memoize/-/weak-memoize-0.3.1.tgz#d0fce5d07b0620caa282b5131c297bb60f9d87e6"integrity sha512-EsBwpc7hBUJWAsNPBmJy4hxWx12v6bshQsldrVmjxJoc3isbxhOrF2IcCpaXxfvq03NwkI7sbsOLXbYuqF/8Ww==-"@emotion/weak-memoize@^0.4.0":- version "0.4.0"- resolved "https://registry.yarnpkg.com/@emotion/weak-memoize/-/weak-memoize-0.4.0.tgz#5e13fac887f08c44f76b0ccaf3370eb00fec9bb6"- integrity sha512-snKqtPW01tN0ui7yu9rGv69aJXr/a/Ywvl11sUjNtEcRc+ng/mQriFL0wLXMef74iHa/EkftbDzU9F8iFbH+zg==-"@esbuild/[email protected]":version "0.21.5"resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz#c7184a326533fcdf1b8ee0733e21c713b975575f"