diff --git a/.eslintrc b/.eslintrc index bcec019343..a7d01a2054 100644 --- a/.eslintrc +++ b/.eslintrc @@ -12,7 +12,8 @@ "prettier", "plugin:array-func/all", "plugin:css-modules/recommended", - "plugin:sonarjs/recommended" + "plugin:sonarjs/recommended", + "plugin:import/typescript" ], "globals": { "Atomics": "readonly", @@ -48,6 +49,10 @@ { "name": "Link", "linkAttribute": "to" }, { "name": "NavLink", "linkAttribute": "to" } ] + }, + "import/resolver": { + "typescript": true, + "webpack": true } }, "plugins": [ @@ -61,7 +66,8 @@ "css-modules", "sonarjs", "jsx-expressions", - "github" + "github", + "import" ], "reportUnusedDisableDirectives": true, "rules": { @@ -305,7 +311,13 @@ "github/array-foreach": "error", "github/async-currenttarget": "error", "github/async-preventdefault": "error", - "github/no-innerText": "error" + "github/no-innerText": "error", + "import/no-named-as-default": "error", + "import/no-named-as-default-member": "error", + "import/no-cycle": "error", + "import/dynamic-import-chunkname": "error", + "import/no-duplicates": "error", + "import/no-named-default": "error" }, "overrides": [ { diff --git a/.vscode/dim.code-snippets b/.vscode/dim.code-snippets index c8a82775ac..be7f51ad37 100644 --- a/.vscode/dim.code-snippets +++ b/.vscode/dim.code-snippets @@ -38,10 +38,10 @@ "scope": "javascriptreact,typescriptreact" }, - "import clsx": { + "import { clsx }": { "prefix": "imc", - "body": ["import clsx from 'clsx';"], - "description": "Import clsx", + "body": ["import { clsx } from 'clsx';"], + "description": "import { clsx }", "scope": "javascriptreact,typescriptreact" }, @@ -50,5 +50,5 @@ "body": ["import styles from './$TM_FILENAME_BASE.m.scss';"], "description": "Import CSS module", "scope": "javascriptreact,typescriptreact" - }, + } } diff --git a/package.json b/package.json index 0e44055560..a829616208 100644 --- a/package.json +++ b/package.json @@ -128,9 +128,12 @@ "css-modules-typescript-loader": "^4.0.0", "eslint": "^8.3.0", "eslint-config-prettier": "^8.1.0", + "eslint-import-resolver-typescript": "^3.5.5", + "eslint-import-resolver-webpack": "^0.13.2", "eslint-plugin-array-func": "^3.1.7", "eslint-plugin-css-modules": "^2.11.0", "eslint-plugin-github": "^4.6.0", + "eslint-plugin-import": "^2.27.5", "eslint-plugin-jsx-a11y": "^6.3.1", "eslint-plugin-jsx-expressions": "^1.3.1", "eslint-plugin-lodash": "^7.1.0", diff --git a/src/Index.tsx b/src/Index.tsx index be4394de9f..f8d501768e 100644 --- a/src/Index.tsx +++ b/src/Index.tsx @@ -12,7 +12,7 @@ import { lazyLoadStreamDeck, startStreamDeckConnection } from 'app/stream-deck/s import { streamDeckEnabled } from 'app/stream-deck/util/local-storage'; import { infoLog } from 'app/utils/log'; import { scheduleMemoryMeasurement } from 'app/utils/measure-memory'; -import ReactDOM from 'react-dom/client'; +import { createRoot } from 'react-dom/client'; import { Provider } from 'react-redux'; import idbReady from 'safari-14-idb-fix'; import { StorageBroken, storageTest } from './StorageTest'; @@ -42,7 +42,7 @@ scheduleMemoryMeasurement(); const i18nPromise = initi18n(); (async () => { - const root = ReactDOM.createRoot(document.getElementById('app')!); + const root = createRoot(document.getElementById('app')!); // idbReady works around a bug in Safari 14 where IndexedDB doesn't initialize sometimes await idbReady(); diff --git a/src/app/App.tsx b/src/app/App.tsx index ca8e2d3886..1904847b92 100644 --- a/src/app/App.tsx +++ b/src/app/App.tsx @@ -1,7 +1,7 @@ import { settingSelector } from 'app/dim-api/selectors'; import { RootState } from 'app/store/types'; -import clsx from 'clsx'; -import React, { Suspense } from 'react'; +import { clsx } from 'clsx'; +import { Suspense, lazy } from 'react'; import { useSelector } from 'react-redux'; import { Navigate, Route, Routes, useLocation } from 'react-router'; import styles from './App.m.scss'; @@ -24,13 +24,11 @@ import Privacy from './shell/Privacy'; import ScrollToTop from './shell/ScrollToTop'; import SneakyUpdates from './shell/SneakyUpdates'; -const WhatsNew = React.lazy( - () => import(/* webpackChunkName: "whatsNew" */ './whats-new/WhatsNew') -); -const SettingsPage = React.lazy( +const WhatsNew = lazy(() => import(/* webpackChunkName: "whatsNew" */ './whats-new/WhatsNew')); +const SettingsPage = lazy( () => import(/* webpackChunkName: "settings" */ './settings/SettingsPage') ); -const SearchHistory = React.lazy( +const SearchHistory = lazy( () => import(/* webpackChunkName: "searchHistory" */ './search/SearchHistory') ); diff --git a/src/app/accounts/Account.tsx b/src/app/accounts/Account.tsx index a148166a97..6654b8c552 100644 --- a/src/app/accounts/Account.tsx +++ b/src/app/accounts/Account.tsx @@ -1,4 +1,4 @@ -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { AppIcon } from '../shell/icons'; import styles from './Account.m.scss'; import { DestinyAccount, PLATFORM_ICONS } from './destiny-account'; diff --git a/src/app/accounts/MenuAccounts.tsx b/src/app/accounts/MenuAccounts.tsx index 17930d6bd1..0f5802d3a3 100644 --- a/src/app/accounts/MenuAccounts.tsx +++ b/src/app/accounts/MenuAccounts.tsx @@ -1,7 +1,7 @@ import { t } from 'app/i18next-t'; import { accountRoute } from 'app/routes'; import { useThunkDispatch } from 'app/store/thunk-dispatch'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import _ from 'lodash'; import React from 'react'; import { useSelector } from 'react-redux'; diff --git a/src/app/armory/Armory.tsx b/src/app/armory/Armory.tsx index fa6953f8b5..a2a40465ed 100644 --- a/src/app/armory/Armory.tsx +++ b/src/app/armory/Armory.tsx @@ -27,7 +27,7 @@ import { AppIcon, compareIcon } from 'app/shell/icons'; import { useIsPhonePortrait } from 'app/shell/selectors'; import { useThunkDispatch } from 'app/store/thunk-dispatch'; import { getItemYear } from 'app/utils/item-utils'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { D2EventInfo } from 'data/d2/d2-event-info'; import { ItemCategoryHashes } from 'data/d2/generated-enums'; import { useSelector } from 'react-redux'; diff --git a/src/app/character-tile/CharacterHeaderXP.tsx b/src/app/character-tile/CharacterHeaderXP.tsx index fb9a655820..06486524be 100644 --- a/src/app/character-tile/CharacterHeaderXP.tsx +++ b/src/app/character-tile/CharacterHeaderXP.tsx @@ -1,7 +1,7 @@ import { t } from 'app/i18next-t'; import { D1ProgressionHashes } from 'app/search/d1-known-values'; import { percent } from 'app/shell/formatters'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { PressTip } from '../dim-ui/PressTip'; import { D1Store } from '../inventory/store-types'; import styles from './CharacterHeaderXP.m.scss'; diff --git a/src/app/character-tile/CharacterTile.tsx b/src/app/character-tile/CharacterTile.tsx index 3ee63b50ed..bc9e1ef17f 100644 --- a/src/app/character-tile/CharacterTile.tsx +++ b/src/app/character-tile/CharacterTile.tsx @@ -4,7 +4,7 @@ import { AppIcon, powerActionIcon } from 'app/shell/icons'; import { useIsPhonePortrait } from 'app/shell/selectors'; import VaultCapacity from 'app/store-stats/VaultCapacity'; import { RootState } from 'app/store/types'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { FontGlyphs } from 'data/d2/d2-font-glyphs'; import { memo } from 'react'; import { useSelector } from 'react-redux'; diff --git a/src/app/character-tile/CharacterTileButton.tsx b/src/app/character-tile/CharacterTileButton.tsx index ab6bedaea4..d3b1658672 100644 --- a/src/app/character-tile/CharacterTileButton.tsx +++ b/src/app/character-tile/CharacterTileButton.tsx @@ -1,4 +1,4 @@ -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { DimStore } from '../inventory/store-types'; import CharacterTile from './CharacterTile'; import './StoreHeading.scss'; diff --git a/src/app/character-tile/StoreHeading.tsx b/src/app/character-tile/StoreHeading.tsx index 62c7655d38..2a9cc36cc6 100644 --- a/src/app/character-tile/StoreHeading.tsx +++ b/src/app/character-tile/StoreHeading.tsx @@ -1,9 +1,9 @@ import { t } from 'app/i18next-t'; import { isD1Store } from 'app/inventory/stores-helpers'; import LoadoutPopup from 'app/loadout/loadout-menu/LoadoutPopup'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import React, { useCallback, useRef, useState } from 'react'; -import ReactDOM from 'react-dom'; +import { createPortal } from 'react-dom'; import ClickOutside from '../dim-ui/ClickOutside'; import { DimStore } from '../inventory/store-types'; import { AppIcon, kebabIcon } from '../shell/icons'; @@ -86,7 +86,7 @@ export default function StoreHeading({ store, selectedStore, loadoutMenuRef, onT ); loadoutMenu = loadoutMenuRef - ? ReactDOM.createPortal(menuContents, loadoutMenuRef.current!) + ? createPortal(menuContents, loadoutMenuRef.current!) : menuContents; } diff --git a/src/app/character-tile/StoreIcon.tsx b/src/app/character-tile/StoreIcon.tsx index 59aae488a8..ade4d948c2 100644 --- a/src/app/character-tile/StoreIcon.tsx +++ b/src/app/character-tile/StoreIcon.tsx @@ -1,6 +1,6 @@ import ClassIcon from 'app/dim-ui/ClassIcon'; import { DimStore } from 'app/inventory/store-types'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import styles from './StoreIcon.m.scss'; /** diff --git a/src/app/clarity/descriptions/ClarityDescriptions.tsx b/src/app/clarity/descriptions/ClarityDescriptions.tsx index b8293af849..ca4d6da0fa 100644 --- a/src/app/clarity/descriptions/ClarityDescriptions.tsx +++ b/src/app/clarity/descriptions/ClarityDescriptions.tsx @@ -1,7 +1,7 @@ import { languageSelector } from 'app/dim-api/selectors'; import ExternalLink from 'app/dim-ui/ExternalLink'; import { t } from 'app/i18next-t'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { useSelector } from 'react-redux'; /* eslint-disable css-modules/no-unused-class */ import styles from './Description.m.scss'; diff --git a/src/app/compare/Compare.tsx b/src/app/compare/Compare.tsx index ce2dc72870..9126760faa 100644 --- a/src/app/compare/Compare.tsx +++ b/src/app/compare/Compare.tsx @@ -18,7 +18,7 @@ import { acquisitionRecencyComparator } from 'app/shell/item-comparators'; import { useThunkDispatch } from 'app/store/thunk-dispatch'; import { emptyArray } from 'app/utils/empty'; import { DestinyDisplayPropertiesDefinition } from 'bungie-api-ts/destiny2'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { StatHashes } from 'data/d2/generated-enums'; import _ from 'lodash'; import React, { useCallback, useEffect, useMemo, useState } from 'react'; diff --git a/src/app/compare/CompareItem.tsx b/src/app/compare/CompareItem.tsx index 298c312f1e..4e99a276b7 100644 --- a/src/app/compare/CompareItem.tsx +++ b/src/app/compare/CompareItem.tsx @@ -9,7 +9,7 @@ import { useD2Definitions } from 'app/manifest/selectors'; import { useThunkDispatch } from 'app/store/thunk-dispatch'; import { useSetCSSVarToHeight } from 'app/utils/hooks'; import { isD1Item } from 'app/utils/item-utils'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import _ from 'lodash'; import { memo, useCallback, useMemo, useRef } from 'react'; import { useSelector } from 'react-redux'; diff --git a/src/app/destiny1/activities/Activities.tsx b/src/app/destiny1/activities/Activities.tsx index 7cf1e8448d..00b276e448 100644 --- a/src/app/destiny1/activities/Activities.tsx +++ b/src/app/destiny1/activities/Activities.tsx @@ -5,7 +5,7 @@ import { useD1Definitions } from 'app/manifest/selectors'; import Objective from 'app/progress/Objective'; import { usePageTitle } from 'app/utils/hooks'; import { StringLookup } from 'app/utils/util-types'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import _ from 'lodash'; import { useSelector } from 'react-redux'; import { DestinyAccount } from '../../accounts/destiny-account'; diff --git a/src/app/destiny1/loadout-builder/D1LoadoutBuilder.tsx b/src/app/destiny1/loadout-builder/D1LoadoutBuilder.tsx index 86fdbaaad9..58b0f6691e 100644 --- a/src/app/destiny1/loadout-builder/D1LoadoutBuilder.tsx +++ b/src/app/destiny1/loadout-builder/D1LoadoutBuilder.tsx @@ -14,7 +14,7 @@ import { DestinyClass } from 'bungie-api-ts/destiny2'; import { ItemCategoryHashes } from 'data/d2/generated-enums'; import { produce } from 'immer'; import _ from 'lodash'; -import React from 'react'; +import React, { Component } from 'react'; import { connect } from 'react-redux'; import CharacterSelect from '../../dim-ui/CharacterSelect'; import CollapsibleTitle from '../../dim-ui/CollapsibleTitle'; @@ -121,7 +121,7 @@ const initialState: State = { }, }; -class D1LoadoutBuilder extends React.Component { +class D1LoadoutBuilder extends Component { state: State = initialState; private cancelToken: { cancelled: boolean } = { diff --git a/src/app/destiny1/loadout-builder/ExcludeItemsDropTarget.tsx b/src/app/destiny1/loadout-builder/ExcludeItemsDropTarget.tsx index 378a153830..c21b21c4bb 100644 --- a/src/app/destiny1/loadout-builder/ExcludeItemsDropTarget.tsx +++ b/src/app/destiny1/loadout-builder/ExcludeItemsDropTarget.tsx @@ -1,5 +1,5 @@ import { D1BucketHashes } from 'app/search/d1-known-values'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { BucketHashes } from 'data/d2/generated-enums'; import React from 'react'; import { useDrop } from 'react-dnd'; diff --git a/src/app/destiny1/loadout-builder/LoadoutBuilderDropTarget.tsx b/src/app/destiny1/loadout-builder/LoadoutBuilderDropTarget.tsx index cb82c9369a..470aec6c85 100644 --- a/src/app/destiny1/loadout-builder/LoadoutBuilderDropTarget.tsx +++ b/src/app/destiny1/loadout-builder/LoadoutBuilderDropTarget.tsx @@ -1,4 +1,4 @@ -import clsx from 'clsx'; +import { clsx } from 'clsx'; import React from 'react'; import { useDrop } from 'react-dnd'; import { DimItem } from '../../inventory/item-types'; diff --git a/src/app/destiny1/loadout-builder/LoadoutBuilderLocksDialog.tsx b/src/app/destiny1/loadout-builder/LoadoutBuilderLocksDialog.tsx index edf90d6c4a..483ae65e6a 100644 --- a/src/app/destiny1/loadout-builder/LoadoutBuilderLocksDialog.tsx +++ b/src/app/destiny1/loadout-builder/LoadoutBuilderLocksDialog.tsx @@ -1,5 +1,5 @@ import { useShiftHeld } from 'app/utils/hooks'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import React from 'react'; import BungieImage from '../../dim-ui/BungieImage'; import ClickOutside from '../../dim-ui/ClickOutside'; diff --git a/src/app/destiny1/loadout-drawer/Buttons.tsx b/src/app/destiny1/loadout-drawer/Buttons.tsx index b8c0725edb..ab2d1221e5 100644 --- a/src/app/destiny1/loadout-drawer/Buttons.tsx +++ b/src/app/destiny1/loadout-drawer/Buttons.tsx @@ -1,5 +1,5 @@ import { addIcon, AppIcon } from 'app/shell/icons'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import styles from './Buttons.m.scss'; interface AddButtonProps { diff --git a/src/app/destiny1/loadout-drawer/LoadoutDrawerBucket.tsx b/src/app/destiny1/loadout-drawer/LoadoutDrawerBucket.tsx index 61199d72f7..1819c699ac 100644 --- a/src/app/destiny1/loadout-drawer/LoadoutDrawerBucket.tsx +++ b/src/app/destiny1/loadout-drawer/LoadoutDrawerBucket.tsx @@ -2,7 +2,7 @@ import 'app/inventory-page/StoreBucket.scss'; import { InventoryBucket } from 'app/inventory/inventory-buckets'; import { ResolvedLoadoutItem } from 'app/loadout-drawer/loadout-types'; import { addIcon, AppIcon } from 'app/shell/icons'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { BucketHashes } from 'data/d2/generated-enums'; import _ from 'lodash'; import React from 'react'; diff --git a/src/app/destiny1/loadout-drawer/LoadoutDrawerOptions.tsx b/src/app/destiny1/loadout-drawer/LoadoutDrawerOptions.tsx index 061a141e25..7e549ef7a6 100644 --- a/src/app/destiny1/loadout-drawer/LoadoutDrawerOptions.tsx +++ b/src/app/destiny1/loadout-drawer/LoadoutDrawerOptions.tsx @@ -10,7 +10,7 @@ import { import { Loadout } from 'app/loadout-drawer/loadout-types'; import { uniqBy } from 'app/utils/util'; import { DestinyClass } from 'bungie-api-ts/destiny2'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import React from 'react'; import { useSelector } from 'react-redux'; import { createSelector } from 'reselect'; diff --git a/src/app/destiny1/record-books/RecordBooks.tsx b/src/app/destiny1/record-books/RecordBooks.tsx index d79268c103..fa1a5a4997 100644 --- a/src/app/destiny1/record-books/RecordBooks.tsx +++ b/src/app/destiny1/record-books/RecordBooks.tsx @@ -5,7 +5,7 @@ import { useD1Definitions } from 'app/manifest/selectors'; import { useSetting } from 'app/settings/hooks'; import { usePageTitle } from 'app/utils/hooks'; import { DestinyObjectiveProgress } from 'bungie-api-ts/destiny2'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import _ from 'lodash'; import React from 'react'; import { useSelector } from 'react-redux'; diff --git a/src/app/destiny1/vendors/D1VendorItem.tsx b/src/app/destiny1/vendors/D1VendorItem.tsx index 180db38af6..c83f361155 100644 --- a/src/app/destiny1/vendors/D1VendorItem.tsx +++ b/src/app/destiny1/vendors/D1VendorItem.tsx @@ -1,4 +1,4 @@ -import clsx from 'clsx'; +import { clsx } from 'clsx'; import BungieImage from '../../dim-ui/BungieImage'; import { VendorItemDisplay } from '../../vendors/VendorItemComponent'; import styles from './D1VendorItem.m.scss'; diff --git a/src/app/dim-ui/AlertIcon.tsx b/src/app/dim-ui/AlertIcon.tsx index fe8a922f11..f69c4970fd 100644 --- a/src/app/dim-ui/AlertIcon.tsx +++ b/src/app/dim-ui/AlertIcon.tsx @@ -1,5 +1,5 @@ import { AppIcon, faExclamationTriangle } from 'app/shell/icons'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import styles from './AlertIcon.m.scss'; export function AlertIcon({ className, title }: { className?: string; title?: string }) { diff --git a/src/app/dim-ui/BungieImage.tsx b/src/app/dim-ui/BungieImage.tsx index e23e759a97..cf0e754183 100644 --- a/src/app/dim-ui/BungieImage.tsx +++ b/src/app/dim-ui/BungieImage.tsx @@ -1,5 +1,5 @@ -import clsx from 'clsx'; -import React from 'react'; +import { clsx } from 'clsx'; +import React, { memo } from 'react'; /** * A relative path to a Bungie.net image asset. @@ -13,7 +13,7 @@ export type BungieImageProps = Omit, ' /** * An image tag that links its src to bungie.net. Other props pass through to the underlying image. */ -export default React.memo(function BungieImage(props: BungieImageProps) { +export default memo(function BungieImage(props: BungieImageProps) { const { src, ...otherProps } = props; return ( ()); +export const ClickOutsideContext = createContext(new EventBus()); type Props = React.HTMLAttributes & { children: React.ReactNode; @@ -18,7 +25,7 @@ type Props = React.HTMLAttributes & { * React DOM hierarchy rather than the real one. This is important for things like sheets * spawned through portals from the item popup. */ -export default React.forwardRef(function ClickOutside( +export default forwardRef(function ClickOutside( { onClickOutside, children, extraRef, onClick, ...other }, ref ) { diff --git a/src/app/dim-ui/ClosableContainer.tsx b/src/app/dim-ui/ClosableContainer.tsx index d405a41880..9d038520f0 100644 --- a/src/app/dim-ui/ClosableContainer.tsx +++ b/src/app/dim-ui/ClosableContainer.tsx @@ -1,4 +1,4 @@ -import clsx from 'clsx'; +import { clsx } from 'clsx'; import React from 'react'; import styles from './ClosableContainer.m.scss'; diff --git a/src/app/dim-ui/CollapsibleTitle.tsx b/src/app/dim-ui/CollapsibleTitle.tsx index 788bfc068d..72ebf5d314 100644 --- a/src/app/dim-ui/CollapsibleTitle.tsx +++ b/src/app/dim-ui/CollapsibleTitle.tsx @@ -1,6 +1,6 @@ import { collapsedSelector } from 'app/dim-api/selectors'; import { useThunkDispatch } from 'app/store/thunk-dispatch'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { AnimatePresence, motion } from 'framer-motion'; import React, { useCallback, useEffect, useRef } from 'react'; import { useSelector } from 'react-redux'; diff --git a/src/app/dim-ui/ConfirmButton.tsx b/src/app/dim-ui/ConfirmButton.tsx index 36fe4b3734..58465b9886 100644 --- a/src/app/dim-ui/ConfirmButton.tsx +++ b/src/app/dim-ui/ConfirmButton.tsx @@ -1,6 +1,6 @@ import { t } from 'app/i18next-t'; -import clsx from 'clsx'; -import React, { useEffect, useState } from 'react'; +import { clsx } from 'clsx'; +import { useEffect, useRef, useState } from 'react'; import styles from './ConfirmButton.m.scss'; /** @@ -30,8 +30,8 @@ export function ConfirmButton({ const [contentHeight, setContentHeight] = useState(0); const [containerHeight, setContainerHeight] = useState(0); - const containerRef = React.useRef(null); - const childrenRef = React.useRef(null); + const containerRef = useRef(null); + const childrenRef = useRef(null); useEffect(() => { setContentHeight(childrenRef.current?.offsetHeight || 0); diff --git a/src/app/dim-ui/CustomStatTotal.tsx b/src/app/dim-ui/CustomStatTotal.tsx index 1090d09e46..77aaef926a 100644 --- a/src/app/dim-ui/CustomStatTotal.tsx +++ b/src/app/dim-ui/CustomStatTotal.tsx @@ -3,8 +3,8 @@ import { useD2Definitions } from 'app/manifest/selectors'; import { armorStats } from 'app/search/d2-known-values'; import { useSetting } from 'app/settings/hooks'; import { DestinyClass, DestinyStatDefinition } from 'bungie-api-ts/destiny2'; -import clsx from 'clsx'; -import React, { ReactElement, ReactNode } from 'react'; +import { clsx } from 'clsx'; +import React, { ReactElement, ReactNode, cloneElement } from 'react'; import styles from './CustomStatTotal.m.scss'; export type StatHashListsKeyedByDestinyClass = Record; @@ -111,6 +111,6 @@ function toggleArrayElement(element: T, arr: T[]) { /** places a divider between each element of arr */ function addDividers(arr: T[], divider: ReactElement): ReactNode[] { return arr - .flatMap((e, index) => [e, React.cloneElement(divider, { key: `divider-${index}` })]) + .flatMap((e, index) => [e, cloneElement(divider, { key: `divider-${index}` })]) .slice(0, -1); } diff --git a/src/app/dim-ui/CustomStatWeights.tsx b/src/app/dim-ui/CustomStatWeights.tsx index 06916a1789..3e9b49903b 100644 --- a/src/app/dim-ui/CustomStatWeights.tsx +++ b/src/app/dim-ui/CustomStatWeights.tsx @@ -3,8 +3,8 @@ import { customStatsSelector } from 'app/dim-api/selectors'; import BungieImage from 'app/dim-ui/BungieImage'; import { useD2Definitions } from 'app/manifest/selectors'; import { armorStats } from 'app/search/d2-known-values'; -import clsx from 'clsx'; -import React, { ReactElement, ReactNode } from 'react'; +import { clsx } from 'clsx'; +import React, { ReactElement, ReactNode, cloneElement } from 'react'; import { useSelector } from 'react-redux'; import styles from './CustomStatWeights.m.scss'; @@ -70,8 +70,5 @@ export function CustomStatWeightsDisplay({ /** places a divider between each element of arr */ function addDividers(arr: T[], divider: ReactElement): ReactNode[] { - return arr.flatMap((e, i) => [ - i ? React.cloneElement(divider, { key: `divider-${i}` }) : null, - e, - ]); + return arr.flatMap((e, i) => [i ? cloneElement(divider, { key: `divider-${i}` }) : null, e]); } diff --git a/src/app/dim-ui/DestinyTooltipText.tsx b/src/app/dim-ui/DestinyTooltipText.tsx index 4e43a2ee6b..8db4015a27 100644 --- a/src/app/dim-ui/DestinyTooltipText.tsx +++ b/src/app/dim-ui/DestinyTooltipText.tsx @@ -1,7 +1,7 @@ import { DimItem } from 'app/inventory/item-types'; import { AppIcon, faClock } from 'app/shell/icons'; import { DestinyItemTooltipNotification } from 'bungie-api-ts/destiny2'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import shapedIcon from 'images/shaped.png'; import styles from './DestinyTooltipText.m.scss'; import RichDestinyText from './destiny-symbols/RichDestinyText'; diff --git a/src/app/dim-ui/Dropdown.tsx b/src/app/dim-ui/Dropdown.tsx index 9a4bf99732..f5ee6fe7a6 100644 --- a/src/app/dim-ui/Dropdown.tsx +++ b/src/app/dim-ui/Dropdown.tsx @@ -1,7 +1,7 @@ import { Placement } from '@popperjs/core'; import { kebabIcon, moveDownIcon } from 'app/shell/icons'; import AppIcon from 'app/shell/icons/AppIcon'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { useSelect } from 'downshift'; import { ReactNode, useRef } from 'react'; import styles from './Dropdown.m.scss'; diff --git a/src/app/dim-ui/ElementIcon.tsx b/src/app/dim-ui/ElementIcon.tsx index 8312135878..460d33ecca 100644 --- a/src/app/dim-ui/ElementIcon.tsx +++ b/src/app/dim-ui/ElementIcon.tsx @@ -1,6 +1,6 @@ import { useD2Definitions } from 'app/manifest/selectors'; import { DestinyDamageTypeDefinition } from 'bungie-api-ts/destiny2'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { bungieBackgroundStyle } from './BungieImage'; import styles from './ElementIcon.m.scss'; diff --git a/src/app/dim-ui/EnergyIncrements.tsx b/src/app/dim-ui/EnergyIncrements.tsx index f03603fdf7..8bd5a6b22e 100644 --- a/src/app/dim-ui/EnergyIncrements.tsx +++ b/src/app/dim-ui/EnergyIncrements.tsx @@ -3,7 +3,7 @@ import { t } from 'app/i18next-t'; import { DimItem } from 'app/inventory/item-types'; import { EnergySwap } from 'app/loadout-builder/generated-sets/GeneratedSetItem'; import { MAX_ARMOR_ENERGY_CAPACITY } from 'app/search/d2-known-values'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { PressTip } from './PressTip'; /** this accepts either an item, or a partial DimItem.energy */ diff --git a/src/app/dim-ui/ErrorBoundary.tsx b/src/app/dim-ui/ErrorBoundary.tsx index 76f8bbd2a5..48bfcf5974 100644 --- a/src/app/dim-ui/ErrorBoundary.tsx +++ b/src/app/dim-ui/ErrorBoundary.tsx @@ -1,6 +1,6 @@ import ErrorPanel from 'app/shell/ErrorPanel'; import { errorLog } from 'app/utils/log'; -import React from 'react'; +import React, { Component } from 'react'; import { reportException } from '../utils/exceptions'; interface Props { @@ -12,7 +12,7 @@ interface State { error?: Error; } -export default class ErrorBoundary extends React.Component { +export default class ErrorBoundary extends Component { constructor(props: Props) { super(props); this.state = {}; diff --git a/src/app/dim-ui/ExpandableTextBlock.tsx b/src/app/dim-ui/ExpandableTextBlock.tsx index eece61e99c..bba73aec3b 100644 --- a/src/app/dim-ui/ExpandableTextBlock.tsx +++ b/src/app/dim-ui/ExpandableTextBlock.tsx @@ -1,4 +1,4 @@ -import clsx from 'clsx'; +import { clsx } from 'clsx'; import React, { useEffect, useLayoutEffect, useRef, useState } from 'react'; import styles from './ExpandableTextBlock.m.scss'; diff --git a/src/app/dim-ui/FileUpload.tsx b/src/app/dim-ui/FileUpload.tsx index 1a4b8e128f..2a688b8d07 100644 --- a/src/app/dim-ui/FileUpload.tsx +++ b/src/app/dim-ui/FileUpload.tsx @@ -1,6 +1,6 @@ import { t } from 'app/i18next-t'; import { AppIcon, uploadIcon } from 'app/shell/icons'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import Dropzone, { DropzoneOptions } from 'react-dropzone'; import styles from './FileUpload.m.scss'; diff --git a/src/app/dim-ui/FilterPills.tsx b/src/app/dim-ui/FilterPills.tsx index 6c4ba82af7..c6a335f718 100644 --- a/src/app/dim-ui/FilterPills.tsx +++ b/src/app/dim-ui/FilterPills.tsx @@ -1,4 +1,4 @@ -import clsx from 'clsx'; +import { clsx } from 'clsx'; import React from 'react'; import styles from './FilterPills.m.scss'; diff --git a/src/app/dim-ui/ItemCategoryIcon.tsx b/src/app/dim-ui/ItemCategoryIcon.tsx index 1a68dfad87..25d74dfd54 100644 --- a/src/app/dim-ui/ItemCategoryIcon.tsx +++ b/src/app/dim-ui/ItemCategoryIcon.tsx @@ -1,5 +1,5 @@ import { DimItem } from 'app/inventory/item-types'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import styles from './ItemCategoryIcon.m.scss'; import { PressTip } from './PressTip'; import { diff --git a/src/app/dim-ui/KeyHelp.tsx b/src/app/dim-ui/KeyHelp.tsx index 83e9b4746e..69a2928c7a 100644 --- a/src/app/dim-ui/KeyHelp.tsx +++ b/src/app/dim-ui/KeyHelp.tsx @@ -1,5 +1,5 @@ import { symbolize } from 'app/hotkeys/hotkeys'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import styles from './KeyHelp.m.scss'; /** diff --git a/src/app/dim-ui/PageLoading.tsx b/src/app/dim-ui/PageLoading.tsx index e4f44f8e57..b439dda2eb 100644 --- a/src/app/dim-ui/PageLoading.tsx +++ b/src/app/dim-ui/PageLoading.tsx @@ -1,5 +1,5 @@ import { RootState } from 'app/store/types'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import _ from 'lodash'; import { useRef } from 'react'; import { useSelector } from 'react-redux'; diff --git a/src/app/dim-ui/PageWithMenu.tsx b/src/app/dim-ui/PageWithMenu.tsx index 25069380d1..2c8c330abd 100644 --- a/src/app/dim-ui/PageWithMenu.tsx +++ b/src/app/dim-ui/PageWithMenu.tsx @@ -1,4 +1,4 @@ -import clsx from 'clsx'; +import { clsx } from 'clsx'; import React, { useEffect, useRef, useState } from 'react'; import styles from './PageWithMenu.m.scss'; import { scrollToHref } from './scroll'; diff --git a/src/app/dim-ui/PressTip.tsx b/src/app/dim-ui/PressTip.tsx index 2118f3da76..1bedd468a0 100644 --- a/src/app/dim-ui/PressTip.tsx +++ b/src/app/dim-ui/PressTip.tsx @@ -1,10 +1,9 @@ import { Placement } from '@popperjs/core'; import { tempContainer } from 'app/utils/temp-container'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import _ from 'lodash'; -import { +import React, { MutableRefObject, - default as React, createContext, useCallback, useContext, @@ -12,7 +11,7 @@ import { useRef, useState, } from 'react'; -import ReactDOM from 'react-dom'; +import { createPortal } from 'react-dom'; import styles from './PressTip.m.scss'; import { usePopper } from './usePopper'; @@ -116,7 +115,7 @@ function Control({ {children} {open && - ReactDOM.createPortal( + createPortal(
void; @@ -153,7 +161,7 @@ function SymbolsPickerButton({ {symbolsIcon} {open && - ReactDOM.createPortal( + createPortal(
setOpen(false)}> diff --git a/src/app/dim-ui/svgs/BucketIcon.tsx b/src/app/dim-ui/svgs/BucketIcon.tsx index b5306a31ed..61ee186245 100644 --- a/src/app/dim-ui/svgs/BucketIcon.tsx +++ b/src/app/dim-ui/svgs/BucketIcon.tsx @@ -1,5 +1,5 @@ import { d2MissingIcon } from 'app/search/d2-known-values'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { BucketHashes, ItemCategoryHashes } from 'data/d2/generated-enums'; import React from 'react'; import BungieImage from '../BungieImage'; diff --git a/src/app/dim-ui/text-complete/text-complete.ts b/src/app/dim-ui/text-complete/text-complete.ts index a245a7ff74..e7e3c2e7ca 100644 --- a/src/app/dim-ui/text-complete/text-complete.ts +++ b/src/app/dim-ui/text-complete/text-complete.ts @@ -1,7 +1,7 @@ import { StrategyProps, Textcomplete } from '@textcomplete/core'; import { TextareaEditor } from '@textcomplete/textarea'; import { getHashtagsFromNote } from 'app/inventory/note-hashtags'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { useEffect } from 'react'; import { useSelector } from 'react-redux'; import { SymbolsMap, symbolsSelector } from '../destiny-symbols/destiny-symbols'; diff --git a/src/app/dim-ui/useConfirm.tsx b/src/app/dim-ui/useConfirm.tsx index 0457af951a..c319ad660a 100644 --- a/src/app/dim-ui/useConfirm.tsx +++ b/src/app/dim-ui/useConfirm.tsx @@ -1,7 +1,7 @@ import { isWindows } from 'app/utils/browsers'; import { t } from 'i18next'; import { useCallback } from 'react'; -import { Buttons, Title, default as useDialog } from './useDialog'; +import useDialog, { Buttons, Title } from './useDialog'; export interface ConfirmOpts { okLabel?: React.ReactNode; diff --git a/src/app/dim-ui/useDialog.tsx b/src/app/dim-ui/useDialog.tsx index 03ff4ea622..e3e9137002 100644 --- a/src/app/dim-ui/useDialog.tsx +++ b/src/app/dim-ui/useDialog.tsx @@ -3,7 +3,7 @@ import 'dialog-polyfill/dist/dialog-polyfill.css'; import styles from './useDialog.m.scss'; import { Portal } from 'app/utils/temp-container'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { forwardRef, useCallback, useEffect, useImperativeHandle, useRef, useState } from 'react'; // Redecalare forwardRef diff --git a/src/app/farming/Farming.tsx b/src/app/farming/Farming.tsx index c8d700c4c1..872c28565c 100644 --- a/src/app/farming/Farming.tsx +++ b/src/app/farming/Farming.tsx @@ -2,7 +2,7 @@ import { settingSelector } from 'app/dim-api/selectors'; import { t } from 'app/i18next-t'; import { useSetting } from 'app/settings/hooks'; import { useThunkDispatch } from 'app/store/thunk-dispatch'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import React, { useRef } from 'react'; import { useSelector } from 'react-redux'; import { CSSTransition, TransitionGroup } from 'react-transition-group'; diff --git a/src/app/gear-power/GearPower.tsx b/src/app/gear-power/GearPower.tsx index 461cf45b73..6b0187f84b 100644 --- a/src/app/gear-power/GearPower.tsx +++ b/src/app/gear-power/GearPower.tsx @@ -10,7 +10,7 @@ import { classFilter } from 'app/search/search-filters/known-values'; import { AppIcon, powerActionIcon } from 'app/shell/icons'; import { RootState } from 'app/store/types'; import { LookupTable } from 'app/utils/util-types'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { BucketHashes } from 'data/d2/generated-enums'; import { useSelector } from 'react-redux'; import { useSubscription } from 'use-subscription'; diff --git a/src/app/i18n.ts b/src/app/i18n.ts index 7080b4c103..3e791cae9f 100644 --- a/src/app/i18n.ts +++ b/src/app/i18n.ts @@ -1,4 +1,4 @@ -import i18next from 'i18next'; +import i18next, { use } from 'i18next'; import HttpApi from 'i18next-http-backend'; import de from 'locale/de.json'; import en from 'locale/en.json'; @@ -49,7 +49,7 @@ export function initi18n(): Promise { const lang = defaultLanguage(); return new Promise((resolve, reject) => { // See https://github.com/i18next/i18next - i18next.use(HttpApi).init( + use(HttpApi).init( { initImmediate: true, compatibilityJSON: 'v3', diff --git a/src/app/i18next-t.ts b/src/app/i18next-t.ts index d9d161f9b9..7ed30b2708 100644 --- a/src/app/i18next-t.ts +++ b/src/app/i18next-t.ts @@ -1,10 +1,10 @@ -import i18next, { TOptions } from 'i18next'; +import { t as originalT, TOptions } from 'i18next'; /** * Wrap the t function so we can import a properly typed version. The default library won't let you. */ export const t = (key: string | string[], options?: TOptions): string => - i18next.t(key, options as any) as unknown as string; + originalT(key, options as any) as unknown as string; /** * This is a "marker function" that tells our i18next-scanner that you will translate this string later (tl = translate later). diff --git a/src/app/infuse/InfusionFinder.tsx b/src/app/infuse/InfusionFinder.tsx index 4fa71fc4c1..fe70733ed7 100644 --- a/src/app/infuse/InfusionFinder.tsx +++ b/src/app/infuse/InfusionFinder.tsx @@ -9,7 +9,7 @@ import { useThunkDispatch } from 'app/store/thunk-dispatch'; import { DimThunkDispatch } from 'app/store/types'; import { useEventBusListener } from 'app/utils/hooks'; import { isD1Item } from 'app/utils/item-utils'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { useCallback, useDeferredValue, useEffect, useReducer } from 'react'; import { useSelector } from 'react-redux'; import { useLocation } from 'react-router'; diff --git a/src/app/inventory-page/CategoryStrip.tsx b/src/app/inventory-page/CategoryStrip.tsx index 23f6f93093..a17c8300cf 100644 --- a/src/app/inventory-page/CategoryStrip.tsx +++ b/src/app/inventory-page/CategoryStrip.tsx @@ -1,6 +1,6 @@ import { t } from 'app/i18next-t'; import { InventoryBuckets } from 'app/inventory/inventory-buckets'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import styles from './CategoryStrip.m.scss'; /** diff --git a/src/app/inventory-page/D1ReputationSection.tsx b/src/app/inventory-page/D1ReputationSection.tsx index 677293e10d..8f33251c9d 100644 --- a/src/app/inventory-page/D1ReputationSection.tsx +++ b/src/app/inventory-page/D1ReputationSection.tsx @@ -1,6 +1,6 @@ import { t } from 'app/i18next-t'; import { D1Store, DimStore } from 'app/inventory/store-types'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import CollapsibleTitle from '../dim-ui/CollapsibleTitle'; import D1Reputation from './D1Reputation'; diff --git a/src/app/inventory-page/DesktopStores.tsx b/src/app/inventory-page/DesktopStores.tsx index 05f3def744..b848dcb4f0 100644 --- a/src/app/inventory-page/DesktopStores.tsx +++ b/src/app/inventory-page/DesktopStores.tsx @@ -10,7 +10,7 @@ import { AppIcon, maximizeIcon, minimizeIcon } from 'app/shell/icons'; import StoreStats from 'app/store-stats/StoreStats'; import { useEventBusListener } from 'app/utils/hooks'; import { DestinyClass } from 'bungie-api-ts/destiny2'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { useMemo } from 'react'; import StoreHeading from '../character-tile/StoreHeading'; import D1ReputationSection from './D1ReputationSection'; diff --git a/src/app/inventory-page/HeaderShadowDiv.tsx b/src/app/inventory-page/HeaderShadowDiv.tsx index c4610aeb8f..e24844be08 100644 --- a/src/app/inventory-page/HeaderShadowDiv.tsx +++ b/src/app/inventory-page/HeaderShadowDiv.tsx @@ -1,9 +1,9 @@ import { useSetCSSVarToHeight } from 'app/utils/hooks'; -import React, { useRef } from 'react'; +import React, { memo, useRef } from 'react'; import styles from './HeaderShadowDiv.m.scss'; // Also sets `--store-header-height` to the height of `children` -export default React.memo(({ children, ...divProps }: React.HTMLAttributes) => { +export default memo(({ children, ...divProps }: React.HTMLAttributes) => { const ref = useRef(null); useSetCSSVarToHeight(ref, '--store-header-height'); return ( diff --git a/src/app/inventory-page/InventoryCollapsibleTitle.tsx b/src/app/inventory-page/InventoryCollapsibleTitle.tsx index 4f91b308c7..827c56c725 100644 --- a/src/app/inventory-page/InventoryCollapsibleTitle.tsx +++ b/src/app/inventory-page/InventoryCollapsibleTitle.tsx @@ -7,7 +7,7 @@ import { postmasterSpaceUsed, } from 'app/loadout-drawer/postmaster'; import { useThunkDispatch } from 'app/store/thunk-dispatch'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { AnimatePresence, motion } from 'framer-motion'; import React, { useCallback, useEffect, useRef } from 'react'; import { useSelector } from 'react-redux'; diff --git a/src/app/inventory-page/StoreBucket.tsx b/src/app/inventory-page/StoreBucket.tsx index 8ffa1479c2..57e8d0a888 100644 --- a/src/app/inventory-page/StoreBucket.tsx +++ b/src/app/inventory-page/StoreBucket.tsx @@ -18,7 +18,7 @@ import { useThunkDispatch } from 'app/store/thunk-dispatch'; import { RootState } from 'app/store/types'; import { emptyArray } from 'app/utils/empty'; import { DestinyClass } from 'bungie-api-ts/destiny2'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { BucketHashes } from 'data/d2/generated-enums'; import emptyEngram from 'destiny-icons/general/empty-engram.svg'; import { shallowEqual } from 'fast-equals'; diff --git a/src/app/inventory-page/StoreBucketDropTarget.tsx b/src/app/inventory-page/StoreBucketDropTarget.tsx index 92609f89d9..43ec30411d 100644 --- a/src/app/inventory-page/StoreBucketDropTarget.tsx +++ b/src/app/inventory-page/StoreBucketDropTarget.tsx @@ -4,7 +4,7 @@ import { dropItem } from 'app/inventory/move-item'; import { useThunkDispatch } from 'app/store/thunk-dispatch'; import { itemCanBeEquippedByStoreId } from 'app/utils/item-utils'; import { DestinyClass } from 'bungie-api-ts/destiny2'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import React from 'react'; import { useDrop } from 'react-dnd'; import styles from './StoreBucketDropTarget.m.scss'; diff --git a/src/app/inventory-page/StoreBuckets.tsx b/src/app/inventory-page/StoreBuckets.tsx index f60dd9a90e..8ae1b79df4 100644 --- a/src/app/inventory-page/StoreBuckets.tsx +++ b/src/app/inventory-page/StoreBuckets.tsx @@ -7,7 +7,7 @@ import { postmasterAlmostFull, postmasterSpaceUsed, } from 'app/loadout-drawer/postmaster'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { BucketHashes } from 'data/d2/generated-enums'; import React from 'react'; import StoreBucket from '../inventory-page/StoreBucket'; diff --git a/src/app/inventory/ArtifactXP.tsx b/src/app/inventory/ArtifactXP.tsx index 7575b969ac..ae69b42378 100644 --- a/src/app/inventory/ArtifactXP.tsx +++ b/src/app/inventory/ArtifactXP.tsx @@ -1,6 +1,6 @@ import { percent } from 'app/shell/formatters'; import { DestinyCharacterProgressionComponent } from 'bungie-api-ts/destiny2'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import xpIcon from '../../images/xpIcon.svg'; import styles from './ArtifactXP.m.scss'; const formatter = new Intl.NumberFormat(); diff --git a/src/app/inventory/BadgeInfo.tsx b/src/app/inventory/BadgeInfo.tsx index 3a9602bf25..be19ab0a3f 100644 --- a/src/app/inventory/BadgeInfo.tsx +++ b/src/app/inventory/BadgeInfo.tsx @@ -3,7 +3,7 @@ import { getColor } from 'app/shell/formatters'; import { isD1Item } from 'app/utils/item-utils'; import { InventoryWishListRoll, toUiWishListRoll } from 'app/wishlists/wishlists'; import { DamageType } from 'bungie-api-ts/destiny2'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { BucketHashes } from 'data/d2/generated-enums'; import shapedIcon from 'images/shaped.png'; import { useSelector } from 'react-redux'; diff --git a/src/app/inventory/DraggableInventoryItem.tsx b/src/app/inventory/DraggableInventoryItem.tsx index 4347109bcb..75aadba2c8 100644 --- a/src/app/inventory/DraggableInventoryItem.tsx +++ b/src/app/inventory/DraggableInventoryItem.tsx @@ -1,5 +1,5 @@ import { hideItemPopup } from 'app/item-popup/item-popup'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import React from 'react'; import { useDrag } from 'react-dnd'; import styles from './DraggableInventoryItem.m.scss'; diff --git a/src/app/inventory/InventoryItem.tsx b/src/app/inventory/InventoryItem.tsx index 849dceab5c..e6c446f3b4 100644 --- a/src/app/inventory/InventoryItem.tsx +++ b/src/app/inventory/InventoryItem.tsx @@ -1,5 +1,5 @@ import { percent } from 'app/shell/formatters'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { BucketHashes } from 'data/d2/generated-enums'; import React, { useMemo } from 'react'; import BungieImage from '../dim-ui/BungieImage'; diff --git a/src/app/inventory/ItemIcon.tsx b/src/app/inventory/ItemIcon.tsx index 1d5bf7743b..349abba2fa 100644 --- a/src/app/inventory/ItemIcon.tsx +++ b/src/app/inventory/ItemIcon.tsx @@ -5,7 +5,7 @@ import { D2ItemTiers, d2MissingIcon, ItemTierName } from 'app/search/d2-known-va import { errorLog } from 'app/utils/log'; import { isModCostVisible } from 'app/utils/socket-utils'; import { DestinyInventoryItemDefinition } from 'bungie-api-ts/destiny2'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { BucketHashes, ItemCategoryHashes, PlugCategoryHashes } from 'data/d2/generated-enums'; import pursuitComplete from 'images/highlightedObjective.svg'; import { DimItem } from './item-types'; diff --git a/src/app/inventory/ItemIconPlaceholder.tsx b/src/app/inventory/ItemIconPlaceholder.tsx index fb077521e7..8f393f8918 100644 --- a/src/app/inventory/ItemIconPlaceholder.tsx +++ b/src/app/inventory/ItemIconPlaceholder.tsx @@ -1,6 +1,6 @@ // TODO: cache intersection observer? -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { useEffect, useRef, useState } from 'react'; import { getItemImageStyles } from './ItemIcon'; import styles from './ItemIconPlaceholder.m.scss'; diff --git a/src/app/inventory/ItemPowerSet.tsx b/src/app/inventory/ItemPowerSet.tsx index 3bbb17adb2..c63889ae58 100644 --- a/src/app/inventory/ItemPowerSet.tsx +++ b/src/app/inventory/ItemPowerSet.tsx @@ -1,5 +1,5 @@ import BucketIcon from 'app/dim-ui/svgs/BucketIcon'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import React from 'react'; import styles from './ItemPowerSet.m.scss'; import { DimItem } from './item-types'; diff --git a/src/app/inventory/MoveNotifications.tsx b/src/app/inventory/MoveNotifications.tsx index e6fec95eb2..5167048bdc 100644 --- a/src/app/inventory/MoveNotifications.tsx +++ b/src/app/inventory/MoveNotifications.tsx @@ -16,7 +16,7 @@ import { DimError } from 'app/utils/dim-error'; import { useThrottledSubscription } from 'app/utils/hooks'; import { Observable } from 'app/utils/observable'; import { LookupTable } from 'app/utils/util-types'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import _ from 'lodash'; import { useEffect, useState } from 'react'; import ConnectedInventoryItem from './ConnectedInventoryItem'; diff --git a/src/app/inventory/NewItemIndicator.tsx b/src/app/inventory/NewItemIndicator.tsx index f85a744b1e..2b51213867 100644 --- a/src/app/inventory/NewItemIndicator.tsx +++ b/src/app/inventory/NewItemIndicator.tsx @@ -1,4 +1,4 @@ -import clsx from 'clsx'; +import { clsx } from 'clsx'; import styles from './NewItemIndicator.m.scss'; export default function NewItemIndicator({ className }: { className?: string }) { diff --git a/src/app/inventory/spreadsheets.ts b/src/app/inventory/spreadsheets.ts index ddc54ebb31..b245082706 100644 --- a/src/app/inventory/spreadsheets.ts +++ b/src/app/inventory/spreadsheets.ts @@ -19,7 +19,7 @@ import { BucketHashes, StatHashes } from 'data/d2/generated-enums'; import D2MissingSources from 'data/d2/missing-source-info'; import D2Sources from 'data/d2/source-info'; import _ from 'lodash'; -import Papa from 'papaparse'; +import Papa, { parse, unparse } from 'papaparse'; import { setItemNote, setItemTagsBulk } from './actions'; import { TagValue, tagConfig } from './dim-item-info'; import { D1GridNode, DimItem, DimSockets } from './item-types'; @@ -141,7 +141,7 @@ export function importTagsNotesFromCsv(files: File[]): ThunkResult>((resolve, reject) => - Papa.parse(file, { + parse(file, { header: true, complete: resolve, error: reject, @@ -306,7 +306,7 @@ function downloadGhost( return row; }); - downloadCsv('destinyGhosts', Papa.unparse(data)); + downloadCsv('destinyGhosts', unparse(data)); } function equippable(item: DimItem) { @@ -428,7 +428,7 @@ function downloadArmor( return row; }); - downloadCsv('destinyArmor', Papa.unparse(data)); + downloadCsv('destinyArmor', unparse(data)); } function downloadWeapons( @@ -624,5 +624,5 @@ function downloadWeapons( return row; }); - downloadCsv('destinyWeapons', Papa.unparse(data)); + downloadCsv('destinyWeapons', unparse(data)); } diff --git a/src/app/inventory/store/d2-item-factory.ts b/src/app/inventory/store/d2-item-factory.ts index 10691b23ae..29533e767d 100644 --- a/src/app/inventory/store/d2-item-factory.ts +++ b/src/app/inventory/store/d2-item-factory.ts @@ -1,7 +1,6 @@ import { CustomStatDef } from '@destinyitemmanager/dim-api-types'; import { D2Categories } from 'app/destiny2/d2-bucket-categories'; import { t } from 'app/i18next-t'; -import { isTrialsPassage, isWinsObjective } from 'app/inventory/store/objectives'; import { D2ItemTiers, THE_FORBIDDEN_BUCKET, @@ -53,7 +52,7 @@ import { buildCraftedInfo } from './crafted'; import { buildDeepsightInfo } from './deepsight'; import { createItemIndex } from './item-index'; import { buildMasterwork } from './masterwork'; -import { buildObjectives } from './objectives'; +import { buildObjectives, isTrialsPassage, isWinsObjective } from './objectives'; import { buildPatternInfo } from './patterns'; import { buildSockets } from './sockets'; import { buildStats } from './stats'; diff --git a/src/app/item-actions/ActionButton.tsx b/src/app/item-actions/ActionButton.tsx index 81423f14fa..78941a3870 100644 --- a/src/app/item-actions/ActionButton.tsx +++ b/src/app/item-actions/ActionButton.tsx @@ -1,5 +1,5 @@ import { symbolize } from 'app/hotkeys/hotkeys'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import React from 'react'; import styles from './ActionButton.m.scss'; diff --git a/src/app/item-actions/ActionButtons.tsx b/src/app/item-actions/ActionButtons.tsx index 37ccb13175..a5dd04f57f 100644 --- a/src/app/item-actions/ActionButtons.tsx +++ b/src/app/item-actions/ActionButtons.tsx @@ -15,7 +15,7 @@ import { ItemActionsModel } from 'app/item-popup/item-popup-actions'; import { addItemToLoadout } from 'app/loadout-drawer/loadout-events'; import { AppIcon, addIcon, compareIcon } from 'app/shell/icons'; import { useThunkDispatch } from 'app/store/thunk-dispatch'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { BucketHashes } from 'data/d2/generated-enums'; import { useDispatch, useSelector } from 'react-redux'; import arrowsIn from '../../images/arrows-in.png'; diff --git a/src/app/item-actions/ItemActionsDropdown.tsx b/src/app/item-actions/ItemActionsDropdown.tsx index eae0ce75a1..b1d8d16bd1 100644 --- a/src/app/item-actions/ItemActionsDropdown.tsx +++ b/src/app/item-actions/ItemActionsDropdown.tsx @@ -17,7 +17,7 @@ import { useIsPhonePortrait } from 'app/shell/selectors'; import { useThunkDispatch } from 'app/store/thunk-dispatch'; import { stripSockets } from 'app/strip-sockets/strip-sockets-actions'; import _ from 'lodash'; -import React from 'react'; +import { memo } from 'react'; import { useSelector } from 'react-redux'; import { useLocation } from 'react-router'; import { TagCommand, itemTagSelectorList } from '../inventory/dim-item-info'; @@ -40,7 +40,7 @@ import styles from './ItemActionsDropdown.m.scss'; /** * Various actions that can be performed on an item */ -export default React.memo(function ItemActionsDropdown({ +export default memo(function ItemActionsDropdown({ searchActive, filteredItems, searchQuery, diff --git a/src/app/item-actions/ItemMoveLocations.tsx b/src/app/item-actions/ItemMoveLocations.tsx index 7e11e55321..9ebf9bb038 100644 --- a/src/app/item-actions/ItemMoveLocations.tsx +++ b/src/app/item-actions/ItemMoveLocations.tsx @@ -11,7 +11,7 @@ import ItemMoveAmount from 'app/item-popup/ItemMoveAmount'; import { hideItemPopup } from 'app/item-popup/item-popup'; import { ItemActionsModel, StoreButtonInfo } from 'app/item-popup/item-popup-actions'; import { useThunkDispatch } from 'app/store/thunk-dispatch'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { BucketHashes } from 'data/d2/generated-enums'; import _ from 'lodash'; import React, { useState } from 'react'; diff --git a/src/app/item-actions/LockButton.tsx b/src/app/item-actions/LockButton.tsx index ff39092e47..5aee8c3451 100644 --- a/src/app/item-actions/LockButton.tsx +++ b/src/app/item-actions/LockButton.tsx @@ -4,7 +4,7 @@ import { t } from 'app/i18next-t'; import { setItemLockState } from 'app/inventory/item-move-service'; import { hideItemPopup } from 'app/item-popup/item-popup'; import { useThunkDispatch } from 'app/store/thunk-dispatch'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { BucketHashes } from 'data/d2/generated-enums'; import React, { useState } from 'react'; import { DimItem } from '../inventory/item-types'; diff --git a/src/app/item-feed/Highlights.tsx b/src/app/item-feed/Highlights.tsx index abc6c31c96..ad1ca69de1 100644 --- a/src/app/item-feed/Highlights.tsx +++ b/src/app/item-feed/Highlights.tsx @@ -5,7 +5,7 @@ import { DimItem, DimStat } from 'app/inventory/item-types'; import { ItemTypeName } from 'app/item-popup/ItemPopupHeader'; import { DimPlugTooltip } from 'app/item-popup/PlugTooltip'; import { getWeaponArchetype, socketContainsPlugWithCategory } from 'app/utils/socket-utils'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { PlugCategoryHashes } from 'data/d2/generated-enums'; import '../store-stats/CharacterStats.scss'; import styles from './Highlights.m.scss'; diff --git a/src/app/item-feed/ItemFeed.tsx b/src/app/item-feed/ItemFeed.tsx index bd75fb9109..e6b856723f 100644 --- a/src/app/item-feed/ItemFeed.tsx +++ b/src/app/item-feed/ItemFeed.tsx @@ -12,7 +12,7 @@ import { useSetting } from 'app/settings/hooks'; import { getItemRecencyKey, isNewerThan } from 'app/shell/item-comparators'; import { useIsPhonePortrait } from 'app/shell/selectors'; import { DestinyClass } from 'bungie-api-ts/destiny2'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import _ from 'lodash'; import { memo } from 'react'; import { useSelector } from 'react-redux'; diff --git a/src/app/item-feed/ItemFeedPage.tsx b/src/app/item-feed/ItemFeedPage.tsx index 779af36699..59fb0ef9c2 100644 --- a/src/app/item-feed/ItemFeedPage.tsx +++ b/src/app/item-feed/ItemFeedPage.tsx @@ -3,10 +3,10 @@ import ShowPageLoading from 'app/dim-ui/ShowPageLoading'; import { t } from 'app/i18next-t'; import { useLoadStores } from 'app/inventory/store/hooks'; import { usePageTitle } from 'app/utils/hooks'; -import React, { Suspense } from 'react'; +import { Suspense, lazy } from 'react'; import styles from './ItemFeedPage.m.scss'; -const ItemFeed = React.lazy(() => import(/* webpackChunkName: "item-feed" */ './ItemFeed')); +const ItemFeed = lazy(() => import(/* webpackChunkName: "item-feed" */ './ItemFeed')); /** * The Item Feed in a full page for mobile. diff --git a/src/app/item-feed/ItemFeedSidebar.tsx b/src/app/item-feed/ItemFeedSidebar.tsx index dbf72207bb..2e73164faf 100644 --- a/src/app/item-feed/ItemFeedSidebar.tsx +++ b/src/app/item-feed/ItemFeedSidebar.tsx @@ -2,11 +2,11 @@ import ShowPageLoading from 'app/dim-ui/ShowPageLoading'; import { t } from 'app/i18next-t'; import { useSetting } from 'app/settings/hooks'; import { AppIcon, collapseIcon, faCaretUp } from 'app/shell/icons'; -import clsx from 'clsx'; -import React, { Suspense, useEffect } from 'react'; +import { clsx } from 'clsx'; +import { Suspense, lazy, useEffect } from 'react'; import styles from './ItemFeedSidebar.m.scss'; -const ItemFeed = React.lazy(() => import(/* webpackChunkName: "item-feed" */ './ItemFeed')); +const ItemFeed = lazy(() => import(/* webpackChunkName: "item-feed" */ './ItemFeed')); /** * The Item Feed in an expandable sidebar to be placed on the inventory screen. diff --git a/src/app/item-popup/ArchetypeSocket.tsx b/src/app/item-popup/ArchetypeSocket.tsx index b89a8b1b57..97d715cef4 100644 --- a/src/app/item-popup/ArchetypeSocket.tsx +++ b/src/app/item-popup/ArchetypeSocket.tsx @@ -1,5 +1,5 @@ import { DimItem, DimSocket } from 'app/inventory/item-types'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import React from 'react'; import styles from './ArchetypeSocket.m.scss'; import { PlugClickHandler } from './ItemSockets'; diff --git a/src/app/item-popup/DesktopItemActions.tsx b/src/app/item-popup/DesktopItemActions.tsx index 1ad9479147..b6e569f755 100644 --- a/src/app/item-popup/DesktopItemActions.tsx +++ b/src/app/item-popup/DesktopItemActions.tsx @@ -12,7 +12,7 @@ import { hideItemPopup } from 'app/item-popup/item-popup'; import { useSetting } from 'app/settings/hooks'; import { AppIcon, maximizeIcon, minimizeIcon } from 'app/shell/icons'; import { useThunkDispatch } from 'app/store/thunk-dispatch'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { useSelector } from 'react-redux'; import styles from './DesktopItemActions.m.scss'; import { ItemActionsModel } from './item-popup-actions'; diff --git a/src/app/item-popup/EmoteSockets.tsx b/src/app/item-popup/EmoteSockets.tsx index cea8f3f1d3..c0a39ce63f 100644 --- a/src/app/item-popup/EmoteSockets.tsx +++ b/src/app/item-popup/EmoteSockets.tsx @@ -1,7 +1,7 @@ import { DefItemIcon } from 'app/inventory/ItemIcon'; import { DimItem, DimSocket } from 'app/inventory/item-types'; import { DestinyInventoryItemDefinition } from 'bungie-api-ts/destiny2'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import styles from './EmoteSockets.m.scss'; import { PlugClickHandler } from './ItemSockets'; import Socket from './Socket'; diff --git a/src/app/item-popup/EnergyMeter.tsx b/src/app/item-popup/EnergyMeter.tsx index 3075afce8f..d8abb673a2 100644 --- a/src/app/item-popup/EnergyMeter.tsx +++ b/src/app/item-popup/EnergyMeter.tsx @@ -9,7 +9,7 @@ import { AppIcon, disabledIcon, enabledIcon } from 'app/shell/icons'; import { useThunkDispatch } from 'app/store/thunk-dispatch'; import { getFirstSocketByCategoryHash } from 'app/utils/socket-utils'; import Cost from 'app/vendors/Cost'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { SocketCategoryHashes } from 'data/d2/generated-enums'; import { AnimatePresence, motion } from 'framer-motion'; import _ from 'lodash'; diff --git a/src/app/item-popup/ItemExpiration.tsx b/src/app/item-popup/ItemExpiration.tsx index 3903df7659..f43dc1fb43 100644 --- a/src/app/item-popup/ItemExpiration.tsx +++ b/src/app/item-popup/ItemExpiration.tsx @@ -2,7 +2,7 @@ import Countdown from 'app/dim-ui/Countdown'; import { t } from 'app/i18next-t'; import { DimItem } from 'app/inventory/item-types'; import { AppIcon, faClock } from 'app/shell/icons'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; export default function ItemExpiration({ item, compact }: { item: DimItem; compact?: boolean }) { if (!item.pursuit?.expirationDate) { diff --git a/src/app/item-popup/ItemPerksList.tsx b/src/app/item-popup/ItemPerksList.tsx index d3212fbe45..322648b483 100644 --- a/src/app/item-popup/ItemPerksList.tsx +++ b/src/app/item-popup/ItemPerksList.tsx @@ -2,7 +2,7 @@ import { useD2Definitions } from 'app/manifest/selectors'; import { isKillTrackerSocket } from 'app/utils/item-utils'; import { getSocketsByIndexes } from 'app/utils/socket-utils'; import { wishListSelector } from 'app/wishlists/selectors'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { useState } from 'react'; import { useSelector } from 'react-redux'; import { DimItem, DimPlug, DimSocket, DimSocketCategory } from '../inventory/item-types'; diff --git a/src/app/item-popup/ItemPopup.tsx b/src/app/item-popup/ItemPopup.tsx index 6a997976e4..6e3051d6a6 100644 --- a/src/app/item-popup/ItemPopup.tsx +++ b/src/app/item-popup/ItemPopup.tsx @@ -7,7 +7,7 @@ import ItemAccessoryButtons from 'app/item-actions/ItemAccessoryButtons'; import ItemMoveLocations from 'app/item-actions/ItemMoveLocations'; import type { ItemTierName } from 'app/search/d2-known-values'; import { useIsPhonePortrait } from 'app/shell/selectors'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { useMemo, useRef, useState } from 'react'; import { useSelector } from 'react-redux'; import DesktopItemActions, { menuClassName } from './DesktopItemActions'; diff --git a/src/app/item-popup/ItemPopupBody.tsx b/src/app/item-popup/ItemPopupBody.tsx index f580d6a810..ba8fb899b7 100644 --- a/src/app/item-popup/ItemPopupBody.tsx +++ b/src/app/item-popup/ItemPopupBody.tsx @@ -2,7 +2,7 @@ import RichDestinyText from 'app/dim-ui/destiny-symbols/RichDestinyText'; import { t } from 'app/i18next-t'; import { doShowTriage, ItemTriage, TriageTabToggle } from 'app/item-triage/ItemTriage'; import { percent } from 'app/shell/formatters'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { DimItem } from '../inventory/item-types'; import { ItemPopupExtraInfo } from './item-popup'; import ItemDetails from './ItemDetails'; diff --git a/src/app/item-popup/ItemPopupHeader.tsx b/src/app/item-popup/ItemPopupHeader.tsx index e2736c04fc..d2afa8330e 100644 --- a/src/app/item-popup/ItemPopupHeader.tsx +++ b/src/app/item-popup/ItemPopupHeader.tsx @@ -9,7 +9,7 @@ import type { ItemTierName } from 'app/search/d2-known-values'; import { Portal } from 'app/utils/temp-container'; import { LookupTable } from 'app/utils/util-types'; import { DestinyAmmunitionType, DestinyClass } from 'bungie-api-ts/destiny2'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { BucketHashes } from 'data/d2/generated-enums'; import heavy from 'destiny-icons/general/ammo-heavy.svg'; import primary from 'destiny-icons/general/ammo-primary.svg'; diff --git a/src/app/item-popup/ItemSocketsGeneral.tsx b/src/app/item-popup/ItemSocketsGeneral.tsx index 55b938513a..ceaefa7cd2 100644 --- a/src/app/item-popup/ItemSocketsGeneral.tsx +++ b/src/app/item-popup/ItemSocketsGeneral.tsx @@ -9,7 +9,7 @@ import { isEventArmorRerollSocket, } from 'app/utils/socket-utils'; import { DestinySocketCategoryStyle } from 'bungie-api-ts/destiny2'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { SocketCategoryHashes } from 'data/d2/generated-enums'; import { useSelector } from 'react-redux'; import { DimItem, DimSocket, DimSocketCategory } from '../inventory/item-types'; diff --git a/src/app/item-popup/ItemSocketsWeapons.tsx b/src/app/item-popup/ItemSocketsWeapons.tsx index 92f6fa7e93..da47b0b852 100644 --- a/src/app/item-popup/ItemSocketsWeapons.tsx +++ b/src/app/item-popup/ItemSocketsWeapons.tsx @@ -12,7 +12,7 @@ import { getWeaponArchetypeSocket, } from 'app/utils/socket-utils'; import { LookupTable } from 'app/utils/util-types'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { ItemCategoryHashes, PlugCategoryHashes, diff --git a/src/app/item-popup/ItemStat.tsx b/src/app/item-popup/ItemStat.tsx index 311ba8bf5e..e9ec66b6c6 100644 --- a/src/app/item-popup/ItemStat.tsx +++ b/src/app/item-popup/ItemStat.tsx @@ -13,7 +13,7 @@ import { AppIcon, helpIcon } from 'app/shell/icons'; import { isPlugStatActive } from 'app/utils/item-utils'; import { LookupTable } from 'app/utils/util-types'; import { DestinySocketCategoryStyle } from 'bungie-api-ts/destiny2'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { ItemCategoryHashes, StatHashes } from 'data/d2/generated-enums'; import _ from 'lodash'; import { useSelector } from 'react-redux'; diff --git a/src/app/item-popup/ItemStats.tsx b/src/app/item-popup/ItemStats.tsx index 87c352b240..82eb98bc27 100644 --- a/src/app/item-popup/ItemStats.tsx +++ b/src/app/item-popup/ItemStats.tsx @@ -1,5 +1,5 @@ import { isD1Item } from 'app/utils/item-utils'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { DimItem, DimStat } from '../inventory/item-types'; import ItemStat, { D1QualitySummaryStat, isD1Stat } from './ItemStat'; import styles from './ItemStats.m.scss'; diff --git a/src/app/item-popup/ItemTagSelector.tsx b/src/app/item-popup/ItemTagSelector.tsx index b186664a66..05161a6634 100644 --- a/src/app/item-popup/ItemTagSelector.tsx +++ b/src/app/item-popup/ItemTagSelector.tsx @@ -5,7 +5,7 @@ import { setTag } from 'app/inventory/actions'; import { tagSelector } from 'app/inventory/selectors'; import { AppIcon, clearIcon } from 'app/shell/icons'; import { useThunkDispatch } from 'app/store/thunk-dispatch'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import _ from 'lodash'; import { useSelector } from 'react-redux'; import { TagInfo, TagValue, itemTagSelectorList } from '../inventory/dim-item-info'; diff --git a/src/app/item-popup/ItemTalentGrid.tsx b/src/app/item-popup/ItemTalentGrid.tsx index 37354a4efa..bc86f1dbda 100644 --- a/src/app/item-popup/ItemTalentGrid.tsx +++ b/src/app/item-popup/ItemTalentGrid.tsx @@ -1,4 +1,4 @@ -import clsx from 'clsx'; +import { clsx } from 'clsx'; import _ from 'lodash'; import { memo } from 'react'; import { bungieNetPath } from '../dim-ui/BungieImage'; diff --git a/src/app/item-popup/NotesArea.tsx b/src/app/item-popup/NotesArea.tsx index 311ce36723..25d10bf3aa 100644 --- a/src/app/item-popup/NotesArea.tsx +++ b/src/app/item-popup/NotesArea.tsx @@ -9,7 +9,7 @@ import { AppIcon, editIcon } from 'app/shell/icons'; import { useIsPhonePortrait } from 'app/shell/selectors'; import { useThunkDispatch } from 'app/store/thunk-dispatch'; import { isiOSBrowser } from 'app/utils/browsers'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import React, { useCallback, useLayoutEffect, useRef, useState } from 'react'; import { useSelector } from 'react-redux'; import TextareaAutosize from 'react-textarea-autosize'; diff --git a/src/app/item-popup/Plug.tsx b/src/app/item-popup/Plug.tsx index 7b405cc8c6..ca0e64c9c9 100644 --- a/src/app/item-popup/Plug.tsx +++ b/src/app/item-popup/Plug.tsx @@ -4,7 +4,7 @@ import { isPluggableItem } from 'app/inventory/store/sockets'; import { useD2Definitions } from 'app/manifest/selectors'; import { isEnhancedPerk, isWeaponMasterworkSocket } from 'app/utils/socket-utils'; import WishListPerkThumb from 'app/wishlists/WishListPerkThumb'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { PressTip } from '../dim-ui/PressTip'; import { DimItem, DimPlug, DimSocket } from '../inventory/item-types'; import { InventoryWishListRoll, isWishListPlug } from '../wishlists/wishlists'; diff --git a/src/app/item-popup/PlugTooltip.tsx b/src/app/item-popup/PlugTooltip.tsx index 364b24540d..2c2616748a 100644 --- a/src/app/item-popup/PlugTooltip.tsx +++ b/src/app/item-popup/PlugTooltip.tsx @@ -22,7 +22,7 @@ import { DestinyUnlockValueUIStyle, TierType, } from 'bungie-api-ts/destiny2'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import enhancedIntrinsics from 'data/d2/crafting-enhanced-intrinsics'; import { useCallback } from 'react'; import { DimItem, DimPlug, PluggableInventoryItemDefinition } from '../inventory/item-types'; diff --git a/src/app/item-popup/SocketDetails.tsx b/src/app/item-popup/SocketDetails.tsx index 127ac4d12f..d24e0cac03 100644 --- a/src/app/item-popup/SocketDetails.tsx +++ b/src/app/item-popup/SocketDetails.tsx @@ -20,7 +20,7 @@ import { createPlugSearchPredicate } from 'app/search/plug-search'; import { chainComparator, compareBy, reverseComparator } from 'app/utils/comparators'; import { emptySet } from 'app/utils/empty'; import { DestinyProfileResponse, PlugUiStyles, SocketPlugSources } from 'bungie-api-ts/destiny2'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { BucketHashes, PlugCategoryHashes } from 'data/d2/generated-enums'; import { memo, useMemo, useState } from 'react'; import { useSelector } from 'react-redux'; diff --git a/src/app/item-popup/SocketDetailsSelectedPlug.tsx b/src/app/item-popup/SocketDetailsSelectedPlug.tsx index 12707837ba..5304733ee9 100644 --- a/src/app/item-popup/SocketDetailsSelectedPlug.tsx +++ b/src/app/item-popup/SocketDetailsSelectedPlug.tsx @@ -21,7 +21,7 @@ import { isPlugStatActive } from 'app/utils/item-utils'; import { usePlugDescriptions } from 'app/utils/plug-descriptions'; import { LookupTable } from 'app/utils/util-types'; import { DestinyItemSocketEntryDefinition } from 'bungie-api-ts/destiny2'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { PlugCategoryHashes, SocketCategoryHashes, StatHashes } from 'data/d2/generated-enums'; import { motion } from 'framer-motion'; import _ from 'lodash'; diff --git a/src/app/item-triage/ItemTriage.tsx b/src/app/item-triage/ItemTriage.tsx index 3ac6af2230..4796192915 100644 --- a/src/app/item-triage/ItemTriage.tsx +++ b/src/app/item-triage/ItemTriage.tsx @@ -22,7 +22,7 @@ import { loadoutToSearchString } from 'app/search/search-filters/loadouts'; import { AppIcon, compareIcon, editIcon } from 'app/shell/icons'; import WishListPerkThumb from 'app/wishlists/WishListPerkThumb'; import { wishListSelector } from 'app/wishlists/selectors'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { BucketHashes } from 'data/d2/generated-enums'; import helmet from 'destiny-icons/armor_types/helmet.svg'; import _ from 'lodash'; diff --git a/src/app/item-triage/triage-factors.tsx b/src/app/item-triage/triage-factors.tsx index cb4324fc0b..f95177edcd 100644 --- a/src/app/item-triage/triage-factors.tsx +++ b/src/app/item-triage/triage-factors.tsx @@ -21,7 +21,7 @@ import { getWeaponArchetype, getWeaponArchetypeSocket, } from 'app/utils/socket-utils'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import React from 'react'; import styles from './TriageFactors.m.scss'; diff --git a/src/app/loadout-builder/LoadoutBucketDropTarget.tsx b/src/app/loadout-builder/LoadoutBucketDropTarget.tsx index 603fa9a243..cccb1e53ac 100644 --- a/src/app/loadout-builder/LoadoutBucketDropTarget.tsx +++ b/src/app/loadout-builder/LoadoutBucketDropTarget.tsx @@ -1,5 +1,5 @@ import { bucketTypesSelector } from 'app/loadout-drawer/LoadoutDrawerDropTarget'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import React from 'react'; import { useDrop } from 'react-dnd'; import { useSelector } from 'react-redux'; diff --git a/src/app/loadout-builder/filter/TierSelect.tsx b/src/app/loadout-builder/filter/TierSelect.tsx index 5df4792d40..3609fdde41 100644 --- a/src/app/loadout-builder/filter/TierSelect.tsx +++ b/src/app/loadout-builder/filter/TierSelect.tsx @@ -4,9 +4,9 @@ import { t } from 'app/i18next-t'; import { useD2Definitions } from 'app/manifest/selectors'; import { AppIcon, dragHandleIcon } from 'app/shell/icons'; import { DestinyStatDefinition } from 'bungie-api-ts/destiny2'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import _ from 'lodash'; -import React from 'react'; +import React, { memo } from 'react'; import { ArmorStatHashes, MinMaxIgnored, StatFilters, StatRanges } from '../types'; import { statTierWithHalf } from '../utils'; import styles from './TierSelect.m.scss'; @@ -14,7 +14,7 @@ import styles from './TierSelect.m.scss'; const IGNORE = 'ignore'; const INCLUDE = 'include'; -const MinMaxSelect = React.memo(MinMaxSelectInner); +const MinMaxSelect = memo(MinMaxSelectInner); /** * A selector that allows for choosing minimum and maximum stat ranges, plus reordering the stat priority. diff --git a/src/app/loadout-builder/generated-sets/CompareLoadoutsDrawer.tsx b/src/app/loadout-builder/generated-sets/CompareLoadoutsDrawer.tsx index 9d6052207e..9f495b087e 100644 --- a/src/app/loadout-builder/generated-sets/CompareLoadoutsDrawer.tsx +++ b/src/app/loadout-builder/generated-sets/CompareLoadoutsDrawer.tsx @@ -14,7 +14,7 @@ import { convertToLoadoutItem } from 'app/loadout-drawer/loadout-utils'; import LoadoutView from 'app/loadout/LoadoutView'; import { useThunkDispatch } from 'app/store/thunk-dispatch'; import { DestinyClass } from 'bungie-api-ts/destiny2'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { BucketHashes } from 'data/d2/generated-enums'; import { produce } from 'immer'; import React, { useMemo, useState } from 'react'; diff --git a/src/app/loadout-builder/generated-sets/GeneratedSetItem.tsx b/src/app/loadout-builder/generated-sets/GeneratedSetItem.tsx index a46009585a..8cc572b0fd 100644 --- a/src/app/loadout-builder/generated-sets/GeneratedSetItem.tsx +++ b/src/app/loadout-builder/generated-sets/GeneratedSetItem.tsx @@ -4,7 +4,7 @@ import { showItemPicker } from 'app/item-picker/item-picker'; import Sockets from 'app/loadout/loadout-ui/Sockets'; import { MAX_ARMOR_ENERGY_CAPACITY } from 'app/search/d2-known-values'; import { AppIcon, faRandom, lockIcon } from 'app/shell/icons'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { PlugCategoryHashes } from 'data/d2/generated-enums'; import { Dispatch } from 'react'; import { DimItem, PluggableInventoryItemDefinition } from '../../inventory/item-types'; diff --git a/src/app/loadout-builder/generated-sets/SetStats.tsx b/src/app/loadout-builder/generated-sets/SetStats.tsx index 90e8c698ea..a3175960ad 100644 --- a/src/app/loadout-builder/generated-sets/SetStats.tsx +++ b/src/app/loadout-builder/generated-sets/SetStats.tsx @@ -6,7 +6,7 @@ import { useD2Definitions } from 'app/manifest/selectors'; import { AppIcon, powerIndicatorIcon } from 'app/shell/icons'; import StatTooltip from 'app/store-stats/StatTooltip'; import { DestinyStatDefinition } from 'bungie-api-ts/destiny2'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { ArmorStatHashes, ArmorStats, ModStatChanges } from '../types'; import { remEuclid, statTierWithHalf } from '../utils'; import styles from './SetStats.m.scss'; diff --git a/src/app/loadout-drawer/LoadoutDrawerContainer.tsx b/src/app/loadout-drawer/LoadoutDrawerContainer.tsx index d84564cf0c..1ac3d281f5 100644 --- a/src/app/loadout-drawer/LoadoutDrawerContainer.tsx +++ b/src/app/loadout-drawer/LoadoutDrawerContainer.tsx @@ -9,17 +9,17 @@ import { useD2Definitions } from 'app/manifest/selectors'; import { showNotification } from 'app/notifications/notifications'; import { useEventBusListener } from 'app/utils/hooks'; import { DestinyClass } from 'bungie-api-ts/destiny2'; -import React, { Suspense, useCallback, useEffect, useState } from 'react'; +import { Suspense, lazy, useCallback, useEffect, useState } from 'react'; import { useSelector } from 'react-redux'; import { useLocation, useNavigate } from 'react-router'; import { addItem$, editLoadout$ } from './loadout-events'; import { Loadout } from './loadout-types'; import { convertToLoadoutItem, newLoadout, pickBackingStore } from './loadout-utils'; -const LoadoutDrawer = React.lazy( +const LoadoutDrawer = lazy( () => import(/* webpackChunkName: "loadout-drawer" */ './LoadoutDrawer') ); -const D1LoadoutDrawer = React.lazy( +const D1LoadoutDrawer = lazy( () => import( /* webpackChunkName: "d1-loadout-drawer" */ 'app/destiny1/loadout-drawer/D1LoadoutDrawer' diff --git a/src/app/loadout-drawer/LoadoutDrawerDropTarget.tsx b/src/app/loadout-drawer/LoadoutDrawerDropTarget.tsx index fc7db14f85..6cf7bdbb82 100644 --- a/src/app/loadout-drawer/LoadoutDrawerDropTarget.tsx +++ b/src/app/loadout-drawer/LoadoutDrawerDropTarget.tsx @@ -2,7 +2,7 @@ import { bucketsSelector, storesSelector } from 'app/inventory/selectors'; import { emptyArray } from 'app/utils/empty'; import { itemCanBeInLoadout } from 'app/utils/item-utils'; import { DestinyClass } from 'bungie-api-ts/destiny2'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import React from 'react'; import { DropTargetMonitor, useDrop } from 'react-dnd'; import { useSelector } from 'react-redux'; diff --git a/src/app/loadout/fashion/FashionDrawer.tsx b/src/app/loadout/fashion/FashionDrawer.tsx index 372755c86e..783442bb7b 100644 --- a/src/app/loadout/fashion/FashionDrawer.tsx +++ b/src/app/loadout/fashion/FashionDrawer.tsx @@ -22,7 +22,7 @@ import { DestinyCollectibleDefinition, DestinyInventoryItemDefinition, } from 'bungie-api-ts/destiny2'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { BucketHashes, PlugCategoryHashes, SocketCategoryHashes } from 'data/d2/generated-enums'; import { produce } from 'immer'; import _ from 'lodash'; diff --git a/src/app/loadout/ingame/EditInGameLoadout.tsx b/src/app/loadout/ingame/EditInGameLoadout.tsx index bc6e757fbc..0999fe33de 100644 --- a/src/app/loadout/ingame/EditInGameLoadout.tsx +++ b/src/app/loadout/ingame/EditInGameLoadout.tsx @@ -5,7 +5,7 @@ import { useD2Definitions } from 'app/manifest/selectors'; import { useThunkDispatch } from 'app/store/thunk-dispatch'; import { RootState } from 'app/store/types'; import { compareBy } from 'app/utils/comparators'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { t } from 'i18next'; import { useState } from 'react'; import { useSelector } from 'react-redux'; diff --git a/src/app/loadout/ingame/InGameLoadoutIcon.tsx b/src/app/loadout/ingame/InGameLoadoutIcon.tsx index d12040714a..8d3704081d 100644 --- a/src/app/loadout/ingame/InGameLoadoutIcon.tsx +++ b/src/app/loadout/ingame/InGameLoadoutIcon.tsx @@ -1,6 +1,6 @@ import BungieImage, { bungieBackgroundStyle } from 'app/dim-ui/BungieImage'; import { InGameLoadout } from 'app/loadout-drawer/loadout-types'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import styles from './InGameLoadoutIcon.m.scss'; export default function InGameLoadoutIcon({ diff --git a/src/app/loadout/ingame/InGameLoadoutStrip.tsx b/src/app/loadout/ingame/InGameLoadoutStrip.tsx index 0f49fb262a..11eb55d13a 100644 --- a/src/app/loadout/ingame/InGameLoadoutStrip.tsx +++ b/src/app/loadout/ingame/InGameLoadoutStrip.tsx @@ -10,7 +10,7 @@ import { InGameLoadout, Loadout } from 'app/loadout-drawer/loadout-types'; import { AppIcon, faCheckCircle, faExclamationCircle, saveIcon } from 'app/shell/icons'; import { useThunkDispatch } from 'app/store/thunk-dispatch'; import { RootState } from 'app/store/types'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import _ from 'lodash'; import React from 'react'; import { useSelector } from 'react-redux'; diff --git a/src/app/loadout/loadout-edit/LoadoutEdit.tsx b/src/app/loadout/loadout-edit/LoadoutEdit.tsx index 03b3a33079..c431b5cab9 100644 --- a/src/app/loadout/loadout-edit/LoadoutEdit.tsx +++ b/src/app/loadout/loadout-edit/LoadoutEdit.tsx @@ -39,7 +39,7 @@ import { useD2Definitions } from 'app/manifest/selectors'; import { emptyObject } from 'app/utils/empty'; import { Portal } from 'app/utils/temp-container'; import { DestinyClass } from 'bungie-api-ts/destiny2'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import _ from 'lodash'; import { useMemo, useState } from 'react'; import { useSelector } from 'react-redux'; diff --git a/src/app/loadout/loadout-edit/LoadoutEditBucket.tsx b/src/app/loadout/loadout-edit/LoadoutEditBucket.tsx index 2b89ce0ef1..2a568606fe 100644 --- a/src/app/loadout/loadout-edit/LoadoutEditBucket.tsx +++ b/src/app/loadout/loadout-edit/LoadoutEditBucket.tsx @@ -15,7 +15,7 @@ import { emptyArray } from 'app/utils/empty'; import { Portal } from 'app/utils/temp-container'; import { LookupTable } from 'app/utils/util-types'; import { DestinyClass } from 'bungie-api-ts/destiny2'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { BucketHashes } from 'data/d2/generated-enums'; import _ from 'lodash'; import React, { useMemo, useState } from 'react'; diff --git a/src/app/loadout/loadout-edit/LoadoutEditSection.tsx b/src/app/loadout/loadout-edit/LoadoutEditSection.tsx index cefd8ca156..77851f022a 100644 --- a/src/app/loadout/loadout-edit/LoadoutEditSection.tsx +++ b/src/app/loadout/loadout-edit/LoadoutEditSection.tsx @@ -2,7 +2,7 @@ import Dropdown, { Option } from 'app/dim-ui/Dropdown'; import { PressTip } from 'app/dim-ui/PressTip'; import { t } from 'app/i18next-t'; import { AppIcon, clearIcon, disabledIcon, downloadIcon, helpIcon } from 'app/shell/icons'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import _ from 'lodash'; import React from 'react'; import styles from './LoadoutEditSection.m.scss'; diff --git a/src/app/loadout/loadout-edit/LoadoutEditSubclass.tsx b/src/app/loadout/loadout-edit/LoadoutEditSubclass.tsx index b731fc1740..1133e3c024 100644 --- a/src/app/loadout/loadout-edit/LoadoutEditSubclass.tsx +++ b/src/app/loadout/loadout-edit/LoadoutEditSubclass.tsx @@ -7,7 +7,7 @@ import { storesSelector } from 'app/inventory/selectors'; import { ResolvedLoadoutItem } from 'app/loadout-drawer/loadout-types'; import { AppIcon, powerActionIcon } from 'app/shell/icons'; import { DestinyClass } from 'bungie-api-ts/destiny2'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { BucketHashes } from 'data/d2/generated-enums'; import { useMemo } from 'react'; import { useSelector } from 'react-redux'; diff --git a/src/app/loadout/loadout-menu/LoadoutPopup.tsx b/src/app/loadout/loadout-menu/LoadoutPopup.tsx index 7dac37d187..9c62c7b7e4 100644 --- a/src/app/loadout/loadout-menu/LoadoutPopup.tsx +++ b/src/app/loadout/loadout-menu/LoadoutPopup.tsx @@ -44,7 +44,7 @@ import { queueAction } from 'app/utils/action-queue'; import { isiOSBrowser } from 'app/utils/browsers'; import { emptyArray } from 'app/utils/empty'; import { DestinyClass } from 'bungie-api-ts/destiny2'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import consumablesIcon from 'destiny-icons/general/consumables.svg'; import React, { useState } from 'react'; import { useSelector } from 'react-redux'; diff --git a/src/app/loadout/loadout-ui/BucketPlaceholder.tsx b/src/app/loadout/loadout-ui/BucketPlaceholder.tsx index eaf5b4f88c..3c21e51bd1 100644 --- a/src/app/loadout/loadout-ui/BucketPlaceholder.tsx +++ b/src/app/loadout/loadout-ui/BucketPlaceholder.tsx @@ -1,6 +1,6 @@ import BucketIcon from 'app/dim-ui/svgs/BucketIcon'; import { bucketsSelector } from 'app/inventory/selectors'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { BucketHashes } from 'data/d2/generated-enums'; import React from 'react'; import { useSelector } from 'react-redux'; diff --git a/src/app/loadout/loadout-ui/FashionMods.tsx b/src/app/loadout/loadout-ui/FashionMods.tsx index 0d160a59f6..c8d14fc638 100644 --- a/src/app/loadout/loadout-ui/FashionMods.tsx +++ b/src/app/loadout/loadout-ui/FashionMods.tsx @@ -5,7 +5,7 @@ import { PluggableInventoryItemDefinition } from 'app/inventory/item-types'; import { unlockedPlugSetItemsSelector } from 'app/inventory/selectors'; import { useD2Definitions } from 'app/manifest/selectors'; import { DEFAULT_ORNAMENTS, DEFAULT_SHADER } from 'app/search/d2-known-values'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { PlugCategoryHashes } from 'data/d2/generated-enums'; import { useSelector } from 'react-redux'; import styles from './FashionMods.m.scss'; diff --git a/src/app/loadout/loadout-ui/LoadoutItemCategorySection.tsx b/src/app/loadout/loadout-ui/LoadoutItemCategorySection.tsx index b242fe46bc..77ec667238 100644 --- a/src/app/loadout/loadout-ui/LoadoutItemCategorySection.tsx +++ b/src/app/loadout/loadout-ui/LoadoutItemCategorySection.tsx @@ -11,7 +11,7 @@ import { useIsPhonePortrait } from 'app/shell/selectors'; import { LoadoutCharacterStats } from 'app/store-stats/CharacterStats'; import { emptyArray } from 'app/utils/empty'; import { LookupTable } from 'app/utils/util-types'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import _ from 'lodash'; import { useSelector } from 'react-redux'; import { BucketPlaceholder } from './BucketPlaceholder'; diff --git a/src/app/loadout/loadout-ui/LoadoutMods.tsx b/src/app/loadout/loadout-ui/LoadoutMods.tsx index f60868ac13..9156215fb4 100644 --- a/src/app/loadout/loadout-ui/LoadoutMods.tsx +++ b/src/app/loadout/loadout-ui/LoadoutMods.tsx @@ -9,7 +9,7 @@ import { AppIcon, addIcon } from 'app/shell/icons'; import { useIsPhonePortrait } from 'app/shell/selectors'; import { Portal } from 'app/utils/temp-container'; import { DestinyClass } from 'bungie-api-ts/destiny2'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { memo, useCallback, useMemo, useState } from 'react'; import { useSelector } from 'react-redux'; import ModPicker from '../ModPicker'; diff --git a/src/app/loadout/loadout-ui/LoadoutSubclassSection.tsx b/src/app/loadout/loadout-ui/LoadoutSubclassSection.tsx index 0047a609c6..e4b3a7eb04 100644 --- a/src/app/loadout/loadout-ui/LoadoutSubclassSection.tsx +++ b/src/app/loadout/loadout-ui/LoadoutSubclassSection.tsx @@ -5,7 +5,7 @@ import ItemPopupTrigger from 'app/inventory/ItemPopupTrigger'; import { ResolvedLoadoutItem } from 'app/loadout-drawer/loadout-types'; import { useD2Definitions } from 'app/manifest/selectors'; import { AppIcon, powerActionIcon } from 'app/shell/icons'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { useMemo } from 'react'; import { getSubclassPlugs } from '../item-utils'; import { createGetModRenderKey } from '../mod-utils'; diff --git a/src/app/loadout/loadout-ui/PlugDef.tsx b/src/app/loadout/loadout-ui/PlugDef.tsx index 4323bfdf8b..2aa8146d72 100644 --- a/src/app/loadout/loadout-ui/PlugDef.tsx +++ b/src/app/loadout/loadout-ui/PlugDef.tsx @@ -4,7 +4,7 @@ import { DefItemIcon } from 'app/inventory/ItemIcon'; import { PluggableInventoryItemDefinition } from 'app/inventory/item-types'; import { PlugDefTooltip } from 'app/item-popup/PlugTooltip'; import { DestinyClass } from 'bungie-api-ts/destiny2'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; /** * Displays a plug (mod, perk) based on just its definition, with optional close button. diff --git a/src/app/loadout/loadout-ui/Sockets.tsx b/src/app/loadout/loadout-ui/Sockets.tsx index e2ecd0601f..c143a4871b 100644 --- a/src/app/loadout/loadout-ui/Sockets.tsx +++ b/src/app/loadout/loadout-ui/Sockets.tsx @@ -4,7 +4,7 @@ import { useD2Definitions } from 'app/manifest/selectors'; import { modTypeTagByPlugCategoryHash } from 'app/search/specialty-modslots'; import { isEventArmorRerollSocket } from 'app/utils/socket-utils'; import { DestinyInventoryItemDefinition } from 'bungie-api-ts/destiny2'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { PlugCategoryHashes } from 'data/d2/generated-enums'; import { pickPlugPositions } from '../mod-assignment-utils'; import PlugDef from './PlugDef'; diff --git a/src/app/material-counts/MaterialCounts.tsx b/src/app/material-counts/MaterialCounts.tsx index 5e8b86adb3..0404962d9a 100644 --- a/src/app/material-counts/MaterialCounts.tsx +++ b/src/app/material-counts/MaterialCounts.tsx @@ -5,7 +5,7 @@ import { materialsSelector, transmogCurrenciesSelector, } from 'app/inventory/selectors'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import spiderMats from 'data/d2/spider-mats.json'; import _ from 'lodash'; import React from 'react'; diff --git a/src/app/notifications/Notification.tsx b/src/app/notifications/Notification.tsx index 107bd9ff40..3602f7e121 100644 --- a/src/app/notifications/Notification.tsx +++ b/src/app/notifications/Notification.tsx @@ -1,6 +1,6 @@ import { t } from 'app/i18next-t'; import { CanceledError } from 'app/utils/cancel'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { motion, MotionProps, Transition } from 'framer-motion'; import React, { useCallback, useEffect, useRef, useState } from 'react'; import styles from './Notification.m.scss'; diff --git a/src/app/organizer/Columns.tsx b/src/app/organizer/Columns.tsx index 6af1f8c630..a11cb09965 100644 --- a/src/app/organizer/Columns.tsx +++ b/src/app/organizer/Columns.tsx @@ -59,7 +59,7 @@ import { } from 'app/utils/socket-utils'; import { LookupTable } from 'app/utils/util-types'; import { InventoryWishListRoll } from 'app/wishlists/wishlists'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { D2EventInfo } from 'data/d2/d2-event-info'; import { StatHashes } from 'data/d2/generated-enums'; import shapedOverlay from 'images/shapedOverlay.png'; diff --git a/src/app/organizer/DropDown.tsx b/src/app/organizer/DropDown.tsx index b77fa10301..e88e4a945a 100644 --- a/src/app/organizer/DropDown.tsx +++ b/src/app/organizer/DropDown.tsx @@ -3,7 +3,7 @@ import { StatTotalToggle } from 'app/dim-ui/CustomStatTotal'; import { t } from 'app/i18next-t'; import { AppIcon, enabledIcon, moveDownIcon, unselectedCheckIcon } from 'app/shell/icons'; import { DestinyClass } from 'bungie-api-ts/destiny2'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import React, { ReactNode, useState } from 'react'; import styles from './DropDown.m.scss'; diff --git a/src/app/organizer/EnabledColumnsSelector.tsx b/src/app/organizer/EnabledColumnsSelector.tsx index 1306263511..7309eecc53 100644 --- a/src/app/organizer/EnabledColumnsSelector.tsx +++ b/src/app/organizer/EnabledColumnsSelector.tsx @@ -1,6 +1,6 @@ import { t } from 'app/i18next-t'; import { DestinyClass } from 'bungie-api-ts/destiny2'; -import React from 'react'; +import { memo } from 'react'; import { getColumnSelectionId } from './Columns'; import DropDown, { DropDownItem } from './DropDown'; import { ColumnDefinition } from './table-types'; @@ -15,7 +15,7 @@ import { ColumnDefinition } from './table-types'; * TODO: Convert to including drag and drop functionality so that columns can be reordered. */ // TODO: Save to settings -export default React.memo(function EnabledColumnsSelector({ +export default memo(function EnabledColumnsSelector({ columns, enabledColumns, forClass, diff --git a/src/app/organizer/ItemTable.tsx b/src/app/organizer/ItemTable.tsx index 0e17d52bd1..5a4bf9aa0a 100644 --- a/src/app/organizer/ItemTable.tsx +++ b/src/app/organizer/ItemTable.tsx @@ -38,11 +38,10 @@ import { useSetCSSVarToHeight, useShiftHeld } from 'app/utils/hooks'; import { LookupTable, StringLookup } from 'app/utils/util-types'; import { hasWishListSelector, wishListFunctionSelector } from 'app/wishlists/selectors'; import { DestinyClass } from 'bungie-api-ts/destiny2'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { ItemCategoryHashes } from 'data/d2/generated-enums'; import _ from 'lodash'; -import React, { ReactNode, useCallback, useEffect, useMemo, useRef, useState } from 'react'; -import ReactDOM from 'react-dom'; +import React, { ReactNode, memo, useCallback, useEffect, useMemo, useRef, useState } from 'react'; import Dropzone, { DropzoneOptions } from 'react-dropzone'; import { useSelector } from 'react-redux'; import { getColumnSelectionId, getColumns } from './Columns'; @@ -52,6 +51,7 @@ import { itemIncludesCategories } from './filtering-utils'; import { compareSelectedItems } from 'app/compare/actions'; // eslint-disable-next-line css-modules/no-unused-class +import { createPortal } from 'react-dom'; import styles from './ItemTable.m.scss'; import { ItemCategoryTreeNode, armorTopLevelCatHashes } from './ItemTypeSelector'; import { ColumnDefinition, ColumnSort, Row, SortDirection } from './table-types'; @@ -74,7 +74,7 @@ const downloadButtonSettings = [ { categoryId: ['ghosts'], csvType: 'Ghost' as const, label: tl('Bucket.Ghost') }, ]; -const MemoRow = React.memo(TableRow); +const MemoRow = memo(TableRow); export default function ItemTable({ categories }: { categories: ItemCategoryTreeNode[] }) { const [columnSorts, setColumnSorts] = useState([ @@ -501,7 +501,7 @@ export default function ItemTable({ categories }: { categories: ItemCategoryTree forClass={classIfAny} />
- {ReactDOM.createPortal(, document.head)} + {createPortal(, document.head)}
diff --git a/src/app/organizer/ItemTypeSelector.tsx b/src/app/organizer/ItemTypeSelector.tsx index 74a1660b92..0b1765f8ec 100644 --- a/src/app/organizer/ItemTypeSelector.tsx +++ b/src/app/organizer/ItemTypeSelector.tsx @@ -2,7 +2,7 @@ import { DestinyVersion } from '@destinyitemmanager/dim-api-types'; import BucketIcon from 'app/dim-ui/svgs/BucketIcon'; import { useDefinitions } from 'app/manifest/selectors'; import { filteredItemsSelector } from 'app/search/search-filter'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { ItemCategoryHashes } from 'data/d2/generated-enums'; import _ from 'lodash'; import { useSelector } from 'react-redux'; diff --git a/src/app/progress/ActivityModifier.tsx b/src/app/progress/ActivityModifier.tsx index 17820213ee..c447554fb6 100644 --- a/src/app/progress/ActivityModifier.tsx +++ b/src/app/progress/ActivityModifier.tsx @@ -1,6 +1,6 @@ import RichDestinyText from 'app/dim-ui/destiny-symbols/RichDestinyText'; import { useD2Definitions } from 'app/manifest/selectors'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import BungieImage from '../dim-ui/BungieImage'; import { PressTip } from '../dim-ui/PressTip'; import styles from './ActivityModifier.m.scss'; diff --git a/src/app/progress/BountyGuide.tsx b/src/app/progress/BountyGuide.tsx index fb89cc0649..f11588d066 100644 --- a/src/app/progress/BountyGuide.tsx +++ b/src/app/progress/BountyGuide.tsx @@ -12,7 +12,7 @@ import { ThunkDispatchProp } from 'app/store/types'; import { chainComparator, compareBy, reverseComparator } from 'app/utils/comparators'; import { itemCanBeEquippedBy } from 'app/utils/item-utils'; import { LookupTable, isIn } from 'app/utils/util-types'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import grenade from 'destiny-icons/weapons/grenade.svg'; import headshot from 'destiny-icons/weapons/headshot.svg'; import melee from 'destiny-icons/weapons/melee.svg'; diff --git a/src/app/progress/CompletionCheckbox.tsx b/src/app/progress/CompletionCheckbox.tsx index 9f45e30da8..1fd0364390 100644 --- a/src/app/progress/CompletionCheckbox.tsx +++ b/src/app/progress/CompletionCheckbox.tsx @@ -1,4 +1,4 @@ -import clsx from 'clsx'; +import { clsx } from 'clsx'; export default function CompletionCheckbox({ completed }: { completed: boolean }) { const classes = clsx('objective-checkbox', { diff --git a/src/app/progress/Objective.tsx b/src/app/progress/Objective.tsx index 29fe2ef5ee..51fc3206a5 100644 --- a/src/app/progress/Objective.tsx +++ b/src/app/progress/Objective.tsx @@ -15,7 +15,7 @@ import { DestinyObjectiveProgress, DestinyUnlockValueUIStyle, } from 'bungie-api-ts/destiny2'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import '../item-popup/ItemObjectives.scss'; import ObjectiveDescription from './ObjectiveDescription'; diff --git a/src/app/progress/PowerCaps.tsx b/src/app/progress/PowerCaps.tsx index dd2f303430..68e3707daa 100644 --- a/src/app/progress/PowerCaps.tsx +++ b/src/app/progress/PowerCaps.tsx @@ -1,6 +1,6 @@ import { t } from 'app/i18next-t'; import { powerLevelByKeyword } from 'app/search/d2-known-values'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import styles from './powercaps.m.scss'; interface PowerCapValue { diff --git a/src/app/progress/Pursuit.tsx b/src/app/progress/Pursuit.tsx index 4eb51014da..ae547f7af1 100644 --- a/src/app/progress/Pursuit.tsx +++ b/src/app/progress/Pursuit.tsx @@ -8,7 +8,7 @@ import { useD2Definitions } from 'app/manifest/selectors'; import { searchFilterSelector } from 'app/search/search-filter'; import { percent } from 'app/shell/formatters'; import { RootState } from 'app/store/types'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { useSelector } from 'react-redux'; import { ObjectiveValue } from './Objective'; import PursuitItem from './PursuitItem'; diff --git a/src/app/progress/PursuitGrid.tsx b/src/app/progress/PursuitGrid.tsx index dfd3133ece..849434acd6 100644 --- a/src/app/progress/PursuitGrid.tsx +++ b/src/app/progress/PursuitGrid.tsx @@ -1,4 +1,4 @@ -import clsx from 'clsx'; +import { clsx } from 'clsx'; import styles from './PursuitGrid.m.scss'; /** diff --git a/src/app/progress/PursuitItem.tsx b/src/app/progress/PursuitItem.tsx index 8c232dac2b..bf436bcb47 100644 --- a/src/app/progress/PursuitItem.tsx +++ b/src/app/progress/PursuitItem.tsx @@ -10,7 +10,7 @@ import { useD2Definitions } from 'app/manifest/selectors'; import { percent } from 'app/shell/formatters'; import { count } from 'app/utils/util'; import { DestinyObjectiveProgress } from 'bungie-api-ts/destiny2'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import dimTrackedIcon from 'images/dimTrackedIcon.svg'; import pursuitComplete from 'images/pursuitComplete.svg'; import pursuitExpired from 'images/pursuitExpired.svg'; diff --git a/src/app/progress/ReputationRank.tsx b/src/app/progress/ReputationRank.tsx index f1e13dfcc3..4d32e7e681 100644 --- a/src/app/progress/ReputationRank.tsx +++ b/src/app/progress/ReputationRank.tsx @@ -2,7 +2,7 @@ import { useDynamicStringReplacer } from 'app/dim-ui/destiny-symbols/RichDestiny import { t } from 'app/i18next-t'; import { useD2Definitions } from 'app/manifest/selectors'; import { DestinyProgression } from 'bungie-api-ts/destiny2'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import _ from 'lodash'; import BungieImage, { bungieNetPath } from '../dim-ui/BungieImage'; import CompletionCheckbox from './CompletionCheckbox'; diff --git a/src/app/progress/SeasonalRank.tsx b/src/app/progress/SeasonalRank.tsx index 09e5cbd44c..c1b88acc94 100644 --- a/src/app/progress/SeasonalRank.tsx +++ b/src/app/progress/SeasonalRank.tsx @@ -10,7 +10,7 @@ import { DestinySeasonDefinition, DestinySeasonPassDefinition, } from 'bungie-api-ts/destiny2'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import BungieImage from '../dim-ui/BungieImage'; import { ProgressBar, StackAmount } from './PursuitItem'; import styles from './SeasonalRank.m.scss'; diff --git a/src/app/records/CollectiblesGrid.tsx b/src/app/records/CollectiblesGrid.tsx index f727c42027..770ac65dbd 100644 --- a/src/app/records/CollectiblesGrid.tsx +++ b/src/app/records/CollectiblesGrid.tsx @@ -1,4 +1,4 @@ -import clsx from 'clsx'; +import { clsx } from 'clsx'; import styles from './CollectiblesGrid.m.scss'; /** diff --git a/src/app/records/Metric.tsx b/src/app/records/Metric.tsx index d48a5d64e6..66b1bfb704 100644 --- a/src/app/records/Metric.tsx +++ b/src/app/records/Metric.tsx @@ -1,7 +1,7 @@ import RichDestinyText from 'app/dim-ui/destiny-symbols/RichDestinyText'; import { useD2Definitions } from 'app/manifest/selectors'; import { ObjectiveValue } from 'app/progress/Objective'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import styles from './Metric.m.scss'; import MetricBanner from './MetricBanner'; import { DimMetric } from './presentation-nodes'; diff --git a/src/app/records/MetricBanner.tsx b/src/app/records/MetricBanner.tsx index c10160a656..93305616c6 100644 --- a/src/app/records/MetricBanner.tsx +++ b/src/app/records/MetricBanner.tsx @@ -1,7 +1,7 @@ import { useD2Definitions } from 'app/manifest/selectors'; import { ALL_TRAIT } from 'app/search/d2-known-values'; import { DestinyObjectiveProgress } from 'bungie-api-ts/destiny2'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import masterworkOverlay from 'images/masterwork-metric.png'; import BungieImage from '../dim-ui/BungieImage'; import styles from './MetricBanner.m.scss'; diff --git a/src/app/records/PlugSet.tsx b/src/app/records/PlugSet.tsx index 07e4da732c..720f9b48b9 100644 --- a/src/app/records/PlugSet.tsx +++ b/src/app/records/PlugSet.tsx @@ -4,7 +4,7 @@ import { makeFakeItem } from 'app/inventory/store/d2-item-factory'; import { useD2Definitions } from 'app/manifest/selectors'; import { chainComparator, compareBy } from 'app/utils/comparators'; import { VendorItemDisplay } from 'app/vendors/VendorItemComponent'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import _ from 'lodash'; import { useSelector } from 'react-redux'; import { AppIcon, collapseIcon, expandIcon } from '../shell/icons'; diff --git a/src/app/records/PresentationNode.tsx b/src/app/records/PresentationNode.tsx index d84f36e19b..c467dbce43 100644 --- a/src/app/records/PresentationNode.tsx +++ b/src/app/records/PresentationNode.tsx @@ -6,7 +6,7 @@ import { DestinyDisplayPropertiesDefinition, DestinyPresentationScreenStyle, } from 'bungie-api-ts/destiny2'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { deepEqual } from 'fast-equals'; import { useEffect, useRef } from 'react'; import { useSelector } from 'react-redux'; diff --git a/src/app/records/Record.tsx b/src/app/records/Record.tsx index 83e0730da0..a80b6f4a9c 100644 --- a/src/app/records/Record.tsx +++ b/src/app/records/Record.tsx @@ -15,7 +15,7 @@ import { DestinyRecordDefinition, DestinyRecordState, } from 'bungie-api-ts/destiny2'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import catalystIcons from 'data/d2/catalyst-triumph-icons.json'; import dimTrackedIcon from 'images/dimTrackedIcon.svg'; import trackedIcon from 'images/trackedIcon.svg'; diff --git a/src/app/search/FilterHelp.tsx b/src/app/search/FilterHelp.tsx index d4691169ee..2947a29ed6 100644 --- a/src/app/search/FilterHelp.tsx +++ b/src/app/search/FilterHelp.tsx @@ -1,7 +1,7 @@ import StaticPage from 'app/dim-ui/StaticPage'; import { t } from 'app/i18next-t'; import { toggleSearchQueryComponent } from 'app/shell/actions'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import React, { useState } from 'react'; import { useDispatch, useSelector } from 'react-redux'; import styles from './FilterHelp.m.scss'; diff --git a/src/app/search/SearchBar.tsx b/src/app/search/SearchBar.tsx index 2d1b6f3355..f759a0159f 100644 --- a/src/app/search/SearchBar.tsx +++ b/src/app/search/SearchBar.tsx @@ -14,12 +14,15 @@ import { useIsPhonePortrait } from 'app/shell/selectors'; import { RootState, ThunkDispatchProp } from 'app/store/types'; import { isiOSBrowser } from 'app/utils/browsers'; import { Portal } from 'app/utils/temp-container'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { UseComboboxState, UseComboboxStateChangeOptions, useCombobox } from 'downshift'; import { AnimatePresence, LayoutGroup, motion } from 'framer-motion'; import _ from 'lodash'; import React, { Suspense, + forwardRef, + lazy, + memo, useCallback, useDeferredValue, useEffect, @@ -125,11 +128,9 @@ function mapStateToProps() { }; } -const LazyFilterHelp = React.lazy( - () => import(/* webpackChunkName: "filter-help" */ './FilterHelp') -); +const LazyFilterHelp = lazy(() => import(/* webpackChunkName: "filter-help" */ './FilterHelp')); -const RowContents = React.memo(({ item }: { item: SearchItem }) => { +const RowContents = memo(({ item }: { item: SearchItem }) => { function highlight(text: string, section: string) { return item.highlightRange?.section === section ? ( { } }); -const Row = React.memo( +const Row = memo( ({ highlighted, item, @@ -622,6 +623,4 @@ function SearchBar( ); } -export default connect(mapStateToProps, null, null, { forwardRef: true })( - React.forwardRef(SearchBar) -); +export default connect(mapStateToProps, null, null, { forwardRef: true })(forwardRef(SearchBar)); diff --git a/src/app/search/SearchFilter.tsx b/src/app/search/SearchFilter.tsx index 50510e2a9a..8f019804a2 100644 --- a/src/app/search/SearchFilter.tsx +++ b/src/app/search/SearchFilter.tsx @@ -1,7 +1,7 @@ import { t } from 'app/i18next-t'; import { querySelector, searchQueryVersionSelector, useIsPhonePortrait } from 'app/shell/selectors'; import { useThunkDispatch } from 'app/store/thunk-dispatch'; -import React, { useCallback, useMemo } from 'react'; +import React, { forwardRef, useCallback, useMemo } from 'react'; import { useSelector } from 'react-redux'; import { useLocation } from 'react-router'; import { setSearchQuery } from '../shell/actions'; @@ -13,7 +13,7 @@ import { SearchInput } from './SearchInput'; /** * The main search filter that's in the header. */ -export default React.forwardRef(function SearchFilter( +export default forwardRef(function SearchFilter( { onClear, }: { diff --git a/src/app/search/SearchResults.tsx b/src/app/search/SearchResults.tsx index e9c58647d8..13273e6e09 100644 --- a/src/app/search/SearchResults.tsx +++ b/src/app/search/SearchResults.tsx @@ -3,7 +3,7 @@ import { t } from 'app/i18next-t'; import ConnectedInventoryItem from 'app/inventory/ConnectedInventoryItem'; import DraggableInventoryItem from 'app/inventory/DraggableInventoryItem'; import ItemPopupTrigger from 'app/inventory/ItemPopupTrigger'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { memo } from 'react'; import { useSelector } from 'react-redux'; import Sheet from '../dim-ui/Sheet'; diff --git a/src/app/settings/CustomStatsSettings.tsx b/src/app/settings/CustomStatsSettings.tsx index ff39296fe2..11ef54f869 100644 --- a/src/app/settings/CustomStatsSettings.tsx +++ b/src/app/settings/CustomStatsSettings.tsx @@ -15,7 +15,7 @@ import { allAtomicStats } from 'app/search/search-filter-values'; import { AppIcon, addIcon, banIcon, deleteIcon, editIcon, saveIcon } from 'app/shell/icons'; import { chainComparator, compareBy } from 'app/utils/comparators'; import { DestinyClass } from 'bungie-api-ts/destiny2'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import React, { useRef, useState } from 'react'; import { useSelector } from 'react-redux'; // eslint-disable-next-line css-modules/no-unused-class diff --git a/src/app/settings/SettingsPage.tsx b/src/app/settings/SettingsPage.tsx index e9dedb0f07..d22c7ca323 100644 --- a/src/app/settings/SettingsPage.tsx +++ b/src/app/settings/SettingsPage.tsx @@ -17,7 +17,7 @@ import StreamDeckSettings from 'app/stream-deck/StreamDeckSettings/StreamDeckSet import { clearAppBadge } from 'app/utils/app-badge'; import { usePageTitle } from 'app/utils/hooks'; import { errorLog } from 'app/utils/log'; -import i18next from 'i18next'; +import { changeLanguage as i18nextChangeLanguage } from 'i18next'; import exampleWeaponImage from 'images/example-weapon.jpg'; import _ from 'lodash'; import React from 'react'; @@ -133,7 +133,7 @@ export default function SettingsPage() { languageChanged = true; const language = e.target.value; localStorage.setItem('dimLanguage', language); - i18next.changeLanguage(language, () => { + i18nextChangeLanguage(language, () => { setSetting('language', language); }); }; diff --git a/src/app/settings/SortOrderEditor.tsx b/src/app/settings/SortOrderEditor.tsx index 45468c9ed9..2d1efd758d 100644 --- a/src/app/settings/SortOrderEditor.tsx +++ b/src/app/settings/SortOrderEditor.tsx @@ -1,8 +1,8 @@ import { DragDropContext, Draggable, Droppable, DropResult } from '@hello-pangea/dnd'; import { t } from 'app/i18next-t'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import _ from 'lodash'; -import React from 'react'; +import React, { memo } from 'react'; import { AppIcon, dragHandleIcon, @@ -22,7 +22,7 @@ export interface SortProperty { readonly reversed: boolean; } -const SortEditorItemList = React.memo(({ order }: { order: SortProperty[] }) => ( +const SortEditorItemList = memo(({ order }: { order: SortProperty[] }) => ( <> {order.map((item, index) => ( diff --git a/src/app/settings/observers.ts b/src/app/settings/observers.ts index feee87dd1b..a0364b24d6 100644 --- a/src/app/settings/observers.ts +++ b/src/app/settings/observers.ts @@ -1,13 +1,13 @@ import { languageSelector } from 'app/dim-api/selectors'; import { observeStore } from 'app/utils/redux-utils'; -import i18next from 'i18next'; +import i18next, { changeLanguage } from 'i18next'; export function watchLanguageChanges() { return observeStore(languageSelector, (_prev, language) => { const languageChanged = language !== i18next.language; localStorage.setItem('dimLanguage', language); if (languageChanged) { - i18next.changeLanguage(language); + changeLanguage(language); } }); } diff --git a/src/app/shell/AppInstallBanner.tsx b/src/app/shell/AppInstallBanner.tsx index 1850a0849d..f2da825f62 100644 --- a/src/app/shell/AppInstallBanner.tsx +++ b/src/app/shell/AppInstallBanner.tsx @@ -1,6 +1,6 @@ import { t } from 'app/i18next-t'; import { useLocalStorage } from 'app/utils/hooks'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import React from 'react'; import styles from './AppInstallBanner.m.scss'; import { AppIcon, closeIcon } from './icons'; diff --git a/src/app/shell/Destiny.tsx b/src/app/shell/Destiny.tsx index 2f50daf779..2128208d3b 100644 --- a/src/app/shell/Destiny.tsx +++ b/src/app/shell/Destiny.tsx @@ -26,7 +26,7 @@ import StripSockets from 'app/strip-sockets/StripSockets'; import { setAppBadge } from 'app/utils/app-badge'; import { fetchWishList } from 'app/wishlists/wishlist-fetch'; import _ from 'lodash'; -import React, { useEffect, useMemo } from 'react'; +import { lazy, useEffect, useMemo } from 'react'; import { useSelector } from 'react-redux'; import { Navigate, Route, Routes, useLocation, useParams } from 'react-router'; import { Hotkey } from '../hotkeys/hotkeys'; @@ -37,44 +37,38 @@ import styles from './Destiny.m.scss'; import ErrorPanel from './ErrorPanel'; // TODO: Could be slightly better to group these a bit, but for now we break them each into a separate chunk. -const Inventory = React.lazy( +const Inventory = lazy( () => import(/* webpackChunkName: "inventory" */ 'app/inventory-page/Inventory') ); -const Progress = React.lazy( - () => import(/* webpackChunkName: "progress" */ 'app/progress/Progress') -); -const LoadoutBuilderContainer = React.lazy( +const Progress = lazy(() => import(/* webpackChunkName: "progress" */ 'app/progress/Progress')); +const LoadoutBuilderContainer = lazy( () => import(/* webpackChunkName: "loadoutBuilder" */ 'app/loadout-builder/LoadoutBuilderContainer') ); -const D1LoadoutBuilder = React.lazy( +const D1LoadoutBuilder = lazy( () => import( /* webpackChunkName: "d1LoadoutBuilder" */ 'app/destiny1/loadout-builder/D1LoadoutBuilder' ) ); -const Vendors = React.lazy(async () => ({ +const Vendors = lazy(async () => ({ default: (await import(/* webpackChunkName: "vendors" */ 'app/vendors/components')).Vendors, })); -const SingleVendor = React.lazy(async () => ({ +const SingleVendor = lazy(async () => ({ default: (await import(/* webpackChunkName: "vendors" */ 'app/vendors/components')).SingleVendor, })); -const D1Vendors = React.lazy( +const D1Vendors = lazy( () => import(/* webpackChunkName: "d1vendors" */ 'app/destiny1/vendors/D1Vendors') ); -const RecordBooks = React.lazy( +const RecordBooks = lazy( () => import(/* webpackChunkName: "recordbooks" */ 'app/destiny1/record-books/RecordBooks') ); -const Organizer = React.lazy( - () => import(/* webpackChunkName: "organizer" */ 'app/organizer/Organizer') -); -const Activities = React.lazy( +const Organizer = lazy(() => import(/* webpackChunkName: "organizer" */ 'app/organizer/Organizer')); +const Activities = lazy( () => import(/* webpackChunkName: "activities" */ 'app/destiny1/activities/Activities') ); -const Records = React.lazy(() => import(/* webpackChunkName: "records" */ 'app/records/Records')); -const Loadouts = React.lazy( - () => import(/* webpackChunkName: "loadouts" */ 'app/loadout/Loadouts') -); +const Records = lazy(() => import(/* webpackChunkName: "records" */ 'app/records/Records')); +const Loadouts = lazy(() => import(/* webpackChunkName: "loadouts" */ 'app/loadout/Loadouts')); /** * Base view for pages that show Destiny content. @@ -249,7 +243,7 @@ export default function Destiny() { - {autoLockTagged && } + {Boolean(autoLockTagged) && } ); diff --git a/src/app/shell/ErrorPanel.tsx b/src/app/shell/ErrorPanel.tsx index 93aa81f3dd..2576dc7484 100644 --- a/src/app/shell/ErrorPanel.tsx +++ b/src/app/shell/ErrorPanel.tsx @@ -4,14 +4,14 @@ import { t } from 'app/i18next-t'; import { DimError } from 'app/utils/dim-error'; import BungieAlerts from 'app/whats-new/BungieAlerts'; import { PlatformErrorCodes } from 'bungie-api-ts/destiny2'; -import React, { useState } from 'react'; +import React, { lazy, useState } from 'react'; import { AppIcon, helpIcon, mastodonIcon, refreshIcon, twitterIcon } from '../shell/icons'; import styles from './ErrorPanel.m.scss'; const bungieHelpLink = 'http://twitter.com/BungieHelp'; const dimHelpMastodonLink = 'http://mstdn.games/@ThisIsDIM'; const troubleshootingLink = 'https://github.com/DestinyItemManager/DIM/wiki/Troubleshooting'; -const Timeline = React.lazy(async () => { +const Timeline = lazy(async () => { const m = await import(/* webpackChunkName: "twitter" */ 'react-twitter-widgets'); return { default: m.Timeline }; }); diff --git a/src/app/shell/Header.tsx b/src/app/shell/Header.tsx index d2b9919003..f461f7229d 100644 --- a/src/app/shell/Header.tsx +++ b/src/app/shell/Header.tsx @@ -13,7 +13,7 @@ import { isiOSBrowser } from 'app/utils/browsers'; import { useSetCSSVarToHeight } from 'app/utils/hooks'; import { infoLog } from 'app/utils/log'; import { Portal } from 'app/utils/temp-container'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import logo from 'images/logo-type-right-light.svg'; import _ from 'lodash'; import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'; diff --git a/src/app/shell/MenuBadge.tsx b/src/app/shell/MenuBadge.tsx index 309065e46a..a6af422cc9 100644 --- a/src/app/shell/MenuBadge.tsx +++ b/src/app/shell/MenuBadge.tsx @@ -1,7 +1,7 @@ import { dimNeedsUpdate$ } from 'app/register-service-worker'; import { GlobalAlertLevelsToToastLevels } from 'app/whats-new/BungieAlerts'; import { DimVersions } from 'app/whats-new/versions'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { useSelector } from 'react-redux'; import { useSubscription } from 'use-subscription'; import styles from './MenuBadge.m.scss'; diff --git a/src/app/shell/PostmasterWarningBanner.tsx b/src/app/shell/PostmasterWarningBanner.tsx index 96e192027e..476a2813c9 100644 --- a/src/app/shell/PostmasterWarningBanner.tsx +++ b/src/app/shell/PostmasterWarningBanner.tsx @@ -6,14 +6,14 @@ import { postmasterAlmostFull, postmasterSpaceUsed, } from 'app/loadout-drawer/postmaster'; -import React from 'react'; +import { memo } from 'react'; import { useSelector } from 'react-redux'; import { useLocation } from 'react-router'; import styles from './PostmasterWarningBanner.m.scss'; import { useIsPhonePortrait } from './selectors'; /** Shows a warning anywhere in the app if your active character's postmaster is low. */ -export default React.memo(function PostmasterWarningBanner() { +export default memo(function PostmasterWarningBanner() { // if postmaster low on most recent character // and we're not on the inventory screen || isPhonePortrait // show collect button diff --git a/src/app/shell/RefreshButton.tsx b/src/app/shell/RefreshButton.tsx index 55a099573d..437816d5ec 100644 --- a/src/app/shell/RefreshButton.tsx +++ b/src/app/shell/RefreshButton.tsx @@ -10,7 +10,7 @@ import { } from 'app/inventory/selectors'; import { useEventBusListener } from 'app/utils/hooks'; import { i15dDurationFromMsWithSeconds } from 'app/utils/time'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { useCallback, useEffect, useState } from 'react'; import { useSelector } from 'react-redux'; import { useSubscription } from 'use-subscription'; diff --git a/src/app/shell/icons/AppIcon.tsx b/src/app/shell/icons/AppIcon.tsx index 1e8d55f133..c69b3d18b3 100644 --- a/src/app/shell/icons/AppIcon.tsx +++ b/src/app/shell/icons/AppIcon.tsx @@ -1,7 +1,7 @@ import { IconDefinition } from '@fortawesome/fontawesome-svg-core'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import clsx from 'clsx'; -import React from 'react'; +import { clsx } from 'clsx'; +import { memo } from 'react'; import './AppIcon.scss'; function AppIcon({ @@ -34,4 +34,4 @@ function AppIcon({ } } -export default React.memo(AppIcon); +export default memo(AppIcon); diff --git a/src/app/storage/LocalStorageInfo.tsx b/src/app/storage/LocalStorageInfo.tsx index d3df857a51..478f4b18ef 100644 --- a/src/app/storage/LocalStorageInfo.tsx +++ b/src/app/storage/LocalStorageInfo.tsx @@ -1,6 +1,6 @@ import { t } from 'app/i18next-t'; import { percent } from 'app/shell/formatters'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { useEffect, useState } from 'react'; import styles from './LocalStorageInfo.m.scss'; import './storage.scss'; diff --git a/src/app/store-stats/AccountCurrencies.tsx b/src/app/store-stats/AccountCurrencies.tsx index 7f2a97d963..3f3873204a 100644 --- a/src/app/store-stats/AccountCurrencies.tsx +++ b/src/app/store-stats/AccountCurrencies.tsx @@ -1,12 +1,12 @@ import BungieImage from 'app/dim-ui/BungieImage'; import { currenciesSelector } from 'app/inventory/selectors'; import _ from 'lodash'; -import React from 'react'; +import React, { memo } from 'react'; import { useSelector } from 'react-redux'; import styles from './AccountCurrencies.m.scss'; /** The account currencies (glimmer, shards, etc.) */ -export default React.memo(function AccountCurrency() { +export default memo(function AccountCurrency() { const currencies = useSelector(currenciesSelector); return currencies.length > 0 ? ( c.itemHash).join()}> diff --git a/src/app/store-stats/CharacterStats.tsx b/src/app/store-stats/CharacterStats.tsx index 814c366294..f56bb46fd4 100644 --- a/src/app/store-stats/CharacterStats.tsx +++ b/src/app/store-stats/CharacterStats.tsx @@ -17,7 +17,7 @@ import { useD2Definitions } from 'app/manifest/selectors'; import { getCharacterProgressions } from 'app/progress/selectors'; import { armorStats } from 'app/search/d2-known-values'; import { RootState } from 'app/store/types'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { BucketHashes, StatHashes } from 'data/d2/generated-enums'; import _ from 'lodash'; import React from 'react'; diff --git a/src/app/store-stats/ClarityCharacterStat.tsx b/src/app/store-stats/ClarityCharacterStat.tsx index 164ecf4d27..8970b9243d 100644 --- a/src/app/store-stats/ClarityCharacterStat.tsx +++ b/src/app/store-stats/ClarityCharacterStat.tsx @@ -5,7 +5,7 @@ import { Tooltip } from 'app/dim-ui/PressTip'; import { useD2Definitions } from 'app/manifest/selectors'; import { timerDurationFromMsWithDecimal } from 'app/utils/time'; import { DestinyInventoryItemDefinition } from 'bungie-api-ts/destiny2'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { StatHashes } from 'data/d2/generated-enums'; import { t } from 'i18next'; import { useSelector } from 'react-redux'; diff --git a/src/app/store-stats/D1CharacterStats.tsx b/src/app/store-stats/D1CharacterStats.tsx index 1bcd08880a..7d1c56628c 100644 --- a/src/app/store-stats/D1CharacterStats.tsx +++ b/src/app/store-stats/D1CharacterStats.tsx @@ -3,7 +3,7 @@ import { t } from 'app/i18next-t'; import type { DimStore } from 'app/inventory/store-types'; import { getD1CharacterStatTiers, statsWithTiers } from 'app/inventory/store/character-utils'; import { percent } from 'app/shell/formatters'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import './CharacterStats.scss'; interface Props { diff --git a/src/app/store-stats/StatTooltip.tsx b/src/app/store-stats/StatTooltip.tsx index cfed495c5e..c72bab0cb5 100644 --- a/src/app/store-stats/StatTooltip.tsx +++ b/src/app/store-stats/StatTooltip.tsx @@ -3,7 +3,7 @@ import { Tooltip } from 'app/dim-ui/PressTip'; import { t } from 'app/i18next-t'; import { DimCharacterStatChange } from 'app/inventory/store-types'; import { statTier } from 'app/loadout-builder/utils'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { useSelector } from 'react-redux'; import ClarityCharacterStat from './ClarityCharacterStat'; import styles from './StatTooltip.m.scss'; diff --git a/src/app/store-stats/StoreStats.tsx b/src/app/store-stats/StoreStats.tsx index 601c0885f1..24dd5add65 100644 --- a/src/app/store-stats/StoreStats.tsx +++ b/src/app/store-stats/StoreStats.tsx @@ -1,6 +1,6 @@ import type { DimStore } from 'app/inventory/store-types'; import { useIsPhonePortrait } from 'app/shell/selectors'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import React from 'react'; import { PowerFormula, StoreCharacterStats } from '../store-stats/CharacterStats'; import AccountCurrencies from './AccountCurrencies'; diff --git a/src/app/store-stats/VaultCapacity.tsx b/src/app/store-stats/VaultCapacity.tsx index 4e7c7bc554..9a7994d9bc 100644 --- a/src/app/store-stats/VaultCapacity.tsx +++ b/src/app/store-stats/VaultCapacity.tsx @@ -10,13 +10,13 @@ import { import { useIsPhonePortrait } from 'app/shell/selectors'; import { emptyObject } from 'app/utils/empty'; import { LookupTable } from 'app/utils/util-types'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { BucketHashes } from 'data/d2/generated-enums'; import vaultIcon from 'destiny-icons/armor_types/helmet.svg'; import consumablesIcon from 'destiny-icons/general/consumables.svg'; import modificationsIcon from 'destiny-icons/general/modifications.svg'; import _ from 'lodash'; -import React from 'react'; +import React, { memo } from 'react'; import { useSelector } from 'react-redux'; import { createSelector } from 'reselect'; import styles from './VaultCapacity.m.scss'; @@ -97,7 +97,7 @@ const vaultCountsSelector = createSelector( ); /** Current amounts and maximum capacities of the vault */ -export default React.memo(function VaultCapacity() { +export default memo(function VaultCapacity() { const vaultCounts = useSelector(vaultCountsSelector); const mats = ; const isPhonePortrait = useIsPhonePortrait(); diff --git a/src/app/stream-deck/StreamDeckSettings/StreamDeckSettings.tsx b/src/app/stream-deck/StreamDeckSettings/StreamDeckSettings.tsx index d6469aba88..f2698ff0b3 100644 --- a/src/app/stream-deck/StreamDeckSettings/StreamDeckSettings.tsx +++ b/src/app/stream-deck/StreamDeckSettings/StreamDeckSettings.tsx @@ -12,7 +12,7 @@ import { stopStreamDeckConnection, } from 'app/stream-deck/stream-deck'; import { setStreamDeckEnabled, streamDeckEnabled } from 'app/stream-deck/util/local-storage'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { useState } from 'react'; import { useSelector } from 'react-redux'; import styles from './StreamDeckSettings.m.scss'; diff --git a/src/app/stream-deck/stream-deck.ts b/src/app/stream-deck/stream-deck.ts index 539c1bbabc..e53ab3d585 100644 --- a/src/app/stream-deck/stream-deck.ts +++ b/src/app/stream-deck/stream-deck.ts @@ -30,7 +30,9 @@ export const resetStreamDeckAuthorization = async () => { // run both lazy core and reducer modules export const lazyLoadStreamDeck = async () => { if (!lazyStreamDeck.core) { - const { reducer, ...core } = (await import('./async-module')).default; + const { reducer, ...core } = ( + await import(/* webpackChunkName: "streamdeck" */ './async-module') + ).default; lazyStreamDeck.core = core; lazyStreamDeck.reducer = reducer; } diff --git a/src/app/strip-sockets/StripSockets.tsx b/src/app/strip-sockets/StripSockets.tsx index 9bf19db8b4..f3940edf6f 100644 --- a/src/app/strip-sockets/StripSockets.tsx +++ b/src/app/strip-sockets/StripSockets.tsx @@ -7,7 +7,7 @@ import { AppIcon, faCheckCircle, refreshIcon } from 'app/shell/icons'; import { useThunkDispatch } from 'app/store/thunk-dispatch'; import { withCancel } from 'app/utils/cancel'; import { DestinyInventoryItemDefinition } from 'bungie-api-ts/destiny2'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import chestArmorItem from 'destiny-icons/armor_types/chest.svg'; import ghostIcon from 'destiny-icons/general/ghost.svg'; import handCannonIcon from 'destiny-icons/weapons/hand_cannon.svg'; diff --git a/src/app/utils/socket-utils.ts b/src/app/utils/socket-utils.ts index 45f24fb620..ca28ab4ee1 100644 --- a/src/app/utils/socket-utils.ts +++ b/src/app/utils/socket-utils.ts @@ -1,7 +1,9 @@ import { D2ManifestDefinitions } from 'app/destiny2/d2-definitions'; import { DimItem, + DimSocket, DimSocketCategory, + DimSockets, PluggableInventoryItemDefinition, } from 'app/inventory/item-types'; import { @@ -11,7 +13,6 @@ import { } from 'bungie-api-ts/destiny2'; import { PlugCategoryHashes, SocketCategoryHashes } from 'data/d2/generated-enums'; import _ from 'lodash'; -import { DimSocket, DimSockets } from '../inventory/item-types'; import { isArmor2Mod, isKillTrackerSocket } from './item-utils'; type WithRequiredProperty = T & { diff --git a/src/app/utils/temp-container.ts b/src/app/utils/temp-container.ts index e728ee6e62..cf6801c7c6 100644 --- a/src/app/utils/temp-container.ts +++ b/src/app/utils/temp-container.ts @@ -1,5 +1,5 @@ import React from 'react'; -import ReactDOM from 'react-dom'; +import { createPortal } from 'react-dom'; /** * A guaranteed-present element for attaching temporary elements to instead of @@ -12,5 +12,5 @@ export const tempContainer = document.getElementById('temp-container')!; * Render the given children near the root of the page instead of in their existing component hierarchy. */ export function Portal({ children }: { children: React.ReactNode }) { - return ReactDOM.createPortal(children, tempContainer); + return createPortal(children, tempContainer); } diff --git a/src/app/vendors/Cost.tsx b/src/app/vendors/Cost.tsx index 39cdcedea4..59185a6889 100644 --- a/src/app/vendors/Cost.tsx +++ b/src/app/vendors/Cost.tsx @@ -1,7 +1,7 @@ import BungieImage from 'app/dim-ui/BungieImage'; import { useD2Definitions } from 'app/manifest/selectors'; import { DestinyItemQuantity } from 'bungie-api-ts/destiny2'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import styles from './Cost.m.scss'; /** diff --git a/src/app/vendors/SingleVendor.tsx b/src/app/vendors/SingleVendor.tsx index dfe5e5d537..230379a66b 100644 --- a/src/app/vendors/SingleVendor.tsx +++ b/src/app/vendors/SingleVendor.tsx @@ -6,7 +6,7 @@ import { useD2Definitions } from 'app/manifest/selectors'; import ErrorPanel from 'app/shell/ErrorPanel'; import { useThunkDispatch } from 'app/store/thunk-dispatch'; import { useEventBusListener, usePageTitle } from 'app/utils/hooks'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { useCallback, useEffect } from 'react'; import { useSelector } from 'react-redux'; import { useLocation, useParams } from 'react-router'; diff --git a/src/app/vendors/VendorItemComponent.tsx b/src/app/vendors/VendorItemComponent.tsx index 00480b1a0e..df70001b7f 100644 --- a/src/app/vendors/VendorItemComponent.tsx +++ b/src/app/vendors/VendorItemComponent.tsx @@ -1,7 +1,7 @@ import { DimItem } from 'app/inventory/item-types'; import { ItemPopupExtraInfo } from 'app/item-popup/item-popup'; import { DestinyCollectibleState } from 'bungie-api-ts/destiny2'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { ItemCategoryHashes } from 'data/d2/generated-enums'; import React from 'react'; import { Link } from 'react-router-dom'; diff --git a/src/app/whats-new/WhatsNewLink.tsx b/src/app/whats-new/WhatsNewLink.tsx index c859b226b8..bb7634d75c 100644 --- a/src/app/whats-new/WhatsNewLink.tsx +++ b/src/app/whats-new/WhatsNewLink.tsx @@ -1,6 +1,6 @@ import { t } from 'app/i18next-t'; import { bungieAlertsSelector } from 'app/shell/selectors'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import { useSelector } from 'react-redux'; import { NavLink } from 'react-router-dom'; import { useSubscription } from 'use-subscription'; diff --git a/src/app/wishlists/WishListPerkThumb.tsx b/src/app/wishlists/WishListPerkThumb.tsx index 6edd20bfc0..7d2fd58f29 100644 --- a/src/app/wishlists/WishListPerkThumb.tsx +++ b/src/app/wishlists/WishListPerkThumb.tsx @@ -1,6 +1,6 @@ import { t } from 'app/i18next-t'; import { AppIcon, thumbsDownIcon, thumbsUpIcon } from 'app/shell/icons'; -import clsx from 'clsx'; +import { clsx } from 'clsx'; import styles from './WishListPerkThumb.m.scss'; import { WishListRoll } from './types'; import { InventoryWishListRoll } from './wishlists'; diff --git a/src/testing/test-utils.ts b/src/testing/test-utils.ts index 4cdf940d56..a27d8516cb 100644 --- a/src/testing/test-utils.ts +++ b/src/testing/test-utils.ts @@ -12,7 +12,7 @@ import { } from 'bungie-api-ts/destiny2'; import { F_OK } from 'constants'; import fs from 'fs/promises'; -import i18next from 'i18next'; +import i18next, { init } from 'i18next'; import en from 'locale/en.json'; import ja from 'locale/ja.json'; import _ from 'lodash'; @@ -107,7 +107,7 @@ export const getTestStores = _.once(async () => { * Use `i18next.changeLanguage('en');` to set language before tests. */ export function setupi18n() { - i18next.init({ + init({ lng: 'en', debug: true, initImmediate: true, diff --git a/yarn.lock b/yarn.lock index 4ac35afec0..07903969b3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1518,6 +1518,18 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" +"@pkgr/utils@^2.3.1": + version "2.4.1" + resolved "https://registry.yarnpkg.com/@pkgr/utils/-/utils-2.4.1.tgz#adf291d0357834c410ce80af16e711b56c7b1cd3" + integrity sha512-JOqwkgFEyi+OROIyq7l4Jy28h/WwhDnG/cPkXG2Z1iFbubB6jsHW1NDvmyOzTBxHr3yg68YGirmh1JUgMqa+9w== + dependencies: + cross-spawn "^7.0.3" + fast-glob "^3.2.12" + is-glob "^4.0.3" + open "^9.1.0" + picocolors "^1.0.0" + tslib "^2.5.0" + "@pmmmwh/react-refresh-webpack-plugin@^0.5.1": version "0.5.10" resolved "https://registry.yarnpkg.com/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.5.10.tgz#2eba163b8e7dbabb4ce3609ab5e32ab63dda3ef8" @@ -2836,6 +2848,11 @@ array-differ@^3.0.0: resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-3.0.0.tgz#3cbb3d0f316810eafcc47624734237d6aee4ae6b" integrity sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg== +array-find@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-find/-/array-find-1.0.0.tgz#6c8e286d11ed768327f8e62ecee87353ca3e78b8" + integrity sha512-kO/vVCacW9mnpn3WPWbTVlEnOabK2L7LWi2HViURtCM46y1zb6I8UMjx4LgbiqadTgHnLInUronwn3ampNTJtQ== + array-flatten@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" @@ -3134,6 +3151,11 @@ batch@0.6.1: resolved "https://registry.yarnpkg.com/batch/-/batch-0.6.1.tgz#dc34314f4e679318093fc760272525f94bf25c16" integrity sha512-x+VAiMRL6UPkx+kudNvxTl6hB2XNNCG2r+7wixVfIYwu/2HKRXimwQyaumLjMveWvT2Hkd/cAJw+QBMfJ/EKVw== +big-integer@^1.6.44: + version "1.6.51" + resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.51.tgz#0df92a5d9880560d3ff2d5fd20245c889d130686" + integrity sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg== + big.js@^5.2.2: version "5.2.2" resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" @@ -3196,6 +3218,13 @@ boxen@^7.0.0: widest-line "^4.0.1" wrap-ansi "^8.1.0" +bplist-parser@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/bplist-parser/-/bplist-parser-0.2.0.tgz#43a9d183e5bf9d545200ceac3e712f79ebbe8d0e" + integrity sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw== + dependencies: + big-integer "^1.6.44" + brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" @@ -3250,6 +3279,13 @@ builtin-modules@^3.1.0: resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.3.0.tgz#cae62812b89801e9656336e46223e030386be7b6" integrity sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw== +bundle-name@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/bundle-name/-/bundle-name-3.0.0.tgz#ba59bcc9ac785fb67ccdbf104a2bf60c099f0e1a" + integrity sha512-PKA4BeSvBpQKQ8iPOGCSiell+N8P+Tf1DlwqmYhpe2gAhKPHn8EYOxVT+ShuGmhg8lN8XiSlS80yiExKXrURlw== + dependencies: + run-applescript "^5.0.0" + bungie-api-ts@^4.12.0: version "4.22.3" resolved "https://registry.yarnpkg.com/bungie-api-ts/-/bungie-api-ts-4.22.3.tgz#93162ead4d0841f9b8b5df290b4518b37290f1fb" @@ -4014,6 +4050,24 @@ deepmerge@^4.0.0, deepmerge@^4.2.2: resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.1.tgz#44b5f2147cd3b00d4b56137685966f26fd25dd4a" integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A== +default-browser-id@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/default-browser-id/-/default-browser-id-3.0.0.tgz#bee7bbbef1f4e75d31f98f4d3f1556a14cea790c" + integrity sha512-OZ1y3y0SqSICtE8DE4S8YOE9UZOJ8wO16fKWVP5J1Qz42kV9jcnMVFrEE/noXb/ss3Q4pZIH79kxofzyNNtUNA== + dependencies: + bplist-parser "^0.2.0" + untildify "^4.0.0" + +default-browser@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/default-browser/-/default-browser-4.0.0.tgz#53c9894f8810bf86696de117a6ce9085a3cbc7da" + integrity sha512-wX5pXO1+BrhMkSbROFsyxUm0i/cJEScyNhA4PPxc41ICuv05ZZB/MX28s8aZx6xjmatvebIapF6hLEKEcpneUA== + dependencies: + bundle-name "^3.0.0" + default-browser-id "^3.0.0" + execa "^7.1.1" + titleize "^3.0.0" + default-gateway@^6.0.3: version "6.0.3" resolved "https://registry.yarnpkg.com/default-gateway/-/default-gateway-6.0.3.tgz#819494c888053bdb743edbf343d6cdf7f2943a71" @@ -4031,6 +4085,11 @@ define-lazy-prop@^2.0.0: resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz#3f7ae421129bcaaac9bc74905c98a0009ec9ee7f" integrity sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og== +define-lazy-prop@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz#dbb19adfb746d7fc6d734a06b72f4a00d021255f" + integrity sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg== + define-properties@^1.1.3, define-properties@^1.1.4, define-properties@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.0.tgz#52988570670c9eacedd8064f4a990f2405849bd5" @@ -4330,7 +4389,16 @@ end-of-stream@^1.0.0, end-of-stream@^1.1.0: dependencies: once "^1.4.0" -enhanced-resolve@^5.0.0, enhanced-resolve@^5.14.1: +enhanced-resolve@^0.9.1: + version "0.9.1" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-0.9.1.tgz#4d6e689b3725f86090927ccc86cd9f1635b89e2e" + integrity sha512-kxpoMgrdtkXZ5h0SeraBS1iRntpTpQ3R8ussdb38+UAFnMGX5DDyJXePm+OCHOcoXvHDw7mc2erbJBpDnl7TPw== + dependencies: + graceful-fs "^4.1.2" + memory-fs "^0.2.0" + tapable "^0.1.8" + +enhanced-resolve@^5.0.0, enhanced-resolve@^5.12.0, enhanced-resolve@^5.14.1: version "5.14.1" resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.14.1.tgz#de684b6803724477a4af5d74ccae5de52c25f6b3" integrity sha512-Vklwq2vDKtl0y/vtwjSesgJ5MYS7Etuk5txS8VdKL4AOS1aUlD96zqIfsOSLQsdv3xgMRbtkWM8eG9XDfKUPow== @@ -4523,6 +4591,37 @@ eslint-import-resolver-node@^0.3.7: is-core-module "^2.11.0" resolve "^1.22.1" +eslint-import-resolver-typescript@^3.5.5: + version "3.5.5" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.5.5.tgz#0a9034ae7ed94b254a360fbea89187b60ea7456d" + integrity sha512-TdJqPHs2lW5J9Zpe17DZNQuDnox4xo2o+0tE7Pggain9Rbc19ik8kFtXdxZ250FVx2kF4vlt2RSf4qlUpG7bhw== + dependencies: + debug "^4.3.4" + enhanced-resolve "^5.12.0" + eslint-module-utils "^2.7.4" + get-tsconfig "^4.5.0" + globby "^13.1.3" + is-core-module "^2.11.0" + is-glob "^4.0.3" + synckit "^0.8.5" + +eslint-import-resolver-webpack@^0.13.2: + version "0.13.2" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-webpack/-/eslint-import-resolver-webpack-0.13.2.tgz#fc813df0d08b9265cc7072d22393bda5198bdc1e" + integrity sha512-XodIPyg1OgE2h5BDErz3WJoK7lawxKTJNhgPNafRST6csC/MZC+L5P6kKqsZGRInpbgc02s/WZMrb4uGJzcuRg== + dependencies: + array-find "^1.0.0" + debug "^3.2.7" + enhanced-resolve "^0.9.1" + find-root "^1.1.0" + has "^1.0.3" + interpret "^1.4.0" + is-core-module "^2.7.0" + is-regex "^1.1.4" + lodash "^4.17.21" + resolve "^1.20.0" + semver "^5.7.1" + eslint-module-utils@^2.7.4: version "2.8.0" resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz#e439fee65fc33f6bba630ff621efc38ec0375c49" @@ -4596,7 +4695,7 @@ eslint-plugin-i18n-text@^1.0.1: resolved "https://registry.yarnpkg.com/eslint-plugin-i18n-text/-/eslint-plugin-i18n-text-1.0.1.tgz#69ce14f9af7d135cbe8114b1b144a57bb83291dc" integrity sha512-3G3UetST6rdqhqW9SfcfzNYMpQXS7wNkJvp6dsXnjzGiku6Iu5hl3B0kmk6lIcFPwYjhQIY+tXVRtK9TlGT7RA== -eslint-plugin-import@^2.25.2: +eslint-plugin-import@^2.25.2, eslint-plugin-import@^2.27.5: version "2.27.5" resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.27.5.tgz#876a6d03f52608a3e5bb439c2550588e51dd6c65" integrity sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow== @@ -4879,6 +4978,21 @@ execa@^5.0.0: signal-exit "^3.0.3" strip-final-newline "^2.0.0" +execa@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/execa/-/execa-7.1.1.tgz#3eb3c83d239488e7b409d48e8813b76bb55c9c43" + integrity sha512-wH0eMf/UXckdUYnO21+HDztteVv05rq2GXksxT4fCGeHkBhw1DROXh40wcjMcRqDOWE7iPJ4n3M7e2+YFP+76Q== + dependencies: + cross-spawn "^7.0.3" + get-stream "^6.0.1" + human-signals "^4.3.0" + is-stream "^3.0.0" + merge-stream "^2.0.0" + npm-run-path "^5.1.0" + onetime "^6.0.0" + signal-exit "^3.0.7" + strip-final-newline "^3.0.0" + exit@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" @@ -5063,6 +5177,11 @@ find-cache-dir@^3.2.0, find-cache-dir@^3.3.2: make-dir "^3.0.2" pkg-dir "^4.1.0" +find-root@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/find-root/-/find-root-1.1.0.tgz#abcfc8ba76f708c42a97b3d685b7e9450bfb9ce4" + integrity sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng== + find-up@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" @@ -5326,6 +5445,13 @@ get-symbol-description@^1.0.0: call-bind "^1.0.2" get-intrinsic "^1.1.1" +get-tsconfig@^4.5.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/get-tsconfig/-/get-tsconfig-4.6.0.tgz#e977690993a42f3e320e932427502a40f7af6d05" + integrity sha512-lgbo68hHTQnFddybKbbs/RDRJnJT5YyGy2kQzVwbq+g67X73i+5MVTval34QxGkOe9X5Ujf1UYpCaphLyltjEg== + dependencies: + resolve-pkg-maps "^1.0.0" + git-hooks-list@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/git-hooks-list/-/git-hooks-list-3.1.0.tgz#386dc531dcc17474cf094743ff30987a3d3e70fc" @@ -5440,7 +5566,7 @@ globby@^11.1.0: merge2 "^1.4.1" slash "^3.0.0" -globby@^13.1.1, globby@^13.1.2, globby@^13.1.4: +globby@^13.1.1, globby@^13.1.2, globby@^13.1.3, globby@^13.1.4: version "13.1.4" resolved "https://registry.yarnpkg.com/globby/-/globby-13.1.4.tgz#2f91c116066bcec152465ba36e5caa4a13c01317" integrity sha512-iui/IiiW+QrJ1X1hKH5qwlMQyv34wJAYwH1vrf8b9kBA4sNiif3gKsMHa+BrdnOpEudWjpotfa7LrTzB1ERS/g== @@ -5810,6 +5936,11 @@ human-signals@^2.1.0: resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== +human-signals@^4.3.0: + version "4.3.1" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-4.3.1.tgz#ab7f811e851fca97ffbd2c1fe9a958964de321b2" + integrity sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ== + husky@^8.0.0: version "8.0.3" resolved "https://registry.yarnpkg.com/husky/-/husky-8.0.3.tgz#4936d7212e46d1dea28fef29bb3a108872cd9184" @@ -5979,6 +6110,11 @@ internal-slot@^1.0.3, internal-slot@^1.0.4, internal-slot@^1.0.5: has "^1.0.3" side-channel "^1.0.4" +interpret@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" + integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA== + interpret@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/interpret/-/interpret-3.1.1.tgz#5be0ceed67ca79c6c4bc5cf0d7ee843dcea110c4" @@ -6068,7 +6204,7 @@ is-ci@^3.0.1: dependencies: ci-info "^3.2.0" -is-core-module@^2.11.0, is-core-module@^2.5.0, is-core-module@^2.8.1, is-core-module@^2.9.0: +is-core-module@^2.11.0, is-core-module@^2.5.0, is-core-module@^2.7.0, is-core-module@^2.8.1, is-core-module@^2.9.0: version "2.12.1" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.12.1.tgz#0c0b6885b6f80011c71541ce15c8d66cf5a4f9fd" integrity sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg== @@ -6094,6 +6230,11 @@ is-docker@^2.0.0, is-docker@^2.1.1: resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== +is-docker@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-3.0.0.tgz#90093aa3106277d8a77a5910dbae71747e15a200" + integrity sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ== + is-extglob@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" @@ -6135,6 +6276,13 @@ is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: dependencies: is-extglob "^2.1.1" +is-inside-container@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-inside-container/-/is-inside-container-1.0.0.tgz#e81fba699662eb31dbdaf26766a61d4814717ea4" + integrity sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA== + dependencies: + is-docker "^3.0.0" + is-installed-globally@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/is-installed-globally/-/is-installed-globally-0.4.0.tgz#9a0fd407949c30f86eb6959ef1b7994ed0b7b520" @@ -6290,6 +6438,11 @@ is-stream@^2.0.0: resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== +is-stream@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-3.0.0.tgz#e6bfd7aa6bef69f4f472ce9bb681e3e57b4319ac" + integrity sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA== + is-string@^1.0.5, is-string@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" @@ -7363,6 +7516,11 @@ memoize-one@^6.0.0: resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-6.0.0.tgz#b2591b871ed82948aee4727dc6abceeeac8c1045" integrity sha512-rkpe71W0N0c0Xz6QD0eJETuWAJGnJ9afsl1srmwPrI+yBCkge5EycXXbYRyvL29zZVUWQCY7InPRCv3GDXuZNw== +memory-fs@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.2.0.tgz#f2bb25368bc121e391c2520de92969caee0a0290" + integrity sha512-+y4mDxU4rvXXu5UDSGCGNiesFmwCHuefGMoPCO1WYucNYj7DsLqrFaa2fXVI0H+NNiPTwwzKwspn9yTZqUGqng== + memorystream@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/memorystream/-/memorystream-0.3.1.tgz#86d7090b30ce455d63fbae12dda51a47ddcaf9b2" @@ -7454,6 +7612,11 @@ mimic-fn@^2.1.0: resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== +mimic-fn@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-4.0.0.tgz#60a90550d5cb0b239cca65d893b1a53b29871ecc" + integrity sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw== + mimic-response@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-3.1.0.tgz#2d1d59af9c1b129815accc2c46a022a5ce1fa3c9" @@ -7760,6 +7923,13 @@ npm-run-path@^4.0.0, npm-run-path@^4.0.1: dependencies: path-key "^3.0.0" +npm-run-path@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-5.1.0.tgz#bc62f7f3f6952d9894bd08944ba011a6ee7b7e00" + integrity sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q== + dependencies: + path-key "^4.0.0" + nth-check@^2.0.1: version "2.1.1" resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-2.1.1.tgz#c9eab428effce36cd6b92c924bdb000ef1f1ed1d" @@ -7876,6 +8046,13 @@ onetime@^5.1.0, onetime@^5.1.2: dependencies: mimic-fn "^2.1.0" +onetime@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-6.0.0.tgz#7c24c18ed1fd2e9bca4bd26806a33613c77d34b4" + integrity sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ== + dependencies: + mimic-fn "^4.0.0" + open@^8.0.9: version "8.4.2" resolved "https://registry.yarnpkg.com/open/-/open-8.4.2.tgz#5b5ffe2a8f793dcd2aad73e550cb87b59cb084f9" @@ -7885,6 +8062,16 @@ open@^8.0.9: is-docker "^2.1.1" is-wsl "^2.2.0" +open@^9.1.0: + version "9.1.0" + resolved "https://registry.yarnpkg.com/open/-/open-9.1.0.tgz#684934359c90ad25742f5a26151970ff8c6c80b6" + integrity sha512-OS+QTnw1/4vrf+9hh1jc1jnYjzSG4ttTBB8UxOwAnInG3Uo4ssetzC1ihqaIHjLJnA5GGlRl6QlZXOTQhRBUvg== + dependencies: + default-browser "^4.0.0" + define-lazy-prop "^3.0.0" + is-inside-container "^1.0.0" + is-wsl "^2.2.0" + optionator@^0.8.1: version "0.8.3" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" @@ -8125,6 +8312,11 @@ path-key@^3.0.0, path-key@^3.1.0: resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== +path-key@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-4.0.0.tgz#295588dc3aee64154f877adb9d780b81c554bf18" + integrity sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ== + path-parse@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" @@ -8953,6 +9145,11 @@ resolve-options@^1.1.0: dependencies: value-or-function "^3.0.0" +resolve-pkg-maps@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz#616b3dc2c57056b5588c31cdf4b3d64db133720f" + integrity sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw== + resolve.exports@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-2.0.2.tgz#f8c934b8e6a13f539e38b7098e2e36134f01e800" @@ -9029,6 +9226,13 @@ rollup@^2.43.1: optionalDependencies: fsevents "~2.3.2" +run-applescript@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/run-applescript/-/run-applescript-5.0.0.tgz#e11e1c932e055d5c6b40d98374e0268d9b11899c" + integrity sha512-XcT5rBksx1QdIhlFOCtgZkB99ZEouFZ1E2Kc2LHqNW13U3/74YGdkQRmThTwxy4QIyookibDKYZOPqX//6BlAg== + dependencies: + execa "^5.0.0" + run-parallel@^1.1.9: version "1.2.0" resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" @@ -9630,6 +9834,11 @@ strip-final-newline@^2.0.0: resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== +strip-final-newline@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-3.0.0.tgz#52894c313fbff318835280aed60ff71ebf12b8fd" + integrity sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw== + strip-indent@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-3.0.0.tgz#c32e1cee940b6b3432c771bc2c54bcce73cd3001" @@ -9836,6 +10045,14 @@ symbol-tree@^3.2.4: resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== +synckit@^0.8.5: + version "0.8.5" + resolved "https://registry.yarnpkg.com/synckit/-/synckit-0.8.5.tgz#b7f4358f9bb559437f9f167eb6bc46b3c9818fa3" + integrity sha512-L1dapNV6vu2s/4Sputv8xGsCdAVlb5nRDMFU/E27D44l5U6cw1g0dGd45uLc+OXjNMmF4ntiMdCimzcjFKQI8Q== + dependencies: + "@pkgr/utils" "^2.3.1" + tslib "^2.5.0" + table@^6.8.1: version "6.8.1" resolved "https://registry.yarnpkg.com/table/-/table-6.8.1.tgz#ea2b71359fe03b017a5fbc296204471158080bdf" @@ -9847,6 +10064,11 @@ table@^6.8.1: string-width "^4.2.3" strip-ansi "^6.0.1" +tapable@^0.1.8: + version "0.1.10" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-0.1.10.tgz#29c35707c2b70e50d07482b5d202e8ed446dafd4" + integrity sha512-jX8Et4hHg57mug1/079yitEKWGB3LCwoxByLsNim89LABq8NqgiX+6iYVOsq0vX8uJHkU+DZ5fnq95f800bEsQ== + tapable@^1.0.0: version "1.1.3" resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" @@ -9945,6 +10167,11 @@ tiny-invariant@^1.0.6: resolved "https://registry.yarnpkg.com/tiny-invariant/-/tiny-invariant-1.3.1.tgz#8560808c916ef02ecfd55e66090df23a4b7aa642" integrity sha512-AD5ih2NlSssTCwsMznbvwMZpJ1cbhkGd2uueNxzv2jDlEeZdU04JQfRnggJQ8DrcVBGjAsCKwFBbDlVNtEMlzw== +titleize@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/titleize/-/titleize-3.0.0.tgz#71c12eb7fdd2558aa8a44b0be83b8a76694acd53" + integrity sha512-KxVu8EYHDPBdUYdKZdKtU2aj2XfEx9AfjXxE/Aj0vT06w2icA09Vus1rh6eSu1y01akYg6BjIK/hxyLJINoMLQ== + tmpl@1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.5.tgz#8683e0b902bb9c20c4f726e3c0b69f36518c07cc" @@ -10061,7 +10288,7 @@ tslib@^1.8.1, tslib@^1.9.3: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.0.3, tslib@^2.3.0, tslib@^2.4.0: +tslib@^2.0.3, tslib@^2.3.0, tslib@^2.4.0, tslib@^2.5.0: version "2.5.3" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.3.tgz#24944ba2d990940e6e982c4bea147aba80209913" integrity sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w== @@ -10261,6 +10488,11 @@ unpipe@1.0.0, unpipe@~1.0.0: resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== +untildify@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/untildify/-/untildify-4.0.0.tgz#2bc947b953652487e4600949fb091e3ae8cd919b" + integrity sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw== + upath@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/upath/-/upath-1.2.0.tgz#8f66dbcd55a883acdae4408af8b035a5044c1894"