Explorar el Código

Further package cleanup and rearranging (#1649)

Manav Rathi hace 1 año
padre
commit
3febb2f749

+ 0 - 3
apps/photos/package.json

@@ -37,8 +37,6 @@
         "get-user-locale": "^2.1.3",
         "hdbscan": "0.0.1-alpha.5",
         "heic-convert": "^2.0.0",
-        "i18next": "^23.4.1",
-        "i18next-http-backend": "^2.1.1",
         "idb": "^7.1.1",
         "is-electron": "^2.2.2",
         "jszip": "3.10.1",
@@ -56,7 +54,6 @@
         "react-bootstrap": "^1.3.0",
         "react-datepicker": "^4.16.0",
         "react-dropzone": "^11.2.4",
-        "react-i18next": "^13.0.2",
         "react-otp-input": "^2.3.1",
         "react-select": "^4.3.1",
         "react-top-loading-bar": "^2.0.1",

+ 21 - 0
docs/dependencies.md

@@ -14,3 +14,24 @@ They also need some support packages:
 * "@typescript-eslint/parser" - Tells ESLint how to read TypeScript syntax
 * "@typescript-eslint/eslint-plugin" - Provides TypeScript rules and presets
 
+## Utils
+
+## UI
+
+The UI package uses "react". This is our core framework. We do use layers on top
+of React, but those are contingent and can be replaced, or even removed. But the
+usage of React is deep rooted. React also has a sibling "react-dom" package that
+renders "React" interfaces to the DOM.
+
+Currently, we use MUI ("@mui/material"), which is a React component library, to
+get a base set of components. MUI uses Emotion (a styled-component variant) as
+its preferred CSS-in-JS library and to keep things simple, that's also what we
+use to write CSS in our own JS (TS).
+
+Emotion itself comes in many parts, of which we need the following three:
+
+* "@emotion/react" - React interface to Emotion. In particular, we set this as
+  the package that handles the transformation of JSX into JS (via the
+  `jsxImportSource` property in `tsconfig.json`).
+* "@emotion/styled"
+* "@emotion/server"

+ 1 - 8
package.json

@@ -22,18 +22,11 @@
         "lint-fix": "yarn prettier --write . && yarn workspaces run eslint --fix ."
     },
     "dependencies": {
-        "@emotion/react": "^11.11",
-        "@emotion/server": "^11.11",
-        "@emotion/styled": "^11.11",
         "@ente/accounts": "*",
         "@ente/shared": "*",
-        "@mui/icons-material": "^5.15",
-        "@mui/material": "^5.15",
         "axios": "^1.6.0",
         "is-electron": "^2.2.2",
-        "next": "^14.1",
-        "react": "18.2.0",
-        "react-dom": "18.2.0"
+        "next": "^14.1"
     },
     "devDependencies": {
         "@ente/eslint-config": "*",

+ 1 - 5
packages/build-config/package.json

@@ -1,9 +1,5 @@
 {
     "name": "@/build-config",
     "version": "0.0.0",
-    "private": true,
-    "files": [
-        "tsconfig.lib.js",
-        "eslintrc.js"
-    ]
+    "private": true
 }

+ 1 - 1
packages/shared/i18n/index.ts

@@ -2,7 +2,7 @@ import i18n from 'i18next';
 import { initReactI18next } from 'react-i18next';
 import Backend from 'i18next-http-backend';
 import { getBestPossibleUserLocale } from './utils';
-import { isDevBuild } from '../network/api';
+import { isDevBuild } from '@/utils/env';
 
 /**
  * Load translations.

+ 1 - 1
packages/shared/logging/index.ts

@@ -2,7 +2,7 @@ import isElectron from 'is-electron';
 import { logError } from '@ente/shared/sentry';
 import { formatLog, logWeb } from './web';
 import { WorkerSafeElectronService } from '../electron/service';
-import { isDevBuild } from '../network/api';
+import { isDevBuild } from '@/utils/env';
 
 export const MAX_LOG_SIZE = 5 * 1024 * 1024; // 5MB
 export const MAX_LOG_LINES = 1000;

+ 4 - 4
packages/shared/logging/web.ts

@@ -11,6 +11,7 @@ import { ElectronFile } from '../upload/types';
 import { addLogLine } from '.';
 import { getSentryUserID } from '../sentry/utils';
 import type { User } from '../user/types';
+import { isDevBuild } from '@/utils/env';
 
 export const MAX_LOG_SIZE = 5 * 1024 * 1024; // 5MB
 export const MAX_LOG_LINES = 1000;
@@ -75,10 +76,9 @@ export const logStartupMessage = async (appId: string) => {
     const appIdL = appId.toLowerCase();
     const userID = (getData(LS_KEYS.USER) as User)?.id;
     const sentryID = await getSentryUserID();
-    const gitCommit = process.env.GIT_SHA;
-    addLogLine(
-        `ente-${appIdL}-web git ${gitCommit} uid ${userID} sid ${sentryID}`
-    );
+    const buildId = isDevBuild ? 'dev' : `git ${process.env.GIT_SHA}`;
+
+    addLogLine(`ente-${appIdL}-web ${buildId} uid ${userID} sid ${sentryID}`);
 };
 
 function getLogs(): Log[] {

+ 0 - 13
packages/shared/network/api.ts

@@ -97,16 +97,3 @@ export const getFamilyPortalURL = () => {
     }
     return `https://family.ente.io`;
 };
-
-/**
- * A build is considered as a development build if either the NODE_ENV is
- * environment variable is set to 'development'.
- *
- * NODE_ENV is automatically set to 'development' when we run `yarn dev`. From
- * Next.js docs:
- *
- * > If the environment variable NODE_ENV is unassigned, Next.js automatically
- *   assigns development when running the `next dev` command, or production for
- *   all other commands.
- */
-export const isDevBuild = process.env.NODE_ENV === 'development';

+ 1 - 0
packages/shared/next/next.config.base.js

@@ -33,6 +33,7 @@ const nextConfig = {
         emotion: true,
     },
     transpilePackages: [
+        '@/ui',
         '@/utils',
         '@mui/material',
         '@mui/system',

+ 3 - 6
packages/shared/package.json

@@ -2,12 +2,9 @@
     "name": "@ente/shared",
     "version": "0.0.0",
     "private": true,
-    "scripts": {
-        "lint": "eslint .",
-        "build": "yarn lint && tsc"
-    },
     "dependencies": {
+        "@/ui": "*",
+        "@/utils": "*",
         "@sentry/nextjs": "7.77.0"
-    },
-    "devDependencies": {}
+    }
 }

