From d8c38af3db87134673ce7f189038b4e171fe6087 Mon Sep 17 00:00:00 2001 From: tarikgul Date: Fri, 8 Nov 2024 17:51:39 -0500 Subject: [PATCH 1/4] Fix node v22 testing compatibility --- .github/workflows/pr-any.yml | 4 +- .github/workflows/push-master.yml | 4 +- packages/api-contract/src/base/Code.spec.ts | 6 +- .../api-contract/src/checkTypes.manual.ts | 2 +- .../src/test/contracts/ink/v0/index.ts | 16 ++--- .../src/test/contracts/ink/v1/index.ts | 4 +- .../src/test/contracts/ink/v2/index.ts | 4 +- .../src/test/contracts/ink/v3/index.ts | 4 +- .../src/test/contracts/ink/v4/index.ts | 8 +-- .../src/test/contracts/ink/v5/index.ts | 10 ++-- .../src/test/contracts/solang/v0/index.ts | 2 +- .../src/test/contracts/user/v0/index.ts | 8 +-- .../src/test/contracts/user/v3/index.ts | 2 +- .../src/test/contracts/user/v4/index.ts | 2 +- packages/rpc-core/src/replay.spec.ts | 58 +++++++++---------- packages/rpc-provider/src/mock/index.ts | 4 +- packages/types/src/generic/AccountId.spec.ts | 2 +- packages/types/src/generic/Block.spec.ts | 2 +- .../interfaces/author/ExtrinsicStatus.spec.ts | 2 +- .../grandpa/ReportedRoundStates.spec.ts | 2 +- .../src/interfaces/runtime/Digest.spec.ts | 2 +- .../src/interfaces/runtime/Header.spec.ts | 10 ++-- .../interfaces/state/RuntimeVersion.spec.ts | 2 +- .../interfaces/state/StorageChangeSet.spec.ts | 2 +- .../src/interfaces/system/EventRecord.spec.ts | 4 +- 25 files changed, 81 insertions(+), 85 deletions(-) diff --git a/.github/workflows/pr-any.yml b/.github/workflows/pr-any.yml index b9a9d75568f0..09719567f13b 100644 --- a/.github/workflows/pr-any.yml +++ b/.github/workflows/pr-any.yml @@ -14,9 +14,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - # This will default to using v20 so that CI will pass. - # ref: https://github.com/polkadot-js/api/issues/6017 - node-version: 'lts/iron' + node-version: 'lts/*' - uses: denoland/setup-deno@v1 with: deno-version: v1.42.x diff --git a/.github/workflows/push-master.yml b/.github/workflows/push-master.yml index b5b3859117ec..4082c93af48e 100644 --- a/.github/workflows/push-master.yml +++ b/.github/workflows/push-master.yml @@ -24,9 +24,7 @@ jobs: token: ${{ secrets.GH_PAT_BOT }} - uses: actions/setup-node@v4 with: - # This will default to using v20 so that CI will pass. - # ref: https://github.com/polkadot-js/api/issues/6017 - node-version: 'lts/iron' + node-version: 'lts/*' - name: ${{ matrix.step }} run: | yarn install --immutable diff --git a/packages/api-contract/src/base/Code.spec.ts b/packages/api-contract/src/base/Code.spec.ts index 9d35c9b9aa63..6570afd8da0a 100644 --- a/packages/api-contract/src/base/Code.spec.ts +++ b/packages/api-contract/src/base/Code.spec.ts @@ -7,9 +7,9 @@ import fs from 'node:fs'; import { toPromiseMethod } from '@polkadot/api'; -import v0contractFlipper from '../test/contracts/ink/v0/flipper.contract.json' assert { type: 'json' }; -import v0abiFlipper from '../test/contracts/ink/v0/flipper.json' assert { type: 'json' }; -import v1contractFlipper from '../test/contracts/ink/v1/flipper.contract.json' assert { type: 'json' }; +import v0contractFlipper from '../test/contracts/ink/v0/flipper.contract.json' with { type: 'json' }; +import v0abiFlipper from '../test/contracts/ink/v0/flipper.json' with { type: 'json' }; +import v1contractFlipper from '../test/contracts/ink/v1/flipper.contract.json' with { type: 'json' }; import { Code } from './Code.js'; import { mockApi } from './mock.js'; diff --git a/packages/api-contract/src/checkTypes.manual.ts b/packages/api-contract/src/checkTypes.manual.ts index 92b09b9d8c23..5f6e373a464c 100644 --- a/packages/api-contract/src/checkTypes.manual.ts +++ b/packages/api-contract/src/checkTypes.manual.ts @@ -11,7 +11,7 @@ import { ApiPromise } from '@polkadot/api'; import { BlueprintPromise, ContractPromise } from '@polkadot/api-contract'; import { createTestPairs } from '@polkadot/keyring/testingPairs'; -import abiIncrementer from './test/contracts/ink/v0/incrementer.json' assert { type: 'json' }; +import abiIncrementer from './test/contracts/ink/v0/incrementer.json' with { type: 'json' }; async function checkBlueprint (api: ApiPromise, pairs: TestKeyringMapSubstrate): Promise { const blueprint = new BlueprintPromise(api, abiIncrementer as Record, '0x1234'); diff --git a/packages/api-contract/src/test/contracts/ink/v0/index.ts b/packages/api-contract/src/test/contracts/ink/v0/index.ts index 8c2fa489b83a..2f163aa0b60c 100644 --- a/packages/api-contract/src/test/contracts/ink/v0/index.ts +++ b/packages/api-contract/src/test/contracts/ink/v0/index.ts @@ -1,11 +1,11 @@ // Copyright 2017-2024 @polkadot/api-contract authors & contributors // SPDX-License-Identifier: Apache-2.0 -export { default as delegator } from './delegator.json' assert { type: 'json' }; -export { default as dns } from './dns.json' assert { type: 'json' }; -export { default as erc20 } from './erc20.json' assert { type: 'json' }; -export { default as erc721 } from './erc721.json' assert { type: 'json' }; -export { default as flipperBundle } from './flipper.contract.json' assert { type: 'json' }; -export { default as flipper } from './flipper.json' assert { type: 'json' }; -export { default as incrementer } from './incrementer.json' assert { type: 'json' }; -export { default as multisigPlain } from './multisig_plain.json' assert { type: 'json' }; +export { default as delegator } from './delegator.json' with { type: 'json' }; +export { default as dns } from './dns.json' with { type: 'json' }; +export { default as erc20 } from './erc20.json' with { type: 'json' }; +export { default as erc721 } from './erc721.json' with { type: 'json' }; +export { default as flipperBundle } from './flipper.contract.json' with { type: 'json' }; +export { default as flipper } from './flipper.json' with { type: 'json' }; +export { default as incrementer } from './incrementer.json' with { type: 'json' }; +export { default as multisigPlain } from './multisig_plain.json' with { type: 'json' }; diff --git a/packages/api-contract/src/test/contracts/ink/v1/index.ts b/packages/api-contract/src/test/contracts/ink/v1/index.ts index 0b95cce7d8fe..fdc7a696e9ab 100644 --- a/packages/api-contract/src/test/contracts/ink/v1/index.ts +++ b/packages/api-contract/src/test/contracts/ink/v1/index.ts @@ -1,6 +1,6 @@ // Copyright 2017-2024 @polkadot/api-contract authors & contributors // SPDX-License-Identifier: Apache-2.0 -export { default as flipper } from './flipper.contract.json' assert { type: 'json' }; +export { default as flipper } from './flipper.contract.json' with { type: 'json' }; // A complex contract example with traits. -export { default as psp22 } from './psp22_minter_pauser.contract.json' assert { type: 'json' }; +export { default as psp22 } from './psp22_minter_pauser.contract.json' with { type: 'json' }; diff --git a/packages/api-contract/src/test/contracts/ink/v2/index.ts b/packages/api-contract/src/test/contracts/ink/v2/index.ts index 789f94a372c1..dcac799dfbb3 100644 --- a/packages/api-contract/src/test/contracts/ink/v2/index.ts +++ b/packages/api-contract/src/test/contracts/ink/v2/index.ts @@ -1,5 +1,5 @@ // Copyright 2017-2024 @polkadot/api-contract authors & contributors // SPDX-License-Identifier: Apache-2.0 -export { default as erc20 } from './erc20.contract.json' assert { type: 'json' }; -export { default as flipper } from './flipper.contract.json' assert { type: 'json' }; +export { default as erc20 } from './erc20.contract.json' with { type: 'json' }; +export { default as flipper } from './flipper.contract.json' with { type: 'json' }; diff --git a/packages/api-contract/src/test/contracts/ink/v3/index.ts b/packages/api-contract/src/test/contracts/ink/v3/index.ts index ca7d692b8334..6bcbd953c995 100644 --- a/packages/api-contract/src/test/contracts/ink/v3/index.ts +++ b/packages/api-contract/src/test/contracts/ink/v3/index.ts @@ -1,6 +1,6 @@ // Copyright 2017-2024 @polkadot/api-contract authors & contributors // SPDX-License-Identifier: Apache-2.0 -export { default as flipper } from './flipper.contract.json' assert { type: 'json' }; +export { default as flipper } from './flipper.contract.json' with { type: 'json' }; // A complex contract example with traits. -export { default as traitErc20 } from './trait_erc20.contract.json' assert { type: 'json' }; +export { default as traitErc20 } from './trait_erc20.contract.json' with { type: 'json' }; diff --git a/packages/api-contract/src/test/contracts/ink/v4/index.ts b/packages/api-contract/src/test/contracts/ink/v4/index.ts index b9ec4dbdf248..87778fb49a5f 100644 --- a/packages/api-contract/src/test/contracts/ink/v4/index.ts +++ b/packages/api-contract/src/test/contracts/ink/v4/index.ts @@ -1,7 +1,7 @@ // Copyright 2017-2024 @polkadot/api-contract authors & contributors // SPDX-License-Identifier: Apache-2.0 -export { default as erc20Contract } from './erc20.contract.json' assert { type: 'json' }; -export { default as erc20Metadata } from './erc20.json' assert { type: 'json' }; -export { default as flipperContract } from './flipper.contract.json' assert { type: 'json' }; -export { default as flipperMetadata } from './flipper.json' assert { type: 'json' }; +export { default as erc20Contract } from './erc20.contract.json' with { type: 'json' }; +export { default as erc20Metadata } from './erc20.json' with { type: 'json' }; +export { default as flipperContract } from './flipper.contract.json' with { type: 'json' }; +export { default as flipperMetadata } from './flipper.json' with { type: 'json' }; diff --git a/packages/api-contract/src/test/contracts/ink/v5/index.ts b/packages/api-contract/src/test/contracts/ink/v5/index.ts index 9a45c277ad21..9088b931dab9 100644 --- a/packages/api-contract/src/test/contracts/ink/v5/index.ts +++ b/packages/api-contract/src/test/contracts/ink/v5/index.ts @@ -1,8 +1,8 @@ // Copyright 2017-2024 @polkadot/api-contract authors & contributors // SPDX-License-Identifier: Apache-2.0 -export { default as erc20Contract } from './erc20.contract.json' assert { type: 'json' }; -export { default as erc20Metadata } from './erc20.json' assert { type: 'json' }; -export { default as erc20AnonymousTransferMetadata } from './erc20_anonymous_transfer.json' assert { type: 'json' }; -export { default as flipperContract } from './flipper.contract.json' assert { type: 'json' }; -export { default as flipperMetadata } from './flipper.json' assert { type: 'json' }; +export { default as erc20Contract } from './erc20.contract.json' with { type: 'json' }; +export { default as erc20Metadata } from './erc20.json' with { type: 'json' }; +export { default as erc20AnonymousTransferMetadata } from './erc20_anonymous_transfer.json' with { type: 'json' }; +export { default as flipperContract } from './flipper.contract.json' with { type: 'json' }; +export { default as flipperMetadata } from './flipper.json' with { type: 'json' }; diff --git a/packages/api-contract/src/test/contracts/solang/v0/index.ts b/packages/api-contract/src/test/contracts/solang/v0/index.ts index a820469a8229..692aeb57d746 100644 --- a/packages/api-contract/src/test/contracts/solang/v0/index.ts +++ b/packages/api-contract/src/test/contracts/solang/v0/index.ts @@ -1,4 +1,4 @@ // Copyright 2017-2024 @polkadot/api-contract authors & contributors // SPDX-License-Identifier: Apache-2.0 -export { default as ints256 } from './ints256.json' assert { type: 'json' }; +export { default as ints256 } from './ints256.json' with { type: 'json' }; diff --git a/packages/api-contract/src/test/contracts/user/v0/index.ts b/packages/api-contract/src/test/contracts/user/v0/index.ts index 60a39bebe2d5..3bc51b8c88c5 100644 --- a/packages/api-contract/src/test/contracts/user/v0/index.ts +++ b/packages/api-contract/src/test/contracts/user/v0/index.ts @@ -1,7 +1,7 @@ // Copyright 2017-2024 @polkadot/api-contract authors & contributors // SPDX-License-Identifier: Apache-2.0 -export { default as assetTransfer } from './assetTransfer.json' assert { type: 'json' }; -export { default as enumExample } from './enumExample.json' assert { type: 'json' }; -export { default as recursive } from './recursive.contract.json' assert { type: 'json' }; -export { default as withString } from './withString.json' assert { type: 'json' }; +export { default as assetTransfer } from './assetTransfer.json' with { type: 'json' }; +export { default as enumExample } from './enumExample.json' with { type: 'json' }; +export { default as recursive } from './recursive.contract.json' with { type: 'json' }; +export { default as withString } from './withString.json' with { type: 'json' }; diff --git a/packages/api-contract/src/test/contracts/user/v3/index.ts b/packages/api-contract/src/test/contracts/user/v3/index.ts index c5df8af43bc6..4304f5f8d46b 100644 --- a/packages/api-contract/src/test/contracts/user/v3/index.ts +++ b/packages/api-contract/src/test/contracts/user/v3/index.ts @@ -1,4 +1,4 @@ // Copyright 2017-2024 @polkadot/api-contract authors & contributors // SPDX-License-Identifier: Apache-2.0 -export { default as ask } from './ask.json' assert { type: 'json' }; +export { default as ask } from './ask.json' with { type: 'json' }; diff --git a/packages/api-contract/src/test/contracts/user/v4/index.ts b/packages/api-contract/src/test/contracts/user/v4/index.ts index 290d5ad0c1f8..76ef54b6952e 100644 --- a/packages/api-contract/src/test/contracts/user/v4/index.ts +++ b/packages/api-contract/src/test/contracts/user/v4/index.ts @@ -1,4 +1,4 @@ // Copyright 2017-2024 @polkadot/api-contract authors & contributors // SPDX-License-Identifier: Apache-2.0 -export { default as events } from './events.contract.json' assert { type: 'json' }; +export { default as events } from './events.contract.json' with { type: 'json' }; diff --git a/packages/rpc-core/src/replay.spec.ts b/packages/rpc-core/src/replay.spec.ts index 6c617a8ca6c2..b00b0a42a7f5 100644 --- a/packages/rpc-core/src/replay.spec.ts +++ b/packages/rpc-core/src/replay.spec.ts @@ -36,38 +36,38 @@ describe('replay', (): void => { }); }); - it('replay(1) works as expected', async (): Promise => { - const observable = rpc.system.chain(); - let a: any; + // it('replay(1) works as expected', async (): Promise => { + // const observable = rpc.system.chain(); + // let a: any; - observable.subscribe((value?: unknown): void => { - a = value; - }); + // observable.subscribe((value?: unknown): void => { + // a = value; + // }); - await new Promise((resolve) => { - setTimeout((): void => { - // Subscribe again to the same observable, it should fire value immediately - observable.subscribe((value: any): void => { - expect(value).toEqual(a); - resolve(true); - }); - }, 1000); - }); - }); + // await new Promise((resolve) => { + // setTimeout((): void => { + // // Subscribe again to the same observable, it should fire value immediately + // observable.subscribe((value: any): void => { + // expect(value).toEqual(a); + // resolve(true); + // }); + // }, 1000); + // }); + // }); - it('unsubscribes as required', async (): Promise => { - rpc.provider.unsubscribe = jest.fn(); + // it('unsubscribes as required', async (): Promise => { + // rpc.provider.unsubscribe = jest.fn(); - await new Promise((resolve) => { - const subscription = rpc.chain.subscribeNewHeads().subscribe((): void => { - subscription.unsubscribe(); + // await new Promise((resolve) => { + // const subscription = rpc.chain.subscribeNewHeads().subscribe((): void => { + // subscription.unsubscribe(); - // There's a promise inside .unsubscribe(), wait a bit (> 2s) - setTimeout((): void => { - expect(rpc.provider.unsubscribe).toHaveBeenCalled(); - resolve(true); - }, 3500); - }); - }); - }); + // // There's a promise inside .unsubscribe(), wait a bit (> 2s) + // setTimeout((): void => { + // expect(rpc.provider.unsubscribe).toHaveBeenCalled(); + // resolve(true); + // }, 3500); + // }); + // }); + // }); }); diff --git a/packages/rpc-provider/src/mock/index.ts b/packages/rpc-provider/src/mock/index.ts index b688710ff234..8fa695d5aefe 100644 --- a/packages/rpc-provider/src/mock/index.ts +++ b/packages/rpc-provider/src/mock/index.ts @@ -13,8 +13,8 @@ import { EventEmitter } from 'eventemitter3'; import { createTestKeyring } from '@polkadot/keyring/testing'; import { decorateStorage, Metadata } from '@polkadot/types'; import jsonrpc from '@polkadot/types/interfaces/jsonrpc'; -import rpcHeader from '@polkadot/types-support/json/Header.004.json' assert { type: 'json' }; -import rpcSignedBlock from '@polkadot/types-support/json/SignedBlock.004.immortal.json' assert { type: 'json' }; +import rpcHeader from '@polkadot/types-support/json/Header.004.json' with { type: 'json' }; +import rpcSignedBlock from '@polkadot/types-support/json/SignedBlock.004.immortal.json' with { type: 'json' }; import rpcMetadata from '@polkadot/types-support/metadata/static-substrate'; import { BN, bnToU8a, logger, u8aToHex } from '@polkadot/util'; import { randomAsU8a } from '@polkadot/util-crypto'; diff --git a/packages/types/src/generic/AccountId.spec.ts b/packages/types/src/generic/AccountId.spec.ts index c95fae8638fc..4d1188099af3 100644 --- a/packages/types/src/generic/AccountId.spec.ts +++ b/packages/types/src/generic/AccountId.spec.ts @@ -6,7 +6,7 @@ /* eslint-disable @typescript-eslint/no-unsafe-member-access */ import { Raw } from '@polkadot/types-codec'; -import jsonVec from '@polkadot/types-support/json/AccountIdVec.001.json' assert { type: 'json' }; +import jsonVec from '@polkadot/types-support/json/AccountIdVec.001.json' with { type: 'json' }; import { TypeRegistry } from '../create/index.js'; diff --git a/packages/types/src/generic/Block.spec.ts b/packages/types/src/generic/Block.spec.ts index 0c9f865f020e..7bfdfc4f0817 100644 --- a/packages/types/src/generic/Block.spec.ts +++ b/packages/types/src/generic/Block.spec.ts @@ -8,7 +8,7 @@ import type { BlockValue } from './Block.js'; -import block00300 from '@polkadot/types-support/json/SignedBlock.003.00.json' assert { type: 'json' }; +import block00300 from '@polkadot/types-support/json/SignedBlock.003.00.json' with { type: 'json' }; import metadataStatic from '@polkadot/types-support/metadata/static-substrate'; import { stringify } from '@polkadot/util'; diff --git a/packages/types/src/interfaces/author/ExtrinsicStatus.spec.ts b/packages/types/src/interfaces/author/ExtrinsicStatus.spec.ts index 985c8d1ec541..a956b51339d0 100644 --- a/packages/types/src/interfaces/author/ExtrinsicStatus.spec.ts +++ b/packages/types/src/interfaces/author/ExtrinsicStatus.spec.ts @@ -7,7 +7,7 @@ import type { ExtrinsicStatus } from './types.js'; -import rpc from '@polkadot/types-support/json/ExtrinsicStatus.001.json' assert { type: 'json' }; +import rpc from '@polkadot/types-support/json/ExtrinsicStatus.001.json' with { type: 'json' }; import { TypeRegistry } from '../../create/index.js'; diff --git a/packages/types/src/interfaces/grandpa/ReportedRoundStates.spec.ts b/packages/types/src/interfaces/grandpa/ReportedRoundStates.spec.ts index 8cc2ccb1cae1..3de54b434eb7 100644 --- a/packages/types/src/interfaces/grandpa/ReportedRoundStates.spec.ts +++ b/packages/types/src/interfaces/grandpa/ReportedRoundStates.spec.ts @@ -5,7 +5,7 @@ /* eslint-disable @typescript-eslint/no-unsafe-member-access */ -import json3 from '@polkadot/types-support/json/GrandpaRoundstate.001.json' assert { type: 'json' }; +import json3 from '@polkadot/types-support/json/GrandpaRoundstate.001.json' with { type: 'json' }; import { TypeRegistry } from '../../create/index.js'; diff --git a/packages/types/src/interfaces/runtime/Digest.spec.ts b/packages/types/src/interfaces/runtime/Digest.spec.ts index 07ad7c849b01..1de3960efeff 100644 --- a/packages/types/src/interfaces/runtime/Digest.spec.ts +++ b/packages/types/src/interfaces/runtime/Digest.spec.ts @@ -5,7 +5,7 @@ /* eslint-disable @typescript-eslint/no-unsafe-member-access */ -import json3 from '@polkadot/types-support/json/Header.003.json' assert { type: 'json' }; +import json3 from '@polkadot/types-support/json/Header.003.json' with { type: 'json' }; import { TypeRegistry } from '../../create/index.js'; diff --git a/packages/types/src/interfaces/runtime/Header.spec.ts b/packages/types/src/interfaces/runtime/Header.spec.ts index 21a3cff9a306..e236a6e4c55b 100644 --- a/packages/types/src/interfaces/runtime/Header.spec.ts +++ b/packages/types/src/interfaces/runtime/Header.spec.ts @@ -5,11 +5,11 @@ /* eslint-disable @typescript-eslint/no-unsafe-member-access */ -import json1 from '@polkadot/types-support/json/Header.001.json' assert { type: 'json' }; -import json2 from '@polkadot/types-support/json/Header.002.json' assert { type: 'json' }; -import json3 from '@polkadot/types-support/json/Header.003.json' assert { type: 'json' }; -import block00300 from '@polkadot/types-support/json/SignedBlock.003.00.json' assert { type: 'json' }; -import block00301 from '@polkadot/types-support/json/SignedBlock.003.01.json' assert { type: 'json' }; +import json1 from '@polkadot/types-support/json/Header.001.json' with { type: 'json' }; +import json2 from '@polkadot/types-support/json/Header.002.json' with { type: 'json' }; +import json3 from '@polkadot/types-support/json/Header.003.json' with { type: 'json' }; +import block00300 from '@polkadot/types-support/json/SignedBlock.003.00.json' with { type: 'json' }; +import block00301 from '@polkadot/types-support/json/SignedBlock.003.01.json' with { type: 'json' }; import { BN } from '@polkadot/util'; import { TypeRegistry } from '../../create/index.js'; diff --git a/packages/types/src/interfaces/state/RuntimeVersion.spec.ts b/packages/types/src/interfaces/state/RuntimeVersion.spec.ts index 8405ed2d3d53..5c957529a4fd 100644 --- a/packages/types/src/interfaces/state/RuntimeVersion.spec.ts +++ b/packages/types/src/interfaces/state/RuntimeVersion.spec.ts @@ -7,7 +7,7 @@ import type { RuntimeVersion } from './types.js'; -import rpc from '@polkadot/types-support/json/RuntimeVersion.002.json' assert { type: 'json' }; +import rpc from '@polkadot/types-support/json/RuntimeVersion.002.json' with { type: 'json' }; import { TypeRegistry } from '../../create/index.js'; diff --git a/packages/types/src/interfaces/state/StorageChangeSet.spec.ts b/packages/types/src/interfaces/state/StorageChangeSet.spec.ts index ea3996391070..ff34ef71373b 100644 --- a/packages/types/src/interfaces/state/StorageChangeSet.spec.ts +++ b/packages/types/src/interfaces/state/StorageChangeSet.spec.ts @@ -6,7 +6,7 @@ /* eslint-disable @typescript-eslint/no-unsafe-member-access */ import { TypeRegistry } from '@polkadot/types/create'; -import json from '@polkadot/types-support/json/StorageChangeSet.001.json' assert { type: 'json' }; +import json from '@polkadot/types-support/json/StorageChangeSet.001.json' with { type: 'json' }; describe('StorageChangeSet', (): void => { const registry = new TypeRegistry(); diff --git a/packages/types/src/interfaces/system/EventRecord.spec.ts b/packages/types/src/interfaces/system/EventRecord.spec.ts index 85f8f48a4131..c251e2b0d6cd 100644 --- a/packages/types/src/interfaces/system/EventRecord.spec.ts +++ b/packages/types/src/interfaces/system/EventRecord.spec.ts @@ -6,8 +6,8 @@ /* eslint-disable @typescript-eslint/no-unsafe-assignment */ /* eslint-disable @typescript-eslint/no-unsafe-member-access */ -import json1 from '@polkadot/types-support/json/EventRecord.001.json' assert { type: 'json' }; -import json3 from '@polkadot/types-support/json/EventRecord.003.json' assert { type: 'json' }; +import json1 from '@polkadot/types-support/json/EventRecord.001.json' with { type: 'json' }; +import json3 from '@polkadot/types-support/json/EventRecord.003.json' with { type: 'json' }; import rpcMetadata from '@polkadot/types-support/metadata/static-substrate'; import { TypeRegistry } from '../../create/index.js'; From 9c19b23c9499ee4e5e2742fed5312f634fa9c2c1 Mon Sep 17 00:00:00 2001 From: tarikgul Date: Fri, 8 Nov 2024 17:53:15 -0500 Subject: [PATCH 2/4] uncomment tests --- packages/rpc-core/src/replay.spec.ts | 58 ++++++++++++++-------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/packages/rpc-core/src/replay.spec.ts b/packages/rpc-core/src/replay.spec.ts index b00b0a42a7f5..6c617a8ca6c2 100644 --- a/packages/rpc-core/src/replay.spec.ts +++ b/packages/rpc-core/src/replay.spec.ts @@ -36,38 +36,38 @@ describe('replay', (): void => { }); }); - // it('replay(1) works as expected', async (): Promise => { - // const observable = rpc.system.chain(); - // let a: any; + it('replay(1) works as expected', async (): Promise => { + const observable = rpc.system.chain(); + let a: any; - // observable.subscribe((value?: unknown): void => { - // a = value; - // }); + observable.subscribe((value?: unknown): void => { + a = value; + }); - // await new Promise((resolve) => { - // setTimeout((): void => { - // // Subscribe again to the same observable, it should fire value immediately - // observable.subscribe((value: any): void => { - // expect(value).toEqual(a); - // resolve(true); - // }); - // }, 1000); - // }); - // }); + await new Promise((resolve) => { + setTimeout((): void => { + // Subscribe again to the same observable, it should fire value immediately + observable.subscribe((value: any): void => { + expect(value).toEqual(a); + resolve(true); + }); + }, 1000); + }); + }); - // it('unsubscribes as required', async (): Promise => { - // rpc.provider.unsubscribe = jest.fn(); + it('unsubscribes as required', async (): Promise => { + rpc.provider.unsubscribe = jest.fn(); - // await new Promise((resolve) => { - // const subscription = rpc.chain.subscribeNewHeads().subscribe((): void => { - // subscription.unsubscribe(); + await new Promise((resolve) => { + const subscription = rpc.chain.subscribeNewHeads().subscribe((): void => { + subscription.unsubscribe(); - // // There's a promise inside .unsubscribe(), wait a bit (> 2s) - // setTimeout((): void => { - // expect(rpc.provider.unsubscribe).toHaveBeenCalled(); - // resolve(true); - // }, 3500); - // }); - // }); - // }); + // There's a promise inside .unsubscribe(), wait a bit (> 2s) + setTimeout((): void => { + expect(rpc.provider.unsubscribe).toHaveBeenCalled(); + resolve(true); + }, 3500); + }); + }); + }); }); From 42e82dc1794e23d5a2691cbb967272bad4d5c780 Mon Sep 17 00:00:00 2001 From: tarikgul Date: Sat, 9 Nov 2024 10:44:58 -0500 Subject: [PATCH 3/4] revert to using assert --- packages/api-contract/src/base/Code.spec.ts | 6 +++--- packages/api-contract/src/checkTypes.manual.ts | 2 +- .../src/test/contracts/ink/v0/index.ts | 16 ++++++++-------- .../src/test/contracts/ink/v1/index.ts | 4 ++-- .../src/test/contracts/ink/v2/index.ts | 4 ++-- .../src/test/contracts/ink/v3/index.ts | 4 ++-- .../src/test/contracts/ink/v4/index.ts | 8 ++++---- .../src/test/contracts/ink/v5/index.ts | 10 +++++----- .../src/test/contracts/solang/v0/index.ts | 2 +- .../src/test/contracts/user/v0/index.ts | 8 ++++---- .../src/test/contracts/user/v3/index.ts | 2 +- .../src/test/contracts/user/v4/index.ts | 2 +- packages/rpc-provider/src/mock/index.ts | 4 ++-- packages/types/src/generic/AccountId.spec.ts | 2 +- packages/types/src/generic/Block.spec.ts | 2 +- .../interfaces/author/ExtrinsicStatus.spec.ts | 2 +- .../grandpa/ReportedRoundStates.spec.ts | 2 +- .../types/src/interfaces/runtime/Digest.spec.ts | 2 +- .../types/src/interfaces/runtime/Header.spec.ts | 10 +++++----- .../src/interfaces/state/RuntimeVersion.spec.ts | 2 +- .../interfaces/state/StorageChangeSet.spec.ts | 2 +- .../src/interfaces/system/EventRecord.spec.ts | 4 ++-- 22 files changed, 50 insertions(+), 50 deletions(-) diff --git a/packages/api-contract/src/base/Code.spec.ts b/packages/api-contract/src/base/Code.spec.ts index 6570afd8da0a..9d35c9b9aa63 100644 --- a/packages/api-contract/src/base/Code.spec.ts +++ b/packages/api-contract/src/base/Code.spec.ts @@ -7,9 +7,9 @@ import fs from 'node:fs'; import { toPromiseMethod } from '@polkadot/api'; -import v0contractFlipper from '../test/contracts/ink/v0/flipper.contract.json' with { type: 'json' }; -import v0abiFlipper from '../test/contracts/ink/v0/flipper.json' with { type: 'json' }; -import v1contractFlipper from '../test/contracts/ink/v1/flipper.contract.json' with { type: 'json' }; +import v0contractFlipper from '../test/contracts/ink/v0/flipper.contract.json' assert { type: 'json' }; +import v0abiFlipper from '../test/contracts/ink/v0/flipper.json' assert { type: 'json' }; +import v1contractFlipper from '../test/contracts/ink/v1/flipper.contract.json' assert { type: 'json' }; import { Code } from './Code.js'; import { mockApi } from './mock.js'; diff --git a/packages/api-contract/src/checkTypes.manual.ts b/packages/api-contract/src/checkTypes.manual.ts index 5f6e373a464c..92b09b9d8c23 100644 --- a/packages/api-contract/src/checkTypes.manual.ts +++ b/packages/api-contract/src/checkTypes.manual.ts @@ -11,7 +11,7 @@ import { ApiPromise } from '@polkadot/api'; import { BlueprintPromise, ContractPromise } from '@polkadot/api-contract'; import { createTestPairs } from '@polkadot/keyring/testingPairs'; -import abiIncrementer from './test/contracts/ink/v0/incrementer.json' with { type: 'json' }; +import abiIncrementer from './test/contracts/ink/v0/incrementer.json' assert { type: 'json' }; async function checkBlueprint (api: ApiPromise, pairs: TestKeyringMapSubstrate): Promise { const blueprint = new BlueprintPromise(api, abiIncrementer as Record, '0x1234'); diff --git a/packages/api-contract/src/test/contracts/ink/v0/index.ts b/packages/api-contract/src/test/contracts/ink/v0/index.ts index 2f163aa0b60c..8c2fa489b83a 100644 --- a/packages/api-contract/src/test/contracts/ink/v0/index.ts +++ b/packages/api-contract/src/test/contracts/ink/v0/index.ts @@ -1,11 +1,11 @@ // Copyright 2017-2024 @polkadot/api-contract authors & contributors // SPDX-License-Identifier: Apache-2.0 -export { default as delegator } from './delegator.json' with { type: 'json' }; -export { default as dns } from './dns.json' with { type: 'json' }; -export { default as erc20 } from './erc20.json' with { type: 'json' }; -export { default as erc721 } from './erc721.json' with { type: 'json' }; -export { default as flipperBundle } from './flipper.contract.json' with { type: 'json' }; -export { default as flipper } from './flipper.json' with { type: 'json' }; -export { default as incrementer } from './incrementer.json' with { type: 'json' }; -export { default as multisigPlain } from './multisig_plain.json' with { type: 'json' }; +export { default as delegator } from './delegator.json' assert { type: 'json' }; +export { default as dns } from './dns.json' assert { type: 'json' }; +export { default as erc20 } from './erc20.json' assert { type: 'json' }; +export { default as erc721 } from './erc721.json' assert { type: 'json' }; +export { default as flipperBundle } from './flipper.contract.json' assert { type: 'json' }; +export { default as flipper } from './flipper.json' assert { type: 'json' }; +export { default as incrementer } from './incrementer.json' assert { type: 'json' }; +export { default as multisigPlain } from './multisig_plain.json' assert { type: 'json' }; diff --git a/packages/api-contract/src/test/contracts/ink/v1/index.ts b/packages/api-contract/src/test/contracts/ink/v1/index.ts index fdc7a696e9ab..0b95cce7d8fe 100644 --- a/packages/api-contract/src/test/contracts/ink/v1/index.ts +++ b/packages/api-contract/src/test/contracts/ink/v1/index.ts @@ -1,6 +1,6 @@ // Copyright 2017-2024 @polkadot/api-contract authors & contributors // SPDX-License-Identifier: Apache-2.0 -export { default as flipper } from './flipper.contract.json' with { type: 'json' }; +export { default as flipper } from './flipper.contract.json' assert { type: 'json' }; // A complex contract example with traits. -export { default as psp22 } from './psp22_minter_pauser.contract.json' with { type: 'json' }; +export { default as psp22 } from './psp22_minter_pauser.contract.json' assert { type: 'json' }; diff --git a/packages/api-contract/src/test/contracts/ink/v2/index.ts b/packages/api-contract/src/test/contracts/ink/v2/index.ts index dcac799dfbb3..789f94a372c1 100644 --- a/packages/api-contract/src/test/contracts/ink/v2/index.ts +++ b/packages/api-contract/src/test/contracts/ink/v2/index.ts @@ -1,5 +1,5 @@ // Copyright 2017-2024 @polkadot/api-contract authors & contributors // SPDX-License-Identifier: Apache-2.0 -export { default as erc20 } from './erc20.contract.json' with { type: 'json' }; -export { default as flipper } from './flipper.contract.json' with { type: 'json' }; +export { default as erc20 } from './erc20.contract.json' assert { type: 'json' }; +export { default as flipper } from './flipper.contract.json' assert { type: 'json' }; diff --git a/packages/api-contract/src/test/contracts/ink/v3/index.ts b/packages/api-contract/src/test/contracts/ink/v3/index.ts index 6bcbd953c995..ca7d692b8334 100644 --- a/packages/api-contract/src/test/contracts/ink/v3/index.ts +++ b/packages/api-contract/src/test/contracts/ink/v3/index.ts @@ -1,6 +1,6 @@ // Copyright 2017-2024 @polkadot/api-contract authors & contributors // SPDX-License-Identifier: Apache-2.0 -export { default as flipper } from './flipper.contract.json' with { type: 'json' }; +export { default as flipper } from './flipper.contract.json' assert { type: 'json' }; // A complex contract example with traits. -export { default as traitErc20 } from './trait_erc20.contract.json' with { type: 'json' }; +export { default as traitErc20 } from './trait_erc20.contract.json' assert { type: 'json' }; diff --git a/packages/api-contract/src/test/contracts/ink/v4/index.ts b/packages/api-contract/src/test/contracts/ink/v4/index.ts index 87778fb49a5f..b9ec4dbdf248 100644 --- a/packages/api-contract/src/test/contracts/ink/v4/index.ts +++ b/packages/api-contract/src/test/contracts/ink/v4/index.ts @@ -1,7 +1,7 @@ // Copyright 2017-2024 @polkadot/api-contract authors & contributors // SPDX-License-Identifier: Apache-2.0 -export { default as erc20Contract } from './erc20.contract.json' with { type: 'json' }; -export { default as erc20Metadata } from './erc20.json' with { type: 'json' }; -export { default as flipperContract } from './flipper.contract.json' with { type: 'json' }; -export { default as flipperMetadata } from './flipper.json' with { type: 'json' }; +export { default as erc20Contract } from './erc20.contract.json' assert { type: 'json' }; +export { default as erc20Metadata } from './erc20.json' assert { type: 'json' }; +export { default as flipperContract } from './flipper.contract.json' assert { type: 'json' }; +export { default as flipperMetadata } from './flipper.json' assert { type: 'json' }; diff --git a/packages/api-contract/src/test/contracts/ink/v5/index.ts b/packages/api-contract/src/test/contracts/ink/v5/index.ts index 9088b931dab9..9a45c277ad21 100644 --- a/packages/api-contract/src/test/contracts/ink/v5/index.ts +++ b/packages/api-contract/src/test/contracts/ink/v5/index.ts @@ -1,8 +1,8 @@ // Copyright 2017-2024 @polkadot/api-contract authors & contributors // SPDX-License-Identifier: Apache-2.0 -export { default as erc20Contract } from './erc20.contract.json' with { type: 'json' }; -export { default as erc20Metadata } from './erc20.json' with { type: 'json' }; -export { default as erc20AnonymousTransferMetadata } from './erc20_anonymous_transfer.json' with { type: 'json' }; -export { default as flipperContract } from './flipper.contract.json' with { type: 'json' }; -export { default as flipperMetadata } from './flipper.json' with { type: 'json' }; +export { default as erc20Contract } from './erc20.contract.json' assert { type: 'json' }; +export { default as erc20Metadata } from './erc20.json' assert { type: 'json' }; +export { default as erc20AnonymousTransferMetadata } from './erc20_anonymous_transfer.json' assert { type: 'json' }; +export { default as flipperContract } from './flipper.contract.json' assert { type: 'json' }; +export { default as flipperMetadata } from './flipper.json' assert { type: 'json' }; diff --git a/packages/api-contract/src/test/contracts/solang/v0/index.ts b/packages/api-contract/src/test/contracts/solang/v0/index.ts index 692aeb57d746..a820469a8229 100644 --- a/packages/api-contract/src/test/contracts/solang/v0/index.ts +++ b/packages/api-contract/src/test/contracts/solang/v0/index.ts @@ -1,4 +1,4 @@ // Copyright 2017-2024 @polkadot/api-contract authors & contributors // SPDX-License-Identifier: Apache-2.0 -export { default as ints256 } from './ints256.json' with { type: 'json' }; +export { default as ints256 } from './ints256.json' assert { type: 'json' }; diff --git a/packages/api-contract/src/test/contracts/user/v0/index.ts b/packages/api-contract/src/test/contracts/user/v0/index.ts index 3bc51b8c88c5..60a39bebe2d5 100644 --- a/packages/api-contract/src/test/contracts/user/v0/index.ts +++ b/packages/api-contract/src/test/contracts/user/v0/index.ts @@ -1,7 +1,7 @@ // Copyright 2017-2024 @polkadot/api-contract authors & contributors // SPDX-License-Identifier: Apache-2.0 -export { default as assetTransfer } from './assetTransfer.json' with { type: 'json' }; -export { default as enumExample } from './enumExample.json' with { type: 'json' }; -export { default as recursive } from './recursive.contract.json' with { type: 'json' }; -export { default as withString } from './withString.json' with { type: 'json' }; +export { default as assetTransfer } from './assetTransfer.json' assert { type: 'json' }; +export { default as enumExample } from './enumExample.json' assert { type: 'json' }; +export { default as recursive } from './recursive.contract.json' assert { type: 'json' }; +export { default as withString } from './withString.json' assert { type: 'json' }; diff --git a/packages/api-contract/src/test/contracts/user/v3/index.ts b/packages/api-contract/src/test/contracts/user/v3/index.ts index 4304f5f8d46b..c5df8af43bc6 100644 --- a/packages/api-contract/src/test/contracts/user/v3/index.ts +++ b/packages/api-contract/src/test/contracts/user/v3/index.ts @@ -1,4 +1,4 @@ // Copyright 2017-2024 @polkadot/api-contract authors & contributors // SPDX-License-Identifier: Apache-2.0 -export { default as ask } from './ask.json' with { type: 'json' }; +export { default as ask } from './ask.json' assert { type: 'json' }; diff --git a/packages/api-contract/src/test/contracts/user/v4/index.ts b/packages/api-contract/src/test/contracts/user/v4/index.ts index 76ef54b6952e..290d5ad0c1f8 100644 --- a/packages/api-contract/src/test/contracts/user/v4/index.ts +++ b/packages/api-contract/src/test/contracts/user/v4/index.ts @@ -1,4 +1,4 @@ // Copyright 2017-2024 @polkadot/api-contract authors & contributors // SPDX-License-Identifier: Apache-2.0 -export { default as events } from './events.contract.json' with { type: 'json' }; +export { default as events } from './events.contract.json' assert { type: 'json' }; diff --git a/packages/rpc-provider/src/mock/index.ts b/packages/rpc-provider/src/mock/index.ts index 8fa695d5aefe..b688710ff234 100644 --- a/packages/rpc-provider/src/mock/index.ts +++ b/packages/rpc-provider/src/mock/index.ts @@ -13,8 +13,8 @@ import { EventEmitter } from 'eventemitter3'; import { createTestKeyring } from '@polkadot/keyring/testing'; import { decorateStorage, Metadata } from '@polkadot/types'; import jsonrpc from '@polkadot/types/interfaces/jsonrpc'; -import rpcHeader from '@polkadot/types-support/json/Header.004.json' with { type: 'json' }; -import rpcSignedBlock from '@polkadot/types-support/json/SignedBlock.004.immortal.json' with { type: 'json' }; +import rpcHeader from '@polkadot/types-support/json/Header.004.json' assert { type: 'json' }; +import rpcSignedBlock from '@polkadot/types-support/json/SignedBlock.004.immortal.json' assert { type: 'json' }; import rpcMetadata from '@polkadot/types-support/metadata/static-substrate'; import { BN, bnToU8a, logger, u8aToHex } from '@polkadot/util'; import { randomAsU8a } from '@polkadot/util-crypto'; diff --git a/packages/types/src/generic/AccountId.spec.ts b/packages/types/src/generic/AccountId.spec.ts index 4d1188099af3..c95fae8638fc 100644 --- a/packages/types/src/generic/AccountId.spec.ts +++ b/packages/types/src/generic/AccountId.spec.ts @@ -6,7 +6,7 @@ /* eslint-disable @typescript-eslint/no-unsafe-member-access */ import { Raw } from '@polkadot/types-codec'; -import jsonVec from '@polkadot/types-support/json/AccountIdVec.001.json' with { type: 'json' }; +import jsonVec from '@polkadot/types-support/json/AccountIdVec.001.json' assert { type: 'json' }; import { TypeRegistry } from '../create/index.js'; diff --git a/packages/types/src/generic/Block.spec.ts b/packages/types/src/generic/Block.spec.ts index 7bfdfc4f0817..0c9f865f020e 100644 --- a/packages/types/src/generic/Block.spec.ts +++ b/packages/types/src/generic/Block.spec.ts @@ -8,7 +8,7 @@ import type { BlockValue } from './Block.js'; -import block00300 from '@polkadot/types-support/json/SignedBlock.003.00.json' with { type: 'json' }; +import block00300 from '@polkadot/types-support/json/SignedBlock.003.00.json' assert { type: 'json' }; import metadataStatic from '@polkadot/types-support/metadata/static-substrate'; import { stringify } from '@polkadot/util'; diff --git a/packages/types/src/interfaces/author/ExtrinsicStatus.spec.ts b/packages/types/src/interfaces/author/ExtrinsicStatus.spec.ts index a956b51339d0..985c8d1ec541 100644 --- a/packages/types/src/interfaces/author/ExtrinsicStatus.spec.ts +++ b/packages/types/src/interfaces/author/ExtrinsicStatus.spec.ts @@ -7,7 +7,7 @@ import type { ExtrinsicStatus } from './types.js'; -import rpc from '@polkadot/types-support/json/ExtrinsicStatus.001.json' with { type: 'json' }; +import rpc from '@polkadot/types-support/json/ExtrinsicStatus.001.json' assert { type: 'json' }; import { TypeRegistry } from '../../create/index.js'; diff --git a/packages/types/src/interfaces/grandpa/ReportedRoundStates.spec.ts b/packages/types/src/interfaces/grandpa/ReportedRoundStates.spec.ts index 3de54b434eb7..8cc2ccb1cae1 100644 --- a/packages/types/src/interfaces/grandpa/ReportedRoundStates.spec.ts +++ b/packages/types/src/interfaces/grandpa/ReportedRoundStates.spec.ts @@ -5,7 +5,7 @@ /* eslint-disable @typescript-eslint/no-unsafe-member-access */ -import json3 from '@polkadot/types-support/json/GrandpaRoundstate.001.json' with { type: 'json' }; +import json3 from '@polkadot/types-support/json/GrandpaRoundstate.001.json' assert { type: 'json' }; import { TypeRegistry } from '../../create/index.js'; diff --git a/packages/types/src/interfaces/runtime/Digest.spec.ts b/packages/types/src/interfaces/runtime/Digest.spec.ts index 1de3960efeff..07ad7c849b01 100644 --- a/packages/types/src/interfaces/runtime/Digest.spec.ts +++ b/packages/types/src/interfaces/runtime/Digest.spec.ts @@ -5,7 +5,7 @@ /* eslint-disable @typescript-eslint/no-unsafe-member-access */ -import json3 from '@polkadot/types-support/json/Header.003.json' with { type: 'json' }; +import json3 from '@polkadot/types-support/json/Header.003.json' assert { type: 'json' }; import { TypeRegistry } from '../../create/index.js'; diff --git a/packages/types/src/interfaces/runtime/Header.spec.ts b/packages/types/src/interfaces/runtime/Header.spec.ts index e236a6e4c55b..21a3cff9a306 100644 --- a/packages/types/src/interfaces/runtime/Header.spec.ts +++ b/packages/types/src/interfaces/runtime/Header.spec.ts @@ -5,11 +5,11 @@ /* eslint-disable @typescript-eslint/no-unsafe-member-access */ -import json1 from '@polkadot/types-support/json/Header.001.json' with { type: 'json' }; -import json2 from '@polkadot/types-support/json/Header.002.json' with { type: 'json' }; -import json3 from '@polkadot/types-support/json/Header.003.json' with { type: 'json' }; -import block00300 from '@polkadot/types-support/json/SignedBlock.003.00.json' with { type: 'json' }; -import block00301 from '@polkadot/types-support/json/SignedBlock.003.01.json' with { type: 'json' }; +import json1 from '@polkadot/types-support/json/Header.001.json' assert { type: 'json' }; +import json2 from '@polkadot/types-support/json/Header.002.json' assert { type: 'json' }; +import json3 from '@polkadot/types-support/json/Header.003.json' assert { type: 'json' }; +import block00300 from '@polkadot/types-support/json/SignedBlock.003.00.json' assert { type: 'json' }; +import block00301 from '@polkadot/types-support/json/SignedBlock.003.01.json' assert { type: 'json' }; import { BN } from '@polkadot/util'; import { TypeRegistry } from '../../create/index.js'; diff --git a/packages/types/src/interfaces/state/RuntimeVersion.spec.ts b/packages/types/src/interfaces/state/RuntimeVersion.spec.ts index 5c957529a4fd..8405ed2d3d53 100644 --- a/packages/types/src/interfaces/state/RuntimeVersion.spec.ts +++ b/packages/types/src/interfaces/state/RuntimeVersion.spec.ts @@ -7,7 +7,7 @@ import type { RuntimeVersion } from './types.js'; -import rpc from '@polkadot/types-support/json/RuntimeVersion.002.json' with { type: 'json' }; +import rpc from '@polkadot/types-support/json/RuntimeVersion.002.json' assert { type: 'json' }; import { TypeRegistry } from '../../create/index.js'; diff --git a/packages/types/src/interfaces/state/StorageChangeSet.spec.ts b/packages/types/src/interfaces/state/StorageChangeSet.spec.ts index ff34ef71373b..ea3996391070 100644 --- a/packages/types/src/interfaces/state/StorageChangeSet.spec.ts +++ b/packages/types/src/interfaces/state/StorageChangeSet.spec.ts @@ -6,7 +6,7 @@ /* eslint-disable @typescript-eslint/no-unsafe-member-access */ import { TypeRegistry } from '@polkadot/types/create'; -import json from '@polkadot/types-support/json/StorageChangeSet.001.json' with { type: 'json' }; +import json from '@polkadot/types-support/json/StorageChangeSet.001.json' assert { type: 'json' }; describe('StorageChangeSet', (): void => { const registry = new TypeRegistry(); diff --git a/packages/types/src/interfaces/system/EventRecord.spec.ts b/packages/types/src/interfaces/system/EventRecord.spec.ts index c251e2b0d6cd..85f8f48a4131 100644 --- a/packages/types/src/interfaces/system/EventRecord.spec.ts +++ b/packages/types/src/interfaces/system/EventRecord.spec.ts @@ -6,8 +6,8 @@ /* eslint-disable @typescript-eslint/no-unsafe-assignment */ /* eslint-disable @typescript-eslint/no-unsafe-member-access */ -import json1 from '@polkadot/types-support/json/EventRecord.001.json' with { type: 'json' }; -import json3 from '@polkadot/types-support/json/EventRecord.003.json' with { type: 'json' }; +import json1 from '@polkadot/types-support/json/EventRecord.001.json' assert { type: 'json' }; +import json3 from '@polkadot/types-support/json/EventRecord.003.json' assert { type: 'json' }; import rpcMetadata from '@polkadot/types-support/metadata/static-substrate'; import { TypeRegistry } from '../../create/index.js'; From 8c4dc276c7fe29ccb9d6b410d583b4783d8cdc6f Mon Sep 17 00:00:00 2001 From: tarikgul Date: Sun, 10 Nov 2024 09:45:01 -0500 Subject: [PATCH 4/4] Bump dev --- package.json | 2 +- yarn.lock | 30 +++++++++++++++--------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/package.json b/package.json index 63edc6ae051b..ab84430e8ddf 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "test:one": "polkadot-dev-run-test --env node" }, "devDependencies": { - "@polkadot/dev": "^0.81.2", + "@polkadot/dev": "^0.82.1", "@polkadot/typegen": "workspace:packages/typegen", "@types/node": "^22.7.5" }, diff --git a/yarn.lock b/yarn.lock index 97378edfab2a..bf60f3109bf3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -536,34 +536,34 @@ __metadata: languageName: unknown linkType: soft -"@polkadot/dev-test@npm:^0.81.2": - version: 0.81.2 - resolution: "@polkadot/dev-test@npm:0.81.2" +"@polkadot/dev-test@npm:^0.82.1": + version: 0.82.1 + resolution: "@polkadot/dev-test@npm:0.82.1" dependencies: jsdom: "npm:^24.0.0" tslib: "npm:^2.7.0" - checksum: 10/1028c3b1804567128f1cc796df2285827bb8d9d54afee8c81f28821d2205e7f4522bd9659eb2e7645a080568d43b394279db12b1c2debdc447d5567317b7c2fc + checksum: 10/669690400183b33187a526c9b5d5427957e30ace31635975a7b20d2cbfc4bda002f9ea71bde87e9e37d8153bc5b56b7d6059b52a3fe973fce6023595a438e3df languageName: node linkType: hard -"@polkadot/dev-ts@npm:^0.81.2": - version: 0.81.2 - resolution: "@polkadot/dev-ts@npm:0.81.2" +"@polkadot/dev-ts@npm:^0.82.1": + version: 0.82.1 + resolution: "@polkadot/dev-ts@npm:0.82.1" dependencies: json5: "npm:^2.2.3" tslib: "npm:^2.7.0" typescript: "npm:^5.5.4" - checksum: 10/cb25e9523cbad5029f7e149135aa003286d9c907677902e6a1ffe4a905d6c31f6c88a647b3be0e51b09e62528fca2a3121f12a748942ecd6eccefd8da1eb3369 + checksum: 10/a7ac2a614bf93e2406d65e153f110d55c8b2a7eaf44672622586dd2f9bc0d6e4a36e0a05a66654370a1c66061a7668f0df93151142c7d9a281d56df4827c9418 languageName: node linkType: hard -"@polkadot/dev@npm:^0.81.2": - version: 0.81.2 - resolution: "@polkadot/dev@npm:0.81.2" +"@polkadot/dev@npm:^0.82.1": + version: 0.82.1 + resolution: "@polkadot/dev@npm:0.82.1" dependencies: "@eslint/js": "npm:^8.56.0" - "@polkadot/dev-test": "npm:^0.81.2" - "@polkadot/dev-ts": "npm:^0.81.2" + "@polkadot/dev-test": "npm:^0.82.1" + "@polkadot/dev-ts": "npm:^0.82.1" "@rollup/plugin-alias": "npm:^5.1.0" "@rollup/plugin-commonjs": "npm:^25.0.7" "@rollup/plugin-dynamic-import-vars": "npm:^2.1.2" @@ -628,7 +628,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: 10/304d2e1e5a5669b0888026fd0fb3e82dba75e1a85c9c40481d0832b072bac9ba6f9e9755db4bdce4c2aa10c631ef7f4fba84114a1b6490d25aa5b4f6dff65299 + checksum: 10/5739c27e09db8bf09582f1016d7db83ca6c09eb9ece9b4c3df05073670dccb5ecb05464e26c4aaea846354dc6cfcea26f6dd727fc2c42bc8e04e04f9319e5321 languageName: node linkType: hard @@ -7945,7 +7945,7 @@ __metadata: version: 0.0.0-use.local resolution: "root-workspace-0b6124@workspace:." dependencies: - "@polkadot/dev": "npm:^0.81.2" + "@polkadot/dev": "npm:^0.82.1" "@polkadot/typegen": "workspace:packages/typegen" "@types/node": "npm:^22.7.5" languageName: unknown