From d25665a5135ff7d06956506b668c24cf12138d0c Mon Sep 17 00:00:00 2001 From: Jaco Date: Sun, 2 Apr 2023 16:12:44 +0300 Subject: [PATCH] Partial support for verbatimModuleSyntax (#9270) --- package.json | 3 +- packages/apps-config/src/api/spec/fantour.ts | 2 +- packages/apps-config/src/api/spec/interbtc.ts | 6 +- packages/apps-config/src/api/spec/mangata.ts | 6 +- packages/apps-config/src/api/spec/nftmart.ts | 2 +- .../apps-config/src/api/spec/opportunity.ts | 4 +- packages/apps-config/src/api/spec/standard.ts | 4 +- packages/apps-config/src/api/spec/subspace.ts | 2 +- packages/apps-electron/package.json | 2 +- .../src/api/electron-main-api.ts | 2 +- .../src/api/global-exported-api.ts | 2 +- .../src/renderer/remote-electron-store.ts | 3 +- packages/apps-electron/tsconfig.build.json | 4 +- packages/apps/package.json | 2 +- .../page-accounts/src/Accounts/index.spec.ts | 5 +- packages/page-accounts/src/Accounts/types.ts | 3 +- .../src/Sidebar/AccountMenuButtons.tsx | 3 +- .../src/Sidebar/AddressSection.tsx | 3 +- .../src/Sidebar/Sidebar.spec.tsx | 5 +- .../src/modals/CreateEthDerivationPath.tsx | 5 +- packages/page-accounts/src/types.ts | 3 +- packages/page-addresses/src/types.ts | 3 +- .../src/BountyExtraActions/SlashCurator.tsx | 2 +- .../src/BountyExtraActions/index.tsx | 4 +- .../helpers/determineUnassignCuratorAction.ts | 3 +- .../src/hooks/useBountyStatus.ts | 2 +- packages/page-bounties/src/useCounter.ts | 3 +- packages/page-bounties/test/hooks/defaults.ts | 5 +- .../page-bounties/test/pages/bountiesPage.tsx | 11 +- packages/page-files/src/CrustFiles.tsx | 2 +- packages/page-files/src/Progress.tsx | 4 +- packages/page-files/src/UploadModal.tsx | 6 +- packages/page-files/src/hooks.ts | 4 +- packages/page-nfts/src/useCollectionInfos.ts | 4 +- packages/react-api/src/hoc/onlyOn.tsx | 3 +- packages/react-components/src/AddressRow.tsx | 3 +- packages/react-components/src/CryptoType.tsx | 3 +- packages/react-components/src/Menu/types.ts | 3 +- .../src/Tabs/CurrentSection.tsx | 3 +- packages/react-components/src/styled.ts | 4 +- packages/react-components/src/types.ts | 4 +- .../src/util/getAccountCryptoType.ts | 4 +- packages/react-components/src/util/types.ts | 5 +- packages/react-hooks/src/useNonEmptyString.ts | 4 +- packages/react-hooks/src/useNonZeroBn.ts | 3 +- packages/react-hooks/src/useOutsideClick.ts | 4 +- packages/react-hooks/src/usePopupWindow.ts | 3 +- packages/react-hooks/src/useSubidentities.ts | 2 +- packages/react-hooks/src/useTreasury.ts | 3 +- packages/test-support/scripts/lib/helpers.ts | 11 +- .../scripts/lib/multiFunctions.ts | 3 +- packages/test-support/src/creation/account.ts | 9 +- .../test-support/src/creation/bounties.ts | 7 +- packages/test-support/src/creation/contact.ts | 9 +- packages/test-support/src/keyring/signers.ts | 3 +- packages/test-support/src/pages/Page.tsx | 8 +- .../test-support/src/pagesElements/Row.ts | 6 +- packages/test-support/src/react/apiInTests.ts | 4 +- .../test-support/src/transaction/execute.ts | 6 +- packages/test-support/src/types.ts | 6 +- packages/test-support/src/utils/balance.ts | 3 +- .../test-support/src/utils/mockApiHooks.ts | 3 +- tsconfig.build.json | 10 +- tsconfig.json | 10 +- yarn.lock | 311 +++++++----------- 65 files changed, 276 insertions(+), 308 deletions(-) diff --git a/package.json b/package.json index feab4fa585..2a397f571b 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,6 @@ "author": "Jaco Greeff ", "bugs": "https://github.com/polkadot-js/apps/issues", "description": "An Apps portal into the Polkadot network", - "engine-strict": true, "engines": { "node": ">=18.14" }, @@ -69,7 +68,7 @@ "devDependencies": { "@crustio/crust-pin": "^1.0.0", "@pinata/sdk": "^2.1.0", - "@polkadot/dev": "^0.72.25", + "@polkadot/dev": "^0.72.32", "@types/chart.js": "^2.9.37", "@types/file-saver": "^2.0.5", "@types/react-beautiful-dnd": "^13.1.4", diff --git a/packages/apps-config/src/api/spec/fantour.ts b/packages/apps-config/src/api/spec/fantour.ts index 9a55665e5b..9b1f1a2c08 100644 --- a/packages/apps-config/src/api/spec/fantour.ts +++ b/packages/apps-config/src/api/spec/fantour.ts @@ -5,7 +5,7 @@ /* eslint-disable sort-keys */ /* eslint-disable camelcase */ -import { OverrideBundleDefinition } from '@polkadot/types/types'; +import type { OverrideBundleDefinition } from '@polkadot/types/types'; const definitions: OverrideBundleDefinition = { types: [ diff --git a/packages/apps-config/src/api/spec/interbtc.ts b/packages/apps-config/src/api/spec/interbtc.ts index 562e1975e7..b4f44955ed 100644 --- a/packages/apps-config/src/api/spec/interbtc.ts +++ b/packages/apps-config/src/api/spec/interbtc.ts @@ -5,16 +5,16 @@ import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; +import type { DeriveBalancesAll } from '@polkadot/api-derive/types'; +import type { Balance } from '@polkadot/types/interfaces'; +import type { FrameSystemAccountInfo } from '@polkadot/types/lookup'; import type { OverrideBundleDefinition } from '@polkadot/types/types'; import interbtc from '@interlay/interbtc-types'; import { combineLatest, map } from 'rxjs'; -import { DeriveBalancesAll } from '@polkadot/api-derive/types'; import { memo } from '@polkadot/api-derive/util'; import { TypeRegistry, U128 } from '@polkadot/types'; -import { Balance } from '@polkadot/types/interfaces'; -import { FrameSystemAccountInfo } from '@polkadot/types/lookup'; import { BN, formatBalance } from '@polkadot/util'; function balanceOf (number: number | string): U128 { diff --git a/packages/apps-config/src/api/spec/mangata.ts b/packages/apps-config/src/api/spec/mangata.ts index ff68cc2db6..47c1187691 100644 --- a/packages/apps-config/src/api/spec/mangata.ts +++ b/packages/apps-config/src/api/spec/mangata.ts @@ -6,15 +6,15 @@ import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; +import type { DeriveBalancesAll } from '@polkadot/api-derive/types'; +import type { Balance } from '@polkadot/types/interfaces'; +import type { FrameSystemAccountInfo } from '@polkadot/types/lookup'; import type { OverrideBundleDefinition } from '@polkadot/types/types'; import { combineLatest, map } from 'rxjs'; -import { DeriveBalancesAll } from '@polkadot/api-derive/types'; import { memo } from '@polkadot/api-derive/util'; import { TypeRegistry, U128 } from '@polkadot/types'; -import { Balance } from '@polkadot/types/interfaces'; -import { FrameSystemAccountInfo } from '@polkadot/types/lookup'; import { BN } from '@polkadot/util'; function balanceOf (number: number | string): U128 { diff --git a/packages/apps-config/src/api/spec/nftmart.ts b/packages/apps-config/src/api/spec/nftmart.ts index 692108d0b9..2c3bd11aef 100644 --- a/packages/apps-config/src/api/spec/nftmart.ts +++ b/packages/apps-config/src/api/spec/nftmart.ts @@ -5,7 +5,7 @@ /* eslint-disable sort-keys */ /* eslint-disable camelcase */ -import { OverrideBundleDefinition } from '@polkadot/types/types'; +import type { OverrideBundleDefinition } from '@polkadot/types/types'; const definitions: OverrideBundleDefinition = { types: [ diff --git a/packages/apps-config/src/api/spec/opportunity.ts b/packages/apps-config/src/api/spec/opportunity.ts index a1e31d568e..afda5e66e2 100644 --- a/packages/apps-config/src/api/spec/opportunity.ts +++ b/packages/apps-config/src/api/spec/opportunity.ts @@ -1,8 +1,8 @@ // Copyright 2017-2023 @polkadot/apps-config authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type { OverrideBundleDefinition } from '@polkadot/types/types'; + import definitions from '@digitalnative/type-definitions/opportunity/index.js'; -import { OverrideBundleDefinition } from '@polkadot/types/types'; - export default definitions as OverrideBundleDefinition; diff --git a/packages/apps-config/src/api/spec/standard.ts b/packages/apps-config/src/api/spec/standard.ts index 251b777750..7394f2fcab 100644 --- a/packages/apps-config/src/api/spec/standard.ts +++ b/packages/apps-config/src/api/spec/standard.ts @@ -1,8 +1,8 @@ // Copyright 2017-2023 @polkadot/apps-config authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type { OverrideBundleDefinition } from '@polkadot/types/types'; + import definitions from '@digitalnative/type-definitions/standard/index.js'; -import { OverrideBundleDefinition } from '@polkadot/types/types'; - export default definitions as OverrideBundleDefinition; diff --git a/packages/apps-config/src/api/spec/subspace.ts b/packages/apps-config/src/api/spec/subspace.ts index af6e48f02c..17a901143d 100644 --- a/packages/apps-config/src/api/spec/subspace.ts +++ b/packages/apps-config/src/api/spec/subspace.ts @@ -7,13 +7,13 @@ import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { Struct, u64 } from '@polkadot/types'; +import type { AccountId32, Digest, Header } from '@polkadot/types/interfaces'; import type { OverrideBundleDefinition, Registry } from '@polkadot/types/types'; import { combineLatest, map } from 'rxjs'; import { bestNumber, bestNumberFinalized, bestNumberLag, getBlock, subscribeNewBlocks } from '@polkadot/api-derive/chain'; import { memo } from '@polkadot/api-derive/util'; -import { AccountId32, Digest, Header } from '@polkadot/types/interfaces'; interface HeaderExtended extends Header { readonly author: AccountId32 | undefined; diff --git a/packages/apps-electron/package.json b/packages/apps-electron/package.json index 3705cd4aac..2ffb18f6c0 100644 --- a/packages/apps-electron/package.json +++ b/packages/apps-electron/package.json @@ -15,7 +15,7 @@ "sideEffects": false, "version": "0.124.2-212-x", "dependencies": { - "@polkadot/dev": "^0.72.25", + "@polkadot/dev": "^0.72.32", "@polkadot/react-components": "^0.124.2-212-x", "electron-log": "^5.0.0-beta.16", "electron-updater": "^5.3.0" diff --git a/packages/apps-electron/src/api/electron-main-api.ts b/packages/apps-electron/src/api/electron-main-api.ts index 429bf4e954..d6e27996d2 100644 --- a/packages/apps-electron/src/api/electron-main-api.ts +++ b/packages/apps-electron/src/api/electron-main-api.ts @@ -1,7 +1,7 @@ // Copyright 2017-2023 @polkadot/apps authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { AccountStoreApi } from './account-store-api.js'; +import type { AccountStoreApi } from './account-store-api.js'; export interface ElectronMainApi { accountStore: AccountStoreApi diff --git a/packages/apps-electron/src/api/global-exported-api.ts b/packages/apps-electron/src/api/global-exported-api.ts index 206e0df730..5ade88bcc1 100644 --- a/packages/apps-electron/src/api/global-exported-api.ts +++ b/packages/apps-electron/src/api/global-exported-api.ts @@ -1,7 +1,7 @@ // Copyright 2017-2023 @polkadot/apps authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ElectronMainApi } from './electron-main-api.js'; +import type { ElectronMainApi } from './electron-main-api.js'; declare global { interface Window { diff --git a/packages/apps-electron/src/renderer/remote-electron-store.ts b/packages/apps-electron/src/renderer/remote-electron-store.ts index 2d8dddfa17..67d6f32ad5 100644 --- a/packages/apps-electron/src/renderer/remote-electron-store.ts +++ b/packages/apps-electron/src/renderer/remote-electron-store.ts @@ -4,8 +4,7 @@ // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore Warned on by nodenext resolution (while package does build in bundler mode) import type { KeyringJson, KeyringStore } from '@polkadot/ui-keyring/types'; - -import { AccountStoreApi } from '../api/account-store-api.js'; +import type { AccountStoreApi } from '../api/account-store-api.js'; export class RemoteElectronStore implements KeyringStore { readonly #accountStore: AccountStoreApi; diff --git a/packages/apps-electron/tsconfig.build.json b/packages/apps-electron/tsconfig.build.json index da24d9f225..fc725e563d 100644 --- a/packages/apps-electron/tsconfig.build.json +++ b/packages/apps-electron/tsconfig.build.json @@ -3,7 +3,9 @@ "compilerOptions": { "baseUrl": "..", "outDir": "./build", - "rootDir": "./src" + "rootDir": "./src", + /* Since this is a forced-by-electron-CJS-module, we have to switch this off */ + "verbatimModuleSyntax": false }, "references": [] } diff --git a/packages/apps/package.json b/packages/apps/package.json index cfed40abde..9ad855cab8 100644 --- a/packages/apps/package.json +++ b/packages/apps/package.json @@ -18,7 +18,7 @@ "dependencies": { "@polkadot/apps-config": "^0.124.2-212-x", "@polkadot/apps-routing": "^0.124.2-212-x", - "@polkadot/dev": "^0.72.25", + "@polkadot/dev": "^0.72.32", "@polkadot/react-api": "^0.124.2-212-x", "@polkadot/react-components": "^0.124.2-212-x", "@polkadot/react-hooks": "^0.124.2-212-x", diff --git a/packages/page-accounts/src/Accounts/index.spec.ts b/packages/page-accounts/src/Accounts/index.spec.ts index 6448954d34..d00b1bcdaa 100644 --- a/packages/page-accounts/src/Accounts/index.spec.ts +++ b/packages/page-accounts/src/Accounts/index.spec.ts @@ -3,12 +3,14 @@ /// +import type { AddressFlags } from '@polkadot/react-hooks/types'; +import type { AccountId, Multisig, ProxyDefinition, Timepoint, Voting, VotingDelegating } from '@polkadot/types/interfaces'; + import { fireEvent, screen, within } from '@testing-library/react'; import { POLKADOT_GENESIS } from '@polkadot/apps-config'; import i18next from '@polkadot/react-components/i18n'; import { toShortAddress } from '@polkadot/react-components/util'; -import { AddressFlags } from '@polkadot/react-hooks/types'; import { anAccountWithBalance, anAccountWithBalanceAndMeta, anAccountWithInfo, anAccountWithInfoAndMeta, anAccountWithMeta, anAccountWithStaking } from '@polkadot/test-support/creation/account'; import { makeStakingLedger as ledger } from '@polkadot/test-support/creation/staking'; import { alice, bob, MemoryStore } from '@polkadot/test-support/keyring'; @@ -16,7 +18,6 @@ import { Table } from '@polkadot/test-support/pagesElements'; import { balance, mockApiHooks, showBalance } from '@polkadot/test-support/utils'; import { u32 } from '@polkadot/types'; import { TypeRegistry } from '@polkadot/types/create'; -import { AccountId, Multisig, ProxyDefinition, Timepoint, Voting, VotingDelegating } from '@polkadot/types/interfaces'; import { keyring } from '@polkadot/ui-keyring'; import { BN } from '@polkadot/util'; diff --git a/packages/page-accounts/src/Accounts/types.ts b/packages/page-accounts/src/Accounts/types.ts index ae759314fa..f159bfe6d4 100644 --- a/packages/page-accounts/src/Accounts/types.ts +++ b/packages/page-accounts/src/Accounts/types.ts @@ -1,11 +1,10 @@ // Copyright 2017-2023 @polkadot/app-accounts authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type { WithTranslation } from 'react-i18next'; import type { ActionStatus } from '@polkadot/react-components/Status/types'; import type { KeyringAddress } from '@polkadot/ui-keyring/types'; -import { WithTranslation } from 'react-i18next'; - export type { AppProps as ComponentProps } from '@polkadot/react-components/types'; export interface BareProps { diff --git a/packages/page-accounts/src/Sidebar/AccountMenuButtons.tsx b/packages/page-accounts/src/Sidebar/AccountMenuButtons.tsx index 8a3046d8e0..8d45455987 100644 --- a/packages/page-accounts/src/Sidebar/AccountMenuButtons.tsx +++ b/packages/page-accounts/src/Sidebar/AccountMenuButtons.tsx @@ -1,11 +1,12 @@ // Copyright 2017-2023 @polkadot/app-accounts authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type { AddressFlags } from '@polkadot/react-hooks/types'; + import React, { useCallback } from 'react'; import { Button, styled } from '@polkadot/react-components'; import { useApi, useToggle } from '@polkadot/react-hooks'; -import { AddressFlags } from '@polkadot/react-hooks/types'; import { isFunction } from '@polkadot/util'; import Transfer from '../modals/Transfer.js'; diff --git a/packages/page-accounts/src/Sidebar/AddressSection.tsx b/packages/page-accounts/src/Sidebar/AddressSection.tsx index 91781b3100..41b52917f5 100644 --- a/packages/page-accounts/src/Sidebar/AddressSection.tsx +++ b/packages/page-accounts/src/Sidebar/AddressSection.tsx @@ -1,12 +1,13 @@ // Copyright 2017-2023 @polkadot/page-accounts authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type { AddressFlags } from '@polkadot/react-hooks/types'; + import React from 'react'; import CopyToClipboard from 'react-copy-to-clipboard'; import { AccountName, Button, IdentityIcon, Input } from '@polkadot/react-components'; import { useToggle } from '@polkadot/react-hooks'; -import { AddressFlags } from '@polkadot/react-hooks/types'; import { useTranslation } from '../translate.js'; diff --git a/packages/page-accounts/src/Sidebar/Sidebar.spec.tsx b/packages/page-accounts/src/Sidebar/Sidebar.spec.tsx index b69aea5bc8..aba5144b9d 100644 --- a/packages/page-accounts/src/Sidebar/Sidebar.spec.tsx +++ b/packages/page-accounts/src/Sidebar/Sidebar.spec.tsx @@ -3,16 +3,17 @@ /// +import type { AddressFlags } from '@polkadot/react-hooks/types'; +import type { RegistrationJudgement } from '@polkadot/types/interfaces'; + import { fireEvent, screen, waitFor, within } from '@testing-library/react'; import i18next from '@polkadot/react-components/i18n'; -import { AddressFlags } from '@polkadot/react-hooks/types'; import { anAccount, anAccountWithInfo, anAccountWithMeta } from '@polkadot/test-support/creation/account'; import { alice, bob, MemoryStore } from '@polkadot/test-support/keyring'; import { charlieShortAddress, ferdieShortAddress, mockRegistration, registrars } from '@polkadot/test-support/mockData'; import { Sidebar } from '@polkadot/test-support/pagesElements'; import { mockApiHooks } from '@polkadot/test-support/utils'; -import { RegistrationJudgement } from '@polkadot/types/interfaces'; import { keyring } from '@polkadot/ui-keyring'; import { AccountsPage } from '../../test/pages/accountsPage.js'; diff --git a/packages/page-accounts/src/modals/CreateEthDerivationPath.tsx b/packages/page-accounts/src/modals/CreateEthDerivationPath.tsx index 8a157519f5..5470503dc5 100644 --- a/packages/page-accounts/src/modals/CreateEthDerivationPath.tsx +++ b/packages/page-accounts/src/modals/CreateEthDerivationPath.tsx @@ -1,16 +1,17 @@ // Copyright 2017-2023 @polkadot/app-accounts authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type { ReactNode } from 'react'; import type { BN } from '@polkadot/util'; +import type { DeriveValidationOutput } from '../types.js'; -import React, { ReactNode, useEffect, useRef, useState } from 'react'; +import React, { useEffect, useRef, useState } from 'react'; import { Checkbox, Dropdown, Input, InputNumber, MarkError, MarkWarning, Modal } from '@polkadot/react-components'; import { useToggle } from '@polkadot/react-hooks'; import { BN_ZERO } from '@polkadot/util'; import { useTranslation } from '../translate.js'; -import { DeriveValidationOutput } from '../types.js'; interface Props { className?: string; diff --git a/packages/page-accounts/src/types.ts b/packages/page-accounts/src/types.ts index bf5bd24fe9..5124e092f4 100644 --- a/packages/page-accounts/src/types.ts +++ b/packages/page-accounts/src/types.ts @@ -1,13 +1,12 @@ // Copyright 2017-2023 @polkadot/app-accounts authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type { WithTranslation } from 'react-i18next'; import type { ActionStatus } from '@polkadot/react-components/Status/types'; import type { Balance, Conviction } from '@polkadot/types/interfaces'; import type { KeyringAddress } from '@polkadot/ui-keyring/types'; import type { BN } from '@polkadot/util'; -import { WithTranslation } from 'react-i18next'; - export type { AppProps as ComponentProps } from '@polkadot/react-components/types'; export interface BareProps { diff --git a/packages/page-addresses/src/types.ts b/packages/page-addresses/src/types.ts index 48bf39a207..fbfafa83b8 100644 --- a/packages/page-addresses/src/types.ts +++ b/packages/page-addresses/src/types.ts @@ -1,12 +1,11 @@ // Copyright 2017-2023 @polkadot/app-addresses authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type { WithTranslation } from 'react-i18next'; import type { ActionStatus } from '@polkadot/react-components/Status/types'; import type { Balance, Conviction } from '@polkadot/types/interfaces'; import type { KeyringAddress } from '@polkadot/ui-keyring/types'; -import { WithTranslation } from 'react-i18next'; - export type { AppProps as ComponentProps } from '@polkadot/react-components/types'; export interface BareProps { diff --git a/packages/page-bounties/src/BountyExtraActions/SlashCurator.tsx b/packages/page-bounties/src/BountyExtraActions/SlashCurator.tsx index e7ad2b070f..68eb5e0c75 100644 --- a/packages/page-bounties/src/BountyExtraActions/SlashCurator.tsx +++ b/packages/page-bounties/src/BountyExtraActions/SlashCurator.tsx @@ -3,6 +3,7 @@ import type { SubmittableExtrinsicFunction } from '@polkadot/api/types'; import type { AccountId, BountyIndex } from '@polkadot/types/interfaces'; +import type { ValidUnassignCuratorAction } from '../types.js'; import React, { useEffect, useMemo, useState } from 'react'; @@ -14,7 +15,6 @@ import { BN } from '@polkadot/util'; import { truncateTitle } from '../helpers/index.js'; import { useBounties } from '../hooks/index.js'; import { useTranslation } from '../translate.js'; -import { ValidUnassignCuratorAction } from '../types.js'; interface Props { action: ValidUnassignCuratorAction; diff --git a/packages/page-bounties/src/BountyExtraActions/index.tsx b/packages/page-bounties/src/BountyExtraActions/index.tsx index aa92223a37..bc5c6a5f78 100644 --- a/packages/page-bounties/src/BountyExtraActions/index.tsx +++ b/packages/page-bounties/src/BountyExtraActions/index.tsx @@ -1,19 +1,19 @@ // Copyright 2017-2023 @polkadot/app-bounties authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type { DeriveCollectiveProposal } from '@polkadot/api-derive/types'; import type { BountyIndex, BountyStatus } from '@polkadot/types/interfaces'; import type { BN } from '@polkadot/util'; +import type { ValidUnassignCuratorAction } from '../types.js'; import React, { useCallback, useMemo, useRef, useState } from 'react'; -import { DeriveCollectiveProposal } from '@polkadot/api-derive/types'; import { Menu, Popup } from '@polkadot/react-components'; import { useCollectiveMembers, useToggle } from '@polkadot/react-hooks'; import { determineUnassignCuratorAction } from '../helpers/index.js'; import { useBountyStatus, useUserRole } from '../hooks/index.js'; import { useTranslation } from '../translate.js'; -import { ValidUnassignCuratorAction } from '../types.js'; import BountyRejectCurator from './BountyRejectCurator.js'; import CloseBounty from './CloseBounty.js'; import ExtendBountyExpiryAction from './ExtendBountyExpiryAction.js'; diff --git a/packages/page-bounties/src/helpers/determineUnassignCuratorAction.ts b/packages/page-bounties/src/helpers/determineUnassignCuratorAction.ts index f2fe8ccaef..6b3dd7781d 100644 --- a/packages/page-bounties/src/helpers/determineUnassignCuratorAction.ts +++ b/packages/page-bounties/src/helpers/determineUnassignCuratorAction.ts @@ -3,11 +3,10 @@ import type { BountyStatus } from '@polkadot/types/interfaces'; import type { BN } from '@polkadot/util'; +import type { UserRole, ValidUnassignCuratorAction } from '../types.js'; import { BN_ZERO } from '@polkadot/util'; -import { UserRole, ValidUnassignCuratorAction } from '../types.js'; - export function determineUnassignCuratorAction (roles: UserRole[], status: BountyStatus, blocksUntilUpdate?: BN): ValidUnassignCuratorAction[] { const actions: ValidUnassignCuratorAction[] = []; diff --git a/packages/page-bounties/src/hooks/useBountyStatus.ts b/packages/page-bounties/src/hooks/useBountyStatus.ts index 6280094430..d774d814d3 100644 --- a/packages/page-bounties/src/hooks/useBountyStatus.ts +++ b/packages/page-bounties/src/hooks/useBountyStatus.ts @@ -1,12 +1,12 @@ // Copyright 2017-2023 @polkadot/app-bounties authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type { BountyStatus } from '@polkadot/types/interfaces'; import type { BountyStatusType } from '../types.js'; import { useCallback } from 'react'; import { createNamedHook } from '@polkadot/react-hooks'; -import { BountyStatus } from '@polkadot/types/interfaces'; import { getBountyStatus } from '../helpers/index.js'; diff --git a/packages/page-bounties/src/useCounter.ts b/packages/page-bounties/src/useCounter.ts index c9fb6c6a37..f8b5e9a8f4 100644 --- a/packages/page-bounties/src/useCounter.ts +++ b/packages/page-bounties/src/useCounter.ts @@ -1,9 +1,10 @@ // Copyright 2017-2023 @polkadot/app-bounties authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type { DeriveBounties } from '@polkadot/api-derive/types'; + import { useMemo } from 'react'; -import { DeriveBounties } from '@polkadot/api-derive/types'; import { createNamedHook, useApi, useCall } from '@polkadot/react-hooks'; function useCounterImpl (): number { diff --git a/packages/page-bounties/test/hooks/defaults.ts b/packages/page-bounties/test/hooks/defaults.ts index c28ac25e80..5891970648 100644 --- a/packages/page-bounties/test/hooks/defaults.ts +++ b/packages/page-bounties/test/hooks/defaults.ts @@ -2,13 +2,12 @@ // SPDX-License-Identifier: Apache-2.0 import type { SubmittableExtrinsicFunction } from '@polkadot/api/types'; +import type { DeriveBounties } from '@polkadot/api-derive/types'; +import type { BountyApi } from '../../src/hooks/index.js'; -import { DeriveBounties } from '@polkadot/api-derive/types'; import { balanceOf } from '@polkadot/test-support/creation/balance'; import { BN, BN_ONE } from '@polkadot/util'; -import { BountyApi } from '../../src/hooks/index.js'; - export const defaultBountyUpdatePeriod = new BN(100000); export const defaultBountyApi: BountyApi = { diff --git a/packages/page-bounties/test/pages/bountiesPage.tsx b/packages/page-bounties/test/pages/bountiesPage.tsx index 8636e3a272..bc63b87712 100644 --- a/packages/page-bounties/test/pages/bountiesPage.tsx +++ b/packages/page-bounties/test/pages/bountiesPage.tsx @@ -1,29 +1,30 @@ // Copyright 2017-2023 @polkadot/app-bounties authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type { RenderResult } from '@testing-library/react'; +import type { DeriveCollectiveProposal } from '@polkadot/api-derive/types'; +import type { ApiProps } from '@polkadot/react-api/types'; import type { PartialQueueTxExtrinsic, QueueProps, QueueTxExtrinsicAdd } from '@polkadot/react-components/Status/types'; +import type { BountyIndex, BountyStatus } from '@polkadot/types/interfaces'; import type { PalletBountiesBounty } from '@polkadot/types/lookup'; +import type { BountyApi } from '../../src/hooks/index.js'; -import { fireEvent, render, RenderResult, within } from '@testing-library/react'; +import { fireEvent, render, within } from '@testing-library/react'; import React, { Suspense } from 'react'; import { MemoryRouter } from 'react-router-dom'; import { ThemeProvider } from 'styled-components'; import { ApiPromise } from '@polkadot/api'; -import { DeriveCollectiveProposal } from '@polkadot/api-derive/types'; import { lightTheme } from '@polkadot/apps/themes'; import { POLKADOT_GENESIS } from '@polkadot/apps-config'; import { ApiCtx } from '@polkadot/react-api'; -import { ApiProps } from '@polkadot/react-api/types'; import { KeyringCtxRoot } from '@polkadot/react-hooks'; import { QueueCtx } from '@polkadot/react-hooks/ctx/Queue'; import { balanceOf } from '@polkadot/test-support/creation/balance'; import { BountyFactory } from '@polkadot/test-support/creation/bounties'; import { TypeRegistry } from '@polkadot/types/create'; -import { BountyIndex, BountyStatus } from '@polkadot/types/interfaces'; import Bounties from '../../src/Bounties.js'; -import { BountyApi } from '../../src/hooks/index.js'; import { mockBountyHooks } from '../hooks/defaults.js'; import { clickButtonWithName } from '../utils/clickButtonWithName.js'; import { clickElementWithTestId } from '../utils/clickElementWithTestId.js'; diff --git a/packages/page-files/src/CrustFiles.tsx b/packages/page-files/src/CrustFiles.tsx index a8208917fd..a8a13d14ad 100644 --- a/packages/page-files/src/CrustFiles.tsx +++ b/packages/page-files/src/CrustFiles.tsx @@ -2,6 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { ActionStatusBase } from '@polkadot/react-components/Status/types'; +import type { DirFile, FileInfo, SaveFile } from './types.js'; import FileSaver from 'file-saver'; import React, { useCallback, useRef, useState } from 'react'; @@ -11,7 +12,6 @@ import { useQueue } from '@polkadot/react-hooks'; import { useFiles } from './hooks.js'; import { useTranslation } from './translate.js'; -import { DirFile, FileInfo, SaveFile } from './types.js'; import UploadModal from './UploadModal.js'; const MCopyButton = styled(CopyButton)` diff --git a/packages/page-files/src/Progress.tsx b/packages/page-files/src/Progress.tsx index 7c074a8a85..6af9536a9e 100644 --- a/packages/page-files/src/Progress.tsx +++ b/packages/page-files/src/Progress.tsx @@ -1,7 +1,9 @@ // Copyright 2017-2023 @polkadot/app-files authors & contributors // SPDX-License-Identifier: Apache-2.0 -import React, { CSSProperties } from 'react'; +import type { CSSProperties } from 'react'; + +import React from 'react'; import { styled } from '@polkadot/react-components'; diff --git a/packages/page-files/src/UploadModal.tsx b/packages/page-files/src/UploadModal.tsx index 835913830c..dce47a009c 100644 --- a/packages/page-files/src/UploadModal.tsx +++ b/packages/page-files/src/UploadModal.tsx @@ -1,11 +1,12 @@ // Copyright 2017-2023 @polkadot/app-files authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type { CancelTokenSource } from 'axios'; import type { TFunction } from 'i18next'; import type { Signer } from '@polkadot/api/types'; -import type { AuthIpfsEndpoint } from './types.js'; +import type { AuthIpfsEndpoint, DirFile, FileInfo, SaveFile, UploadRes } from './types.js'; -import axios, { CancelTokenSource } from 'axios'; +import axios from 'axios'; import React, { useCallback, useEffect, useMemo, useState } from 'react'; import { web3FromSource } from '@polkadot/extension-dapp'; @@ -15,7 +16,6 @@ import { isFunction, nextTick, stringToHex, stringToU8a, u8aToHex } from '@polka import Progress from './Progress.js'; import { useTranslation } from './translate.js'; -import { DirFile, FileInfo, SaveFile, UploadRes } from './types.js'; export interface Props { className?: string; diff --git a/packages/page-files/src/hooks.ts b/packages/page-files/src/hooks.ts index 15ea6c0a44..8fe1334a29 100644 --- a/packages/page-files/src/hooks.ts +++ b/packages/page-files/src/hooks.ts @@ -1,11 +1,11 @@ // Copyright 2017-2023 @polkadot/app-files authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type { SaveFile } from './types.js'; + import { useCallback, useEffect, useMemo, useState } from 'react'; import store from 'store'; -import { SaveFile } from './types.js'; - export interface Files { files: SaveFile[], } diff --git a/packages/page-nfts/src/useCollectionInfos.ts b/packages/page-nfts/src/useCollectionInfos.ts index b02e5268d9..031a5dceca 100644 --- a/packages/page-nfts/src/useCollectionInfos.ts +++ b/packages/page-nfts/src/useCollectionInfos.ts @@ -5,14 +5,12 @@ import type { Option } from '@polkadot/types'; import type { AccountId } from '@polkadot/types/interfaces'; import type { PalletUniquesCollectionDetails, PalletUniquesCollectionMetadata } from '@polkadot/types/lookup'; import type { BN } from '@polkadot/util'; -import type { CollectionInfo } from './types.js'; +import type { CollectionInfo, CollectionSupportedIpfsData } from './types.js'; import { useEffect, useMemo, useState } from 'react'; import { createNamedHook, useAccounts, useApi, useCall, useIpfsFetch } from '@polkadot/react-hooks'; -import { CollectionSupportedIpfsData } from './types.js'; - type IpfsData = Map; const EMPTY_FLAGS = { diff --git a/packages/react-api/src/hoc/onlyOn.tsx b/packages/react-api/src/hoc/onlyOn.tsx index 9b6634d5f2..cb72a3fbb6 100644 --- a/packages/react-api/src/hoc/onlyOn.tsx +++ b/packages/react-api/src/hoc/onlyOn.tsx @@ -1,10 +1,9 @@ // Copyright 2017-2023 @polkadot/app-accounts authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type { ComponentType } from 'react'; import type { Environment } from '../types.js'; -import { ComponentType } from 'react'; - import { getEnvironment } from '../util/index.js'; const onlyOn = (environment: Environment) => >(component: T): T | (() => null) => { diff --git a/packages/react-components/src/AddressRow.tsx b/packages/react-components/src/AddressRow.tsx index 1ee50bdf24..5b8fd96d45 100644 --- a/packages/react-components/src/AddressRow.tsx +++ b/packages/react-components/src/AddressRow.tsx @@ -2,6 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { AccountId, AccountIndex, Address } from '@polkadot/types/interfaces'; +import type { RowProps } from './Row.js'; import React from 'react'; @@ -9,7 +10,7 @@ import { useAccountInfo } from '@polkadot/react-hooks'; import BaseIdentityIcon from '@polkadot/react-identicon'; import IdentityIcon from './IdentityIcon/index.js'; -import Row, { RowProps } from './Row.js'; +import Row from './Row.js'; import { styled } from './styled.js'; export interface Props extends RowProps { diff --git a/packages/react-components/src/CryptoType.tsx b/packages/react-components/src/CryptoType.tsx index 6a3c8b2520..e00218bc77 100644 --- a/packages/react-components/src/CryptoType.tsx +++ b/packages/react-components/src/CryptoType.tsx @@ -1,10 +1,11 @@ // Copyright 2017-2023 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type { AccountIdIsh } from './types.js'; + import React, { useEffect, useState } from 'react'; import { getAccountCryptoType } from './util/index.js'; -import { AccountIdIsh } from './types.js'; interface Props { accountId: AccountIdIsh; diff --git a/packages/react-components/src/Menu/types.ts b/packages/react-components/src/Menu/types.ts index 5cb11475c1..4643708d83 100644 --- a/packages/react-components/src/Menu/types.ts +++ b/packages/react-components/src/Menu/types.ts @@ -1,7 +1,8 @@ // Copyright 2017-2023 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { IconName } from '@fortawesome/fontawesome-svg-core'; +import type { IconName } from '@fortawesome/fontawesome-svg-core'; + import React from 'react'; export interface HeaderProps { diff --git a/packages/react-components/src/Tabs/CurrentSection.tsx b/packages/react-components/src/Tabs/CurrentSection.tsx index c3bfb72ff5..b604925b5f 100644 --- a/packages/react-components/src/Tabs/CurrentSection.tsx +++ b/packages/react-components/src/Tabs/CurrentSection.tsx @@ -1,7 +1,8 @@ // Copyright 2017-2023 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { IconName } from '@fortawesome/fontawesome-svg-core'; +import type { IconName } from '@fortawesome/fontawesome-svg-core'; + import React from 'react'; import Icon from '../Icon.js'; diff --git a/packages/react-components/src/styled.ts b/packages/react-components/src/styled.ts index d3f9d098e4..a72377cbff 100644 --- a/packages/react-components/src/styled.ts +++ b/packages/react-components/src/styled.ts @@ -1,7 +1,9 @@ // Copyright 2017-2023 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import styledComponents, { StyledInterface } from 'styled-components'; +import type { StyledInterface } from 'styled-components'; + +import styledComponents from 'styled-components'; // In styled-components v6, there is a named export which can be used // directly, i.e. "import { styled } from ..." with no more magic. Until diff --git a/packages/react-components/src/types.ts b/packages/react-components/src/types.ts index b01e740daa..b89627ddcb 100644 --- a/packages/react-components/src/types.ts +++ b/packages/react-components/src/types.ts @@ -6,11 +6,9 @@ import type { WithTranslation } from 'react-i18next'; import type { SubmittableExtrinsic } from '@polkadot/api/types'; import type { Abi } from '@polkadot/api-contract'; import type { ThemeDef } from '@polkadot/react-hooks/ctx/types'; -import type { AccountId, Index } from '@polkadot/types/interfaces'; +import type { AccountId, AccountIndex, Address, Index } from '@polkadot/types/interfaces'; import type { ActionStatus, TxCallback, TxFailedCallback } from './Status/types.js'; -import { AccountIndex, Address } from '@polkadot/types/interfaces'; - export interface BareProps { children?: React.ReactNode; className?: string; diff --git a/packages/react-components/src/util/getAccountCryptoType.ts b/packages/react-components/src/util/getAccountCryptoType.ts index 67a67ef9a3..9e0263600f 100644 --- a/packages/react-components/src/util/getAccountCryptoType.ts +++ b/packages/react-components/src/util/getAccountCryptoType.ts @@ -1,9 +1,9 @@ // Copyright 2017-2023 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { keyring } from '@polkadot/ui-keyring'; +import type { AccountIdIsh } from '../types.js'; -import { AccountIdIsh } from '../types.js'; +import { keyring } from '@polkadot/ui-keyring'; export function getAccountCryptoType (accountId: AccountIdIsh): string { try { diff --git a/packages/react-components/src/util/types.ts b/packages/react-components/src/util/types.ts index 7d27f852a0..a976234511 100644 --- a/packages/react-components/src/util/types.ts +++ b/packages/react-components/src/util/types.ts @@ -1,9 +1,8 @@ // Copyright 2017-2023 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { RegistrarIndex } from '@polkadot/types/interfaces/identity/types'; - -import { DisplayedJudgement } from '../types.js'; +import type { RegistrarIndex } from '@polkadot/types/interfaces/identity/types'; +import type { DisplayedJudgement } from '../types.js'; export interface DropdownOption { className?: string; diff --git a/packages/react-hooks/src/useNonEmptyString.ts b/packages/react-hooks/src/useNonEmptyString.ts index 2e00ff7725..c66805cfec 100644 --- a/packages/react-hooks/src/useNonEmptyString.ts +++ b/packages/react-hooks/src/useNonEmptyString.ts @@ -1,8 +1,10 @@ // Copyright 2017-2023 @polkadot/react-hooks authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type { FormField } from './useFormField.js'; + import { createNamedHook } from './createNamedHook.js'; -import { FormField, useFormField } from './useFormField.js'; +import { useFormField } from './useFormField.js'; function isValid (value?: string | null): boolean { return (value && value.length > 0) || false; diff --git a/packages/react-hooks/src/useNonZeroBn.ts b/packages/react-hooks/src/useNonZeroBn.ts index 6dd1b993dd..bb3dd88a1a 100644 --- a/packages/react-hooks/src/useNonZeroBn.ts +++ b/packages/react-hooks/src/useNonZeroBn.ts @@ -2,13 +2,14 @@ // SPDX-License-Identifier: Apache-2.0 import type { BN } from '@polkadot/util'; +import type { FormField } from './useFormField.js'; import { useMemo } from 'react'; import { BN_ZERO, bnToBn } from '@polkadot/util'; import { createNamedHook } from './createNamedHook.js'; -import { FormField, useFormField } from './useFormField.js'; +import { useFormField } from './useFormField.js'; function isValid (value: BN): boolean { return !value.isZero(); diff --git a/packages/react-hooks/src/useOutsideClick.ts b/packages/react-hooks/src/useOutsideClick.ts index c7a1e6f615..f808959f5d 100644 --- a/packages/react-hooks/src/useOutsideClick.ts +++ b/packages/react-hooks/src/useOutsideClick.ts @@ -1,7 +1,9 @@ // Copyright 2017-2023 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { RefObject, useCallback, useEffect } from 'react'; +import type { RefObject } from 'react'; + +import { useCallback, useEffect } from 'react'; import { createNamedHook } from './createNamedHook.js'; diff --git a/packages/react-hooks/src/usePopupWindow.ts b/packages/react-hooks/src/usePopupWindow.ts index aaf48f31e6..b67847d46d 100644 --- a/packages/react-hooks/src/usePopupWindow.ts +++ b/packages/react-hooks/src/usePopupWindow.ts @@ -1,9 +1,10 @@ // Copyright 2017-2023 @polkadot/react-hooks authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type { HorizontalPosition, VerticalPosition } from '@polkadot/react-components/Popup/types'; + import React, { useEffect, useMemo, useState } from 'react'; -import { HorizontalPosition, VerticalPosition } from '@polkadot/react-components/Popup/types'; import { getPosition } from '@polkadot/react-components/Popup/utils'; import { createNamedHook } from './createNamedHook.js'; diff --git a/packages/react-hooks/src/useSubidentities.ts b/packages/react-hooks/src/useSubidentities.ts index 229b82b9b4..ff9f5ce54b 100644 --- a/packages/react-hooks/src/useSubidentities.ts +++ b/packages/react-hooks/src/useSubidentities.ts @@ -1,7 +1,7 @@ // Copyright 2017-2023 @polkadot/react-hooks authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { AccountId, BalanceOf } from '@polkadot/types/interfaces'; +import type { AccountId, BalanceOf } from '@polkadot/types/interfaces'; import { createNamedHook } from './createNamedHook.js'; import { useApi } from './useApi.js'; diff --git a/packages/react-hooks/src/useTreasury.ts b/packages/react-hooks/src/useTreasury.ts index a512389c48..1aeeb0b883 100644 --- a/packages/react-hooks/src/useTreasury.ts +++ b/packages/react-hooks/src/useTreasury.ts @@ -1,12 +1,11 @@ // Copyright 2017-2023 @polkadot/react-hooks authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { DeriveBounties, DeriveTreasuryProposals } from '@polkadot/api-derive/types'; +import type { DeriveBalancesAccount, DeriveBounties, DeriveTreasuryProposals } from '@polkadot/api-derive/types'; import type { Balance } from '@polkadot/types/interfaces'; import { useEffect, useState } from 'react'; -import { DeriveBalancesAccount } from '@polkadot/api-derive/types'; import { BN, BN_MILLION, BN_ZERO, u8aConcat } from '@polkadot/util'; import { createNamedHook } from './createNamedHook.js'; diff --git a/packages/test-support/scripts/lib/helpers.ts b/packages/test-support/scripts/lib/helpers.ts index 83f012209c..e113570832 100644 --- a/packages/test-support/scripts/lib/helpers.ts +++ b/packages/test-support/scripts/lib/helpers.ts @@ -1,13 +1,14 @@ // Copyright 2017-2023 @polkadot/test-support authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ApiPromise } from '@polkadot/api'; -import { SubmittableExtrinsic } from '@polkadot/api/types'; -import { DeriveCollectiveProposal } from '@polkadot/api-derive/types'; -import { KeyringPair } from '@polkadot/keyring/types'; +import type { ApiPromise } from '@polkadot/api'; +import type { SubmittableExtrinsic } from '@polkadot/api/types'; +import type { DeriveCollectiveProposal } from '@polkadot/api-derive/types'; +import type { KeyringPair } from '@polkadot/keyring/types'; +import type { Hash } from '@polkadot/types/interfaces'; + import { charlieSigner, daveSigner, eveSigner, ferdieSigner } from '@polkadot/test-support/keyring'; import { execute } from '@polkadot/test-support/transaction'; -import { Hash } from '@polkadot/types/interfaces'; import { BN } from '@polkadot/util'; import { LENGTH_BOUND, TREASURY_ADDRESS, WEIGHT_BOUND } from './constants.js'; diff --git a/packages/test-support/scripts/lib/multiFunctions.ts b/packages/test-support/scripts/lib/multiFunctions.ts index a9269c0a1d..0def937692 100644 --- a/packages/test-support/scripts/lib/multiFunctions.ts +++ b/packages/test-support/scripts/lib/multiFunctions.ts @@ -1,8 +1,9 @@ // Copyright 2017-2023 @polkadot/test-support authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type { KeyringPair } from '@polkadot/keyring/types'; + import { ApiPromise } from '@polkadot/api'; -import { KeyringPair } from '@polkadot/keyring/types'; import { execute } from '@polkadot/test-support/transaction'; import { BN } from '@polkadot/util'; diff --git a/packages/test-support/src/creation/account.ts b/packages/test-support/src/creation/account.ts index d9d004bb29..5ea999044c 100644 --- a/packages/test-support/src/creation/account.ts +++ b/packages/test-support/src/creation/account.ts @@ -1,11 +1,10 @@ // Copyright 2017-2023 @polkadot/test-supports authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveBalancesAll, DeriveStakingAccount } from '@polkadot/api-derive/types'; -import { UseAccountInfo } from '@polkadot/react-hooks/types'; -import { KeyringJson$Meta } from '@polkadot/ui-keyring/types'; - -import { AccountOverrides, Override } from '../types.js'; +import type { DeriveBalancesAll, DeriveStakingAccount } from '@polkadot/api-derive/types'; +import type { UseAccountInfo } from '@polkadot/react-hooks/types'; +import type { KeyringJson$Meta } from '@polkadot/ui-keyring/types'; +import type { AccountOverrides, Override } from '../types.js'; export const anAccount = (): AccountOverrides => ({}); diff --git a/packages/test-support/src/creation/bounties.ts b/packages/test-support/src/creation/bounties.ts index 2be3c641f1..e12cc144dd 100644 --- a/packages/test-support/src/creation/bounties.ts +++ b/packages/test-support/src/creation/bounties.ts @@ -1,10 +1,11 @@ // Copyright 2017-2023 @polkadot/test-support authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type { BountyIndex, BountyStatus } from '@polkadot/types/interfaces'; +import type { PalletBountiesBounty } from '@polkadot/types/lookup'; +import type { Registry } from '@polkadot/types/types'; + import { ApiPromise } from '@polkadot/api'; -import { BountyIndex, BountyStatus } from '@polkadot/types/interfaces'; -import { PalletBountiesBounty } from '@polkadot/types/lookup'; -import { Registry } from '@polkadot/types/types'; import { balanceOf } from './balance.js'; diff --git a/packages/test-support/src/creation/contact.ts b/packages/test-support/src/creation/contact.ts index 209e6bcc11..8eef44ff2b 100644 --- a/packages/test-support/src/creation/contact.ts +++ b/packages/test-support/src/creation/contact.ts @@ -1,11 +1,10 @@ // Copyright 2017-2023 @polkadot/test-supports authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveBalancesAll, DeriveStakingAccount } from '@polkadot/api-derive/types'; -import { UseAccountInfo } from '@polkadot/react-hooks/types'; -import { KeyringJson$Meta } from '@polkadot/ui-keyring/types'; - -import { AccountOverrides as ContactOverrides, Override } from '../types.js'; +import type { DeriveBalancesAll, DeriveStakingAccount } from '@polkadot/api-derive/types'; +import type { UseAccountInfo } from '@polkadot/react-hooks/types'; +import type { KeyringJson$Meta } from '@polkadot/ui-keyring/types'; +import type { AccountOverrides as ContactOverrides, Override } from '../types.js'; export const aContact = (): ContactOverrides => ({}); diff --git a/packages/test-support/src/keyring/signers.ts b/packages/test-support/src/keyring/signers.ts index 166e0a2156..5f5b5f1b06 100644 --- a/packages/test-support/src/keyring/signers.ts +++ b/packages/test-support/src/keyring/signers.ts @@ -1,8 +1,9 @@ // Copyright 2017-2023 @polkadot/test-support authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type { KeyringPair } from '@polkadot/keyring/types'; + import { Keyring } from '@polkadot/keyring'; -import { KeyringPair } from '@polkadot/keyring/types'; export function aliceSigner (): KeyringPair { const keyring = new Keyring({ type: 'sr25519' }); diff --git a/packages/test-support/src/pages/Page.tsx b/packages/test-support/src/pages/Page.tsx index 20488bab6d..5e669ed869 100644 --- a/packages/test-support/src/pages/Page.tsx +++ b/packages/test-support/src/pages/Page.tsx @@ -1,10 +1,13 @@ // Copyright 2017-2023 @polkadot/page-accounts authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type { RenderResult } from '@testing-library/react'; import type { ApiProps } from '@polkadot/react-api/types'; import type { PartialQueueTxExtrinsic, QueueProps, QueueTxExtrinsicAdd } from '@polkadot/react-components/Status/types'; +import type { UseAccountInfo } from '@polkadot/react-hooks/types'; +import type { AccountOverrides } from '../utils/accountDefaults.js'; -import { queryByAttribute, render, RenderResult, screen } from '@testing-library/react'; +import { queryByAttribute, render, screen } from '@testing-library/react'; import React, { Suspense } from 'react'; import { MemoryRouter } from 'react-router-dom'; import { ThemeProvider } from 'styled-components'; @@ -14,14 +17,13 @@ import { lightTheme } from '@polkadot/apps/themes'; import { POLKADOT_GENESIS } from '@polkadot/apps-config'; import { ApiCtx } from '@polkadot/react-api'; import { QueueCtx } from '@polkadot/react-hooks/ctx/Queue'; -import { UseAccountInfo } from '@polkadot/react-hooks/types'; import { TypeRegistry } from '@polkadot/types/create'; import { keyring } from '@polkadot/ui-keyring'; import { BN } from '@polkadot/util'; import { alice, bob, charlie, ferdie } from '../keyring/index.js'; import { Table } from '../pagesElements/index.js'; -import { AccountOverrides, mockAccountHooks } from '../utils/accountDefaults.js'; +import { mockAccountHooks } from '../utils/accountDefaults.js'; import { mockApiHooks } from '../utils/mockApiHooks.js'; let queueExtrinsic: (value: PartialQueueTxExtrinsic) => void; diff --git a/packages/test-support/src/pagesElements/Row.ts b/packages/test-support/src/pagesElements/Row.ts index 65a73c22f4..eef84e3bdc 100644 --- a/packages/test-support/src/pagesElements/Row.ts +++ b/packages/test-support/src/pagesElements/Row.ts @@ -1,14 +1,14 @@ // Copyright 2017-2023 @polkadot/test-supports authors & contributors // SPDX-License-Identifier: Apache-2.0 -// utility wrapper over an account item in accounts table, serves basic assertions about an account row -import { fireEvent, screen, within } from '@testing-library/react'; +import type { Balance } from '@polkadot/types/interfaces'; -import { Balance } from '@polkadot/types/interfaces'; +import { fireEvent, screen, within } from '@testing-library/react'; import { format } from '../utils/balance.js'; import { Sidebar } from './Sidebar.js'; +// utility wrapper over an account item in accounts table, serves basic assertions about an account row export class Row { public primaryRow: HTMLElement; public detailsRow: HTMLElement; diff --git a/packages/test-support/src/react/apiInTests.ts b/packages/test-support/src/react/apiInTests.ts index 0e9d8656ce..ac6b9597d5 100644 --- a/packages/test-support/src/react/apiInTests.ts +++ b/packages/test-support/src/react/apiInTests.ts @@ -1,7 +1,9 @@ // Copyright 2017-2023 @polkadot/test-support authors & contributors // SPDX-License-Identifier: Apache-2.0 -import React, { PropsWithChildren } from 'react'; +import type { PropsWithChildren } from 'react'; + +import React from 'react'; import { useApi } from '@polkadot/react-hooks'; diff --git a/packages/test-support/src/transaction/execute.ts b/packages/test-support/src/transaction/execute.ts index 6ece5ae997..9190fc9bbb 100644 --- a/packages/test-support/src/transaction/execute.ts +++ b/packages/test-support/src/transaction/execute.ts @@ -1,9 +1,9 @@ // Copyright 2017-2023 @polkadot/test-support authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { SubmittableExtrinsic } from '@polkadot/api/types'; -import { KeyringPair } from '@polkadot/keyring/types'; -import { EventRecord, ExtrinsicStatus } from '@polkadot/types/interfaces'; +import type { SubmittableExtrinsic } from '@polkadot/api/types'; +import type { KeyringPair } from '@polkadot/keyring/types'; +import type { EventRecord, ExtrinsicStatus } from '@polkadot/types/interfaces'; import { waitFor } from '../utils/waitFor.js'; diff --git a/packages/test-support/src/types.ts b/packages/test-support/src/types.ts index 557bdb29d4..87b84569a9 100644 --- a/packages/test-support/src/types.ts +++ b/packages/test-support/src/types.ts @@ -1,9 +1,9 @@ // Copyright 2017-2023 @polkadot/test-supports authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { DeriveBalancesAll, DeriveStakingAccount } from '@polkadot/api-derive/types'; -import { UseAccountInfo } from '@polkadot/react-hooks/types'; -import { KeyringJson$Meta } from '@polkadot/ui-keyring/types'; +import type { DeriveBalancesAll, DeriveStakingAccount } from '@polkadot/api-derive/types'; +import type { UseAccountInfo } from '@polkadot/react-hooks/types'; +import type { KeyringJson$Meta } from '@polkadot/ui-keyring/types'; export type Override = { [P in keyof T]?: T[P]; diff --git a/packages/test-support/src/utils/balance.ts b/packages/test-support/src/utils/balance.ts index be62c9cb06..c6d640823f 100644 --- a/packages/test-support/src/utils/balance.ts +++ b/packages/test-support/src/utils/balance.ts @@ -1,7 +1,8 @@ // Copyright 2017-2023 @polkadot/test-supports authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Balance } from '@polkadot/types/interfaces'; +import type { Balance } from '@polkadot/types/interfaces'; + import { BN, formatBalance } from '@polkadot/util'; import { balanceOf } from '../creation/balance.js'; diff --git a/packages/test-support/src/utils/mockApiHooks.ts b/packages/test-support/src/utils/mockApiHooks.ts index bd03d4e27b..fa6c8b372a 100644 --- a/packages/test-support/src/utils/mockApiHooks.ts +++ b/packages/test-support/src/utils/mockApiHooks.ts @@ -2,9 +2,8 @@ // SPDX-License-Identifier: Apache-2.0 import type { Registrar } from '@polkadot/react-hooks/types'; -import type { ProxyDefinition, RegistrationJudgement, Voting } from '@polkadot/types/interfaces'; +import type { H256, Multisig, ProxyDefinition, RegistrationJudgement, Voting } from '@polkadot/types/interfaces'; -import { H256, Multisig } from '@polkadot/types/interfaces'; import { BN } from '@polkadot/util'; class MockApiHooks { diff --git a/tsconfig.build.json b/tsconfig.build.json index e04931c7fa..72592a84d7 100644 --- a/tsconfig.build.json +++ b/tsconfig.build.json @@ -2,7 +2,15 @@ "extends": "./tsconfig.base.json", "compilerOptions": { "baseUrl": "./packages", - "outDir": "./build" + "outDir": "./build", + /* + * We have a couple of issues that forces us to disable this - + * 1. apps-electron is still CJS + * 2. some of our packaged dependencies are problematic + * + * (also disabled in tsconfig.json) + */ + "verbatimModuleSyntax": false }, "exclude": [ "build/**/*", diff --git a/tsconfig.json b/tsconfig.json index f1275154ed..e163655f26 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,7 +2,15 @@ "extends": "./tsconfig.base.json", "compilerOptions": { "baseUrl": "./packages", - "composite": false + "composite": false, + /* + * We have a couple of issues that forces us to disable this - + * 1. apps-electron is still CJS + * 2. some of our packaged dependencies are problematic + * + * (also disabled in tsconfig.build.json) + */ + "verbatimModuleSyntax": false }, "include": [ "packages/**/src/**/*" diff --git a/yarn.lock b/yarn.lock index ef3674ba45..73d2060db0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -371,27 +371,27 @@ __metadata: languageName: node linkType: hard -"@eslint/eslintrc@npm:^2.0.1": - version: 2.0.1 - resolution: "@eslint/eslintrc@npm:2.0.1" +"@eslint/eslintrc@npm:^2.0.2": + version: 2.0.2 + resolution: "@eslint/eslintrc@npm:2.0.2" dependencies: ajv: ^6.12.4 debug: ^4.3.2 - espree: ^9.5.0 + espree: ^9.5.1 globals: ^13.19.0 ignore: ^5.2.0 import-fresh: ^3.2.1 js-yaml: ^4.1.0 minimatch: ^3.1.2 strip-json-comments: ^3.1.1 - checksum: 56b9192a687a450db53a7b883daf9f0f447c43b3510189cf88808a7a2467c2a302a42a50f184cc6d5a9faf3d1df890a2ef0fd0d60b751f32a3e9dfea717c6b48 + checksum: cfcf5e12c7b2c4476482e7f12434e76eae16fcd163ee627309adb10b761e5caa4a4e52ed7be464423320ff3d11eca5b50de5bf8be3e25834222470835dd5c801 languageName: node linkType: hard -"@eslint/js@npm:8.36.0, @eslint/js@npm:^8.36.0": - version: 8.36.0 - resolution: "@eslint/js@npm:8.36.0" - checksum: b7d6b84b823c8c7784be390741196617565527b1f7c0977fde9455bfb57fd88f81c074a03dd878757d2c33fa29f24291e9ecbc1425710f067917324b55e1bf3a +"@eslint/js@npm:8.37.0, @eslint/js@npm:^8.37.0": + version: 8.37.0 + resolution: "@eslint/js@npm:8.37.0" + checksum: 7a07fb085c94ce1538949012c292fd3a6cd734f149bc03af6157dfbd8a7477678899ef57b4a27e15b36470a997389ad79a0533d5880c71e67720ae1a7de7c62d languageName: node linkType: hard @@ -1727,7 +1727,7 @@ __metadata: version: 0.0.0-use.local resolution: "@polkadot/apps-electron@workspace:packages/apps-electron" dependencies: - "@polkadot/dev": ^0.72.25 + "@polkadot/dev": ^0.72.32 "@polkadot/react-components": ^0.124.2-212-x "@types/react-dom": ^18.0.11 "@types/tmp": ^0.2.3 @@ -1753,7 +1753,7 @@ __metadata: dependencies: "@polkadot/apps-config": ^0.124.2-212-x "@polkadot/apps-routing": ^0.124.2-212-x - "@polkadot/dev": ^0.72.25 + "@polkadot/dev": ^0.72.32 "@polkadot/react-api": ^0.124.2-212-x "@polkadot/react-components": ^0.124.2-212-x "@polkadot/react-hooks": ^0.124.2-212-x @@ -1781,34 +1781,34 @@ __metadata: languageName: unknown linkType: soft -"@polkadot/dev-test@npm:^0.72.25": - version: 0.72.25 - resolution: "@polkadot/dev-test@npm:0.72.25" +"@polkadot/dev-test@npm:^0.72.32": + version: 0.72.32 + resolution: "@polkadot/dev-test@npm:0.72.32" dependencies: jsdom: ^21.1.1 tslib: ^2.5.0 - checksum: 784743afc26e3bd5d3b875cd1c27701e8e6a7a4cd55da014cffbae4b97de761f1f6e6b03c3956ee26d4140da83f78e2fa19c62505f4d6b942c7b98f88897ad85 + checksum: 81f6649827db6f43efdf6ea7f7b13b83e9ca9be9058c588cde62e695836e26c135dba26804c4832288c2690ed174a24dfd11d574c49053dfedd5bb30e913a801 languageName: node linkType: hard -"@polkadot/dev-ts@npm:^0.72.25": - version: 0.72.25 - resolution: "@polkadot/dev-ts@npm:0.72.25" +"@polkadot/dev-ts@npm:^0.72.32": + version: 0.72.32 + resolution: "@polkadot/dev-ts@npm:0.72.32" dependencies: json5: ^2.2.3 tslib: ^2.5.0 - typescript: ^5.0.2 - checksum: 2fcf05cd726b7e886db44b9d8e4cbf8e1a97c7af52915d190807b2cb2753687ab36edbd91af5715e91e33a8ad4a5f16ecdf204edb5726a48ec860559c6816106 + typescript: ^5.0.3 + checksum: 4d9783e83cde12ba1677273cbb89e56223d0b6d4b75452f14dd0ab612f264e40a888d79b081044f447815f7aaf584ccd5f299dce0291e9a0443135a9b070b546 languageName: node linkType: hard -"@polkadot/dev@npm:^0.72.25": - version: 0.72.25 - resolution: "@polkadot/dev@npm:0.72.25" +"@polkadot/dev@npm:^0.72.32": + version: 0.72.32 + resolution: "@polkadot/dev@npm:0.72.32" dependencies: - "@eslint/js": ^8.36.0 - "@polkadot/dev-test": ^0.72.25 - "@polkadot/dev-ts": ^0.72.25 + "@eslint/js": ^8.37.0 + "@polkadot/dev-test": ^0.72.32 + "@polkadot/dev-ts": ^0.72.32 "@rollup/plugin-alias": ^4.0.3 "@rollup/plugin-commonjs": ^24.0.1 "@rollup/plugin-dynamic-import-vars": ^2.0.3 @@ -1816,17 +1816,17 @@ __metadata: "@rollup/plugin-json": ^6.0.0 "@rollup/plugin-node-resolve": ^15.0.1 "@rushstack/eslint-patch": ^1.2.0 - "@typescript-eslint/eslint-plugin": ^5.56.0 - "@typescript-eslint/parser": ^5.56.0 - eslint: ^8.36.0 + "@typescript-eslint/eslint-plugin": ^5.57.0 + "@typescript-eslint/parser": ^5.57.0 + eslint: ^8.37.0 eslint-config-standard: ^17.0.0 eslint-import-resolver-node: ^0.3.7 - eslint-plugin-deprecation: ^1.4.0-next.1 + eslint-plugin-deprecation: ^1.4.0-next.2 eslint-plugin-header: ^3.1.1 eslint-plugin-import: ^2.27.5 eslint-plugin-import-newlines: ^1.3.1 eslint-plugin-jest: ^27.2.1 - eslint-plugin-n: ^15.6.1 + eslint-plugin-n: ^15.7.0 eslint-plugin-promise: ^6.1.1 eslint-plugin-react: ^7.32.2 eslint-plugin-react-hooks: ^4.6.0 @@ -1838,10 +1838,10 @@ __metadata: rollup: ^3.20.2 rollup-plugin-cleanup: ^3.2.1 tslib: ^2.5.0 - typescript: ^5.0.2 - webpack: ^5.76.3 + typescript: ^5.0.3 + webpack: ^5.77.0 webpack-cli: ^5.0.1 - webpack-dev-server: ^4.13.1 + webpack-dev-server: ^4.13.2 webpack-merge: ^5.8.0 webpack-subresource-integrity: ^5.2.0-rc.1 yargs: ^17.7.1 @@ -1869,7 +1869,7 @@ __metadata: polkadot-exec-rollup: scripts/polkadot-exec-rollup.mjs polkadot-exec-tsc: scripts/polkadot-exec-tsc.mjs polkadot-exec-webpack: scripts/polkadot-exec-webpack.mjs - checksum: 2225835661e62e8b88af8accd64d55644d03b0d172bf8c6c85baa45e03203bd74026979491ce91ffc22f61554b1555e19a8fe2c6a26c1c70030bbc1d3dc53770 + checksum: f4ab710a54a211bf5b99e88eaae73945312952213c0d405590348fd14576887d401a44546659773b0801ae77204973808f5b0eb8cf39cad1a910520a1b8b506f languageName: node linkType: hard @@ -3605,14 +3605,14 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/eslint-plugin@npm:^5.56.0": - version: 5.56.0 - resolution: "@typescript-eslint/eslint-plugin@npm:5.56.0" +"@typescript-eslint/eslint-plugin@npm:^5.57.0": + version: 5.57.0 + resolution: "@typescript-eslint/eslint-plugin@npm:5.57.0" dependencies: "@eslint-community/regexpp": ^4.4.0 - "@typescript-eslint/scope-manager": 5.56.0 - "@typescript-eslint/type-utils": 5.56.0 - "@typescript-eslint/utils": 5.56.0 + "@typescript-eslint/scope-manager": 5.57.0 + "@typescript-eslint/type-utils": 5.57.0 + "@typescript-eslint/utils": 5.57.0 debug: ^4.3.4 grapheme-splitter: ^1.0.4 ignore: ^5.2.0 @@ -3625,64 +3625,54 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 2eed4a4ed8279950ad553252e8623e947ffdee39b0d677a13f6e4e2d863ea1cbc5d683ff189e55d0de6fd5a25afd72d3c3a9ab7ae417d5405a21ead907e1b154 + checksum: be13aa74ee6f15f0ae67781c625d9dcf3ce8a3feca2b125eef0cfee850b7f9f0cec23fc56a729ef25926298fe3ea51603ebeee2b93fc9b73fce1410638707177 languageName: node linkType: hard -"@typescript-eslint/experimental-utils@npm:^5.0.0": - version: 5.46.1 - resolution: "@typescript-eslint/experimental-utils@npm:5.46.1" +"@typescript-eslint/experimental-utils@npm:^5.57.0": + version: 5.57.0 + resolution: "@typescript-eslint/experimental-utils@npm:5.57.0" dependencies: - "@typescript-eslint/utils": 5.46.1 + "@typescript-eslint/utils": 5.57.0 peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - checksum: 3c050d8a20afae536b884e371d7019b5a2f15d21eb42ee63913be4afd32a46d6df8196d13a8e6016f4648b94609ff7deced60ba5e17cee209e291486403195c5 + checksum: 661e99b5caaf424bff93410403fada2900d24408de2708fa76010cfd3d31789977357ff1a7db4229b0c6aee038cc724c5f696388e6a67eaad7710b49a4ab7c6d languageName: node linkType: hard -"@typescript-eslint/parser@npm:^5.56.0": - version: 5.56.0 - resolution: "@typescript-eslint/parser@npm:5.56.0" +"@typescript-eslint/parser@npm:^5.57.0": + version: 5.57.0 + resolution: "@typescript-eslint/parser@npm:5.57.0" dependencies: - "@typescript-eslint/scope-manager": 5.56.0 - "@typescript-eslint/types": 5.56.0 - "@typescript-eslint/typescript-estree": 5.56.0 + "@typescript-eslint/scope-manager": 5.57.0 + "@typescript-eslint/types": 5.57.0 + "@typescript-eslint/typescript-estree": 5.57.0 debug: ^4.3.4 peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 peerDependenciesMeta: typescript: optional: true - checksum: eb25490290bd5e22f9c42603dedc0d2d8ee845553e3cf48ea377bd5dc22440d3463f8b84be637b6a2b37cd9ea56b21e4e43007a0a69998948d9c8965c03fe1aa + checksum: b7e8345631911f721591ba970fea5c888f0f3bf2e2ea2dbc3e5b0dc345c0776b62b92c534edfde1379b4b182958a421f35ac26d84705fe6ae7dd37aa675d9493 languageName: node linkType: hard -"@typescript-eslint/scope-manager@npm:5.46.1": - version: 5.46.1 - resolution: "@typescript-eslint/scope-manager@npm:5.46.1" +"@typescript-eslint/scope-manager@npm:5.57.0": + version: 5.57.0 + resolution: "@typescript-eslint/scope-manager@npm:5.57.0" dependencies: - "@typescript-eslint/types": 5.46.1 - "@typescript-eslint/visitor-keys": 5.46.1 - checksum: bf934603dc9c7da71eb26f415d13018f2a96dbba193a773bc440a5c93828365f09bb3db9be55189dfbbace414c6c48d7fad246c0d9717dab4676d0d79d6d8676 + "@typescript-eslint/types": 5.57.0 + "@typescript-eslint/visitor-keys": 5.57.0 + checksum: 4a851f23da2adbf6341b04c1e3f19fcb66415683f26805d3123725d18845bd4a150bd182de0a91279d5682f2568bb5dd831d4ad0bdb70f49d9ca7381cec4dd17 languageName: node linkType: hard -"@typescript-eslint/scope-manager@npm:5.56.0": - version: 5.56.0 - resolution: "@typescript-eslint/scope-manager@npm:5.56.0" +"@typescript-eslint/type-utils@npm:5.57.0": + version: 5.57.0 + resolution: "@typescript-eslint/type-utils@npm:5.57.0" dependencies: - "@typescript-eslint/types": 5.56.0 - "@typescript-eslint/visitor-keys": 5.56.0 - checksum: bacac255ee52148cee6622be2811c0d7e25419058b89f1a11f4c1303faef4535a0a1237549f9556ec1d7a297c640ce4357183a1a8465d72e1393b7d8fb43874b - languageName: node - linkType: hard - -"@typescript-eslint/type-utils@npm:5.56.0": - version: 5.56.0 - resolution: "@typescript-eslint/type-utils@npm:5.56.0" - dependencies: - "@typescript-eslint/typescript-estree": 5.56.0 - "@typescript-eslint/utils": 5.56.0 + "@typescript-eslint/typescript-estree": 5.57.0 + "@typescript-eslint/utils": 5.57.0 debug: ^4.3.4 tsutils: ^3.21.0 peerDependencies: @@ -3690,7 +3680,7 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 3dd1fcfadad18790b900a3d90f6617904adb6b0e2bd1e1edb6ebf239e1399865ca9098647405385feb4252d8b2b4577883e6fd3ef8d00bdd521d6070972d486b + checksum: 649d000edabfe4e567b8a384d0012c56396e40ce2123a78857d4b8da6bf2288627dc355745bd7d4a2877d4cc8a26e1d1dbfc422e6382ac3d3ab431b92eb5b852 languageName: node linkType: hard @@ -3701,26 +3691,19 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/types@npm:5.46.1": - version: 5.46.1 - resolution: "@typescript-eslint/types@npm:5.46.1" - checksum: 91143d3304b8c70d69d9c8e5b7428cce3a222eacfbeb99e592d278668bcf998760731deae064a76157b9a0fc4911fe3178aa24e4ea6fe2ba68dd37113834c924 +"@typescript-eslint/types@npm:5.57.0": + version: 5.57.0 + resolution: "@typescript-eslint/types@npm:5.57.0" + checksum: 79a100fb650965f63c01c20e6abd79ca0d2043c3a329b9fef89917d6b9ba3c0f946dca3f14f2975ee6349daadd6ce0e98fde3aafe4b710e5a27abe1adc590c85 languageName: node linkType: hard -"@typescript-eslint/types@npm:5.56.0": - version: 5.56.0 - resolution: "@typescript-eslint/types@npm:5.56.0" - checksum: 82ca11553bbb1bbfcaf7e7760b03c0d898940238dc002552c21af3e58f7d482c64c3c6cf0666521aff2a1e7b4b58bb6e4d9a00b1e4998a16b5039f5d288d003a - languageName: node - linkType: hard - -"@typescript-eslint/typescript-estree@npm:5.46.1": - version: 5.46.1 - resolution: "@typescript-eslint/typescript-estree@npm:5.46.1" +"@typescript-eslint/typescript-estree@npm:5.57.0, @typescript-eslint/typescript-estree@npm:^5.13.0": + version: 5.57.0 + resolution: "@typescript-eslint/typescript-estree@npm:5.57.0" dependencies: - "@typescript-eslint/types": 5.46.1 - "@typescript-eslint/visitor-keys": 5.46.1 + "@typescript-eslint/types": 5.57.0 + "@typescript-eslint/visitor-keys": 5.57.0 debug: ^4.3.4 globby: ^11.1.0 is-glob: ^4.0.3 @@ -3729,25 +3712,7 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 21499b927b4118cd51e841b2e1b7e55621135f923f461b75dc8ca8442de38a82da5a0232dce5229e0266b6fc12d70696e0e912fcf1483d4c44f02e4cad39ed98 - languageName: node - linkType: hard - -"@typescript-eslint/typescript-estree@npm:5.56.0, @typescript-eslint/typescript-estree@npm:^5.13.0": - version: 5.56.0 - resolution: "@typescript-eslint/typescript-estree@npm:5.56.0" - dependencies: - "@typescript-eslint/types": 5.56.0 - "@typescript-eslint/visitor-keys": 5.56.0 - debug: ^4.3.4 - globby: ^11.1.0 - is-glob: ^4.0.3 - semver: ^7.3.7 - tsutils: ^3.21.0 - peerDependenciesMeta: - typescript: - optional: true - checksum: ec3e85201786aa9adddba7cb834a9f330a7f55c729ee9ccf847dbdc2f7437b760f3774152ccad6d0aa48d13fd78df766c880e3a7ca42e01a20aba0e1a1ed61c5 + checksum: 648b88f88ea6cc293ec67b4c0f4f3c2bf733be7e0f2eee08aadbaec6939fd724a6c287decc336abbf67b9e366cc2c48f2e0e48d8302b533e783f798332a06e83 languageName: node linkType: hard @@ -3769,39 +3734,21 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/utils@npm:5.46.1": - version: 5.46.1 - resolution: "@typescript-eslint/utils@npm:5.46.1" - dependencies: - "@types/json-schema": ^7.0.9 - "@types/semver": ^7.3.12 - "@typescript-eslint/scope-manager": 5.46.1 - "@typescript-eslint/types": 5.46.1 - "@typescript-eslint/typescript-estree": 5.46.1 - eslint-scope: ^5.1.1 - eslint-utils: ^3.0.0 - semver: ^7.3.7 - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - checksum: db9fd1dfb2390e66041f9529d564f38ccf74042de68e0e1e3d319ba4d02d7cd969d75dc056f938b98acab53ad7c1e36c68eabb15c0b2e2296b081652fa8d3820 - languageName: node - linkType: hard - -"@typescript-eslint/utils@npm:5.56.0, @typescript-eslint/utils@npm:^5.10.0": - version: 5.56.0 - resolution: "@typescript-eslint/utils@npm:5.56.0" +"@typescript-eslint/utils@npm:5.57.0, @typescript-eslint/utils@npm:^5.10.0": + version: 5.57.0 + resolution: "@typescript-eslint/utils@npm:5.57.0" dependencies: "@eslint-community/eslint-utils": ^4.2.0 "@types/json-schema": ^7.0.9 "@types/semver": ^7.3.12 - "@typescript-eslint/scope-manager": 5.56.0 - "@typescript-eslint/types": 5.56.0 - "@typescript-eslint/typescript-estree": 5.56.0 + "@typescript-eslint/scope-manager": 5.57.0 + "@typescript-eslint/types": 5.57.0 + "@typescript-eslint/typescript-estree": 5.57.0 eslint-scope: ^5.1.1 semver: ^7.3.7 peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - checksum: 413e8d4bf7023ee5ba4f695b62e796a1f94930bb92fe5aa0cee58f63b9837116c23f618825a9c671f610e50f5630188b6059b4ed6b05a2a3336f01d8e977becb + checksum: 461258e1194d24c5e642c65ba1afd612712fa8e617ac85cfbbe3dde2557fe4abadedbce19a6954ae0cccbfb92b8a09f38d65a3eedca0394861a5d1c4c893c5ed languageName: node linkType: hard @@ -3815,23 +3762,13 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/visitor-keys@npm:5.46.1": - version: 5.46.1 - resolution: "@typescript-eslint/visitor-keys@npm:5.46.1" +"@typescript-eslint/visitor-keys@npm:5.57.0": + version: 5.57.0 + resolution: "@typescript-eslint/visitor-keys@npm:5.57.0" dependencies: - "@typescript-eslint/types": 5.46.1 + "@typescript-eslint/types": 5.57.0 eslint-visitor-keys: ^3.3.0 - checksum: 952cf20e29a040e0820e52d6815097abf042ea8e1fd5d013c0a319284ea0e2e29e0ca9ef244717450a6eb9d32ebf7fa9ed91185675a27adc35c9ad070d561b7c - languageName: node - linkType: hard - -"@typescript-eslint/visitor-keys@npm:5.56.0": - version: 5.56.0 - resolution: "@typescript-eslint/visitor-keys@npm:5.56.0" - dependencies: - "@typescript-eslint/types": 5.56.0 - eslint-visitor-keys: ^3.3.0 - checksum: 568fda40134e153d7befb59b55698f7919ba780d2d3431d8745feabf2e0fbb8aa7a02173b3c467dd20a0f6594e5248a1f82bb25d6c37827716d77452e86cad29 + checksum: 77d53f74648e48bf1c6313cd60568c2b1539157ac13945f26204a54beb156666c24f3d033dd0db8ed5d1d4595ee63c072732b17132e4488b46763bf8fdcefa49 languageName: node linkType: hard @@ -7872,17 +7809,17 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-deprecation@npm:^1.4.0-next.1": - version: 1.4.0-next.1 - resolution: "eslint-plugin-deprecation@npm:1.4.0-next.1" +"eslint-plugin-deprecation@npm:^1.4.0-next.2": + version: 1.4.0 + resolution: "eslint-plugin-deprecation@npm:1.4.0" dependencies: - "@typescript-eslint/experimental-utils": ^5.0.0 + "@typescript-eslint/experimental-utils": ^5.57.0 tslib: ^2.3.1 tsutils: ^3.21.0 peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - typescript: ^3.7.5 || ^4.0.0 || ^5.0.0 || ^5.0.0-beta - checksum: 5a2234a6b13e69091502036530b193a019cac910a993bd24435bfdba9176cfe69aae91a48fc1e17665ba98005a91f7616a15d86070903671f957a78fc514d93c + typescript: ^3.7.5 || ^4.0.0 || ^5.0.0 + checksum: 2e52dd3d94befa7b7d1ab1bcba80e5d91c4ec28331711598985ccadb325ae124f94b3f6ffb9fa851062df271f3f84ec34e2295e5c47ea1c61c773d2f69d1c661 languageName: node linkType: hard @@ -7960,9 +7897,9 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-n@npm:^15.6.1": - version: 15.6.1 - resolution: "eslint-plugin-n@npm:15.6.1" +"eslint-plugin-n@npm:^15.7.0": + version: 15.7.0 + resolution: "eslint-plugin-n@npm:15.7.0" dependencies: builtins: ^5.0.1 eslint-plugin-es: ^4.1.0 @@ -7974,7 +7911,7 @@ __metadata: semver: ^7.3.8 peerDependencies: eslint: ">=7.0.0" - checksum: 269d6f28967acadaaf6b6bb362d564bf5772545b1990053fb2a3c18f8683f9ffe708cda8c0de3dfddb4e86b63e738ab93634915b84649f51d3bb1783253d4b91 + checksum: cfbcc67e62adf27712afdeadf13223cb9717f95d4af8442056d9d4c97a8b88af76b7969f75deaac26fa98481023d6b7c9e43a28909e7f0468f40b3024b7bcfae languageName: node linkType: hard @@ -8095,21 +8032,21 @@ __metadata: languageName: node linkType: hard -"eslint-visitor-keys@npm:^3.3.0": - version: 3.3.0 - resolution: "eslint-visitor-keys@npm:3.3.0" - checksum: d59e68a7c5a6d0146526b0eec16ce87fbf97fe46b8281e0d41384224375c4e52f5ffb9e16d48f4ea50785cde93f766b0c898e31ab89978d88b0e1720fbfb7808 +"eslint-visitor-keys@npm:^3.3.0, eslint-visitor-keys@npm:^3.4.0": + version: 3.4.0 + resolution: "eslint-visitor-keys@npm:3.4.0" + checksum: 33159169462d3989321a1ec1e9aaaf6a24cc403d5d347e9886d1b5bfe18ffa1be73bdc6203143a28a606b142b1af49787f33cff0d6d0813eb5f2e8d2e1a6043c languageName: node linkType: hard -"eslint@npm:^8.36.0": - version: 8.36.0 - resolution: "eslint@npm:8.36.0" +"eslint@npm:^8.37.0": + version: 8.37.0 + resolution: "eslint@npm:8.37.0" dependencies: "@eslint-community/eslint-utils": ^4.2.0 "@eslint-community/regexpp": ^4.4.0 - "@eslint/eslintrc": ^2.0.1 - "@eslint/js": 8.36.0 + "@eslint/eslintrc": ^2.0.2 + "@eslint/js": 8.37.0 "@humanwhocodes/config-array": ^0.11.8 "@humanwhocodes/module-importer": ^1.0.1 "@nodelib/fs.walk": ^1.2.8 @@ -8120,8 +8057,8 @@ __metadata: doctrine: ^3.0.0 escape-string-regexp: ^4.0.0 eslint-scope: ^7.1.1 - eslint-visitor-keys: ^3.3.0 - espree: ^9.5.0 + eslint-visitor-keys: ^3.4.0 + espree: ^9.5.1 esquery: ^1.4.2 esutils: ^2.0.2 fast-deep-equal: ^3.1.3 @@ -8148,18 +8085,18 @@ __metadata: text-table: ^0.2.0 bin: eslint: bin/eslint.js - checksum: e9a961fc3b3de5cff5a1cb2c92eeffaa7e155a715489e30b3e1e76f186bd1255e0481e09564f2094733c0b1dbd3453499fb72ae7c043c83156e11e6d965b2304 + checksum: 80f3d5cdce2d671f4794e392d234a78d039c347673defb0596268bd481e8f30a53d93c01ff4f66a546c87d97ab4122c0e9cafe1371f87cb03cee6b7d5aa97595 languageName: node linkType: hard -"espree@npm:^9.5.0": - version: 9.5.0 - resolution: "espree@npm:9.5.0" +"espree@npm:^9.5.1": + version: 9.5.1 + resolution: "espree@npm:9.5.1" dependencies: acorn: ^8.8.0 acorn-jsx: ^5.3.2 - eslint-visitor-keys: ^3.3.0 - checksum: a7f110aefb6407e0d3237aa635ab3cea87106ae63748dd23c67031afccc640d04c4209fca2daf16e2233c82efb505faead0fb84097478fd9cc6e8f8dd80bf99d + eslint-visitor-keys: ^3.4.0 + checksum: cdf6e43540433d917c4f2ee087c6e987b2063baa85a1d9cdaf51533d78275ebd5910c42154e7baf8e3e89804b386da0a2f7fad2264d8f04420e7506bf87b3b88 languageName: node linkType: hard @@ -13667,7 +13604,7 @@ fsevents@~2.3.2: dependencies: "@crustio/crust-pin": ^1.0.0 "@pinata/sdk": ^2.1.0 - "@polkadot/dev": ^0.72.25 + "@polkadot/dev": ^0.72.32 "@types/chart.js": ^2.9.37 "@types/file-saver": ^2.0.5 "@types/react-beautiful-dnd": ^13.1.4 @@ -17959,9 +17896,9 @@ fsevents@~2.3.2: languageName: node linkType: hard -"webpack-dev-server@npm:^4.13.1": - version: 4.13.1 - resolution: "webpack-dev-server@npm:4.13.1" +"webpack-dev-server@npm:^4.13.2": + version: 4.13.2 + resolution: "webpack-dev-server@npm:4.13.2" dependencies: "@types/bonjour": ^3.5.9 "@types/connect-history-api-fallback": ^1.3.5 @@ -18002,7 +17939,7 @@ fsevents@~2.3.2: optional: true bin: webpack-dev-server: bin/webpack-dev-server.js - checksum: f70611544b7d964a31eb3d934d7c2b376b97e6927a89e03b2e21cfa5812bb639625cd18fd350de1604ba6c455b324135523a894032f28c69d90d90682e4f3b7d + checksum: 9bf573abf05b0e0f1e8219820f6264e25a0f8ee6aebed3c0d0449c24a37f88b575972e0a2bec426112ee37d48c8f5090e7754aa1873206d3c9b6344a54718232 languageName: node linkType: hard @@ -18036,9 +17973,9 @@ fsevents@~2.3.2: languageName: node linkType: hard -"webpack@npm:^5.76.3": - version: 5.76.3 - resolution: "webpack@npm:5.76.3" +"webpack@npm:^5.77.0": + version: 5.77.0 + resolution: "webpack@npm:5.77.0" dependencies: "@types/eslint-scope": ^3.7.3 "@types/estree": ^0.0.51 @@ -18069,7 +18006,7 @@ fsevents@~2.3.2: optional: true bin: webpack: bin/webpack.js - checksum: 363f536b56971d056e34ab4cffa4cbc630b220e51be1a8c3adea87d9f0b51c49cfc7c3720d6614a1fd2c8c63f1ab3100db916fe8367c8bb9299327ff8c3f856d + checksum: 21341bb72cbbf61dfb3af91eabe9290a6c05139f268eff3c419e5339deb6c79f2f36de55d9abf017d3ccbad290a535c02325001b2816acc393f3c022e67ac17c languageName: node linkType: hard