+ 1 - 1
packages/shared/sentry/config/sentry.config.base.ts

@@ -2,7 +2,7 @@ import * as Sentry from '@sentry/nextjs';
 import { getSentryUserID } from '@ente/shared/sentry/utils';
 import { runningInBrowser } from '@ente/shared/platform';
 import { getHasOptedOutOfCrashReports } from '@ente/shared/storage/localStorage/helpers';
-import { isDevBuild } from '@ente/shared/network/api';
+import { isDevBuild } from '@/utils/env';
 
 export const initSentry = async (dsn: string) => {
     // Don't initialize Sentry for dev builds

+ 0 - 0
packages/ui/src/components/Card.tsx → packages/ui/components/Card.tsx


+ 0 - 0
packages/ui/src/hello.ts → packages/ui/hello.ts


+ 12 - 4
packages/ui/package.json

@@ -2,11 +2,19 @@
     "name": "@/ui",
     "version": "0.0.0",
     "private": true,
-    "exports": {
-        "./components/*": "./src/components/*.tsx",
-        "./*": "./src/*.ts"
-    },
     "devDependencies": {
         "@/build-config": "*"
+    },
+    "dependencies": {
+        "@emotion/react": "^11.11",
+        "@emotion/server": "^11.11",
+        "@emotion/styled": "^11.11",
+        "@mui/icons-material": "^5.15",
+        "@mui/material": "^5.15",
+        "i18next": "^23.10.0",
+        "i18next-http-backend": "^2.5.0",
+        "react": "18.2.0",
+        "react-dom": "18.2.0",
+        "react-i18next": "^14"
     }
 }

