From e407df662e8810ec679a7f9bb42efc98226d640d Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Wed, 27 Jun 2018 11:52:21 +0200 Subject: [PATCH 1/3] Add TSLint --- package.json | 4 +- packages/api-format/package.json | 8 +- packages/api-format/src/input.ts | 4 +- packages/api-format/src/output.ts | 6 +- packages/api-provider/package.json | 8 +- packages/api-provider/src/http/index.ts | 2 +- packages/api-provider/src/http/polyfill.ts | 1 + packages/api-provider/src/http/send.ts | 2 +- packages/api-provider/src/http/subscribe.ts | 2 +- packages/api-provider/src/mock/mocks.ts | 8 +- packages/api-provider/src/mock/state.ts | 2 +- packages/api-provider/src/ws/index.ts | 2 +- packages/api-provider/src/ws/on.ts | 2 +- packages/api-provider/src/ws/onClose.ts | 2 +- packages/api-provider/src/ws/onOpen.ts | 2 +- packages/api-provider/src/ws/polyfill.ts | 1 + packages/api-provider/src/ws/state.ts | 2 +- packages/api-provider/test/e2e.test.ts | 1 + packages/api-provider/test/mockWs.ts | 19 +- packages/api/package.json | 6 +- tslint.json | 3 + yarn.lock | 247 ++++++++++++-------- 22 files changed, 204 insertions(+), 130 deletions(-) create mode 100644 tslint.json diff --git a/package.json b/package.json index dea32bc3432f..12d2ece63b38 100644 --- a/package.json +++ b/package.json @@ -10,13 +10,13 @@ ], "scripts": { "build": "polkadot-dev-build-ts", - "check": "tsc --noEmit", + "check": "tslint --project . && tsc --noEmit", "clean": "polkadot-dev-clean-build", "postinstall": "polkadot-dev-yarn-only", "test": "jest --coverage" }, "devDependencies": { - "@polkadot/dev": "^0.20.7", + "@polkadot/dev": "^0.20.8", "@polkadot/ts": "^0.1.3" } } diff --git a/packages/api-format/package.json b/packages/api-format/package.json index d38ce86bdef2..758d2356e387 100644 --- a/packages/api-format/package.json +++ b/packages/api-format/package.json @@ -35,9 +35,9 @@ }, "dependencies": { "@babel/runtime": "^7.0.0-beta.51", - "@polkadot/jsonrpc": "^0.20.3", - "@polkadot/primitives-json": "^0.20.3", - "@polkadot/util": "^0.24.9", - "@polkadot/util-keyring": "^0.24.9" + "@polkadot/jsonrpc": "^0.26.5", + "@polkadot/primitives": "^0.26.5", + "@polkadot/util": "^0.26.5", + "@polkadot/util-keyring": "^0.26.5" } } diff --git a/packages/api-format/src/input.ts b/packages/api-format/src/input.ts index db1ad3d7dd1c..6501907da380 100644 --- a/packages/api-format/src/input.ts +++ b/packages/api-format/src/input.ts @@ -6,8 +6,8 @@ import { Params, Param$Types } from '@polkadot/params/types'; import { FormatterFunction } from './types'; import addressDecode from '@polkadot/util-keyring/address/decode'; -import bytesEncode from '@polkadot/primitives-json/bytes/encode'; -import hashEncode from '@polkadot/primitives-json/hash/encode'; +import bytesEncode from '@polkadot/primitives/json/bytes/encode'; +import hashEncode from '@polkadot/primitives/json/hash/encode'; import format from './format'; diff --git a/packages/api-format/src/output.ts b/packages/api-format/src/output.ts index 2c40d35a0c12..c22305cc5ba5 100644 --- a/packages/api-format/src/output.ts +++ b/packages/api-format/src/output.ts @@ -6,9 +6,9 @@ import { Param$Types } from '@polkadot/params/types'; import { FormatterFunction } from './types'; import addressEncode from '@polkadot/util-keyring/address/encode'; -import bnDecode from '@polkadot/primitives-json/bn/decode'; -import bytesDecode from '@polkadot/primitives-json/bytes/decode'; -import headerDecode from '@polkadot/primitives-json/header/decode'; +import bnDecode from '@polkadot/primitives/json/bn/decode'; +import bytesDecode from '@polkadot/primitives/json/bytes/decode'; +import headerDecode from '@polkadot/primitives/json/header/decode'; import isNull from '@polkadot/util/is/null'; import isUndefined from '@polkadot/util/is/undefined'; diff --git a/packages/api-provider/package.json b/packages/api-provider/package.json index c16ce51dab95..a0382e5723cf 100644 --- a/packages/api-provider/package.json +++ b/packages/api-provider/package.json @@ -39,10 +39,10 @@ }, "dependencies": { "@babel/runtime": "^7.0.0-beta.51", - "@polkadot/storage": "^0.20.3", - "@polkadot/util": "^0.24.9", - "@polkadot/util-crypto": "^0.24.9", - "@polkadot/util-keyring": "^0.24.9", + "@polkadot/storage": "^0.26.5", + "@polkadot/util": "^0.26.5", + "@polkadot/util-crypto": "^0.26.5", + "@polkadot/util-keyring": "^0.26.5", "@types/nock": "^9.1.3", "eventemitter3": "^2.0.3", "isomorphic-fetch": "^2.2.1", diff --git a/packages/api-provider/src/http/index.ts b/packages/api-provider/src/http/index.ts index d01341e29a87..0261029ea028 100644 --- a/packages/api-provider/src/http/index.ts +++ b/packages/api-provider/src/http/index.ts @@ -27,4 +27,4 @@ export default function httpProvider (endpoint: string): ProviderInterface { unsubscribe: (method: string, id: number): Promise => unsubscribe(self, method, id) }; -}; +} diff --git a/packages/api-provider/src/http/polyfill.ts b/packages/api-provider/src/http/polyfill.ts index d5c449ab1dde..55cfc6015b0e 100644 --- a/packages/api-provider/src/http/polyfill.ts +++ b/packages/api-provider/src/http/polyfill.ts @@ -2,6 +2,7 @@ // This software may be modified and distributed under the terms // of the ISC license. See the LICENSE file for details. +// tslint:disable-next-line if (typeof fetch === 'undefined') { require('isomorphic-fetch'); } diff --git a/packages/api-provider/src/http/send.ts b/packages/api-provider/src/http/send.ts index 8a8a760f8613..57be65d98ee2 100644 --- a/packages/api-provider/src/http/send.ts +++ b/packages/api-provider/src/http/send.ts @@ -23,4 +23,4 @@ export default async function send ({ coder, endpoint }: HttpState, method: stri const result = await response.json(); return coder.decodeResponse(result); -}; +} diff --git a/packages/api-provider/src/http/subscribe.ts b/packages/api-provider/src/http/subscribe.ts index a1d4715c2397..747ee22aeb85 100644 --- a/packages/api-provider/src/http/subscribe.ts +++ b/packages/api-provider/src/http/subscribe.ts @@ -7,4 +7,4 @@ import { HttpState } from './types'; export default async function subscribe (self: HttpState, method: string, params: Array, cb: ProviderInterface$Callback): Promise { throw new Error('Subscriptions has not been implemented'); -}; +} diff --git a/packages/api-provider/src/mock/mocks.ts b/packages/api-provider/src/mock/mocks.ts index 7dae4774b7cc..53043eaeea93 100644 --- a/packages/api-provider/src/mock/mocks.ts +++ b/packages/api-provider/src/mock/mocks.ts @@ -8,10 +8,10 @@ import { Storages } from '@polkadot/storage/types'; import { SectionItem } from '@polkadot/params/types'; import { KeyringPair } from '@polkadot/util-keyring/types'; import { ProviderInterface$Emitted } from '../types'; -import { MockState, MockState$Storage, MockState$Subscriptions, MockState$Subscription$Callback } from './types'; +import { MockState, MockState$Storage, MockState$Subscriptions } from './types'; import BN from 'bn.js'; -import headerEncode from '@polkadot/primitives-json/header/encode'; +import headerEncode from '@polkadot/primitives/json/header/encode'; import createKey from '@polkadot/storage/key'; import state from '@polkadot/storage'; import bnToU8a from '@polkadot/util/bn/toU8a'; @@ -50,7 +50,7 @@ function updateSubs (subscriptions: MockState$Subscriptions, method: string, val .values(subscriptions[method].callbacks) .forEach((cb) => { try { - (cb as MockState$Subscription$Callback)(null, value); + cb(null, value); } catch (error) { console.error(`Error on '${method}' subscription`, error); } @@ -86,4 +86,4 @@ export default function mocks ({ emitter, storage, subscriptions }: MockState): updateSubs(subscriptions, 'subscribe_newHead', headerEncode(newHead)); }, 5000); -}; +} diff --git a/packages/api-provider/src/mock/state.ts b/packages/api-provider/src/mock/state.ts index be57d6670095..e11f7ed4b13f 100644 --- a/packages/api-provider/src/mock/state.ts +++ b/packages/api-provider/src/mock/state.ts @@ -9,7 +9,7 @@ import interfaces from '@polkadot/jsonrpc'; import u8aToHex from '@polkadot/util/u8a/toHex'; import logger from '@polkadot/util/logger'; -const l =logger('api-mock'); +const l = logger('api-mock'); const SUBSCRIPTIONS: string[] = Array.prototype.concat.apply( [], Object.values(interfaces).map((area) => diff --git a/packages/api-provider/src/ws/index.ts b/packages/api-provider/src/ws/index.ts index 1dbcffa544ad..c30d564d3599 100644 --- a/packages/api-provider/src/ws/index.ts +++ b/packages/api-provider/src/ws/index.ts @@ -15,7 +15,7 @@ import unsubscribe from './unsubscribe'; type WSProviderInterface = ProviderInterface & { connect (): void -} +}; export default function wsProvider (endpoint: string, autoConnect: boolean = true): WSProviderInterface { const self = state(endpoint, autoConnect); diff --git a/packages/api-provider/src/ws/on.ts b/packages/api-provider/src/ws/on.ts index 5194c4b2ec1f..8bc009015dbf 100644 --- a/packages/api-provider/src/ws/on.ts +++ b/packages/api-provider/src/ws/on.ts @@ -7,4 +7,4 @@ import { WsState } from './types'; export default function on (self: WsState, type: ProviderInterface$Emitted, sub: ProviderInterface$EmitCb): void { self.emitter.on(type, sub); -}; +} diff --git a/packages/api-provider/src/ws/onClose.ts b/packages/api-provider/src/ws/onClose.ts index ab0180511169..675cf1424f73 100644 --- a/packages/api-provider/src/ws/onClose.ts +++ b/packages/api-provider/src/ws/onClose.ts @@ -19,4 +19,4 @@ export default function onClose (self: WsState): () => void { }, 1000); } }; -}; +} diff --git a/packages/api-provider/src/ws/onOpen.ts b/packages/api-provider/src/ws/onOpen.ts index 4de1b3447d65..953808ebcf17 100644 --- a/packages/api-provider/src/ws/onOpen.ts +++ b/packages/api-provider/src/ws/onOpen.ts @@ -31,4 +31,4 @@ export default function onOpen (self: WsState): () => boolean { return true; }; -}; +} diff --git a/packages/api-provider/src/ws/polyfill.ts b/packages/api-provider/src/ws/polyfill.ts index c2e3e6c91514..e606563fbab1 100644 --- a/packages/api-provider/src/ws/polyfill.ts +++ b/packages/api-provider/src/ws/polyfill.ts @@ -2,6 +2,7 @@ // This software may be modified and distributed under the terms // of the ISC license. See the LICENSE file for details. +// tslint:disable-next-line if (typeof WebSocket === 'undefined') { // @ts-ignore global.WebSocket = require('websocket').w3cwebsocket; diff --git a/packages/api-provider/src/ws/state.ts b/packages/api-provider/src/ws/state.ts index 4301778068f3..a320dca25863 100644 --- a/packages/api-provider/src/ws/state.ts +++ b/packages/api-provider/src/ws/state.ts @@ -27,4 +27,4 @@ export default function state (endpoint: string, autoConnect: boolean): WsState subscriptions: {}, websocket: null }; -}; +} diff --git a/packages/api-provider/test/e2e.test.ts b/packages/api-provider/test/e2e.test.ts index e5efee058f03..d4c167159fa2 100644 --- a/packages/api-provider/test/e2e.test.ts +++ b/packages/api-provider/test/e2e.test.ts @@ -18,6 +18,7 @@ describe.skip('e2e', () => { it('subscribes to client_newHead', (done) => { let count = 0; + // tslint:disable-next-line api.chain .newHead((error: Error | null, data: any) => { console.log('newHead: result =', [error, data]); diff --git a/packages/api-provider/test/mockWs.ts b/packages/api-provider/test/mockWs.ts index db720bea5e6e..ffdafa35a215 100644 --- a/packages/api-provider/test/mockWs.ts +++ b/packages/api-provider/test/mockWs.ts @@ -8,7 +8,22 @@ const TEST_WS_URL = 'ws://localhost:9955'; let server: Server; -function createError ({ id, error: { code, message } }: { id: number, error: { code: number, message: string } }) { +type ErrorDef = { + id: number, + error: { + code: number, + message: string + } +}; + +type ReplyDef = { + id: number, + reply: { + result: any + } +}; + +function createError ({ id, error: { code, message } }: ErrorDef) { return { id, jsonrpc: '2.0', @@ -19,7 +34,7 @@ function createError ({ id, error: { code, message } }: { id: number, error: { c }; } -function createReply ({ id, reply: { result } }: { id: number, reply: { result: any }}) { +function createReply ({ id, reply: { result } }: ReplyDef) { return { id, jsonrpc: '2.0', diff --git a/packages/api/package.json b/packages/api/package.json index 691f88101f1c..f9ea33245500 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -37,8 +37,8 @@ "@babel/runtime": "^7.0.0-beta.51", "@polkadot/api-format": "^0.14.8", "@polkadot/api-provider": "^0.14.8", - "@polkadot/jsonrpc": "^0.20.3", - "@polkadot/params": "^0.20.3", - "@polkadot/util": "^0.24.9" + "@polkadot/jsonrpc": "^0.26.5", + "@polkadot/params": "^0.26.5", + "@polkadot/util": "^0.26.5" } } diff --git a/tslint.json b/tslint.json new file mode 100644 index 000000000000..c16776a164b2 --- /dev/null +++ b/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "@polkadot/dev/config/tslint" +} diff --git a/yarn.lock b/yarn.lock index fb306fbca561..e77eedaf9670 100644 --- a/yarn.lock +++ b/yarn.lock @@ -691,9 +691,9 @@ lodash "^4.17.5" to-fast-properties "^2.0.0" -"@polkadot/dev@^0.20.7": - version "0.20.7" - resolved "https://registry.yarnpkg.com/@polkadot/dev/-/dev-0.20.7.tgz#d62daacb0bc66bd5eee464ecc7524cf33ff2c929" +"@polkadot/dev@^0.20.8": + version "0.20.8" + resolved "https://registry.yarnpkg.com/@polkadot/dev/-/dev-0.20.8.tgz#48d96f5b8c9b16c3abb94fa0df25705b48055bba" dependencies: "@babel/cli" "^7.0.0-beta.51" "@babel/core" "^7.0.0-beta.51" @@ -732,139 +732,111 @@ mkdirp "^0.5.1" ncp "^2.0.0" rimraf "^2.6.2" + tslint "^5.10.0" + tslint-config-semistandard "^7.0.0" typescript "^2.9.2" -"@polkadot/extrinsics-codec@^0.20.3": - version "0.20.3" - resolved "https://registry.yarnpkg.com/@polkadot/extrinsics-codec/-/extrinsics-codec-0.20.3.tgz#38d92a0df016dbabef06cf2f7717516047434c76" +"@polkadot/extrinsics@^0.26.5": + version "0.26.5" + resolved "https://registry.yarnpkg.com/@polkadot/extrinsics/-/extrinsics-0.26.5.tgz#e280a4c7700a956c9dd3554f1b3d4c14c8d45eb0" dependencies: "@babel/runtime" "^7.0.0-beta.51" - "@polkadot/extrinsics" "^0.20.3" - "@polkadot/params" "^0.20.3" - "@polkadot/util" "^0.24.9" - "@polkadot/util-keyring" "^0.24.9" - bn.js "^4.11.8" - -"@polkadot/extrinsics@^0.20.3": - version "0.20.3" - resolved "https://registry.yarnpkg.com/@polkadot/extrinsics/-/extrinsics-0.20.3.tgz#31c511a6ef0fc40a4156f235888f5d178543d6f1" - dependencies: - "@babel/runtime" "^7.0.0-beta.51" - "@polkadot/params" "^0.20.3" - "@polkadot/primitives" "^0.20.3" - "@polkadot/util" "^0.24.9" + "@polkadot/params" "^0.26.5" + "@polkadot/primitives" "^0.26.5" + "@polkadot/util" "^0.26.5" -"@polkadot/jsonrpc@^0.20.3": - version "0.20.3" - resolved "https://registry.yarnpkg.com/@polkadot/jsonrpc/-/jsonrpc-0.20.3.tgz#48f48e2bdac7d1a4c316b580c9b000333d12c1b7" +"@polkadot/jsonrpc@^0.26.5": + version "0.26.5" + resolved "https://registry.yarnpkg.com/@polkadot/jsonrpc/-/jsonrpc-0.26.5.tgz#093cfb07edcabe3469938511047819099a395cfd" dependencies: - "@polkadot/params" "^0.20.3" + "@polkadot/params" "^0.26.5" babel-runtime "^6.26.0" -"@polkadot/params@^0.20.3": - version "0.20.3" - resolved "https://registry.yarnpkg.com/@polkadot/params/-/params-0.20.3.tgz#9322a6f78ca11976b3bf6aad20e3dc869d8e8324" - dependencies: - "@babel/runtime" "^7.0.0-beta.51" - "@polkadot/extrinsics" "^0.20.3" - "@polkadot/extrinsics-codec" "^0.20.3" - "@polkadot/primitives" "^0.20.3" - "@polkadot/util" "^0.24.9" - -"@polkadot/primitives-builder@^0.20.3": - version "0.20.3" - resolved "https://registry.yarnpkg.com/@polkadot/primitives-builder/-/primitives-builder-0.20.3.tgz#71f48d1c2135e5fb4aa55f565bc813887e2e2e70" +"@polkadot/params@^0.26.5": + version "0.26.5" + resolved "https://registry.yarnpkg.com/@polkadot/params/-/params-0.26.5.tgz#4b7c716099d8abb5d46d39d5ffc7898629ffe368" dependencies: "@babel/runtime" "^7.0.0-beta.51" - "@polkadot/extrinsics-codec" "^0.20.3" - "@polkadot/primitives" "^0.20.3" - "@polkadot/primitives-codec" "^0.20.3" - "@polkadot/util" "^0.24.9" - "@polkadot/util-crypto" "^0.24.9" - "@polkadot/util-triehash" "^0.24.9" + "@polkadot/extrinsics" "^0.26.5" + "@polkadot/primitives" "^0.26.5" + "@polkadot/util" "^0.26.5" -"@polkadot/primitives-codec@^0.20.3": - version "0.20.3" - resolved "https://registry.yarnpkg.com/@polkadot/primitives-codec/-/primitives-codec-0.20.3.tgz#fa89820999490cc351a6b2bedbd67bc33340ef52" +"@polkadot/primitives@^0.26.5": + version "0.26.5" + resolved "https://registry.yarnpkg.com/@polkadot/primitives/-/primitives-0.26.5.tgz#07f9be2bf9fb5f8a04bd6e4bbc43b6099d83eff9" dependencies: "@babel/runtime" "^7.0.0-beta.51" - "@polkadot/primitives" "^0.20.3" - "@polkadot/primitives-builder" "^0.20.3" - "@polkadot/util" "^0.24.9" - "@polkadot/util-crypto" "^0.24.9" - "@polkadot/util-keyring" "^0.24.9" + "@polkadot/trie-hash" "^0.26.5" + "@polkadot/util" "^0.26.5" -"@polkadot/primitives-json@^0.20.3": - version "0.20.3" - resolved "https://registry.yarnpkg.com/@polkadot/primitives-json/-/primitives-json-0.20.3.tgz#3c262aed11670268e228f03d74b850da1444c2c9" +"@polkadot/storage@^0.26.5": + version "0.26.5" + resolved "https://registry.yarnpkg.com/@polkadot/storage/-/storage-0.26.5.tgz#af582749ce6e0b5e1f0ef7a28a79f2a2ec2f8e58" dependencies: "@babel/runtime" "^7.0.0-beta.51" - "@polkadot/primitives" "^0.20.3" - "@polkadot/primitives-builder" "^0.20.3" - "@polkadot/util" "^0.24.9" + "@polkadot/params" "^0.26.5" + "@polkadot/primitives" "^0.26.5" + "@polkadot/util" "^0.26.5" + "@polkadot/util-crypto" "^0.26.5" + "@polkadot/util-keyring" "^0.26.5" -"@polkadot/primitives@^0.20.3": - version "0.20.3" - resolved "https://registry.yarnpkg.com/@polkadot/primitives/-/primitives-0.20.3.tgz#c3bc7a84f32a452d7bd5f1e291f6526582a4f8e9" +"@polkadot/trie-hash@^0.26.5": + version "0.26.5" + resolved "https://registry.yarnpkg.com/@polkadot/trie-hash/-/trie-hash-0.26.5.tgz#1f0a36f6597cb663cf8a82f77880f8233adb5c1e" dependencies: "@babel/runtime" "^7.0.0-beta.51" - "@polkadot/util" "^0.24.9" - -"@polkadot/storage@^0.20.3": - version "0.20.3" - resolved "https://registry.yarnpkg.com/@polkadot/storage/-/storage-0.20.3.tgz#4f18fc0a195325752f6baf2484134a2cdb3b208f" - dependencies: - "@babel/runtime" "^7.0.0-beta.51" - "@polkadot/params" "^0.20.3" - "@polkadot/primitives" "^0.20.3" - "@polkadot/util" "^0.24.9" - "@polkadot/util-crypto" "^0.24.9" - "@polkadot/util-keyring" "^0.24.9" + "@polkadot/util" "^0.26.5" + "@polkadot/util-crypto" "^0.26.5" + "@polkadot/util-rlp" "^0.26.5" "@polkadot/ts@^0.1.3": version "0.1.3" resolved "https://registry.yarnpkg.com/@polkadot/ts/-/ts-0.1.3.tgz#e277fb89c43a64b244a6d1ae03fc4ede128b155d" -"@polkadot/util-crypto@^0.24.9": - version "0.24.9" - resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-0.24.9.tgz#7764703ec817ab4977d7afcfa7de838dcd64f36f" +"@polkadot/util-crypto@^0.26.5": + version "0.26.5" + resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-0.26.5.tgz#a621f2f2f76619932d657677b3c484c27e48972b" dependencies: "@babel/runtime" "^7.0.0-beta.51" - "@polkadot/util" "^0.24.9" + "@polkadot/util" "^0.26.5" blakejs "^1.1.0" js-sha3 "^0.7.0" tweetnacl "^1.0.0" xxhashjs "^0.2.2" -"@polkadot/util-keyring@^0.24.9": - version "0.24.9" - resolved "https://registry.yarnpkg.com/@polkadot/util-keyring/-/util-keyring-0.24.9.tgz#daf1fc4adc7e4963ffab4f605730f0011d827716" +"@polkadot/util-keyring@^0.26.5": + version "0.26.5" + resolved "https://registry.yarnpkg.com/@polkadot/util-keyring/-/util-keyring-0.26.5.tgz#b4992edf408ac6bdf88c997be503bec8f8a25a04" dependencies: "@babel/runtime" "^7.0.0-beta.51" - "@polkadot/util" "^0.24.9" - "@polkadot/util-crypto" "^0.24.9" + "@polkadot/util" "^0.26.5" + "@polkadot/util-crypto" "^0.26.5" "@types/bs58" "^3.0.30" bs58 "^4.0.1" -"@polkadot/util-rlp@^0.24.9": - version "0.24.9" - resolved "https://registry.yarnpkg.com/@polkadot/util-rlp/-/util-rlp-0.24.9.tgz#8ac9a472ae4b8206cedc82f473de3c6b2afa512f" +"@polkadot/util-rlp@^0.26.5": + version "0.25.1" + resolved "https://registry.yarnpkg.com/@polkadot/util-rlp/-/util-rlp-0.25.1.tgz#138da3400e909e03aaee54ee74b4f1d8bec22804" dependencies: "@babel/runtime" "^7.0.0-beta.51" - "@polkadot/util" "^0.24.9" + "@polkadot/util" "^0.25.1" -"@polkadot/util-triehash@^0.24.9": - version "0.24.9" - resolved "https://registry.yarnpkg.com/@polkadot/util-triehash/-/util-triehash-0.24.9.tgz#59900a171b80ac3ed843329f5cee0ec3b623dfaa" +"@polkadot/util@^0.25.1": + version "0.25.1" + resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-0.25.1.tgz#40cdfd05bd74da5fb82a06dfa45c451545e83e15" dependencies: "@babel/runtime" "^7.0.0-beta.51" - "@polkadot/util" "^0.24.9" - "@polkadot/util-crypto" "^0.24.9" - "@polkadot/util-rlp" "^0.24.9" + "@types/deasync" "^0.1.0" + "@types/ip-regex" "^2.0.0" + "@types/xxhashjs" "^0.1.1" + bn.js "^4.11.8" + chalk "^2.4.1" + deasync "^0.1.13" + ip-regex "^2.1.0" -"@polkadot/util@^0.24.9": - version "0.24.9" - resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-0.24.9.tgz#5eebdd304ebb14baa64904247b1ba27bcc3a6a34" +"@polkadot/util@^0.26.5": + version "0.26.5" + resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-0.26.5.tgz#a426127328afcc8b39ee6ff09b607229ac3cc6ab" dependencies: "@babel/runtime" "^7.0.0-beta.51" "@types/deasync" "^0.1.0" @@ -1552,7 +1524,7 @@ buffer-from@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.0.tgz#87fcaa3a298358e0ade6e442cfce840740d1ad04" -builtin-modules@^1.0.0: +builtin-modules@^1.0.0, builtin-modules@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" @@ -1664,7 +1636,7 @@ chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0: escape-string-regexp "^1.0.5" supports-color "^4.0.0" -chalk@^2.4.1: +chalk@^2.3.0, chalk@^2.4.1: version "2.4.1" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" dependencies: @@ -1817,7 +1789,7 @@ commander@2.9.0, commander@~2.9.0: dependencies: graceful-readlink ">= 1.0.0" -commander@^2.8.1: +commander@^2.12.1, commander@^2.8.1: version "2.15.1" resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f" @@ -2257,6 +2229,13 @@ diff@^3.2.0: version "3.4.0" resolved "https://registry.yarnpkg.com/diff/-/diff-3.4.0.tgz#b1d85507daf3964828de54b37d0d73ba67dda56c" +doctrine@0.7.2, doctrine@^0.7.2: + version "0.7.2" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-0.7.2.tgz#7cb860359ba3be90e040b26b729ce4bfa654c523" + dependencies: + esutils "^1.1.6" + isarray "0.0.1" + doctrine@1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa" @@ -2505,6 +2484,10 @@ estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1, estraverse@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" +esutils@^1.1.6: + version "1.1.6" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-1.1.6.tgz#c01ccaa9ae4b897c6d0c3e210ae52f3c7a844375" + esutils@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" @@ -5960,6 +5943,76 @@ tryit@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/tryit/-/tryit-1.0.3.tgz#393be730a9446fd1ead6da59a014308f36c289cb" +tslib@1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.0.tgz#e37a86fda8cbbaf23a057f473c9f4dc64e5fc2e8" + +tslib@^1.0.0, tslib@^1.7.1, tslib@^1.8.0, tslib@^1.8.1: + version "1.9.3" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286" + +tslint-config-semistandard@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/tslint-config-semistandard/-/tslint-config-semistandard-7.0.0.tgz#c2d3214b6282a4fed07e875dd9f0691be4e832f1" + dependencies: + tslint-config-standard "^7.0.0" + tslint-eslint-rules "^4.1.1" + +tslint-config-standard@^7.0.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/tslint-config-standard/-/tslint-config-standard-7.1.0.tgz#6bcc435a179478e365f6cc62312a561221985760" + dependencies: + tslint-eslint-rules "^5.3.1" + +tslint-eslint-rules@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/tslint-eslint-rules/-/tslint-eslint-rules-4.1.1.tgz#7c30e7882f26bc276bff91d2384975c69daf88ba" + dependencies: + doctrine "^0.7.2" + tslib "^1.0.0" + tsutils "^1.4.0" + +tslint-eslint-rules@^5.3.1: + version "5.3.1" + resolved "https://registry.yarnpkg.com/tslint-eslint-rules/-/tslint-eslint-rules-5.3.1.tgz#10dec4361df0b3e4385d91ff8e0226bda4ec2ad4" + dependencies: + doctrine "0.7.2" + tslib "1.9.0" + tsutils "2.8.0" + +tslint@^5.10.0: + version "5.10.0" + resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.10.0.tgz#11e26bccb88afa02dd0d9956cae3d4540b5f54c3" + dependencies: + babel-code-frame "^6.22.0" + builtin-modules "^1.1.1" + chalk "^2.3.0" + commander "^2.12.1" + diff "^3.2.0" + glob "^7.1.1" + js-yaml "^3.7.0" + minimatch "^3.0.4" + resolve "^1.3.2" + semver "^5.3.0" + tslib "^1.8.0" + tsutils "^2.12.1" + +tsutils@2.8.0: + version "2.8.0" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.8.0.tgz#0160173729b3bf138628dd14a1537e00851d814a" + dependencies: + tslib "^1.7.1" + +tsutils@^1.4.0: + version "1.9.1" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-1.9.1.tgz#b9f9ab44e55af9681831d5f28d0aeeaf5c750cb0" + +tsutils@^2.12.1: + version "2.27.1" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.27.1.tgz#ab0276ac23664f36ce8fd4414daec4aebf4373ee" + dependencies: + tslib "^1.8.1" + tunnel-agent@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" From 5b7123fc49109d2942e8ed0f135fcc31bd2f0bf9 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Wed, 27 Jun 2018 12:17:13 +0200 Subject: [PATCH 2/3] Update dependencies --- yarn.lock | 115 ++++++++++++++++++++++++------------------------------ 1 file changed, 51 insertions(+), 64 deletions(-) diff --git a/yarn.lock b/yarn.lock index e77eedaf9670..97f204d57827 100644 --- a/yarn.lock +++ b/yarn.lock @@ -736,107 +736,94 @@ tslint-config-semistandard "^7.0.0" typescript "^2.9.2" -"@polkadot/extrinsics@^0.26.5": - version "0.26.5" - resolved "https://registry.yarnpkg.com/@polkadot/extrinsics/-/extrinsics-0.26.5.tgz#e280a4c7700a956c9dd3554f1b3d4c14c8d45eb0" +"@polkadot/extrinsics@^0.26.6": + version "0.26.6" + resolved "https://registry.yarnpkg.com/@polkadot/extrinsics/-/extrinsics-0.26.6.tgz#20706a5ad2b153144048e97d2d493fe4d90ea0a3" dependencies: "@babel/runtime" "^7.0.0-beta.51" - "@polkadot/params" "^0.26.5" - "@polkadot/primitives" "^0.26.5" - "@polkadot/util" "^0.26.5" + "@polkadot/params" "^0.26.6" + "@polkadot/primitives" "^0.26.6" + "@polkadot/util" "^0.26.6" -"@polkadot/jsonrpc@^0.26.5": - version "0.26.5" - resolved "https://registry.yarnpkg.com/@polkadot/jsonrpc/-/jsonrpc-0.26.5.tgz#093cfb07edcabe3469938511047819099a395cfd" +"@polkadot/jsonrpc@^0.26.6": + version "0.26.6" + resolved "https://registry.yarnpkg.com/@polkadot/jsonrpc/-/jsonrpc-0.26.6.tgz#e3eedf0175ab754deacdf0ea8a9eb49f901ac744" dependencies: - "@polkadot/params" "^0.26.5" + "@polkadot/params" "^0.26.6" babel-runtime "^6.26.0" -"@polkadot/params@^0.26.5": - version "0.26.5" - resolved "https://registry.yarnpkg.com/@polkadot/params/-/params-0.26.5.tgz#4b7c716099d8abb5d46d39d5ffc7898629ffe368" +"@polkadot/params@^0.26.6": + version "0.26.6" + resolved "https://registry.yarnpkg.com/@polkadot/params/-/params-0.26.6.tgz#7aed34e68bde18fa46a32da9099c2aa25072261e" dependencies: "@babel/runtime" "^7.0.0-beta.51" - "@polkadot/extrinsics" "^0.26.5" - "@polkadot/primitives" "^0.26.5" - "@polkadot/util" "^0.26.5" + "@polkadot/extrinsics" "^0.26.6" + "@polkadot/primitives" "^0.26.6" + "@polkadot/util" "^0.26.6" -"@polkadot/primitives@^0.26.5": - version "0.26.5" - resolved "https://registry.yarnpkg.com/@polkadot/primitives/-/primitives-0.26.5.tgz#07f9be2bf9fb5f8a04bd6e4bbc43b6099d83eff9" +"@polkadot/primitives@^0.26.6": + version "0.26.6" + resolved "https://registry.yarnpkg.com/@polkadot/primitives/-/primitives-0.26.6.tgz#c3ccc7f22846d8e048ab44e2985ff0004f0e5393" dependencies: "@babel/runtime" "^7.0.0-beta.51" - "@polkadot/trie-hash" "^0.26.5" - "@polkadot/util" "^0.26.5" + "@polkadot/trie-hash" "^0.26.6" + "@polkadot/util" "^0.26.6" -"@polkadot/storage@^0.26.5": - version "0.26.5" - resolved "https://registry.yarnpkg.com/@polkadot/storage/-/storage-0.26.5.tgz#af582749ce6e0b5e1f0ef7a28a79f2a2ec2f8e58" +"@polkadot/storage@^0.26.6": + version "0.26.6" + resolved "https://registry.yarnpkg.com/@polkadot/storage/-/storage-0.26.6.tgz#7fc0e7ae54885af8ecf8f26afeeff3e2746ce8c4" dependencies: "@babel/runtime" "^7.0.0-beta.51" - "@polkadot/params" "^0.26.5" - "@polkadot/primitives" "^0.26.5" - "@polkadot/util" "^0.26.5" - "@polkadot/util-crypto" "^0.26.5" - "@polkadot/util-keyring" "^0.26.5" + "@polkadot/params" "^0.26.6" + "@polkadot/primitives" "^0.26.6" + "@polkadot/util" "^0.26.6" + "@polkadot/util-crypto" "^0.26.6" + "@polkadot/util-keyring" "^0.26.6" -"@polkadot/trie-hash@^0.26.5": - version "0.26.5" - resolved "https://registry.yarnpkg.com/@polkadot/trie-hash/-/trie-hash-0.26.5.tgz#1f0a36f6597cb663cf8a82f77880f8233adb5c1e" +"@polkadot/trie-hash@^0.26.6": + version "0.26.6" + resolved "https://registry.yarnpkg.com/@polkadot/trie-hash/-/trie-hash-0.26.6.tgz#5b128c44bd63234bbf871a48c40141022f1d5790" dependencies: "@babel/runtime" "^7.0.0-beta.51" - "@polkadot/util" "^0.26.5" - "@polkadot/util-crypto" "^0.26.5" - "@polkadot/util-rlp" "^0.26.5" + "@polkadot/util" "^0.26.6" + "@polkadot/util-crypto" "^0.26.6" + "@polkadot/util-rlp" "^0.26.6" "@polkadot/ts@^0.1.3": version "0.1.3" resolved "https://registry.yarnpkg.com/@polkadot/ts/-/ts-0.1.3.tgz#e277fb89c43a64b244a6d1ae03fc4ede128b155d" -"@polkadot/util-crypto@^0.26.5": - version "0.26.5" - resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-0.26.5.tgz#a621f2f2f76619932d657677b3c484c27e48972b" +"@polkadot/util-crypto@^0.26.6": + version "0.26.6" + resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-0.26.6.tgz#c7a000066b1ed4ce5dab1ab558833907a9a5d399" dependencies: "@babel/runtime" "^7.0.0-beta.51" - "@polkadot/util" "^0.26.5" + "@polkadot/util" "^0.26.6" blakejs "^1.1.0" js-sha3 "^0.7.0" tweetnacl "^1.0.0" xxhashjs "^0.2.2" -"@polkadot/util-keyring@^0.26.5": - version "0.26.5" - resolved "https://registry.yarnpkg.com/@polkadot/util-keyring/-/util-keyring-0.26.5.tgz#b4992edf408ac6bdf88c997be503bec8f8a25a04" +"@polkadot/util-keyring@^0.26.6": + version "0.26.6" + resolved "https://registry.yarnpkg.com/@polkadot/util-keyring/-/util-keyring-0.26.6.tgz#a7aa5dd8162f469616d9839c872d7ca50d83fd5d" dependencies: "@babel/runtime" "^7.0.0-beta.51" - "@polkadot/util" "^0.26.5" - "@polkadot/util-crypto" "^0.26.5" + "@polkadot/util" "^0.26.6" + "@polkadot/util-crypto" "^0.26.6" "@types/bs58" "^3.0.30" bs58 "^4.0.1" -"@polkadot/util-rlp@^0.26.5": - version "0.25.1" - resolved "https://registry.yarnpkg.com/@polkadot/util-rlp/-/util-rlp-0.25.1.tgz#138da3400e909e03aaee54ee74b4f1d8bec22804" +"@polkadot/util-rlp@^0.26.6": + version "0.26.6" + resolved "https://registry.yarnpkg.com/@polkadot/util-rlp/-/util-rlp-0.26.6.tgz#bc66fc975760e9d5999eb243c66298c2e940ac7f" dependencies: "@babel/runtime" "^7.0.0-beta.51" - "@polkadot/util" "^0.25.1" + "@polkadot/util" "^0.26.6" -"@polkadot/util@^0.25.1": - version "0.25.1" - resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-0.25.1.tgz#40cdfd05bd74da5fb82a06dfa45c451545e83e15" - dependencies: - "@babel/runtime" "^7.0.0-beta.51" - "@types/deasync" "^0.1.0" - "@types/ip-regex" "^2.0.0" - "@types/xxhashjs" "^0.1.1" - bn.js "^4.11.8" - chalk "^2.4.1" - deasync "^0.1.13" - ip-regex "^2.1.0" - -"@polkadot/util@^0.26.5": - version "0.26.5" - resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-0.26.5.tgz#a426127328afcc8b39ee6ff09b607229ac3cc6ab" +"@polkadot/util@^0.26.6": + version "0.26.6" + resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-0.26.6.tgz#0405175f4d9fb39e8e5f9d30b504ea566c1ba42e" dependencies: "@babel/runtime" "^7.0.0-beta.51" "@types/deasync" "^0.1.0" From 5c45769af989830b97522f41fafdf09b59c404d5 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Wed, 27 Jun 2018 12:17:31 +0200 Subject: [PATCH 3/3] Update dependencies --- packages/api-format/package.json | 8 ++++---- packages/api-provider/package.json | 8 ++++---- packages/api/package.json | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/api-format/package.json b/packages/api-format/package.json index 758d2356e387..0ee82efec655 100644 --- a/packages/api-format/package.json +++ b/packages/api-format/package.json @@ -35,9 +35,9 @@ }, "dependencies": { "@babel/runtime": "^7.0.0-beta.51", - "@polkadot/jsonrpc": "^0.26.5", - "@polkadot/primitives": "^0.26.5", - "@polkadot/util": "^0.26.5", - "@polkadot/util-keyring": "^0.26.5" + "@polkadot/jsonrpc": "^0.26.6", + "@polkadot/primitives": "^0.26.6", + "@polkadot/util": "^0.26.6", + "@polkadot/util-keyring": "^0.26.6" } } diff --git a/packages/api-provider/package.json b/packages/api-provider/package.json index a0382e5723cf..2adcc36171da 100644 --- a/packages/api-provider/package.json +++ b/packages/api-provider/package.json @@ -39,10 +39,10 @@ }, "dependencies": { "@babel/runtime": "^7.0.0-beta.51", - "@polkadot/storage": "^0.26.5", - "@polkadot/util": "^0.26.5", - "@polkadot/util-crypto": "^0.26.5", - "@polkadot/util-keyring": "^0.26.5", + "@polkadot/storage": "^0.26.6", + "@polkadot/util": "^0.26.6", + "@polkadot/util-crypto": "^0.26.6", + "@polkadot/util-keyring": "^0.26.6", "@types/nock": "^9.1.3", "eventemitter3": "^2.0.3", "isomorphic-fetch": "^2.2.1", diff --git a/packages/api/package.json b/packages/api/package.json index f9ea33245500..a56d3dc66362 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -37,8 +37,8 @@ "@babel/runtime": "^7.0.0-beta.51", "@polkadot/api-format": "^0.14.8", "@polkadot/api-provider": "^0.14.8", - "@polkadot/jsonrpc": "^0.26.5", - "@polkadot/params": "^0.26.5", - "@polkadot/util": "^0.26.5" + "@polkadot/jsonrpc": "^0.26.6", + "@polkadot/params": "^0.26.6", + "@polkadot/util": "^0.26.6" } }