From e9489d41cb3833447e63defebcf1acd800489f1f Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Wed, 8 Jul 2020 14:46:12 +0200 Subject: [PATCH] Raw isAscii & toUtf8 (#2413) * Raw isAscii & toUtf8 * Tests for isAscii & toUtf8 * Cleanup return types --- CHANGELOG.md | 9 +- package.json | 4 +- packages/api-contract/package.json | 2 +- packages/api-derive/package.json | 6 +- packages/api/package.json | 8 +- packages/metadata/package.json | 6 +- packages/rpc-core/package.json | 4 +- packages/rpc-provider/package.json | 6 +- packages/typegen/package.json | 4 +- packages/types-known/package.json | 2 +- packages/types/package.json | 6 +- packages/types/src/codec/Raw.spec.ts | 12 +- packages/types/src/codec/Raw.ts | 20 ++- yarn.lock | 232 +++++++++++++-------------- 14 files changed, 176 insertions(+), 145 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e69ceb1235..ffa11c623b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # CHANGELOG +## 1.24.0-beta.x + +- Added `isAscii` getter to `Bytes` & `Raw` types +- Added `toUtf8()` helper to `Bytes` & `Raw` types +- `@polkadot/util` 2.18 + ## 1.23.1 Jul 6, 2020 - Small README typo fix (Thanks to https://github.com/woss) @@ -8,6 +14,7 @@ - Update `ProxyType` for Kusama, Polkadot & Westend with `IdentityJudgement` - Validate number format (signed/unsigned) for number types - Remove core codec dependencies on Base class (with proper TS encapsulation) +- `@polkadot/util` 2.17 ## 1.22.1 Jun 30, 2020 @@ -24,7 +31,7 @@ - Add support for `CheckMortality` signed extension (old `CheckEra` is now an alias) - Promise API will default to using `getStorage` on non-subscription calls, reducing RPC overhead - Optimize derive BN allocations, using in-place operators as applicable -- Add new substrate types for Babe EquivocationProof +- Add new Substrate types for Babe `EquivocationProof` - Adjust `Releases` enum to use a shared instance ## 1.20.1 Jun 22, 2020 diff --git a/package.json b/package.json index c71f413775..eaa0ccdc57 100644 --- a/package.json +++ b/package.json @@ -27,10 +27,10 @@ "@babel/core": "^7.10.4", "@babel/register": "^7.10.4", "@babel/runtime": "^7.10.4", - "@polkadot/dev": "^0.55.20", + "@polkadot/dev": "^0.55.21", "@polkadot/ts": "^0.3.27", "@polkadot/typegen": "workspace:packages/typegen", - "@types/jest": "^26.0.3", + "@types/jest": "^26.0.4", "@vuepress/plugin-search": "^1.5.2", "copyfiles": "^2.3.0" }, diff --git a/packages/api-contract/package.json b/packages/api-contract/package.json index 68e44b6400..9e1a71d9d6 100644 --- a/packages/api-contract/package.json +++ b/packages/api-contract/package.json @@ -30,7 +30,7 @@ "@polkadot/api": "1.23.1", "@polkadot/rpc-core": "1.23.1", "@polkadot/types": "1.23.1", - "@polkadot/util": "^2.17.1", + "@polkadot/util": "^2.18.0-beta.1", "bn.js": "^5.1.2", "rxjs": "^6.6.0" } diff --git a/packages/api-derive/package.json b/packages/api-derive/package.json index a2b5a5f320..110e182490 100644 --- a/packages/api-derive/package.json +++ b/packages/api-derive/package.json @@ -32,13 +32,13 @@ "@polkadot/rpc-core": "1.23.1", "@polkadot/rpc-provider": "1.23.1", "@polkadot/types": "1.23.1", - "@polkadot/util": "^2.17.1", - "@polkadot/util-crypto": "^2.17.1", + "@polkadot/util": "^2.18.0-beta.1", + "@polkadot/util-crypto": "^2.18.0-beta.1", "bn.js": "^5.1.2", "memoizee": "^0.4.14", "rxjs": "^6.6.0" }, "devDependencies": { - "@polkadot/keyring": "^2.17.1" + "@polkadot/keyring": "^2.18.0-beta.1" } } diff --git a/packages/api/package.json b/packages/api/package.json index 8301d7b1e3..bbc63c9ec6 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -28,19 +28,19 @@ "dependencies": { "@babel/runtime": "^7.10.4", "@polkadot/api-derive": "1.23.1", - "@polkadot/keyring": "^2.17.1", + "@polkadot/keyring": "^2.18.0-beta.1", "@polkadot/metadata": "1.23.1", "@polkadot/rpc-core": "1.23.1", "@polkadot/rpc-provider": "1.23.1", "@polkadot/types": "1.23.1", "@polkadot/types-known": "1.23.1", - "@polkadot/util": "^2.17.1", - "@polkadot/util-crypto": "^2.17.1", + "@polkadot/util": "^2.18.0-beta.1", + "@polkadot/util-crypto": "^2.18.0-beta.1", "bn.js": "^5.1.2", "eventemitter3": "^4.0.4", "rxjs": "^6.6.0" }, "devDependencies": { - "@polkadot/keyring": "^2.17.1" + "@polkadot/keyring": "^2.18.0-beta.1" } } diff --git a/packages/metadata/package.json b/packages/metadata/package.json index c94160bd19..f47e89e2bb 100644 --- a/packages/metadata/package.json +++ b/packages/metadata/package.json @@ -29,11 +29,11 @@ "@babel/runtime": "^7.10.4", "@polkadot/types": "1.23.1", "@polkadot/types-known": "1.23.1", - "@polkadot/util": "^2.17.1", - "@polkadot/util-crypto": "^2.17.1", + "@polkadot/util": "^2.18.0-beta.1", + "@polkadot/util-crypto": "^2.18.0-beta.1", "bn.js": "^5.1.2" }, "devDependencies": { - "@polkadot/keyring": "^2.17.1" + "@polkadot/keyring": "^2.18.0-beta.1" } } diff --git a/packages/rpc-core/package.json b/packages/rpc-core/package.json index 8ea2aad9e7..c73c77252f 100644 --- a/packages/rpc-core/package.json +++ b/packages/rpc-core/package.json @@ -30,11 +30,11 @@ "@polkadot/metadata": "1.23.1", "@polkadot/rpc-provider": "1.23.1", "@polkadot/types": "1.23.1", - "@polkadot/util": "^2.17.1", + "@polkadot/util": "^2.18.0-beta.1", "memoizee": "^0.4.14", "rxjs": "^6.6.0" }, "devDependencies": { - "@polkadot/keyring": "^2.17.1" + "@polkadot/keyring": "^2.18.0-beta.1" } } diff --git a/packages/rpc-provider/package.json b/packages/rpc-provider/package.json index d113c4d494..f3dfb9574b 100644 --- a/packages/rpc-provider/package.json +++ b/packages/rpc-provider/package.json @@ -29,15 +29,15 @@ "@babel/runtime": "^7.10.4", "@polkadot/metadata": "1.23.1", "@polkadot/types": "1.23.1", - "@polkadot/util": "^2.17.1", - "@polkadot/util-crypto": "^2.17.1", + "@polkadot/util": "^2.18.0-beta.1", + "@polkadot/util-crypto": "^2.18.0-beta.1", "bn.js": "^5.1.2", "eventemitter3": "^4.0.4", "isomorphic-fetch": "^2.2.1", "websocket": "^1.0.31" }, "devDependencies": { - "@polkadot/keyring": "^2.17.1", + "@polkadot/keyring": "^2.18.0-beta.1", "mock-socket": "^9.0.3", "nock": "^13.0.2" } diff --git a/packages/typegen/package.json b/packages/typegen/package.json index 18857750ba..6772e36506 100644 --- a/packages/typegen/package.json +++ b/packages/typegen/package.json @@ -40,13 +40,13 @@ "@polkadot/metadata": "1.23.1", "@polkadot/rpc-provider": "1.23.1", "@polkadot/types": "1.23.1", - "@polkadot/util": "^2.17.1", + "@polkadot/util": "^2.18.0-beta.1", "handlebars": "^4.7.6", "websocket": "^1.0.31", "yargs": "^15.4.0" }, "devDependencies": { - "@types/websocket": "^1.0.0", + "@types/websocket": "^1.0.1", "@types/yargs": "^15.0.5" } } diff --git a/packages/types-known/package.json b/packages/types-known/package.json index 8859330d71..748778e81f 100644 --- a/packages/types-known/package.json +++ b/packages/types-known/package.json @@ -28,7 +28,7 @@ "dependencies": { "@babel/runtime": "^7.10.4", "@polkadot/types": "1.23.1", - "@polkadot/util": "^2.17.1", + "@polkadot/util": "^2.18.0-beta.1", "bn.js": "^5.1.2" }, "devDependencies": { diff --git a/packages/types/package.json b/packages/types/package.json index 6a757070ca..b696f369fe 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -28,15 +28,15 @@ "dependencies": { "@babel/runtime": "^7.10.4", "@polkadot/metadata": "1.23.1", - "@polkadot/util": "^2.17.1", - "@polkadot/util-crypto": "^2.17.1", + "@polkadot/util": "^2.18.0-beta.1", + "@polkadot/util-crypto": "^2.18.0-beta.1", "@types/bn.js": "^4.11.6", "bn.js": "^5.1.2", "memoizee": "^0.4.14", "rxjs": "^6.6.0" }, "devDependencies": { - "@polkadot/keyring": "^2.17.1", + "@polkadot/keyring": "^2.18.0-beta.1", "@types/memoizee": "^0.4.4" } } diff --git a/packages/types/src/codec/Raw.spec.ts b/packages/types/src/codec/Raw.spec.ts index 265ba2606b..b69c3ce3a8 100644 --- a/packages/types/src/codec/Raw.spec.ts +++ b/packages/types/src/codec/Raw.spec.ts @@ -23,7 +23,7 @@ const testEncode = (to: CodecTo, expected: any): void => expect(e[to]()).toEqual(expected); }); -describe('U8a', (): void => { +describe('Raw', (): void => { let u8a: Raw; beforeEach((): void => { @@ -74,5 +74,15 @@ describe('U8a', (): void => { it('compares against hex inputs', (): void => { expect(u8a.eq('0x0102030405')).toBe(true); }); + + it('has valid isAscii', (): void => { + expect(u8a.isAscii).toBe(false); + expect(new Raw(registry, '0x2021222324').isAscii).toBe(true); + }); + + it('has valid toUtf8', (): void => { + expect(new Raw(registry, 'Приветствую, ми').toUtf8()).toEqual('Приветствую, ми'); + expect(new Raw(registry, '0xe4bda0e5a5bd').toUtf8()).toEqual('你好'); + }); }); }); diff --git a/packages/types/src/codec/Raw.ts b/packages/types/src/codec/Raw.ts index 8eef2f88e5..59d1f05cc8 100644 --- a/packages/types/src/codec/Raw.ts +++ b/packages/types/src/codec/Raw.ts @@ -5,7 +5,7 @@ import { H256 } from '../interfaces/runtime'; import { AnyJson, AnyU8a, IU8a, Registry } from '../types'; -import { isU8a, isUndefined, u8aToHex, u8aToU8a } from '@polkadot/util'; +import { isAscii, isU8a, isUndefined, u8aToHex, u8aToString, u8aToU8a } from '@polkadot/util'; import { blake2AsU8a } from '@polkadot/util-crypto'; /** @internal */ @@ -49,11 +49,18 @@ export default class Raw extends Uint8Array implements IU8a { return new Raw(this.registry, blake2AsU8a(this.toU8a(), 256)); } + /** + * @description Returns true if the wrapped value contains only ASCII printable characters + */ + public get isAscii (): boolean { + return isAscii(this); + } + /** * @description Returns true if the type wraps an empty/default all-0 value */ public get isEmpty (): boolean { - return !this.length || isUndefined(this.find((value): boolean => !!value)); + return !this.length || isUndefined(this.find((value) => !!value)); } /** @@ -77,7 +84,7 @@ export default class Raw extends Uint8Array implements IU8a { public eq (other?: unknown): boolean { if (other instanceof Uint8Array) { return (this.length === other.length) && - !this.some((value, index): boolean => value !== other[index]); + !this.some((value, index) => value !== other[index]); } return this.eq(decodeU8a(other)); @@ -135,4 +142,11 @@ export default class Raw extends Uint8Array implements IU8a { public toU8a (isBare?: boolean): Uint8Array { return Uint8Array.from(this); } + + /** + * @description Returns the wrapped data as a UTF-8 string + */ + public toUtf8 (): string { + return u8aToString(this); + } } diff --git a/yarn.lock b/yarn.lock index 814f464ce1..a6c6f95f82 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2672,7 +2672,7 @@ __metadata: "@polkadot/api": 1.23.1 "@polkadot/rpc-core": 1.23.1 "@polkadot/types": 1.23.1 - "@polkadot/util": ^2.17.1 + "@polkadot/util": ^2.18.0-beta.1 bn.js: ^5.1.2 rxjs: ^6.6.0 languageName: unknown @@ -2684,12 +2684,12 @@ __metadata: dependencies: "@babel/runtime": ^7.10.4 "@polkadot/api": 1.23.1 - "@polkadot/keyring": ^2.17.1 + "@polkadot/keyring": ^2.18.0-beta.1 "@polkadot/rpc-core": 1.23.1 "@polkadot/rpc-provider": 1.23.1 "@polkadot/types": 1.23.1 - "@polkadot/util": ^2.17.1 - "@polkadot/util-crypto": ^2.17.1 + "@polkadot/util": ^2.18.0-beta.1 + "@polkadot/util-crypto": ^2.18.0-beta.1 bn.js: ^5.1.2 memoizee: ^0.4.14 rxjs: ^6.6.0 @@ -2702,23 +2702,23 @@ __metadata: dependencies: "@babel/runtime": ^7.10.4 "@polkadot/api-derive": 1.23.1 - "@polkadot/keyring": ^2.17.1 + "@polkadot/keyring": ^2.18.0-beta.1 "@polkadot/metadata": 1.23.1 "@polkadot/rpc-core": 1.23.1 "@polkadot/rpc-provider": 1.23.1 "@polkadot/types": 1.23.1 "@polkadot/types-known": 1.23.1 - "@polkadot/util": ^2.17.1 - "@polkadot/util-crypto": ^2.17.1 + "@polkadot/util": ^2.18.0-beta.1 + "@polkadot/util-crypto": ^2.18.0-beta.1 bn.js: ^5.1.2 eventemitter3: ^4.0.4 rxjs: ^6.6.0 languageName: unknown linkType: soft -"@polkadot/dev@npm:^0.55.20": - version: 0.55.20 - resolution: "@polkadot/dev@npm:0.55.20" +"@polkadot/dev@npm:^0.55.21": + version: 0.55.21 + resolution: "@polkadot/dev@npm:0.55.21" dependencies: "@babel/cli": ^7.10.4 "@babel/core": ^7.10.4 @@ -2740,8 +2740,8 @@ __metadata: "@babel/preset-typescript": ^7.10.4 "@babel/register": ^7.10.4 "@babel/runtime": ^7.10.4 - "@typescript-eslint/eslint-plugin": 3.5.0 - "@typescript-eslint/parser": 3.5.0 + "@typescript-eslint/eslint-plugin": 3.6.0 + "@typescript-eslint/parser": 3.6.0 "@vue/component-compiler-utils": ^3.1.2 babel-core: ^7.0.0-bridge.0 babel-jest: ^26.1.0 @@ -2758,7 +2758,7 @@ __metadata: eslint-plugin-node: ^11.1.0 eslint-plugin-promise: ^4.2.1 eslint-plugin-react: ^7.20.3 - eslint-plugin-react-hooks: ^4.0.5 + eslint-plugin-react-hooks: ^4.0.6 eslint-plugin-sort-destructure-keys: ^1.3.5 eslint-plugin-standard: ^4.0.1 fs-extra: ^9.0.1 @@ -2801,18 +2801,18 @@ __metadata: polkadot-exec-typedoc: scripts/polkadot-exec-typedoc.js polkadot-exec-vuepress: scripts/polkadot-exec-vuepress.js polkadot-exec-webpack: scripts/polkadot-exec-webpack.js - checksum: 3/6cf7767a27f96be988064b43071898f9216e1ddedfc1de3d5c7dc4f4f0dddc2091de4127b15837ec572d3adaf4e29046e5c4704958fb73af9fd5a18761a2ca1f + checksum: 3/14d6ac5059faa517cacc4a5d22885af2f35af3645ed4bc958d3a2fd59d02b2723df29800145e067e4bb162f1ec1deab0ff24d41cabdf5e55cf9d3ea3b21d2487 languageName: node linkType: hard -"@polkadot/keyring@npm:^2.17.1": - version: 2.17.1 - resolution: "@polkadot/keyring@npm:2.17.1" +"@polkadot/keyring@npm:^2.18.0-beta.1": + version: 2.18.0-beta.1 + resolution: "@polkadot/keyring@npm:2.18.0-beta.1" dependencies: "@babel/runtime": ^7.10.4 - "@polkadot/util": 2.17.1 - "@polkadot/util-crypto": 2.17.1 - checksum: 3/636829230fea0c1ccf008727fc99deeedbfbfb70525b739cc7b01e22b6a00431654d63f34fa435bdf9379c8ccc53fb2a513c981ebf8996744e16c4aba2302a83 + "@polkadot/util": 2.18.0-beta.1 + "@polkadot/util-crypto": 2.18.0-beta.1 + checksum: 3/0711442b7d6169a4bb87adbc48b24519d99385de9680a9ff2e0179b6ec8e9cf874ff2d243b7e22d7b17e63285b913c91b2cb1f4e1e074af4bee2b3a633cbc46a languageName: node linkType: hard @@ -2821,11 +2821,11 @@ __metadata: resolution: "@polkadot/metadata@workspace:packages/metadata" dependencies: "@babel/runtime": ^7.10.4 - "@polkadot/keyring": ^2.17.1 + "@polkadot/keyring": ^2.18.0-beta.1 "@polkadot/types": 1.23.1 "@polkadot/types-known": 1.23.1 - "@polkadot/util": ^2.17.1 - "@polkadot/util-crypto": ^2.17.1 + "@polkadot/util": ^2.18.0-beta.1 + "@polkadot/util-crypto": ^2.18.0-beta.1 bn.js: ^5.1.2 languageName: unknown linkType: soft @@ -2835,11 +2835,11 @@ __metadata: resolution: "@polkadot/rpc-core@workspace:packages/rpc-core" dependencies: "@babel/runtime": ^7.10.4 - "@polkadot/keyring": ^2.17.1 + "@polkadot/keyring": ^2.18.0-beta.1 "@polkadot/metadata": 1.23.1 "@polkadot/rpc-provider": 1.23.1 "@polkadot/types": 1.23.1 - "@polkadot/util": ^2.17.1 + "@polkadot/util": ^2.18.0-beta.1 memoizee: ^0.4.14 rxjs: ^6.6.0 languageName: unknown @@ -2850,11 +2850,11 @@ __metadata: resolution: "@polkadot/rpc-provider@workspace:packages/rpc-provider" dependencies: "@babel/runtime": ^7.10.4 - "@polkadot/keyring": ^2.17.1 + "@polkadot/keyring": ^2.18.0-beta.1 "@polkadot/metadata": 1.23.1 "@polkadot/types": 1.23.1 - "@polkadot/util": ^2.17.1 - "@polkadot/util-crypto": ^2.17.1 + "@polkadot/util": ^2.18.0-beta.1 + "@polkadot/util-crypto": ^2.18.0-beta.1 bn.js: ^5.1.2 eventemitter3: ^4.0.4 isomorphic-fetch: ^2.2.1 @@ -2884,8 +2884,8 @@ __metadata: "@polkadot/metadata": 1.23.1 "@polkadot/rpc-provider": 1.23.1 "@polkadot/types": 1.23.1 - "@polkadot/util": ^2.17.1 - "@types/websocket": ^1.0.0 + "@polkadot/util": ^2.18.0-beta.1 + "@types/websocket": ^1.0.1 "@types/yargs": ^15.0.5 handlebars: ^4.7.6 websocket: ^1.0.31 @@ -2905,7 +2905,7 @@ __metadata: dependencies: "@babel/runtime": ^7.10.4 "@polkadot/types": 1.23.1 - "@polkadot/util": ^2.17.1 + "@polkadot/util": ^2.18.0-beta.1 "@types/bn.js": ^4.11.6 bn.js: ^5.1.2 languageName: unknown @@ -2916,10 +2916,10 @@ __metadata: resolution: "@polkadot/types@workspace:packages/types" dependencies: "@babel/runtime": ^7.10.4 - "@polkadot/keyring": ^2.17.1 + "@polkadot/keyring": ^2.18.0-beta.1 "@polkadot/metadata": 1.23.1 - "@polkadot/util": ^2.17.1 - "@polkadot/util-crypto": ^2.17.1 + "@polkadot/util": ^2.18.0-beta.1 + "@polkadot/util-crypto": ^2.18.0-beta.1 "@types/bn.js": ^4.11.6 "@types/memoizee": ^0.4.4 bn.js: ^5.1.2 @@ -2928,12 +2928,12 @@ __metadata: languageName: unknown linkType: soft -"@polkadot/util-crypto@npm:2.17.1, @polkadot/util-crypto@npm:^2.17.1": - version: 2.17.1 - resolution: "@polkadot/util-crypto@npm:2.17.1" +"@polkadot/util-crypto@npm:2.18.0-beta.1, @polkadot/util-crypto@npm:^2.18.0-beta.1": + version: 2.18.0-beta.1 + resolution: "@polkadot/util-crypto@npm:2.18.0-beta.1" dependencies: "@babel/runtime": ^7.10.4 - "@polkadot/util": 2.17.1 + "@polkadot/util": 2.18.0-beta.1 "@polkadot/wasm-crypto": ^1.2.1 base-x: ^3.0.8 bip39: ^3.0.2 @@ -2944,13 +2944,13 @@ __metadata: pbkdf2: ^3.1.1 tweetnacl: ^1.0.3 xxhashjs: ^0.2.2 - checksum: 3/f449ad30f118b63e4765b2203d1edf502140d593d484ba5a19bccda4882b5cd22a4ac4dbfd0ae4abd4bed8c6af28338e23e18a3156f0b4181d508d5d38db6c18 + checksum: 3/e22aafdcd1bdbb6aa209882c2186dcfbd256c91434cab443d2c2c4266138bc343c921c17f8a0575126db30f6367f29c1ab2c3505a81f7a4c44d1bf408de16d0c languageName: node linkType: hard -"@polkadot/util@npm:2.17.1, @polkadot/util@npm:^2.17.1": - version: 2.17.1 - resolution: "@polkadot/util@npm:2.17.1" +"@polkadot/util@npm:2.18.0-beta.1, @polkadot/util@npm:^2.18.0-beta.1": + version: 2.18.0-beta.1 + resolution: "@polkadot/util@npm:2.18.0-beta.1" dependencies: "@babel/runtime": ^7.10.4 "@types/bn.js": ^4.11.6 @@ -2958,7 +2958,7 @@ __metadata: camelcase: ^5.3.1 chalk: ^4.1.0 ip-regex: ^4.1.0 - checksum: 3/f9931c167890bf416d7d253340acee337523685b72bb32b5c4ae3c3e7dd108de620e8c198f75daa91b83791e29bc37ba323300afc810f24118d7ead841a75b9d + checksum: 3/8ecd8e4c32433d5f6d7a3f482342d457a16fd92cbf4ac4a827d93cface5223fcb08551f77d18c94524ad217753c20c75cb9e2a939ea8985d923471c93179c8e4 languageName: node linkType: hard @@ -3038,11 +3038,11 @@ __metadata: linkType: hard "@types/babel__traverse@npm:*, @types/babel__traverse@npm:^7.0.6": - version: 7.0.12 - resolution: "@types/babel__traverse@npm:7.0.12" + version: 7.0.13 + resolution: "@types/babel__traverse@npm:7.0.13" dependencies: "@babel/types": ^7.3.0 - checksum: 3/b59b0c196d7b37966b49471b517bbbe227705ba6a939d4a9d30a9667dd9aae8683bf2abf17ebdf6791a118da461d90fbc1c044f0c0a71271e17ae1d3b8dc05d7 + checksum: 3/25d3cf96fcae3755d2d79ee5f696df56eba082cfc424a0b9d190dfad5c8e9167d1a4e2abbcb00bc5cd39853e4d638457caf894549ff583679dcb1b18b6a6ebc5 languageName: node linkType: hard @@ -3096,12 +3096,12 @@ __metadata: linkType: hard "@types/glob@npm:^7.1.1": - version: 7.1.2 - resolution: "@types/glob@npm:7.1.2" + version: 7.1.3 + resolution: "@types/glob@npm:7.1.3" dependencies: "@types/minimatch": "*" "@types/node": "*" - checksum: 3/28bc8b1c10b141173c0d8f287729e727bd864c652c8887fd471b2841de5227b08757a13dd7090133e915cd0e1753800cb69cb251525171972140655c390737b3 + checksum: 3/633bf1dda9a30899b233ed6b97c75cdd59f2ee856a12240c85474ce6889e26b3b3520b62de56f6bb61824af0ef51b311a0cae305f27ba0de8ddc4898a3673d42 languageName: node linkType: hard @@ -3147,13 +3147,13 @@ __metadata: languageName: node linkType: hard -"@types/jest@npm:^26.0.3": - version: 26.0.3 - resolution: "@types/jest@npm:26.0.3" +"@types/jest@npm:^26.0.4": + version: 26.0.4 + resolution: "@types/jest@npm:26.0.4" dependencies: jest-diff: ^25.2.1 pretty-format: ^25.2.1 - checksum: 3/8a8a98865cce9d454bc0b5332e9caa5d7cfb3f9f608dfb355c12a5e5eb14ce0626854329d5046015098dcb5fb022cf9fe18c5ad72d7b4563ad3f44ad1ab84050 + checksum: 3/f815792ecc2191410bf541740b834bafb608b9a5be0b77b21770d8728e87b2bdd55843999bc9236ebd027e11a4cabbec90da7612fb9a620cf8bd858ae3774bd2 languageName: node linkType: hard @@ -3202,9 +3202,9 @@ __metadata: linkType: hard "@types/node@npm:*, @types/node@npm:>= 8": - version: 14.0.14 - resolution: "@types/node@npm:14.0.14" - checksum: 3/0a2072aa7de32e6535ce6bc7383965fc0a4b7bbf6d76f69027db72e86381921c820a8a2173f75fa210d9fb3286c707079d3804ef33c76a065bcb890858e50ee9 + version: 14.0.19 + resolution: "@types/node@npm:14.0.19" + checksum: 3/a744f848984b947032acd53161bf33da3df6db60c108b0316b15b7349e14be95d80e281cedd3af4fd3a2679bcab8a77d003241aa24e6e0b745c07223fb9817fa languageName: node linkType: hard @@ -3223,9 +3223,9 @@ __metadata: linkType: hard "@types/prettier@npm:^2.0.0": - version: 2.0.1 - resolution: "@types/prettier@npm:2.0.1" - checksum: 3/fba408d98574b9790446bd5d5f1200a1baf164beea676eaad139320a1d1cdf54f2e411a865b253fc75fbadd1a096bb7eacbf13083fa7d26785e98dca57932b47 + version: 2.0.2 + resolution: "@types/prettier@npm:2.0.2" + checksum: 3/f661ba2c6312724a9513e63891c668cba33547e259e28ddca97c8107a9d5094aab51b4dd83e17fc8fa37e69c7ac6f2c447b8da36a7e579abf8b804c1e0593767 languageName: node linkType: hard @@ -3252,12 +3252,12 @@ __metadata: languageName: node linkType: hard -"@types/websocket@npm:^1.0.0": - version: 1.0.0 - resolution: "@types/websocket@npm:1.0.0" +"@types/websocket@npm:^1.0.1": + version: 1.0.1 + resolution: "@types/websocket@npm:1.0.1" dependencies: "@types/node": "*" - checksum: 3/98d274504cf59160144e2e8189d7338f74ea0c288ba56e926e62d023855b37bd16a3cbe97b502cad814e7d5018163c836d559bbd2e5b29e7443e194cac47cdca + checksum: 3/93d407970a6487290f8bace3b6de40d6f35f092386e5fba8981c3cb5ee60b155da419ab98007a3991c4a2e27eee948c5f98786a13619359b42a4a04aaf7bdf27 languageName: node linkType: hard @@ -3277,11 +3277,11 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/eslint-plugin@npm:3.5.0": - version: 3.5.0 - resolution: "@typescript-eslint/eslint-plugin@npm:3.5.0" +"@typescript-eslint/eslint-plugin@npm:3.6.0": + version: 3.6.0 + resolution: "@typescript-eslint/eslint-plugin@npm:3.6.0" dependencies: - "@typescript-eslint/experimental-utils": 3.5.0 + "@typescript-eslint/experimental-utils": 3.6.0 debug: ^4.1.1 functional-red-black-tree: ^1.0.1 regexpp: ^3.0.0 @@ -3294,33 +3294,33 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 3/a95bb4484833ca0d433a66cb9dc24b11d36333746d1c01f3def414b752284b7b06d66cb22d22f82484dd2a0725af621f039c28303ed846f3b453e1a39f121e3b + checksum: 3/e20dfe9b849216b64bb97dc63fb82dc8f3b2afd87d4548cf45606ea2fc897c175f1c5f8971801053ac2c761fc2483c3732ac884ca6d1b6bfea70cf589b8366ed languageName: node linkType: hard -"@typescript-eslint/experimental-utils@npm:3.5.0": - version: 3.5.0 - resolution: "@typescript-eslint/experimental-utils@npm:3.5.0" +"@typescript-eslint/experimental-utils@npm:3.6.0": + version: 3.6.0 + resolution: "@typescript-eslint/experimental-utils@npm:3.6.0" dependencies: "@types/json-schema": ^7.0.3 - "@typescript-eslint/types": 3.5.0 - "@typescript-eslint/typescript-estree": 3.5.0 + "@typescript-eslint/types": 3.6.0 + "@typescript-eslint/typescript-estree": 3.6.0 eslint-scope: ^5.0.0 eslint-utils: ^2.0.0 peerDependencies: eslint: "*" - checksum: 3/2366fa0765c16f79e9c3c6659e7e3551462f4670e043a8a52b1a7f0bf780912151c86dd06e6ac98954ec1ba5a33b8f97a4f01471cf1d04d6470c9aab387d3226 + checksum: 3/472e776263cb4b10066bbd938cc56957461d45bccb8043329295acfbec4f4603919cabc6389ae3805d2fe0ab1c3d258b079cb4315c01cce91b0becc7a7e9d67b languageName: node linkType: hard -"@typescript-eslint/parser@npm:3.5.0": - version: 3.5.0 - resolution: "@typescript-eslint/parser@npm:3.5.0" +"@typescript-eslint/parser@npm:3.6.0": + version: 3.6.0 + resolution: "@typescript-eslint/parser@npm:3.6.0" dependencies: "@types/eslint-visitor-keys": ^1.0.0 - "@typescript-eslint/experimental-utils": 3.5.0 - "@typescript-eslint/types": 3.5.0 - "@typescript-eslint/typescript-estree": 3.5.0 + "@typescript-eslint/experimental-utils": 3.6.0 + "@typescript-eslint/types": 3.6.0 + "@typescript-eslint/typescript-estree": 3.6.0 eslint-visitor-keys: ^1.1.0 peerDependencies: eslint: ^5.0.0 || ^6.0.0 || ^7.0.0 @@ -3328,23 +3328,23 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 3/559013ca760695a820e9ad808c3c61567ab800b1d604c4dea47069d560b89bfc74568efb2af649b1da8d74ab87753212cdfd8ea918a4b7722e8581a4bd31fd01 + checksum: 3/df547aa5bfecb2d820eb4ab9e1d40e909cd469d42ed2ff40d2f18909545c358e49baa6cdfaaa4d4f213167fdf56e9354d3169d2de2534e00f439d721d447ddb2 languageName: node linkType: hard -"@typescript-eslint/types@npm:3.5.0": - version: 3.5.0 - resolution: "@typescript-eslint/types@npm:3.5.0" - checksum: 3/c4c9edbbbc5affdae2e7a92fea5ed4f1e414dffab52d34901bb74b38bec7caa79003f8c339c88931f77d7e16f28ce9b2cc11db2aef22bb4cf138254bdaec7958 +"@typescript-eslint/types@npm:3.6.0": + version: 3.6.0 + resolution: "@typescript-eslint/types@npm:3.6.0" + checksum: 3/2da9710a8cf1afc02ca80788f29e2644f609b67ffaedc0bafc7afb88fd63445e44c115f6661ee1e596b74aa4bb0221b645f2cd254303b2ed08171ee94cfc5af3 languageName: node linkType: hard -"@typescript-eslint/typescript-estree@npm:3.5.0": - version: 3.5.0 - resolution: "@typescript-eslint/typescript-estree@npm:3.5.0" +"@typescript-eslint/typescript-estree@npm:3.6.0": + version: 3.6.0 + resolution: "@typescript-eslint/typescript-estree@npm:3.6.0" dependencies: - "@typescript-eslint/types": 3.5.0 - "@typescript-eslint/visitor-keys": 3.5.0 + "@typescript-eslint/types": 3.6.0 + "@typescript-eslint/visitor-keys": 3.6.0 debug: ^4.1.1 glob: ^7.1.6 is-glob: ^4.0.1 @@ -3356,7 +3356,7 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 3/649b40515a15030c6b6060e7137627c64bd9a2b3b4ea04403044ca07e563cd2cba989b696b65fbe08228bc5fe46adfd1d9ea55dfeb1ce695c1e0529306d82b59 + checksum: 3/9e5a854af797b54248b27ef116a57e05625c8987f2bf5c43fefccf8ba7d4fe09b6c2699637b46fdc7b4d2b6d56c930c65137c875ff89ecb47abaa60e0a7065a6 languageName: node linkType: hard @@ -3380,12 +3380,12 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/visitor-keys@npm:3.5.0": - version: 3.5.0 - resolution: "@typescript-eslint/visitor-keys@npm:3.5.0" +"@typescript-eslint/visitor-keys@npm:3.6.0": + version: 3.6.0 + resolution: "@typescript-eslint/visitor-keys@npm:3.6.0" dependencies: eslint-visitor-keys: ^1.1.0 - checksum: 3/64042963f3724f7c3793da5573c3cf1162a5fa035f9137381d12fe45e6c63d75f0800950bae7234d0324512628dc5f7ea2c798f281fafff35f0cbc3172838526 + checksum: 3/2dc08e0a57dc24c44418de31c6b2db0669a92ac5ac728b9fe6e7641e649ec7f5a19c5ea0718b928239b964ee290aa12331c0915b55a4d330c0a69427ff878206 languageName: node linkType: hard @@ -4007,11 +4007,11 @@ __metadata: linkType: hard "ajv-keywords@npm:^3.1.0, ajv-keywords@npm:^3.4.1": - version: 3.5.0 - resolution: "ajv-keywords@npm:3.5.0" + version: 3.5.1 + resolution: "ajv-keywords@npm:3.5.1" peerDependencies: ajv: ^6.9.1 - checksum: 3/8e1823247156cea3169366299eb9e71b3f89e8b8c26e8a3157873613686bacc949743a84a9348cc20d090eccf8190332b5dae89dc79495f2170d9f6fc5bd2df8 + checksum: 3/f91a8a5304d1f314f5ec1429c9bd895964df50eb8455430ce51d79d38fd2ed63e807dbd1966eb759ac25c06b32485ccc8a2735145836ce01fffe13859c449ea0 languageName: node linkType: hard @@ -5385,9 +5385,9 @@ __metadata: linkType: hard "caniuse-lite@npm:^1.0.0, caniuse-lite@npm:^1.0.30001087, caniuse-lite@npm:^1.0.30001093": - version: 1.0.30001094 - resolution: "caniuse-lite@npm:1.0.30001094" - checksum: 3/7b3ee77fda7b03fd613f39098452eecba004345c511779ed242393c06e45c9540dbb7deb9b21fc7a355ae6d8194e014395630d9a11172749f02f355a71665213 + version: 1.0.30001096 + resolution: "caniuse-lite@npm:1.0.30001096" + checksum: 3/bf50f7386388f40740a8f4be9c3bf26875792817ce40e2781c78bb1665587cce234c9d0df17c95a94114195371a39f69c09b5097563061586a0428443e0aeb3e languageName: node linkType: hard @@ -7467,9 +7467,9 @@ __metadata: linkType: hard "electron-to-chromium@npm:^1.3.488": - version: 1.3.488 - resolution: "electron-to-chromium@npm:1.3.488" - checksum: 3/55f9f86483a2ba998b128de2f659a09ebe0ff46ac3518ebe948306999bfeab7567a1e40111ba65251ee84198dee575c6970ce4e91a59182ee923eb5234cc39ac + version: 1.3.492 + resolution: "electron-to-chromium@npm:1.3.492" + checksum: 3/8f219e5cbdb7ef479ed4c97e94a19a01466b79345e37b24e4fe6466e8e0ce089454d0b056763efdb5fc07fd8b59afc75683486597512de75c231609160b4bbc0 languageName: node linkType: hard @@ -7881,12 +7881,12 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-react-hooks@npm:^4.0.5": - version: 4.0.5 - resolution: "eslint-plugin-react-hooks@npm:4.0.5" +"eslint-plugin-react-hooks@npm:^4.0.6": + version: 4.0.6 + resolution: "eslint-plugin-react-hooks@npm:4.0.6" peerDependencies: eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 - checksum: 3/2a84a814963f1e829eaa097638219a85971cbb7ff6e73bcba75d7dde77796717a9a4454b82aa8616a8fd8d8a89537efaa034a7146dfac3fe371c8e91f63deeda + checksum: 3/bd240d6e1a82884c9386e190dc3a7157bcfdb660543624bf57d73261cc47c8814e6cc5f5886eaad4e414d7138602a08dcc08eacee8a3b8cfba2418280c8a3a60 languageName: node linkType: hard @@ -8176,8 +8176,8 @@ __metadata: linkType: hard "execa@npm:^4.0.0": - version: 4.0.2 - resolution: "execa@npm:4.0.2" + version: 4.0.3 + resolution: "execa@npm:4.0.3" dependencies: cross-spawn: ^7.0.0 get-stream: ^5.0.0 @@ -8188,7 +8188,7 @@ __metadata: onetime: ^5.1.0 signal-exit: ^3.0.2 strip-final-newline: ^2.0.0 - checksum: 3/c48f3d6a044daa1bb5d93486e1c8eee12a8724b439b7f8c270c556a37cf7e2ffd528a86d2ef08adcbe78b485956cfca56c6027ec15d8370bef959097b9ba23ba + checksum: 3/65b237d178b468045ee57af6aa4e4124807b28aec9573d9b3b16b02a7e41bd65996236e0c5575d053d3888585ffc795cbed38847c6c9669e9c8481fc44ac05e4 languageName: node linkType: hard @@ -12124,9 +12124,9 @@ __metadata: linkType: hard "lodash@npm:^4.17.11, lodash@npm:^4.17.12, lodash@npm:^4.17.13, lodash@npm:^4.17.14, lodash@npm:^4.17.15, lodash@npm:^4.17.3, lodash@npm:^4.17.5, lodash@npm:^4.2.1": - version: 4.17.15 - resolution: "lodash@npm:4.17.15" - checksum: 3/aec3fbb7570aa67bda500b8299b1b1821d60646bede87f76a74dfcc7666ab3445267d734ec71424d70809d52ad67a1356fab5ab694a3faa1908d68e9d48f00f5 + version: 4.17.17 + resolution: "lodash@npm:4.17.17" + checksum: 3/875f66e67ed0f7833029cefab14a1d6c08491782b53fe09aa542fe091710a78208abe6e7e5951db770b5a9009faffec3563908fbbf47401eb513bc88d6e06905 languageName: node linkType: hard @@ -16108,10 +16108,10 @@ __metadata: "@babel/core": ^7.10.4 "@babel/register": ^7.10.4 "@babel/runtime": ^7.10.4 - "@polkadot/dev": ^0.55.20 + "@polkadot/dev": ^0.55.21 "@polkadot/ts": ^0.3.27 "@polkadot/typegen": "workspace:packages/typegen" - "@types/jest": ^26.0.3 + "@types/jest": ^26.0.4 "@vuepress/plugin-search": ^1.5.2 copyfiles: ^2.3.0 languageName: unknown