+ 12 - 0
packages/utils/env.ts

@@ -0,0 +1,12 @@
+/**
+ * A build is considered as a development build if either the NODE_ENV is
+ * environment variable is set to 'development'.
+ *
+ * NODE_ENV is automatically set to 'development' when we run `yarn dev`. From
+ * Next.js docs:
+ *
+ * > If the environment variable NODE_ENV is unassigned, Next.js automatically
+ *   assigns development when running the `next dev` command, or production for
+ *   all other commands.
+ */
+export const isDevBuild = process.env.NODE_ENV === "development";

+ 0 - 3
packages/utils/package.json

@@ -2,9 +2,6 @@
     "name": "@/utils",
     "version": "0.0.0",
     "private": true,
-    "exports": {
-        "./*": "./src/*.ts"
-    },
     "devDependencies": {
         "@/build-config": "*"
     }

+ 0 - 4
packages/utils/src/hello.ts

@@ -1,4 +0,0 @@
-/** Howdy! */
-export const sayHello = () => {
-    console.log("Hello, world");
-};

+ 65 - 41
yarn.lock

@@ -41,7 +41,7 @@
     chalk "^2.4.2"
     js-tokens "^4.0.0"
 
-"@babel/runtime@^7.0.0", "@babel/runtime@^7.10.5", "@babel/runtime@^7.12.0", "@babel/runtime@^7.12.5", "@babel/runtime@^7.13.8", "@babel/runtime@^7.14.0", "@babel/runtime@^7.18.3", "@babel/runtime@^7.18.9", "@babel/runtime@^7.21.0", "@babel/runtime@^7.22.5", "@babel/runtime@^7.23.2", "@babel/runtime@^7.23.9", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.3", "@babel/runtime@^7.8.7":
+"@babel/runtime@^7.0.0", "@babel/runtime@^7.10.5", "@babel/runtime@^7.12.0", "@babel/runtime@^7.12.5", "@babel/runtime@^7.13.8", "@babel/runtime@^7.14.0", "@babel/runtime@^7.18.3", "@babel/runtime@^7.18.9", "@babel/runtime@^7.21.0", "@babel/runtime@^7.23.2", "@babel/runtime@^7.23.9", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.3", "@babel/runtime@^7.8.7":
   version "7.23.9"
   resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.23.9.tgz#47791a15e4603bb5f905bc0753801cf21d6345f7"
   integrity sha512-0CX6F+BI2s9dkUqr08KFrAIZgNFj75rdBU/DjCyYLIaV/quFjkk6T+EJ2LkZHyZTbEV4L5p97mNkUsHl2wLFAw==
@@ -90,6 +90,11 @@
   dependencies:
     "@date-io/core" "^2.17.0"
 
+"@discoveryjs/json-ext@0.5.7":
+  version "0.5.7"
+  resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70"
+  integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==
+
 "@emotion/babel-plugin@^11.11.0":
   version "11.11.0"
   resolved "https://registry.yarnpkg.com/@emotion/babel-plugin/-/babel-plugin-11.11.0.tgz#c2d872b6a7767a9d176d007f5b31f7d504bb5d6c"
@@ -411,12 +416,12 @@
     react-transition-group "^4.4.5"
     rifm "^0.12.1"
 
-"@next/bundle-analyzer@^13.4.12":
-  version "13.5.6"
-  resolved "https://registry.yarnpkg.com/@next/bundle-analyzer/-/bundle-analyzer-13.5.6.tgz#3c73f2e15ff5507317b37b87ce984bac5a5d7ad0"
-  integrity sha512-4P5YVpR3N/B5+p0TQ/rPAr+9fsjkdfCVTGzJhKwE7XHqS+QME4gYxAYeGKkfkHEkP2A3GKXs8QSp0LjIvWLI3g==
+"@next/bundle-analyzer@^14.1":
+  version "14.1.0"
+  resolved "https://registry.yarnpkg.com/@next/bundle-analyzer/-/bundle-analyzer-14.1.0.tgz#da146eb713283c2a28d32c98dbd0d63ae7d42d30"
+  integrity sha512-RJWjnlMp/1WSW0ahAdawV22WgJiC6BVaFS5Xfhw6gP7NJEX3cAJjh4JqSHKGr8GnLNRaFCVTQdDPoX84E421BA==
   dependencies:
