From cba21939bce145e1750033fd979da7c9ee683fe8 Mon Sep 17 00:00:00 2001 From: Dave M Date: Thu, 3 Jan 2019 10:57:44 -0800 Subject: [PATCH 1/3] chore(dep-update): Updating code style of ReferenceGrid --- .../neo-one-website/src/components/reference/ReferenceGrid.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/neo-one-website/src/components/reference/ReferenceGrid.tsx b/packages/neo-one-website/src/components/reference/ReferenceGrid.tsx index 3889aecc89..74362d4b93 100644 --- a/packages/neo-one-website/src/components/reference/ReferenceGrid.tsx +++ b/packages/neo-one-website/src/components/reference/ReferenceGrid.tsx @@ -1,4 +1,3 @@ -// tslint:disable no-any import { Box, TextInput } from '@neo-one/react-common'; import * as React from 'react'; import styled from 'styled-components'; @@ -45,7 +44,7 @@ export const ReferenceGrid = ({ content, ...props }: Props) => { - setTextFilter((event.target as any).value)} /> + setTextFilter(event.target.value)} /> {content From 0302e38a46be4e6529f33294275ee100e7685aec Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Thu, 3 Jan 2019 19:26:19 +0000 Subject: [PATCH 2/3] chore(deps): update dependency tslint-consistent-codestyle to v1.15.0 --- package.json | 2 +- yarn.lock | 32 +++++++++++++++++++------------- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/package.json b/package.json index c6c6d5a238..cb83dbf50d 100644 --- a/package.json +++ b/package.json @@ -240,7 +240,7 @@ "tslint": "5.12.0", "tslint-clean-code": "0.2.9", "tslint-config-prettier": "1.17.0", - "tslint-consistent-codestyle": "1.14.1", + "tslint-consistent-codestyle": "1.15.0", "tslint-immutable": "4.9.1", "tslint-microsoft-contrib": "5.2.1", "tslint-sonarts": "1.8.0", diff --git a/yarn.lock b/yarn.lock index 240269651a..91daa006a1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1360,18 +1360,18 @@ version "0.2.2" resolved "https://registry.yarnpkg.com/@emotion/weak-memoize/-/weak-memoize-0.2.2.tgz#63985d3d8b02530e0869962f4da09142ee8e200e" -"@fimbul/bifrost@^0.15.0": - version "0.15.0" - resolved "https://registry.yarnpkg.com/@fimbul/bifrost/-/bifrost-0.15.0.tgz#f3a48dee3046681e926c1f970f0b1a67e29e088e" +"@fimbul/bifrost@^0.17.0": + version "0.17.0" + resolved "https://registry.yarnpkg.com/@fimbul/bifrost/-/bifrost-0.17.0.tgz#f0383ba7e40992e3193dc87e2ddfde2ad62a9cf4" dependencies: - "@fimbul/ymir" "^0.15.0" + "@fimbul/ymir" "^0.17.0" get-caller-file "^2.0.0" tslib "^1.8.1" - tsutils "^3.1.0" + tsutils "^3.5.0" -"@fimbul/ymir@^0.15.0": - version "0.15.0" - resolved "https://registry.yarnpkg.com/@fimbul/ymir/-/ymir-0.15.0.tgz#944c881b14fadf7b43d1ae00b445e42261bb407f" +"@fimbul/ymir@^0.17.0": + version "0.17.0" + resolved "https://registry.yarnpkg.com/@fimbul/ymir/-/ymir-0.17.0.tgz#4f28389b9f804d1cd202e11983af1743488b7815" dependencies: inversify "^5.0.0" reflect-metadata "^0.1.12" @@ -18268,11 +18268,11 @@ tslint-config-prettier@1.17.0: version "1.17.0" resolved "https://registry.yarnpkg.com/tslint-config-prettier/-/tslint-config-prettier-1.17.0.tgz#946ed6117f98f3659a65848279156d87628c33dc" -tslint-consistent-codestyle@1.14.1: - version "1.14.1" - resolved "https://registry.yarnpkg.com/tslint-consistent-codestyle/-/tslint-consistent-codestyle-1.14.1.tgz#8555f1b05ccbf093166a73347f41eb101731a522" +tslint-consistent-codestyle@1.15.0: + version "1.15.0" + resolved "https://registry.yarnpkg.com/tslint-consistent-codestyle/-/tslint-consistent-codestyle-1.15.0.tgz#a3acf8d0a3ca0dc7d1285705102ba1fe4a17c4cb" dependencies: - "@fimbul/bifrost" "^0.15.0" + "@fimbul/bifrost" "^0.17.0" tslib "^1.7.1" tsutils "^2.29.0" @@ -18327,12 +18327,18 @@ tsutils@^2.27.2, tsutils@^2.29.0: dependencies: tslib "^1.8.1" -tsutils@^3.0.0, tsutils@^3.1.0: +tsutils@^3.0.0: version "3.5.0" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.5.0.tgz#42602f7df241e753a2105cc3627a664abf11f745" dependencies: tslib "^1.8.1" +tsutils@^3.5.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.6.0.tgz#33fc3ddb74abf5bba10789acd03eee6ea96c839c" + dependencies: + tslib "^1.8.1" + tty-browserify@0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" From 4693ce9db7e47dd44b3f9c76b478b5914a6cb4cc Mon Sep 17 00:00:00 2001 From: afragapane Date: Mon, 17 Dec 2018 12:42:12 -0700 Subject: [PATCH 3/3] docs(Reference): Give object parameters a name if they will be included in the docs. With dgeni typescript parsing, function parameters display awkwardly if they are unnamed objects. Giving them a name like "options" fixes the issue and displays them properly. #702 --- packages/neo-one-client-common/src/helpers.ts | 13 +++++-------- .../src/provider/NEOONEOneDataProvider.ts | 9 ++------- .../src/provider/NEOONEProvider.ts | 3 ++- .../src/user/LocalUserAccountProvider.ts | 3 ++- 4 files changed, 11 insertions(+), 17 deletions(-) diff --git a/packages/neo-one-client-common/src/helpers.ts b/packages/neo-one-client-common/src/helpers.ts index 119b692056..e8c30936d4 100644 --- a/packages/neo-one-client-common/src/helpers.ts +++ b/packages/neo-one-client-common/src/helpers.ts @@ -123,13 +123,12 @@ export function isNEP2(encryptedKey: string): boolean { * @param privateKey hex-encoded private key * @returns NEP-2 format encrypted key */ -export async function encryptNEP2({ - password, - privateKey, -}: { +export async function encryptNEP2(options: { readonly password: string; readonly privateKey: PrivateKeyString; }): Promise { + const { password, privateKey } = options; + return crypto.encryptNEP2({ addressVersion: common.NEO_ADDRESS_VERSION, privateKey: common.stringToPrivateKey(privateKey), @@ -144,13 +143,11 @@ export async function encryptNEP2({ * @param encryptedKey NEP-2 format encrypted key * @returns hex-encoded private key */ -export async function decryptNEP2({ - password, - encryptedKey, -}: { +export async function decryptNEP2(options: { readonly password: string; readonly encryptedKey: string; }): Promise { + const { password, encryptedKey } = options; const privateKey = await crypto.decryptNEP2({ addressVersion: common.NEO_ADDRESS_VERSION, encryptedKey, diff --git a/packages/neo-one-client-core/src/provider/NEOONEOneDataProvider.ts b/packages/neo-one-client-core/src/provider/NEOONEOneDataProvider.ts index 11746efc1a..db149d0780 100644 --- a/packages/neo-one-client-core/src/provider/NEOONEOneDataProvider.ts +++ b/packages/neo-one-client-core/src/provider/NEOONEOneDataProvider.ts @@ -50,13 +50,8 @@ export class NEOONEOneDataProvider implements DeveloperProvider { private readonly iterBlocksFetchTimeoutMS: number | undefined; private readonly iterBlocksBatchSize: number | undefined; - public constructor({ - network, - projectID, - port, - iterBlocksFetchTimeoutMS, - iterBlocksBatchSize, - }: NEOONEOneDataProviderOptions) { + public constructor(options: NEOONEOneDataProviderOptions) { + const { network, projectID, port, iterBlocksFetchTimeoutMS, iterBlocksBatchSize } = options; this.network = network; this.projectID = projectID; this.port = port; diff --git a/packages/neo-one-client-core/src/provider/NEOONEProvider.ts b/packages/neo-one-client-core/src/provider/NEOONEProvider.ts index 122842210b..e712be15b5 100644 --- a/packages/neo-one-client-core/src/provider/NEOONEProvider.ts +++ b/packages/neo-one-client-core/src/provider/NEOONEProvider.ts @@ -58,7 +58,8 @@ export class NEOONEProvider implements Provider { return this.networksInternal$.getValue(); } - public addNetwork({ network, rpcURL }: { readonly network: NetworkType; readonly rpcURL: string }): void { + public addNetwork(options: { readonly network: NetworkType; readonly rpcURL: string }): void { + const { network, rpcURL } = options; this.mutableProviders[network] = new NEOONEDataProvider({ network, rpcURL }); const networks = this.networksInternal$.value.filter((net) => network !== net).concat([network]); this.networksInternal$.next(networks); diff --git a/packages/neo-one-client-core/src/user/LocalUserAccountProvider.ts b/packages/neo-one-client-core/src/user/LocalUserAccountProvider.ts index c92f78c604..a442ba7b1b 100644 --- a/packages/neo-one-client-core/src/user/LocalUserAccountProvider.ts +++ b/packages/neo-one-client-core/src/user/LocalUserAccountProvider.ts @@ -222,7 +222,8 @@ export class LocalUserAccountProvider; protected mutableBlockCount: number; - public constructor({ keystore, provider }: { readonly keystore: TKeyStore; readonly provider: TProvider }) { + public constructor(constructorOptions: { readonly keystore: TKeyStore; readonly provider: TProvider }) { + const { keystore, provider } = constructorOptions; this.keystore = keystore; this.provider = provider;