-    webpack-bundle-analyzer "4.7.0"
+    webpack-bundle-analyzer "4.10.1"
 
 "@next/env@14.1.0":
   version "14.1.0"
@@ -506,7 +511,7 @@
   resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33"
   integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==
 
-"@polka/url@^1.0.0-next.20":
+"@polka/url@^1.0.0-next.24":
   version "1.0.0-next.24"
   resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.24.tgz#58601079e11784d20f82d0585865bb42305c4df3"
   integrity sha512-2LuNTFBIO0m7kKIQvvPHN6UE63VjpmL9rnEEaOOaiSPbZK+zUOYIzBAWcED+3XYzhYsd/0mD57VdxAEqqV52CQ==
@@ -1461,7 +1466,7 @@ chalk@^2.4.2:
     escape-string-regexp "^1.0.5"
     supports-color "^5.3.0"
 
-chalk@^4.0.0, chalk@^4.1.0:
+chalk@^4.0.0:
   version "4.1.2"
   resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01"
   integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==
@@ -1621,6 +1626,11 @@ dayjs@^1.10.0:
   resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.10.tgz#68acea85317a6e164457d6d6947564029a6a16a0"
   integrity sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ==
 
+debounce@^1.2.1:
+  version "1.2.1"
+  resolved "https://registry.yarnpkg.com/debounce/-/debounce-1.2.1.tgz#38881d8f4166a5c5848020c11827b834bcb3e0a5"
+  integrity sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug==
+
 debounce@^2.0.0:
   version "2.0.0"
   resolved "https://registry.yarnpkg.com/debounce/-/debounce-2.0.0.tgz#b2f914518a1481466f4edaee0b063e4d473ad549"
@@ -2494,6 +2504,11 @@ hoist-non-react-statics@^3.3.0, hoist-non-react-statics@^3.3.1, hoist-non-react-
   dependencies:
     react-is "^16.7.0"
 
+html-escaper@^2.0.2:
+  version "2.0.2"
+  resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453"
+  integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==
+
 html-parse-stringify@^3.0.1:
   version "3.0.1"
   resolved "https://registry.yarnpkg.com/html-parse-stringify/-/html-parse-stringify-3.0.1.tgz#dfc1017347ce9f77c8141a507f233040c59c55d2"
@@ -2520,17 +2535,17 @@ https-proxy-agent@^5.0.0:
     agent-base "6"
     debug "4"
 
-i18next-http-backend@^2.1.1:
+i18next-http-backend@^2.5.0:
   version "2.5.0"
   resolved "https://registry.yarnpkg.com/i18next-http-backend/-/i18next-http-backend-2.5.0.tgz#8396a7df30bfe722eff7a65f629df32a61720414"
   integrity sha512-Z/aQsGZk1gSxt2/DztXk92DuDD20J+rNudT7ZCdTrNOiK8uQppfvdjq9+DFQfpAnFPn3VZS+KQIr1S/W1KxhpQ==
   dependencies:
     cross-fetch "4.0.0"
 
-i18next@^23.4.1:
-  version "23.9.0"
-  resolved "https://registry.yarnpkg.com/i18next/-/i18next-23.9.0.tgz#659cfcbf51a20158bb094d17a85f3c583d473901"
-  integrity sha512-f3MUciKqwzNV//mHG6EtdSlC65+nqH/3zK8sOSWqNV6FVu2tmHhF/rFOp9UF8S4m1odojtuipKaKJrP0Loh60g==
+i18next@^23.10.0:
+  version "23.10.0"
+  resolved "https://registry.yarnpkg.com/i18next/-/i18next-23.10.0.tgz#fb328794ae692e6fdde0564259e421f4203c4a2c"
+  integrity sha512-/TgHOqsa7/9abUKJjdPeydoyDc0oTi/7u9F8lMSj6ufg4cbC1Oj3f/Jja7zj7WRIhEQKB7Q4eN6y68I9RDxxGQ==
   dependencies:
     "@babel/runtime" "^7.23.2"
 
@@ -2730,6 +2745,11 @@ is-path-inside@^3.0.3:
   resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283"
   integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==
 
+is-plain-object@^5.0.0:
+  version "5.0.0"
+  resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-5.0.0.tgz#4427f50ab3429e9025ea7d52e9043a9ef4159344"
+  integrity sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==
+
 is-reference@1.2.1:
   version "1.2.1"
   resolved "https://registry.yarnpkg.com/is-reference/-/is-reference-1.2.1.tgz#8b2dac0b371f4bc994fdeaba9eb542d03002d0b7"
@@ -3019,7 +3039,7 @@ lodash.merge@^4.6.2:
   resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a"
   integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==
 
-lodash@^4.17.15, lodash@^4.17.20, lodash@^4.17.21:
+lodash@^4.17.15, lodash@^4.17.21:
   version "4.17.21"
   resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
   integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
@@ -3159,10 +3179,10 @@ ml-matrix@^6.10.4:
     is-any-array "^2.0.1"
     ml-array-rescale "^1.3.7"
 
-mrmime@^1.0.0:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/mrmime/-/mrmime-1.0.1.tgz#5f90c825fad4bdd41dc914eff5d1a8cfdaf24f27"
-  integrity sha512-hzzEagAgDyoU1Q6yg5uI+AorQgdvMCur3FcKf7NhMKWsaYg+RnbTyHRa/9IlLF9rf455MOCtcqqrQQ83pPP7Uw==
+mrmime@^2.0.0:
+  version "2.0.0"
+  resolved "https://registry.yarnpkg.com/mrmime/-/mrmime-2.0.0.tgz#151082a6e06e59a9a39b46b3e14d5cfe92b3abb4"
+  integrity sha512-eu38+hdgojoyq63s+yTpN4XMBdt5l8HhMhc4VKLO9KM5caLIBvUm4thi7fFaxyTmCKeNnXZ5pAlBwCUnhA09uw==
 
 ms@2.1.2:
   version "2.1.2"
@@ -3589,12 +3609,12 @@ react-fast-compare@^3.0.1:
   resolved "https://registry.yarnpkg.com/react-fast-compare/-/react-fast-compare-3.2.2.tgz#929a97a532304ce9fee4bcae44234f1ce2c21d49"
   integrity sha512-nsO+KSNgo1SbJqJEYRE9ERzo7YtYbou/OqjSQKxV7jcKox7+usiUVZOAC+XnDOABXggQTno0Y1CpVnuWEc1boQ==
 
-react-i18next@^13.0.2:
-  version "13.5.0"
-  resolved "https://registry.yarnpkg.com/react-i18next/-/react-i18next-13.5.0.tgz#44198f747628267a115c565f0c736a50a76b1ab0"
-  integrity sha512-CFJ5NDGJ2MUyBohEHxljOq/39NQ972rh1ajnadG9BjTk+UXbHLq4z5DKEbEQBDoIhUmmbuS/fIMJKo6VOax1HA==
+react-i18next@^14:
+  version "14.0.5"
+  resolved "https://registry.yarnpkg.com/react-i18next/-/react-i18next-14.0.5.tgz#5df7b88a3ac8afbef8089ed0d0c27e12b9a1acac"
+  integrity sha512-5+bQSeEtgJrMBABBL5lO7jPdSNAbeAZ+MlFWDw//7FnVacuVu3l9EeWFzBQvZsKy+cihkbThWOAThEdH8YjGEw==
   dependencies:
-    "@babel/runtime" "^7.22.5"
+    "@babel/runtime" "^7.23.9"
     html-parse-stringify "^3.0.1"
 
 react-input-autosize@^3.0.0:
@@ -3970,14 +3990,14 @@ similarity-transformation@^0.0.1:
   resolved "https://registry.yarnpkg.com/similarity-transformation/-/similarity-transformation-0.0.1.tgz#7b40266150be1ac593827b08a06a458df4fc9238"
   integrity sha512-RiotBF9Xpqzv0d7Xymcqukr9iReximKtU3EaK58g7pdYZGB0+bTkPdHX0Za+H7/NyP9zWfFmpZ0AAepg+uNLYw==
 
-sirv@^1.0.7:
-  version "1.0.19"
-  resolved "https://registry.yarnpkg.com/sirv/-/sirv-1.0.19.tgz#1d73979b38c7fe91fcba49c85280daa9c2363b49"
-  integrity sha512-JuLThK3TnZG1TAKDwNIqNq6QA2afLOCcm+iE8D1Kj3GA40pSPsxQjjJl0J8X3tsR7T+CP1GavpzLwYkgVLWrZQ==
+sirv@^2.0.3:
+  version "2.0.4"
+  resolved "https://registry.yarnpkg.com/sirv/-/sirv-2.0.4.tgz#5dd9a725c578e34e449f332703eb2a74e46a29b0"
+  integrity sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ==
   dependencies:
-    "@polka/url" "^1.0.0-next.20"
-    mrmime "^1.0.0"
-    totalist "^1.0.0"
+    "@polka/url" "^1.0.0-next.24"
+    mrmime "^2.0.0"
+    totalist "^3.0.0"
 
 slash@^3.0.0:
   version "3.0.0"
@@ -4207,10 +4227,10 @@ toposort@^2.0.2:
   resolved "https://registry.yarnpkg.com/toposort/-/toposort-2.0.2.tgz#ae21768175d1559d48bef35420b2f4962f09c330"
   integrity sha512-0a5EOkAUp8D4moMi2W8ZF8jcga7BgZd91O/yabJCFY8az+XSzeGyTKs0Aoo897iV1Nj6guFq8orWDS96z91oGg==
 
-totalist@^1.0.0:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/totalist/-/totalist-1.1.0.tgz#a4d65a3e546517701e3e5c37a47a70ac97fe56df"
-  integrity sha512-gduQwd1rOdDMGxFG1gEvhV88Oirdo2p+KjoYFU7k2g+i7n6AFFbDQ5kMPUsW0pNbfQsB/cwXvT1i4Bue0s9g5g==
+totalist@^3.0.0:
+  version "3.0.1"
+  resolved "https://registry.yarnpkg.com/totalist/-/totalist-3.0.1.tgz#ba3a3d600c915b1a97872348f79c127475f6acf8"
+  integrity sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==
 
 tr46@~0.0.3:
   version "0.0.3"
@@ -4384,19 +4404,23 @@ webidl-conversions@^3.0.0:
   resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871"
   integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==
 
-webpack-bundle-analyzer@4.7.0:
-  version "4.7.0"
-  resolved "https://registry.yarnpkg.com/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.7.0.tgz#33c1c485a7fcae8627c547b5c3328b46de733c66"
-  integrity sha512-j9b8ynpJS4K+zfO5GGwsAcQX4ZHpWV+yRiHDiL+bE0XHJ8NiPYLTNVQdlFYWxtpg9lfAQNlwJg16J9AJtFSXRg==
+webpack-bundle-analyzer@4.10.1:
+  version "4.10.1"
+  resolved "https://registry.yarnpkg.com/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.10.1.tgz#84b7473b630a7b8c21c741f81d8fe4593208b454"
+  integrity sha512-s3P7pgexgT/HTUSYgxJyn28A+99mmLq4HsJepMPzu0R8ImJc52QNqaFYW1Z2z2uIb1/J3eYgaAWVpaC+v/1aAQ==
   dependencies:
+    "@discoveryjs/json-ext" "0.5.7"
     acorn "^8.0.4"
     acorn-walk "^8.0.0"
-    chalk "^4.1.0"
     commander "^7.2.0"
+    debounce "^1.2.1"
+    escape-string-regexp "^4.0.0"
     gzip-size "^6.0.0"
-    lodash "^4.17.20"
+    html-escaper "^2.0.2"
+    is-plain-object "^5.0.0"
     opener "^1.5.2"
-    sirv "^1.0.7"
+    picocolors "^1.0.0"
+    sirv "^2.0.3"
     ws "^7.3.1"
 
 "webpack-sources@^2.0.0 || ^3.0.0":