From c5d1f876efb2fc9c60152198c417c15c704ba070 Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Fri, 30 Nov 2018 11:02:28 +0000 Subject: [PATCH 01/62] added correct parameter types to docs for `sha3` --- docs/_build/html/_sources/web3-utils.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/_build/html/_sources/web3-utils.txt b/docs/_build/html/_sources/web3-utils.txt index f6b0e0f017c..26649862519 100644 --- a/docs/_build/html/_sources/web3-utils.txt +++ b/docs/_build/html/_sources/web3-utils.txt @@ -212,8 +212,8 @@ sha3 .. code-block:: javascript - web3.utils.sha3(string) - web3.utils.keccak256(string) // ALIAS + web3.utils.sha3(mixed) + web3.utils.keccak256(mixed) // ALIAS Will calculate the sha3 of the input. @@ -223,7 +223,7 @@ Will calculate the sha3 of the input. Parameters ---------- -1. ``string`` - ``String``: A string to hash. +1. ``mixed`` - ``String|BN|BigNumber``: A input to hash. ------- Returns From cba01059f212b2737777b5f0d599b1ca8db8ef6f Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Fri, 30 Nov 2018 11:09:17 +0000 Subject: [PATCH 02/62] added new ts dependencies + added `dtslint` --- packages/web3-utils/package.json | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/web3-utils/package.json b/packages/web3-utils/package.json index a330435f0f1..740e55e6e6d 100644 --- a/packages/web3-utils/package.json +++ b/packages/web3-utils/package.json @@ -11,8 +11,10 @@ "scripts": { "build": "rollup -c", "dev": "rollup -c -w", - "test": "jest" + "test": "npm run-script dtslint && jest", + "dtslint": "dtslint types" }, + "types": "types", "dependencies": { "bn.js": "4.11.8", "eth-lib": "0.2.8", @@ -25,5 +27,10 @@ "files": [ "dist", "index.d.ts" - ] + ], + "devDependencies": { + "@types/bn.js": "^4.11.3", + "dtslint": "^0.3.0", + "typescript": "^3.2.1" + } } From 7dc253d33db49774f810f729e220f6f8b6aa54b0 Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Fri, 30 Nov 2018 11:09:42 +0000 Subject: [PATCH 03/62] Removed `types` into folder and resolve some issues flagged --- packages/web3-utils/index.d.ts | 153 ------------------------- packages/web3-utils/types/index.d.ts | 165 +++++++++++++++++++++++++++ 2 files changed, 165 insertions(+), 153 deletions(-) delete mode 100644 packages/web3-utils/index.d.ts create mode 100644 packages/web3-utils/types/index.d.ts diff --git a/packages/web3-utils/index.d.ts b/packages/web3-utils/index.d.ts deleted file mode 100644 index f3fd1b4f0bc..00000000000 --- a/packages/web3-utils/index.d.ts +++ /dev/null @@ -1,153 +0,0 @@ -/* - This file is part of web3.js. - web3.js is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - web3.js is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with web3.js. If not, see . -*/ -/** - * @file index.d.ts - * @author Josh Stevens - * @date 2018 - */ - -import BigNumber from "bn.js"; - -export type Unit = - | "noether" - | "wei" - | "kwei" - | "Kwei" - | "babbage" - | "femtoether" - | "mwei" - | "Mwei" - | "lovelace" - | "picoether" - | "gwei" - | "Gwei" - | "shannon" - | "nanoether" - | "nano" - | "szabo" - | "microether" - | "micro" - | "finney" - | "milliether" - | "milli" - | "ether" - | "kether" - | "grand" - | "mether" - | "gether" - | "tether"; - -export type Mixed = - | string - | number - | BigNumber - | { - type: string; - value: string; - } - | { - t: string; - v: string; - }; - -export type Hex = string | number; - -export declare class BN extends BigNumber { - constructor( - number: number | string | number[] | Buffer | BN, - base?: number | 'hex', - endian?: 'le' | 'be' - ) - super(number, base, endian); - } - -// utils types -export declare function isBN(value: string | number): boolean; -export declare function isBigNumber(value: BigNumber): boolean; -export declare function toBN(number: number | string): BigNumber; -export declare function toTwosComplement(number: number | string | BigNumber): string; -export declare function isAddress(address: string): boolean; -export declare function isHex(hex: Hex): boolean; -export declare function isHexStrict(hex: Hex): boolean; -export declare function asciiToHex(string: string): string; -export declare function hexToAscii(string: string): string; -export declare function toAscii(string: string): string; -export declare function bytesToHex(bytes: number[]): string; -export declare function numberToHex(value: number | string | BigNumber): string; -export declare function checkAddressChecksum(address: string): boolean; -export declare function fromAscii(string: string): string; -export declare function fromDecimal(value: string | number | BigNumber): string; -export declare function fromUtf8(string: string): string; -export declare function fromWei(value: BigNumber, unit?: Unit): BigNumber | string; -export declare function hexToBytes(hex: Hex): number[]; -export declare function hexToNumber(hex: Hex): number; -export declare function hexToNumberString(hex: Hex): string; -export declare function hexToString(hex: Hex): string; -export declare function hexToUtf8(string: string): string; -export declare function keccak256(string: string): string; -export declare function padLeft(string: string, characterAmount: number, sign?: string): string; -export declare function leftPad(string: string, characterAmount: number, sign?: string): string; -export declare function rightPad(string: string, characterAmount: number, sign?: string): string; -export declare function padRight(string: string, characterAmount: number, sign?: string): string; -export declare function sha3(value: Mixed): string; -export declare function randomHex(bytesSize: number): string; -export declare function utf8ToHex(string: string): string; -export declare function stringToHex(string: string): string; -export declare function toChecksumAddress(address: string): string; -export declare function toDecimal(hex: Hex): number; -export declare function toHex(value: Mixed): string; -export declare function toUtf8(string: string): string; -export declare function toWei(value: number | string | BigNumber, unit?: Unit): BigNumber | string; -export declare function isBloom(bloom: string): boolean; -export declare function isTopic(topic: string): boolean; -export declare function _fireError(error: Object, emitter: Object, reject: Function, callback: Function): Object; -export declare function _jsonInterfaceMethodToString(json: Object): string; -export declare function _flattenTypes(includeTuple: boolean, puts: Object): string[]; -export declare function soliditySha3(...val: Mixed[]): string; -export declare function getUnitValue(unit: string): string; -export declare function unitMap(): IUnits; - -// bloom types -export declare function testAddress(bloom: string, address: string): boolean; -export declare function testTopic(bloom: string, topic: string): boolean; - -export interface IUnits { - noether: string; - wei: string; - kwei: string; - Kwei: string; - babbage: string; - femtoether: string; - mwei: string; - Mwei: string; - lovelace: string; - picoether: string; - gwei: string; - Gwei: string; - shannon: string; - nanoether: string; - nano: string; - szabo: string; - microether: string; - micro: string; - finney: string; - milliether: string; - milli: string; - ether: string; - kether: string; - grand: string; - mether: string; - gether: string; - tether: string; -} diff --git a/packages/web3-utils/types/index.d.ts b/packages/web3-utils/types/index.d.ts new file mode 100644 index 00000000000..4f773d29d92 --- /dev/null +++ b/packages/web3-utils/types/index.d.ts @@ -0,0 +1,165 @@ +/* + This file is part of web3.js. + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file index.d.ts + * @author Josh Stevens + * @date 2018 + */ + +import BigNumber from "bn.js"; + +export type Unit = + "noether" + | "wei" + | "kwei" + | "Kwei" + | "babbage" + | "femtoether" + | "mwei" + | "Mwei" + | "lovelace" + | "picoether" + | "gwei" + | "Gwei" + | "shannon" + | "nanoether" + | "nano" + | "szabo" + | "microether" + | "micro" + | "finney" + | "milliether" + | "milli" + | "ether" + | "kether" + | "grand" + | "mether" + | "gether" + | "tether"; + +export type Mixed = + string + | number + | BN + | { + type: string; + value: string; + } + | { + t: string; + v: string | BN | number; + } + | boolean; + +export type Hex = string | number; + +export class BN extends BigNumber { + constructor( + number: number | string | number[] | Buffer | BN, + base?: number | 'hex', + endian?: 'le' | 'be' + ) + super( + number: number | string | number[] | Buffer | BN, + base?: number | 'hex', + endian?: 'le' | 'be' + ): BigNumber; +} + +// utils types +export function isBN(value: string | number): boolean; +export function isBigNumber(value: BN): boolean; +export function toBN(value: number | string): BN; +export function toTwosComplement(value: number | string | BN): string; +export function isAddress(address: string): boolean; +export function isHex(hex: Hex): boolean; +export function isHexStrict(hex: Hex): boolean; +export function asciiToHex(string: string): string; +export function hexToAscii(string: string): string; +export function toAscii(string: string): string; +export function bytesToHex(bytes: number[]): string; +export function numberToHex(value: number | string | BN): string; +export function checkAddressChecksum(address: string): boolean; +export function fromAscii(string: string): string; +export function fromDecimal(value: string | number): string; +export function fromUtf8(string: string): string; +export function fromWei(value: BN, unit?: Unit): BN | string; +export function hexToBytes(hex: Hex): number[]; +export function hexToNumber(hex: Hex): number; +export function hexToNumberString(hex: Hex): string; +export function hexToString(hex: Hex): string; +export function hexToUtf8(string: string): string; +export function keccak256(value: string | BN): string; +export function padLeft(value: string | number, characterAmount: number, sign?: string): string; +export function leftPad(string: string | number, characterAmount: number, sign?: string): string; +export function rightPad(string: string | number, characterAmount: number, sign?: string): string; +export function padRight(string: string | number, characterAmount: number, sign?: string): string; +export function sha3(value: string | BN): string; +export function randomHex(bytesSize: number): string; +export function utf8ToHex(string: string): string; +export function stringToHex(string: string): string; +export function toChecksumAddress(address: string): string; +export function toDecimal(hex: Hex): number; +export function toHex(value: number | string | BN): string; +export function toUtf8(string: string): string; +export function toWei(value: number | string | BN, unit?: Unit): string | BN; +export function isBloom(bloom: string): boolean; +export function isTopic(topic: string): boolean; +export function _fireError(error: fireError | string | Error, emitter: {}, reject: (error: Error) => void, callback: (error: Error) => void): {}; +export function _jsonInterfaceMethodToString(json: {}): string; +export function _flattenTypes(includeTuple: boolean, puts: {}): string[]; +export function soliditySha3(...val: Mixed[]): string; +export function getUnitValue(unit: Unit): string; +export function unitMap(): Units; + +// bloom types +export function testAddress(bloom: string, address: string): boolean; +export function testTopic(bloom: string, topic: string): boolean; + +// interfaces + +export interface fireError { + message: string; + data: string | {} | any[]; +} + +export interface Units { + noether: string; + wei: string; + kwei: string; + Kwei: string; + babbage: string; + femtoether: string; + mwei: string; + Mwei: string; + lovelace: string; + picoether: string; + gwei: string; + Gwei: string; + shannon: string; + nanoether: string; + nano: string; + szabo: string; + microether: string; + micro: string; + finney: string; + milliether: string; + milli: string; + ether: string; + kether: string; + grand: string; + mether: string; + gether: string; + tether: string; +} From 97de83c4e8f291a57d109be6e048784c3e008506 Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Fri, 30 Nov 2018 11:09:49 +0000 Subject: [PATCH 04/62] new package-lock.json --- packages/web3-utils/package-lock.json | 449 +++++++++++++++++++++++++- 1 file changed, 448 insertions(+), 1 deletion(-) diff --git a/packages/web3-utils/package-lock.json b/packages/web3-utils/package-lock.json index 9360c3a5bb5..4259a158a48 100644 --- a/packages/web3-utils/package-lock.json +++ b/packages/web3-utils/package-lock.json @@ -1,12 +1,104 @@ { - "requires": true, + "name": "web3-utils", + "version": "1.0.0-beta.36", "lockfileVersion": 1, + "requires": true, "dependencies": { + "@types/bn.js": { + "version": "4.11.3", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.3.tgz", + "integrity": "sha512-auZ3vEo3UW8tZc9NhF0MTnutKlf+YhsfC3+dwskFcil/EoqqZF60pGuJ2v2Ae1OJTUp3DJnjOJMqrpkmKB904w==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/node": { + "version": "10.12.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.10.tgz", + "integrity": "sha512-8xZEYckCbUVgK8Eg7lf5Iy4COKJ5uXlnIOnePN0WUwSQggy9tolM+tDJf7wMOnT/JT/W9xDYIaYggt3mRV2O5w==", + "dev": true + }, + "@types/parsimmon": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@types/parsimmon/-/parsimmon-1.10.0.tgz", + "integrity": "sha512-bsTIJFVQv7jnvNiC42ld2pQW2KRI+pAG243L+iATvqzy3X6+NH1obz2itRKDZZ8VVhN3wjwYax/VBGCcXzgTqQ==", + "dev": true + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha1-q8av7tzqUugJzcA3au0845Y10X8=", + "dev": true + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "babel-code-frame": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", + "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", + "dev": true, + "requires": { + "chalk": "^1.1.3", + "esutils": "^2.0.2", + "js-tokens": "^3.0.2" + }, + "dependencies": { + "chalk": { + "version": "1.1.3", + "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + } + } + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, "bn.js": { "version": "4.11.8", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==" }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, "brorand": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", @@ -17,6 +109,70 @@ "resolved": "https://registry.npmjs.org/buffer-to-arraybuffer/-/buffer-to-arraybuffer-0.0.5.tgz", "integrity": "sha1-YGSkD6dutDxyOrqe+PbhIW0QURo=" }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "dev": true + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "commander": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz", + "integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, "decode-uri-component": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", @@ -30,11 +186,47 @@ "mimic-response": "^1.0.0" } }, + "definitelytyped-header-parser": { + "version": "github:Microsoft/definitelytyped-header-parser#4941b70b7658d5238b619dcba694aee22f5b8f56", + "from": "github:Microsoft/definitelytyped-header-parser#production", + "dev": true, + "requires": { + "@types/parsimmon": "^1.3.0", + "parsimmon": "^1.2.0" + } + }, + "diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true + }, "dom-walk": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.1.tgz", "integrity": "sha1-ZyIm3HTI95mtNTB9+TaroRrNYBg=" }, + "dtslint": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/dtslint/-/dtslint-0.3.0.tgz", + "integrity": "sha512-3oWL8MD+2nKaxmNzrt8EAissP63hNSJ4OLr/itvNnPdAAl+7vxnjQ8p2Zdk0MNgdenqwk7GcaUDz7fQHaPgCyA==", + "dev": true, + "requires": { + "definitelytyped-header-parser": "github:Microsoft/definitelytyped-header-parser#4941b70b7658d5238b619dcba694aee22f5b8f56", + "fs-promise": "^2.0.0", + "strip-json-comments": "^2.0.1", + "tslint": "^5.9.1", + "typescript": "^3.3.0-dev.20181130" + }, + "dependencies": { + "typescript": { + "version": "3.3.0-dev.20181130", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.3.0-dev.20181130.tgz", + "integrity": "sha512-18QC4WaZ15W2GcpjFAqXqt31Vugitc6QWHUjS7OiEBUYnfAtql2gWMs18Q5FX617QAfyTBpOp1KH8TQ/1Uem3Q==", + "dev": true + } + } + }, "elliptic": { "version": "6.4.1", "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.1.tgz", @@ -49,6 +241,24 @@ "minimalistic-crypto-utils": "^1.0.0" } }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "esutils": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", + "dev": true + }, "eth-lib": { "version": "0.2.8", "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", @@ -83,6 +293,48 @@ "is-callable": "^1.1.3" } }, + "fs-extra": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-2.1.2.tgz", + "integrity": "sha1-BGxwFjzvmq1GsOSn+kZ/si1x3jU=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^2.1.0" + } + }, + "fs-promise": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/fs-promise/-/fs-promise-2.0.3.tgz", + "integrity": "sha1-9k5PhUvPaJqovdy6JokW2z20aFQ=", + "dev": true, + "requires": { + "any-promise": "^1.3.0", + "fs-extra": "^2.0.0", + "mz": "^2.6.0", + "thenify-all": "^1.6.0" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, "global": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/global/-/global-4.3.2.tgz", @@ -92,6 +344,27 @@ "process": "~0.5.1" } }, + "graceful-fs": { + "version": "4.1.15", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", + "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==", + "dev": true + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, "hash.js": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.5.tgz", @@ -111,6 +384,16 @@ "minimalistic-crypto-utils": "^1.0.1" } }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, "inherits": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", @@ -131,6 +414,31 @@ "resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz", "integrity": "sha1-fY035q135dEnFIkTxXPggtd39VQ=" }, + "js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", + "dev": true + }, + "js-yaml": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz", + "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "jsonfile": { + "version": "2.4.0", + "resolved": "http://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", + "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6" + } + }, "mimic-response": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", @@ -154,6 +462,26 @@ "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "mz": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "dev": true, + "requires": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } + }, "number-to-bn": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/number-to-bn/-/number-to-bn-1.7.0.tgz", @@ -192,6 +520,24 @@ "trim": "0.0.1" } }, + "parsimmon": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/parsimmon/-/parsimmon-1.12.0.tgz", + "integrity": "sha512-uC/BjuSfb4jfaWajKCp1mVncXXq+V1twbcYChbTxN3GM7fn+8XoHwUdvUz+PTaFtDSCRQxU8+Rnh+iMhAkVwdw==", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true + }, "process": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/process/-/process-0.5.2.tgz", @@ -212,6 +558,21 @@ "resolved": "https://registry.npmjs.org/randomhex/-/randomhex-0.1.5.tgz", "integrity": "sha1-us7vmCMpCRQA8qKRLGzQLxCU9YU=" }, + "resolve": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz", + "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", + "dev": true, + "requires": { + "path-parse": "^1.0.5" + } + }, + "semver": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", + "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==", + "dev": true + }, "simple-concat": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.0.tgz", @@ -227,11 +588,26 @@ "simple-concat": "^1.0.0" } }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, "strict-uri-encode": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=" }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, "strip-hex-prefix": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz", @@ -240,6 +616,36 @@ "is-hex-prefixed": "1.0.0" } }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + }, + "thenify": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.0.tgz", + "integrity": "sha1-5p44obq+lpsBCCB5eLn2K4hgSDk=", + "dev": true, + "requires": { + "any-promise": "^1.0.0" + } + }, + "thenify-all": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", + "integrity": "sha1-GhkY1ALY/D+Y+/I02wvMjMEOlyY=", + "dev": true, + "requires": { + "thenify": ">= 3.1.0 < 4" + } + }, "timed-out": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", @@ -250,6 +656,47 @@ "resolved": "https://registry.npmjs.org/trim/-/trim-0.0.1.tgz", "integrity": "sha1-WFhUf2spB1fulczMZm+1AITEYN0=" }, + "tslib": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", + "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", + "dev": true + }, + "tslint": { + "version": "5.11.0", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.11.0.tgz", + "integrity": "sha1-mPMMAurjzecAYgHkwzywi0hYHu0=", + "dev": true, + "requires": { + "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.27.2" + } + }, + "tsutils": { + "version": "2.29.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", + "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + }, + "typescript": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.2.1.tgz", + "integrity": "sha512-jw7P2z/h6aPT4AENXDGjcfHTu5CSqzsbZc6YlUIebTyBAq8XaKp78x7VcSh30xwSCcsu5irZkYZUSFP1MrAMbg==", + "dev": true + }, "underscore-es": { "version": "1.9.8", "resolved": "https://registry.npmjs.org/underscore-es/-/underscore-es-1.9.8.tgz", From 0cf3eda02265cbd9d11467351fb2c894f2e3c0f0 Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Fri, 30 Nov 2018 11:09:56 +0000 Subject: [PATCH 05/62] full type tests --- packages/web3-utils/types/test.ts | 1116 +++++++++++++++++++++++++++++ 1 file changed, 1116 insertions(+) create mode 100644 packages/web3-utils/types/test.ts diff --git a/packages/web3-utils/types/test.ts b/packages/web3-utils/types/test.ts new file mode 100644 index 00000000000..8c793f686e5 --- /dev/null +++ b/packages/web3-utils/types/test.ts @@ -0,0 +1,1116 @@ +/* + This file is part of web3.js. + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file test.ts - please do not worry about the red underlines, we need to test for bad types + * so we are passing in bad types on purpose + * @author Josh Stevens + * @date 2018 + */ + +import { +isBN, +BN, +isBigNumber, +toBN, +toTwosComplement, +isAddress, +isHex, +isHexStrict, +asciiToHex, +hexToAscii, +toAscii, +bytesToHex, +numberToHex, +checkAddressChecksum, +fromAscii, +fromDecimal, +fromUtf8, +fromWei, +hexToBytes, +hexToNumber, +hexToNumberString, +hexToString, +hexToUtf8, +keccak256, +padLeft, +leftPad, +rightPad, +padRight, +sha3, +randomHex, +utf8ToHex, +stringToHex, +toChecksumAddress, +toDecimal, +toHex, +toUtf8, +toWei, +isBloom, +isTopic, +_fireError, +_jsonInterfaceMethodToString, +_flattenTypes, +soliditySha3, +getUnitValue, +unitMap, +testAddress, +testTopic +} from 'utils'; + +const bigNumber = new BN(3); + +// isBN Tests + +isBN(7); // $ExpectType boolean +isBN('4325'); // $ExpectType boolean +// $ExpectError +isBN({}); +// $ExpectError +isBN(true); +// $ExpectError +isBN(bigNumber); +// $ExpectError +isBN(['string']); +// $ExpectError +isBN([4]); +// $ExpectError +isBN(null); +// $ExpectError +isBN(undefined); + +// isBigNumber Tests + +isBigNumber(bigNumber); // $ExpectType boolean + +// $ExpectError +isBigNumber(7); +// $ExpectError +isBigNumber('4325'); +// $ExpectError +isBigNumber({}); +// $ExpectError +isBigNumber(true); +// $ExpectError +isBigNumber(['string']); +// $ExpectError +isBigNumber([4]); +// $ExpectError +isBigNumber(null); +// $ExpectError +isBigNumber(undefined); + +// toBN Tests + +toBN(4); // $ExpectType BN +toBN('443'); // $ExpectType BN + +// $ExpectError +toBN({}); +// $ExpectError +toBN(true); +// $ExpectError +toBN(['string']); +// $ExpectError +toBN([4]); +// $ExpectError +toBN(null); +// $ExpectError +toBN(undefined); + +// toTwosComplement Tests + +toTwosComplement(4); // $ExpectType string +toTwosComplement('443'); // $ExpectType string +toTwosComplement(bigNumber); // $ExpectType string + +// $ExpectError +toTwosComplement({}); +// $ExpectError +toTwosComplement(true); +// $ExpectError +toTwosComplement(['string']); +// $ExpectError +toTwosComplement([4]); +// $ExpectError +toTwosComplement(null); +// $ExpectError +toTwosComplement(undefined); + +// isAddress Tests + +isAddress('0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); // $ExpectType boolean + +// $ExpectError +isAddress(4); +// $ExpectError +isAddress(bigNumber); +// $ExpectError +isAddress({}); +// $ExpectError +isAddress(true); +// $ExpectError +isAddress(['string']); +// $ExpectError +isAddress([4]); +// $ExpectError +isAddress(null); +// $ExpectError +isAddress(undefined); + +// isHex Tests + +isHex('0xc1912'); // $ExpectType boolean +isHex(345) // $ExpectType boolean + +// $ExpectError +isHex(bigNumber); +// $ExpectError +isHex({}); +// $ExpectError +isHex(true); +// $ExpectError +isHex(['string']); +// $ExpectError +isHex([4]); +// $ExpectError +isHex(null); +// $ExpectError +isHex(undefined); + +// isHexStrict Tests + +isHexStrict('0xc1912'); // $ExpectType boolean +isHexStrict(345) // $ExpectType boolean + +// $ExpectError +isHexStrict(bigNumber); +// $ExpectError +isHexStrict({}); +// $ExpectError +isHexStrict(true); +// $ExpectError +isHexStrict(['string']); +// $ExpectError +isHexStrict([4]); +// $ExpectError +isHexStrict(null); +// $ExpectError +isHexStrict(undefined); + +// asciiToHex Tests + +asciiToHex('I have 100!'); // $ExpectType string + +// $ExpectError +asciiToHex(345); +// $ExpectError +asciiToHex(bigNumber); +// $ExpectError +asciiToHex({}); +// $ExpectError +asciiToHex(true); +// $ExpectError +asciiToHex(['string']); +// $ExpectError +asciiToHex([4]); +// $ExpectError +asciiToHex(null); +// $ExpectError +asciiToHex(undefined); + +// hexToAscii Tests + +hexToAscii('0x4920686176652031303021'); // $ExpectType string + +// $ExpectError +hexToAscii(345); +// $ExpectError +hexToAscii(bigNumber); +// $ExpectError +hexToAscii({}); +// $ExpectError +hexToAscii(true); +// $ExpectError +hexToAscii(['string']); +// $ExpectError +hexToAscii([4]); +// $ExpectError +hexToAscii(null); +// $ExpectError +hexToAscii(undefined); + +// toAscii Tests + +toAscii('0x4920686176652031303021'); // $ExpectType string + +// $ExpectError +toAscii(345); +// $ExpectError +toAscii(bigNumber); +// $ExpectError +toAscii({}); +// $ExpectError +toAscii(true); +// $ExpectError +toAscii(['string']); +// $ExpectError +toAscii([4]); +// $ExpectError +toAscii(null); +// $ExpectError +toAscii(undefined); + +// bytesToHex Tests + +bytesToHex([ 72, 101, 108, 108, 111, 33, 36 ]); // $ExpectType string + +// $ExpectError +bytesToHex([ '72', 101, 108, 108, 111, 33, 36 ]); +// $ExpectError +bytesToHex(345); +// $ExpectError +bytesToHex(bigNumber); +// $ExpectError +bytesToHex({}); +// $ExpectError +bytesToHex(true); +// $ExpectError +bytesToHex(['string']); +// $ExpectError +bytesToHex(null); +// $ExpectError +bytesToHex(undefined); + +// numberToHex Tests + +numberToHex('232'); // $ExpectType string +numberToHex(232); // $ExpectType string +numberToHex(bigNumber); // $ExpectType string + +// $ExpectError +numberToHex(['72']); +// $ExpectError +numberToHex([4]); +// $ExpectError +numberToHex([ 36 ]); +// $ExpectError +numberToHex({}); +// $ExpectError +numberToHex(true); +// $ExpectError +numberToHex(null); +// $ExpectError +numberToHex(undefined); + +// checkAddressChecksum Tests + +checkAddressChecksum('0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); // $ExpectType boolean + +// $ExpectError +checkAddressChecksum([4]); +// $ExpectError +checkAddressChecksum([ 36 ]); +// $ExpectError +checkAddressChecksum(345); +// $ExpectError +checkAddressChecksum(bigNumber); +// $ExpectError +checkAddressChecksum({}); +// $ExpectError +checkAddressChecksum(true); +// $ExpectError +checkAddressChecksum(null); +// $ExpectError +checkAddressChecksum(undefined); + +// fromAscii Tests + +fromAscii('I have 100!'); // $ExpectType string + +// $ExpectError +fromAscii(345); +// $ExpectError +fromAscii(bigNumber); +// $ExpectError +fromAscii({}); +// $ExpectError +fromAscii(true); +// $ExpectError +fromAscii(['string']); +// $ExpectError +fromAscii([4]); +// $ExpectError +fromAscii(null); +// $ExpectError +fromAscii(undefined); + +// fromDecimal Tests + +fromDecimal('232'); // $ExpectType string +fromDecimal(232); // $ExpectType string + +// $ExpectError +fromDecimal(bigNumber); +// $ExpectError +fromDecimal(['string']); +// $ExpectError +fromDecimal([4]); +// $ExpectError +fromDecimal({}); +// $ExpectError +fromDecimal(true); +// $ExpectError +fromDecimal(null); +// $ExpectError +fromDecimal(undefined); + +// fromUtf8 Tests + +fromUtf8('I have 100£'); // $ExpectType string + +// $ExpectError +fromUtf8(232); +// $ExpectError +fromUtf8(bigNumber); +// $ExpectError +fromUtf8(['string']); +// $ExpectError +fromUtf8([4]); +// $ExpectError +fromUtf8({}); +// $ExpectError +fromUtf8(true); +// $ExpectError +fromUtf8(null); +// $ExpectError +fromUtf8(undefined); + +// fromWei Tests + +fromWei(bigNumber); // $ExpectType string | BN +fromWei(bigNumber, 'ether'); // $ExpectType string | BN + +// $ExpectError +fromWei(232); +// $ExpectError +fromWei(['string']); +// $ExpectError +fromWei([4]); +// $ExpectError +fromWei({}); +// $ExpectError +fromWei(true); +// $ExpectError +fromWei(null); +// $ExpectError +fromWei(undefined); +// $ExpectError +fromWei(bigNumber, 'blah'); + +// hexToBytes Tests + +hexToBytes('0x000000ea'); // $ExpectType number[] +hexToBytes(0x000000ea); // $ExpectType number[] + +// $ExpectError +hexToBytes([4]); +// $ExpectError +hexToBytes(['string']); +// $ExpectError +hexToBytes(bigNumber); +// $ExpectError +hexToBytes({}); +// $ExpectError +hexToBytes(true); +// $ExpectError +hexToBytes(null); +// $ExpectError +hexToBytes(undefined); + +// hexToNumber Tests + +hexToNumber('232'); // $ExpectType number +hexToNumber(232); // $ExpectType number + +// $ExpectError +hexToNumber(bigNumber); +// $ExpectError +hexToNumber(['string']); +// $ExpectError +hexToNumber([4]); +// $ExpectError +hexToNumber({}); +// $ExpectError +hexToNumber(true); +// $ExpectError +hexToNumber(null); +// $ExpectError +hexToNumber(undefined); + +// hexToNumberString Tests + +hexToNumberString('0xea'); // $ExpectType string +hexToNumberString(0xea); // $ExpectType string + +// $ExpectError +hexToNumberString(bigNumber); +// $ExpectError +hexToNumberString(['string']); +// $ExpectError +hexToNumberString([4]); +// $ExpectError +hexToNumberString({}); +// $ExpectError +hexToNumberString(true); +// $ExpectError +hexToNumberString(null); +// $ExpectError +hexToNumberString(undefined); + +// hexToString Tests + +hexToString('0x49206861766520313030e282ac'); // $ExpectType string +hexToString(0x49206861766520313030e282ac); // $ExpectType string + +// $ExpectError +hexToString(bigNumber); +// $ExpectError +hexToString(['string']); +// $ExpectError +hexToString([4]); +// $ExpectError +hexToString({}); +// $ExpectError +hexToString(true); +// $ExpectError +hexToString(null); +// $ExpectError +hexToString(undefined); + +// hexToUtf8 Tests + +hexToUtf8('0x49206861766520313030e282ac'); // $ExpectType string + +// $ExpectError +hexToUtf8(656); +// $ExpectError +hexToUtf8(bigNumber); +// $ExpectError +hexToUtf8(['string']); +// $ExpectError +hexToUtf8([4]); +// $ExpectError +hexToUtf8({}); +// $ExpectError +hexToUtf8(true); +// $ExpectError +hexToUtf8(null); +// $ExpectError +hexToUtf8(undefined); + +// keccak256 Tests + +keccak256('234'); // $ExpectType string +keccak256(bigNumber); // $ExpectType string + +// $ExpectError +keccak256(['string']); +// $ExpectError +keccak256(234); +// $ExpectError +keccak256([4]); +// $ExpectError +keccak256({}); +// $ExpectError +keccak256(true); +// $ExpectError +keccak256(null); +// $ExpectError +keccak256(undefined); + +// padLeft Tests + +padLeft('0x3456ff', 20); // $ExpectType string +padLeft(0x3456ff, 20); // $ExpectType string +padLeft('Hello', 20, 'x'); // $ExpectType string + +// $ExpectError +padLeft(bigNumber, 20); +// $ExpectError +padLeft(['string'], 20); +// $ExpectError +padLeft([4], 20); +// $ExpectError +padLeft({}, 20); +// $ExpectError +padLeft(true, 20); +// $ExpectError +padLeft(null, 20); +// $ExpectError +padLeft(undefined, 20); +// $ExpectError +padLeft('0x3456ff', bigNumber); +// $ExpectError +padLeft('0x3456ff', ['string']); +// $ExpectError +padLeft('0x3456ff', [4]); +// $ExpectError +padLeft('0x3456ff', {}); +// $ExpectError +padLeft('0x3456ff', true); +// $ExpectError +padLeft('0x3456ff', null); +// $ExpectError +padLeft('0x3456ff', undefined); +// $ExpectError +padLeft('Hello', 20, bigNumber); +// $ExpectError +padLeft('Hello', 20, ['string']); +// $ExpectError +padLeft('Hello', 20, [4]); +// $ExpectError +padLeft('Hello', 20, {}); +// $ExpectError +padLeft('Hello', 20, true); +// $ExpectError +padLeft('Hello', 20, null); + +// leftPad Tests + +leftPad('0x3456ff', 20); // $ExpectType string +leftPad(0x3456ff, 20); // $ExpectType string +leftPad('Hello', 20, 'x'); // $ExpectType string + +// $ExpectError +leftPad(bigNumber, 20); +// $ExpectError +leftPad(['string'], 20); +// $ExpectError +leftPad([4], 20); +// $ExpectError +leftPad({}, 20); +// $ExpectError +leftPad(true, 20); +// $ExpectError +leftPad(null, 20); +// $ExpectError +leftPad(undefined, 20); +// $ExpectError +leftPad('0x3456ff', bigNumber); +// $ExpectError +leftPad('0x3456ff', ['string']); +// $ExpectError +leftPad('0x3456ff', [4]); +// $ExpectError +leftPad('0x3456ff', {}); +// $ExpectError +leftPad('0x3456ff', true); +// $ExpectError +leftPad('0x3456ff', null); +// $ExpectError +leftPad('0x3456ff', undefined); +// $ExpectError +leftPad('Hello', 20, bigNumber); +// $ExpectError +leftPad('Hello', 20, ['string']); +// $ExpectError +leftPad('Hello', 20, [4]); +// $ExpectError +leftPad('Hello', 20, {}); +// $ExpectError +leftPad('Hello', 20, true); +// $ExpectError +leftPad('Hello', 20, null); + +// rightPad Tests + +rightPad('0x3456ff', 20); // $ExpectType string +rightPad(0x3456ff, 20); // $ExpectType string +rightPad('Hello', 20, 'x'); // $ExpectType string + +// $ExpectError +rightPad(bigNumber, 20); +// $ExpectError +rightPad(['string'], 20); +// $ExpectError +rightPad([4], 20); +// $ExpectError +rightPad({}, 20); +// $ExpectError +rightPad(true, 20); +// $ExpectError +rightPad(null, 20); +// $ExpectError +rightPad(undefined, 20); +// $ExpectError +rightPad('0x3456ff', bigNumber); +// $ExpectError +rightPad('0x3456ff', ['string']); +// $ExpectError +rightPad('0x3456ff', [4]); +// $ExpectError +rightPad('0x3456ff', {}); +// $ExpectError +rightPad('0x3456ff', true); +// $ExpectError +rightPad('0x3456ff', null); +// $ExpectError +rightPad('0x3456ff', undefined); +// $ExpectError +rightPad('Hello', 20, bigNumber); +// $ExpectError +rightPad('Hello', 20, ['string']); +// $ExpectError +rightPad('Hello', 20, [4]); +// $ExpectError +rightPad('Hello', 20, {}); +// $ExpectError +rightPad('Hello', 20, true); +// $ExpectError +rightPad('Hello', 20, null); + +// padRight Tests + +padRight('0x3456ff', 20); // $ExpectType string +padRight(0x3456ff, 20); // $ExpectType string +padRight('Hello', 20, 'x'); // $ExpectType string + +// $ExpectError +padRight(bigNumber, 20); +// $ExpectError +padRight(['string'], 20); +// $ExpectError +padRight([4], 20); +// $ExpectError +padRight({}, 20); +// $ExpectError +padRight(true, 20); +// $ExpectError +padRight(null, 20); +// $ExpectError +padRight(undefined, 20); +// $ExpectError +padRight('0x3456ff', bigNumber); +// $ExpectError +padRight('0x3456ff', ['string']); +// $ExpectError +padRight('0x3456ff', [4]); +// $ExpectError +padRight('0x3456ff', {}); +// $ExpectError +padRight('0x3456ff', true); +// $ExpectError +padRight('0x3456ff', null); +// $ExpectError +padRight('0x3456ff', undefined); +// $ExpectError +padRight('Hello', 20, bigNumber); +// $ExpectError +padRight('Hello', 20, ['string']); +// $ExpectError +padRight('Hello', 20, [4]); +// $ExpectError +padRight('Hello', 20, {}); +// $ExpectError +padRight('Hello', 20, true); +// $ExpectError +padRight('Hello', 20, null); + +// sha3 Tests + +sha3('234'); // $ExpectType string +sha3(bigNumber); // $ExpectType string + +// $ExpectError +sha3(['string']); +// $ExpectError +sha3(234); +// $ExpectError +sha3([4]); +// $ExpectError +sha3({}); +// $ExpectError +sha3(true); +// $ExpectError +sha3(null); +// $ExpectError +sha3(undefined); + +// randomHex Tests + +randomHex(32); // $ExpectType string + +// $ExpectError +randomHex('234'); +// $ExpectError +randomHex(bigNumber); +// $ExpectError +randomHex(['string']); +// $ExpectError +randomHex([4]); +// $ExpectError +randomHex({}); +// $ExpectError +randomHex(true); +// $ExpectError +randomHex(null); +// $ExpectError +randomHex(undefined); + +// utf8ToHex Tests + +utf8ToHex('I have 100£'); // $ExpectType string + +// $ExpectError +utf8ToHex(232); +// $ExpectError +utf8ToHex(bigNumber); +// $ExpectError +utf8ToHex(['string']); +// $ExpectError +utf8ToHex([4]); +// $ExpectError +utf8ToHex({}); +// $ExpectError +utf8ToHex(true); +// $ExpectError +utf8ToHex(null); +// $ExpectError +utf8ToHex(undefined); + +// stringToHex Tests + +stringToHex('I have 100£'); // $ExpectType string + +// $ExpectError +stringToHex(232); +// $ExpectError +stringToHex(bigNumber); +// $ExpectError +stringToHex(['string']); +// $ExpectError +stringToHex([4]); +// $ExpectError +stringToHex({}); +// $ExpectError +stringToHex(true); +// $ExpectError +stringToHex(null); +// $ExpectError +stringToHex(undefined); + +// toChecksumAddress Tests + +toChecksumAddress('0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); // $ExpectType string + +// $ExpectError +toChecksumAddress([4]); +// $ExpectError +toChecksumAddress(['string']); +// $ExpectError +toChecksumAddress(345); +// $ExpectError +toChecksumAddress(bigNumber); +// $ExpectError +toChecksumAddress({}); +// $ExpectError +toChecksumAddress(true); +// $ExpectError +toChecksumAddress(null); +// $ExpectError +toChecksumAddress(undefined); + +// toDecimal Tests + +toDecimal('232'); // $ExpectType number +toDecimal(232); // $ExpectType number + +// $ExpectError +toDecimal(bigNumber); +// $ExpectError +toDecimal(['string']); +// $ExpectError +toDecimal([4]); +// $ExpectError +toDecimal({}); +// $ExpectError +toDecimal(true); +// $ExpectError +toDecimal(null); +// $ExpectError +toDecimal(undefined); + +// toHex Tests + +toHex('234'); // $ExpectType string +toHex(234); // $ExpectType string +toHex(bigNumber); // $ExpectType string + +// $ExpectError +toHex(['string']); +// $ExpectError +toHex(true); +// $ExpectError +toHex([4]); +// $ExpectError +toHex({}); +// $ExpectError +toHex(null); +// $ExpectError +toHex(undefined); + +// toUtf8 Tests + +toUtf8('0x49206861766520313030e282ac'); // $ExpectType string + +// $ExpectError +toUtf8(656); +// $ExpectError +toUtf8(bigNumber); +// $ExpectError +toUtf8(['string']); +// $ExpectError +toUtf8([4]); +// $ExpectError +toUtf8({}); +// $ExpectError +toUtf8(true); +// $ExpectError +toUtf8(null); +// $ExpectError +toUtf8(undefined); + +// toWei Tests + +toWei('1'); // $ExpectType string | BN +toWei(1); // $ExpectType string | BN +toWei(bigNumber); // $ExpectType string | BN +toWei('1', 'finney'); // $ExpectType string | BN +toWei(1, 'finney'); // $ExpectType string | BN +toWei(bigNumber, 'finney'); // $ExpectType string | BN + +// $ExpectError +toWei(['string']); +// $ExpectError +toWei([4]); +// $ExpectError +toWei({}); +// $ExpectError +toWei(true); +// $ExpectError +toWei(null); +// $ExpectError +toWei(undefined); +// $ExpectError +toWei(1 , 'blah'); + +// isBloom Tests + +isBloom('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef'); // $ExpectType boolean + +// $ExpectError +isBloom(656); +// $ExpectError +isBloom(bigNumber); +// $ExpectError +isBloom(['string']); +// $ExpectError +isBloom([4]); +// $ExpectError +isBloom({}); +// $ExpectError +isBloom(true); +// $ExpectError +isBloom(null); +// $ExpectError +isBloom(undefined); + +// isTopic Tests + +isTopic('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef'); // $ExpectType boolean + +// $ExpectError +isTopic(656); +// $ExpectError +isTopic(bigNumber); +// $ExpectError +isTopic(['string']); +// $ExpectError +isTopic([4]); +// $ExpectError +isTopic({}); +// $ExpectError +isTopic(true); +// $ExpectError +isTopic(null); +// $ExpectError +isTopic(undefined); + +// _fireError Tests + +_fireError(new Error('error'), {}, (error) => { console.log(error); }, (error) => { console.log(error); }); // $ExpectType {} +_fireError('error', {}, (error) => { console.log(error); }, (error) => { console.log(error); }); // $ExpectType {} +_fireError({ message: 'hey', data: 'test' }, {}, (error) => { console.log(error); }, (error) => { console.log(error); }); // $ExpectType {} +_fireError({ message: 'hey', data: {} }, {}, (error) => { console.log(error); }, (error) => { console.log(error); }); // $ExpectType {} +_fireError({ message: 'hey', data: ['test'] }, {}, (error) => { console.log(error); }, (error) => { console.log(error); }); // $ExpectType {} + +// _jsonInterfaceMethodToString Tests + +_jsonInterfaceMethodToString({}); // $ExpectType string + +// _flattenTypes Tests + +_flattenTypes(true, {}); // $ExpectType string[] +_flattenTypes(false, {}); // $ExpectType string[] + +// $ExpectError +_flattenTypes(true, null); +// $ExpectError +_flattenTypes(true, undefined); +// $ExpectError +_flattenTypes(656, {}); +// $ExpectError +_flattenTypes(bigNumber, {}); +// $ExpectError +_flattenTypes(['string'], {}); +// $ExpectError +_flattenTypes([4], {}); +// $ExpectError +_flattenTypes('string', {}); +// $ExpectError +_flattenTypes(null, {}); +// $ExpectError +_flattenTypes(undefined, {}); + +// soliditySha3 Tests + +soliditySha3('234564535', '0xfff23243', true, -10); // $ExpectType string +soliditySha3('Hello!%'); // $ExpectType string +soliditySha3('234'); // $ExpectType string +soliditySha3(0xea); // $ExpectType string +soliditySha3(bigNumber); // $ExpectType string +soliditySha3({type: 'uint256', value: '234'}); // $ExpectType string +soliditySha3({t: 'uint', v: new BN('234')}); // $ExpectType string +soliditySha3({t: 'string', v: 'Hello!%'}, {t: 'int8', v: -23}, {t: 'address', v: '0x85F43D8a49eeB85d32Cf465507DD71d507100C1d'}); // $ExpectType string +soliditySha3('0x407D73d8a49eeb85D32Cf465507dd71d507100c1'); // $ExpectType string + +// $ExpectError +soliditySha3(['hey']); +// $ExpectError +soliditySha3([34]); +// $ExpectError +soliditySha3(null); +// $ExpectError +soliditySha3(undefined); + +// getUnitValue Tests + +getUnitValue('ether'); // $ExpectType string + +// $ExpectError +getUnitValue('fake'); +// $ExpectError +getUnitValue(656); +// $ExpectError +getUnitValue(bigNumber); +// $ExpectError +getUnitValue(['string']); +// $ExpectError +getUnitValue([4]); +// $ExpectError +getUnitValue({}); +// $ExpectError +getUnitValue(true); +// $ExpectError +getUnitValue(null); +// $ExpectError +getUnitValue(undefined); + +// unitMap Tests + +unitMap(); // $ExpectType Units + +// testAddress Tests + +testAddress('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', '0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); // $ExpectType boolean + +// $ExpectError +testAddress(656, '0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); +// $ExpectError +testAddress(bigNumber, '0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); +// $ExpectError +testAddress(['string'], '0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); +// $ExpectError +testAddress([4], '0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); +// $ExpectError +testAddress({}, '0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); +// $ExpectError +testAddress(true, '0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); +// $ExpectError +testAddress(null, '0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); +// $ExpectError +testAddress(undefined, '0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); +// $ExpectError +testAddress('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', 656); +// $ExpectError +testAddress('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', bigNumber); +// $ExpectError +testAddress('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', ['string']); +// $ExpectError +testAddress('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', [4]); +// $ExpectError +testAddress('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', {}); +// $ExpectError +testAddress('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', true); +// $ExpectError +testAddress('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', null); +// $ExpectError +testAddress('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', undefined); + +// testTopic Tests + +testTopic('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', '0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); // $ExpectType boolean + +// $ExpectError +testTopic(656, '0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); +// $ExpectError +testTopic(bigNumber, '0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); +// $ExpectError +testTopic(['string'], '0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); +// $ExpectError +testTopic([4], '0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); +// $ExpectError +testTopic({}, '0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); +// $ExpectError +testTopic(true, '0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); +// $ExpectError +testTopic(null, '0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); +// $ExpectError +testTopic(undefined, '0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); +// $ExpectError +testTopic('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', 656); +// $ExpectError +testTopic('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', bigNumber); +// $ExpectError +testTopic('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', ['string']); +// $ExpectError +testTopic('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', [4]); +// $ExpectError +testTopic('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', {}); +// $ExpectError +testTopic('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', true); +// $ExpectError +testTopic('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', null); +// $ExpectError +testTopic('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', undefined); From c89e469dddb4652f4a1d06e79a0ded7d541cacce Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Fri, 30 Nov 2018 11:10:03 +0000 Subject: [PATCH 06/62] tsconfig.json --- packages/web3-utils/types/tsconfig.json | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 packages/web3-utils/types/tsconfig.json diff --git a/packages/web3-utils/types/tsconfig.json b/packages/web3-utils/types/tsconfig.json new file mode 100644 index 00000000000..1313f67efdf --- /dev/null +++ b/packages/web3-utils/types/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6"], + "target": "es6", + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "noEmit": true, + "allowSyntheticDefaultImports": true, + + // If the library is an external module (uses `export`), this allows your test file to import "mylib" instead of "./index". + // If the library is global (cannot be imported via `import` or `require`), leave this out. + "baseUrl": ".", + "paths": { "utils": ["."] } + } +} From 06fa6f10f6522963dbfda6bed649773e68686bc0 Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Fri, 30 Nov 2018 11:10:09 +0000 Subject: [PATCH 07/62] tslint.json --- packages/web3-utils/types/tslint.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 packages/web3-utils/types/tslint.json diff --git a/packages/web3-utils/types/tslint.json b/packages/web3-utils/types/tslint.json new file mode 100644 index 00000000000..4636b4a20aa --- /dev/null +++ b/packages/web3-utils/types/tslint.json @@ -0,0 +1,7 @@ +{ + "extends": "dtslint/dtslint.json", + "rules": { + "semicolon": false, + "no-import-default-of-export-equals": false + } +} \ No newline at end of file From 83ae913d81ef04b80fe403e2a57873eaec2a0cc8 Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Fri, 30 Nov 2018 11:10:41 +0000 Subject: [PATCH 08/62] indent imports --- packages/web3-utils/types/test.ts | 94 +++++++++++++++---------------- 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/packages/web3-utils/types/test.ts b/packages/web3-utils/types/test.ts index 8c793f686e5..0ae9f80d71b 100644 --- a/packages/web3-utils/types/test.ts +++ b/packages/web3-utils/types/test.ts @@ -19,53 +19,53 @@ */ import { -isBN, -BN, -isBigNumber, -toBN, -toTwosComplement, -isAddress, -isHex, -isHexStrict, -asciiToHex, -hexToAscii, -toAscii, -bytesToHex, -numberToHex, -checkAddressChecksum, -fromAscii, -fromDecimal, -fromUtf8, -fromWei, -hexToBytes, -hexToNumber, -hexToNumberString, -hexToString, -hexToUtf8, -keccak256, -padLeft, -leftPad, -rightPad, -padRight, -sha3, -randomHex, -utf8ToHex, -stringToHex, -toChecksumAddress, -toDecimal, -toHex, -toUtf8, -toWei, -isBloom, -isTopic, -_fireError, -_jsonInterfaceMethodToString, -_flattenTypes, -soliditySha3, -getUnitValue, -unitMap, -testAddress, -testTopic + isBN, + BN, + isBigNumber, + toBN, + toTwosComplement, + isAddress, + isHex, + isHexStrict, + asciiToHex, + hexToAscii, + toAscii, + bytesToHex, + numberToHex, + checkAddressChecksum, + fromAscii, + fromDecimal, + fromUtf8, + fromWei, + hexToBytes, + hexToNumber, + hexToNumberString, + hexToString, + hexToUtf8, + keccak256, + padLeft, + leftPad, + rightPad, + padRight, + sha3, + randomHex, + utf8ToHex, + stringToHex, + toChecksumAddress, + toDecimal, + toHex, + toUtf8, + toWei, + isBloom, + isTopic, + _fireError, + _jsonInterfaceMethodToString, + _flattenTypes, + soliditySha3, + getUnitValue, + unitMap, + testAddress, + testTopic } from 'utils'; const bigNumber = new BN(3); From 5bd17f0e428581a2d1eb02860d985bcd645fc0a7 Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Fri, 30 Nov 2018 11:23:24 +0000 Subject: [PATCH 09/62] add a trailing line on tslint.json --- packages/web3-utils/types/tslint.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/web3-utils/types/tslint.json b/packages/web3-utils/types/tslint.json index 4636b4a20aa..8ba5237b0b4 100644 --- a/packages/web3-utils/types/tslint.json +++ b/packages/web3-utils/types/tslint.json @@ -4,4 +4,4 @@ "semicolon": false, "no-import-default-of-export-equals": false } -} \ No newline at end of file +} From 5da963f99125378b5ed7d567a13e528ca39a1794 Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Sat, 1 Dec 2018 09:13:01 +0000 Subject: [PATCH 10/62] move key dev dependencies in the root --- package.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 8754e84d90c..bdf4906df59 100644 --- a/package.json +++ b/package.json @@ -94,7 +94,9 @@ "rollup-plugin-auto-external": "^2.0.0", "rollup-plugin-babel": "^4.0.3", "rollup-plugin-cleanup": "^3.0.0", - "rollup-plugin-json": "^3.1.0" + "rollup-plugin-json": "^3.1.0", + "@types/bn.js": "^4.11.3", + "typescript": "^3.2.1" }, "dependencies": { "@babel/polyfill": "^7.0.0" From 73c35ff125adee101a64a4ba096bef4545be9363 Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Sat, 1 Dec 2018 09:17:20 +0000 Subject: [PATCH 11/62] moved `ts` + `bn` into root but kept `dtslint` --- packages/web3-utils/package-lock.json | 31 ++++----------------------- packages/web3-utils/package.json | 4 +--- 2 files changed, 5 insertions(+), 30 deletions(-) diff --git a/packages/web3-utils/package-lock.json b/packages/web3-utils/package-lock.json index 4259a158a48..1fd43b07377 100644 --- a/packages/web3-utils/package-lock.json +++ b/packages/web3-utils/package-lock.json @@ -4,21 +4,6 @@ "lockfileVersion": 1, "requires": true, "dependencies": { - "@types/bn.js": { - "version": "4.11.3", - "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.3.tgz", - "integrity": "sha512-auZ3vEo3UW8tZc9NhF0MTnutKlf+YhsfC3+dwskFcil/EoqqZF60pGuJ2v2Ae1OJTUp3DJnjOJMqrpkmKB904w==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/node": { - "version": "10.12.10", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.10.tgz", - "integrity": "sha512-8xZEYckCbUVgK8Eg7lf5Iy4COKJ5uXlnIOnePN0WUwSQggy9tolM+tDJf7wMOnT/JT/W9xDYIaYggt3mRV2O5w==", - "dev": true - }, "@types/parsimmon": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/@types/parsimmon/-/parsimmon-1.10.0.tgz", @@ -216,15 +201,7 @@ "fs-promise": "^2.0.0", "strip-json-comments": "^2.0.1", "tslint": "^5.9.1", - "typescript": "^3.3.0-dev.20181130" - }, - "dependencies": { - "typescript": { - "version": "3.3.0-dev.20181130", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.3.0-dev.20181130.tgz", - "integrity": "sha512-18QC4WaZ15W2GcpjFAqXqt31Vugitc6QWHUjS7OiEBUYnfAtql2gWMs18Q5FX617QAfyTBpOp1KH8TQ/1Uem3Q==", - "dev": true - } + "typescript": "^3.3.0-dev.20181201" } }, "elliptic": { @@ -692,9 +669,9 @@ } }, "typescript": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.2.1.tgz", - "integrity": "sha512-jw7P2z/h6aPT4AENXDGjcfHTu5CSqzsbZc6YlUIebTyBAq8XaKp78x7VcSh30xwSCcsu5irZkYZUSFP1MrAMbg==", + "version": "3.3.0-dev.20181201", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.3.0-dev.20181201.tgz", + "integrity": "sha512-s6U94E8viHQrFuOrBv4fa9hs2YKk4Qqob03LdXzCXos37JbY7iGQY5Ol68aOEzXVByqcixMex1BkQSGuwsJyUA==", "dev": true }, "underscore-es": { diff --git a/packages/web3-utils/package.json b/packages/web3-utils/package.json index 740e55e6e6d..c73139908ec 100644 --- a/packages/web3-utils/package.json +++ b/packages/web3-utils/package.json @@ -29,8 +29,6 @@ "index.d.ts" ], "devDependencies": { - "@types/bn.js": "^4.11.3", - "dtslint": "^0.3.0", - "typescript": "^3.2.1" + "dtslint": "^0.3.0" } } From b2969f92820a7e5269ae6398a5bb97af9eba462a Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Sat, 1 Dec 2018 09:17:33 +0000 Subject: [PATCH 12/62] deleted huge test file to split in single files --- packages/web3-utils/types/test.ts | 1116 ----------------------------- 1 file changed, 1116 deletions(-) delete mode 100644 packages/web3-utils/types/test.ts diff --git a/packages/web3-utils/types/test.ts b/packages/web3-utils/types/test.ts deleted file mode 100644 index 0ae9f80d71b..00000000000 --- a/packages/web3-utils/types/test.ts +++ /dev/null @@ -1,1116 +0,0 @@ -/* - This file is part of web3.js. - web3.js is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - web3.js is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with web3.js. If not, see . -*/ -/** - * @file test.ts - please do not worry about the red underlines, we need to test for bad types - * so we are passing in bad types on purpose - * @author Josh Stevens - * @date 2018 - */ - -import { - isBN, - BN, - isBigNumber, - toBN, - toTwosComplement, - isAddress, - isHex, - isHexStrict, - asciiToHex, - hexToAscii, - toAscii, - bytesToHex, - numberToHex, - checkAddressChecksum, - fromAscii, - fromDecimal, - fromUtf8, - fromWei, - hexToBytes, - hexToNumber, - hexToNumberString, - hexToString, - hexToUtf8, - keccak256, - padLeft, - leftPad, - rightPad, - padRight, - sha3, - randomHex, - utf8ToHex, - stringToHex, - toChecksumAddress, - toDecimal, - toHex, - toUtf8, - toWei, - isBloom, - isTopic, - _fireError, - _jsonInterfaceMethodToString, - _flattenTypes, - soliditySha3, - getUnitValue, - unitMap, - testAddress, - testTopic -} from 'utils'; - -const bigNumber = new BN(3); - -// isBN Tests - -isBN(7); // $ExpectType boolean -isBN('4325'); // $ExpectType boolean -// $ExpectError -isBN({}); -// $ExpectError -isBN(true); -// $ExpectError -isBN(bigNumber); -// $ExpectError -isBN(['string']); -// $ExpectError -isBN([4]); -// $ExpectError -isBN(null); -// $ExpectError -isBN(undefined); - -// isBigNumber Tests - -isBigNumber(bigNumber); // $ExpectType boolean - -// $ExpectError -isBigNumber(7); -// $ExpectError -isBigNumber('4325'); -// $ExpectError -isBigNumber({}); -// $ExpectError -isBigNumber(true); -// $ExpectError -isBigNumber(['string']); -// $ExpectError -isBigNumber([4]); -// $ExpectError -isBigNumber(null); -// $ExpectError -isBigNumber(undefined); - -// toBN Tests - -toBN(4); // $ExpectType BN -toBN('443'); // $ExpectType BN - -// $ExpectError -toBN({}); -// $ExpectError -toBN(true); -// $ExpectError -toBN(['string']); -// $ExpectError -toBN([4]); -// $ExpectError -toBN(null); -// $ExpectError -toBN(undefined); - -// toTwosComplement Tests - -toTwosComplement(4); // $ExpectType string -toTwosComplement('443'); // $ExpectType string -toTwosComplement(bigNumber); // $ExpectType string - -// $ExpectError -toTwosComplement({}); -// $ExpectError -toTwosComplement(true); -// $ExpectError -toTwosComplement(['string']); -// $ExpectError -toTwosComplement([4]); -// $ExpectError -toTwosComplement(null); -// $ExpectError -toTwosComplement(undefined); - -// isAddress Tests - -isAddress('0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); // $ExpectType boolean - -// $ExpectError -isAddress(4); -// $ExpectError -isAddress(bigNumber); -// $ExpectError -isAddress({}); -// $ExpectError -isAddress(true); -// $ExpectError -isAddress(['string']); -// $ExpectError -isAddress([4]); -// $ExpectError -isAddress(null); -// $ExpectError -isAddress(undefined); - -// isHex Tests - -isHex('0xc1912'); // $ExpectType boolean -isHex(345) // $ExpectType boolean - -// $ExpectError -isHex(bigNumber); -// $ExpectError -isHex({}); -// $ExpectError -isHex(true); -// $ExpectError -isHex(['string']); -// $ExpectError -isHex([4]); -// $ExpectError -isHex(null); -// $ExpectError -isHex(undefined); - -// isHexStrict Tests - -isHexStrict('0xc1912'); // $ExpectType boolean -isHexStrict(345) // $ExpectType boolean - -// $ExpectError -isHexStrict(bigNumber); -// $ExpectError -isHexStrict({}); -// $ExpectError -isHexStrict(true); -// $ExpectError -isHexStrict(['string']); -// $ExpectError -isHexStrict([4]); -// $ExpectError -isHexStrict(null); -// $ExpectError -isHexStrict(undefined); - -// asciiToHex Tests - -asciiToHex('I have 100!'); // $ExpectType string - -// $ExpectError -asciiToHex(345); -// $ExpectError -asciiToHex(bigNumber); -// $ExpectError -asciiToHex({}); -// $ExpectError -asciiToHex(true); -// $ExpectError -asciiToHex(['string']); -// $ExpectError -asciiToHex([4]); -// $ExpectError -asciiToHex(null); -// $ExpectError -asciiToHex(undefined); - -// hexToAscii Tests - -hexToAscii('0x4920686176652031303021'); // $ExpectType string - -// $ExpectError -hexToAscii(345); -// $ExpectError -hexToAscii(bigNumber); -// $ExpectError -hexToAscii({}); -// $ExpectError -hexToAscii(true); -// $ExpectError -hexToAscii(['string']); -// $ExpectError -hexToAscii([4]); -// $ExpectError -hexToAscii(null); -// $ExpectError -hexToAscii(undefined); - -// toAscii Tests - -toAscii('0x4920686176652031303021'); // $ExpectType string - -// $ExpectError -toAscii(345); -// $ExpectError -toAscii(bigNumber); -// $ExpectError -toAscii({}); -// $ExpectError -toAscii(true); -// $ExpectError -toAscii(['string']); -// $ExpectError -toAscii([4]); -// $ExpectError -toAscii(null); -// $ExpectError -toAscii(undefined); - -// bytesToHex Tests - -bytesToHex([ 72, 101, 108, 108, 111, 33, 36 ]); // $ExpectType string - -// $ExpectError -bytesToHex([ '72', 101, 108, 108, 111, 33, 36 ]); -// $ExpectError -bytesToHex(345); -// $ExpectError -bytesToHex(bigNumber); -// $ExpectError -bytesToHex({}); -// $ExpectError -bytesToHex(true); -// $ExpectError -bytesToHex(['string']); -// $ExpectError -bytesToHex(null); -// $ExpectError -bytesToHex(undefined); - -// numberToHex Tests - -numberToHex('232'); // $ExpectType string -numberToHex(232); // $ExpectType string -numberToHex(bigNumber); // $ExpectType string - -// $ExpectError -numberToHex(['72']); -// $ExpectError -numberToHex([4]); -// $ExpectError -numberToHex([ 36 ]); -// $ExpectError -numberToHex({}); -// $ExpectError -numberToHex(true); -// $ExpectError -numberToHex(null); -// $ExpectError -numberToHex(undefined); - -// checkAddressChecksum Tests - -checkAddressChecksum('0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); // $ExpectType boolean - -// $ExpectError -checkAddressChecksum([4]); -// $ExpectError -checkAddressChecksum([ 36 ]); -// $ExpectError -checkAddressChecksum(345); -// $ExpectError -checkAddressChecksum(bigNumber); -// $ExpectError -checkAddressChecksum({}); -// $ExpectError -checkAddressChecksum(true); -// $ExpectError -checkAddressChecksum(null); -// $ExpectError -checkAddressChecksum(undefined); - -// fromAscii Tests - -fromAscii('I have 100!'); // $ExpectType string - -// $ExpectError -fromAscii(345); -// $ExpectError -fromAscii(bigNumber); -// $ExpectError -fromAscii({}); -// $ExpectError -fromAscii(true); -// $ExpectError -fromAscii(['string']); -// $ExpectError -fromAscii([4]); -// $ExpectError -fromAscii(null); -// $ExpectError -fromAscii(undefined); - -// fromDecimal Tests - -fromDecimal('232'); // $ExpectType string -fromDecimal(232); // $ExpectType string - -// $ExpectError -fromDecimal(bigNumber); -// $ExpectError -fromDecimal(['string']); -// $ExpectError -fromDecimal([4]); -// $ExpectError -fromDecimal({}); -// $ExpectError -fromDecimal(true); -// $ExpectError -fromDecimal(null); -// $ExpectError -fromDecimal(undefined); - -// fromUtf8 Tests - -fromUtf8('I have 100£'); // $ExpectType string - -// $ExpectError -fromUtf8(232); -// $ExpectError -fromUtf8(bigNumber); -// $ExpectError -fromUtf8(['string']); -// $ExpectError -fromUtf8([4]); -// $ExpectError -fromUtf8({}); -// $ExpectError -fromUtf8(true); -// $ExpectError -fromUtf8(null); -// $ExpectError -fromUtf8(undefined); - -// fromWei Tests - -fromWei(bigNumber); // $ExpectType string | BN -fromWei(bigNumber, 'ether'); // $ExpectType string | BN - -// $ExpectError -fromWei(232); -// $ExpectError -fromWei(['string']); -// $ExpectError -fromWei([4]); -// $ExpectError -fromWei({}); -// $ExpectError -fromWei(true); -// $ExpectError -fromWei(null); -// $ExpectError -fromWei(undefined); -// $ExpectError -fromWei(bigNumber, 'blah'); - -// hexToBytes Tests - -hexToBytes('0x000000ea'); // $ExpectType number[] -hexToBytes(0x000000ea); // $ExpectType number[] - -// $ExpectError -hexToBytes([4]); -// $ExpectError -hexToBytes(['string']); -// $ExpectError -hexToBytes(bigNumber); -// $ExpectError -hexToBytes({}); -// $ExpectError -hexToBytes(true); -// $ExpectError -hexToBytes(null); -// $ExpectError -hexToBytes(undefined); - -// hexToNumber Tests - -hexToNumber('232'); // $ExpectType number -hexToNumber(232); // $ExpectType number - -// $ExpectError -hexToNumber(bigNumber); -// $ExpectError -hexToNumber(['string']); -// $ExpectError -hexToNumber([4]); -// $ExpectError -hexToNumber({}); -// $ExpectError -hexToNumber(true); -// $ExpectError -hexToNumber(null); -// $ExpectError -hexToNumber(undefined); - -// hexToNumberString Tests - -hexToNumberString('0xea'); // $ExpectType string -hexToNumberString(0xea); // $ExpectType string - -// $ExpectError -hexToNumberString(bigNumber); -// $ExpectError -hexToNumberString(['string']); -// $ExpectError -hexToNumberString([4]); -// $ExpectError -hexToNumberString({}); -// $ExpectError -hexToNumberString(true); -// $ExpectError -hexToNumberString(null); -// $ExpectError -hexToNumberString(undefined); - -// hexToString Tests - -hexToString('0x49206861766520313030e282ac'); // $ExpectType string -hexToString(0x49206861766520313030e282ac); // $ExpectType string - -// $ExpectError -hexToString(bigNumber); -// $ExpectError -hexToString(['string']); -// $ExpectError -hexToString([4]); -// $ExpectError -hexToString({}); -// $ExpectError -hexToString(true); -// $ExpectError -hexToString(null); -// $ExpectError -hexToString(undefined); - -// hexToUtf8 Tests - -hexToUtf8('0x49206861766520313030e282ac'); // $ExpectType string - -// $ExpectError -hexToUtf8(656); -// $ExpectError -hexToUtf8(bigNumber); -// $ExpectError -hexToUtf8(['string']); -// $ExpectError -hexToUtf8([4]); -// $ExpectError -hexToUtf8({}); -// $ExpectError -hexToUtf8(true); -// $ExpectError -hexToUtf8(null); -// $ExpectError -hexToUtf8(undefined); - -// keccak256 Tests - -keccak256('234'); // $ExpectType string -keccak256(bigNumber); // $ExpectType string - -// $ExpectError -keccak256(['string']); -// $ExpectError -keccak256(234); -// $ExpectError -keccak256([4]); -// $ExpectError -keccak256({}); -// $ExpectError -keccak256(true); -// $ExpectError -keccak256(null); -// $ExpectError -keccak256(undefined); - -// padLeft Tests - -padLeft('0x3456ff', 20); // $ExpectType string -padLeft(0x3456ff, 20); // $ExpectType string -padLeft('Hello', 20, 'x'); // $ExpectType string - -// $ExpectError -padLeft(bigNumber, 20); -// $ExpectError -padLeft(['string'], 20); -// $ExpectError -padLeft([4], 20); -// $ExpectError -padLeft({}, 20); -// $ExpectError -padLeft(true, 20); -// $ExpectError -padLeft(null, 20); -// $ExpectError -padLeft(undefined, 20); -// $ExpectError -padLeft('0x3456ff', bigNumber); -// $ExpectError -padLeft('0x3456ff', ['string']); -// $ExpectError -padLeft('0x3456ff', [4]); -// $ExpectError -padLeft('0x3456ff', {}); -// $ExpectError -padLeft('0x3456ff', true); -// $ExpectError -padLeft('0x3456ff', null); -// $ExpectError -padLeft('0x3456ff', undefined); -// $ExpectError -padLeft('Hello', 20, bigNumber); -// $ExpectError -padLeft('Hello', 20, ['string']); -// $ExpectError -padLeft('Hello', 20, [4]); -// $ExpectError -padLeft('Hello', 20, {}); -// $ExpectError -padLeft('Hello', 20, true); -// $ExpectError -padLeft('Hello', 20, null); - -// leftPad Tests - -leftPad('0x3456ff', 20); // $ExpectType string -leftPad(0x3456ff, 20); // $ExpectType string -leftPad('Hello', 20, 'x'); // $ExpectType string - -// $ExpectError -leftPad(bigNumber, 20); -// $ExpectError -leftPad(['string'], 20); -// $ExpectError -leftPad([4], 20); -// $ExpectError -leftPad({}, 20); -// $ExpectError -leftPad(true, 20); -// $ExpectError -leftPad(null, 20); -// $ExpectError -leftPad(undefined, 20); -// $ExpectError -leftPad('0x3456ff', bigNumber); -// $ExpectError -leftPad('0x3456ff', ['string']); -// $ExpectError -leftPad('0x3456ff', [4]); -// $ExpectError -leftPad('0x3456ff', {}); -// $ExpectError -leftPad('0x3456ff', true); -// $ExpectError -leftPad('0x3456ff', null); -// $ExpectError -leftPad('0x3456ff', undefined); -// $ExpectError -leftPad('Hello', 20, bigNumber); -// $ExpectError -leftPad('Hello', 20, ['string']); -// $ExpectError -leftPad('Hello', 20, [4]); -// $ExpectError -leftPad('Hello', 20, {}); -// $ExpectError -leftPad('Hello', 20, true); -// $ExpectError -leftPad('Hello', 20, null); - -// rightPad Tests - -rightPad('0x3456ff', 20); // $ExpectType string -rightPad(0x3456ff, 20); // $ExpectType string -rightPad('Hello', 20, 'x'); // $ExpectType string - -// $ExpectError -rightPad(bigNumber, 20); -// $ExpectError -rightPad(['string'], 20); -// $ExpectError -rightPad([4], 20); -// $ExpectError -rightPad({}, 20); -// $ExpectError -rightPad(true, 20); -// $ExpectError -rightPad(null, 20); -// $ExpectError -rightPad(undefined, 20); -// $ExpectError -rightPad('0x3456ff', bigNumber); -// $ExpectError -rightPad('0x3456ff', ['string']); -// $ExpectError -rightPad('0x3456ff', [4]); -// $ExpectError -rightPad('0x3456ff', {}); -// $ExpectError -rightPad('0x3456ff', true); -// $ExpectError -rightPad('0x3456ff', null); -// $ExpectError -rightPad('0x3456ff', undefined); -// $ExpectError -rightPad('Hello', 20, bigNumber); -// $ExpectError -rightPad('Hello', 20, ['string']); -// $ExpectError -rightPad('Hello', 20, [4]); -// $ExpectError -rightPad('Hello', 20, {}); -// $ExpectError -rightPad('Hello', 20, true); -// $ExpectError -rightPad('Hello', 20, null); - -// padRight Tests - -padRight('0x3456ff', 20); // $ExpectType string -padRight(0x3456ff, 20); // $ExpectType string -padRight('Hello', 20, 'x'); // $ExpectType string - -// $ExpectError -padRight(bigNumber, 20); -// $ExpectError -padRight(['string'], 20); -// $ExpectError -padRight([4], 20); -// $ExpectError -padRight({}, 20); -// $ExpectError -padRight(true, 20); -// $ExpectError -padRight(null, 20); -// $ExpectError -padRight(undefined, 20); -// $ExpectError -padRight('0x3456ff', bigNumber); -// $ExpectError -padRight('0x3456ff', ['string']); -// $ExpectError -padRight('0x3456ff', [4]); -// $ExpectError -padRight('0x3456ff', {}); -// $ExpectError -padRight('0x3456ff', true); -// $ExpectError -padRight('0x3456ff', null); -// $ExpectError -padRight('0x3456ff', undefined); -// $ExpectError -padRight('Hello', 20, bigNumber); -// $ExpectError -padRight('Hello', 20, ['string']); -// $ExpectError -padRight('Hello', 20, [4]); -// $ExpectError -padRight('Hello', 20, {}); -// $ExpectError -padRight('Hello', 20, true); -// $ExpectError -padRight('Hello', 20, null); - -// sha3 Tests - -sha3('234'); // $ExpectType string -sha3(bigNumber); // $ExpectType string - -// $ExpectError -sha3(['string']); -// $ExpectError -sha3(234); -// $ExpectError -sha3([4]); -// $ExpectError -sha3({}); -// $ExpectError -sha3(true); -// $ExpectError -sha3(null); -// $ExpectError -sha3(undefined); - -// randomHex Tests - -randomHex(32); // $ExpectType string - -// $ExpectError -randomHex('234'); -// $ExpectError -randomHex(bigNumber); -// $ExpectError -randomHex(['string']); -// $ExpectError -randomHex([4]); -// $ExpectError -randomHex({}); -// $ExpectError -randomHex(true); -// $ExpectError -randomHex(null); -// $ExpectError -randomHex(undefined); - -// utf8ToHex Tests - -utf8ToHex('I have 100£'); // $ExpectType string - -// $ExpectError -utf8ToHex(232); -// $ExpectError -utf8ToHex(bigNumber); -// $ExpectError -utf8ToHex(['string']); -// $ExpectError -utf8ToHex([4]); -// $ExpectError -utf8ToHex({}); -// $ExpectError -utf8ToHex(true); -// $ExpectError -utf8ToHex(null); -// $ExpectError -utf8ToHex(undefined); - -// stringToHex Tests - -stringToHex('I have 100£'); // $ExpectType string - -// $ExpectError -stringToHex(232); -// $ExpectError -stringToHex(bigNumber); -// $ExpectError -stringToHex(['string']); -// $ExpectError -stringToHex([4]); -// $ExpectError -stringToHex({}); -// $ExpectError -stringToHex(true); -// $ExpectError -stringToHex(null); -// $ExpectError -stringToHex(undefined); - -// toChecksumAddress Tests - -toChecksumAddress('0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); // $ExpectType string - -// $ExpectError -toChecksumAddress([4]); -// $ExpectError -toChecksumAddress(['string']); -// $ExpectError -toChecksumAddress(345); -// $ExpectError -toChecksumAddress(bigNumber); -// $ExpectError -toChecksumAddress({}); -// $ExpectError -toChecksumAddress(true); -// $ExpectError -toChecksumAddress(null); -// $ExpectError -toChecksumAddress(undefined); - -// toDecimal Tests - -toDecimal('232'); // $ExpectType number -toDecimal(232); // $ExpectType number - -// $ExpectError -toDecimal(bigNumber); -// $ExpectError -toDecimal(['string']); -// $ExpectError -toDecimal([4]); -// $ExpectError -toDecimal({}); -// $ExpectError -toDecimal(true); -// $ExpectError -toDecimal(null); -// $ExpectError -toDecimal(undefined); - -// toHex Tests - -toHex('234'); // $ExpectType string -toHex(234); // $ExpectType string -toHex(bigNumber); // $ExpectType string - -// $ExpectError -toHex(['string']); -// $ExpectError -toHex(true); -// $ExpectError -toHex([4]); -// $ExpectError -toHex({}); -// $ExpectError -toHex(null); -// $ExpectError -toHex(undefined); - -// toUtf8 Tests - -toUtf8('0x49206861766520313030e282ac'); // $ExpectType string - -// $ExpectError -toUtf8(656); -// $ExpectError -toUtf8(bigNumber); -// $ExpectError -toUtf8(['string']); -// $ExpectError -toUtf8([4]); -// $ExpectError -toUtf8({}); -// $ExpectError -toUtf8(true); -// $ExpectError -toUtf8(null); -// $ExpectError -toUtf8(undefined); - -// toWei Tests - -toWei('1'); // $ExpectType string | BN -toWei(1); // $ExpectType string | BN -toWei(bigNumber); // $ExpectType string | BN -toWei('1', 'finney'); // $ExpectType string | BN -toWei(1, 'finney'); // $ExpectType string | BN -toWei(bigNumber, 'finney'); // $ExpectType string | BN - -// $ExpectError -toWei(['string']); -// $ExpectError -toWei([4]); -// $ExpectError -toWei({}); -// $ExpectError -toWei(true); -// $ExpectError -toWei(null); -// $ExpectError -toWei(undefined); -// $ExpectError -toWei(1 , 'blah'); - -// isBloom Tests - -isBloom('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef'); // $ExpectType boolean - -// $ExpectError -isBloom(656); -// $ExpectError -isBloom(bigNumber); -// $ExpectError -isBloom(['string']); -// $ExpectError -isBloom([4]); -// $ExpectError -isBloom({}); -// $ExpectError -isBloom(true); -// $ExpectError -isBloom(null); -// $ExpectError -isBloom(undefined); - -// isTopic Tests - -isTopic('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef'); // $ExpectType boolean - -// $ExpectError -isTopic(656); -// $ExpectError -isTopic(bigNumber); -// $ExpectError -isTopic(['string']); -// $ExpectError -isTopic([4]); -// $ExpectError -isTopic({}); -// $ExpectError -isTopic(true); -// $ExpectError -isTopic(null); -// $ExpectError -isTopic(undefined); - -// _fireError Tests - -_fireError(new Error('error'), {}, (error) => { console.log(error); }, (error) => { console.log(error); }); // $ExpectType {} -_fireError('error', {}, (error) => { console.log(error); }, (error) => { console.log(error); }); // $ExpectType {} -_fireError({ message: 'hey', data: 'test' }, {}, (error) => { console.log(error); }, (error) => { console.log(error); }); // $ExpectType {} -_fireError({ message: 'hey', data: {} }, {}, (error) => { console.log(error); }, (error) => { console.log(error); }); // $ExpectType {} -_fireError({ message: 'hey', data: ['test'] }, {}, (error) => { console.log(error); }, (error) => { console.log(error); }); // $ExpectType {} - -// _jsonInterfaceMethodToString Tests - -_jsonInterfaceMethodToString({}); // $ExpectType string - -// _flattenTypes Tests - -_flattenTypes(true, {}); // $ExpectType string[] -_flattenTypes(false, {}); // $ExpectType string[] - -// $ExpectError -_flattenTypes(true, null); -// $ExpectError -_flattenTypes(true, undefined); -// $ExpectError -_flattenTypes(656, {}); -// $ExpectError -_flattenTypes(bigNumber, {}); -// $ExpectError -_flattenTypes(['string'], {}); -// $ExpectError -_flattenTypes([4], {}); -// $ExpectError -_flattenTypes('string', {}); -// $ExpectError -_flattenTypes(null, {}); -// $ExpectError -_flattenTypes(undefined, {}); - -// soliditySha3 Tests - -soliditySha3('234564535', '0xfff23243', true, -10); // $ExpectType string -soliditySha3('Hello!%'); // $ExpectType string -soliditySha3('234'); // $ExpectType string -soliditySha3(0xea); // $ExpectType string -soliditySha3(bigNumber); // $ExpectType string -soliditySha3({type: 'uint256', value: '234'}); // $ExpectType string -soliditySha3({t: 'uint', v: new BN('234')}); // $ExpectType string -soliditySha3({t: 'string', v: 'Hello!%'}, {t: 'int8', v: -23}, {t: 'address', v: '0x85F43D8a49eeB85d32Cf465507DD71d507100C1d'}); // $ExpectType string -soliditySha3('0x407D73d8a49eeb85D32Cf465507dd71d507100c1'); // $ExpectType string - -// $ExpectError -soliditySha3(['hey']); -// $ExpectError -soliditySha3([34]); -// $ExpectError -soliditySha3(null); -// $ExpectError -soliditySha3(undefined); - -// getUnitValue Tests - -getUnitValue('ether'); // $ExpectType string - -// $ExpectError -getUnitValue('fake'); -// $ExpectError -getUnitValue(656); -// $ExpectError -getUnitValue(bigNumber); -// $ExpectError -getUnitValue(['string']); -// $ExpectError -getUnitValue([4]); -// $ExpectError -getUnitValue({}); -// $ExpectError -getUnitValue(true); -// $ExpectError -getUnitValue(null); -// $ExpectError -getUnitValue(undefined); - -// unitMap Tests - -unitMap(); // $ExpectType Units - -// testAddress Tests - -testAddress('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', '0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); // $ExpectType boolean - -// $ExpectError -testAddress(656, '0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); -// $ExpectError -testAddress(bigNumber, '0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); -// $ExpectError -testAddress(['string'], '0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); -// $ExpectError -testAddress([4], '0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); -// $ExpectError -testAddress({}, '0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); -// $ExpectError -testAddress(true, '0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); -// $ExpectError -testAddress(null, '0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); -// $ExpectError -testAddress(undefined, '0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); -// $ExpectError -testAddress('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', 656); -// $ExpectError -testAddress('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', bigNumber); -// $ExpectError -testAddress('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', ['string']); -// $ExpectError -testAddress('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', [4]); -// $ExpectError -testAddress('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', {}); -// $ExpectError -testAddress('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', true); -// $ExpectError -testAddress('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', null); -// $ExpectError -testAddress('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', undefined); - -// testTopic Tests - -testTopic('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', '0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); // $ExpectType boolean - -// $ExpectError -testTopic(656, '0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); -// $ExpectError -testTopic(bigNumber, '0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); -// $ExpectError -testTopic(['string'], '0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); -// $ExpectError -testTopic([4], '0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); -// $ExpectError -testTopic({}, '0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); -// $ExpectError -testTopic(true, '0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); -// $ExpectError -testTopic(null, '0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); -// $ExpectError -testTopic(undefined, '0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); -// $ExpectError -testTopic('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', 656); -// $ExpectError -testTopic('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', bigNumber); -// $ExpectError -testTopic('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', ['string']); -// $ExpectError -testTopic('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', [4]); -// $ExpectError -testTopic('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', {}); -// $ExpectError -testTopic('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', true); -// $ExpectError -testTopic('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', null); -// $ExpectError -testTopic('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', undefined); From 7a9d77a8b75a5e15f56f891e7f0f83d50941e7eb Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Sat, 1 Dec 2018 09:17:42 +0000 Subject: [PATCH 13/62] remove comments --- packages/web3-utils/types/tsconfig.json | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/web3-utils/types/tsconfig.json b/packages/web3-utils/types/tsconfig.json index 1313f67efdf..120865e21e3 100644 --- a/packages/web3-utils/types/tsconfig.json +++ b/packages/web3-utils/types/tsconfig.json @@ -9,10 +9,9 @@ "strictFunctionTypes": true, "noEmit": true, "allowSyntheticDefaultImports": true, - - // If the library is an external module (uses `export`), this allows your test file to import "mylib" instead of "./index". - // If the library is global (cannot be imported via `import` or `require`), leave this out. "baseUrl": ".", - "paths": { "utils": ["."] } + "paths": { + "utils": ["."] + } } } From bd75fa109e14453cf5f4da06d3b857de507491bc Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Sat, 1 Dec 2018 09:17:52 +0000 Subject: [PATCH 14/62] added some more rules for our test files --- packages/web3-utils/types/tslint.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/web3-utils/types/tslint.json b/packages/web3-utils/types/tslint.json index 8ba5237b0b4..f5f2f85ed20 100644 --- a/packages/web3-utils/types/tslint.json +++ b/packages/web3-utils/types/tslint.json @@ -2,6 +2,7 @@ "extends": "dtslint/dtslint.json", "rules": { "semicolon": false, - "no-import-default-of-export-equals": false + "no-import-default-of-export-equals": false, + "file-name-casing": [true, "kebab-case"] } } From b58a0fce4b156001bc8e0c023c57d02926ac91da Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Sat, 1 Dec 2018 09:18:17 +0000 Subject: [PATCH 15/62] `asciiToHex` tests --- .../types/tests/ascii-to-hex-tests.ts | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 packages/web3-utils/types/tests/ascii-to-hex-tests.ts diff --git a/packages/web3-utils/types/tests/ascii-to-hex-tests.ts b/packages/web3-utils/types/tests/ascii-to-hex-tests.ts new file mode 100644 index 00000000000..23b36146910 --- /dev/null +++ b/packages/web3-utils/types/tests/ascii-to-hex-tests.ts @@ -0,0 +1,41 @@ +/* + This file is part of web3.js. + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file index.d.ts + * @author Josh Stevens + * @date 2018 + */ + +import { asciiToHex, BN } from "utils"; + +const bigNumber = new BN(3); + +asciiToHex('I have 100!'); // $ExpectType string + +// $ExpectError +asciiToHex(345); +// $ExpectError +asciiToHex(bigNumber); +// $ExpectError +asciiToHex({}); +// $ExpectError +asciiToHex(true); +// $ExpectError +asciiToHex(['string']); +// $ExpectError +asciiToHex([4]); +// $ExpectError +asciiToHex(null); +// $ExpectError +asciiToHex(undefined); From 390f76d08852511f016464eec482481653d6c804 Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Sat, 1 Dec 2018 09:18:26 +0000 Subject: [PATCH 16/62] `bytesToHex` tests --- .../types/tests/bytes-to-hex-tests.ts | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 packages/web3-utils/types/tests/bytes-to-hex-tests.ts diff --git a/packages/web3-utils/types/tests/bytes-to-hex-tests.ts b/packages/web3-utils/types/tests/bytes-to-hex-tests.ts new file mode 100644 index 00000000000..48008e8892b --- /dev/null +++ b/packages/web3-utils/types/tests/bytes-to-hex-tests.ts @@ -0,0 +1,41 @@ +/* + This file is part of web3.js. + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file index.d.ts + * @author Josh Stevens + * @date 2018 + */ + +import { BN, bytesToHex } from "utils"; + +const bigNumber = new BN(3); + +bytesToHex([ 72, 101, 108, 108, 111, 33, 36 ]); // $ExpectType string + +// $ExpectError +bytesToHex([ '72', 101, 108, 108, 111, 33, 36 ]); +// $ExpectError +bytesToHex(345); +// $ExpectError +bytesToHex(bigNumber); +// $ExpectError +bytesToHex({}); +// $ExpectError +bytesToHex(true); +// $ExpectError +bytesToHex(['string']); +// $ExpectError +bytesToHex(null); +// $ExpectError +bytesToHex(undefined); From 494ab3b2bdecd695b099be025923f50e15b4dfbf Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Sat, 1 Dec 2018 09:18:35 +0000 Subject: [PATCH 17/62] `checkAddressChecksum` tests --- .../tests/check-address-checksum-tests.ts | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 packages/web3-utils/types/tests/check-address-checksum-tests.ts diff --git a/packages/web3-utils/types/tests/check-address-checksum-tests.ts b/packages/web3-utils/types/tests/check-address-checksum-tests.ts new file mode 100644 index 00000000000..5fc197dfb6a --- /dev/null +++ b/packages/web3-utils/types/tests/check-address-checksum-tests.ts @@ -0,0 +1,41 @@ +/* + This file is part of web3.js. + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file index.d.ts + * @author Josh Stevens + * @date 2018 + */ + +import { BN, checkAddressChecksum } from "utils"; + +const bigNumber = new BN(3); + +checkAddressChecksum('0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); // $ExpectType boolean + +// $ExpectError +checkAddressChecksum([4]); +// $ExpectError +checkAddressChecksum([ 36 ]); +// $ExpectError +checkAddressChecksum(345); +// $ExpectError +checkAddressChecksum(bigNumber); +// $ExpectError +checkAddressChecksum({}); +// $ExpectError +checkAddressChecksum(true); +// $ExpectError +checkAddressChecksum(null); +// $ExpectError +checkAddressChecksum(undefined); From 75c0c5bfac11d9e80205edaa91f8f33587ebed6b Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Sat, 1 Dec 2018 09:18:44 +0000 Subject: [PATCH 18/62] `_fireError` tests --- .../types/tests/fire-error-tests.ts | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 packages/web3-utils/types/tests/fire-error-tests.ts diff --git a/packages/web3-utils/types/tests/fire-error-tests.ts b/packages/web3-utils/types/tests/fire-error-tests.ts new file mode 100644 index 00000000000..77cf45780dd --- /dev/null +++ b/packages/web3-utils/types/tests/fire-error-tests.ts @@ -0,0 +1,26 @@ +/* + This file is part of web3.js. + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file index.d.ts + * @author Josh Stevens + * @date 2018 + */ + +import { _fireError } from "utils"; + +_fireError(new Error('error'), {}, (error: Error) => { console.log(error); }, (error: Error) => { console.log(error); }); // $ExpectType {} +_fireError('error', {}, (error: Error) => { console.log(error); }, (error: Error) => { console.log(error); }); // $ExpectType {} +_fireError({ message: 'hey', data: 'test' }, {}, (error: Error) => { console.log(error); }, (error: Error) => { console.log(error); }); // $ExpectType {} +_fireError({ message: 'hey', data: {} }, {}, (error: Error) => { console.log(error); }, (error: Error) => { console.log(error); }); // $ExpectType {} +_fireError({ message: 'hey', data: ['test'] }, {}, (error: Error) => { console.log(error); }, (error: Error) => { console.log(error); }); // $ExpectType {} From 3755e4674ffffa6785d3d4aa6db538c353c54a5c Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Sat, 1 Dec 2018 09:18:52 +0000 Subject: [PATCH 19/62] `_flattenTypes` tests --- .../types/tests/flatten-types-tests.ts | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 packages/web3-utils/types/tests/flatten-types-tests.ts diff --git a/packages/web3-utils/types/tests/flatten-types-tests.ts b/packages/web3-utils/types/tests/flatten-types-tests.ts new file mode 100644 index 00000000000..b4ac7cb7d49 --- /dev/null +++ b/packages/web3-utils/types/tests/flatten-types-tests.ts @@ -0,0 +1,44 @@ +/* + This file is part of web3.js. + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file index.d.ts + * @author Josh Stevens + * @date 2018 + */ + +import { BN, _flattenTypes } from "utils"; + +const bigNumber = new BN(3); + +_flattenTypes(true, {}); // $ExpectType string[] +_flattenTypes(false, {}); // $ExpectType string[] + +// $ExpectError +_flattenTypes(true, null); +// $ExpectError +_flattenTypes(true, undefined); +// $ExpectError +_flattenTypes(656, {}); +// $ExpectError +_flattenTypes(bigNumber, {}); +// $ExpectError +_flattenTypes(['string'], {}); +// $ExpectError +_flattenTypes([4], {}); +// $ExpectError +_flattenTypes('string', {}); +// $ExpectError +_flattenTypes(null, {}); +// $ExpectError +_flattenTypes(undefined, {}); From f02c4a60a539e8968a97e0ade3f2db8bab4435a3 Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Sat, 1 Dec 2018 09:19:02 +0000 Subject: [PATCH 20/62] `fromAscii` tests --- .../types/tests/from-ascii-tests.ts | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 packages/web3-utils/types/tests/from-ascii-tests.ts diff --git a/packages/web3-utils/types/tests/from-ascii-tests.ts b/packages/web3-utils/types/tests/from-ascii-tests.ts new file mode 100644 index 00000000000..a65f87b509f --- /dev/null +++ b/packages/web3-utils/types/tests/from-ascii-tests.ts @@ -0,0 +1,41 @@ +/* + This file is part of web3.js. + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file index.d.ts + * @author Josh Stevens + * @date 2018 + */ + +import { BN, fromAscii } from "utils"; + +const bigNumber = new BN(3); + +fromAscii('I have 100!'); // $ExpectType string + +// $ExpectError +fromAscii(345); +// $ExpectError +fromAscii(bigNumber); +// $ExpectError +fromAscii({}); +// $ExpectError +fromAscii(true); +// $ExpectError +fromAscii(['string']); +// $ExpectError +fromAscii([4]); +// $ExpectError +fromAscii(null); +// $ExpectError +fromAscii(undefined); From 9eeb0a5e9906f01f7c0985a3f632d61262d1fa15 Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Sat, 1 Dec 2018 09:19:12 +0000 Subject: [PATCH 21/62] `fromDecimal` tests --- .../types/tests/from-decimal-tests.ts | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 packages/web3-utils/types/tests/from-decimal-tests.ts diff --git a/packages/web3-utils/types/tests/from-decimal-tests.ts b/packages/web3-utils/types/tests/from-decimal-tests.ts new file mode 100644 index 00000000000..f25fd82e356 --- /dev/null +++ b/packages/web3-utils/types/tests/from-decimal-tests.ts @@ -0,0 +1,40 @@ +/* + This file is part of web3.js. + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file index.d.ts + * @author Josh Stevens + * @date 2018 + */ + +import { BN, fromDecimal } from "utils"; + +const bigNumber = new BN(3); + +fromDecimal('232'); // $ExpectType string +fromDecimal(232); // $ExpectType string + +// $ExpectError +fromDecimal(bigNumber); +// $ExpectError +fromDecimal(['string']); +// $ExpectError +fromDecimal([4]); +// $ExpectError +fromDecimal({}); +// $ExpectError +fromDecimal(true); +// $ExpectError +fromDecimal(null); +// $ExpectError +fromDecimal(undefined); From a39995411fe191025b4099b1ea97b7b72c20745c Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Sat, 1 Dec 2018 09:19:28 +0000 Subject: [PATCH 22/62] `fromUtf8` tests --- .../web3-utils/types/tests/from-utf8-tests.ts | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 packages/web3-utils/types/tests/from-utf8-tests.ts diff --git a/packages/web3-utils/types/tests/from-utf8-tests.ts b/packages/web3-utils/types/tests/from-utf8-tests.ts new file mode 100644 index 00000000000..9d305c8f420 --- /dev/null +++ b/packages/web3-utils/types/tests/from-utf8-tests.ts @@ -0,0 +1,41 @@ +/* + This file is part of web3.js. + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file index.d.ts + * @author Josh Stevens + * @date 2018 + */ + +import { BN, fromUtf8 } from "utils"; + +const bigNumber = new BN(3); + +fromUtf8('I have 100£'); // $ExpectType string + +// $ExpectError +fromUtf8(232); +// $ExpectError +fromUtf8(bigNumber); +// $ExpectError +fromUtf8(['string']); +// $ExpectError +fromUtf8([4]); +// $ExpectError +fromUtf8({}); +// $ExpectError +fromUtf8(true); +// $ExpectError +fromUtf8(null); +// $ExpectError +fromUtf8(undefined); From c10a23ee7fe0c8163c07e3bde9f21c82f36a70d7 Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Sat, 1 Dec 2018 09:19:35 +0000 Subject: [PATCH 23/62] `fromWei` tests --- .../web3-utils/types/tests/from-wei-tests.ts | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 packages/web3-utils/types/tests/from-wei-tests.ts diff --git a/packages/web3-utils/types/tests/from-wei-tests.ts b/packages/web3-utils/types/tests/from-wei-tests.ts new file mode 100644 index 00000000000..2e7672990c0 --- /dev/null +++ b/packages/web3-utils/types/tests/from-wei-tests.ts @@ -0,0 +1,42 @@ +/* + This file is part of web3.js. + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file index.d.ts + * @author Josh Stevens + * @date 2018 + */ + +import { BN, fromWei } from "utils"; + +const bigNumber = new BN(3); + +fromWei(bigNumber); // $ExpectType string | BN +fromWei(bigNumber, 'ether'); // $ExpectType string | BN + +// $ExpectError +fromWei(232); +// $ExpectError +fromWei(['string']); +// $ExpectError +fromWei([4]); +// $ExpectError +fromWei({}); +// $ExpectError +fromWei(true); +// $ExpectError +fromWei(null); +// $ExpectError +fromWei(undefined); +// $ExpectError +fromWei(bigNumber, 'blah'); From 362b66d5b979cbe1283f60d3264b241726e9c9ee Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Sat, 1 Dec 2018 09:19:43 +0000 Subject: [PATCH 24/62] `getUnitValue` tests --- .../types/tests/get-unit-value-tests.ts | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 packages/web3-utils/types/tests/get-unit-value-tests.ts diff --git a/packages/web3-utils/types/tests/get-unit-value-tests.ts b/packages/web3-utils/types/tests/get-unit-value-tests.ts new file mode 100644 index 00000000000..22217c6193c --- /dev/null +++ b/packages/web3-utils/types/tests/get-unit-value-tests.ts @@ -0,0 +1,43 @@ +/* + This file is part of web3.js. + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file index.d.ts + * @author Josh Stevens + * @date 2018 + */ + +import { BN, getUnitValue } from "utils"; + +const bigNumber = new BN(3); + +getUnitValue('ether'); // $ExpectType string + +// $ExpectError +getUnitValue('fake'); +// $ExpectError +getUnitValue(656); +// $ExpectError +getUnitValue(bigNumber); +// $ExpectError +getUnitValue(['string']); +// $ExpectError +getUnitValue([4]); +// $ExpectError +getUnitValue({}); +// $ExpectError +getUnitValue(true); +// $ExpectError +getUnitValue(null); +// $ExpectError +getUnitValue(undefined); From 9d40f5b25b78d4deac8810270d96715a0d2b0248 Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Sat, 1 Dec 2018 09:19:53 +0000 Subject: [PATCH 25/62] hex tests --- .../types/tests/hex-to-ascii-tests.ts | 41 +++++++++++++++++++ .../types/tests/hex-to-bytes-tests.ts | 40 ++++++++++++++++++ .../types/tests/hex-to-number-string-tests.ts | 40 ++++++++++++++++++ .../types/tests/hex-to-number-tests.ts | 40 ++++++++++++++++++ .../types/tests/hex-to-string-tests.ts | 40 ++++++++++++++++++ .../types/tests/hex-to-utf8-tests.ts | 41 +++++++++++++++++++ 6 files changed, 242 insertions(+) create mode 100644 packages/web3-utils/types/tests/hex-to-ascii-tests.ts create mode 100644 packages/web3-utils/types/tests/hex-to-bytes-tests.ts create mode 100644 packages/web3-utils/types/tests/hex-to-number-string-tests.ts create mode 100644 packages/web3-utils/types/tests/hex-to-number-tests.ts create mode 100644 packages/web3-utils/types/tests/hex-to-string-tests.ts create mode 100644 packages/web3-utils/types/tests/hex-to-utf8-tests.ts diff --git a/packages/web3-utils/types/tests/hex-to-ascii-tests.ts b/packages/web3-utils/types/tests/hex-to-ascii-tests.ts new file mode 100644 index 00000000000..5e6602cff94 --- /dev/null +++ b/packages/web3-utils/types/tests/hex-to-ascii-tests.ts @@ -0,0 +1,41 @@ +/* + This file is part of web3.js. + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file index.d.ts + * @author Josh Stevens + * @date 2018 + */ + +import { BN, hexToAscii } from "utils"; + +const bigNumber = new BN(3); + +hexToAscii('0x4920686176652031303021'); // $ExpectType string + +// $ExpectError +hexToAscii(345); +// $ExpectError +hexToAscii(bigNumber); +// $ExpectError +hexToAscii({}); +// $ExpectError +hexToAscii(true); +// $ExpectError +hexToAscii(['string']); +// $ExpectError +hexToAscii([4]); +// $ExpectError +hexToAscii(null); +// $ExpectError +hexToAscii(undefined); diff --git a/packages/web3-utils/types/tests/hex-to-bytes-tests.ts b/packages/web3-utils/types/tests/hex-to-bytes-tests.ts new file mode 100644 index 00000000000..668e107cf29 --- /dev/null +++ b/packages/web3-utils/types/tests/hex-to-bytes-tests.ts @@ -0,0 +1,40 @@ +/* + This file is part of web3.js. + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file index.d.ts + * @author Josh Stevens + * @date 2018 + */ + +import { BN, hexToBytes } from "utils"; + +const bigNumber = new BN(3); + +hexToBytes('0x000000ea'); // $ExpectType number[] +hexToBytes(0x000000ea); // $ExpectType number[] + +// $ExpectError +hexToBytes([4]); +// $ExpectError +hexToBytes(['string']); +// $ExpectError +hexToBytes(bigNumber); +// $ExpectError +hexToBytes({}); +// $ExpectError +hexToBytes(true); +// $ExpectError +hexToBytes(null); +// $ExpectError +hexToBytes(undefined); diff --git a/packages/web3-utils/types/tests/hex-to-number-string-tests.ts b/packages/web3-utils/types/tests/hex-to-number-string-tests.ts new file mode 100644 index 00000000000..cb005aaa6bc --- /dev/null +++ b/packages/web3-utils/types/tests/hex-to-number-string-tests.ts @@ -0,0 +1,40 @@ +/* + This file is part of web3.js. + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file index.d.ts + * @author Josh Stevens + * @date 2018 + */ + +import { BN, hexToNumberString } from "utils"; + +const bigNumber = new BN(3); + +hexToNumberString('0xea'); // $ExpectType string +hexToNumberString(0xea); // $ExpectType string + +// $ExpectError +hexToNumberString(bigNumber); +// $ExpectError +hexToNumberString(['string']); +// $ExpectError +hexToNumberString([4]); +// $ExpectError +hexToNumberString({}); +// $ExpectError +hexToNumberString(true); +// $ExpectError +hexToNumberString(null); +// $ExpectError +hexToNumberString(undefined); diff --git a/packages/web3-utils/types/tests/hex-to-number-tests.ts b/packages/web3-utils/types/tests/hex-to-number-tests.ts new file mode 100644 index 00000000000..60264afb15e --- /dev/null +++ b/packages/web3-utils/types/tests/hex-to-number-tests.ts @@ -0,0 +1,40 @@ +/* + This file is part of web3.js. + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file index.d.ts + * @author Josh Stevens + * @date 2018 + */ + +import { BN, hexToNumber } from "utils"; + +const bigNumber = new BN(3); + +hexToNumber('232'); // $ExpectType number +hexToNumber(232); // $ExpectType number + +// $ExpectError +hexToNumber(bigNumber); +// $ExpectError +hexToNumber(['string']); +// $ExpectError +hexToNumber([4]); +// $ExpectError +hexToNumber({}); +// $ExpectError +hexToNumber(true); +// $ExpectError +hexToNumber(null); +// $ExpectError +hexToNumber(undefined); diff --git a/packages/web3-utils/types/tests/hex-to-string-tests.ts b/packages/web3-utils/types/tests/hex-to-string-tests.ts new file mode 100644 index 00000000000..76c15d3869a --- /dev/null +++ b/packages/web3-utils/types/tests/hex-to-string-tests.ts @@ -0,0 +1,40 @@ +/* + This file is part of web3.js. + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file index.d.ts + * @author Josh Stevens + * @date 2018 + */ + +import { BN, hexToString } from "utils"; + +const bigNumber = new BN(3); + +hexToString('0x49206861766520313030e282ac'); // $ExpectType string +hexToString(0x49206861766520313030e282ac); // $ExpectType string + +// $ExpectError +hexToString(bigNumber); +// $ExpectError +hexToString(['string']); +// $ExpectError +hexToString([4]); +// $ExpectError +hexToString({}); +// $ExpectError +hexToString(true); +// $ExpectError +hexToString(null); +// $ExpectError +hexToString(undefined); diff --git a/packages/web3-utils/types/tests/hex-to-utf8-tests.ts b/packages/web3-utils/types/tests/hex-to-utf8-tests.ts new file mode 100644 index 00000000000..c8e97f48a75 --- /dev/null +++ b/packages/web3-utils/types/tests/hex-to-utf8-tests.ts @@ -0,0 +1,41 @@ +/* + This file is part of web3.js. + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file index.d.ts + * @author Josh Stevens + * @date 2018 + */ + +import { BN, hexToUtf8 } from "utils"; + +const bigNumber = new BN(3); + +hexToUtf8('0x49206861766520313030e282ac'); // $ExpectType string + +// $ExpectError +hexToUtf8(656); +// $ExpectError +hexToUtf8(bigNumber); +// $ExpectError +hexToUtf8(['string']); +// $ExpectError +hexToUtf8([4]); +// $ExpectError +hexToUtf8({}); +// $ExpectError +hexToUtf8(true); +// $ExpectError +hexToUtf8(null); +// $ExpectError +hexToUtf8(undefined); From c3e731e32a12ae32ae50822b936ffe09ae1c9711 Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Sat, 1 Dec 2018 09:20:08 +0000 Subject: [PATCH 26/62] is `type` tests --- .../types/tests/is-address-tests.ts | 39 ++++++++++++++++++ .../types/tests/is-big-number-tests.ts | 41 +++++++++++++++++++ .../web3-utils/types/tests/is-bloom-tests.ts | 41 +++++++++++++++++++ .../web3-utils/types/tests/is-bn-tests.ts | 40 ++++++++++++++++++ .../types/tests/is-hex-strict-tests.ts | 40 ++++++++++++++++++ .../web3-utils/types/tests/is-hex-tests.ts | 40 ++++++++++++++++++ .../web3-utils/types/tests/is-topic-tests.ts | 41 +++++++++++++++++++ 7 files changed, 282 insertions(+) create mode 100644 packages/web3-utils/types/tests/is-address-tests.ts create mode 100644 packages/web3-utils/types/tests/is-big-number-tests.ts create mode 100644 packages/web3-utils/types/tests/is-bloom-tests.ts create mode 100644 packages/web3-utils/types/tests/is-bn-tests.ts create mode 100644 packages/web3-utils/types/tests/is-hex-strict-tests.ts create mode 100644 packages/web3-utils/types/tests/is-hex-tests.ts create mode 100644 packages/web3-utils/types/tests/is-topic-tests.ts diff --git a/packages/web3-utils/types/tests/is-address-tests.ts b/packages/web3-utils/types/tests/is-address-tests.ts new file mode 100644 index 00000000000..e4c2f44ec96 --- /dev/null +++ b/packages/web3-utils/types/tests/is-address-tests.ts @@ -0,0 +1,39 @@ +/* + This file is part of web3.js. + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file index.d.ts + * @author Josh Stevens + * @date 2018 + */ + +import { isAddress } from 'utils'; + +isAddress('0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); // $ExpectType boolean + +// $ExpectError +isAddress(4); +// $ExpectError +isAddress(bigNumber); +// $ExpectError +isAddress({}); +// $ExpectError +isAddress(true); +// $ExpectError +isAddress(['string']); +// $ExpectError +isAddress([4]); +// $ExpectError +isAddress(null); +// $ExpectError +isAddress(undefined); diff --git a/packages/web3-utils/types/tests/is-big-number-tests.ts b/packages/web3-utils/types/tests/is-big-number-tests.ts new file mode 100644 index 00000000000..8fe9edc5800 --- /dev/null +++ b/packages/web3-utils/types/tests/is-big-number-tests.ts @@ -0,0 +1,41 @@ +/* + This file is part of web3.js. + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file index.d.ts + * @author Josh Stevens + * @date 2018 + */ + +import { isBigNumber, BN } from 'utils'; + +const bigNumber = new BN(3); + +isBigNumber(bigNumber); // $ExpectType boolean + +// $ExpectError +isBigNumber(7); +// $ExpectError +isBigNumber('4325'); +// $ExpectError +isBigNumber({}); +// $ExpectError +isBigNumber(true); +// $ExpectError +isBigNumber(['string']); +// $ExpectError +isBigNumber([4]); +// $ExpectError +isBigNumber(null); +// $ExpectError +isBigNumber(undefined); diff --git a/packages/web3-utils/types/tests/is-bloom-tests.ts b/packages/web3-utils/types/tests/is-bloom-tests.ts new file mode 100644 index 00000000000..4834e2d737d --- /dev/null +++ b/packages/web3-utils/types/tests/is-bloom-tests.ts @@ -0,0 +1,41 @@ +/* + This file is part of web3.js. + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file index.d.ts + * @author Josh Stevens + * @date 2018 + */ + +import { BN, isBloom } from "utils"; + +const bigNumber = new BN(3); + +isBloom('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef'); // $ExpectType boolean + +// $ExpectError +isBloom(656); +// $ExpectError +isBloom(bigNumber); +// $ExpectError +isBloom(['string']); +// $ExpectError +isBloom([4]); +// $ExpectError +isBloom({}); +// $ExpectError +isBloom(true); +// $ExpectError +isBloom(null); +// $ExpectError +isBloom(undefined); diff --git a/packages/web3-utils/types/tests/is-bn-tests.ts b/packages/web3-utils/types/tests/is-bn-tests.ts new file mode 100644 index 00000000000..549fa802dc3 --- /dev/null +++ b/packages/web3-utils/types/tests/is-bn-tests.ts @@ -0,0 +1,40 @@ +/* + This file is part of web3.js. + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file index.d.ts + * @author Josh Stevens + * @date 2018 + */ + +import { isBN, BN } from 'utils'; + +const bigNumber = new BN(3); + +isBN(7); // $ExpectType boolean +isBN('4325'); // $ExpectType boolean + +// $ExpectError +isBN({}); +// $ExpectError +isBN(true); +// $ExpectError +isBN(bigNumber); +// $ExpectError +isBN(['string']); +// $ExpectError +isBN([4]); +// $ExpectError +isBN(null); +// $ExpectError +isBN(undefined); diff --git a/packages/web3-utils/types/tests/is-hex-strict-tests.ts b/packages/web3-utils/types/tests/is-hex-strict-tests.ts new file mode 100644 index 00000000000..066d2cc3ce7 --- /dev/null +++ b/packages/web3-utils/types/tests/is-hex-strict-tests.ts @@ -0,0 +1,40 @@ +/* + This file is part of web3.js. + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file index.d.ts + * @author Josh Stevens + * @date 2018 + */ + +import { BN, isHexStrict } from "utils"; + +const bigNumber = new BN(3); + +isHexStrict('0xc1912'); // $ExpectType boolean +isHexStrict(345) // $ExpectType boolean + +// $ExpectError +isHexStrict(bigNumber); +// $ExpectError +isHexStrict({}); +// $ExpectError +isHexStrict(true); +// $ExpectError +isHexStrict(['string']); +// $ExpectError +isHexStrict([4]); +// $ExpectError +isHexStrict(null); +// $ExpectError +isHexStrict(undefined); diff --git a/packages/web3-utils/types/tests/is-hex-tests.ts b/packages/web3-utils/types/tests/is-hex-tests.ts new file mode 100644 index 00000000000..73f6ca4a0aa --- /dev/null +++ b/packages/web3-utils/types/tests/is-hex-tests.ts @@ -0,0 +1,40 @@ +/* + This file is part of web3.js. + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file index.d.ts + * @author Josh Stevens + * @date 2018 + */ + +import { BN, isHex } from 'utils'; + +const bigNumber = new BN(3); + +isHex('0xc1912'); // $ExpectType boolean +isHex(345) // $ExpectType boolean + +// $ExpectError +isHex(bigNumber); +// $ExpectError +isHex({}); +// $ExpectError +isHex(true); +// $ExpectError +isHex(['string']); +// $ExpectError +isHex([4]); +// $ExpectError +isHex(null); +// $ExpectError +isHex(undefined); diff --git a/packages/web3-utils/types/tests/is-topic-tests.ts b/packages/web3-utils/types/tests/is-topic-tests.ts new file mode 100644 index 00000000000..187287a3e91 --- /dev/null +++ b/packages/web3-utils/types/tests/is-topic-tests.ts @@ -0,0 +1,41 @@ +/* + This file is part of web3.js. + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file index.d.ts + * @author Josh Stevens + * @date 2018 + */ + +import { BN, isTopic } from "utils"; + +const bigNumber = new BN(3); + +isTopic('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef'); // $ExpectType boolean + +// $ExpectError +isTopic(656); +// $ExpectError +isTopic(bigNumber); +// $ExpectError +isTopic(['string']); +// $ExpectError +isTopic([4]); +// $ExpectError +isTopic({}); +// $ExpectError +isTopic(true); +// $ExpectError +isTopic(null); +// $ExpectError +isTopic(undefined); From 7103a2ff310c99a51dffdebc43c812ab275618d0 Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Sat, 1 Dec 2018 09:20:21 +0000 Subject: [PATCH 27/62] to `type` tests --- .../web3-utils/types/tests/to-ascii-tests.ts | 41 +++++++++++++++++ .../web3-utils/types/tests/to-bn-tests.ts | 36 +++++++++++++++ .../types/tests/to-check-sum-address-tests.ts | 41 +++++++++++++++++ .../types/tests/to-decimal-tests.ts | 40 +++++++++++++++++ .../web3-utils/types/tests/to-hex-tests.ts | 39 ++++++++++++++++ .../types/tests/to-twos-compement-tests.ts | 41 +++++++++++++++++ .../web3-utils/types/tests/to-utf8-tests.ts | 41 +++++++++++++++++ .../web3-utils/types/tests/to-wei-tests.ts | 44 +++++++++++++++++++ 8 files changed, 323 insertions(+) create mode 100644 packages/web3-utils/types/tests/to-ascii-tests.ts create mode 100644 packages/web3-utils/types/tests/to-bn-tests.ts create mode 100644 packages/web3-utils/types/tests/to-check-sum-address-tests.ts create mode 100644 packages/web3-utils/types/tests/to-decimal-tests.ts create mode 100644 packages/web3-utils/types/tests/to-hex-tests.ts create mode 100644 packages/web3-utils/types/tests/to-twos-compement-tests.ts create mode 100644 packages/web3-utils/types/tests/to-utf8-tests.ts create mode 100644 packages/web3-utils/types/tests/to-wei-tests.ts diff --git a/packages/web3-utils/types/tests/to-ascii-tests.ts b/packages/web3-utils/types/tests/to-ascii-tests.ts new file mode 100644 index 00000000000..483a1014d7a --- /dev/null +++ b/packages/web3-utils/types/tests/to-ascii-tests.ts @@ -0,0 +1,41 @@ +/* + This file is part of web3.js. + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file index.d.ts + * @author Josh Stevens + * @date 2018 + */ + +import { BN, toAscii } from "utils"; + +const bigNumber = new BN(3); + +toAscii('0x4920686176652031303021'); // $ExpectType string + +// $ExpectError +toAscii(345); +// $ExpectError +toAscii(bigNumber); +// $ExpectError +toAscii({}); +// $ExpectError +toAscii(true); +// $ExpectError +toAscii(['string']); +// $ExpectError +toAscii([4]); +// $ExpectError +toAscii(null); +// $ExpectError +toAscii(undefined); diff --git a/packages/web3-utils/types/tests/to-bn-tests.ts b/packages/web3-utils/types/tests/to-bn-tests.ts new file mode 100644 index 00000000000..6d205a135e5 --- /dev/null +++ b/packages/web3-utils/types/tests/to-bn-tests.ts @@ -0,0 +1,36 @@ +/* + This file is part of web3.js. + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file index.d.ts + * @author Josh Stevens + * @date 2018 + */ + +import { toBN } from 'utils'; + +toBN(4); // $ExpectType BN +toBN('443'); // $ExpectType BN + +// $ExpectError +toBN({}); +// $ExpectError +toBN(true); +// $ExpectError +toBN(['string']); +// $ExpectError +toBN([4]); +// $ExpectError +toBN(null); +// $ExpectError +toBN(undefined); diff --git a/packages/web3-utils/types/tests/to-check-sum-address-tests.ts b/packages/web3-utils/types/tests/to-check-sum-address-tests.ts new file mode 100644 index 00000000000..f28034a69c1 --- /dev/null +++ b/packages/web3-utils/types/tests/to-check-sum-address-tests.ts @@ -0,0 +1,41 @@ +/* + This file is part of web3.js. + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file index.d.ts + * @author Josh Stevens + * @date 2018 + */ + +import { BN, toChecksumAddress } from "utils"; + +const bigNumber = new BN(3); + +toChecksumAddress('0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); // $ExpectType string + +// $ExpectError +toChecksumAddress([4]); +// $ExpectError +toChecksumAddress(['string']); +// $ExpectError +toChecksumAddress(345); +// $ExpectError +toChecksumAddress(bigNumber); +// $ExpectError +toChecksumAddress({}); +// $ExpectError +toChecksumAddress(true); +// $ExpectError +toChecksumAddress(null); +// $ExpectError +toChecksumAddress(undefined); diff --git a/packages/web3-utils/types/tests/to-decimal-tests.ts b/packages/web3-utils/types/tests/to-decimal-tests.ts new file mode 100644 index 00000000000..b8d75e52aab --- /dev/null +++ b/packages/web3-utils/types/tests/to-decimal-tests.ts @@ -0,0 +1,40 @@ +/* + This file is part of web3.js. + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file index.d.ts + * @author Josh Stevens + * @date 2018 + */ + +import { BN, toDecimal } from "utils"; + +const bigNumber = new BN(3); + +toDecimal('232'); // $ExpectType number +toDecimal(232); // $ExpectType number + +// $ExpectError +toDecimal(bigNumber); +// $ExpectError +toDecimal(['string']); +// $ExpectError +toDecimal([4]); +// $ExpectError +toDecimal({}); +// $ExpectError +toDecimal(true); +// $ExpectError +toDecimal(null); +// $ExpectError +toDecimal(undefined); diff --git a/packages/web3-utils/types/tests/to-hex-tests.ts b/packages/web3-utils/types/tests/to-hex-tests.ts new file mode 100644 index 00000000000..bbddf37c0f8 --- /dev/null +++ b/packages/web3-utils/types/tests/to-hex-tests.ts @@ -0,0 +1,39 @@ +/* + This file is part of web3.js. + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file index.d.ts + * @author Josh Stevens + * @date 2018 + */ + +import { BN, toHex } from "utils"; + +const bigNumber = new BN(3); + +toHex('234'); // $ExpectType string +toHex(234); // $ExpectType string +toHex(bigNumber); // $ExpectType string + +// $ExpectError +toHex(['string']); +// $ExpectError +toHex(true); +// $ExpectError +toHex([4]); +// $ExpectError +toHex({}); +// $ExpectError +toHex(null); +// $ExpectError +toHex(undefined); diff --git a/packages/web3-utils/types/tests/to-twos-compement-tests.ts b/packages/web3-utils/types/tests/to-twos-compement-tests.ts new file mode 100644 index 00000000000..cee149d3c53 --- /dev/null +++ b/packages/web3-utils/types/tests/to-twos-compement-tests.ts @@ -0,0 +1,41 @@ +/* + This file is part of web3.js. + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file index.d.ts + * @author Josh Stevens + * @date 2018 + */ + +import { toTwosComplement, BN } from 'utils'; + +const bigNumber = new BN(3); + +// toTwosComplement Tests + +toTwosComplement(4); // $ExpectType string +toTwosComplement('443'); // $ExpectType string +toTwosComplement(bigNumber); // $ExpectType string + +// $ExpectError +toTwosComplement({}); +// $ExpectError +toTwosComplement(true); +// $ExpectError +toTwosComplement(['string']); +// $ExpectError +toTwosComplement([4]); +// $ExpectError +toTwosComplement(null); +// $ExpectError +toTwosComplement(undefined); diff --git a/packages/web3-utils/types/tests/to-utf8-tests.ts b/packages/web3-utils/types/tests/to-utf8-tests.ts new file mode 100644 index 00000000000..d88eb653ecd --- /dev/null +++ b/packages/web3-utils/types/tests/to-utf8-tests.ts @@ -0,0 +1,41 @@ +/* + This file is part of web3.js. + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file index.d.ts + * @author Josh Stevens + * @date 2018 + */ + +import { BN, toUtf8 } from "utils"; + +const bigNumber = new BN(3); + +toUtf8('0x49206861766520313030e282ac'); // $ExpectType string + +// $ExpectError +toUtf8(656); +// $ExpectError +toUtf8(bigNumber); +// $ExpectError +toUtf8(['string']); +// $ExpectError +toUtf8([4]); +// $ExpectError +toUtf8({}); +// $ExpectError +toUtf8(true); +// $ExpectError +toUtf8(null); +// $ExpectError +toUtf8(undefined); diff --git a/packages/web3-utils/types/tests/to-wei-tests.ts b/packages/web3-utils/types/tests/to-wei-tests.ts new file mode 100644 index 00000000000..97aac5cf9ea --- /dev/null +++ b/packages/web3-utils/types/tests/to-wei-tests.ts @@ -0,0 +1,44 @@ +/* + This file is part of web3.js. + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file index.d.ts + * @author Josh Stevens + * @date 2018 + */ + +import { BN, toWei } from "utils"; + +const bigNumber = new BN(3); + +toWei('1'); // $ExpectType string | BN +toWei(1); // $ExpectType string | BN +toWei(bigNumber); // $ExpectType string | BN +toWei('1', 'finney'); // $ExpectType string | BN +toWei(1, 'finney'); // $ExpectType string | BN +toWei(bigNumber, 'finney'); // $ExpectType string | BN + +// $ExpectError +toWei(['string']); +// $ExpectError +toWei([4]); +// $ExpectError +toWei({}); +// $ExpectError +toWei(true); +// $ExpectError +toWei(null); +// $ExpectError +toWei(undefined); +// $ExpectError +toWei(1 , 'blah'); From 1a13e747bb4c3d5f2dc6373def051347f71bfe85 Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Sat, 1 Dec 2018 09:20:28 +0000 Subject: [PATCH 28/62] `_jsonInterfaceMethodToString` tests --- .../json-interface-method-to-string-tests.ts | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 packages/web3-utils/types/tests/json-interface-method-to-string-tests.ts diff --git a/packages/web3-utils/types/tests/json-interface-method-to-string-tests.ts b/packages/web3-utils/types/tests/json-interface-method-to-string-tests.ts new file mode 100644 index 00000000000..c2d33cfc035 --- /dev/null +++ b/packages/web3-utils/types/tests/json-interface-method-to-string-tests.ts @@ -0,0 +1,22 @@ +/* + This file is part of web3.js. + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file index.d.ts + * @author Josh Stevens + * @date 2018 + */ + +import { _jsonInterfaceMethodToString } from "utils"; + +_jsonInterfaceMethodToString({}); // $ExpectType string From df44740334fa25b153c08b7b131c6e8b46c9476d Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Sat, 1 Dec 2018 09:20:35 +0000 Subject: [PATCH 29/62] `keccak256` tests --- .../web3-utils/types/tests/keccak256-tests.ts | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 packages/web3-utils/types/tests/keccak256-tests.ts diff --git a/packages/web3-utils/types/tests/keccak256-tests.ts b/packages/web3-utils/types/tests/keccak256-tests.ts new file mode 100644 index 00000000000..bbfae6a2d08 --- /dev/null +++ b/packages/web3-utils/types/tests/keccak256-tests.ts @@ -0,0 +1,40 @@ +/* + This file is part of web3.js. + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file index.d.ts + * @author Josh Stevens + * @date 2018 + */ + +import { BN, keccak256 } from "utils"; + +const bigNumber = new BN(3); + +keccak256('234'); // $ExpectType string +keccak256(bigNumber); // $ExpectType string + +// $ExpectError +keccak256(['string']); +// $ExpectError +keccak256(234); +// $ExpectError +keccak256([4]); +// $ExpectError +keccak256({}); +// $ExpectError +keccak256(true); +// $ExpectError +keccak256(null); +// $ExpectError +keccak256(undefined); From b8d809c555dc0529fad1dac59384476e9806009a Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Sat, 1 Dec 2018 09:20:43 +0000 Subject: [PATCH 30/62] `leftPad` tests --- .../web3-utils/types/tests/left-pad-tests.ts | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 packages/web3-utils/types/tests/left-pad-tests.ts diff --git a/packages/web3-utils/types/tests/left-pad-tests.ts b/packages/web3-utils/types/tests/left-pad-tests.ts new file mode 100644 index 00000000000..e07679c59e5 --- /dev/null +++ b/packages/web3-utils/types/tests/left-pad-tests.ts @@ -0,0 +1,67 @@ +/* + This file is part of web3.js. + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file index.d.ts + * @author Josh Stevens + * @date 2018 + */ + +import { BN, leftPad } from "utils"; + +const bigNumber = new BN(3); + +leftPad('0x3456ff', 20); // $ExpectType string +leftPad(0x3456ff, 20); // $ExpectType string +leftPad('Hello', 20, 'x'); // $ExpectType string + +// $ExpectError +leftPad(bigNumber, 20); +// $ExpectError +leftPad(['string'], 20); +// $ExpectError +leftPad([4], 20); +// $ExpectError +leftPad({}, 20); +// $ExpectError +leftPad(true, 20); +// $ExpectError +leftPad(null, 20); +// $ExpectError +leftPad(undefined, 20); +// $ExpectError +leftPad('0x3456ff', bigNumber); +// $ExpectError +leftPad('0x3456ff', ['string']); +// $ExpectError +leftPad('0x3456ff', [4]); +// $ExpectError +leftPad('0x3456ff', {}); +// $ExpectError +leftPad('0x3456ff', true); +// $ExpectError +leftPad('0x3456ff', null); +// $ExpectError +leftPad('0x3456ff', undefined); +// $ExpectError +leftPad('Hello', 20, bigNumber); +// $ExpectError +leftPad('Hello', 20, ['string']); +// $ExpectError +leftPad('Hello', 20, [4]); +// $ExpectError +leftPad('Hello', 20, {}); +// $ExpectError +leftPad('Hello', 20, true); +// $ExpectError +leftPad('Hello', 20, null); From 8a0952abd5f10b91d0ce14bb1cda211ae5486758 Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Sat, 1 Dec 2018 09:20:51 +0000 Subject: [PATCH 31/62] `numberToHex` tests --- .../types/tests/number-to-hex-tests.ts | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 packages/web3-utils/types/tests/number-to-hex-tests.ts diff --git a/packages/web3-utils/types/tests/number-to-hex-tests.ts b/packages/web3-utils/types/tests/number-to-hex-tests.ts new file mode 100644 index 00000000000..bb93953cbea --- /dev/null +++ b/packages/web3-utils/types/tests/number-to-hex-tests.ts @@ -0,0 +1,41 @@ +/* + This file is part of web3.js. + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file index.d.ts + * @author Josh Stevens + * @date 2018 + */ + +import { BN, numberToHex } from "utils"; + +const bigNumber = new BN(3); + +numberToHex('232'); // $ExpectType string +numberToHex(232); // $ExpectType string +numberToHex(bigNumber); // $ExpectType string + +// $ExpectError +numberToHex(['72']); +// $ExpectError +numberToHex([4]); +// $ExpectError +numberToHex([ 36 ]); +// $ExpectError +numberToHex({}); +// $ExpectError +numberToHex(true); +// $ExpectError +numberToHex(null); +// $ExpectError +numberToHex(undefined); From c24eb1aac8842ee30a769c2d1c8a96beb0add648 Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Sat, 1 Dec 2018 09:20:59 +0000 Subject: [PATCH 32/62] `padLeft` tests --- .../web3-utils/types/tests/pad-left-tests.ts | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 packages/web3-utils/types/tests/pad-left-tests.ts diff --git a/packages/web3-utils/types/tests/pad-left-tests.ts b/packages/web3-utils/types/tests/pad-left-tests.ts new file mode 100644 index 00000000000..40677ae4f27 --- /dev/null +++ b/packages/web3-utils/types/tests/pad-left-tests.ts @@ -0,0 +1,67 @@ +/* + This file is part of web3.js. + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file index.d.ts + * @author Josh Stevens + * @date 2018 + */ + +import { BN, padLeft } from "utils"; + +const bigNumber = new BN(3); + +padLeft('0x3456ff', 20); // $ExpectType string +padLeft(0x3456ff, 20); // $ExpectType string +padLeft('Hello', 20, 'x'); // $ExpectType string + +// $ExpectError +padLeft(bigNumber, 20); +// $ExpectError +padLeft(['string'], 20); +// $ExpectError +padLeft([4], 20); +// $ExpectError +padLeft({}, 20); +// $ExpectError +padLeft(true, 20); +// $ExpectError +padLeft(null, 20); +// $ExpectError +padLeft(undefined, 20); +// $ExpectError +padLeft('0x3456ff', bigNumber); +// $ExpectError +padLeft('0x3456ff', ['string']); +// $ExpectError +padLeft('0x3456ff', [4]); +// $ExpectError +padLeft('0x3456ff', {}); +// $ExpectError +padLeft('0x3456ff', true); +// $ExpectError +padLeft('0x3456ff', null); +// $ExpectError +padLeft('0x3456ff', undefined); +// $ExpectError +padLeft('Hello', 20, bigNumber); +// $ExpectError +padLeft('Hello', 20, ['string']); +// $ExpectError +padLeft('Hello', 20, [4]); +// $ExpectError +padLeft('Hello', 20, {}); +// $ExpectError +padLeft('Hello', 20, true); +// $ExpectError +padLeft('Hello', 20, null); From 1c2330a9545df2ca3fc96e0525513e8816762291 Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Sat, 1 Dec 2018 09:21:07 +0000 Subject: [PATCH 33/62] `padRight` tests --- .../web3-utils/types/tests/pad-right-tests.ts | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 packages/web3-utils/types/tests/pad-right-tests.ts diff --git a/packages/web3-utils/types/tests/pad-right-tests.ts b/packages/web3-utils/types/tests/pad-right-tests.ts new file mode 100644 index 00000000000..1f3862764a0 --- /dev/null +++ b/packages/web3-utils/types/tests/pad-right-tests.ts @@ -0,0 +1,67 @@ +/* + This file is part of web3.js. + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file index.d.ts + * @author Josh Stevens + * @date 2018 + */ + +import { BN, padRight } from "utils"; + +const bigNumber = new BN(3); + +padRight('0x3456ff', 20); // $ExpectType string +padRight(0x3456ff, 20); // $ExpectType string +padRight('Hello', 20, 'x'); // $ExpectType string + +// $ExpectError +padRight(bigNumber, 20); +// $ExpectError +padRight(['string'], 20); +// $ExpectError +padRight([4], 20); +// $ExpectError +padRight({}, 20); +// $ExpectError +padRight(true, 20); +// $ExpectError +padRight(null, 20); +// $ExpectError +padRight(undefined, 20); +// $ExpectError +padRight('0x3456ff', bigNumber); +// $ExpectError +padRight('0x3456ff', ['string']); +// $ExpectError +padRight('0x3456ff', [4]); +// $ExpectError +padRight('0x3456ff', {}); +// $ExpectError +padRight('0x3456ff', true); +// $ExpectError +padRight('0x3456ff', null); +// $ExpectError +padRight('0x3456ff', undefined); +// $ExpectError +padRight('Hello', 20, bigNumber); +// $ExpectError +padRight('Hello', 20, ['string']); +// $ExpectError +padRight('Hello', 20, [4]); +// $ExpectError +padRight('Hello', 20, {}); +// $ExpectError +padRight('Hello', 20, true); +// $ExpectError +padRight('Hello', 20, null); From 68f51656f13131aa3aec72b10d8b304c6500c1ba Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Sat, 1 Dec 2018 09:21:14 +0000 Subject: [PATCH 34/62] `randomHex` tests --- .../types/tests/random-hex-tests.ts | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 packages/web3-utils/types/tests/random-hex-tests.ts diff --git a/packages/web3-utils/types/tests/random-hex-tests.ts b/packages/web3-utils/types/tests/random-hex-tests.ts new file mode 100644 index 00000000000..2bc17e31b74 --- /dev/null +++ b/packages/web3-utils/types/tests/random-hex-tests.ts @@ -0,0 +1,41 @@ +/* + This file is part of web3.js. + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file index.d.ts + * @author Josh Stevens + * @date 2018 + */ + +import { BN, randomHex } from "utils"; + +const bigNumber = new BN(3); + +randomHex(32); // $ExpectType string + +// $ExpectError +randomHex('234'); +// $ExpectError +randomHex(bigNumber); +// $ExpectError +randomHex(['string']); +// $ExpectError +randomHex([4]); +// $ExpectError +randomHex({}); +// $ExpectError +randomHex(true); +// $ExpectError +randomHex(null); +// $ExpectError +randomHex(undefined); From eda17d289a5d644e93f79c033298f265446500ba Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Sat, 1 Dec 2018 09:21:24 +0000 Subject: [PATCH 35/62] `rightPad tests --- .../web3-utils/types/tests/right-pad-tests.ts | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 packages/web3-utils/types/tests/right-pad-tests.ts diff --git a/packages/web3-utils/types/tests/right-pad-tests.ts b/packages/web3-utils/types/tests/right-pad-tests.ts new file mode 100644 index 00000000000..20bb6745bfe --- /dev/null +++ b/packages/web3-utils/types/tests/right-pad-tests.ts @@ -0,0 +1,69 @@ +/* + This file is part of web3.js. + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file index.d.ts + * @author Josh Stevens + * @date 2018 + */ + +import { BN, rightPad } from "utils"; + +const bigNumber = new BN(3); + +// rightPad Tests + +rightPad('0x3456ff', 20); // $ExpectType string +rightPad(0x3456ff, 20); // $ExpectType string +rightPad('Hello', 20, 'x'); // $ExpectType string + +// $ExpectError +rightPad(bigNumber, 20); +// $ExpectError +rightPad(['string'], 20); +// $ExpectError +rightPad([4], 20); +// $ExpectError +rightPad({}, 20); +// $ExpectError +rightPad(true, 20); +// $ExpectError +rightPad(null, 20); +// $ExpectError +rightPad(undefined, 20); +// $ExpectError +rightPad('0x3456ff', bigNumber); +// $ExpectError +rightPad('0x3456ff', ['string']); +// $ExpectError +rightPad('0x3456ff', [4]); +// $ExpectError +rightPad('0x3456ff', {}); +// $ExpectError +rightPad('0x3456ff', true); +// $ExpectError +rightPad('0x3456ff', null); +// $ExpectError +rightPad('0x3456ff', undefined); +// $ExpectError +rightPad('Hello', 20, bigNumber); +// $ExpectError +rightPad('Hello', 20, ['string']); +// $ExpectError +rightPad('Hello', 20, [4]); +// $ExpectError +rightPad('Hello', 20, {}); +// $ExpectError +rightPad('Hello', 20, true); +// $ExpectError +rightPad('Hello', 20, null); From 9d5315dbc61d27a8e551d7f5999127d591af9582 Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Sat, 1 Dec 2018 09:21:31 +0000 Subject: [PATCH 36/62] `sha3` tests --- packages/web3-utils/types/tests/sha3-tests.ts | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 packages/web3-utils/types/tests/sha3-tests.ts diff --git a/packages/web3-utils/types/tests/sha3-tests.ts b/packages/web3-utils/types/tests/sha3-tests.ts new file mode 100644 index 00000000000..0808e9cc3cb --- /dev/null +++ b/packages/web3-utils/types/tests/sha3-tests.ts @@ -0,0 +1,40 @@ +/* + This file is part of web3.js. + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file index.d.ts + * @author Josh Stevens + * @date 2018 + */ + +import { BN, sha3 } from "utils"; + +const bigNumber = new BN(3); + +sha3('234'); // $ExpectType string +sha3(bigNumber); // $ExpectType string + +// $ExpectError +sha3(['string']); +// $ExpectError +sha3(234); +// $ExpectError +sha3([4]); +// $ExpectError +sha3({}); +// $ExpectError +sha3(true); +// $ExpectError +sha3(null); +// $ExpectError +sha3(undefined); From f7434202d48e1de903fd3729ac6a35ca54d2cba8 Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Sat, 1 Dec 2018 09:21:38 +0000 Subject: [PATCH 37/62] `soliditySha3` tests --- .../types/tests/solidity-sha3-tests.ts | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 packages/web3-utils/types/tests/solidity-sha3-tests.ts diff --git a/packages/web3-utils/types/tests/solidity-sha3-tests.ts b/packages/web3-utils/types/tests/solidity-sha3-tests.ts new file mode 100644 index 00000000000..aa39cf3083f --- /dev/null +++ b/packages/web3-utils/types/tests/solidity-sha3-tests.ts @@ -0,0 +1,41 @@ +/* + This file is part of web3.js. + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file index.d.ts + * @author Josh Stevens + * @date 2018 + */ + +import { BN, soliditySha3 } from "utils"; + +const bigNumber = new BN(3); + +soliditySha3('234564535', '0xfff23243', true, -10); // $ExpectType string +soliditySha3('Hello!%'); // $ExpectType string +soliditySha3('234'); // $ExpectType string +soliditySha3(0xea); // $ExpectType string +soliditySha3(bigNumber); // $ExpectType string +soliditySha3({type: 'uint256', value: '234'}); // $ExpectType string +soliditySha3({t: 'uint', v: new BN('234')}); // $ExpectType string +soliditySha3({t: 'string', v: 'Hello!%'}, {t: 'int8', v: -23}, {t: 'address', v: '0x85F43D8a49eeB85d32Cf465507DD71d507100C1d'}); // $ExpectType string +soliditySha3('0x407D73d8a49eeb85D32Cf465507dd71d507100c1'); // $ExpectType string + +// $ExpectError +soliditySha3(['hey']); +// $ExpectError +soliditySha3([34]); +// $ExpectError +soliditySha3(null); +// $ExpectError +soliditySha3(undefined); From c38fd039f3c68644004f0607cdb882365c16bb5c Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Sat, 1 Dec 2018 09:21:47 +0000 Subject: [PATCH 38/62] `stringToHex` tests --- .../types/tests/string-to-hex-tests.ts | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 packages/web3-utils/types/tests/string-to-hex-tests.ts diff --git a/packages/web3-utils/types/tests/string-to-hex-tests.ts b/packages/web3-utils/types/tests/string-to-hex-tests.ts new file mode 100644 index 00000000000..1ed1d852d7c --- /dev/null +++ b/packages/web3-utils/types/tests/string-to-hex-tests.ts @@ -0,0 +1,41 @@ +/* + This file is part of web3.js. + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file index.d.ts + * @author Josh Stevens + * @date 2018 + */ + +import { BN, stringToHex } from "utils"; + +const bigNumber = new BN(3); + +stringToHex('I have 100£'); // $ExpectType string + +// $ExpectError +stringToHex(232); +// $ExpectError +stringToHex(bigNumber); +// $ExpectError +stringToHex(['string']); +// $ExpectError +stringToHex([4]); +// $ExpectError +stringToHex({}); +// $ExpectError +stringToHex(true); +// $ExpectError +stringToHex(null); +// $ExpectError +stringToHex(undefined); From d1f3edd395ed407a4c2a0ead8ba19f530dede5e3 Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Sat, 1 Dec 2018 09:21:55 +0000 Subject: [PATCH 39/62] `testAddress` tests --- .../types/tests/test-address-tests.ts | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 packages/web3-utils/types/tests/test-address-tests.ts diff --git a/packages/web3-utils/types/tests/test-address-tests.ts b/packages/web3-utils/types/tests/test-address-tests.ts new file mode 100644 index 00000000000..67ddd1949b4 --- /dev/null +++ b/packages/web3-utils/types/tests/test-address-tests.ts @@ -0,0 +1,57 @@ +/* + This file is part of web3.js. + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file index.d.ts + * @author Josh Stevens + * @date 2018 + */ + +import { BN, testAddress } from "utils"; + +const bigNumber = new BN(3); + +testAddress('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', '0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); // $ExpectType boolean + +// $ExpectError +testAddress(656, '0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); +// $ExpectError +testAddress(bigNumber, '0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); +// $ExpectError +testAddress(['string'], '0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); +// $ExpectError +testAddress([4], '0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); +// $ExpectError +testAddress({}, '0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); +// $ExpectError +testAddress(true, '0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); +// $ExpectError +testAddress(null, '0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); +// $ExpectError +testAddress(undefined, '0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); +// $ExpectError +testAddress('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', 656); +// $ExpectError +testAddress('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', bigNumber); +// $ExpectError +testAddress('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', ['string']); +// $ExpectError +testAddress('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', [4]); +// $ExpectError +testAddress('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', {}); +// $ExpectError +testAddress('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', true); +// $ExpectError +testAddress('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', null); +// $ExpectError +testAddress('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', undefined); From 4117a79b1206b5c5529501346fd44d3f84dd23d0 Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Sat, 1 Dec 2018 09:22:02 +0000 Subject: [PATCH 40/62] `testTopic` tests --- .../types/tests/test-topic-tests.ts | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 packages/web3-utils/types/tests/test-topic-tests.ts diff --git a/packages/web3-utils/types/tests/test-topic-tests.ts b/packages/web3-utils/types/tests/test-topic-tests.ts new file mode 100644 index 00000000000..97de3af82ed --- /dev/null +++ b/packages/web3-utils/types/tests/test-topic-tests.ts @@ -0,0 +1,57 @@ +/* + This file is part of web3.js. + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file index.d.ts + * @author Josh Stevens + * @date 2018 + */ + +import { BN, testTopic } from "utils"; + +const bigNumber = new BN(3); + +testTopic('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', '0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); // $ExpectType boolean + +// $ExpectError +testTopic(656, '0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); +// $ExpectError +testTopic(bigNumber, '0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); +// $ExpectError +testTopic(['string'], '0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); +// $ExpectError +testTopic([4], '0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); +// $ExpectError +testTopic({}, '0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); +// $ExpectError +testTopic(true, '0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); +// $ExpectError +testTopic(null, '0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); +// $ExpectError +testTopic(undefined, '0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); +// $ExpectError +testTopic('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', 656); +// $ExpectError +testTopic('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', bigNumber); +// $ExpectError +testTopic('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', ['string']); +// $ExpectError +testTopic('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', [4]); +// $ExpectError +testTopic('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', {}); +// $ExpectError +testTopic('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', true); +// $ExpectError +testTopic('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', null); +// $ExpectError +testTopic('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', undefined); From 0d88ae344d1164216680522608b1262a5fcf0f40 Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Sat, 1 Dec 2018 09:22:11 +0000 Subject: [PATCH 41/62] `unitMap` tests --- .../web3-utils/types/tests/unit-map-tests.ts | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 packages/web3-utils/types/tests/unit-map-tests.ts diff --git a/packages/web3-utils/types/tests/unit-map-tests.ts b/packages/web3-utils/types/tests/unit-map-tests.ts new file mode 100644 index 00000000000..0336828ba80 --- /dev/null +++ b/packages/web3-utils/types/tests/unit-map-tests.ts @@ -0,0 +1,22 @@ +/* + This file is part of web3.js. + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file index.d.ts + * @author Josh Stevens + * @date 2018 + */ + +import { unitMap } from "utils"; + +unitMap(); // $ExpectType Units From ef10019c36e27abe6a6eabfcff5ba8f5a768ae20 Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Sat, 1 Dec 2018 09:22:18 +0000 Subject: [PATCH 42/62] `utf8ToHex` tests --- .../types/tests/utf8-to-hex-tests.ts | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 packages/web3-utils/types/tests/utf8-to-hex-tests.ts diff --git a/packages/web3-utils/types/tests/utf8-to-hex-tests.ts b/packages/web3-utils/types/tests/utf8-to-hex-tests.ts new file mode 100644 index 00000000000..33a973ff35c --- /dev/null +++ b/packages/web3-utils/types/tests/utf8-to-hex-tests.ts @@ -0,0 +1,41 @@ +/* + This file is part of web3.js. + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file index.d.ts + * @author Josh Stevens + * @date 2018 + */ + +import { BN, utf8ToHex } from "utils"; + +const bigNumber = new BN(3); + +utf8ToHex('I have 100£'); // $ExpectType string + +// $ExpectError +utf8ToHex(232); +// $ExpectError +utf8ToHex(bigNumber); +// $ExpectError +utf8ToHex(['string']); +// $ExpectError +utf8ToHex([4]); +// $ExpectError +utf8ToHex({}); +// $ExpectError +utf8ToHex(true); +// $ExpectError +utf8ToHex(null); +// $ExpectError +utf8ToHex(undefined); From f63e9c2f04b47ddbcacc975bd9493d47179bcfac Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Sat, 1 Dec 2018 09:56:59 +0000 Subject: [PATCH 43/62] Rename `paths` to `web3-utils` to match real life --- packages/web3-utils/types/tests/ascii-to-hex-tests.ts | 2 +- packages/web3-utils/types/tests/bytes-to-hex-tests.ts | 2 +- packages/web3-utils/types/tests/check-address-checksum-tests.ts | 2 +- packages/web3-utils/types/tests/fire-error-tests.ts | 2 +- packages/web3-utils/types/tests/flatten-types-tests.ts | 2 +- packages/web3-utils/types/tests/from-ascii-tests.ts | 2 +- packages/web3-utils/types/tests/from-decimal-tests.ts | 2 +- packages/web3-utils/types/tests/from-utf8-tests.ts | 2 +- packages/web3-utils/types/tests/from-wei-tests.ts | 2 +- packages/web3-utils/types/tests/get-unit-value-tests.ts | 2 +- packages/web3-utils/types/tests/hex-to-ascii-tests.ts | 2 +- packages/web3-utils/types/tests/hex-to-bytes-tests.ts | 2 +- packages/web3-utils/types/tests/hex-to-number-string-tests.ts | 2 +- packages/web3-utils/types/tests/hex-to-number-tests.ts | 2 +- packages/web3-utils/types/tests/hex-to-string-tests.ts | 2 +- packages/web3-utils/types/tests/hex-to-utf8-tests.ts | 2 +- packages/web3-utils/types/tests/is-address-tests.ts | 2 +- packages/web3-utils/types/tests/is-big-number-tests.ts | 2 +- packages/web3-utils/types/tests/is-bloom-tests.ts | 2 +- packages/web3-utils/types/tests/is-bn-tests.ts | 2 +- packages/web3-utils/types/tests/is-hex-strict-tests.ts | 2 +- packages/web3-utils/types/tests/is-hex-tests.ts | 2 +- packages/web3-utils/types/tests/is-topic-tests.ts | 2 +- .../types/tests/json-interface-method-to-string-tests.ts | 2 +- packages/web3-utils/types/tests/keccak256-tests.ts | 2 +- packages/web3-utils/types/tests/left-pad-tests.ts | 2 +- packages/web3-utils/types/tests/number-to-hex-tests.ts | 2 +- packages/web3-utils/types/tests/pad-left-tests.ts | 2 +- packages/web3-utils/types/tests/pad-right-tests.ts | 2 +- packages/web3-utils/types/tests/random-hex-tests.ts | 2 +- packages/web3-utils/types/tests/right-pad-tests.ts | 2 +- packages/web3-utils/types/tests/sha3-tests.ts | 2 +- packages/web3-utils/types/tests/solidity-sha3-tests.ts | 2 +- packages/web3-utils/types/tests/string-to-hex-tests.ts | 2 +- packages/web3-utils/types/tests/test-address-tests.ts | 2 +- packages/web3-utils/types/tests/test-topic-tests.ts | 2 +- packages/web3-utils/types/tests/to-ascii-tests.ts | 2 +- packages/web3-utils/types/tests/to-bn-tests.ts | 2 +- packages/web3-utils/types/tests/to-check-sum-address-tests.ts | 2 +- packages/web3-utils/types/tests/to-decimal-tests.ts | 2 +- packages/web3-utils/types/tests/to-hex-tests.ts | 2 +- packages/web3-utils/types/tests/to-twos-compement-tests.ts | 2 +- packages/web3-utils/types/tests/to-utf8-tests.ts | 2 +- packages/web3-utils/types/tests/to-wei-tests.ts | 2 +- packages/web3-utils/types/tests/unit-map-tests.ts | 2 +- packages/web3-utils/types/tests/utf8-to-hex-tests.ts | 2 +- packages/web3-utils/types/tsconfig.json | 2 +- 47 files changed, 47 insertions(+), 47 deletions(-) diff --git a/packages/web3-utils/types/tests/ascii-to-hex-tests.ts b/packages/web3-utils/types/tests/ascii-to-hex-tests.ts index 23b36146910..a8777d1fe21 100644 --- a/packages/web3-utils/types/tests/ascii-to-hex-tests.ts +++ b/packages/web3-utils/types/tests/ascii-to-hex-tests.ts @@ -17,7 +17,7 @@ * @date 2018 */ -import { asciiToHex, BN } from "utils"; +import { asciiToHex, BN } from 'web3-utils'; const bigNumber = new BN(3); diff --git a/packages/web3-utils/types/tests/bytes-to-hex-tests.ts b/packages/web3-utils/types/tests/bytes-to-hex-tests.ts index 48008e8892b..0dffa8b52f7 100644 --- a/packages/web3-utils/types/tests/bytes-to-hex-tests.ts +++ b/packages/web3-utils/types/tests/bytes-to-hex-tests.ts @@ -17,7 +17,7 @@ * @date 2018 */ -import { BN, bytesToHex } from "utils"; +import { BN, bytesToHex } from 'web3-utils'; const bigNumber = new BN(3); diff --git a/packages/web3-utils/types/tests/check-address-checksum-tests.ts b/packages/web3-utils/types/tests/check-address-checksum-tests.ts index 5fc197dfb6a..8640781dd21 100644 --- a/packages/web3-utils/types/tests/check-address-checksum-tests.ts +++ b/packages/web3-utils/types/tests/check-address-checksum-tests.ts @@ -17,7 +17,7 @@ * @date 2018 */ -import { BN, checkAddressChecksum } from "utils"; +import { BN, checkAddressChecksum } from 'web3-utils'; const bigNumber = new BN(3); diff --git a/packages/web3-utils/types/tests/fire-error-tests.ts b/packages/web3-utils/types/tests/fire-error-tests.ts index 77cf45780dd..20c766af26f 100644 --- a/packages/web3-utils/types/tests/fire-error-tests.ts +++ b/packages/web3-utils/types/tests/fire-error-tests.ts @@ -17,7 +17,7 @@ * @date 2018 */ -import { _fireError } from "utils"; +import { _fireError } from 'web3-utils'; _fireError(new Error('error'), {}, (error: Error) => { console.log(error); }, (error: Error) => { console.log(error); }); // $ExpectType {} _fireError('error', {}, (error: Error) => { console.log(error); }, (error: Error) => { console.log(error); }); // $ExpectType {} diff --git a/packages/web3-utils/types/tests/flatten-types-tests.ts b/packages/web3-utils/types/tests/flatten-types-tests.ts index b4ac7cb7d49..6565777bf69 100644 --- a/packages/web3-utils/types/tests/flatten-types-tests.ts +++ b/packages/web3-utils/types/tests/flatten-types-tests.ts @@ -17,7 +17,7 @@ * @date 2018 */ -import { BN, _flattenTypes } from "utils"; +import { BN, _flattenTypes } from 'web3-utils'; const bigNumber = new BN(3); diff --git a/packages/web3-utils/types/tests/from-ascii-tests.ts b/packages/web3-utils/types/tests/from-ascii-tests.ts index a65f87b509f..6cbb3835d8a 100644 --- a/packages/web3-utils/types/tests/from-ascii-tests.ts +++ b/packages/web3-utils/types/tests/from-ascii-tests.ts @@ -17,7 +17,7 @@ * @date 2018 */ -import { BN, fromAscii } from "utils"; +import { BN, fromAscii } from 'web3-utils'; const bigNumber = new BN(3); diff --git a/packages/web3-utils/types/tests/from-decimal-tests.ts b/packages/web3-utils/types/tests/from-decimal-tests.ts index f25fd82e356..49572fd8643 100644 --- a/packages/web3-utils/types/tests/from-decimal-tests.ts +++ b/packages/web3-utils/types/tests/from-decimal-tests.ts @@ -17,7 +17,7 @@ * @date 2018 */ -import { BN, fromDecimal } from "utils"; +import { BN, fromDecimal } from 'web3-utils'; const bigNumber = new BN(3); diff --git a/packages/web3-utils/types/tests/from-utf8-tests.ts b/packages/web3-utils/types/tests/from-utf8-tests.ts index 9d305c8f420..5f5065cea68 100644 --- a/packages/web3-utils/types/tests/from-utf8-tests.ts +++ b/packages/web3-utils/types/tests/from-utf8-tests.ts @@ -17,7 +17,7 @@ * @date 2018 */ -import { BN, fromUtf8 } from "utils"; +import { BN, fromUtf8 } from 'web3-utils'; const bigNumber = new BN(3); diff --git a/packages/web3-utils/types/tests/from-wei-tests.ts b/packages/web3-utils/types/tests/from-wei-tests.ts index 2e7672990c0..011abb1649a 100644 --- a/packages/web3-utils/types/tests/from-wei-tests.ts +++ b/packages/web3-utils/types/tests/from-wei-tests.ts @@ -17,7 +17,7 @@ * @date 2018 */ -import { BN, fromWei } from "utils"; +import { BN, fromWei } from 'web3-utils'; const bigNumber = new BN(3); diff --git a/packages/web3-utils/types/tests/get-unit-value-tests.ts b/packages/web3-utils/types/tests/get-unit-value-tests.ts index 22217c6193c..11675a2580a 100644 --- a/packages/web3-utils/types/tests/get-unit-value-tests.ts +++ b/packages/web3-utils/types/tests/get-unit-value-tests.ts @@ -17,7 +17,7 @@ * @date 2018 */ -import { BN, getUnitValue } from "utils"; +import { BN, getUnitValue } from 'web3-utils'; const bigNumber = new BN(3); diff --git a/packages/web3-utils/types/tests/hex-to-ascii-tests.ts b/packages/web3-utils/types/tests/hex-to-ascii-tests.ts index 5e6602cff94..1cd7ad50241 100644 --- a/packages/web3-utils/types/tests/hex-to-ascii-tests.ts +++ b/packages/web3-utils/types/tests/hex-to-ascii-tests.ts @@ -17,7 +17,7 @@ * @date 2018 */ -import { BN, hexToAscii } from "utils"; +import { BN, hexToAscii } from 'web3-utils'; const bigNumber = new BN(3); diff --git a/packages/web3-utils/types/tests/hex-to-bytes-tests.ts b/packages/web3-utils/types/tests/hex-to-bytes-tests.ts index 668e107cf29..805adf5aea8 100644 --- a/packages/web3-utils/types/tests/hex-to-bytes-tests.ts +++ b/packages/web3-utils/types/tests/hex-to-bytes-tests.ts @@ -17,7 +17,7 @@ * @date 2018 */ -import { BN, hexToBytes } from "utils"; +import { BN, hexToBytes } from 'web3-utils'; const bigNumber = new BN(3); diff --git a/packages/web3-utils/types/tests/hex-to-number-string-tests.ts b/packages/web3-utils/types/tests/hex-to-number-string-tests.ts index cb005aaa6bc..3b55dd5d5c6 100644 --- a/packages/web3-utils/types/tests/hex-to-number-string-tests.ts +++ b/packages/web3-utils/types/tests/hex-to-number-string-tests.ts @@ -17,7 +17,7 @@ * @date 2018 */ -import { BN, hexToNumberString } from "utils"; +import { BN, hexToNumberString } from 'web3-utils'; const bigNumber = new BN(3); diff --git a/packages/web3-utils/types/tests/hex-to-number-tests.ts b/packages/web3-utils/types/tests/hex-to-number-tests.ts index 60264afb15e..218a02c7966 100644 --- a/packages/web3-utils/types/tests/hex-to-number-tests.ts +++ b/packages/web3-utils/types/tests/hex-to-number-tests.ts @@ -17,7 +17,7 @@ * @date 2018 */ -import { BN, hexToNumber } from "utils"; +import { BN, hexToNumber } from 'web3-utils'; const bigNumber = new BN(3); diff --git a/packages/web3-utils/types/tests/hex-to-string-tests.ts b/packages/web3-utils/types/tests/hex-to-string-tests.ts index 76c15d3869a..ab291168bbe 100644 --- a/packages/web3-utils/types/tests/hex-to-string-tests.ts +++ b/packages/web3-utils/types/tests/hex-to-string-tests.ts @@ -17,7 +17,7 @@ * @date 2018 */ -import { BN, hexToString } from "utils"; +import { BN, hexToString } from 'web3-utils'; const bigNumber = new BN(3); diff --git a/packages/web3-utils/types/tests/hex-to-utf8-tests.ts b/packages/web3-utils/types/tests/hex-to-utf8-tests.ts index c8e97f48a75..147e0266c9e 100644 --- a/packages/web3-utils/types/tests/hex-to-utf8-tests.ts +++ b/packages/web3-utils/types/tests/hex-to-utf8-tests.ts @@ -17,7 +17,7 @@ * @date 2018 */ -import { BN, hexToUtf8 } from "utils"; +import { BN, hexToUtf8 } from 'web3-utils'; const bigNumber = new BN(3); diff --git a/packages/web3-utils/types/tests/is-address-tests.ts b/packages/web3-utils/types/tests/is-address-tests.ts index e4c2f44ec96..2287dfeb0b7 100644 --- a/packages/web3-utils/types/tests/is-address-tests.ts +++ b/packages/web3-utils/types/tests/is-address-tests.ts @@ -17,7 +17,7 @@ * @date 2018 */ -import { isAddress } from 'utils'; +import { isAddress } from 'web3-utils'; isAddress('0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); // $ExpectType boolean diff --git a/packages/web3-utils/types/tests/is-big-number-tests.ts b/packages/web3-utils/types/tests/is-big-number-tests.ts index 8fe9edc5800..8a3cb3cfc09 100644 --- a/packages/web3-utils/types/tests/is-big-number-tests.ts +++ b/packages/web3-utils/types/tests/is-big-number-tests.ts @@ -17,7 +17,7 @@ * @date 2018 */ -import { isBigNumber, BN } from 'utils'; +import { isBigNumber, BN } from 'web3-utils'; const bigNumber = new BN(3); diff --git a/packages/web3-utils/types/tests/is-bloom-tests.ts b/packages/web3-utils/types/tests/is-bloom-tests.ts index 4834e2d737d..6e2d4cd8dff 100644 --- a/packages/web3-utils/types/tests/is-bloom-tests.ts +++ b/packages/web3-utils/types/tests/is-bloom-tests.ts @@ -17,7 +17,7 @@ * @date 2018 */ -import { BN, isBloom } from "utils"; +import { BN, isBloom } from 'web3-utils'; const bigNumber = new BN(3); diff --git a/packages/web3-utils/types/tests/is-bn-tests.ts b/packages/web3-utils/types/tests/is-bn-tests.ts index 549fa802dc3..9bcfc8c1480 100644 --- a/packages/web3-utils/types/tests/is-bn-tests.ts +++ b/packages/web3-utils/types/tests/is-bn-tests.ts @@ -17,7 +17,7 @@ * @date 2018 */ -import { isBN, BN } from 'utils'; +import { isBN, BN } from 'web3-utils'; const bigNumber = new BN(3); diff --git a/packages/web3-utils/types/tests/is-hex-strict-tests.ts b/packages/web3-utils/types/tests/is-hex-strict-tests.ts index 066d2cc3ce7..fe128165012 100644 --- a/packages/web3-utils/types/tests/is-hex-strict-tests.ts +++ b/packages/web3-utils/types/tests/is-hex-strict-tests.ts @@ -17,7 +17,7 @@ * @date 2018 */ -import { BN, isHexStrict } from "utils"; +import { BN, isHexStrict } from 'web3-utils'; const bigNumber = new BN(3); diff --git a/packages/web3-utils/types/tests/is-hex-tests.ts b/packages/web3-utils/types/tests/is-hex-tests.ts index 73f6ca4a0aa..d58dd782fb5 100644 --- a/packages/web3-utils/types/tests/is-hex-tests.ts +++ b/packages/web3-utils/types/tests/is-hex-tests.ts @@ -17,7 +17,7 @@ * @date 2018 */ -import { BN, isHex } from 'utils'; +import { BN, isHex } from 'web3-utils'; const bigNumber = new BN(3); diff --git a/packages/web3-utils/types/tests/is-topic-tests.ts b/packages/web3-utils/types/tests/is-topic-tests.ts index 187287a3e91..ea729e12119 100644 --- a/packages/web3-utils/types/tests/is-topic-tests.ts +++ b/packages/web3-utils/types/tests/is-topic-tests.ts @@ -17,7 +17,7 @@ * @date 2018 */ -import { BN, isTopic } from "utils"; +import { BN, isTopic } from 'web3-utils'; const bigNumber = new BN(3); diff --git a/packages/web3-utils/types/tests/json-interface-method-to-string-tests.ts b/packages/web3-utils/types/tests/json-interface-method-to-string-tests.ts index c2d33cfc035..02f664ef328 100644 --- a/packages/web3-utils/types/tests/json-interface-method-to-string-tests.ts +++ b/packages/web3-utils/types/tests/json-interface-method-to-string-tests.ts @@ -17,6 +17,6 @@ * @date 2018 */ -import { _jsonInterfaceMethodToString } from "utils"; +import { _jsonInterfaceMethodToString } from 'web3-utils'; _jsonInterfaceMethodToString({}); // $ExpectType string diff --git a/packages/web3-utils/types/tests/keccak256-tests.ts b/packages/web3-utils/types/tests/keccak256-tests.ts index bbfae6a2d08..44443700f83 100644 --- a/packages/web3-utils/types/tests/keccak256-tests.ts +++ b/packages/web3-utils/types/tests/keccak256-tests.ts @@ -17,7 +17,7 @@ * @date 2018 */ -import { BN, keccak256 } from "utils"; +import { BN, keccak256 } from 'web3-utils'; const bigNumber = new BN(3); diff --git a/packages/web3-utils/types/tests/left-pad-tests.ts b/packages/web3-utils/types/tests/left-pad-tests.ts index e07679c59e5..5b706f5137a 100644 --- a/packages/web3-utils/types/tests/left-pad-tests.ts +++ b/packages/web3-utils/types/tests/left-pad-tests.ts @@ -17,7 +17,7 @@ * @date 2018 */ -import { BN, leftPad } from "utils"; +import { BN, leftPad } from 'web3-utils'; const bigNumber = new BN(3); diff --git a/packages/web3-utils/types/tests/number-to-hex-tests.ts b/packages/web3-utils/types/tests/number-to-hex-tests.ts index bb93953cbea..cb185f8bb53 100644 --- a/packages/web3-utils/types/tests/number-to-hex-tests.ts +++ b/packages/web3-utils/types/tests/number-to-hex-tests.ts @@ -17,7 +17,7 @@ * @date 2018 */ -import { BN, numberToHex } from "utils"; +import { BN, numberToHex } from 'web3-utils'; const bigNumber = new BN(3); diff --git a/packages/web3-utils/types/tests/pad-left-tests.ts b/packages/web3-utils/types/tests/pad-left-tests.ts index 40677ae4f27..34072c2fd4e 100644 --- a/packages/web3-utils/types/tests/pad-left-tests.ts +++ b/packages/web3-utils/types/tests/pad-left-tests.ts @@ -17,7 +17,7 @@ * @date 2018 */ -import { BN, padLeft } from "utils"; +import { BN, padLeft } from 'web3-utils'; const bigNumber = new BN(3); diff --git a/packages/web3-utils/types/tests/pad-right-tests.ts b/packages/web3-utils/types/tests/pad-right-tests.ts index 1f3862764a0..71cd30f7ae3 100644 --- a/packages/web3-utils/types/tests/pad-right-tests.ts +++ b/packages/web3-utils/types/tests/pad-right-tests.ts @@ -17,7 +17,7 @@ * @date 2018 */ -import { BN, padRight } from "utils"; +import { BN, padRight } from 'web3-utils'; const bigNumber = new BN(3); diff --git a/packages/web3-utils/types/tests/random-hex-tests.ts b/packages/web3-utils/types/tests/random-hex-tests.ts index 2bc17e31b74..c8df92f21ef 100644 --- a/packages/web3-utils/types/tests/random-hex-tests.ts +++ b/packages/web3-utils/types/tests/random-hex-tests.ts @@ -17,7 +17,7 @@ * @date 2018 */ -import { BN, randomHex } from "utils"; +import { BN, randomHex } from 'web3-utils'; const bigNumber = new BN(3); diff --git a/packages/web3-utils/types/tests/right-pad-tests.ts b/packages/web3-utils/types/tests/right-pad-tests.ts index 20bb6745bfe..24c67924f9e 100644 --- a/packages/web3-utils/types/tests/right-pad-tests.ts +++ b/packages/web3-utils/types/tests/right-pad-tests.ts @@ -17,7 +17,7 @@ * @date 2018 */ -import { BN, rightPad } from "utils"; +import { BN, rightPad } from 'web3-utils'; const bigNumber = new BN(3); diff --git a/packages/web3-utils/types/tests/sha3-tests.ts b/packages/web3-utils/types/tests/sha3-tests.ts index 0808e9cc3cb..e7af8b80960 100644 --- a/packages/web3-utils/types/tests/sha3-tests.ts +++ b/packages/web3-utils/types/tests/sha3-tests.ts @@ -17,7 +17,7 @@ * @date 2018 */ -import { BN, sha3 } from "utils"; +import { BN, sha3 } from 'web3-utils'; const bigNumber = new BN(3); diff --git a/packages/web3-utils/types/tests/solidity-sha3-tests.ts b/packages/web3-utils/types/tests/solidity-sha3-tests.ts index aa39cf3083f..5496939c029 100644 --- a/packages/web3-utils/types/tests/solidity-sha3-tests.ts +++ b/packages/web3-utils/types/tests/solidity-sha3-tests.ts @@ -17,7 +17,7 @@ * @date 2018 */ -import { BN, soliditySha3 } from "utils"; +import { BN, soliditySha3 } from 'web3-utils'; const bigNumber = new BN(3); diff --git a/packages/web3-utils/types/tests/string-to-hex-tests.ts b/packages/web3-utils/types/tests/string-to-hex-tests.ts index 1ed1d852d7c..f4c7d499524 100644 --- a/packages/web3-utils/types/tests/string-to-hex-tests.ts +++ b/packages/web3-utils/types/tests/string-to-hex-tests.ts @@ -17,7 +17,7 @@ * @date 2018 */ -import { BN, stringToHex } from "utils"; +import { BN, stringToHex } from 'web3-utils'; const bigNumber = new BN(3); diff --git a/packages/web3-utils/types/tests/test-address-tests.ts b/packages/web3-utils/types/tests/test-address-tests.ts index 67ddd1949b4..a393832df19 100644 --- a/packages/web3-utils/types/tests/test-address-tests.ts +++ b/packages/web3-utils/types/tests/test-address-tests.ts @@ -17,7 +17,7 @@ * @date 2018 */ -import { BN, testAddress } from "utils"; +import { BN, testAddress } from 'web3-utils'; const bigNumber = new BN(3); diff --git a/packages/web3-utils/types/tests/test-topic-tests.ts b/packages/web3-utils/types/tests/test-topic-tests.ts index 97de3af82ed..02d4064752b 100644 --- a/packages/web3-utils/types/tests/test-topic-tests.ts +++ b/packages/web3-utils/types/tests/test-topic-tests.ts @@ -17,7 +17,7 @@ * @date 2018 */ -import { BN, testTopic } from "utils"; +import { BN, testTopic } from 'web3-utils'; const bigNumber = new BN(3); diff --git a/packages/web3-utils/types/tests/to-ascii-tests.ts b/packages/web3-utils/types/tests/to-ascii-tests.ts index 483a1014d7a..cb8fc9efa6e 100644 --- a/packages/web3-utils/types/tests/to-ascii-tests.ts +++ b/packages/web3-utils/types/tests/to-ascii-tests.ts @@ -17,7 +17,7 @@ * @date 2018 */ -import { BN, toAscii } from "utils"; +import { BN, toAscii } from 'web3-utils'; const bigNumber = new BN(3); diff --git a/packages/web3-utils/types/tests/to-bn-tests.ts b/packages/web3-utils/types/tests/to-bn-tests.ts index 6d205a135e5..18562c0b62a 100644 --- a/packages/web3-utils/types/tests/to-bn-tests.ts +++ b/packages/web3-utils/types/tests/to-bn-tests.ts @@ -17,7 +17,7 @@ * @date 2018 */ -import { toBN } from 'utils'; +import { toBN } from 'web3-utils'; toBN(4); // $ExpectType BN toBN('443'); // $ExpectType BN diff --git a/packages/web3-utils/types/tests/to-check-sum-address-tests.ts b/packages/web3-utils/types/tests/to-check-sum-address-tests.ts index f28034a69c1..db7d922f3c7 100644 --- a/packages/web3-utils/types/tests/to-check-sum-address-tests.ts +++ b/packages/web3-utils/types/tests/to-check-sum-address-tests.ts @@ -17,7 +17,7 @@ * @date 2018 */ -import { BN, toChecksumAddress } from "utils"; +import { BN, toChecksumAddress } from 'web3-utils'; const bigNumber = new BN(3); diff --git a/packages/web3-utils/types/tests/to-decimal-tests.ts b/packages/web3-utils/types/tests/to-decimal-tests.ts index b8d75e52aab..dea688df966 100644 --- a/packages/web3-utils/types/tests/to-decimal-tests.ts +++ b/packages/web3-utils/types/tests/to-decimal-tests.ts @@ -17,7 +17,7 @@ * @date 2018 */ -import { BN, toDecimal } from "utils"; +import { BN, toDecimal } from 'web3-utils'; const bigNumber = new BN(3); diff --git a/packages/web3-utils/types/tests/to-hex-tests.ts b/packages/web3-utils/types/tests/to-hex-tests.ts index bbddf37c0f8..ccf0bcb1e95 100644 --- a/packages/web3-utils/types/tests/to-hex-tests.ts +++ b/packages/web3-utils/types/tests/to-hex-tests.ts @@ -17,7 +17,7 @@ * @date 2018 */ -import { BN, toHex } from "utils"; +import { BN, toHex } from 'web3-utils'; const bigNumber = new BN(3); diff --git a/packages/web3-utils/types/tests/to-twos-compement-tests.ts b/packages/web3-utils/types/tests/to-twos-compement-tests.ts index cee149d3c53..07c3a02621c 100644 --- a/packages/web3-utils/types/tests/to-twos-compement-tests.ts +++ b/packages/web3-utils/types/tests/to-twos-compement-tests.ts @@ -17,7 +17,7 @@ * @date 2018 */ -import { toTwosComplement, BN } from 'utils'; +import { toTwosComplement, BN } from 'web3-utils'; const bigNumber = new BN(3); diff --git a/packages/web3-utils/types/tests/to-utf8-tests.ts b/packages/web3-utils/types/tests/to-utf8-tests.ts index d88eb653ecd..8959d639976 100644 --- a/packages/web3-utils/types/tests/to-utf8-tests.ts +++ b/packages/web3-utils/types/tests/to-utf8-tests.ts @@ -17,7 +17,7 @@ * @date 2018 */ -import { BN, toUtf8 } from "utils"; +import { BN, toUtf8 } from 'web3-utils'; const bigNumber = new BN(3); diff --git a/packages/web3-utils/types/tests/to-wei-tests.ts b/packages/web3-utils/types/tests/to-wei-tests.ts index 97aac5cf9ea..3d36b51c987 100644 --- a/packages/web3-utils/types/tests/to-wei-tests.ts +++ b/packages/web3-utils/types/tests/to-wei-tests.ts @@ -17,7 +17,7 @@ * @date 2018 */ -import { BN, toWei } from "utils"; +import { BN, toWei } from 'web3-utils'; const bigNumber = new BN(3); diff --git a/packages/web3-utils/types/tests/unit-map-tests.ts b/packages/web3-utils/types/tests/unit-map-tests.ts index 0336828ba80..29d02415c55 100644 --- a/packages/web3-utils/types/tests/unit-map-tests.ts +++ b/packages/web3-utils/types/tests/unit-map-tests.ts @@ -17,6 +17,6 @@ * @date 2018 */ -import { unitMap } from "utils"; +import { unitMap } from 'web3-utils'; unitMap(); // $ExpectType Units diff --git a/packages/web3-utils/types/tests/utf8-to-hex-tests.ts b/packages/web3-utils/types/tests/utf8-to-hex-tests.ts index 33a973ff35c..32fd614a4cb 100644 --- a/packages/web3-utils/types/tests/utf8-to-hex-tests.ts +++ b/packages/web3-utils/types/tests/utf8-to-hex-tests.ts @@ -17,7 +17,7 @@ * @date 2018 */ -import { BN, utf8ToHex } from "utils"; +import { BN, utf8ToHex } from 'web3-utils'; const bigNumber = new BN(3); diff --git a/packages/web3-utils/types/tsconfig.json b/packages/web3-utils/types/tsconfig.json index 120865e21e3..a44e769384d 100644 --- a/packages/web3-utils/types/tsconfig.json +++ b/packages/web3-utils/types/tsconfig.json @@ -11,7 +11,7 @@ "allowSyntheticDefaultImports": true, "baseUrl": ".", "paths": { - "utils": ["."] + "web3-utils": ["."] } } } From a3b0dadcfe3ad1be5d3577fee9c2813a1ec55210 Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Sun, 2 Dec 2018 08:34:16 +0000 Subject: [PATCH 44/62] `_jsonInterfaceMethodToString` now returns `AbiItem` --- packages/web3-utils/types/index.d.ts | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/packages/web3-utils/types/index.d.ts b/packages/web3-utils/types/index.d.ts index 4f773d29d92..8674a1a8de7 100644 --- a/packages/web3-utils/types/index.d.ts +++ b/packages/web3-utils/types/index.d.ts @@ -117,8 +117,7 @@ export function toWei(value: number | string | BN, unit?: Unit): string | BN; export function isBloom(bloom: string): boolean; export function isTopic(topic: string): boolean; export function _fireError(error: fireError | string | Error, emitter: {}, reject: (error: Error) => void, callback: (error: Error) => void): {}; -export function _jsonInterfaceMethodToString(json: {}): string; -export function _flattenTypes(includeTuple: boolean, puts: {}): string[]; +export function _jsonInterfaceMethodToString(abiItem: AbiItem): string; export function soliditySha3(...val: Mixed[]): string; export function getUnitValue(unit: Unit): string; export function unitMap(): Units; @@ -163,3 +162,27 @@ export interface Units { gether: string; tether: string; } + +// move this out to a generic place later on +// should be able to be set in a generic location +// so we can import and export but the interface code +// is in 1 place +export interface AbiItem { + constant: boolean; + inputs: AbiInputs[]; + name: string; + outputs: AbiOuputs[]; + payable: boolean; + stateMutability: string; // could be a enum once we move this to generic place + type: string // again could be a enum once we move this to generic place +} + +export interface AbiInputs { + name: string; + type: string; +} + +export interface AbiOuputs { + name: string; + type: string; +} From d947f6650e338c741a32c57369e3bf9d26dd0666 Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Sun, 2 Dec 2018 08:34:34 +0000 Subject: [PATCH 45/62] new tests for `_jsonInterfaceMethodToString` with new `AbiItem` --- .../json-interface-method-to-string-tests.ts | 37 ++++++++++++++++++- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/packages/web3-utils/types/tests/json-interface-method-to-string-tests.ts b/packages/web3-utils/types/tests/json-interface-method-to-string-tests.ts index 02f664ef328..4eafa761288 100644 --- a/packages/web3-utils/types/tests/json-interface-method-to-string-tests.ts +++ b/packages/web3-utils/types/tests/json-interface-method-to-string-tests.ts @@ -17,6 +17,39 @@ * @date 2018 */ -import { _jsonInterfaceMethodToString } from 'web3-utils'; +import { _jsonInterfaceMethodToString, AbiItem } from 'web3-utils'; -_jsonInterfaceMethodToString({}); // $ExpectType string +const abiItem: AbiItem = { + constant: true, + inputs: [ + { + name: 'testMe', + type: 'uint256[3]' + } + ], + name: "testName", + outputs: [ + { + name: "test", + type: "uint256" + } + ], + payable: false, + stateMutability: "pure", + type: "function" +}; + +_jsonInterfaceMethodToString(abiItem); // $ExpectType string + +// $ExpectError +_jsonInterfaceMethodToString(['string']); +// $ExpectError +_jsonInterfaceMethodToString(234); +// $ExpectError +_jsonInterfaceMethodToString([4]); +// $ExpectError +_jsonInterfaceMethodToString(true); +// $ExpectError +_jsonInterfaceMethodToString(null); +// $ExpectError +_jsonInterfaceMethodToString(undefined); From 14ca4baa17ae88c2c92a3f2d0978423a4175998d Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Sun, 2 Dec 2018 08:36:51 +0000 Subject: [PATCH 46/62] `_flattenTypes` does not need `export` as its only used in this file now --- packages/web3-utils/src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/web3-utils/src/index.js b/packages/web3-utils/src/index.js index 64503859163..27154a6be6b 100644 --- a/packages/web3-utils/src/index.js +++ b/packages/web3-utils/src/index.js @@ -114,7 +114,7 @@ export const _jsonInterfaceMethodToString = (json) => { * * @returns {Array} parameters as strings */ -export const _flattenTypes = (includeTuple, puts) => { +const _flattenTypes = (includeTuple, puts) => { // console.log("entered _flattenTypes. inputs/outputs: " + puts) const types = []; From 11019796e894b86a696f237bdf0dded7c1fe0ff7 Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Sun, 2 Dec 2018 08:37:23 +0000 Subject: [PATCH 47/62] remove unneeded `_flattenTypes` tests --- .../types/tests/flatten-types-tests.ts | 44 ------------------- 1 file changed, 44 deletions(-) delete mode 100644 packages/web3-utils/types/tests/flatten-types-tests.ts diff --git a/packages/web3-utils/types/tests/flatten-types-tests.ts b/packages/web3-utils/types/tests/flatten-types-tests.ts deleted file mode 100644 index 6565777bf69..00000000000 --- a/packages/web3-utils/types/tests/flatten-types-tests.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - This file is part of web3.js. - web3.js is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - web3.js is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with web3.js. If not, see . -*/ -/** - * @file index.d.ts - * @author Josh Stevens - * @date 2018 - */ - -import { BN, _flattenTypes } from 'web3-utils'; - -const bigNumber = new BN(3); - -_flattenTypes(true, {}); // $ExpectType string[] -_flattenTypes(false, {}); // $ExpectType string[] - -// $ExpectError -_flattenTypes(true, null); -// $ExpectError -_flattenTypes(true, undefined); -// $ExpectError -_flattenTypes(656, {}); -// $ExpectError -_flattenTypes(bigNumber, {}); -// $ExpectError -_flattenTypes(['string'], {}); -// $ExpectError -_flattenTypes([4], {}); -// $ExpectError -_flattenTypes('string', {}); -// $ExpectError -_flattenTypes(null, {}); -// $ExpectError -_flattenTypes(undefined, {}); From cc158ffae3ffc5524abfef9369c2651e80de2c8b Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Sun, 2 Dec 2018 08:40:20 +0000 Subject: [PATCH 48/62] renamed `AbiItem` > `ABIItem` --- packages/web3-utils/types/index.d.ts | 12 ++++++------ .../tests/json-interface-method-to-string-tests.ts | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/web3-utils/types/index.d.ts b/packages/web3-utils/types/index.d.ts index 8674a1a8de7..aa654574143 100644 --- a/packages/web3-utils/types/index.d.ts +++ b/packages/web3-utils/types/index.d.ts @@ -117,7 +117,7 @@ export function toWei(value: number | string | BN, unit?: Unit): string | BN; export function isBloom(bloom: string): boolean; export function isTopic(topic: string): boolean; export function _fireError(error: fireError | string | Error, emitter: {}, reject: (error: Error) => void, callback: (error: Error) => void): {}; -export function _jsonInterfaceMethodToString(abiItem: AbiItem): string; +export function _jsonInterfaceMethodToString(abiItem: ABIItem): string; export function soliditySha3(...val: Mixed[]): string; export function getUnitValue(unit: Unit): string; export function unitMap(): Units; @@ -167,22 +167,22 @@ export interface Units { // should be able to be set in a generic location // so we can import and export but the interface code // is in 1 place -export interface AbiItem { +export interface ABIItem { constant: boolean; - inputs: AbiInputs[]; + inputs: ABIInputs[]; name: string; - outputs: AbiOuputs[]; + outputs: ABIOuputs[]; payable: boolean; stateMutability: string; // could be a enum once we move this to generic place type: string // again could be a enum once we move this to generic place } -export interface AbiInputs { +export interface ABIInputs { name: string; type: string; } -export interface AbiOuputs { +export interface ABIOuputs { name: string; type: string; } diff --git a/packages/web3-utils/types/tests/json-interface-method-to-string-tests.ts b/packages/web3-utils/types/tests/json-interface-method-to-string-tests.ts index 4eafa761288..6d113546c3c 100644 --- a/packages/web3-utils/types/tests/json-interface-method-to-string-tests.ts +++ b/packages/web3-utils/types/tests/json-interface-method-to-string-tests.ts @@ -17,9 +17,9 @@ * @date 2018 */ -import { _jsonInterfaceMethodToString, AbiItem } from 'web3-utils'; +import { _jsonInterfaceMethodToString, ABIItem } from 'web3-utils'; -const abiItem: AbiItem = { +const abiItem: ABIItem = { constant: true, inputs: [ { From aa53e0f05116a85073274118f1823c99476bb099 Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Sun, 2 Dec 2018 08:46:44 +0000 Subject: [PATCH 49/62] remove `s` on input as they are a single object and only `inputs` if a array --- packages/web3-utils/types/index.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/web3-utils/types/index.d.ts b/packages/web3-utils/types/index.d.ts index aa654574143..6511ecc57bb 100644 --- a/packages/web3-utils/types/index.d.ts +++ b/packages/web3-utils/types/index.d.ts @@ -169,20 +169,20 @@ export interface Units { // is in 1 place export interface ABIItem { constant: boolean; - inputs: ABIInputs[]; + inputs: ABIInput[]; name: string; - outputs: ABIOuputs[]; + outputs: ABIOuput[]; payable: boolean; stateMutability: string; // could be a enum once we move this to generic place type: string // again could be a enum once we move this to generic place } -export interface ABIInputs { +export interface ABIInput { name: string; type: string; } -export interface ABIOuputs { +export interface ABIOuput { name: string; type: string; } From fe02d6ae05b27f668763464bc04bd335a0a2ac97 Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Sun, 2 Dec 2018 08:53:26 +0000 Subject: [PATCH 50/62] remove `_fireError` as not used anymore --- packages/web3-utils/src/index.js | 55 -------------------------------- 1 file changed, 55 deletions(-) diff --git a/packages/web3-utils/src/index.js b/packages/web3-utils/src/index.js index 27154a6be6b..1ab67c71047 100644 --- a/packages/web3-utils/src/index.js +++ b/packages/web3-utils/src/index.js @@ -32,61 +32,6 @@ export {soliditySha3} from './SoliditySha3'; export {randomHex} from 'randomhex'; export * from './Utils'; -/** - * Fires an error in an event emitter and callback and returns the eventemitter - * - * @method _fireError - * - * @param {Object} error a string, a error, or an object with {message, data} - * @param {Object} emitter - * @param {Function} reject - * @param {Function} callback - * - * @returns {Object} the emitter - */ -export const _fireError = (error, emitter, reject, callback) => { - // add data if given - if (isObject(error) && !(error instanceof Error) && error.data) { - if (isObject(error.data) || isArray(error.data)) { - error.data = JSON.stringify(error.data, null, 2); - } - - error = `${error.message}\n${error.data}`; - } - - if (isString(error)) { - error = new Error(error); - } - - if (isFunction(callback)) { - callback(error); - } - if (isFunction(reject)) { - // suppress uncatched error if an error listener is present - // OR suppress uncatched error if an callback listener is present - if ( - (emitter && (isFunction(emitter.listeners) && emitter.listeners('error').length > 0)) || - isFunction(callback) - ) { - emitter.catch(() => {}); - } - // reject later, to be able to return emitter - setTimeout(() => { - reject(error); - }, 1); - } - - if (emitter && isFunction(emitter.emit)) { - // emit later, to be able to return emitter - setTimeout(() => { - emitter.emit('error', error); - emitter.removeAllListeners(); - }, 1); - } - - return emitter; -}; - /** * Should be used to create full function/event name from json abi * From 373f8c04d4a3bbc1bcaa77b6fd97903f4c0af6f3 Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Sun, 2 Dec 2018 08:53:44 +0000 Subject: [PATCH 51/62] remove `_fireError` tests --- .../types/tests/fire-error-tests.ts | 26 ------------------- 1 file changed, 26 deletions(-) delete mode 100644 packages/web3-utils/types/tests/fire-error-tests.ts diff --git a/packages/web3-utils/types/tests/fire-error-tests.ts b/packages/web3-utils/types/tests/fire-error-tests.ts deleted file mode 100644 index 20c766af26f..00000000000 --- a/packages/web3-utils/types/tests/fire-error-tests.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* - This file is part of web3.js. - web3.js is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - web3.js is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with web3.js. If not, see . -*/ -/** - * @file index.d.ts - * @author Josh Stevens - * @date 2018 - */ - -import { _fireError } from 'web3-utils'; - -_fireError(new Error('error'), {}, (error: Error) => { console.log(error); }, (error: Error) => { console.log(error); }); // $ExpectType {} -_fireError('error', {}, (error: Error) => { console.log(error); }, (error: Error) => { console.log(error); }); // $ExpectType {} -_fireError({ message: 'hey', data: 'test' }, {}, (error: Error) => { console.log(error); }, (error: Error) => { console.log(error); }); // $ExpectType {} -_fireError({ message: 'hey', data: {} }, {}, (error: Error) => { console.log(error); }, (error: Error) => { console.log(error); }); // $ExpectType {} -_fireError({ message: 'hey', data: ['test'] }, {}, (error: Error) => { console.log(error); }, (error: Error) => { console.log(error); }); // $ExpectType {} From 1f8d7705b86bb3ca1b43ed0981993da099b2d214 Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Sun, 2 Dec 2018 08:54:01 +0000 Subject: [PATCH 52/62] remove `_fireError` types --- packages/web3-utils/types/index.d.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/packages/web3-utils/types/index.d.ts b/packages/web3-utils/types/index.d.ts index 6511ecc57bb..fad66ecaef1 100644 --- a/packages/web3-utils/types/index.d.ts +++ b/packages/web3-utils/types/index.d.ts @@ -116,7 +116,6 @@ export function toUtf8(string: string): string; export function toWei(value: number | string | BN, unit?: Unit): string | BN; export function isBloom(bloom: string): boolean; export function isTopic(topic: string): boolean; -export function _fireError(error: fireError | string | Error, emitter: {}, reject: (error: Error) => void, callback: (error: Error) => void): {}; export function _jsonInterfaceMethodToString(abiItem: ABIItem): string; export function soliditySha3(...val: Mixed[]): string; export function getUnitValue(unit: Unit): string; @@ -128,11 +127,6 @@ export function testTopic(bloom: string, topic: string): boolean; // interfaces -export interface fireError { - message: string; - data: string | {} | any[]; -} - export interface Units { noether: string; wei: string; From 6020bb9e85d0f9eaba8fe2ff13ebd9953297780d Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Sun, 2 Dec 2018 09:01:03 +0000 Subject: [PATCH 53/62] Add extra tests for some types --- packages/web3-utils/types/tests/bytes-to-hex-tests.ts | 4 ++-- .../web3-utils/types/tests/check-address-checksum-tests.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/web3-utils/types/tests/bytes-to-hex-tests.ts b/packages/web3-utils/types/tests/bytes-to-hex-tests.ts index 0dffa8b52f7..eeb9eb9254a 100644 --- a/packages/web3-utils/types/tests/bytes-to-hex-tests.ts +++ b/packages/web3-utils/types/tests/bytes-to-hex-tests.ts @@ -21,10 +21,10 @@ import { BN, bytesToHex } from 'web3-utils'; const bigNumber = new BN(3); -bytesToHex([ 72, 101, 108, 108, 111, 33, 36 ]); // $ExpectType string +bytesToHex([72]); // $ExpectType string // $ExpectError -bytesToHex([ '72', 101, 108, 108, 111, 33, 36 ]); +bytesToHex(['string']); // $ExpectError bytesToHex(345); // $ExpectError diff --git a/packages/web3-utils/types/tests/check-address-checksum-tests.ts b/packages/web3-utils/types/tests/check-address-checksum-tests.ts index 8640781dd21..db4c8d4e2d6 100644 --- a/packages/web3-utils/types/tests/check-address-checksum-tests.ts +++ b/packages/web3-utils/types/tests/check-address-checksum-tests.ts @@ -26,7 +26,7 @@ checkAddressChecksum('0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e55 // $ExpectError checkAddressChecksum([4]); // $ExpectError -checkAddressChecksum([ 36 ]); +checkAddressChecksum(['string']); // $ExpectError checkAddressChecksum(345); // $ExpectError From 42ec981767b209230302c32f61fcad4f93bfa71c Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Sun, 2 Dec 2018 09:24:46 +0000 Subject: [PATCH 54/62] `_jsonInterfaceMethodToString` > `jsonInterfaceMethodToString` as it's not private --- packages/web3-eth-abi/src/AbiCoder.js | 4 ++-- .../web3-eth-contract/src/mappers/AbiMapper.js | 2 +- packages/web3-utils/src/index.js | 4 ++-- packages/web3-utils/types/index.d.ts | 2 +- .../json-interface-method-to-string-tests.ts | 16 ++++++++-------- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/packages/web3-eth-abi/src/AbiCoder.js b/packages/web3-eth-abi/src/AbiCoder.js index 7f63f7671db..c18e3c72869 100644 --- a/packages/web3-eth-abi/src/AbiCoder.js +++ b/packages/web3-eth-abi/src/AbiCoder.js @@ -56,7 +56,7 @@ export default class AbiCoder { */ encodeFunctionSignature(functionName) { if (isObject(functionName)) { - functionName = this.utils._jsonInterfaceMethodToString(functionName); + functionName = this.utils.jsonInterfaceMethodToString(functionName); } return this.utils.sha3(functionName).slice(0, 10); @@ -73,7 +73,7 @@ export default class AbiCoder { */ encodeEventSignature(functionName) { if (isObject(functionName)) { - functionName = this.utils._jsonInterfaceMethodToString(functionName); + functionName = this.utils.jsonInterfaceMethodToString(functionName); } return this.utils.sha3(functionName); diff --git a/packages/web3-eth-contract/src/mappers/AbiMapper.js b/packages/web3-eth-contract/src/mappers/AbiMapper.js index 64b7c91a9ac..dcc6a7cee49 100644 --- a/packages/web3-eth-contract/src/mappers/AbiMapper.js +++ b/packages/web3-eth-contract/src/mappers/AbiMapper.js @@ -55,7 +55,7 @@ export default class AbiMapper { abiItem.payable = self.isPayable(abiItem); if (abiItem.name) { - abiItem.funcName = self.utils._jsonInterfaceMethodToString(abiItem); + abiItem.funcName = self.utils.jsonInterfaceMethodToString(abiItem); } let abiItemModel; diff --git a/packages/web3-utils/src/index.js b/packages/web3-utils/src/index.js index 1ab67c71047..edd0510affa 100644 --- a/packages/web3-utils/src/index.js +++ b/packages/web3-utils/src/index.js @@ -35,13 +35,13 @@ export * from './Utils'; /** * Should be used to create full function/event name from json abi * - * @method _jsonInterfaceMethodToString + * @method jsonInterfaceMethodToString * * @param {Object} json * * @returns {String} full function/event name */ -export const _jsonInterfaceMethodToString = (json) => { +export const jsonInterfaceMethodToString = (json) => { if (isObject(json) && json.name && json.name.indexOf('(') !== -1) { return json.name; } diff --git a/packages/web3-utils/types/index.d.ts b/packages/web3-utils/types/index.d.ts index fad66ecaef1..4ec3b09d47e 100644 --- a/packages/web3-utils/types/index.d.ts +++ b/packages/web3-utils/types/index.d.ts @@ -116,7 +116,7 @@ export function toUtf8(string: string): string; export function toWei(value: number | string | BN, unit?: Unit): string | BN; export function isBloom(bloom: string): boolean; export function isTopic(topic: string): boolean; -export function _jsonInterfaceMethodToString(abiItem: ABIItem): string; +export function jsonInterfaceMethodToString(abiItem: ABIItem): string; export function soliditySha3(...val: Mixed[]): string; export function getUnitValue(unit: Unit): string; export function unitMap(): Units; diff --git a/packages/web3-utils/types/tests/json-interface-method-to-string-tests.ts b/packages/web3-utils/types/tests/json-interface-method-to-string-tests.ts index 6d113546c3c..9a11964af17 100644 --- a/packages/web3-utils/types/tests/json-interface-method-to-string-tests.ts +++ b/packages/web3-utils/types/tests/json-interface-method-to-string-tests.ts @@ -17,7 +17,7 @@ * @date 2018 */ -import { _jsonInterfaceMethodToString, ABIItem } from 'web3-utils'; +import { jsonInterfaceMethodToString, ABIItem } from 'web3-utils'; const abiItem: ABIItem = { constant: true, @@ -39,17 +39,17 @@ const abiItem: ABIItem = { type: "function" }; -_jsonInterfaceMethodToString(abiItem); // $ExpectType string +jsonInterfaceMethodToString(abiItem); // $ExpectType string // $ExpectError -_jsonInterfaceMethodToString(['string']); +jsonInterfaceMethodToString(['string']); // $ExpectError -_jsonInterfaceMethodToString(234); +jsonInterfaceMethodToString(234); // $ExpectError -_jsonInterfaceMethodToString([4]); +jsonInterfaceMethodToString([4]); // $ExpectError -_jsonInterfaceMethodToString(true); +jsonInterfaceMethodToString(true); // $ExpectError -_jsonInterfaceMethodToString(null); +jsonInterfaceMethodToString(null); // $ExpectError -_jsonInterfaceMethodToString(undefined); +jsonInterfaceMethodToString(undefined); From b752ce62e76af7431ace27e61178832223635edd Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Sun, 2 Dec 2018 09:35:07 +0000 Subject: [PATCH 55/62] update package.json to include `types/index.d.ts` --- packages/web3-utils/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/web3-utils/package.json b/packages/web3-utils/package.json index c73139908ec..d274df2c742 100644 --- a/packages/web3-utils/package.json +++ b/packages/web3-utils/package.json @@ -26,7 +26,7 @@ }, "files": [ "dist", - "index.d.ts" + "types/index.d.ts" ], "devDependencies": { "dtslint": "^0.3.0" From 0888f8becd63462a7cfdaeba5515b3912b7d5bfb Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Sun, 2 Dec 2018 13:24:51 +0000 Subject: [PATCH 56/62] Make sure `@file` is correct in test files` --- packages/web3-utils/types/tests/ascii-to-hex-tests.ts | 2 +- packages/web3-utils/types/tests/bytes-to-hex-tests.ts | 2 +- packages/web3-utils/types/tests/check-address-checksum-tests.ts | 2 +- packages/web3-utils/types/tests/from-ascii-tests.ts | 2 +- packages/web3-utils/types/tests/from-decimal-tests.ts | 2 +- packages/web3-utils/types/tests/from-utf8-tests.ts | 2 +- packages/web3-utils/types/tests/from-wei-tests.ts | 2 +- packages/web3-utils/types/tests/get-unit-value-tests.ts | 2 +- packages/web3-utils/types/tests/hex-to-ascii-tests.ts | 2 +- packages/web3-utils/types/tests/hex-to-bytes-tests.ts | 2 +- packages/web3-utils/types/tests/hex-to-number-string-tests.ts | 2 +- packages/web3-utils/types/tests/hex-to-number-tests.ts | 2 +- packages/web3-utils/types/tests/hex-to-string-tests.ts | 2 +- packages/web3-utils/types/tests/hex-to-utf8-tests.ts | 2 +- packages/web3-utils/types/tests/is-address-tests.ts | 2 +- packages/web3-utils/types/tests/is-big-number-tests.ts | 2 +- packages/web3-utils/types/tests/is-bloom-tests.ts | 2 +- packages/web3-utils/types/tests/is-bn-tests.ts | 2 +- packages/web3-utils/types/tests/is-hex-strict-tests.ts | 2 +- packages/web3-utils/types/tests/is-hex-tests.ts | 2 +- packages/web3-utils/types/tests/is-topic-tests.ts | 2 +- .../types/tests/json-interface-method-to-string-tests.ts | 2 +- packages/web3-utils/types/tests/keccak256-tests.ts | 2 +- packages/web3-utils/types/tests/left-pad-tests.ts | 2 +- packages/web3-utils/types/tests/number-to-hex-tests.ts | 2 +- packages/web3-utils/types/tests/pad-left-tests.ts | 2 +- packages/web3-utils/types/tests/pad-right-tests.ts | 2 +- packages/web3-utils/types/tests/random-hex-tests.ts | 2 +- packages/web3-utils/types/tests/right-pad-tests.ts | 2 +- packages/web3-utils/types/tests/solidity-sha3-tests.ts | 2 +- packages/web3-utils/types/tests/string-to-hex-tests.ts | 2 +- packages/web3-utils/types/tests/test-address-tests.ts | 2 +- packages/web3-utils/types/tests/test-topic-tests.ts | 2 +- packages/web3-utils/types/tests/to-ascii-tests.ts | 2 +- packages/web3-utils/types/tests/to-bn-tests.ts | 2 +- packages/web3-utils/types/tests/to-check-sum-address-tests.ts | 2 +- packages/web3-utils/types/tests/to-decimal-tests.ts | 2 +- packages/web3-utils/types/tests/to-hex-tests.ts | 2 +- packages/web3-utils/types/tests/to-twos-compement-tests.ts | 2 +- packages/web3-utils/types/tests/to-utf8-tests.ts | 2 +- packages/web3-utils/types/tests/to-wei-tests.ts | 2 +- packages/web3-utils/types/tests/unit-map-tests.ts | 2 +- packages/web3-utils/types/tests/utf8-to-hex-tests.ts | 2 +- 43 files changed, 43 insertions(+), 43 deletions(-) diff --git a/packages/web3-utils/types/tests/ascii-to-hex-tests.ts b/packages/web3-utils/types/tests/ascii-to-hex-tests.ts index a8777d1fe21..aaab0b00f2e 100644 --- a/packages/web3-utils/types/tests/ascii-to-hex-tests.ts +++ b/packages/web3-utils/types/tests/ascii-to-hex-tests.ts @@ -12,7 +12,7 @@ along with web3.js. If not, see . */ /** - * @file index.d.ts + * @file ascii-to-hex-tests.ts * @author Josh Stevens * @date 2018 */ diff --git a/packages/web3-utils/types/tests/bytes-to-hex-tests.ts b/packages/web3-utils/types/tests/bytes-to-hex-tests.ts index eeb9eb9254a..42e67deb4b0 100644 --- a/packages/web3-utils/types/tests/bytes-to-hex-tests.ts +++ b/packages/web3-utils/types/tests/bytes-to-hex-tests.ts @@ -12,7 +12,7 @@ along with web3.js. If not, see . */ /** - * @file index.d.ts + * @file bytes-to-hex-tests.ts * @author Josh Stevens * @date 2018 */ diff --git a/packages/web3-utils/types/tests/check-address-checksum-tests.ts b/packages/web3-utils/types/tests/check-address-checksum-tests.ts index db4c8d4e2d6..f12c3f87d76 100644 --- a/packages/web3-utils/types/tests/check-address-checksum-tests.ts +++ b/packages/web3-utils/types/tests/check-address-checksum-tests.ts @@ -12,7 +12,7 @@ along with web3.js. If not, see . */ /** - * @file index.d.ts + * @file check-address-checksum-tests.ts * @author Josh Stevens * @date 2018 */ diff --git a/packages/web3-utils/types/tests/from-ascii-tests.ts b/packages/web3-utils/types/tests/from-ascii-tests.ts index 6cbb3835d8a..935ba484933 100644 --- a/packages/web3-utils/types/tests/from-ascii-tests.ts +++ b/packages/web3-utils/types/tests/from-ascii-tests.ts @@ -12,7 +12,7 @@ along with web3.js. If not, see . */ /** - * @file index.d.ts + * @file from-ascii-tests.ts * @author Josh Stevens * @date 2018 */ diff --git a/packages/web3-utils/types/tests/from-decimal-tests.ts b/packages/web3-utils/types/tests/from-decimal-tests.ts index 49572fd8643..a196ddf3723 100644 --- a/packages/web3-utils/types/tests/from-decimal-tests.ts +++ b/packages/web3-utils/types/tests/from-decimal-tests.ts @@ -12,7 +12,7 @@ along with web3.js. If not, see . */ /** - * @file index.d.ts + * @file from-decimal-tests.ts * @author Josh Stevens * @date 2018 */ diff --git a/packages/web3-utils/types/tests/from-utf8-tests.ts b/packages/web3-utils/types/tests/from-utf8-tests.ts index 5f5065cea68..adcaafe9c75 100644 --- a/packages/web3-utils/types/tests/from-utf8-tests.ts +++ b/packages/web3-utils/types/tests/from-utf8-tests.ts @@ -12,7 +12,7 @@ along with web3.js. If not, see . */ /** - * @file index.d.ts + * @file from-utf8-tests.ts * @author Josh Stevens * @date 2018 */ diff --git a/packages/web3-utils/types/tests/from-wei-tests.ts b/packages/web3-utils/types/tests/from-wei-tests.ts index 011abb1649a..a895d17b81e 100644 --- a/packages/web3-utils/types/tests/from-wei-tests.ts +++ b/packages/web3-utils/types/tests/from-wei-tests.ts @@ -12,7 +12,7 @@ along with web3.js. If not, see . */ /** - * @file index.d.ts + * @file from-wei-tests.ts * @author Josh Stevens * @date 2018 */ diff --git a/packages/web3-utils/types/tests/get-unit-value-tests.ts b/packages/web3-utils/types/tests/get-unit-value-tests.ts index 11675a2580a..a3c78e6e393 100644 --- a/packages/web3-utils/types/tests/get-unit-value-tests.ts +++ b/packages/web3-utils/types/tests/get-unit-value-tests.ts @@ -12,7 +12,7 @@ along with web3.js. If not, see . */ /** - * @file index.d.ts + * @file get-unit-value-tests.ts * @author Josh Stevens * @date 2018 */ diff --git a/packages/web3-utils/types/tests/hex-to-ascii-tests.ts b/packages/web3-utils/types/tests/hex-to-ascii-tests.ts index 1cd7ad50241..829e72b4e71 100644 --- a/packages/web3-utils/types/tests/hex-to-ascii-tests.ts +++ b/packages/web3-utils/types/tests/hex-to-ascii-tests.ts @@ -12,7 +12,7 @@ along with web3.js. If not, see . */ /** - * @file index.d.ts + * @file hex-to-ascii-tests.ts * @author Josh Stevens * @date 2018 */ diff --git a/packages/web3-utils/types/tests/hex-to-bytes-tests.ts b/packages/web3-utils/types/tests/hex-to-bytes-tests.ts index 805adf5aea8..64479d6e6db 100644 --- a/packages/web3-utils/types/tests/hex-to-bytes-tests.ts +++ b/packages/web3-utils/types/tests/hex-to-bytes-tests.ts @@ -12,7 +12,7 @@ along with web3.js. If not, see . */ /** - * @file index.d.ts + * @file hex-to-bytes-tests.ts * @author Josh Stevens * @date 2018 */ diff --git a/packages/web3-utils/types/tests/hex-to-number-string-tests.ts b/packages/web3-utils/types/tests/hex-to-number-string-tests.ts index 3b55dd5d5c6..51a30c853ed 100644 --- a/packages/web3-utils/types/tests/hex-to-number-string-tests.ts +++ b/packages/web3-utils/types/tests/hex-to-number-string-tests.ts @@ -12,7 +12,7 @@ along with web3.js. If not, see . */ /** - * @file index.d.ts + * @file hex-to-number-string-tests.ts * @author Josh Stevens * @date 2018 */ diff --git a/packages/web3-utils/types/tests/hex-to-number-tests.ts b/packages/web3-utils/types/tests/hex-to-number-tests.ts index 218a02c7966..d854074d736 100644 --- a/packages/web3-utils/types/tests/hex-to-number-tests.ts +++ b/packages/web3-utils/types/tests/hex-to-number-tests.ts @@ -12,7 +12,7 @@ along with web3.js. If not, see . */ /** - * @file index.d.ts + * @file hex-to-number-tests.ts * @author Josh Stevens * @date 2018 */ diff --git a/packages/web3-utils/types/tests/hex-to-string-tests.ts b/packages/web3-utils/types/tests/hex-to-string-tests.ts index ab291168bbe..5c31d38d442 100644 --- a/packages/web3-utils/types/tests/hex-to-string-tests.ts +++ b/packages/web3-utils/types/tests/hex-to-string-tests.ts @@ -12,7 +12,7 @@ along with web3.js. If not, see . */ /** - * @file index.d.ts + * @file hex-to-string-tests.ts * @author Josh Stevens * @date 2018 */ diff --git a/packages/web3-utils/types/tests/hex-to-utf8-tests.ts b/packages/web3-utils/types/tests/hex-to-utf8-tests.ts index 147e0266c9e..0b58aa89822 100644 --- a/packages/web3-utils/types/tests/hex-to-utf8-tests.ts +++ b/packages/web3-utils/types/tests/hex-to-utf8-tests.ts @@ -12,7 +12,7 @@ along with web3.js. If not, see . */ /** - * @file index.d.ts + * @file hex-to-utf8-tests.ts * @author Josh Stevens * @date 2018 */ diff --git a/packages/web3-utils/types/tests/is-address-tests.ts b/packages/web3-utils/types/tests/is-address-tests.ts index 2287dfeb0b7..bb0e84f9160 100644 --- a/packages/web3-utils/types/tests/is-address-tests.ts +++ b/packages/web3-utils/types/tests/is-address-tests.ts @@ -12,7 +12,7 @@ along with web3.js. If not, see . */ /** - * @file index.d.ts + * @file is-address-tests.ts * @author Josh Stevens * @date 2018 */ diff --git a/packages/web3-utils/types/tests/is-big-number-tests.ts b/packages/web3-utils/types/tests/is-big-number-tests.ts index 8a3cb3cfc09..7ad3eb2415c 100644 --- a/packages/web3-utils/types/tests/is-big-number-tests.ts +++ b/packages/web3-utils/types/tests/is-big-number-tests.ts @@ -12,7 +12,7 @@ along with web3.js. If not, see . */ /** - * @file index.d.ts + * @file is-big-number-tests.ts * @author Josh Stevens * @date 2018 */ diff --git a/packages/web3-utils/types/tests/is-bloom-tests.ts b/packages/web3-utils/types/tests/is-bloom-tests.ts index 6e2d4cd8dff..67b40d47c42 100644 --- a/packages/web3-utils/types/tests/is-bloom-tests.ts +++ b/packages/web3-utils/types/tests/is-bloom-tests.ts @@ -12,7 +12,7 @@ along with web3.js. If not, see . */ /** - * @file index.d.ts + * @file is-bloom-tests.ts * @author Josh Stevens * @date 2018 */ diff --git a/packages/web3-utils/types/tests/is-bn-tests.ts b/packages/web3-utils/types/tests/is-bn-tests.ts index 9bcfc8c1480..690c3f3edb5 100644 --- a/packages/web3-utils/types/tests/is-bn-tests.ts +++ b/packages/web3-utils/types/tests/is-bn-tests.ts @@ -12,7 +12,7 @@ along with web3.js. If not, see . */ /** - * @file index.d.ts + * @file is-bn-tests.ts * @author Josh Stevens * @date 2018 */ diff --git a/packages/web3-utils/types/tests/is-hex-strict-tests.ts b/packages/web3-utils/types/tests/is-hex-strict-tests.ts index fe128165012..1ee311c0712 100644 --- a/packages/web3-utils/types/tests/is-hex-strict-tests.ts +++ b/packages/web3-utils/types/tests/is-hex-strict-tests.ts @@ -12,7 +12,7 @@ along with web3.js. If not, see . */ /** - * @file index.d.ts + * @file is-hex-strict-tests.ts * @author Josh Stevens * @date 2018 */ diff --git a/packages/web3-utils/types/tests/is-hex-tests.ts b/packages/web3-utils/types/tests/is-hex-tests.ts index d58dd782fb5..f0d71a050b6 100644 --- a/packages/web3-utils/types/tests/is-hex-tests.ts +++ b/packages/web3-utils/types/tests/is-hex-tests.ts @@ -12,7 +12,7 @@ along with web3.js. If not, see . */ /** - * @file index.d.ts + * @file is-hex-tests.ts * @author Josh Stevens * @date 2018 */ diff --git a/packages/web3-utils/types/tests/is-topic-tests.ts b/packages/web3-utils/types/tests/is-topic-tests.ts index ea729e12119..010cf48287b 100644 --- a/packages/web3-utils/types/tests/is-topic-tests.ts +++ b/packages/web3-utils/types/tests/is-topic-tests.ts @@ -12,7 +12,7 @@ along with web3.js. If not, see . */ /** - * @file index.d.ts + * @file is-topic-tests.ts * @author Josh Stevens * @date 2018 */ diff --git a/packages/web3-utils/types/tests/json-interface-method-to-string-tests.ts b/packages/web3-utils/types/tests/json-interface-method-to-string-tests.ts index 9a11964af17..8a40649d778 100644 --- a/packages/web3-utils/types/tests/json-interface-method-to-string-tests.ts +++ b/packages/web3-utils/types/tests/json-interface-method-to-string-tests.ts @@ -12,7 +12,7 @@ along with web3.js. If not, see . */ /** - * @file index.d.ts + * @file json-interface-method-to-string-tests.ts * @author Josh Stevens * @date 2018 */ diff --git a/packages/web3-utils/types/tests/keccak256-tests.ts b/packages/web3-utils/types/tests/keccak256-tests.ts index 44443700f83..9c19bf96a1a 100644 --- a/packages/web3-utils/types/tests/keccak256-tests.ts +++ b/packages/web3-utils/types/tests/keccak256-tests.ts @@ -12,7 +12,7 @@ along with web3.js. If not, see . */ /** - * @file index.d.ts + * @file keccak256-tests.ts * @author Josh Stevens * @date 2018 */ diff --git a/packages/web3-utils/types/tests/left-pad-tests.ts b/packages/web3-utils/types/tests/left-pad-tests.ts index 5b706f5137a..402e4d09c7c 100644 --- a/packages/web3-utils/types/tests/left-pad-tests.ts +++ b/packages/web3-utils/types/tests/left-pad-tests.ts @@ -12,7 +12,7 @@ along with web3.js. If not, see . */ /** - * @file index.d.ts + * @file left-pad-tests.ts * @author Josh Stevens * @date 2018 */ diff --git a/packages/web3-utils/types/tests/number-to-hex-tests.ts b/packages/web3-utils/types/tests/number-to-hex-tests.ts index cb185f8bb53..af2e255cdfc 100644 --- a/packages/web3-utils/types/tests/number-to-hex-tests.ts +++ b/packages/web3-utils/types/tests/number-to-hex-tests.ts @@ -12,7 +12,7 @@ along with web3.js. If not, see . */ /** - * @file index.d.ts + * @file number-to-hex-tests.ts * @author Josh Stevens * @date 2018 */ diff --git a/packages/web3-utils/types/tests/pad-left-tests.ts b/packages/web3-utils/types/tests/pad-left-tests.ts index 34072c2fd4e..849ea56a11f 100644 --- a/packages/web3-utils/types/tests/pad-left-tests.ts +++ b/packages/web3-utils/types/tests/pad-left-tests.ts @@ -12,7 +12,7 @@ along with web3.js. If not, see . */ /** - * @file index.d.ts + * @file pad-left-tests.ts * @author Josh Stevens * @date 2018 */ diff --git a/packages/web3-utils/types/tests/pad-right-tests.ts b/packages/web3-utils/types/tests/pad-right-tests.ts index 71cd30f7ae3..9c3a71ef3ef 100644 --- a/packages/web3-utils/types/tests/pad-right-tests.ts +++ b/packages/web3-utils/types/tests/pad-right-tests.ts @@ -12,7 +12,7 @@ along with web3.js. If not, see . */ /** - * @file index.d.ts + * @file pad-right-tests.ts * @author Josh Stevens * @date 2018 */ diff --git a/packages/web3-utils/types/tests/random-hex-tests.ts b/packages/web3-utils/types/tests/random-hex-tests.ts index c8df92f21ef..158e6e5eec8 100644 --- a/packages/web3-utils/types/tests/random-hex-tests.ts +++ b/packages/web3-utils/types/tests/random-hex-tests.ts @@ -12,7 +12,7 @@ along with web3.js. If not, see . */ /** - * @file index.d.ts + * @file random-hex-tests.ts * @author Josh Stevens * @date 2018 */ diff --git a/packages/web3-utils/types/tests/right-pad-tests.ts b/packages/web3-utils/types/tests/right-pad-tests.ts index 24c67924f9e..53d1a322ace 100644 --- a/packages/web3-utils/types/tests/right-pad-tests.ts +++ b/packages/web3-utils/types/tests/right-pad-tests.ts @@ -12,7 +12,7 @@ along with web3.js. If not, see . */ /** - * @file index.d.ts + * @file right-pad-tests.ts * @author Josh Stevens * @date 2018 */ diff --git a/packages/web3-utils/types/tests/solidity-sha3-tests.ts b/packages/web3-utils/types/tests/solidity-sha3-tests.ts index 5496939c029..d3d5cd59645 100644 --- a/packages/web3-utils/types/tests/solidity-sha3-tests.ts +++ b/packages/web3-utils/types/tests/solidity-sha3-tests.ts @@ -12,7 +12,7 @@ along with web3.js. If not, see . */ /** - * @file index.d.ts + * @file solidity-sha3-tests.ts * @author Josh Stevens * @date 2018 */ diff --git a/packages/web3-utils/types/tests/string-to-hex-tests.ts b/packages/web3-utils/types/tests/string-to-hex-tests.ts index f4c7d499524..ab4041d5530 100644 --- a/packages/web3-utils/types/tests/string-to-hex-tests.ts +++ b/packages/web3-utils/types/tests/string-to-hex-tests.ts @@ -12,7 +12,7 @@ along with web3.js. If not, see . */ /** - * @file index.d.ts + * @file string-to-hex-tests.ts * @author Josh Stevens * @date 2018 */ diff --git a/packages/web3-utils/types/tests/test-address-tests.ts b/packages/web3-utils/types/tests/test-address-tests.ts index a393832df19..91483d861ec 100644 --- a/packages/web3-utils/types/tests/test-address-tests.ts +++ b/packages/web3-utils/types/tests/test-address-tests.ts @@ -12,7 +12,7 @@ along with web3.js. If not, see . */ /** - * @file index.d.ts + * @file test-address-tests.ts * @author Josh Stevens * @date 2018 */ diff --git a/packages/web3-utils/types/tests/test-topic-tests.ts b/packages/web3-utils/types/tests/test-topic-tests.ts index 02d4064752b..475b9894200 100644 --- a/packages/web3-utils/types/tests/test-topic-tests.ts +++ b/packages/web3-utils/types/tests/test-topic-tests.ts @@ -12,7 +12,7 @@ along with web3.js. If not, see . */ /** - * @file index.d.ts + * @file test-topic-tests.ts * @author Josh Stevens * @date 2018 */ diff --git a/packages/web3-utils/types/tests/to-ascii-tests.ts b/packages/web3-utils/types/tests/to-ascii-tests.ts index cb8fc9efa6e..dc42ceac866 100644 --- a/packages/web3-utils/types/tests/to-ascii-tests.ts +++ b/packages/web3-utils/types/tests/to-ascii-tests.ts @@ -12,7 +12,7 @@ along with web3.js. If not, see . */ /** - * @file index.d.ts + * @file to-ascii-tests.ts * @author Josh Stevens * @date 2018 */ diff --git a/packages/web3-utils/types/tests/to-bn-tests.ts b/packages/web3-utils/types/tests/to-bn-tests.ts index 18562c0b62a..cd286aa42fa 100644 --- a/packages/web3-utils/types/tests/to-bn-tests.ts +++ b/packages/web3-utils/types/tests/to-bn-tests.ts @@ -12,7 +12,7 @@ along with web3.js. If not, see . */ /** - * @file index.d.ts + * @file to-bn-tests.ts * @author Josh Stevens * @date 2018 */ diff --git a/packages/web3-utils/types/tests/to-check-sum-address-tests.ts b/packages/web3-utils/types/tests/to-check-sum-address-tests.ts index db7d922f3c7..93b4b6e6dfc 100644 --- a/packages/web3-utils/types/tests/to-check-sum-address-tests.ts +++ b/packages/web3-utils/types/tests/to-check-sum-address-tests.ts @@ -12,7 +12,7 @@ along with web3.js. If not, see . */ /** - * @file index.d.ts + * @file to-check-sum-address-tests.ts * @author Josh Stevens * @date 2018 */ diff --git a/packages/web3-utils/types/tests/to-decimal-tests.ts b/packages/web3-utils/types/tests/to-decimal-tests.ts index dea688df966..1404347b6bf 100644 --- a/packages/web3-utils/types/tests/to-decimal-tests.ts +++ b/packages/web3-utils/types/tests/to-decimal-tests.ts @@ -12,7 +12,7 @@ along with web3.js. If not, see . */ /** - * @file index.d.ts + * @file to-decimal-tests.ts * @author Josh Stevens * @date 2018 */ diff --git a/packages/web3-utils/types/tests/to-hex-tests.ts b/packages/web3-utils/types/tests/to-hex-tests.ts index ccf0bcb1e95..7a948e73d26 100644 --- a/packages/web3-utils/types/tests/to-hex-tests.ts +++ b/packages/web3-utils/types/tests/to-hex-tests.ts @@ -12,7 +12,7 @@ along with web3.js. If not, see . */ /** - * @file index.d.ts + * @file to-hex-tests.ts * @author Josh Stevens * @date 2018 */ diff --git a/packages/web3-utils/types/tests/to-twos-compement-tests.ts b/packages/web3-utils/types/tests/to-twos-compement-tests.ts index 07c3a02621c..8638540a0ca 100644 --- a/packages/web3-utils/types/tests/to-twos-compement-tests.ts +++ b/packages/web3-utils/types/tests/to-twos-compement-tests.ts @@ -12,7 +12,7 @@ along with web3.js. If not, see . */ /** - * @file index.d.ts + * @file to-twos-compement-tests.ts * @author Josh Stevens * @date 2018 */ diff --git a/packages/web3-utils/types/tests/to-utf8-tests.ts b/packages/web3-utils/types/tests/to-utf8-tests.ts index 8959d639976..5f796cf6fc6 100644 --- a/packages/web3-utils/types/tests/to-utf8-tests.ts +++ b/packages/web3-utils/types/tests/to-utf8-tests.ts @@ -12,7 +12,7 @@ along with web3.js. If not, see . */ /** - * @file index.d.ts + * @file to-utf8-tests.ts * @author Josh Stevens * @date 2018 */ diff --git a/packages/web3-utils/types/tests/to-wei-tests.ts b/packages/web3-utils/types/tests/to-wei-tests.ts index 3d36b51c987..fc1a079d93e 100644 --- a/packages/web3-utils/types/tests/to-wei-tests.ts +++ b/packages/web3-utils/types/tests/to-wei-tests.ts @@ -12,7 +12,7 @@ along with web3.js. If not, see . */ /** - * @file index.d.ts + * @file to-wei-tests.ts * @author Josh Stevens * @date 2018 */ diff --git a/packages/web3-utils/types/tests/unit-map-tests.ts b/packages/web3-utils/types/tests/unit-map-tests.ts index 29d02415c55..c920fc08822 100644 --- a/packages/web3-utils/types/tests/unit-map-tests.ts +++ b/packages/web3-utils/types/tests/unit-map-tests.ts @@ -12,7 +12,7 @@ along with web3.js. If not, see . */ /** - * @file index.d.ts + * @file unit-map-tests.ts * @author Josh Stevens * @date 2018 */ diff --git a/packages/web3-utils/types/tests/utf8-to-hex-tests.ts b/packages/web3-utils/types/tests/utf8-to-hex-tests.ts index 32fd614a4cb..a1beaa5deb6 100644 --- a/packages/web3-utils/types/tests/utf8-to-hex-tests.ts +++ b/packages/web3-utils/types/tests/utf8-to-hex-tests.ts @@ -12,7 +12,7 @@ along with web3.js. If not, see . */ /** - * @file index.d.ts + * @file utf8-to-hex-tests.ts * @author Josh Stevens * @date 2018 */ From e308d68b9251530249de437ac8301e61e8d237ac Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Sun, 2 Dec 2018 15:19:40 +0000 Subject: [PATCH 57/62] Update README.md --- packages/web3-utils/README.md | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/packages/web3-utils/README.md b/packages/web3-utils/README.md index 8faea3d06a1..21ef44390fa 100644 --- a/packages/web3-utils/README.md +++ b/packages/web3-utils/README.md @@ -27,6 +27,8 @@ This will expose the `Web3Utils` object on the window object. ## Usage +Import all of the utils functions + ```js import * as Utils from 'web3-utils'; @@ -39,12 +41,20 @@ console.log(Utils); } ``` +Import what you need + +```js +import { asciiToHex } from 'web3-utils'; + +console.log(asciiToHex('I have 100!')); +> "0x49206861766520313030e282ac" +``` + ## Types -If you are using TypeScript all the types are defined in the `index.d.ts` file +If you are using TypeScript then all types are defined within the package itself so no need +to install any `@types` libraries. Just import the library and the types should be exposed. [docs]: http://web3js.readthedocs.io/en/1.0/ [repo]: https://github.com/ethereum/web3.js - - From 8a4155d2c3b7fa32a950d19df40f4cb32dd60c95 Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Sun, 2 Dec 2018 16:03:26 +0000 Subject: [PATCH 58/62] add `ABIType` enum --- packages/web3-utils/types/index.d.ts | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/packages/web3-utils/types/index.d.ts b/packages/web3-utils/types/index.d.ts index 4ec3b09d47e..29bb95da6be 100644 --- a/packages/web3-utils/types/index.d.ts +++ b/packages/web3-utils/types/index.d.ts @@ -162,13 +162,20 @@ export interface Units { // so we can import and export but the interface code // is in 1 place export interface ABIItem { - constant: boolean; - inputs: ABIInput[]; - name: string; - outputs: ABIOuput[]; - payable: boolean; - stateMutability: string; // could be a enum once we move this to generic place - type: string // again could be a enum once we move this to generic place + constant?: boolean; + inputs?: ABIInput[]; + name?: string; + outputs?: ABIOuput[]; + payable?: boolean; + stateMutability?: string; // could be a enum once we move this to generic place + type: ABIType // again could be a enum once we move this to generic place +} + +export enum ABIType { + function = 'function', + constructor = 'constructor', + event = 'event', + fallback = 'fallback' } export interface ABIInput { From 1c86fde80b58dcfe9ede8d3879e358250c1217b4 Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Sun, 2 Dec 2018 16:07:47 +0000 Subject: [PATCH 59/62] created `ABIType` --- packages/web3-utils/types/index.d.ts | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/packages/web3-utils/types/index.d.ts b/packages/web3-utils/types/index.d.ts index 29bb95da6be..1230e687597 100644 --- a/packages/web3-utils/types/index.d.ts +++ b/packages/web3-utils/types/index.d.ts @@ -48,6 +48,8 @@ export type Unit = | "gether" | "tether"; +export type ABIType = "function" | "constructor" | "event" | "fallback"; + export type Mixed = string | number @@ -168,14 +170,7 @@ export interface ABIItem { outputs?: ABIOuput[]; payable?: boolean; stateMutability?: string; // could be a enum once we move this to generic place - type: ABIType // again could be a enum once we move this to generic place -} - -export enum ABIType { - function = 'function', - constructor = 'constructor', - event = 'event', - fallback = 'fallback' + type: ABIType; } export interface ABIInput { From 1821c675b89e43c5096930947b68d72dab1153dc Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Sun, 2 Dec 2018 20:11:57 +0000 Subject: [PATCH 60/62] move generic stuff to the bottom to highlight it will need to be moved later on --- packages/web3-utils/types/index.d.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/web3-utils/types/index.d.ts b/packages/web3-utils/types/index.d.ts index 1230e687597..b6c7d6c672c 100644 --- a/packages/web3-utils/types/index.d.ts +++ b/packages/web3-utils/types/index.d.ts @@ -48,8 +48,6 @@ export type Unit = | "gether" | "tether"; -export type ABIType = "function" | "constructor" | "event" | "fallback"; - export type Mixed = string | number @@ -159,10 +157,10 @@ export interface Units { tether: string; } -// move this out to a generic place later on -// should be able to be set in a generic location -// so we can import and export but the interface code -// is in 1 place +/************* move this out to a generic place once we have a place for it on *******************/ + +export type ABIType = "function" | "constructor" | "event" | "fallback"; + export interface ABIItem { constant?: boolean; inputs?: ABIInput[]; @@ -182,3 +180,4 @@ export interface ABIOuput { name: string; type: string; } +/****************** End of generic stuff *****************/ From 1f6813494e144eb2d714442c4c54208fa18a69fb Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Mon, 3 Dec 2018 10:22:19 +0000 Subject: [PATCH 61/62] fix merge conflicts --- package-lock.json | 3885 +++++++++++++++---------- packages/web3-utils/package-lock.json | 1470 +++++----- 2 files changed, 3161 insertions(+), 2194 deletions(-) diff --git a/package-lock.json b/package-lock.json index 48bbecdc85e..03bc754f328 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,38 +14,128 @@ } }, "@babel/core": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.1.6.tgz", - "integrity": "sha512-Hz6PJT6e44iUNpAn8AoyAs6B3bl60g7MJQaI0rZEar6ECzh6+srYO1xlIdssio34mPaUtAb1y+XlkkSJzok3yw==", + "version": "7.1.5", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.1.5.tgz", + "integrity": "sha512-vOyH020C56tQvte++i+rX2yokZcRfbv/kKcw+/BCRw/cK6dvsr47aCzm8oC1XHwMSEWbqrZKzZRLzLnq6SFMsg==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", - "@babel/generator": "^7.1.6", + "@babel/generator": "^7.1.5", "@babel/helpers": "^7.1.5", - "@babel/parser": "^7.1.6", + "@babel/parser": "^7.1.5", "@babel/template": "^7.1.2", - "@babel/traverse": "^7.1.6", - "@babel/types": "^7.1.6", + "@babel/traverse": "^7.1.5", + "@babel/types": "^7.1.5", "convert-source-map": "^1.1.0", - "debug": "^4.1.0", - "json5": "^2.1.0", + "debug": "^3.1.0", + "json5": "^0.5.0", "lodash": "^4.17.10", "resolve": "^1.3.2", "semver": "^5.4.1", "source-map": "^0.5.0" + }, + "dependencies": { + "@babel/generator": { + "version": "7.1.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.1.5.tgz", + "integrity": "sha512-IO31r62xfMI+wBJVmgx0JR9ZOHty8HkoYpQAjRWUGG9vykBTlGHdArZ8zoFtpUu2gs17K7qTl/TtPpiSi6t+MA==", + "dev": true, + "requires": { + "@babel/types": "^7.1.5", + "jsesc": "^2.5.1", + "lodash": "^4.17.10", + "source-map": "^0.5.0", + "trim-right": "^1.0.1" + } + }, + "@babel/parser": { + "version": "7.1.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.1.5.tgz", + "integrity": "sha512-WXKf5K5HT6X0kKiCOezJZFljsfxKV1FpU8Tf1A7ZpGvyd/Q4hlrJm2EwoH2onaUq3O4tLDp+4gk0hHPsMyxmOg==", + "dev": true + }, + "@babel/traverse": { + "version": "7.1.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.1.5.tgz", + "integrity": "sha512-eU6XokWypl0MVJo+MTSPUtlfPePkrqsF26O+l1qFGlCKWwmiYAYy2Sy44Qw8m2u/LbPCsxYt90rghmqhYMGpPA==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@babel/generator": "^7.1.5", + "@babel/helper-function-name": "^7.1.0", + "@babel/helper-split-export-declaration": "^7.0.0", + "@babel/parser": "^7.1.5", + "@babel/types": "^7.1.5", + "debug": "^3.1.0", + "globals": "^11.1.0", + "lodash": "^4.17.10" + } + }, + "@babel/types": { + "version": "7.1.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.1.5.tgz", + "integrity": "sha512-sJeqa/d9eM/bax8Ivg+fXF7FpN3E/ZmTrWbkk6r+g7biVYfALMnLin4dKijsaqEhpd2xvOGfQTkQkD31YCVV4A==", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "lodash": "^4.17.10", + "to-fast-properties": "^2.0.0" + } + }, + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "globals": { + "version": "11.9.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.9.0.tgz", + "integrity": "sha512-5cJVtyXWH8PiJPVLZzzoIizXx944O4OmRro5MWKx5fT4MgcN7OfaMutPeaTdJCCURwbWdhhcCWcKIffPnmTzBg==", + "dev": true + }, + "jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + }, + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "dev": true + } } }, "@babel/generator": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.1.6.tgz", - "integrity": "sha512-brwPBtVvdYdGxtenbQgfCdDPmtkmUBZPjUoK5SXJEBuHaA5BCubh9ly65fzXz7R6o5rA76Rs22ES8Z+HCc0YIQ==", + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.1.3.tgz", + "integrity": "sha512-ZoCZGcfIJFJuZBqxcY9OjC1KW2lWK64qrX1o4UYL3yshVhwKFYgzpWZ0vvtGMNJdTlvkw0W+HR1VnYN8q3QPFQ==", "dev": true, "requires": { - "@babel/types": "^7.1.6", + "@babel/types": "^7.1.3", "jsesc": "^2.5.1", "lodash": "^4.17.10", "source-map": "^0.5.0", "trim-right": "^1.0.1" + }, + "dependencies": { + "jsesc": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.1.tgz", + "integrity": "sha1-5CGiqOINawgZ3yiQj3glJrlt0f4=", + "dev": true + } } }, "@babel/helper-annotate-as-pure": { @@ -249,6 +339,88 @@ "@babel/template": "^7.1.2", "@babel/traverse": "^7.1.5", "@babel/types": "^7.1.5" + }, + "dependencies": { + "@babel/generator": { + "version": "7.1.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.1.5.tgz", + "integrity": "sha512-IO31r62xfMI+wBJVmgx0JR9ZOHty8HkoYpQAjRWUGG9vykBTlGHdArZ8zoFtpUu2gs17K7qTl/TtPpiSi6t+MA==", + "dev": true, + "requires": { + "@babel/types": "^7.1.5", + "jsesc": "^2.5.1", + "lodash": "^4.17.10", + "source-map": "^0.5.0", + "trim-right": "^1.0.1" + } + }, + "@babel/parser": { + "version": "7.1.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.1.5.tgz", + "integrity": "sha512-WXKf5K5HT6X0kKiCOezJZFljsfxKV1FpU8Tf1A7ZpGvyd/Q4hlrJm2EwoH2onaUq3O4tLDp+4gk0hHPsMyxmOg==", + "dev": true + }, + "@babel/traverse": { + "version": "7.1.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.1.5.tgz", + "integrity": "sha512-eU6XokWypl0MVJo+MTSPUtlfPePkrqsF26O+l1qFGlCKWwmiYAYy2Sy44Qw8m2u/LbPCsxYt90rghmqhYMGpPA==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@babel/generator": "^7.1.5", + "@babel/helper-function-name": "^7.1.0", + "@babel/helper-split-export-declaration": "^7.0.0", + "@babel/parser": "^7.1.5", + "@babel/types": "^7.1.5", + "debug": "^3.1.0", + "globals": "^11.1.0", + "lodash": "^4.17.10" + } + }, + "@babel/types": { + "version": "7.1.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.1.5.tgz", + "integrity": "sha512-sJeqa/d9eM/bax8Ivg+fXF7FpN3E/ZmTrWbkk6r+g7biVYfALMnLin4dKijsaqEhpd2xvOGfQTkQkD31YCVV4A==", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "lodash": "^4.17.10", + "to-fast-properties": "^2.0.0" + } + }, + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "globals": { + "version": "11.9.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.9.0.tgz", + "integrity": "sha512-5cJVtyXWH8PiJPVLZzzoIizXx944O4OmRro5MWKx5fT4MgcN7OfaMutPeaTdJCCURwbWdhhcCWcKIffPnmTzBg==", + "dev": true + }, + "jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + }, + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "dev": true + } } }, "@babel/highlight": { @@ -260,12 +432,55 @@ "chalk": "^2.0.0", "esutils": "^2.0.2", "js-tokens": "^4.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } } }, "@babel/parser": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.1.6.tgz", - "integrity": "sha512-dWP6LJm9nKT6ALaa+bnL247GHHMWir3vSlZ2+IHgHgktZQx0L3Uvq2uAWcuzIe+fujRsYWBW2q622C5UvGK9iQ==", + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.1.3.tgz", + "integrity": "sha512-gqmspPZOMW3MIRb9HlrnbZHXI1/KHTOroBwN1NcLL6pWxzqzEKGvRTq0W/PxS45OtQGbaFikSQpkS5zbnsQm2w==", "dev": true }, "@babel/plugin-proposal-async-generator-functions": { @@ -338,6 +553,37 @@ "@babel/helper-plugin-utils": "^7.0.0", "@babel/helper-regex": "^7.0.0", "regexpu-core": "^4.2.0" + }, + "dependencies": { + "regexpu-core": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.2.0.tgz", + "integrity": "sha512-Z835VSnJJ46CNBttalHD/dB+Sj2ezmY6Xp38npwU87peK6mqOzOpV8eYktdkLTEkzzD+JsTcxd84ozd8I14+rw==", + "dev": true, + "requires": { + "regenerate": "^1.4.0", + "regenerate-unicode-properties": "^7.0.0", + "regjsgen": "^0.4.0", + "regjsparser": "^0.3.0", + "unicode-match-property-ecmascript": "^1.0.4", + "unicode-match-property-value-ecmascript": "^1.0.2" + } + }, + "regjsgen": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.4.0.tgz", + "integrity": "sha512-X51Lte1gCYUdlwhF28+2YMO0U6WeN0GLpgpA7LK7mbdDnkQYiwvEpmpe0F/cv5L14EbxgrdayAG3JETBv0dbXA==", + "dev": true + }, + "regjsparser": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.3.0.tgz", + "integrity": "sha512-zza72oZBBHzt64G7DxdqrOo/30bhHkwMUoT0WqfGu98XLd7N+1tsy5MJ96Bk4MD0y74n629RhmrGW6XlnLLwCA==", + "dev": true, + "requires": { + "jsesc": "~0.5.0" + } + } } }, "@babel/plugin-syntax-async-generators": { @@ -447,6 +693,14 @@ "@babel/helper-replace-supers": "^7.1.0", "@babel/helper-split-export-declaration": "^7.0.0", "globals": "^11.1.0" + }, + "dependencies": { + "globals": { + "version": "11.9.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.9.0.tgz", + "integrity": "sha512-5cJVtyXWH8PiJPVLZzzoIizXx944O4OmRro5MWKx5fT4MgcN7OfaMutPeaTdJCCURwbWdhhcCWcKIffPnmTzBg==", + "dev": true + } } }, "@babel/plugin-transform-computed-properties": { @@ -476,6 +730,37 @@ "@babel/helper-plugin-utils": "^7.0.0", "@babel/helper-regex": "^7.0.0", "regexpu-core": "^4.1.3" + }, + "dependencies": { + "regexpu-core": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.2.0.tgz", + "integrity": "sha512-Z835VSnJJ46CNBttalHD/dB+Sj2ezmY6Xp38npwU87peK6mqOzOpV8eYktdkLTEkzzD+JsTcxd84ozd8I14+rw==", + "dev": true, + "requires": { + "regenerate": "^1.4.0", + "regenerate-unicode-properties": "^7.0.0", + "regjsgen": "^0.4.0", + "regjsparser": "^0.3.0", + "unicode-match-property-ecmascript": "^1.0.4", + "unicode-match-property-value-ecmascript": "^1.0.2" + } + }, + "regjsgen": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.4.0.tgz", + "integrity": "sha512-X51Lte1gCYUdlwhF28+2YMO0U6WeN0GLpgpA7LK7mbdDnkQYiwvEpmpe0F/cv5L14EbxgrdayAG3JETBv0dbXA==", + "dev": true + }, + "regjsparser": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.3.0.tgz", + "integrity": "sha512-zza72oZBBHzt64G7DxdqrOo/30bhHkwMUoT0WqfGu98XLd7N+1tsy5MJ96Bk4MD0y74n629RhmrGW6XlnLLwCA==", + "dev": true, + "requires": { + "jsesc": "~0.5.0" + } + } } }, "@babel/plugin-transform-duplicate-keys": { @@ -615,6 +900,23 @@ "@babel/helper-plugin-utils": "^7.0.0", "resolve": "^1.8.1", "semver": "^5.5.1" + }, + "dependencies": { + "resolve": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz", + "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", + "dev": true, + "requires": { + "path-parse": "^1.0.5" + } + }, + "semver": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", + "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==", + "dev": true + } } }, "@babel/plugin-transform-shorthand-properties": { @@ -673,6 +975,37 @@ "@babel/helper-plugin-utils": "^7.0.0", "@babel/helper-regex": "^7.0.0", "regexpu-core": "^4.1.3" + }, + "dependencies": { + "regexpu-core": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.2.0.tgz", + "integrity": "sha512-Z835VSnJJ46CNBttalHD/dB+Sj2ezmY6Xp38npwU87peK6mqOzOpV8eYktdkLTEkzzD+JsTcxd84ozd8I14+rw==", + "dev": true, + "requires": { + "regenerate": "^1.4.0", + "regenerate-unicode-properties": "^7.0.0", + "regjsgen": "^0.4.0", + "regjsparser": "^0.3.0", + "unicode-match-property-ecmascript": "^1.0.4", + "unicode-match-property-value-ecmascript": "^1.0.2" + } + }, + "regjsgen": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.4.0.tgz", + "integrity": "sha512-X51Lte1gCYUdlwhF28+2YMO0U6WeN0GLpgpA7LK7mbdDnkQYiwvEpmpe0F/cv5L14EbxgrdayAG3JETBv0dbXA==", + "dev": true + }, + "regjsparser": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.3.0.tgz", + "integrity": "sha512-zza72oZBBHzt64G7DxdqrOo/30bhHkwMUoT0WqfGu98XLd7N+1tsy5MJ96Bk4MD0y74n629RhmrGW6XlnLLwCA==", + "dev": true, + "requires": { + "jsesc": "~0.5.0" + } + } } }, "@babel/polyfill": { @@ -692,9 +1025,9 @@ } }, "@babel/preset-env": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.1.6.tgz", - "integrity": "sha512-YIBfpJNQMBkb6MCkjz/A9J76SNCSuGVamOVBgoUkLzpJD/z8ghHi9I42LQ4pulVX68N/MmImz6ZTixt7Azgexw==", + "version": "7.1.5", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.1.5.tgz", + "integrity": "sha512-pQ+2o0YyCp98XG0ODOHJd9z4GsSoV5jicSedRwCrU8uiqcJahwQiOq0asSZEb/m/lwyu6X5INvH/DSiwnQKncw==", "dev": true, "requires": { "@babel/helper-module-imports": "^7.0.0", @@ -738,6 +1071,19 @@ "invariant": "^2.2.2", "js-levenshtein": "^1.1.3", "semver": "^5.3.0" + }, + "dependencies": { + "browserslist": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.3.4.tgz", + "integrity": "sha512-u5iz+ijIMUlmV8blX82VGFrB9ecnUg5qEt55CMZ/YJEhha+d8qpBfOFuutJ6F/VKRXjZoD33b6uvarpPxcl3RA==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30000899", + "electron-to-chromium": "^1.3.82", + "node-releases": "^1.0.1" + } + } } }, "@babel/runtime": { @@ -769,31 +1115,71 @@ } }, "@babel/traverse": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.1.6.tgz", - "integrity": "sha512-CXedit6GpISz3sC2k2FsGCUpOhUqKdyL0lqNrImQojagnUMXf8hex4AxYFRuMkNGcvJX5QAFGzB5WJQmSv8SiQ==", + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.1.4.tgz", + "integrity": "sha512-my9mdrAIGdDiSVBuMjpn/oXYpva0/EZwWL3sm3Wcy/AVWO2eXnsoZruOT9jOGNRXU8KbCIu5zsKnXcAJ6PcV6Q==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", - "@babel/generator": "^7.1.6", + "@babel/generator": "^7.1.3", "@babel/helper-function-name": "^7.1.0", "@babel/helper-split-export-declaration": "^7.0.0", - "@babel/parser": "^7.1.6", - "@babel/types": "^7.1.6", - "debug": "^4.1.0", + "@babel/parser": "^7.1.3", + "@babel/types": "^7.1.3", + "debug": "^3.1.0", "globals": "^11.1.0", "lodash": "^4.17.10" + }, + "dependencies": { + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "globals": { + "version": "11.8.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.8.0.tgz", + "integrity": "sha512-io6LkyPVuzCHBSQV9fmOwxZkUk6nIaGmxheLDgmuFv89j0fm2aqDbIXKAGfzCMHqz3HLF2Zf8WSG6VqMh2qFmA==", + "dev": true + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + } } }, "@babel/types": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.1.6.tgz", - "integrity": "sha512-DMiUzlY9DSjVsOylJssxLHSgj6tWM9PRFJOGW/RaOglVOK9nzTxoOMfTfRQXGUCUQ/HmlG2efwC+XqUEJ5ay4w==", + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.1.3.tgz", + "integrity": "sha512-RpPOVfK+yatXyn8n4PB1NW6k9qjinrXrRR8ugBN8fD6hCy5RXI6PSbVqpOJBO9oSaY7Nom4ohj35feb0UR9hSA==", "dev": true, "requires": { "esutils": "^2.0.2", "lodash": "^4.17.10", "to-fast-properties": "^2.0.0" + }, + "dependencies": { + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "dev": true + } + } + }, + "@types/bn.js": { + "version": "4.11.3", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.3.tgz", + "integrity": "sha512-auZ3vEo3UW8tZc9NhF0MTnutKlf+YhsfC3+dwskFcil/EoqqZF60pGuJ2v2Ae1OJTUp3DJnjOJMqrpkmKB904w==", + "dev": true, + "requires": { + "@types/node": "*" } }, "@types/estree": { @@ -803,15 +1189,15 @@ "dev": true }, "@types/node": { - "version": "10.12.11", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.11.tgz", - "integrity": "sha512-3iIOhNiPGTdcUNVCv9e5G7GotfvJJe2pc9w2UgDXlUwnxSZ3RgcUocIU+xYm+rTU54jIKih998QE4dMOyMN1NQ==", + "version": "10.12.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.5.tgz", + "integrity": "sha512-GzdHjq3t3eGLMv92Al90Iq+EoLL+86mPfQhuglbBFO7HiLdC/rkt+zrzJJumAiBF6nsrBWhou22rPW663AAyFw==", "dev": true }, "JSONStream": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", - "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.3.tgz", + "integrity": "sha512-3Sp6WZZ/lXl+nTDoGpGWHEpTnnC6X5fnkolYZR6nwIfzbxxvA8utPWe1gCt7i0m9uVGsSz2IS8K8mJ7HmlduMg==", "dev": true, "requires": { "jsonparse": "^1.2.0", @@ -825,9 +1211,9 @@ "dev": true }, "acorn": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.0.4.tgz", - "integrity": "sha512-VY4i5EKSKkofY2I+6QLTbTTN/UvEQPCo6eiwzzSaSWfpaDhOmStMCMod6wmuPciNq+XS0faCglFu2lHZpdHUtg==", + "version": "5.7.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz", + "integrity": "sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==", "dev": true }, "acorn-globals": { @@ -838,13 +1224,24 @@ "requires": { "acorn": "^6.0.1", "acorn-walk": "^6.0.1" + }, + "dependencies": { + "acorn": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.0.4.tgz", + "integrity": "sha512-VY4i5EKSKkofY2I+6QLTbTTN/UvEQPCo6eiwzzSaSWfpaDhOmStMCMod6wmuPciNq+XS0faCglFu2lHZpdHUtg==", + "dev": true + } } }, "acorn-jsx": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.0.1.tgz", - "integrity": "sha512-HJ7CfNHrfJLlNTzIEUTj43LNWGkqpRLxm3YjAlcD0ACydk9XynzYsCBHxut+iqt+1aBXkx9UP/w/ZqMr13XIzg==", - "dev": true + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-4.1.1.tgz", + "integrity": "sha512-JY+iV6r+cO21KtntVvFkD+iqjtdpRUpGqKWgfkCdZq1R+kbreEl8EcdcJR4SmiIgsIQT33s6QzheQ9a275Q8xw==", + "dev": true, + "requires": { + "acorn": "^5.0.3" + } }, "acorn-walk": { "version": "6.1.1", @@ -859,9 +1256,9 @@ "dev": true }, "ajv": { - "version": "6.6.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.6.1.tgz", - "integrity": "sha512-ZoJjft5B+EJBjUyu9C9Hc0OZyPZSSlOF+plzouTrg6UlA8f+e/n8NIgBFG/9tppJtpPWfthHakK7juJdNDODww==", + "version": "6.5.5", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.5.tgz", + "integrity": "sha512-7q7gtRQDJSyuEHjuVgHoUa2VuemFiCMrfQc9Tc08XTAc4Zj/5U1buQJ0HU6i7fKjXU09SVgSmxa4sLvuvS8Iyg==", "dev": true, "requires": { "fast-deep-equal": "^2.0.1", @@ -870,9 +1267,37 @@ "uri-js": "^4.2.2" } }, + "align-text": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", + "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", + "dev": true, + "requires": { + "kind-of": "^3.0.2", + "longest": "^1.0.1", + "repeat-string": "^1.5.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "amdefine": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", + "dev": true + }, "ansi-escapes": { "version": "3.1.0", - "resolved": "http://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", "integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==", "dev": true }, @@ -883,13 +1308,10 @@ "dev": true }, "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true }, "anymatch": { "version": "2.0.0", @@ -942,15 +1364,6 @@ } } }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, "expand-brackets": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", @@ -1079,33 +1492,10 @@ } } }, - "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "dev": true, "requires": { "kind-of": "^6.0.0" @@ -1131,38 +1521,6 @@ "kind-of": "^6.0.2" } }, - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true - }, "micromatch": { "version": "3.1.10", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", @@ -1183,12 +1541,6 @@ "snapdragon": "^0.8.1", "to-regex": "^3.0.2" } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true } } }, @@ -1320,13 +1672,10 @@ "dev": true }, "async": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", - "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", - "dev": true, - "requires": { - "lodash": "^4.17.10" - } + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "dev": true }, "async-limiter": { "version": "1.0.0", @@ -1367,39 +1716,6 @@ "chalk": "^1.1.3", "esutils": "^2.0.2", "js-tokens": "^3.0.2" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "js-tokens": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", - "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", - "dev": true - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - } } }, "babel-core": { @@ -1420,6 +1736,18 @@ "@babel/types": "^7.0.0", "eslint-scope": "3.7.1", "eslint-visitor-keys": "^1.0.0" + }, + "dependencies": { + "eslint-scope": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz", + "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", + "dev": true, + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + } } }, "babel-generator": { @@ -1550,27 +1878,6 @@ "slash": "^1.0.0", "source-map": "^0.5.7" } - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "json5": { - "version": "0.5.1", - "resolved": "http://registry.npmjs.org/json5/-/json5-0.5.1.tgz", - "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", - "dev": true - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true } } }, @@ -1620,29 +1927,6 @@ "globals": "^9.18.0", "invariant": "^2.2.2", "lodash": "^4.17.4" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "globals": { - "version": "9.18.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", - "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", - "dev": true - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } } }, "babel-types": { @@ -1655,14 +1939,6 @@ "esutils": "^2.0.2", "lodash": "^4.17.4", "to-fast-properties": "^1.0.3" - }, - "dependencies": { - "to-fast-properties": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", - "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", - "dev": true - } } }, "babylon": { @@ -1729,18 +2005,6 @@ "is-data-descriptor": "^1.0.0", "kind-of": "^6.0.2" } - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true } } }, @@ -1797,17 +2061,6 @@ } } }, - "browserslist": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.3.5.tgz", - "integrity": "sha512-z9ZhGc3d9e/sJ9dIx5NFXkKoaiQTnrvrMsN3R1fGb1tkWWNSz12UewJn9TNxGo1l7J23h0MRaPmk7jfeTZYs1w==", - "dev": true, - "requires": { - "caniuse-lite": "^1.0.30000912", - "electron-to-chromium": "^1.3.86", - "node-releases": "^1.0.5" - } - }, "bser": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/bser/-/bser-2.0.0.tgz", @@ -1859,14 +2112,6 @@ "to-object-path": "^0.3.0", "union-value": "^1.0.0", "unset-value": "^1.0.0" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - } } }, "caller-path": { @@ -1880,15 +2125,16 @@ }, "callsites": { "version": "0.2.0", - "resolved": "http://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz", "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=", "dev": true }, "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", - "dev": true + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", + "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", + "dev": true, + "optional": true }, "camelcase-keys": { "version": "4.2.0", @@ -1899,12 +2145,20 @@ "camelcase": "^4.1.0", "map-obj": "^2.0.0", "quick-lru": "^1.0.0" + }, + "dependencies": { + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true + } } }, "caniuse-lite": { - "version": "1.0.30000912", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000912.tgz", - "integrity": "sha512-M3zAtV36U+xw5mMROlTXpAHClmPAor6GPKAMD5Yi7glCB5sbMPFtnQ3rGpk4XqPdUrrTIaVYSJZxREZWNy8QJg==", + "version": "1.0.30000907", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000907.tgz", + "integrity": "sha512-No5sQ/OB2Nmka8MNOOM6nJx+Hxt6MQ6h7t7kgJFu9oTuwjykyKRSBP/+i/QAyFHxeHB+ddE0Da1CG5ihx9oehQ==", "dev": true }, "capture-exit": { @@ -1917,9 +2171,9 @@ } }, "capture-stack-trace": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.1.tgz", - "integrity": "sha512-mYQLZnx5Qt1JgB1WEiMCf2647plpGeQ2NMR/5L0HNZzGQo4fuSPnK+wjfPnKZV0aiJDgzmWqqkV/g7JD+DW0qw==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.0.tgz", + "integrity": "sha1-Sm+gc5nCa7pH8LJJa00PtAjFVQ0=", "dev": true }, "caseless": { @@ -1928,27 +2182,40 @@ "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", "dev": true }, + "center-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", + "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", + "dev": true, + "optional": true, + "requires": { + "align-text": "^0.1.3", + "lazy-cache": "^1.0.3" + } + }, "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "version": "1.1.3", + "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" } }, "chardet": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", - "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz", + "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=", "dev": true }, "ci-info": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.6.0.tgz", - "integrity": "sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.1.3.tgz", + "integrity": "sha512-SK/846h/Rcy8q9Z9CAwGBLfCJ6EkjJWdpelWDufQpqVDYq2Wnnv8zlSO6AMQap02jvhVruKKpEtQOufo3pFhLg==", "dev": true }, "circular-json": { @@ -1977,12 +2244,6 @@ "requires": { "is-descriptor": "^0.1.0" } - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true } } }, @@ -2011,30 +2272,23 @@ "dev": true }, "cliui": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", - "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", + "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", "dev": true, + "optional": true, "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" + "center-align": "^0.1.1", + "right-align": "^0.1.1", + "wordwrap": "0.0.2" }, "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "wordwrap": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", + "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } + "optional": true } } }, @@ -2077,12 +2331,12 @@ } }, "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.1.tgz", + "integrity": "sha512-mjGanIiwQJskCC18rPR6OmrZ6fm2Lc7PeGFYwCmy5J34wC6F1PzdGL6xeMfmgicfYcNLGuVFA3WzXtIDCQSZxQ==", "dev": true, "requires": { - "color-name": "1.1.3" + "color-name": "^1.1.1" } }, "color-name": { @@ -2116,13 +2370,6 @@ "integrity": "sha1-Uui5hPSHLZUv8b3IuYOX0nxxRM8=", "dev": true }, - "commander": { - "version": "2.17.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz", - "integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==", - "dev": true, - "optional": true - }, "compare-func": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/compare-func/-/compare-func-1.3.2.tgz", @@ -2146,15 +2393,42 @@ "dev": true }, "concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.2.tgz", + "integrity": "sha1-cIl4Yk2FavQaWnQd790mHadSwmY=", "dev": true, "requires": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" + "inherits": "~2.0.1", + "readable-stream": "~2.0.0", + "typedarray": "~0.0.5" + }, + "dependencies": { + "process-nextick-args": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", + "dev": true + }, + "readable-stream": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", + "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "~1.0.0", + "process-nextick-args": "~1.0.6", + "string_decoder": "~0.10.x", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + } } }, "console-control-strings": { @@ -2190,7 +2464,7 @@ }, "conventional-changelog-angular": { "version": "1.6.6", - "resolved": "http://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-1.6.6.tgz", + "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-1.6.6.tgz", "integrity": "sha512-suQnFSqCxRwyBxY68pYTsFkG0taIdinHLNEAX5ivtw8bCRnIgnpvcHmlR/yjUyZIrNPYAoXlY1WiEKWgSE4BNg==", "dev": true, "requires": { @@ -2200,7 +2474,7 @@ }, "conventional-changelog-atom": { "version": "0.2.8", - "resolved": "http://registry.npmjs.org/conventional-changelog-atom/-/conventional-changelog-atom-0.2.8.tgz", + "resolved": "https://registry.npmjs.org/conventional-changelog-atom/-/conventional-changelog-atom-0.2.8.tgz", "integrity": "sha512-8pPZqhMbrnltNBizjoDCb/Sz85KyUXNDQxuAEYAU5V/eHn0okMBVjqc8aHWYpHrytyZWvMGbayOlDv7i8kEf6g==", "dev": true, "requires": { @@ -2222,7 +2496,7 @@ }, "conventional-changelog-codemirror": { "version": "0.3.8", - "resolved": "http://registry.npmjs.org/conventional-changelog-codemirror/-/conventional-changelog-codemirror-0.3.8.tgz", + "resolved": "https://registry.npmjs.org/conventional-changelog-codemirror/-/conventional-changelog-codemirror-0.3.8.tgz", "integrity": "sha512-3HFZKtBXTaUCHvz7ai6nk2+psRIkldDoNzCsom0egDtVmPsvvHZkzjynhdQyULfacRSsBTaiQ0ol6nBOL4dDiQ==", "dev": true, "requires": { @@ -2248,6 +2522,58 @@ "read-pkg": "^1.1.0", "read-pkg-up": "^1.0.1", "through2": "^2.0.0" + }, + "dependencies": { + "load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "^1.2.0" + } + }, + "path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "dev": true, + "requires": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + } + } } }, "conventional-changelog-ember": { @@ -2261,7 +2587,7 @@ }, "conventional-changelog-eslint": { "version": "1.0.9", - "resolved": "http://registry.npmjs.org/conventional-changelog-eslint/-/conventional-changelog-eslint-1.0.9.tgz", + "resolved": "https://registry.npmjs.org/conventional-changelog-eslint/-/conventional-changelog-eslint-1.0.9.tgz", "integrity": "sha512-h87nfVh2fdk9fJIvz26wCBsbDC/KxqCc5wSlNMZbXcARtbgNbNDIF7Y7ctokFdnxkzVdaHsbINkh548T9eBA7Q==", "dev": true, "requires": { @@ -2270,7 +2596,7 @@ }, "conventional-changelog-express": { "version": "0.3.6", - "resolved": "http://registry.npmjs.org/conventional-changelog-express/-/conventional-changelog-express-0.3.6.tgz", + "resolved": "https://registry.npmjs.org/conventional-changelog-express/-/conventional-changelog-express-0.3.6.tgz", "integrity": "sha512-3iWVtBJZ9RnRnZveNDzOD8QRn6g6vUif0qVTWWyi5nUIAbuN1FfPVyKdAlJJfp5Im+dE8Kiy/d2SpaX/0X678Q==", "dev": true, "requires": { @@ -2279,7 +2605,7 @@ }, "conventional-changelog-jquery": { "version": "0.1.0", - "resolved": "http://registry.npmjs.org/conventional-changelog-jquery/-/conventional-changelog-jquery-0.1.0.tgz", + "resolved": "https://registry.npmjs.org/conventional-changelog-jquery/-/conventional-changelog-jquery-0.1.0.tgz", "integrity": "sha1-Agg5cWLjhGmG5xJztsecW1+A9RA=", "dev": true, "requires": { @@ -2297,7 +2623,7 @@ }, "conventional-changelog-jshint": { "version": "0.3.8", - "resolved": "http://registry.npmjs.org/conventional-changelog-jshint/-/conventional-changelog-jshint-0.3.8.tgz", + "resolved": "https://registry.npmjs.org/conventional-changelog-jshint/-/conventional-changelog-jshint-0.3.8.tgz", "integrity": "sha512-hn9QU4ZI/5V50wKPJNPGT4gEWgiBFpV6adieILW4MaUFynuDYOvQ71EMSj3EznJyKi/KzuXpc9dGmX8njZMjig==", "dev": true, "requires": { @@ -2307,13 +2633,13 @@ }, "conventional-changelog-preset-loader": { "version": "1.1.8", - "resolved": "http://registry.npmjs.org/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-1.1.8.tgz", + "resolved": "https://registry.npmjs.org/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-1.1.8.tgz", "integrity": "sha512-MkksM4G4YdrMlT2MbTsV2F6LXu/hZR0Tc/yenRrDIKRwBl/SP7ER4ZDlglqJsCzLJi4UonBc52Bkm5hzrOVCcw==", "dev": true }, "conventional-changelog-writer": { "version": "3.0.9", - "resolved": "http://registry.npmjs.org/conventional-changelog-writer/-/conventional-changelog-writer-3.0.9.tgz", + "resolved": "https://registry.npmjs.org/conventional-changelog-writer/-/conventional-changelog-writer-3.0.9.tgz", "integrity": "sha512-n9KbsxlJxRQsUnK6wIBRnARacvNnN4C/nxnxCkH+B/R1JS2Fa+DiP1dU4I59mEDEjgnFaN2+9wr1P1s7GYB5/Q==", "dev": true, "requires": { @@ -2331,7 +2657,7 @@ }, "conventional-commits-filter": { "version": "1.1.6", - "resolved": "http://registry.npmjs.org/conventional-commits-filter/-/conventional-commits-filter-1.1.6.tgz", + "resolved": "https://registry.npmjs.org/conventional-commits-filter/-/conventional-commits-filter-1.1.6.tgz", "integrity": "sha512-KcDgtCRKJCQhyk6VLT7zR+ZOyCnerfemE/CsR3iQpzRRFbLEs0Y6rwk3mpDvtOh04X223z+1xyJ582Stfct/0Q==", "dev": true, "requires": { @@ -2341,7 +2667,7 @@ }, "conventional-commits-parser": { "version": "2.1.7", - "resolved": "http://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-2.1.7.tgz", + "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-2.1.7.tgz", "integrity": "sha512-BoMaddIEJ6B4QVMSDu9IkVImlGOSGA1I2BQyOZHeLQ6qVOJLcLKn97+fL6dGbzWEiqDzfH4OkcveULmeq2MHFQ==", "dev": true, "requires": { @@ -2377,7 +2703,7 @@ }, "camelcase-keys": { "version": "2.1.0", - "resolved": "http://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", "dev": true, "requires": { @@ -2385,12 +2711,6 @@ "map-obj": "^1.0.0" } }, - "get-stdin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", - "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", - "dev": true - }, "indent-string": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", @@ -2408,7 +2728,7 @@ }, "meow": { "version": "3.7.0", - "resolved": "http://registry.npmjs.org/meow/-/meow-3.7.0.tgz", + "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", "dev": true, "requires": { @@ -2487,14 +2807,12 @@ } }, "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", "dev": true, "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", + "lru-cache": "^4.0.1", "shebang-command": "^1.2.0", "which": "^1.2.9" } @@ -2572,12 +2890,12 @@ "dev": true }, "debug": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.0.tgz", - "integrity": "sha512-heNPJUJIqC+xB6ayLAMHaIrmN9HKa7aQO8MGqKpvCA+uJYVcvR6l5kgdrhRuwPFHU7P5/A1w0BjByPHwpfTDKg==", + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, "requires": { - "ms": "^2.1.1" + "ms": "2.0.0" } }, "decamelize": { @@ -2693,35 +3011,60 @@ "is-data-descriptor": "^1.0.0", "kind-of": "^6.0.2" } - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true } } }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", - "dev": true - }, - "delegates": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", - "dev": true - }, - "detect-indent": { - "version": "4.0.0", + "del": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz", + "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", + "dev": true, + "requires": { + "globby": "^5.0.0", + "is-path-cwd": "^1.0.0", + "is-path-in-cwd": "^1.0.0", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "rimraf": "^2.2.8" + }, + "dependencies": { + "globby": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz", + "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", + "dev": true, + "requires": { + "array-union": "^1.0.1", + "arrify": "^1.0.0", + "glob": "^7.0.3", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true + }, + "delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", + "dev": true + }, + "detect-indent": { + "version": "4.0.0", "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", "dev": true, @@ -2770,7 +3113,7 @@ }, "duplexer": { "version": "0.1.1", - "resolved": "http://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=", "dev": true }, @@ -2791,15 +3134,15 @@ } }, "electron-to-chromium": { - "version": "1.3.87", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.87.tgz", - "integrity": "sha512-EV5FZ68Hu+n9fHVhOc9AcG3Lvf+E1YqR36ulJUpwaQTkf4LwdvBqmGIazaIrt4kt6J8Gw3Kv7r9F+PQjAkjWeA==", + "version": "1.3.84", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.84.tgz", + "integrity": "sha512-IYhbzJYOopiTaNWMBp7RjbecUBsbnbDneOP86f3qvS0G0xfzwNSvMJpTrvi5/Y1gU7tg2NAgeg8a8rCYvW9Whw==", "dev": true }, "error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz", + "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", "dev": true, "requires": { "is-arrayish": "^0.2.1" @@ -2864,9 +3207,9 @@ } }, "eslint": { - "version": "5.9.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.9.0.tgz", - "integrity": "sha512-g4KWpPdqN0nth+goDNICNXGfJF7nNnepthp46CAlJoJtC5K/cLu3NgCM3AHu1CkJ5Hzt9V0Y0PBAO6Ay/gGb+w==", + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.7.0.tgz", + "integrity": "sha512-zYCeFQahsxffGl87U2aJ7DPyH8CbWgxBC213Y8+TCanhUTf2gEvfq3EKpHmEcozTLyPmGe9LZdMAwC/CpJBM5A==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", @@ -2909,22 +3252,149 @@ "text-table": "^0.2.0" }, "dependencies": { + "ajv": { + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.4.tgz", + "integrity": "sha512-4Wyjt8+t6YszqaXnLDfMmG/8AlO5Zbcsy3ATHncCzjW/NoPzAId8AK6749Ybjmdt+kUY1gP60fCu46oDxPv/mg==", + "dev": true, + "requires": { + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, "ansi-regex": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", "dev": true }, - "eslint-scope": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.0.tgz", - "integrity": "sha512-1G6UTDi7Jc1ELFwnR58HV4fK9OQK4S6N985f166xqXxpjU6plxFISJa2Ba9KCQuFa8RCnj/lSFJbHo7UFDBnUA==", + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true + }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "debug": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.0.tgz", + "integrity": "sha512-heNPJUJIqC+xB6ayLAMHaIrmN9HKa7aQO8MGqKpvCA+uJYVcvR6l5kgdrhRuwPFHU7P5/A1w0BjByPHwpfTDKg==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "external-editor": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.0.3.tgz", + "integrity": "sha512-bn71H9+qWoOQKyZDo25mOMVpSmXROAsTJVVVYzrrtol3d4y+AsKjf4Iwl2Q+IuT0kFSQ1qo166UuIwqYq7mGnA==", + "dev": true, + "requires": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + } + }, + "fast-deep-equal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "dev": true + }, + "globals": { + "version": "11.8.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.8.0.tgz", + "integrity": "sha512-io6LkyPVuzCHBSQV9fmOwxZkUk6nIaGmxheLDgmuFv89j0fm2aqDbIXKAGfzCMHqz3HLF2Zf8WSG6VqMh2qFmA==", + "dev": true + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "inquirer": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.2.0.tgz", + "integrity": "sha512-QIEQG4YyQ2UYZGDC4srMZ7BjHOmNk1lR2JQj5UknBapklm6WHA+VVH7N+sUdX3A7NeCfGF8o4X1S3Ao7nAcIeg==", + "dev": true, + "requires": { + "ansi-escapes": "^3.0.0", + "chalk": "^2.0.0", + "cli-cursor": "^2.1.0", + "cli-width": "^2.0.0", + "external-editor": "^3.0.0", + "figures": "^2.0.0", + "lodash": "^4.17.10", + "mute-stream": "0.0.7", + "run-async": "^2.2.0", + "rxjs": "^6.1.0", + "string-width": "^2.1.0", + "strip-ansi": "^4.0.0", + "through": "^2.3.6" } }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + }, + "progress": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.1.tgz", + "integrity": "sha512-OE+a6vzqazc+K6LxJrX5UPyKFvGnL5CYmq2jFGNIBWHpc4QyE49/YOumcrpQFJpfejmvRtbJzgO1zPmMCqlbBg==", + "dev": true + }, + "semver": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", + "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==", + "dev": true + }, "strip-ansi": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", @@ -2933,6 +3403,21 @@ "requires": { "ansi-regex": "^3.0.0" } + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } } } }, @@ -2947,12 +3432,20 @@ } }, "eslint-config-prettier": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-3.3.0.tgz", - "integrity": "sha512-Bc3bh5bAcKNvs3HOpSi6EfGA2IIp7EzWcg2tS4vP7stnXu/J1opihHDM7jI9JCIckyIDTgZLSWn7J3HY0j2JfA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-3.1.0.tgz", + "integrity": "sha512-QYGfmzuc4q4J6XIhlp8vRKdI/fI0tQfQPy1dME3UOLprE+v4ssH/3W9LM2Q7h5qBcy5m0ehCrBDU2YF8q6OY8w==", "dev": true, "requires": { "get-stdin": "^6.0.0" + }, + "dependencies": { + "get-stdin": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz", + "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==", + "dev": true + } } }, "eslint-config-standard": { @@ -2969,23 +3462,6 @@ "requires": { "debug": "^2.6.9", "resolve": "^1.5.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } } }, "eslint-module-utils": { @@ -2998,31 +3474,44 @@ "pkg-dir": "^1.0.0" }, "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", "dev": true, "requires": { - "ms": "2.0.0" + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" } }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true, + "requires": { + "pinkie-promise": "^2.0.0" + } + }, + "pkg-dir": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-1.0.0.tgz", + "integrity": "sha1-ektQio1bstYp1EcFb/TpyTFM89Q=", + "dev": true, + "requires": { + "find-up": "^1.0.0" + } } } }, "eslint-plugin-es": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-1.4.0.tgz", - "integrity": "sha512-XfFmgFdIUDgvaRAlaXUkxrRg5JSADoRC8IkKLc/cISeR3yHVMefFHQZpcyXXEUUPHfy5DwviBcrfqlyqEwlQVw==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-1.3.1.tgz", + "integrity": "sha512-9XcVyZiQRVeFjqHw8qHNDAZcQLqaHlOGGpeYqzYh8S4JYCWTCO3yzyen8yVmA5PratfzTRWDwCOFphtDEG+w/w==", "dev": true, "requires": { "eslint-utils": "^1.3.0", - "regexpp": "^2.0.1" + "regexpp": "^2.0.0" } }, "eslint-plugin-import": { @@ -3043,18 +3532,9 @@ "resolve": "^1.6.0" }, "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, "doctrine": { "version": "1.5.0", - "resolved": "http://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", "dev": true, "requires": { @@ -3074,11 +3554,14 @@ "strip-bom": "^3.0.0" } }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "^1.2.0" + } }, "path-type": { "version": "2.0.0", @@ -3089,6 +3572,12 @@ "pify": "^2.0.0" } }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, "read-pkg": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", @@ -3119,9 +3608,9 @@ } }, "eslint-plugin-jest": { - "version": "21.27.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-21.27.2.tgz", - "integrity": "sha512-0E4OIgBJVlAmf1KfYFtZ3gYxgUzC5Eb3Jzmrc9ikI1OY+/cM8Kh72Ti7KfpeHNeD3HJNf9SmEfmvQLIz44Hrhw==", + "version": "21.25.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-21.25.1.tgz", + "integrity": "sha512-mmphmAD/WihjFGq1IUHLSZWQPcd8U9w/SeFCHf3p0V3Q3MBxmj1ZKnh41hID44guIACLuwos/LhVWIr4phN4yg==", "dev": true }, "eslint-plugin-node": { @@ -3136,6 +3625,17 @@ "minimatch": "^3.0.4", "resolve": "^1.8.1", "semver": "^5.5.0" + }, + "dependencies": { + "resolve": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz", + "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", + "dev": true, + "requires": { + "path-parse": "^1.0.5" + } + } } }, "eslint-plugin-prettier": { @@ -3176,13 +3676,21 @@ } }, "eslint-scope": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz", - "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.0.tgz", + "integrity": "sha512-1G6UTDi7Jc1ELFwnR58HV4fK9OQK4S6N985f166xqXxpjU6plxFISJa2Ba9KCQuFa8RCnj/lSFJbHo7UFDBnUA==", "dev": true, "requires": { "esrecurse": "^4.1.0", "estraverse": "^4.1.1" + }, + "dependencies": { + "estraverse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", + "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", + "dev": true + } } }, "eslint-utils": { @@ -3198,14 +3706,13 @@ "dev": true }, "espree": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-4.1.0.tgz", - "integrity": "sha512-I5BycZW6FCVIub93TeVY1s7vjhP9CY6cXCznIRfiig7nRviKZYdRnj/sHEWC6A7WE9RDWOFq9+7OsWSYz8qv2w==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-4.0.0.tgz", + "integrity": "sha512-kapdTCt1bjmspxStVKX6huolXVV5ZfyZguY1lcfhVVZstce3bqxH9mcLzNn3/mlgW6wQ732+0fuG9v7h0ZQoKg==", "dev": true, "requires": { - "acorn": "^6.0.2", - "acorn-jsx": "^5.0.0", - "eslint-visitor-keys": "^1.0.0" + "acorn": "^5.6.0", + "acorn-jsx": "^4.1.1" } }, "esprima": { @@ -3230,6 +3737,14 @@ "dev": true, "requires": { "estraverse": "^4.1.0" + }, + "dependencies": { + "estraverse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", + "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", + "dev": true + } } }, "estraverse": { @@ -3260,9 +3775,9 @@ } }, "execa": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", - "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.8.0.tgz", + "integrity": "sha1-2NdrvBtVIX7RkP1t1J08d07PyNo=", "dev": true, "requires": { "cross-spawn": "^5.0.1", @@ -3272,19 +3787,6 @@ "p-finally": "^1.0.0", "signal-exit": "^3.0.0", "strip-eof": "^1.0.0" - }, - "dependencies": { - "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", - "dev": true, - "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - } } }, "exit": { @@ -3304,11 +3806,53 @@ }, "expand-range": { "version": "1.8.2", - "resolved": "http://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", + "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", "dev": true, "requires": { "fill-range": "^2.1.0" + }, + "dependencies": { + "fill-range": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz", + "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==", + "dev": true, + "requires": { + "is-number": "^2.1.0", + "isobject": "^2.0.0", + "randomatic": "^3.0.0", + "repeat-element": "^1.1.2", + "repeat-string": "^1.5.2" + } + }, + "is-number": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", + "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } } }, "expect": { @@ -3323,6 +3867,17 @@ "jest-matcher-utils": "^23.6.0", "jest-message-util": "^23.4.0", "jest-regex-util": "^23.3.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + } } }, "extend": { @@ -3353,13 +3908,13 @@ } }, "external-editor": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.0.3.tgz", - "integrity": "sha512-bn71H9+qWoOQKyZDo25mOMVpSmXROAsTJVVVYzrrtol3d4y+AsKjf4Iwl2Q+IuT0kFSQ1qo166UuIwqYq7mGnA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", + "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", "dev": true, "requires": { - "chardet": "^0.7.0", - "iconv-lite": "^0.4.24", + "chardet": "^0.4.0", + "iconv-lite": "^0.4.17", "tmp": "^0.0.33" } }, @@ -3370,9 +3925,17 @@ "dev": true, "requires": { "is-extglob": "^1.0.0" - } - }, - "extsprintf": { + }, + "dependencies": { + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + } + } + }, + "extsprintf": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", @@ -3447,16 +4010,26 @@ } }, "fill-range": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz", - "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", "dev": true, "requires": { - "is-number": "^2.1.0", - "isobject": "^2.0.0", - "randomatic": "^3.0.0", - "repeat-element": "^1.1.2", - "repeat-string": "^1.5.2" + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } } }, "find-up": { @@ -3469,14 +4042,14 @@ } }, "flat-cache": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.4.tgz", - "integrity": "sha512-VwyB3Lkgacfik2vhqR4uv2rvebqmDvFu4jlN/C1RzWoJEo8I7z4Q404oiqYCkq41mni8EzQnm95emU9seckwtg==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.0.tgz", + "integrity": "sha1-0wMLMrOBVPTjt+nHCfSQ9++XxIE=", "dev": true, "requires": { "circular-json": "^0.3.1", + "del": "^2.0.2", "graceful-fs": "^4.1.2", - "rimraf": "~2.6.2", "write": "^0.2.1" } }, @@ -4118,9 +4691,9 @@ } }, "get-caller-file": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", - "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.2.tgz", + "integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=", "dev": true }, "get-pkg-repo": { @@ -4144,7 +4717,7 @@ }, "camelcase-keys": { "version": "2.1.0", - "resolved": "http://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", "dev": true, "requires": { @@ -4152,12 +4725,6 @@ "map-obj": "^1.0.0" } }, - "get-stdin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", - "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", - "dev": true - }, "indent-string": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", @@ -4175,7 +4742,7 @@ }, "meow": { "version": "3.7.0", - "resolved": "http://registry.npmjs.org/meow/-/meow-3.7.0.tgz", + "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", "dev": true, "requires": { @@ -4225,14 +4792,14 @@ "dev": true }, "get-stdin": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz", - "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", + "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", "dev": true }, "get-stream": { "version": "3.0.0", - "resolved": "http://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", "dev": true }, @@ -4253,7 +4820,7 @@ }, "git-raw-commits": { "version": "1.3.6", - "resolved": "http://registry.npmjs.org/git-raw-commits/-/git-raw-commits-1.3.6.tgz", + "resolved": "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-1.3.6.tgz", "integrity": "sha512-svsK26tQ8vEKnMshTDatSIQSMDdz8CxIIqKsvPqbtV23Etmw6VNaFAitu8zwZ0VrOne7FztwPyRLxK7/DIUTQg==", "dev": true, "requires": { @@ -4272,11 +4839,19 @@ "requires": { "gitconfiglocal": "^1.0.0", "pify": "^2.3.0" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } } }, "git-semver-tags": { "version": "1.3.6", - "resolved": "http://registry.npmjs.org/git-semver-tags/-/git-semver-tags-1.3.6.tgz", + "resolved": "https://registry.npmjs.org/git-semver-tags/-/git-semver-tags-1.3.6.tgz", "integrity": "sha512-2jHlJnln4D/ECk9FxGEBh3k44wgYdWjWDtMmJPaecjoRmxKo3Y1Lh8GMYuOPu04CHw86NTAODchYjC5pnpMQig==", "dev": true, "requires": { @@ -4294,9 +4869,9 @@ } }, "glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", "dev": true, "requires": { "fs.realpath": "^1.0.0", @@ -4315,26 +4890,53 @@ "requires": { "glob-parent": "^2.0.0", "is-glob": "^2.0.0" + }, + "dependencies": { + "glob-parent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", + "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "dev": true, + "requires": { + "is-glob": "^2.0.0" + } + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + } } }, "glob-parent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", - "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", "dev": true, "requires": { - "is-glob": "^2.0.0" + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" } }, "globals": { - "version": "11.9.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.9.0.tgz", - "integrity": "sha512-5cJVtyXWH8PiJPVLZzzoIizXx944O4OmRro5MWKx5fT4MgcN7OfaMutPeaTdJCCURwbWdhhcCWcKIffPnmTzBg==", + "version": "9.18.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", + "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", "dev": true }, "globby": { "version": "6.1.0", - "resolved": "http://registry.npmjs.org/globby/-/globby-6.1.0.tgz", + "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", "dev": true, "requires": { @@ -4343,11 +4945,19 @@ "object-assign": "^4.0.1", "pify": "^2.0.0", "pinkie-promise": "^2.0.0" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } } }, "got": { "version": "6.7.1", - "resolved": "http://registry.npmjs.org/got/-/got-6.7.1.tgz", + "resolved": "https://registry.npmjs.org/got/-/got-6.7.1.tgz", "integrity": "sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA=", "dev": true, "requires": { @@ -4365,9 +4975,9 @@ } }, "graceful-fs": { - "version": "4.1.15", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", - "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==", + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", "dev": true }, "growly": { @@ -4377,22 +4987,46 @@ "dev": true }, "handlebars": { - "version": "4.0.12", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.12.tgz", - "integrity": "sha512-RhmTekP+FZL+XNhwS1Wf+bTTZpdLougwt5pcgA1tuz6Jcx0fpH/7z0qd71RKnZHBCxIRBHfBOnio4gViPemNzA==", + "version": "4.0.11", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.11.tgz", + "integrity": "sha1-Ywo13+ApS8KB7a5v/F0yn8eYLcw=", "dev": true, "requires": { - "async": "^2.5.0", + "async": "^1.4.0", "optimist": "^0.6.1", - "source-map": "^0.6.1", - "uglify-js": "^3.1.4" + "source-map": "^0.4.4", + "uglify-js": "^2.6" }, "dependencies": { "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", + "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", + "dev": true, + "requires": { + "amdefine": ">=0.0.4" + } + }, + "uglify-js": { + "version": "2.8.29", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", + "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", + "dev": true, + "optional": true, + "requires": { + "source-map": "~0.5.1", + "uglify-to-browserify": "~1.0.0", + "yargs": "~3.10.0" + }, + "dependencies": { + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true, + "optional": true + } + } } } }, @@ -4413,12 +5047,12 @@ } }, "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.1.tgz", + "integrity": "sha1-hGFzP1OLCDfJNh45qauelwTcLyg=", "dev": true, "requires": { - "function-bind": "^1.1.1" + "function-bind": "^1.0.2" } }, "has-ansi": { @@ -4457,14 +5091,6 @@ "get-value": "^2.0.6", "has-values": "^1.0.0", "isobject": "^3.0.0" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - } } }, "has-values": { @@ -4477,26 +5103,6 @@ "kind-of": "^4.0.0" }, "dependencies": { - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, "kind-of": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", @@ -4519,9 +5125,9 @@ } }, "hosted-git-info": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", - "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.6.0.tgz", + "integrity": "sha512-lIbgIIQA3lz5XaB6vxakj6sDHADJiZadYEJB+FgA+C4nubM1NwcuvUr9EJPmnH1skZqpqUzWborWo8EIUi0Sdw==", "dev": true }, "html-encoding-sniffer": { @@ -4545,9 +5151,9 @@ } }, "iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "version": "0.4.23", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", + "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", "dev": true, "requires": { "safer-buffer": ">= 2.1.2 < 3" @@ -4567,17 +5173,6 @@ "requires": { "pkg-dir": "^2.0.0", "resolve-cwd": "^2.0.0" - }, - "dependencies": { - "pkg-dir": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", - "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", - "dev": true, - "requires": { - "find-up": "^2.1.0" - } - } } }, "import-modules": { @@ -4621,39 +5216,75 @@ "dev": true }, "inquirer": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.2.1.tgz", - "integrity": "sha512-088kl3DRT2dLU5riVMKKr1DlImd6X7smDhpXUCkJDCKvTEJeRiXh0G132HG9u5a+6Ylw9plFRY7RuTnwohYSpg==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.3.0.tgz", + "integrity": "sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ==", "dev": true, "requires": { "ansi-escapes": "^3.0.0", "chalk": "^2.0.0", "cli-cursor": "^2.1.0", "cli-width": "^2.0.0", - "external-editor": "^3.0.0", + "external-editor": "^2.0.4", "figures": "^2.0.0", - "lodash": "^4.17.10", + "lodash": "^4.3.0", "mute-stream": "0.0.7", "run-async": "^2.2.0", - "rxjs": "^6.1.0", + "rx-lite": "^4.0.8", + "rx-lite-aggregates": "^4.0.8", "string-width": "^2.1.0", - "strip-ansi": "^5.0.0", + "strip-ansi": "^4.0.0", "through": "^2.3.6" }, "dependencies": { "ansi-regex": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.0.0.tgz", - "integrity": "sha512-iB5Dda8t/UqpPI/IjsejXu5jOGDrzn41wJyljwPH65VCIbk6+1BzFIMJGFwTNrYXT1CrD+B4l19U7awiQ8rk7w==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true }, "strip-ansi": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.0.0.tgz", - "integrity": "sha512-Uu7gQyZI7J7gn5qLn1Np3G9vcYGTVqB+lFTytnDJv83dd8T22aGH451P3jueT2/QemInJDfxHB5Tde5OzgG1Ow==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "supports-color": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", "dev": true, "requires": { - "ansi-regex": "^4.0.0" + "has-flag": "^3.0.0" } } } @@ -4680,6 +5311,17 @@ "dev": true, "requires": { "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } } }, "is-arrayish": { @@ -4696,7 +5338,7 @@ }, "is-builtin-module": { "version": "1.0.0", - "resolved": "http://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", "dev": true, "requires": { @@ -4710,12 +5352,12 @@ "dev": true }, "is-ci": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.2.1.tgz", - "integrity": "sha512-s6tfsaQaQi3JNciBH6shVqEDvhGut0SUXr31ag8Pd8BBbVVlcGfWhpPmEOoM6RJ5TFhbypvf5yyRw/VXW1IiWg==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.1.0.tgz", + "integrity": "sha512-c7TnwxLePuqIlxHgr7xtxzycJPegNHFuIrBkwbf8hc58//+Op1CqFkyS+xnIMkwn9UsJIwc174BIjkyBmSpjKg==", "dev": true, "requires": { - "ci-info": "^1.5.0" + "ci-info": "^1.0.0" } }, "is-data-descriptor": { @@ -4725,6 +5367,17 @@ "dev": true, "requires": { "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } } }, "is-date-object": { @@ -4774,9 +5427,9 @@ "dev": true }, "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", "dev": true }, "is-finite": { @@ -4801,29 +5454,64 @@ "dev": true }, "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", "dev": true, "requires": { - "is-extglob": "^1.0.0" + "is-extglob": "^2.1.0" } }, "is-number": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", - "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", "dev": true, "requires": { "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } } }, "is-obj": { "version": "1.0.1", - "resolved": "http://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", "dev": true }, + "is-path-cwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", + "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=", + "dev": true + }, + "is-path-in-cwd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz", + "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", + "dev": true, + "requires": { + "is-path-inside": "^1.0.0" + } + }, + "is-path-inside": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", + "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", + "dev": true, + "requires": { + "path-is-inside": "^1.0.1" + } + }, "is-plain-obj": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", @@ -4837,14 +5525,6 @@ "dev": true, "requires": { "isobject": "^3.0.1" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - } } }, "is-posix-bracket": { @@ -4953,13 +5633,10 @@ "dev": true }, "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, - "requires": { - "isarray": "1.0.0" - } + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true }, "isstream": { "version": "0.1.2", @@ -4984,6 +5661,17 @@ "js-yaml": "^3.7.0", "mkdirp": "^0.5.1", "once": "^1.4.0" + }, + "dependencies": { + "async": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", + "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", + "dev": true, + "requires": { + "lodash": "^4.17.10" + } + } } }, "istanbul-lib-coverage": { @@ -5066,6 +5754,12 @@ "requires": { "ms": "^2.1.1" } + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true } } }, @@ -5094,6 +5788,43 @@ "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", "dev": true }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "cliui": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "dev": true, + "requires": { + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" + } + }, "jest-cli": { "version": "23.6.0", "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-23.6.0.tgz", @@ -5146,29 +5877,67 @@ "requires": { "ansi-regex": "^3.0.0" } - } - } - }, - "jest-changed-files": { - "version": "23.4.2", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-23.4.2.tgz", - "integrity": "sha512-EyNhTAUWEfwnK0Is/09LxoqNDOn7mU7S3EHskG52djOFS/z+IT0jT3h3Ql61+dklcG7bJJitIWEMB4Sp1piHmA==", - "dev": true, - "requires": { - "throat": "^4.0.0" - } - }, - "jest-config": { - "version": "23.6.0", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-23.6.0.tgz", - "integrity": "sha512-i8V7z9BeDXab1+VNo78WM0AtWpBRXJLnkT+lyT+Slx/cbP5sZJ0+NDuLcmBE5hXAoK0aUp7vI+MOxR+R4d8SRQ==", - "dev": true, - "requires": { - "babel-core": "^6.0.0", - "babel-jest": "^23.6.0", - "chalk": "^2.0.1", - "glob": "^7.1.1", - "jest-environment-jsdom": "^23.4.0", + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "yargs": { + "version": "11.1.0", + "resolved": "http://registry.npmjs.org/yargs/-/yargs-11.1.0.tgz", + "integrity": "sha512-NwW69J42EsCSanF8kyn5upxvjp5ds+t3+udGBeTbFnERA+lF541DDpMawzo4z6W/QrzNM18D+BPMiOBibnFV5A==", + "dev": true, + "requires": { + "cliui": "^4.0.0", + "decamelize": "^1.1.1", + "find-up": "^2.1.0", + "get-caller-file": "^1.0.1", + "os-locale": "^2.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^9.0.2" + } + }, + "yargs-parser": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-9.0.2.tgz", + "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", + "dev": true, + "requires": { + "camelcase": "^4.1.0" + } + } + } + }, + "jest-changed-files": { + "version": "23.4.2", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-23.4.2.tgz", + "integrity": "sha512-EyNhTAUWEfwnK0Is/09LxoqNDOn7mU7S3EHskG52djOFS/z+IT0jT3h3Ql61+dklcG7bJJitIWEMB4Sp1piHmA==", + "dev": true, + "requires": { + "throat": "^4.0.0" + } + }, + "jest-config": { + "version": "23.6.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-23.6.0.tgz", + "integrity": "sha512-i8V7z9BeDXab1+VNo78WM0AtWpBRXJLnkT+lyT+Slx/cbP5sZJ0+NDuLcmBE5hXAoK0aUp7vI+MOxR+R4d8SRQ==", + "dev": true, + "requires": { + "babel-core": "^6.0.0", + "babel-jest": "^23.6.0", + "chalk": "^2.0.1", + "glob": "^7.1.1", + "jest-environment-jsdom": "^23.4.0", "jest-environment-node": "^23.4.0", "jest-get-type": "^22.1.0", "jest-jasmine2": "^23.6.0", @@ -5180,6 +5949,15 @@ "pretty-format": "^23.6.0" }, "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, "babel-core": { "version": "6.26.3", "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.3.tgz", @@ -5207,26 +5985,25 @@ "source-map": "^0.5.7" } }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", "dev": true, "requires": { - "ms": "2.0.0" + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" } }, - "json5": { - "version": "0.5.1", - "resolved": "http://registry.npmjs.org/json5/-/json5-0.5.1.tgz", - "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", - "dev": true - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } } } }, @@ -5240,6 +6017,37 @@ "diff": "^3.2.0", "jest-get-type": "^22.1.0", "pretty-format": "^23.6.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } } }, "jest-docblock": { @@ -5259,6 +6067,37 @@ "requires": { "chalk": "^2.0.1", "pretty-format": "^23.6.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } } }, "jest-environment-jsdom": { @@ -5322,6 +6161,37 @@ "jest-snapshot": "^23.6.0", "jest-util": "^23.4.0", "pretty-format": "^23.6.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } } }, "jest-leak-detector": { @@ -5342,6 +6212,37 @@ "chalk": "^2.0.1", "jest-get-type": "^22.1.0", "pretty-format": "^23.6.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } } }, "jest-message-util": { @@ -5355,6 +6256,37 @@ "micromatch": "^2.3.11", "slash": "^1.0.0", "stack-utils": "^1.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } } }, "jest-mock": { @@ -5378,6 +6310,37 @@ "browser-resolve": "^1.11.3", "chalk": "^2.0.1", "realpath-native": "^1.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } } }, "jest-resolve-dependencies": { @@ -5458,6 +6421,21 @@ "yargs": "^11.0.0" }, "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, "babel-core": { "version": "6.26.3", "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.3.tgz", @@ -5485,32 +6463,86 @@ "source-map": "^0.5.7" } }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", "dev": true, "requires": { - "ms": "2.0.0" + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" } }, - "json5": { - "version": "0.5.1", - "resolved": "http://registry.npmjs.org/json5/-/json5-0.5.1.tgz", - "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", - "dev": true + "cliui": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "dev": true, + "requires": { + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" + } }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } }, "strip-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "yargs": { + "version": "11.1.0", + "resolved": "http://registry.npmjs.org/yargs/-/yargs-11.1.0.tgz", + "integrity": "sha512-NwW69J42EsCSanF8kyn5upxvjp5ds+t3+udGBeTbFnERA+lF541DDpMawzo4z6W/QrzNM18D+BPMiOBibnFV5A==", + "dev": true, + "requires": { + "cliui": "^4.0.0", + "decamelize": "^1.1.1", + "find-up": "^2.1.0", + "get-caller-file": "^1.0.1", + "os-locale": "^2.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^9.0.2" + } + }, + "yargs-parser": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-9.0.2.tgz", + "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", + "dev": true, + "requires": { + "camelcase": "^4.1.0" + } } } }, @@ -5536,6 +6568,37 @@ "natural-compare": "^1.4.0", "pretty-format": "^23.6.0", "semver": "^5.5.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } } }, "jest-util": { @@ -5554,32 +6617,92 @@ "source-map": "^0.6.0" }, "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, "callsites": { "version": "2.0.0", "resolved": "http://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=", "dev": true }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "jest-validate": { + "version": "23.6.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-23.6.0.tgz", + "integrity": "sha512-OFKapYxe72yz7agrDAWi8v2WL8GIfVqcbKRCLbRG9PAxtzF9b1SEDdTpytNDN12z2fJynoBwpMpvj2R39plI2A==", + "dev": true, + "requires": { + "chalk": "^2.0.1", + "jest-get-type": "^22.1.0", + "leven": "^2.1.0", + "pretty-format": "^23.6.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } } } }, - "jest-validate": { - "version": "23.6.0", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-23.6.0.tgz", - "integrity": "sha512-OFKapYxe72yz7agrDAWi8v2WL8GIfVqcbKRCLbRG9PAxtzF9b1SEDdTpytNDN12z2fJynoBwpMpvj2R39plI2A==", - "dev": true, - "requires": { - "chalk": "^2.0.1", - "jest-get-type": "^22.1.0", - "leven": "^2.1.0", - "pretty-format": "^23.6.0" - } - }, "jest-watcher": { "version": "23.4.0", "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-23.4.0.tgz", @@ -5589,6 +6712,37 @@ "ansi-escapes": "^3.0.0", "chalk": "^2.0.1", "string-length": "^2.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } } }, "jest-worker": { @@ -5607,9 +6761,9 @@ "dev": true }, "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", "dev": true }, "js-yaml": { @@ -5660,20 +6814,12 @@ "whatwg-url": "^6.4.1", "ws": "^5.2.0", "xml-name-validator": "^3.0.0" - }, - "dependencies": { - "acorn": { - "version": "5.7.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz", - "integrity": "sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==", - "dev": true - } } }, "jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "version": "0.5.0", + "resolved": "http://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", "dev": true }, "json-parse-better-errors": { @@ -5707,13 +6853,10 @@ "dev": true }, "json5": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.0.tgz", - "integrity": "sha512-8Mh9h6xViijj36g7Dxi+Y4S6hNGV96vcJZr/SrlHh1LR/pEn/8j/+qIBbs44YKl69Lrfctp4QD+AdWLTMqEZAQ==", - "dev": true, - "requires": { - "minimist": "^1.2.0" - } + "version": "0.5.1", + "resolved": "http://registry.npmjs.org/json5/-/json5-0.5.1.tgz", + "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", + "dev": true }, "jsonfile": { "version": "4.0.0", @@ -5743,13 +6886,10 @@ } }, "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true }, "kleur": { "version": "2.0.2", @@ -5757,6 +6897,13 @@ "integrity": "sha512-77XF9iTllATmG9lSlIv0qdQ2BQ/h9t0bJllHlbvsQ0zUWfU7Yi0S8L5JXzPZgkefIiajLmBJJ4BsMJmqcf7oxQ==", "dev": true }, + "lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", + "dev": true, + "optional": true + }, "lcid": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", @@ -5819,23 +6966,31 @@ "yargs": "^8.0.2" }, "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } }, - "async": { - "version": "1.5.2", - "resolved": "http://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", "dev": true }, - "chardet": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz", - "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=", - "dev": true + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } }, "cliui": { "version": "3.2.0", @@ -5848,12 +7003,6 @@ "wrap-ansi": "^2.0.0" }, "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, "string-width": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", @@ -5864,91 +7013,13 @@ "is-fullwidth-code-point": "^1.0.0", "strip-ansi": "^3.0.0" } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } } } }, - "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", - "dev": true, - "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "execa": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.8.0.tgz", - "integrity": "sha1-2NdrvBtVIX7RkP1t1J08d07PyNo=", - "dev": true, - "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "external-editor": { - "version": "2.2.0", - "resolved": "http://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", - "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", - "dev": true, - "requires": { - "chardet": "^0.4.0", - "iconv-lite": "^0.4.17", - "tmp": "^0.0.33" - } - }, - "glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", - "dev": true, - "requires": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" - } - }, - "inquirer": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.3.0.tgz", - "integrity": "sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ==", - "dev": true, - "requires": { - "ansi-escapes": "^3.0.0", - "chalk": "^2.0.0", - "cli-cursor": "^2.1.0", - "cli-width": "^2.0.0", - "external-editor": "^2.0.4", - "figures": "^2.0.0", - "lodash": "^4.3.0", - "mute-stream": "0.0.7", - "run-async": "^2.2.0", - "rx-lite": "^4.0.8", - "rx-lite-aggregates": "^4.0.8", - "string-width": "^2.1.0", - "strip-ansi": "^4.0.0", - "through": "^2.3.6" - } - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true }, "is-fullwidth-code-point": { @@ -5960,63 +7031,30 @@ "number-is-nan": "^1.0.0" } }, - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "dev": true, - "requires": { - "is-extglob": "^2.1.0" - } - }, - "load-json-file": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", - "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^3.0.0" - } - }, "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", "dev": true, "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" + "error-ex": "^1.2.0" } }, "path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", + "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", "dev": true, "requires": { - "pify": "^3.0.0" + "pify": "^2.0.0" } }, "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", "dev": true }, - "read-pkg": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", - "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", - "dev": true, - "requires": { - "load-json-file": "^4.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^3.0.0" - } - }, "read-pkg-up": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", @@ -6029,7 +7067,7 @@ "dependencies": { "load-json-file": { "version": "2.0.0", - "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", "dev": true, "requires": { @@ -6039,30 +7077,6 @@ "strip-bom": "^3.0.0" } }, - "parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", - "dev": true, - "requires": { - "error-ex": "^1.2.0" - } - }, - "path-type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", - "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", - "dev": true, - "requires": { - "pify": "^2.0.0" - } - }, - "pify": { - "version": "2.3.0", - "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - }, "read-pkg": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", @@ -6076,21 +7090,21 @@ } } }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - }, "strip-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", "dev": true }, + "supports-color": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, "yargs": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-8.0.2.tgz", @@ -6111,15 +7125,6 @@ "y18n": "^3.2.1", "yargs-parser": "^7.0.0" } - }, - "yargs-parser": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-7.0.0.tgz", - "integrity": "sha1-jQrELxbqVd69MyyvTEA4s+P139k=", - "dev": true, - "requires": { - "camelcase": "^4.1.0" - } } } }, @@ -6140,16 +7145,23 @@ } }, "load-json-file": { - "version": "1.1.0", - "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", "dev": true, "requires": { "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + }, + "dependencies": { + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + } } }, "locate-path": { @@ -6163,9 +7175,9 @@ } }, "lodash": { - "version": "4.17.11", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", - "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "version": "4.17.10", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", + "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==", "dev": true }, "lodash._reinterpolate": { @@ -6235,6 +7247,12 @@ "integrity": "sha1-7GZi5IlkCO1KtsVCo5kLcswIACA=", "dev": true }, + "longest": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", + "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", + "dev": true + }, "loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", @@ -6261,9 +7279,9 @@ "dev": true }, "lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", + "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", "dev": true, "requires": { "pseudomap": "^1.0.2", @@ -6286,14 +7304,6 @@ "dev": true, "requires": { "pify": "^3.0.0" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } } }, "makeerror": { @@ -6358,54 +7368,6 @@ "trim-newlines": "^2.0.0" }, "dependencies": { - "load-json-file": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", - "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^3.0.0" - } - }, - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "dev": true, - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - } - }, - "path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", - "dev": true, - "requires": { - "pify": "^3.0.0" - } - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - }, - "read-pkg": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", - "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", - "dev": true, - "requires": { - "load-json-file": "^4.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^3.0.0" - } - }, "read-pkg-up": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", @@ -6415,12 +7377,6 @@ "find-up": "^2.0.0", "read-pkg": "^3.0.0" } - }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", - "dev": true } } }, @@ -6458,6 +7414,32 @@ "object.omit": "^2.0.0", "parse-glob": "^3.0.4", "regex-cache": "^0.4.2" + }, + "dependencies": { + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } } }, "mime-db": { @@ -6492,7 +7474,7 @@ }, "minimist": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true }, @@ -6529,7 +7511,7 @@ }, "mkdirp": { "version": "0.5.1", - "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "dev": true, "requires": { @@ -6538,7 +7520,7 @@ "dependencies": { "minimist": { "version": "0.0.8", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", "dev": true } @@ -6551,15 +7533,15 @@ "dev": true }, "moment": { - "version": "2.22.2", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.22.2.tgz", - "integrity": "sha1-PCV/mDn8DpP/UxSWMiOeuQeD/2Y=", + "version": "2.22.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.22.1.tgz", + "integrity": "sha512-shJkRTSebXvsVqk56I+lkb2latjBs8I+pc2TzWc545y2iFnSjm7Wg0QMh+ZWcdSLQyGEau5jI8ocnmkyTgr9YQ==", "dev": true }, "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true }, "mute-stream": { @@ -6605,12 +7587,6 @@ "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", "dev": true - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true } } }, @@ -6645,9 +7621,9 @@ } }, "node-releases": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.0.5.tgz", - "integrity": "sha512-Ky7q0BO1BBkG/rQz6PkEZ59rwo+aSfhczHP1wwq8IowoVdN/FpiP7qp0XW0P2+BVCWe5fQUBozdbVd54q1RbCQ==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.0.3.tgz", + "integrity": "sha512-ZaZWMsbuDcetpHmYeKWPO6e63pSXLb50M7lJgCbcM2nC/nQC3daNifmtp5a2kp7EWwYfhuvH6zLPWkrF8IiDdw==", "dev": true, "requires": { "semver": "^5.3.0" @@ -6738,6 +7714,15 @@ "requires": { "is-descriptor": "^0.1.0" } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } } } }, @@ -6754,14 +7739,6 @@ "dev": true, "requires": { "isobject": "^3.0.0" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - } } }, "object.getownpropertydescriptors": { @@ -6791,14 +7768,6 @@ "dev": true, "requires": { "isobject": "^3.0.1" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - } } }, "once": { @@ -6831,7 +7800,7 @@ "dependencies": { "minimist": { "version": "0.0.10", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=", "dev": true }, @@ -6872,11 +7841,28 @@ "execa": "^0.7.0", "lcid": "^1.0.0", "mem": "^1.1.0" + }, + "dependencies": { + "execa": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", + "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", + "dev": true, + "requires": { + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + } } }, "os-tmpdir": { "version": "1.0.2", - "resolved": "http://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", "dev": true }, @@ -6887,9 +7873,9 @@ "dev": true }, "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.2.0.tgz", + "integrity": "sha512-Y/OtIaXtUPr4/YpMv1pCL5L5ed0rumAaAeBSj12F+bSlMdys7i8oQF/GUJmfpTS/QoaRrS/k6pma29haJpsMng==", "dev": true, "requires": { "p-try": "^1.0.0" @@ -6938,15 +7924,33 @@ "is-dotfile": "^1.0.0", "is-extglob": "^1.0.0", "is-glob": "^2.0.0" + }, + "dependencies": { + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + } } }, "parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", "dev": true, "requires": { - "error-ex": "^1.2.0" + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" } }, "parse5": { @@ -6975,7 +7979,7 @@ }, "path-is-absolute": { "version": "1.0.1", - "resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, @@ -6992,20 +7996,18 @@ "dev": true }, "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz", + "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=", "dev": true }, "path-type": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" + "pify": "^3.0.0" } }, "performance-now": { @@ -7015,9 +8017,9 @@ "dev": true }, "pify": { - "version": "2.3.0", - "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", "dev": true }, "pinkie": { @@ -7036,33 +8038,12 @@ } }, "pkg-dir": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-1.0.0.tgz", - "integrity": "sha1-ektQio1bstYp1EcFb/TpyTFM89Q=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", + "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", "dev": true, "requires": { - "find-up": "^1.0.0" - }, - "dependencies": { - "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", - "dev": true, - "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", - "dev": true, - "requires": { - "pinkie-promise": "^2.0.0" - } - } + "find-up": "^2.1.0" } }, "pluralize": { @@ -7131,6 +8112,15 @@ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } } } }, @@ -7146,12 +8136,6 @@ "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", "dev": true }, - "progress": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.1.tgz", - "integrity": "sha512-OE+a6vzqazc+K6LxJrX5UPyKFvGnL5CYmq2jFGNIBWHpc4QyE49/YOumcrpQFJpfejmvRtbJzgO1zPmMCqlbBg==", - "dev": true - }, "prompts": { "version": "0.1.14", "resolved": "https://registry.npmjs.org/prompts/-/prompts-0.1.14.tgz", @@ -7214,12 +8198,6 @@ "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", "dev": true - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true } } }, @@ -7233,6 +8211,14 @@ "ini": "~1.3.0", "minimist": "^1.2.0", "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true + } } }, "read-cmd-shim": { @@ -7245,14 +8231,14 @@ } }, "read-pkg": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", "dev": true, "requires": { - "load-json-file": "^1.0.0", + "load-json-file": "^4.0.0", "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" + "path-type": "^3.0.0" } }, "read-pkg-up": { @@ -7275,6 +8261,28 @@ "pinkie-promise": "^2.0.0" } }, + "load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "^1.2.0" + } + }, "path-exists": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", @@ -7283,12 +8291,40 @@ "requires": { "pinkie-promise": "^2.0.0" } + }, + "path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "dev": true, + "requires": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + } } } }, "readable-stream": { "version": "2.3.6", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "dev": true, "requires": { @@ -7299,6 +8335,17 @@ "safe-buffer": "~5.1.1", "string_decoder": "~1.1.1", "util-deprecate": "~1.0.1" + }, + "dependencies": { + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } } }, "realpath-native": { @@ -7375,20 +8422,6 @@ "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", "dev": true }, - "regexpu-core": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.2.0.tgz", - "integrity": "sha512-Z835VSnJJ46CNBttalHD/dB+Sj2ezmY6Xp38npwU87peK6mqOzOpV8eYktdkLTEkzzD+JsTcxd84ozd8I14+rw==", - "dev": true, - "requires": { - "regenerate": "^1.4.0", - "regenerate-unicode-properties": "^7.0.0", - "regjsgen": "^0.4.0", - "regjsparser": "^0.3.0", - "unicode-match-property-ecmascript": "^1.0.4", - "unicode-match-property-value-ecmascript": "^1.0.2" - } - }, "registry-auth-token": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.3.2.tgz", @@ -7408,29 +8441,6 @@ "rc": "^1.0.1" } }, - "regjsgen": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.4.0.tgz", - "integrity": "sha512-X51Lte1gCYUdlwhF28+2YMO0U6WeN0GLpgpA7LK7mbdDnkQYiwvEpmpe0F/cv5L14EbxgrdayAG3JETBv0dbXA==", - "dev": true - }, - "regjsparser": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.3.0.tgz", - "integrity": "sha512-zza72oZBBHzt64G7DxdqrOo/30bhHkwMUoT0WqfGu98XLd7N+1tsy5MJ96Bk4MD0y74n629RhmrGW6XlnLLwCA==", - "dev": true, - "requires": { - "jsesc": "~0.5.0" - }, - "dependencies": { - "jsesc": { - "version": "0.5.0", - "resolved": "http://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", - "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", - "dev": true - } - } - }, "remove-trailing-separator": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", @@ -7438,9 +8448,9 @@ "dev": true }, "repeat-element": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", - "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", + "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=", "dev": true }, "repeat-string": { @@ -7486,21 +8496,11 @@ "uuid": "^3.3.2" }, "dependencies": { - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "uuid": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", "dev": true - }, - "tough-cookie": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", - "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", - "dev": true, - "requires": { - "psl": "^1.1.24", - "punycode": "^1.4.1" - } } } }, @@ -7538,18 +8538,26 @@ }, "require-uncached": { "version": "1.0.3", - "resolved": "http://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz", + "resolved": "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz", "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", "dev": true, "requires": { "caller-path": "^0.1.0", "resolve-from": "^1.0.0" + }, + "dependencies": { + "resolve-from": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz", + "integrity": "sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY=", + "dev": true + } } }, "resolve": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz", - "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.7.1.tgz", + "integrity": "sha512-c7rwLofp8g1U+h1KNyHL/jicrKg1Ek4q+Lr33AL65uZTinUZHe30D5HlyN5V9NW0JX1D5dXQ4jqW5l7Sy/kGfw==", "dev": true, "requires": { "path-parse": "^1.0.5" @@ -7562,20 +8570,12 @@ "dev": true, "requires": { "resolve-from": "^3.0.0" - }, - "dependencies": { - "resolve-from": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", - "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", - "dev": true - } } }, "resolve-from": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz", - "integrity": "sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", + "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", "dev": true }, "resolve-url": { @@ -7600,6 +8600,16 @@ "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", "dev": true }, + "right-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", + "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", + "dev": true, + "optional": true, + "requires": { + "align-text": "^0.1.1" + } + }, "rimraf": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", @@ -7610,9 +8620,9 @@ } }, "rollup": { - "version": "0.67.3", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-0.67.3.tgz", - "integrity": "sha512-TyNQCz97rKuVVbsKUTXfwIjV7UljWyTVd7cTMuE+aqlQ7WJslkYF5QaYGjMLR2BlQtUOO5CAxSVnpQ55iYp5jg==", + "version": "0.67.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-0.67.1.tgz", + "integrity": "sha512-BfwL9pw5VyxrAWx/G1tP8epgG+NH4KcR78aoWacV7+dFp1Mj6ynH8QTIC/lDQ3KlwzDakqZmJQ4LQ7TmLg+pBA==", "dev": true, "requires": { "@types/estree": "0.0.39", @@ -7629,62 +8639,6 @@ "read-pkg": "^3.0.0", "safe-resolve": "^1.0.0", "semver": "^5.5.0" - }, - "dependencies": { - "load-json-file": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", - "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^3.0.0" - } - }, - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "dev": true, - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - } - }, - "path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", - "dev": true, - "requires": { - "pify": "^3.0.0" - } - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - }, - "read-pkg": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", - "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", - "dev": true, - "requires": { - "load-json-file": "^4.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^3.0.0" - } - }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", - "dev": true - } } }, "rollup-plugin-babel": { @@ -7704,16 +8658,8 @@ "dev": true, "requires": { "acorn": "^5.7.1", - "magic-string": "^0.25.0", - "rollup-pluginutils": "^2.3.0" - }, - "dependencies": { - "acorn": { - "version": "5.7.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz", - "integrity": "sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==", - "dev": true - } + "magic-string": "^0.25.0", + "rollup-pluginutils": "^2.3.0" } }, "rollup-plugin-json": { @@ -7733,6 +8679,97 @@ "requires": { "estree-walker": "^0.5.2", "micromatch": "^2.3.11" + }, + "dependencies": { + "arr-diff": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "dev": true, + "requires": { + "arr-flatten": "^1.0.1" + } + }, + "array-unique": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "dev": true + }, + "braces": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "dev": true, + "requires": { + "expand-range": "^1.8.1", + "preserve": "^0.2.0", + "repeat-element": "^1.1.2" + } + }, + "expand-brackets": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "dev": true, + "requires": { + "is-posix-bracket": "^0.1.0" + } + }, + "extglob": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + }, + "micromatch": { + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "dev": true, + "requires": { + "arr-diff": "^2.0.0", + "array-unique": "^0.2.1", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", + "filename-regex": "^2.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", + "regex-cache": "^0.4.2" + } + } } }, "rsvp": { @@ -7782,7 +8819,7 @@ }, "safe-regex": { "version": "1.1.0", - "resolved": "http://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", "dev": true, "requires": { @@ -7859,15 +8896,6 @@ } } }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, "expand-brackets": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", @@ -7996,29 +9024,6 @@ } } }, - "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, "is-accessor-descriptor": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", @@ -8048,38 +9053,6 @@ "kind-of": "^6.0.2" } }, - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true - }, "micromatch": { "version": "3.1.10", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", @@ -8100,12 +9073,6 @@ "snapdragon": "^0.8.1", "to-regex": "^3.0.2" } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true } } }, @@ -8116,9 +9083,9 @@ "dev": true }, "semver": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", - "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", "dev": true }, "set-blocking": { @@ -8190,13 +9157,11 @@ "dev": true }, "slice-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.0.0.tgz", - "integrity": "sha512-4j2WTWjp3GsZ+AOagyzVbzp4vWGtZ0hEZ/gDY/uTvm6MTxUfTUIsnMIFb1bn8o0RuXiqUw15H1bue8f22Vw2oQ==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-1.0.0.tgz", + "integrity": "sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg==", "dev": true, "requires": { - "ansi-styles": "^3.2.0", - "astral-regex": "^1.0.0", "is-fullwidth-code-point": "^2.0.0" } }, @@ -8216,15 +9181,6 @@ "use": "^3.1.0" }, "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, "define-property": { "version": "0.2.5", "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", @@ -8242,12 +9198,6 @@ "requires": { "is-extendable": "^0.1.0" } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true } } }, @@ -8299,18 +9249,6 @@ "is-data-descriptor": "^1.0.0", "kind-of": "^6.0.2" } - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true } } }, @@ -8321,6 +9259,17 @@ "dev": true, "requires": { "kind-of": "^3.2.0" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } } }, "sort-keys": { @@ -8373,9 +9322,9 @@ "dev": true }, "spdx-correct": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.2.tgz", - "integrity": "sha512-q9hedtzyXHr5S0A1vEPoK/7l8NpfkFYTq6iCY+Pno2ZbdZR6WexZFtqeVGkGxW3TEJMN914Z55EnAGMmenlIQQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz", + "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", "dev": true, "requires": { "spdx-expression-parse": "^3.0.0", @@ -8383,9 +9332,9 @@ } }, "spdx-exceptions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", - "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz", + "integrity": "sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg==", "dev": true }, "spdx-expression-parse": { @@ -8399,9 +9348,9 @@ } }, "spdx-license-ids": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.2.tgz", - "integrity": "sha512-qky9CVt0lVIECkEsYbNILVnPvycuEBkXoMFLRWsREkomQLevYhtRKC+R91a5TOAQ3bCMjikRwhyaRqj1VYatYg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz", + "integrity": "sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA==", "dev": true }, "split": { @@ -8541,18 +9490,9 @@ } } }, - "string_decoder": { - "version": "1.1.1", - "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, "strip-ansi": { "version": "3.0.1", - "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { @@ -8570,7 +9510,7 @@ }, "strip-eof": { "version": "1.0.0", - "resolved": "http://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", "dev": true }, @@ -8580,15 +9520,9 @@ "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=", "dev": true }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "dev": true - }, "strong-log-transformer": { "version": "1.0.6", - "resolved": "http://registry.npmjs.org/strong-log-transformer/-/strong-log-transformer-1.0.6.tgz", + "resolved": "https://registry.npmjs.org/strong-log-transformer/-/strong-log-transformer-1.0.6.tgz", "integrity": "sha1-9/uTdYpppXEUAYEnfuoMLrEwH6M=", "dev": true, "requires": { @@ -8601,20 +9535,17 @@ "dependencies": { "minimist": { "version": "0.1.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.1.0.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.1.0.tgz", "integrity": "sha1-md9lelJXTCHJBXSX33QnkLK0wN4=", "dev": true } } }, "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true }, "symbol-tree": { "version": "3.2.2", @@ -8623,15 +9554,41 @@ "dev": true }, "table": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/table/-/table-5.1.1.tgz", - "integrity": "sha512-NUjapYb/qd4PeFW03HnAuOJ7OMcBkJlqeClWxeNlQ0lXGSb52oZXGzkO0/I0ARegQ2eUT1g2VDJH0eUxDRcHmw==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/table/-/table-5.1.0.tgz", + "integrity": "sha512-e542in22ZLhD/fOIuXs/8yDZ9W61ltF8daM88rkRNtgTIct+vI2fTnAyu/Db2TCfEcI8i7mjZz6meLq0nW7TYg==", "dev": true, "requires": { - "ajv": "^6.6.1", - "lodash": "^4.17.11", - "slice-ansi": "2.0.0", + "ajv": "^6.5.3", + "lodash": "^4.17.10", + "slice-ansi": "1.0.0", "string-width": "^2.1.1" + }, + "dependencies": { + "ajv": { + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.4.tgz", + "integrity": "sha512-4Wyjt8+t6YszqaXnLDfMmG/8AlO5Zbcsy3ATHncCzjW/NoPzAId8AK6749Ybjmdt+kUY1gP60fCu46oDxPv/mg==", + "dev": true, + "requires": { + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "fast-deep-equal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + } } }, "temp-dir": { @@ -8652,14 +9609,6 @@ "pify": "^3.0.0", "temp-dir": "^1.0.0", "uuid": "^3.0.1" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } } }, "tempfile": { @@ -8674,7 +9623,7 @@ "dependencies": { "uuid": { "version": "2.0.3", - "resolved": "http://registry.npmjs.org/uuid/-/uuid-2.0.3.tgz", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.3.tgz", "integrity": "sha1-Z+LoY3lyFVMN/zGOW/nc6/1Hsho=", "dev": true } @@ -8694,9 +9643,9 @@ } }, "text-extensions": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-1.9.0.tgz", - "integrity": "sha512-wiBrwC1EhBelW12Zy26JeOUkQ5mRu+5o8rpsJk5+2t+Y5vE7e842qtZDQ2g1NpX/29HdyFeJ4nSIhI47ENSxlQ==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-1.7.0.tgz", + "integrity": "sha512-AKXZeDq230UaSzaO5s3qQUZOaC7iKbzq0jOFL614R7d9R593HLqAOL0cYoqLdkNrjBSOdmoQI06yigq1TSBXAg==", "dev": true }, "text-table": { @@ -8713,17 +9662,17 @@ }, "through": { "version": "2.3.8", - "resolved": "http://registry.npmjs.org/through/-/through-2.3.8.tgz", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", "dev": true }, "through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", + "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", "dev": true, "requires": { - "readable-stream": "~2.3.6", + "readable-stream": "^2.1.5", "xtend": "~4.0.1" } }, @@ -8749,9 +9698,9 @@ "dev": true }, "to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", + "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", "dev": true }, "to-object-path": { @@ -8761,6 +9710,17 @@ "dev": true, "requires": { "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } } }, "to-regex": { @@ -8783,27 +9743,24 @@ "requires": { "is-number": "^3.0.0", "repeat-string": "^1.6.1" - }, - "dependencies": { - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - } } }, "tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", + "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", "dev": true, "requires": { - "psl": "^1.1.28", - "punycode": "^2.1.1" + "psl": "^1.1.24", + "punycode": "^1.4.1" + }, + "dependencies": { + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + } } }, "tr46": { @@ -8869,25 +9826,18 @@ "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", "dev": true }, - "uglify-js": { - "version": "3.4.9", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.9.tgz", - "integrity": "sha512-8CJsbKOtEbnJsTyv6LE6m6ZKniqMiFWmm9sRbopbkGs3gMPPfd3Fh8iIA4Ykv5MgaTbqHr4BaoGLJLZNhsrW1Q==", + "typescript": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.2.1.tgz", + "integrity": "sha512-jw7P2z/h6aPT4AENXDGjcfHTu5CSqzsbZc6YlUIebTyBAq8XaKp78x7VcSh30xwSCcsu5irZkYZUSFP1MrAMbg==", + "dev": true + }, + "uglify-to-browserify": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", + "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", "dev": true, - "optional": true, - "requires": { - "commander": "~2.17.1", - "source-map": "~0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "optional": true - } - } + "optional": true }, "unicode-canonical-property-names-ecmascript": { "version": "1.0.4", @@ -8953,9 +9903,9 @@ } }, "universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.1.tgz", + "integrity": "sha1-+nG63UQ3r0wUiEHjs7Fl+enlkLc=", "dev": true }, "unset-value": { @@ -8995,12 +9945,6 @@ "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", "dev": true - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true } } }, @@ -9017,6 +9961,14 @@ "dev": true, "requires": { "punycode": "^2.1.0" + }, + "dependencies": { + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + } } }, "urix": { @@ -9057,15 +10009,15 @@ } }, "uuid": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz", + "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==", "dev": true }, "validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz", + "integrity": "sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g==", "dev": true, "requires": { "spdx-correct": "^3.0.0", @@ -9133,6 +10085,17 @@ "dev": true, "requires": { "iconv-lite": "0.4.24" + }, + "dependencies": { + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + } } }, "whatwg-mimetype": { @@ -9176,6 +10139,13 @@ "string-width": "^1.0.2 || 2" } }, + "window-size": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", + "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", + "dev": true, + "optional": true + }, "wordwrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", @@ -9184,7 +10154,7 @@ }, "wrap-ansi": { "version": "2.1.0", - "resolved": "http://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", "dev": true, "requires": { @@ -9259,19 +10229,13 @@ "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-5.0.0.tgz", "integrity": "sha1-OHHMCmoALow+Wzz38zYmRnXwa50=", "dev": true - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true } } }, "write-pkg": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/write-pkg/-/write-pkg-3.2.0.tgz", - "integrity": "sha512-tX2ifZ0YqEFOF1wjRW2Pk93NLsj02+n1UP5RvO6rCs0K6R2g1padvf006cY74PQJKMGS2r42NK7FD0dG6Y6paw==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/write-pkg/-/write-pkg-3.1.0.tgz", + "integrity": "sha1-AwqZlMyZk9JbTnWp8aGSNgcpHOk=", "dev": true, "requires": { "sort-keys": "^2.0.0", @@ -9312,32 +10276,33 @@ "dev": true }, "yargs": { - "version": "11.1.0", - "resolved": "http://registry.npmjs.org/yargs/-/yargs-11.1.0.tgz", - "integrity": "sha512-NwW69J42EsCSanF8kyn5upxvjp5ds+t3+udGBeTbFnERA+lF541DDpMawzo4z6W/QrzNM18D+BPMiOBibnFV5A==", + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", "dev": true, + "optional": true, "requires": { - "cliui": "^4.0.0", - "decamelize": "^1.1.1", - "find-up": "^2.1.0", - "get-caller-file": "^1.0.1", - "os-locale": "^2.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^9.0.2" + "camelcase": "^1.0.2", + "cliui": "^2.1.0", + "decamelize": "^1.0.0", + "window-size": "0.1.0" } }, "yargs-parser": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-9.0.2.tgz", - "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-7.0.0.tgz", + "integrity": "sha1-jQrELxbqVd69MyyvTEA4s+P139k=", "dev": true, "requires": { "camelcase": "^4.1.0" + }, + "dependencies": { + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true + } } } } diff --git a/packages/web3-utils/package-lock.json b/packages/web3-utils/package-lock.json index 1fd43b07377..7ccf3246028 100644 --- a/packages/web3-utils/package-lock.json +++ b/packages/web3-utils/package-lock.json @@ -1,736 +1,738 @@ { - "name": "web3-utils", - "version": "1.0.0-beta.36", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "@types/parsimmon": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/@types/parsimmon/-/parsimmon-1.10.0.tgz", - "integrity": "sha512-bsTIJFVQv7jnvNiC42ld2pQW2KRI+pAG243L+iATvqzy3X6+NH1obz2itRKDZZ8VVhN3wjwYax/VBGCcXzgTqQ==", - "dev": true - }, - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true - }, - "any-promise": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", - "integrity": "sha1-q8av7tzqUugJzcA3au0845Y10X8=", - "dev": true - }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "babel-code-frame": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", - "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", - "dev": true, - "requires": { - "chalk": "^1.1.3", - "esutils": "^2.0.2", - "js-tokens": "^3.0.2" - }, - "dependencies": { - "chalk": { - "version": "1.1.3", - "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - } - } - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true - }, - "bn.js": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", - "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==" - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" - }, - "buffer-to-arraybuffer": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/buffer-to-arraybuffer/-/buffer-to-arraybuffer-0.0.5.tgz", - "integrity": "sha1-YGSkD6dutDxyOrqe+PbhIW0QURo=" - }, - "builtin-modules": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", - "dev": true - }, - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "commander": { - "version": "2.19.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz", - "integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==", - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - }, - "decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" - }, - "decompress-response": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", - "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", - "requires": { - "mimic-response": "^1.0.0" - } - }, - "definitelytyped-header-parser": { - "version": "github:Microsoft/definitelytyped-header-parser#4941b70b7658d5238b619dcba694aee22f5b8f56", - "from": "github:Microsoft/definitelytyped-header-parser#production", - "dev": true, - "requires": { - "@types/parsimmon": "^1.3.0", - "parsimmon": "^1.2.0" - } - }, - "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", - "dev": true - }, - "dom-walk": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.1.tgz", - "integrity": "sha1-ZyIm3HTI95mtNTB9+TaroRrNYBg=" - }, - "dtslint": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/dtslint/-/dtslint-0.3.0.tgz", - "integrity": "sha512-3oWL8MD+2nKaxmNzrt8EAissP63hNSJ4OLr/itvNnPdAAl+7vxnjQ8p2Zdk0MNgdenqwk7GcaUDz7fQHaPgCyA==", - "dev": true, - "requires": { - "definitelytyped-header-parser": "github:Microsoft/definitelytyped-header-parser#4941b70b7658d5238b619dcba694aee22f5b8f56", - "fs-promise": "^2.0.0", - "strip-json-comments": "^2.0.1", - "tslint": "^5.9.1", - "typescript": "^3.3.0-dev.20181201" - } - }, - "elliptic": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.1.tgz", - "integrity": "sha512-BsXLz5sqX8OHcsh7CqBMztyXARmGQ3LWPtGjJi6DiJHq5C/qvi9P3OqgswKSDftbu8+IoI/QDTAm2fFnQ9SZSQ==", - "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.0" - } - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true - }, - "esutils": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", - "dev": true - }, - "eth-lib": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", - "integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==", - "requires": { - "bn.js": "^4.11.6", - "elliptic": "^6.4.0", - "xhr-request-promise": "^0.1.2" - } - }, - "ethjs-unit": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/ethjs-unit/-/ethjs-unit-0.1.6.tgz", - "integrity": "sha1-xmWSHkduh7ziqdWIpv4EBbLEFpk=", - "requires": { - "bn.js": "4.11.6", - "number-to-bn": "1.7.0" - }, - "dependencies": { - "bn.js": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=" - } - } - }, - "for-each": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", - "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", - "requires": { - "is-callable": "^1.1.3" - } - }, - "fs-extra": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-2.1.2.tgz", - "integrity": "sha1-BGxwFjzvmq1GsOSn+kZ/si1x3jU=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^2.1.0" - } - }, - "fs-promise": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/fs-promise/-/fs-promise-2.0.3.tgz", - "integrity": "sha1-9k5PhUvPaJqovdy6JokW2z20aFQ=", - "dev": true, - "requires": { - "any-promise": "^1.3.0", - "fs-extra": "^2.0.0", - "mz": "^2.6.0", - "thenify-all": "^1.6.0" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, - "glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "global": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/global/-/global-4.3.2.tgz", - "integrity": "sha1-52mJJopsdMOJCLEwWxD8DjlOnQ8=", - "requires": { - "min-document": "^2.19.0", - "process": "~0.5.1" - } - }, - "graceful-fs": { - "version": "4.1.15", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", - "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==", - "dev": true - }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "hash.js": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.5.tgz", - "integrity": "sha512-eWI5HG9Np+eHV1KQhisXWwM+4EPPYe5dFX1UZZH7k/E3JzDEazVH+VGlZi6R94ZqImq+A3D1mCEtrFIfg/E7sA==", - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, - "hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", - "requires": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - }, - "is-callable": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", - "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==" - }, - "is-function": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-function/-/is-function-1.0.1.tgz", - "integrity": "sha1-Es+5i2W1fdPRk6MSH19uL0N2ArU=" - }, - "is-hex-prefixed": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz", - "integrity": "sha1-fY035q135dEnFIkTxXPggtd39VQ=" - }, - "js-tokens": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", - "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", - "dev": true - }, - "js-yaml": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz", - "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "jsonfile": { - "version": "2.4.0", - "resolved": "http://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", - "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6" - } - }, - "mimic-response": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", - "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==" - }, - "min-document": { - "version": "2.19.0", - "resolved": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz", - "integrity": "sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU=", - "requires": { - "dom-walk": "^0.1.0" - } - }, - "minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" - }, - "minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "mz": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", - "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", - "dev": true, - "requires": { - "any-promise": "^1.0.0", - "object-assign": "^4.0.1", - "thenify-all": "^1.0.0" - } - }, - "number-to-bn": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/number-to-bn/-/number-to-bn-1.7.0.tgz", - "integrity": "sha1-uzYjWS9+X54AMLGXe9QaDFP+HqA=", - "requires": { - "bn.js": "4.11.6", - "strip-hex-prefix": "1.0.0" - }, - "dependencies": { - "bn.js": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=" - } - } - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "requires": { - "wrappy": "1" - } - }, - "parse-headers": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/parse-headers/-/parse-headers-2.0.1.tgz", - "integrity": "sha1-aug6eqJanZtwCswoaYzR8e1+lTY=", - "requires": { - "for-each": "^0.3.2", - "trim": "0.0.1" - } - }, - "parsimmon": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/parsimmon/-/parsimmon-1.12.0.tgz", - "integrity": "sha512-uC/BjuSfb4jfaWajKCp1mVncXXq+V1twbcYChbTxN3GM7fn+8XoHwUdvUz+PTaFtDSCRQxU8+Rnh+iMhAkVwdw==", - "dev": true - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true - }, - "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", - "dev": true - }, - "process": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/process/-/process-0.5.2.tgz", - "integrity": "sha1-FjjYqONML0QKkduVq5rrZ3/Bhc8=" - }, - "query-string": { - "version": "5.1.1", - "resolved": "http://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz", - "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", - "requires": { - "decode-uri-component": "^0.2.0", - "object-assign": "^4.1.0", - "strict-uri-encode": "^1.0.0" - } - }, - "randomhex": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/randomhex/-/randomhex-0.1.5.tgz", - "integrity": "sha1-us7vmCMpCRQA8qKRLGzQLxCU9YU=" - }, - "resolve": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz", - "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", - "dev": true, - "requires": { - "path-parse": "^1.0.5" - } - }, - "semver": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", - "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==", - "dev": true - }, - "simple-concat": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.0.tgz", - "integrity": "sha1-c0TLuLbib7J9ZrL8hvn21Zl1IcY=" - }, - "simple-get": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-2.8.1.tgz", - "integrity": "sha512-lSSHRSw3mQNUGPAYRqo7xy9dhKmxFXIjLjp4KHpf99GEH2VH7C3AM+Qfx6du6jhfUi6Vm7XnbEVEf7Wb6N8jRw==", - "requires": { - "decompress-response": "^3.3.0", - "once": "^1.3.1", - "simple-concat": "^1.0.0" - } - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true - }, - "strict-uri-encode": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", - "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=" - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-hex-prefix": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz", - "integrity": "sha1-DF8VX+8RUTczd96du1iNoFUA428=", - "requires": { - "is-hex-prefixed": "1.0.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "dev": true - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - }, - "thenify": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.0.tgz", - "integrity": "sha1-5p44obq+lpsBCCB5eLn2K4hgSDk=", - "dev": true, - "requires": { - "any-promise": "^1.0.0" - } - }, - "thenify-all": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", - "integrity": "sha1-GhkY1ALY/D+Y+/I02wvMjMEOlyY=", - "dev": true, - "requires": { - "thenify": ">= 3.1.0 < 4" - } - }, - "timed-out": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", - "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=" - }, - "trim": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/trim/-/trim-0.0.1.tgz", - "integrity": "sha1-WFhUf2spB1fulczMZm+1AITEYN0=" - }, - "tslib": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", - "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", - "dev": true - }, - "tslint": { - "version": "5.11.0", - "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.11.0.tgz", - "integrity": "sha1-mPMMAurjzecAYgHkwzywi0hYHu0=", - "dev": true, - "requires": { - "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.27.2" - } - }, - "tsutils": { - "version": "2.29.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", - "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", - "dev": true, - "requires": { - "tslib": "^1.8.1" - } - }, - "typescript": { - "version": "3.3.0-dev.20181201", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.3.0-dev.20181201.tgz", - "integrity": "sha512-s6U94E8viHQrFuOrBv4fa9hs2YKk4Qqob03LdXzCXos37JbY7iGQY5Ol68aOEzXVByqcixMex1BkQSGuwsJyUA==", - "dev": true - }, - "underscore-es": { - "version": "1.9.8", - "resolved": "https://registry.npmjs.org/underscore-es/-/underscore-es-1.9.8.tgz", - "integrity": "sha1-pxRXUnSyewsdk94XR6TRU9jeZ3Y=" - }, - "url-set-query": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/url-set-query/-/url-set-query-1.0.0.tgz", - "integrity": "sha1-AW6M/Xwg7gXK/neV6JK9BwL6ozk=" - }, - "utf8": { - "version": "2.1.1", - "resolved": "http://registry.npmjs.org/utf8/-/utf8-2.1.1.tgz", - "integrity": "sha1-LgHbAvfY0JRPdxBPFgnrDDBM92g=" - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - }, - "xhr": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/xhr/-/xhr-2.5.0.tgz", - "integrity": "sha512-4nlO/14t3BNUZRXIXfXe+3N6w3s1KoxcJUUURctd64BLRe67E4gRwp4PjywtDY72fXpZ1y6Ch0VZQRY/gMPzzQ==", - "requires": { - "global": "~4.3.0", - "is-function": "^1.0.1", - "parse-headers": "^2.0.0", - "xtend": "^4.0.0" - } - }, - "xhr-request": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/xhr-request/-/xhr-request-1.1.0.tgz", - "integrity": "sha512-Y7qzEaR3FDtL3fP30k9wO/e+FBnBByZeybKOhASsGP30NIkRAAkKD/sCnLvgEfAIEC1rcmK7YG8f4oEnIrrWzA==", - "requires": { - "buffer-to-arraybuffer": "^0.0.5", - "object-assign": "^4.1.1", - "query-string": "^5.0.1", - "simple-get": "^2.7.0", - "timed-out": "^4.0.1", - "url-set-query": "^1.0.0", - "xhr": "^2.0.4" - } - }, - "xhr-request-promise": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/xhr-request-promise/-/xhr-request-promise-0.1.2.tgz", - "integrity": "sha1-NDxE0e53JrhkgGloLQ+EDIO0Jh0=", - "requires": { - "xhr-request": "^1.0.1" - } - }, - "xtend": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" - } - } + "name": "web3-utils", + "version": "1.0.0-beta.36", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@types/parsimmon": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@types/parsimmon/-/parsimmon-1.10.0.tgz", + "integrity": "sha512-bsTIJFVQv7jnvNiC42ld2pQW2KRI+pAG243L+iATvqzy3X6+NH1obz2itRKDZZ8VVhN3wjwYax/VBGCcXzgTqQ==", + "dev": true + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha1-q8av7tzqUugJzcA3au0845Y10X8=", + "dev": true + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "babel-code-frame": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", + "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", + "dev": true, + "requires": { + "chalk": "^1.1.3", + "esutils": "^2.0.2", + "js-tokens": "^3.0.2" + }, + "dependencies": { + "chalk": { + "version": "1.1.3", + "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + } + } + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==" + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" + }, + "buffer-to-arraybuffer": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/buffer-to-arraybuffer/-/buffer-to-arraybuffer-0.0.5.tgz", + "integrity": "sha1-YGSkD6dutDxyOrqe+PbhIW0QURo=" + }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "dev": true + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "commander": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz", + "integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" + }, + "decompress-response": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", + "requires": { + "mimic-response": "^1.0.0" + } + }, + "definitelytyped-header-parser": { + "version": "github:Microsoft/definitelytyped-header-parser#4941b70b7658d5238b619dcba694aee22f5b8f56", + "from": "github:Microsoft/definitelytyped-header-parser#production", + "dev": true, + "requires": { + "@types/parsimmon": "^1.3.0", + "parsimmon": "^1.2.0" + } + }, + "diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true + }, + "dom-walk": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.1.tgz", + "integrity": "sha1-ZyIm3HTI95mtNTB9+TaroRrNYBg=" + }, + "dtslint": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/dtslint/-/dtslint-0.3.0.tgz", + "integrity": "sha512-3oWL8MD+2nKaxmNzrt8EAissP63hNSJ4OLr/itvNnPdAAl+7vxnjQ8p2Zdk0MNgdenqwk7GcaUDz7fQHaPgCyA==", + "dev": true, + "requires": { + "definitelytyped-header-parser": "github:Microsoft/definitelytyped-header-parser#4941b70b7658d5238b619dcba694aee22f5b8f56", + "fs-promise": "^2.0.0", + "strip-json-comments": "^2.0.1", + "tslint": "^5.9.1", + "typescript": "^3.3.0-dev.20181201" + }, + "dependencies": { + "typescript": { + "version": "3.3.0-dev.20181201", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.3.0-dev.20181201.tgz", + "integrity": "sha512-s6U94E8viHQrFuOrBv4fa9hs2YKk4Qqob03LdXzCXos37JbY7iGQY5Ol68aOEzXVByqcixMex1BkQSGuwsJyUA==", + "dev": true + } + } + }, + "elliptic": { + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.1.tgz", + "integrity": "sha512-BsXLz5sqX8OHcsh7CqBMztyXARmGQ3LWPtGjJi6DiJHq5C/qvi9P3OqgswKSDftbu8+IoI/QDTAm2fFnQ9SZSQ==", + "requires": { + "bn.js": "^4.4.0", + "brorand": "^1.0.1", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.0" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "esutils": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", + "dev": true + }, + "eth-lib": { + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", + "integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==", + "requires": { + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "xhr-request-promise": "^0.1.2" + } + }, + "ethjs-unit": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/ethjs-unit/-/ethjs-unit-0.1.6.tgz", + "integrity": "sha1-xmWSHkduh7ziqdWIpv4EBbLEFpk=", + "requires": { + "bn.js": "4.11.6", + "number-to-bn": "1.7.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=" + } + } + }, + "for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "requires": { + "is-callable": "^1.1.3" + } + }, + "fs-extra": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-2.1.2.tgz", + "integrity": "sha1-BGxwFjzvmq1GsOSn+kZ/si1x3jU=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^2.1.0" + } + }, + "fs-promise": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/fs-promise/-/fs-promise-2.0.3.tgz", + "integrity": "sha1-9k5PhUvPaJqovdy6JokW2z20aFQ=", + "dev": true, + "requires": { + "any-promise": "^1.3.0", + "fs-extra": "^2.0.0", + "mz": "^2.6.0", + "thenify-all": "^1.6.0" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "global": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/global/-/global-4.3.2.tgz", + "integrity": "sha1-52mJJopsdMOJCLEwWxD8DjlOnQ8=", + "requires": { + "min-document": "^2.19.0", + "process": "~0.5.1" + } + }, + "graceful-fs": { + "version": "4.1.15", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", + "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==", + "dev": true + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "hash.js": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.5.tgz", + "integrity": "sha512-eWI5HG9Np+eHV1KQhisXWwM+4EPPYe5dFX1UZZH7k/E3JzDEazVH+VGlZi6R94ZqImq+A3D1mCEtrFIfg/E7sA==", + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "requires": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "is-callable": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", + "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==" + }, + "is-function": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-function/-/is-function-1.0.1.tgz", + "integrity": "sha1-Es+5i2W1fdPRk6MSH19uL0N2ArU=" + }, + "is-hex-prefixed": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz", + "integrity": "sha1-fY035q135dEnFIkTxXPggtd39VQ=" + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", + "dev": true + }, + "js-yaml": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz", + "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "jsonfile": { + "version": "2.4.0", + "resolved": "http://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", + "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "mimic-response": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==" + }, + "min-document": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz", + "integrity": "sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU=", + "requires": { + "dom-walk": "^0.1.0" + } + }, + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "mz": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "dev": true, + "requires": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } + }, + "number-to-bn": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/number-to-bn/-/number-to-bn-1.7.0.tgz", + "integrity": "sha1-uzYjWS9+X54AMLGXe9QaDFP+HqA=", + "requires": { + "bn.js": "4.11.6", + "strip-hex-prefix": "1.0.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=" + } + } + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, + "parse-headers": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/parse-headers/-/parse-headers-2.0.1.tgz", + "integrity": "sha1-aug6eqJanZtwCswoaYzR8e1+lTY=", + "requires": { + "for-each": "^0.3.2", + "trim": "0.0.1" + } + }, + "parsimmon": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/parsimmon/-/parsimmon-1.12.0.tgz", + "integrity": "sha512-uC/BjuSfb4jfaWajKCp1mVncXXq+V1twbcYChbTxN3GM7fn+8XoHwUdvUz+PTaFtDSCRQxU8+Rnh+iMhAkVwdw==", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true + }, + "process": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/process/-/process-0.5.2.tgz", + "integrity": "sha1-FjjYqONML0QKkduVq5rrZ3/Bhc8=" + }, + "query-string": { + "version": "5.1.1", + "resolved": "http://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz", + "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", + "requires": { + "decode-uri-component": "^0.2.0", + "object-assign": "^4.1.0", + "strict-uri-encode": "^1.0.0" + } + }, + "randomhex": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/randomhex/-/randomhex-0.1.5.tgz", + "integrity": "sha1-us7vmCMpCRQA8qKRLGzQLxCU9YU=" + }, + "resolve": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz", + "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", + "dev": true, + "requires": { + "path-parse": "^1.0.5" + } + }, + "semver": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", + "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==", + "dev": true + }, + "simple-concat": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.0.tgz", + "integrity": "sha1-c0TLuLbib7J9ZrL8hvn21Zl1IcY=" + }, + "simple-get": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-2.8.1.tgz", + "integrity": "sha512-lSSHRSw3mQNUGPAYRqo7xy9dhKmxFXIjLjp4KHpf99GEH2VH7C3AM+Qfx6du6jhfUi6Vm7XnbEVEf7Wb6N8jRw==", + "requires": { + "decompress-response": "^3.3.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "strict-uri-encode": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", + "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=" + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-hex-prefix": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz", + "integrity": "sha1-DF8VX+8RUTczd96du1iNoFUA428=", + "requires": { + "is-hex-prefixed": "1.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + }, + "thenify": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.0.tgz", + "integrity": "sha1-5p44obq+lpsBCCB5eLn2K4hgSDk=", + "dev": true, + "requires": { + "any-promise": "^1.0.0" + } + }, + "thenify-all": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", + "integrity": "sha1-GhkY1ALY/D+Y+/I02wvMjMEOlyY=", + "dev": true, + "requires": { + "thenify": ">= 3.1.0 < 4" + } + }, + "timed-out": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", + "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=" + }, + "trim": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/trim/-/trim-0.0.1.tgz", + "integrity": "sha1-WFhUf2spB1fulczMZm+1AITEYN0=" + }, + "tslib": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", + "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", + "dev": true + }, + "tslint": { + "version": "5.11.0", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.11.0.tgz", + "integrity": "sha1-mPMMAurjzecAYgHkwzywi0hYHu0=", + "dev": true, + "requires": { + "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.27.2" + } + }, + "tsutils": { + "version": "2.29.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", + "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + }, + "underscore-es": { + "version": "1.9.8", + "resolved": "https://registry.npmjs.org/underscore-es/-/underscore-es-1.9.8.tgz", + "integrity": "sha1-pxRXUnSyewsdk94XR6TRU9jeZ3Y=" + }, + "url-set-query": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/url-set-query/-/url-set-query-1.0.0.tgz", + "integrity": "sha1-AW6M/Xwg7gXK/neV6JK9BwL6ozk=" + }, + "utf8": { + "version": "2.1.1", + "resolved": "http://registry.npmjs.org/utf8/-/utf8-2.1.1.tgz", + "integrity": "sha1-LgHbAvfY0JRPdxBPFgnrDDBM92g=" + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "xhr": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/xhr/-/xhr-2.5.0.tgz", + "integrity": "sha512-4nlO/14t3BNUZRXIXfXe+3N6w3s1KoxcJUUURctd64BLRe67E4gRwp4PjywtDY72fXpZ1y6Ch0VZQRY/gMPzzQ==", + "requires": { + "global": "~4.3.0", + "is-function": "^1.0.1", + "parse-headers": "^2.0.0", + "xtend": "^4.0.0" + } + }, + "xhr-request": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/xhr-request/-/xhr-request-1.1.0.tgz", + "integrity": "sha512-Y7qzEaR3FDtL3fP30k9wO/e+FBnBByZeybKOhASsGP30NIkRAAkKD/sCnLvgEfAIEC1rcmK7YG8f4oEnIrrWzA==", + "requires": { + "buffer-to-arraybuffer": "^0.0.5", + "object-assign": "^4.1.1", + "query-string": "^5.0.1", + "simple-get": "^2.7.0", + "timed-out": "^4.0.1", + "url-set-query": "^1.0.0", + "xhr": "^2.0.4" + } + }, + "xhr-request-promise": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/xhr-request-promise/-/xhr-request-promise-0.1.2.tgz", + "integrity": "sha1-NDxE0e53JrhkgGloLQ+EDIO0Jh0=", + "requires": { + "xhr-request": "^1.0.1" + } + }, + "xtend": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" + } + } } From 6768764b3d38f4bbf2dce2a74269a427adb92b94 Mon Sep 17 00:00:00 2001 From: Josh Stevens Date: Mon, 3 Dec 2018 12:38:58 +0000 Subject: [PATCH 62/62] Fix PR comments v2 :) --- packages/web3-utils/README.md | 3 +- ...i-to-hex-tests.ts => ascii-to-hex-test.ts} | 11 +++---- ...s-to-hex-tests.ts => bytes-to-hex-test.ts} | 11 +++---- ...ests.ts => check-address-checksum-test.ts} | 11 +++---- ...from-ascii-tests.ts => from-ascii-test.ts} | 11 +++---- ...-decimal-tests.ts => from-decimal-test.ts} | 14 ++++---- .../{from-utf8-tests.ts => from-utf8-test.ts} | 11 +++---- .../{from-wei-tests.ts => from-wei-test.ts} | 12 ++++--- ...-value-tests.ts => get-unit-value-test.ts} | 11 +++---- ...to-ascii-tests.ts => hex-to-ascii-test.ts} | 11 +++---- ...to-bytes-tests.ts => hex-to-bytes-test.ts} | 14 ++++---- ...-tests.ts => hex-to-number-string-test.ts} | 14 ++++---- ...-number-tests.ts => hex-to-number-test.ts} | 14 ++++---- ...-string-tests.ts => hex-to-string-test.ts} | 14 ++++---- ...x-to-utf8-tests.ts => hex-to-utf8-test.ts} | 11 +++---- ...is-address-tests.ts => is-address-test.ts} | 9 ++--- ...-number-tests.ts => is-big-number-test.ts} | 9 +++-- .../{is-bloom-tests.ts => is-bloom-test.ts} | 9 +++-- .../tests/{is-bn-tests.ts => is-bn-test.ts} | 14 ++++---- ...-strict-tests.ts => is-hex-strict-test.ts} | 14 ++++---- .../tests/{is-hex-tests.ts => is-hex-test.ts} | 14 ++++---- .../{is-topic-tests.ts => is-topic-test.ts} | 11 +++---- ...> json-interface-method-to-string-test.ts} | 8 ++--- .../{keccak256-tests.ts => keccak256-test.ts} | 12 +++---- .../{left-pad-tests.ts => left-pad-test.ts} | 14 ++++---- ...-to-hex-tests.ts => number-to-hex-test.ts} | 15 +++++---- .../{pad-left-tests.ts => pad-left-test.ts} | 13 +++++--- .../{pad-right-tests.ts => pad-right-test.ts} | 13 +++++--- ...random-hex-tests.ts => random-hex-test.ts} | 11 +++---- .../{right-pad-tests.ts => right-pad-test.ts} | 15 +++++---- .../tests/{sha3-tests.ts => sha3-test.ts} | 12 +++---- ...ty-sha3-tests.ts => solidity-sha3-test.ts} | 33 +++++++++++-------- ...-to-hex-tests.ts => string-to-hex-test.ts} | 11 +++---- ...-address-tests.ts => test-address-test.ts} | 7 ++-- ...test-topic-tests.ts => test-topic-test.ts} | 7 ++-- .../{to-ascii-tests.ts => to-ascii-test.ts} | 9 +++-- .../tests/{to-bn-tests.ts => to-bn-test.ts} | 10 +++--- ...-tests.ts => to-check-sum-address-test.ts} | 11 +++---- ...to-decimal-tests.ts => to-decimal-test.ts} | 14 ++++---- .../tests/{to-hex-tests.ts => to-hex-test.ts} | 15 +++++---- ...ent-tests.ts => to-twos-compement-test.ts} | 17 +++++----- .../{to-utf8-tests.ts => to-utf8-test.ts} | 11 +++---- .../tests/{to-wei-tests.ts => to-wei-test.ts} | 22 ++++++++----- .../{unit-map-tests.ts => unit-map-test.ts} | 7 ++-- ...f8-to-hex-tests.ts => utf8-to-hex-test.ts} | 11 +++---- packages/web3-utils/types/tslint.json | 3 +- 46 files changed, 284 insertions(+), 270 deletions(-) rename packages/web3-utils/types/tests/{ascii-to-hex-tests.ts => ascii-to-hex-test.ts} (85%) rename packages/web3-utils/types/tests/{bytes-to-hex-tests.ts => bytes-to-hex-test.ts} (86%) rename packages/web3-utils/types/tests/{check-address-checksum-tests.ts => check-address-checksum-test.ts} (84%) rename packages/web3-utils/types/tests/{from-ascii-tests.ts => from-ascii-test.ts} (85%) rename packages/web3-utils/types/tests/{from-decimal-tests.ts => from-decimal-test.ts} (82%) rename packages/web3-utils/types/tests/{from-utf8-tests.ts => from-utf8-test.ts} (85%) rename packages/web3-utils/types/tests/{from-wei-tests.ts => from-wei-test.ts} (83%) rename packages/web3-utils/types/tests/{get-unit-value-tests.ts => get-unit-value-test.ts} (85%) rename packages/web3-utils/types/tests/{hex-to-ascii-tests.ts => hex-to-ascii-test.ts} (84%) rename packages/web3-utils/types/tests/{hex-to-bytes-tests.ts => hex-to-bytes-test.ts} (81%) rename packages/web3-utils/types/tests/{hex-to-number-string-tests.ts => hex-to-number-string-test.ts} (80%) rename packages/web3-utils/types/tests/{hex-to-number-tests.ts => hex-to-number-test.ts} (82%) rename packages/web3-utils/types/tests/{hex-to-string-tests.ts => hex-to-string-test.ts} (79%) rename packages/web3-utils/types/tests/{hex-to-utf8-tests.ts => hex-to-utf8-test.ts} (84%) rename packages/web3-utils/types/tests/{is-address-tests.ts => is-address-test.ts} (89%) rename packages/web3-utils/types/tests/{is-big-number-tests.ts => is-big-number-test.ts} (87%) rename packages/web3-utils/types/tests/{is-bloom-tests.ts => is-bloom-test.ts} (89%) rename packages/web3-utils/types/tests/{is-bn-tests.ts => is-bn-test.ts} (84%) rename packages/web3-utils/types/tests/{is-hex-strict-tests.ts => is-hex-strict-test.ts} (82%) rename packages/web3-utils/types/tests/{is-hex-tests.ts => is-hex-test.ts} (83%) rename packages/web3-utils/types/tests/{is-topic-tests.ts => is-topic-test.ts} (87%) rename packages/web3-utils/types/tests/{json-interface-method-to-string-tests.ts => json-interface-method-to-string-test.ts} (88%) rename packages/web3-utils/types/tests/{keccak256-tests.ts => keccak256-test.ts} (84%) rename packages/web3-utils/types/tests/{left-pad-tests.ts => left-pad-test.ts} (88%) rename packages/web3-utils/types/tests/{number-to-hex-tests.ts => number-to-hex-test.ts} (81%) rename packages/web3-utils/types/tests/{pad-left-tests.ts => pad-left-test.ts} (88%) rename packages/web3-utils/types/tests/{pad-right-tests.ts => pad-right-test.ts} (88%) rename packages/web3-utils/types/tests/{random-hex-tests.ts => random-hex-test.ts} (86%) rename packages/web3-utils/types/tests/{right-pad-tests.ts => right-pad-test.ts} (87%) rename packages/web3-utils/types/tests/{sha3-tests.ts => sha3-test.ts} (85%) rename packages/web3-utils/types/tests/{solidity-sha3-tests.ts => solidity-sha3-test.ts} (63%) rename packages/web3-utils/types/tests/{string-to-hex-tests.ts => string-to-hex-test.ts} (85%) rename packages/web3-utils/types/tests/{test-address-tests.ts => test-address-test.ts} (95%) rename packages/web3-utils/types/tests/{test-topic-tests.ts => test-topic-test.ts} (95%) rename packages/web3-utils/types/tests/{to-ascii-tests.ts => to-ascii-test.ts} (87%) rename packages/web3-utils/types/tests/{to-bn-tests.ts => to-bn-test.ts} (89%) rename packages/web3-utils/types/tests/{to-check-sum-address-tests.ts => to-check-sum-address-test.ts} (85%) rename packages/web3-utils/types/tests/{to-decimal-tests.ts => to-decimal-test.ts} (83%) rename packages/web3-utils/types/tests/{to-hex-tests.ts => to-hex-test.ts} (82%) rename packages/web3-utils/types/tests/{to-twos-compement-tests.ts => to-twos-compement-test.ts} (78%) rename packages/web3-utils/types/tests/{to-utf8-tests.ts => to-utf8-test.ts} (84%) rename packages/web3-utils/types/tests/{to-wei-tests.ts => to-wei-test.ts} (75%) rename packages/web3-utils/types/tests/{unit-map-tests.ts => unit-map-test.ts} (88%) rename packages/web3-utils/types/tests/{utf8-to-hex-tests.ts => utf8-to-hex-test.ts} (85%) diff --git a/packages/web3-utils/README.md b/packages/web3-utils/README.md index 21ef44390fa..43d008bc197 100644 --- a/packages/web3-utils/README.md +++ b/packages/web3-utils/README.md @@ -52,8 +52,7 @@ console.log(asciiToHex('I have 100!')); ## Types -If you are using TypeScript then all types are defined within the package itself so no need -to install any `@types` libraries. Just import the library and the types should be exposed. +If you are using TypeScript all the types are defined in the `index.d.ts` file [docs]: http://web3js.readthedocs.io/en/1.0/ diff --git a/packages/web3-utils/types/tests/ascii-to-hex-tests.ts b/packages/web3-utils/types/tests/ascii-to-hex-test.ts similarity index 85% rename from packages/web3-utils/types/tests/ascii-to-hex-tests.ts rename to packages/web3-utils/types/tests/ascii-to-hex-test.ts index aaab0b00f2e..f15835302cb 100644 --- a/packages/web3-utils/types/tests/ascii-to-hex-tests.ts +++ b/packages/web3-utils/types/tests/ascii-to-hex-test.ts @@ -12,21 +12,20 @@ along with web3.js. If not, see . */ /** - * @file ascii-to-hex-tests.ts + * @file ascii-to-hex-test.ts * @author Josh Stevens * @date 2018 */ -import { asciiToHex, BN } from 'web3-utils'; +import {asciiToHex, BN} from 'web3-utils'; -const bigNumber = new BN(3); - -asciiToHex('I have 100!'); // $ExpectType string +// $ExpectType string +asciiToHex('I have 100!'); // $ExpectError asciiToHex(345); // $ExpectError -asciiToHex(bigNumber); +asciiToHex(new BN(3)); // $ExpectError asciiToHex({}); // $ExpectError diff --git a/packages/web3-utils/types/tests/bytes-to-hex-tests.ts b/packages/web3-utils/types/tests/bytes-to-hex-test.ts similarity index 86% rename from packages/web3-utils/types/tests/bytes-to-hex-tests.ts rename to packages/web3-utils/types/tests/bytes-to-hex-test.ts index 42e67deb4b0..0345582feeb 100644 --- a/packages/web3-utils/types/tests/bytes-to-hex-tests.ts +++ b/packages/web3-utils/types/tests/bytes-to-hex-test.ts @@ -12,23 +12,22 @@ along with web3.js. If not, see . */ /** - * @file bytes-to-hex-tests.ts + * @file bytes-to-hex-test.ts * @author Josh Stevens * @date 2018 */ -import { BN, bytesToHex } from 'web3-utils'; +import {BN, bytesToHex} from 'web3-utils'; -const bigNumber = new BN(3); - -bytesToHex([72]); // $ExpectType string +// $ExpectType string +bytesToHex([72]); // $ExpectError bytesToHex(['string']); // $ExpectError bytesToHex(345); // $ExpectError -bytesToHex(bigNumber); +bytesToHex(new BN(3)); // $ExpectError bytesToHex({}); // $ExpectError diff --git a/packages/web3-utils/types/tests/check-address-checksum-tests.ts b/packages/web3-utils/types/tests/check-address-checksum-test.ts similarity index 84% rename from packages/web3-utils/types/tests/check-address-checksum-tests.ts rename to packages/web3-utils/types/tests/check-address-checksum-test.ts index f12c3f87d76..508fe76d459 100644 --- a/packages/web3-utils/types/tests/check-address-checksum-tests.ts +++ b/packages/web3-utils/types/tests/check-address-checksum-test.ts @@ -12,16 +12,15 @@ along with web3.js. If not, see . */ /** - * @file check-address-checksum-tests.ts + * @file check-address-checksum-test.ts * @author Josh Stevens * @date 2018 */ -import { BN, checkAddressChecksum } from 'web3-utils'; +import {BN, checkAddressChecksum} from 'web3-utils'; -const bigNumber = new BN(3); - -checkAddressChecksum('0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); // $ExpectType boolean +// $ExpectType boolean +checkAddressChecksum('0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); // $ExpectError checkAddressChecksum([4]); @@ -30,7 +29,7 @@ checkAddressChecksum(['string']); // $ExpectError checkAddressChecksum(345); // $ExpectError -checkAddressChecksum(bigNumber); +checkAddressChecksum(new BN(3)); // $ExpectError checkAddressChecksum({}); // $ExpectError diff --git a/packages/web3-utils/types/tests/from-ascii-tests.ts b/packages/web3-utils/types/tests/from-ascii-test.ts similarity index 85% rename from packages/web3-utils/types/tests/from-ascii-tests.ts rename to packages/web3-utils/types/tests/from-ascii-test.ts index 935ba484933..cafb002995c 100644 --- a/packages/web3-utils/types/tests/from-ascii-tests.ts +++ b/packages/web3-utils/types/tests/from-ascii-test.ts @@ -12,21 +12,20 @@ along with web3.js. If not, see . */ /** - * @file from-ascii-tests.ts + * @file from-ascii-test.ts * @author Josh Stevens * @date 2018 */ -import { BN, fromAscii } from 'web3-utils'; +import {BN, fromAscii} from 'web3-utils'; -const bigNumber = new BN(3); - -fromAscii('I have 100!'); // $ExpectType string +// $ExpectType string +fromAscii('I have 100!'); // $ExpectError fromAscii(345); // $ExpectError -fromAscii(bigNumber); +fromAscii(new BN(3)); // $ExpectError fromAscii({}); // $ExpectError diff --git a/packages/web3-utils/types/tests/from-decimal-tests.ts b/packages/web3-utils/types/tests/from-decimal-test.ts similarity index 82% rename from packages/web3-utils/types/tests/from-decimal-tests.ts rename to packages/web3-utils/types/tests/from-decimal-test.ts index a196ddf3723..ffc97624a6a 100644 --- a/packages/web3-utils/types/tests/from-decimal-tests.ts +++ b/packages/web3-utils/types/tests/from-decimal-test.ts @@ -12,20 +12,20 @@ along with web3.js. If not, see . */ /** - * @file from-decimal-tests.ts + * @file from-decimal-test.ts * @author Josh Stevens * @date 2018 */ -import { BN, fromDecimal } from 'web3-utils'; +import {BN, fromDecimal} from 'web3-utils'; -const bigNumber = new BN(3); - -fromDecimal('232'); // $ExpectType string -fromDecimal(232); // $ExpectType string +// $ExpectType string +fromDecimal('232'); +// $ExpectType string +fromDecimal(232); // $ExpectError -fromDecimal(bigNumber); +fromDecimal(new BN(3)); // $ExpectError fromDecimal(['string']); // $ExpectError diff --git a/packages/web3-utils/types/tests/from-utf8-tests.ts b/packages/web3-utils/types/tests/from-utf8-test.ts similarity index 85% rename from packages/web3-utils/types/tests/from-utf8-tests.ts rename to packages/web3-utils/types/tests/from-utf8-test.ts index adcaafe9c75..05b62919667 100644 --- a/packages/web3-utils/types/tests/from-utf8-tests.ts +++ b/packages/web3-utils/types/tests/from-utf8-test.ts @@ -12,21 +12,20 @@ along with web3.js. If not, see . */ /** - * @file from-utf8-tests.ts + * @file from-utf8-test.ts * @author Josh Stevens * @date 2018 */ -import { BN, fromUtf8 } from 'web3-utils'; +import {BN, fromUtf8} from 'web3-utils'; -const bigNumber = new BN(3); - -fromUtf8('I have 100£'); // $ExpectType string +// $ExpectType string +fromUtf8('I have 100£'); // $ExpectError fromUtf8(232); // $ExpectError -fromUtf8(bigNumber); +fromUtf8(new BN(3)); // $ExpectError fromUtf8(['string']); // $ExpectError diff --git a/packages/web3-utils/types/tests/from-wei-tests.ts b/packages/web3-utils/types/tests/from-wei-test.ts similarity index 83% rename from packages/web3-utils/types/tests/from-wei-tests.ts rename to packages/web3-utils/types/tests/from-wei-test.ts index a895d17b81e..c97c1bce4d8 100644 --- a/packages/web3-utils/types/tests/from-wei-tests.ts +++ b/packages/web3-utils/types/tests/from-wei-test.ts @@ -12,17 +12,19 @@ along with web3.js. If not, see . */ /** - * @file from-wei-tests.ts + * @file from-wei-test.ts * @author Josh Stevens * @date 2018 */ -import { BN, fromWei } from 'web3-utils'; +import {BN, fromWei} from 'web3-utils'; const bigNumber = new BN(3); -fromWei(bigNumber); // $ExpectType string | BN -fromWei(bigNumber, 'ether'); // $ExpectType string | BN +// $ExpectType string | BN +fromWei(bigNumber); +// $ExpectType string | BN +fromWei(bigNumber, 'ether'); // $ExpectError fromWei(232); @@ -39,4 +41,4 @@ fromWei(null); // $ExpectError fromWei(undefined); // $ExpectError -fromWei(bigNumber, 'blah'); +fromWei(new BN(3), 'blah'); diff --git a/packages/web3-utils/types/tests/get-unit-value-tests.ts b/packages/web3-utils/types/tests/get-unit-value-test.ts similarity index 85% rename from packages/web3-utils/types/tests/get-unit-value-tests.ts rename to packages/web3-utils/types/tests/get-unit-value-test.ts index a3c78e6e393..4daafdf417b 100644 --- a/packages/web3-utils/types/tests/get-unit-value-tests.ts +++ b/packages/web3-utils/types/tests/get-unit-value-test.ts @@ -12,23 +12,22 @@ along with web3.js. If not, see . */ /** - * @file get-unit-value-tests.ts + * @file get-unit-value-test.ts * @author Josh Stevens * @date 2018 */ -import { BN, getUnitValue } from 'web3-utils'; +import {BN, getUnitValue} from 'web3-utils'; -const bigNumber = new BN(3); - -getUnitValue('ether'); // $ExpectType string +// $ExpectType string +getUnitValue('ether'); // $ExpectError getUnitValue('fake'); // $ExpectError getUnitValue(656); // $ExpectError -getUnitValue(bigNumber); +getUnitValue(new BN(3)); // $ExpectError getUnitValue(['string']); // $ExpectError diff --git a/packages/web3-utils/types/tests/hex-to-ascii-tests.ts b/packages/web3-utils/types/tests/hex-to-ascii-test.ts similarity index 84% rename from packages/web3-utils/types/tests/hex-to-ascii-tests.ts rename to packages/web3-utils/types/tests/hex-to-ascii-test.ts index 829e72b4e71..a5ee24b8bd4 100644 --- a/packages/web3-utils/types/tests/hex-to-ascii-tests.ts +++ b/packages/web3-utils/types/tests/hex-to-ascii-test.ts @@ -12,21 +12,20 @@ along with web3.js. If not, see . */ /** - * @file hex-to-ascii-tests.ts + * @file hex-to-ascii-test.ts * @author Josh Stevens * @date 2018 */ -import { BN, hexToAscii } from 'web3-utils'; +import {BN, hexToAscii} from 'web3-utils'; -const bigNumber = new BN(3); - -hexToAscii('0x4920686176652031303021'); // $ExpectType string +// $ExpectType string +hexToAscii('0x4920686176652031303021'); // $ExpectError hexToAscii(345); // $ExpectError -hexToAscii(bigNumber); +hexToAscii(new BN(3)); // $ExpectError hexToAscii({}); // $ExpectError diff --git a/packages/web3-utils/types/tests/hex-to-bytes-tests.ts b/packages/web3-utils/types/tests/hex-to-bytes-test.ts similarity index 81% rename from packages/web3-utils/types/tests/hex-to-bytes-tests.ts rename to packages/web3-utils/types/tests/hex-to-bytes-test.ts index 64479d6e6db..f0a9049ed0a 100644 --- a/packages/web3-utils/types/tests/hex-to-bytes-tests.ts +++ b/packages/web3-utils/types/tests/hex-to-bytes-test.ts @@ -12,24 +12,24 @@ along with web3.js. If not, see . */ /** - * @file hex-to-bytes-tests.ts + * @file hex-to-bytes-test.ts * @author Josh Stevens * @date 2018 */ -import { BN, hexToBytes } from 'web3-utils'; +import {BN, hexToBytes} from 'web3-utils'; -const bigNumber = new BN(3); - -hexToBytes('0x000000ea'); // $ExpectType number[] -hexToBytes(0x000000ea); // $ExpectType number[] +// $ExpectType number[] +hexToBytes('0x000000ea'); +// $ExpectType number[] +hexToBytes(0x000000ea); // $ExpectError hexToBytes([4]); // $ExpectError hexToBytes(['string']); // $ExpectError -hexToBytes(bigNumber); +hexToBytes(new BN(3)); // $ExpectError hexToBytes({}); // $ExpectError diff --git a/packages/web3-utils/types/tests/hex-to-number-string-tests.ts b/packages/web3-utils/types/tests/hex-to-number-string-test.ts similarity index 80% rename from packages/web3-utils/types/tests/hex-to-number-string-tests.ts rename to packages/web3-utils/types/tests/hex-to-number-string-test.ts index 51a30c853ed..9ecd6783b36 100644 --- a/packages/web3-utils/types/tests/hex-to-number-string-tests.ts +++ b/packages/web3-utils/types/tests/hex-to-number-string-test.ts @@ -12,20 +12,20 @@ along with web3.js. If not, see . */ /** - * @file hex-to-number-string-tests.ts + * @file hex-to-number-string-test.ts * @author Josh Stevens * @date 2018 */ -import { BN, hexToNumberString } from 'web3-utils'; +import {BN, hexToNumberString} from 'web3-utils'; -const bigNumber = new BN(3); - -hexToNumberString('0xea'); // $ExpectType string -hexToNumberString(0xea); // $ExpectType string +// $ExpectType string +hexToNumberString('0xea'); +// $ExpectType string +hexToNumberString(0xea); // $ExpectError -hexToNumberString(bigNumber); +hexToNumberString(new BN(3); // $ExpectError hexToNumberString(['string']); // $ExpectError diff --git a/packages/web3-utils/types/tests/hex-to-number-tests.ts b/packages/web3-utils/types/tests/hex-to-number-test.ts similarity index 82% rename from packages/web3-utils/types/tests/hex-to-number-tests.ts rename to packages/web3-utils/types/tests/hex-to-number-test.ts index d854074d736..f273154a131 100644 --- a/packages/web3-utils/types/tests/hex-to-number-tests.ts +++ b/packages/web3-utils/types/tests/hex-to-number-test.ts @@ -12,20 +12,20 @@ along with web3.js. If not, see . */ /** - * @file hex-to-number-tests.ts + * @file hex-to-number-test.ts * @author Josh Stevens * @date 2018 */ -import { BN, hexToNumber } from 'web3-utils'; +import {BN, hexToNumber} from 'web3-utils'; -const bigNumber = new BN(3); - -hexToNumber('232'); // $ExpectType number -hexToNumber(232); // $ExpectType number +// $ExpectType number +hexToNumber('232'); +// $ExpectType number +hexToNumber(232); // $ExpectError -hexToNumber(bigNumber); +hexToNumber(new BN(3)); // $ExpectError hexToNumber(['string']); // $ExpectError diff --git a/packages/web3-utils/types/tests/hex-to-string-tests.ts b/packages/web3-utils/types/tests/hex-to-string-test.ts similarity index 79% rename from packages/web3-utils/types/tests/hex-to-string-tests.ts rename to packages/web3-utils/types/tests/hex-to-string-test.ts index 5c31d38d442..51be275a99a 100644 --- a/packages/web3-utils/types/tests/hex-to-string-tests.ts +++ b/packages/web3-utils/types/tests/hex-to-string-test.ts @@ -12,20 +12,20 @@ along with web3.js. If not, see . */ /** - * @file hex-to-string-tests.ts + * @file hex-to-string-test.ts * @author Josh Stevens * @date 2018 */ -import { BN, hexToString } from 'web3-utils'; +import {BN, hexToString} from 'web3-utils'; -const bigNumber = new BN(3); - -hexToString('0x49206861766520313030e282ac'); // $ExpectType string -hexToString(0x49206861766520313030e282ac); // $ExpectType string +// $ExpectType string +hexToString('0x49206861766520313030e282ac'); +// $ExpectType string +hexToString(0x49206861766520313030e282ac); // $ExpectError -hexToString(bigNumber); +hexToString(new BN(3)); // $ExpectError hexToString(['string']); // $ExpectError diff --git a/packages/web3-utils/types/tests/hex-to-utf8-tests.ts b/packages/web3-utils/types/tests/hex-to-utf8-test.ts similarity index 84% rename from packages/web3-utils/types/tests/hex-to-utf8-tests.ts rename to packages/web3-utils/types/tests/hex-to-utf8-test.ts index 0b58aa89822..ecb18729583 100644 --- a/packages/web3-utils/types/tests/hex-to-utf8-tests.ts +++ b/packages/web3-utils/types/tests/hex-to-utf8-test.ts @@ -12,21 +12,20 @@ along with web3.js. If not, see . */ /** - * @file hex-to-utf8-tests.ts + * @file hex-to-utf8-test.ts * @author Josh Stevens * @date 2018 */ -import { BN, hexToUtf8 } from 'web3-utils'; +import {BN, hexToUtf8} from 'web3-utils'; -const bigNumber = new BN(3); - -hexToUtf8('0x49206861766520313030e282ac'); // $ExpectType string +// $ExpectType string +hexToUtf8('0x49206861766520313030e282ac'); // $ExpectError hexToUtf8(656); // $ExpectError -hexToUtf8(bigNumber); +hexToUtf8(new BN(3)); // $ExpectError hexToUtf8(['string']); // $ExpectError diff --git a/packages/web3-utils/types/tests/is-address-tests.ts b/packages/web3-utils/types/tests/is-address-test.ts similarity index 89% rename from packages/web3-utils/types/tests/is-address-tests.ts rename to packages/web3-utils/types/tests/is-address-test.ts index bb0e84f9160..fa32dc9ab07 100644 --- a/packages/web3-utils/types/tests/is-address-tests.ts +++ b/packages/web3-utils/types/tests/is-address-test.ts @@ -12,19 +12,20 @@ along with web3.js. If not, see . */ /** - * @file is-address-tests.ts + * @file is-address-test.ts * @author Josh Stevens * @date 2018 */ -import { isAddress } from 'web3-utils'; +import {BN, isAddress} from 'web3-utils'; -isAddress('0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); // $ExpectType boolean +// $ExpectType boolean +isAddress('0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); // $ExpectError isAddress(4); // $ExpectError -isAddress(bigNumber); +isAddress(new BN(3)); // $ExpectError isAddress({}); // $ExpectError diff --git a/packages/web3-utils/types/tests/is-big-number-tests.ts b/packages/web3-utils/types/tests/is-big-number-test.ts similarity index 87% rename from packages/web3-utils/types/tests/is-big-number-tests.ts rename to packages/web3-utils/types/tests/is-big-number-test.ts index 7ad3eb2415c..e31fc5099c8 100644 --- a/packages/web3-utils/types/tests/is-big-number-tests.ts +++ b/packages/web3-utils/types/tests/is-big-number-test.ts @@ -12,16 +12,15 @@ along with web3.js. If not, see . */ /** - * @file is-big-number-tests.ts + * @file is-big-number-test.ts * @author Josh Stevens * @date 2018 */ -import { isBigNumber, BN } from 'web3-utils'; +import {isBigNumber, BN} from 'web3-utils'; -const bigNumber = new BN(3); - -isBigNumber(bigNumber); // $ExpectType boolean +// $ExpectType boolean +isBigNumber(new BN(3)); // $ExpectError isBigNumber(7); diff --git a/packages/web3-utils/types/tests/is-bloom-tests.ts b/packages/web3-utils/types/tests/is-bloom-test.ts similarity index 89% rename from packages/web3-utils/types/tests/is-bloom-tests.ts rename to packages/web3-utils/types/tests/is-bloom-test.ts index 67b40d47c42..a04a9dd20cd 100644 --- a/packages/web3-utils/types/tests/is-bloom-tests.ts +++ b/packages/web3-utils/types/tests/is-bloom-test.ts @@ -17,16 +17,15 @@ * @date 2018 */ -import { BN, isBloom } from 'web3-utils'; +import {BN, isBloom} from 'web3-utils'; -const bigNumber = new BN(3); - -isBloom('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef'); // $ExpectType boolean +// $ExpectType boolean +isBloom('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef'); // $ExpectError isBloom(656); // $ExpectError -isBloom(bigNumber); +isBloom(new BN(3)); // $ExpectError isBloom(['string']); // $ExpectError diff --git a/packages/web3-utils/types/tests/is-bn-tests.ts b/packages/web3-utils/types/tests/is-bn-test.ts similarity index 84% rename from packages/web3-utils/types/tests/is-bn-tests.ts rename to packages/web3-utils/types/tests/is-bn-test.ts index 690c3f3edb5..dd265bd8ef0 100644 --- a/packages/web3-utils/types/tests/is-bn-tests.ts +++ b/packages/web3-utils/types/tests/is-bn-test.ts @@ -12,24 +12,24 @@ along with web3.js. If not, see . */ /** - * @file is-bn-tests.ts + * @file is-bn-test.ts * @author Josh Stevens * @date 2018 */ -import { isBN, BN } from 'web3-utils'; +import {isBN, BN} from 'web3-utils'; -const bigNumber = new BN(3); - -isBN(7); // $ExpectType boolean -isBN('4325'); // $ExpectType boolean +// $ExpectType boolean +isBN(7); +// $ExpectType boolean +isBN('4325'); // $ExpectError isBN({}); // $ExpectError isBN(true); // $ExpectError -isBN(bigNumber); +isBN(new BN(3)); // $ExpectError isBN(['string']); // $ExpectError diff --git a/packages/web3-utils/types/tests/is-hex-strict-tests.ts b/packages/web3-utils/types/tests/is-hex-strict-test.ts similarity index 82% rename from packages/web3-utils/types/tests/is-hex-strict-tests.ts rename to packages/web3-utils/types/tests/is-hex-strict-test.ts index 1ee311c0712..e7b7f525906 100644 --- a/packages/web3-utils/types/tests/is-hex-strict-tests.ts +++ b/packages/web3-utils/types/tests/is-hex-strict-test.ts @@ -12,20 +12,20 @@ along with web3.js. If not, see . */ /** - * @file is-hex-strict-tests.ts + * @file is-hex-strict-test.ts * @author Josh Stevens * @date 2018 */ -import { BN, isHexStrict } from 'web3-utils'; +import {BN, isHexStrict} from 'web3-utils'; -const bigNumber = new BN(3); - -isHexStrict('0xc1912'); // $ExpectType boolean -isHexStrict(345) // $ExpectType boolean +// $ExpectType boolean +isHexStrict('0xc1912'); +// $ExpectType boolean +isHexStrict(345); // $ExpectError -isHexStrict(bigNumber); +isHexStrict(new BN(3)); // $ExpectError isHexStrict({}); // $ExpectError diff --git a/packages/web3-utils/types/tests/is-hex-tests.ts b/packages/web3-utils/types/tests/is-hex-test.ts similarity index 83% rename from packages/web3-utils/types/tests/is-hex-tests.ts rename to packages/web3-utils/types/tests/is-hex-test.ts index f0d71a050b6..14acc7194d8 100644 --- a/packages/web3-utils/types/tests/is-hex-tests.ts +++ b/packages/web3-utils/types/tests/is-hex-test.ts @@ -12,20 +12,20 @@ along with web3.js. If not, see . */ /** - * @file is-hex-tests.ts + * @file is-hex-test.ts * @author Josh Stevens * @date 2018 */ -import { BN, isHex } from 'web3-utils'; +import {BN, isHex} from 'web3-utils'; -const bigNumber = new BN(3); - -isHex('0xc1912'); // $ExpectType boolean -isHex(345) // $ExpectType boolean +// $ExpectType boolean +isHex('0xc1912'); +// $ExpectType boolean +isHex(345); // $ExpectError -isHex(bigNumber); +isHex(new BN(3)); // $ExpectError isHex({}); // $ExpectError diff --git a/packages/web3-utils/types/tests/is-topic-tests.ts b/packages/web3-utils/types/tests/is-topic-test.ts similarity index 87% rename from packages/web3-utils/types/tests/is-topic-tests.ts rename to packages/web3-utils/types/tests/is-topic-test.ts index 010cf48287b..09644f35c37 100644 --- a/packages/web3-utils/types/tests/is-topic-tests.ts +++ b/packages/web3-utils/types/tests/is-topic-test.ts @@ -12,21 +12,20 @@ along with web3.js. If not, see . */ /** - * @file is-topic-tests.ts + * @file is-topic-test.ts * @author Josh Stevens * @date 2018 */ -import { BN, isTopic } from 'web3-utils'; +import {BN, isTopic} from 'web3-utils'; -const bigNumber = new BN(3); - -isTopic('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef'); // $ExpectType boolean +// $ExpectType boolean +isTopic('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef'); // $ExpectError isTopic(656); // $ExpectError -isTopic(bigNumber); +isTopic(new BN(3)); // $ExpectError isTopic(['string']); // $ExpectError diff --git a/packages/web3-utils/types/tests/json-interface-method-to-string-tests.ts b/packages/web3-utils/types/tests/json-interface-method-to-string-test.ts similarity index 88% rename from packages/web3-utils/types/tests/json-interface-method-to-string-tests.ts rename to packages/web3-utils/types/tests/json-interface-method-to-string-test.ts index 8a40649d778..2c8a771354d 100644 --- a/packages/web3-utils/types/tests/json-interface-method-to-string-tests.ts +++ b/packages/web3-utils/types/tests/json-interface-method-to-string-test.ts @@ -12,12 +12,12 @@ along with web3.js. If not, see . */ /** - * @file json-interface-method-to-string-tests.ts + * @file json-interface-method-to-string-test.ts * @author Josh Stevens * @date 2018 */ -import { jsonInterfaceMethodToString, ABIItem } from 'web3-utils'; +import {jsonInterfaceMethodToString, ABIItem} from 'web3-utils'; const abiItem: ABIItem = { constant: true, @@ -38,8 +38,8 @@ const abiItem: ABIItem = { stateMutability: "pure", type: "function" }; - -jsonInterfaceMethodToString(abiItem); // $ExpectType string +// $ExpectType string +jsonInterfaceMethodToString(abiItem); // $ExpectError jsonInterfaceMethodToString(['string']); diff --git a/packages/web3-utils/types/tests/keccak256-tests.ts b/packages/web3-utils/types/tests/keccak256-test.ts similarity index 84% rename from packages/web3-utils/types/tests/keccak256-tests.ts rename to packages/web3-utils/types/tests/keccak256-test.ts index 9c19bf96a1a..c04fc1ae4f2 100644 --- a/packages/web3-utils/types/tests/keccak256-tests.ts +++ b/packages/web3-utils/types/tests/keccak256-test.ts @@ -12,17 +12,17 @@ along with web3.js. If not, see . */ /** - * @file keccak256-tests.ts + * @file keccak256-test.ts * @author Josh Stevens * @date 2018 */ -import { BN, keccak256 } from 'web3-utils'; +import {BN, keccak256} from 'web3-utils'; -const bigNumber = new BN(3); - -keccak256('234'); // $ExpectType string -keccak256(bigNumber); // $ExpectType string +// $ExpectType string +keccak256('234'); +// $ExpectType string +keccak256(new BN(3)); // $ExpectError keccak256(['string']); diff --git a/packages/web3-utils/types/tests/left-pad-tests.ts b/packages/web3-utils/types/tests/left-pad-test.ts similarity index 88% rename from packages/web3-utils/types/tests/left-pad-tests.ts rename to packages/web3-utils/types/tests/left-pad-test.ts index 402e4d09c7c..f38f18eecd4 100644 --- a/packages/web3-utils/types/tests/left-pad-tests.ts +++ b/packages/web3-utils/types/tests/left-pad-test.ts @@ -12,18 +12,20 @@ along with web3.js. If not, see . */ /** - * @file left-pad-tests.ts + * @file left-pad-test.ts * @author Josh Stevens * @date 2018 */ -import { BN, leftPad } from 'web3-utils'; +import {BN, leftPad} from 'web3-utils'; const bigNumber = new BN(3); - -leftPad('0x3456ff', 20); // $ExpectType string -leftPad(0x3456ff, 20); // $ExpectType string -leftPad('Hello', 20, 'x'); // $ExpectType string +// $ExpectType string +leftPad('0x3456ff', 20); +// $ExpectType string +leftPad(0x3456ff, 20); +// $ExpectType string +leftPad('Hello', 20, 'x'); // $ExpectError leftPad(bigNumber, 20); diff --git a/packages/web3-utils/types/tests/number-to-hex-tests.ts b/packages/web3-utils/types/tests/number-to-hex-test.ts similarity index 81% rename from packages/web3-utils/types/tests/number-to-hex-tests.ts rename to packages/web3-utils/types/tests/number-to-hex-test.ts index af2e255cdfc..afcbf62aa11 100644 --- a/packages/web3-utils/types/tests/number-to-hex-tests.ts +++ b/packages/web3-utils/types/tests/number-to-hex-test.ts @@ -12,18 +12,19 @@ along with web3.js. If not, see . */ /** - * @file number-to-hex-tests.ts + * @file number-to-hex-test.ts * @author Josh Stevens * @date 2018 */ -import { BN, numberToHex } from 'web3-utils'; +import {BN, numberToHex} from 'web3-utils'; -const bigNumber = new BN(3); - -numberToHex('232'); // $ExpectType string -numberToHex(232); // $ExpectType string -numberToHex(bigNumber); // $ExpectType string +// $ExpectType string +numberToHex('232'); +// $ExpectType string +numberToHex(232); +// $ExpectType string +numberToHex(new BN(3)); // $ExpectError numberToHex(['72']); diff --git a/packages/web3-utils/types/tests/pad-left-tests.ts b/packages/web3-utils/types/tests/pad-left-test.ts similarity index 88% rename from packages/web3-utils/types/tests/pad-left-tests.ts rename to packages/web3-utils/types/tests/pad-left-test.ts index 849ea56a11f..6300b3ecb27 100644 --- a/packages/web3-utils/types/tests/pad-left-tests.ts +++ b/packages/web3-utils/types/tests/pad-left-test.ts @@ -12,18 +12,21 @@ along with web3.js. If not, see . */ /** - * @file pad-left-tests.ts + * @file pad-left-test.ts * @author Josh Stevens * @date 2018 */ -import { BN, padLeft } from 'web3-utils'; +import {BN, padLeft} from 'web3-utils'; const bigNumber = new BN(3); -padLeft('0x3456ff', 20); // $ExpectType string -padLeft(0x3456ff, 20); // $ExpectType string -padLeft('Hello', 20, 'x'); // $ExpectType string +// $ExpectType string +padLeft('0x3456ff', 20); +// $ExpectType string +padLeft(0x3456ff, 20); +// $ExpectType string +padLeft('Hello', 20, 'x'); // $ExpectError padLeft(bigNumber, 20); diff --git a/packages/web3-utils/types/tests/pad-right-tests.ts b/packages/web3-utils/types/tests/pad-right-test.ts similarity index 88% rename from packages/web3-utils/types/tests/pad-right-tests.ts rename to packages/web3-utils/types/tests/pad-right-test.ts index 9c3a71ef3ef..7ec181016f5 100644 --- a/packages/web3-utils/types/tests/pad-right-tests.ts +++ b/packages/web3-utils/types/tests/pad-right-test.ts @@ -12,18 +12,21 @@ along with web3.js. If not, see . */ /** - * @file pad-right-tests.ts + * @file pad-right-test.ts * @author Josh Stevens * @date 2018 */ -import { BN, padRight } from 'web3-utils'; +import {BN, padRight} from 'web3-utils'; const bigNumber = new BN(3); -padRight('0x3456ff', 20); // $ExpectType string -padRight(0x3456ff, 20); // $ExpectType string -padRight('Hello', 20, 'x'); // $ExpectType string +// $ExpectType string +padRight('0x3456ff', 20); +// $ExpectType string +padRight(0x3456ff, 20); +// $ExpectType string +padRight('Hello', 20, 'x'); // $ExpectError padRight(bigNumber, 20); diff --git a/packages/web3-utils/types/tests/random-hex-tests.ts b/packages/web3-utils/types/tests/random-hex-test.ts similarity index 86% rename from packages/web3-utils/types/tests/random-hex-tests.ts rename to packages/web3-utils/types/tests/random-hex-test.ts index 158e6e5eec8..df180c05292 100644 --- a/packages/web3-utils/types/tests/random-hex-tests.ts +++ b/packages/web3-utils/types/tests/random-hex-test.ts @@ -12,21 +12,20 @@ along with web3.js. If not, see . */ /** - * @file random-hex-tests.ts + * @file random-hex-test.ts * @author Josh Stevens * @date 2018 */ -import { BN, randomHex } from 'web3-utils'; +import {BN, randomHex} from 'web3-utils'; -const bigNumber = new BN(3); - -randomHex(32); // $ExpectType string +// $ExpectType string +randomHex(32); // $ExpectError randomHex('234'); // $ExpectError -randomHex(bigNumber); +randomHex(new BN(3)); // $ExpectError randomHex(['string']); // $ExpectError diff --git a/packages/web3-utils/types/tests/right-pad-tests.ts b/packages/web3-utils/types/tests/right-pad-test.ts similarity index 87% rename from packages/web3-utils/types/tests/right-pad-tests.ts rename to packages/web3-utils/types/tests/right-pad-test.ts index 53d1a322ace..42430a0f52f 100644 --- a/packages/web3-utils/types/tests/right-pad-tests.ts +++ b/packages/web3-utils/types/tests/right-pad-test.ts @@ -12,20 +12,21 @@ along with web3.js. If not, see . */ /** - * @file right-pad-tests.ts + * @file right-pad-test.ts * @author Josh Stevens * @date 2018 */ -import { BN, rightPad } from 'web3-utils'; +import {BN, rightPad} from 'web3-utils'; const bigNumber = new BN(3); -// rightPad Tests - -rightPad('0x3456ff', 20); // $ExpectType string -rightPad(0x3456ff, 20); // $ExpectType string -rightPad('Hello', 20, 'x'); // $ExpectType string +// $ExpectType string +rightPad('0x3456ff', 20); +// $ExpectType string +rightPad(0x3456ff, 20); +// $ExpectType string +rightPad('Hello', 20, 'x'); // $ExpectError rightPad(bigNumber, 20); diff --git a/packages/web3-utils/types/tests/sha3-tests.ts b/packages/web3-utils/types/tests/sha3-test.ts similarity index 85% rename from packages/web3-utils/types/tests/sha3-tests.ts rename to packages/web3-utils/types/tests/sha3-test.ts index e7af8b80960..66f40b19f2f 100644 --- a/packages/web3-utils/types/tests/sha3-tests.ts +++ b/packages/web3-utils/types/tests/sha3-test.ts @@ -12,17 +12,17 @@ along with web3.js. If not, see . */ /** - * @file index.d.ts + * @file sha3-tests.ts * @author Josh Stevens * @date 2018 */ -import { BN, sha3 } from 'web3-utils'; +import {BN, sha3} from 'web3-utils'; -const bigNumber = new BN(3); - -sha3('234'); // $ExpectType string -sha3(bigNumber); // $ExpectType string +// $ExpectType string +sha3('234'); +// $ExpectType string +sha3(new BN(3)); // $ExpectError sha3(['string']); diff --git a/packages/web3-utils/types/tests/solidity-sha3-tests.ts b/packages/web3-utils/types/tests/solidity-sha3-test.ts similarity index 63% rename from packages/web3-utils/types/tests/solidity-sha3-tests.ts rename to packages/web3-utils/types/tests/solidity-sha3-test.ts index d3d5cd59645..4601b260869 100644 --- a/packages/web3-utils/types/tests/solidity-sha3-tests.ts +++ b/packages/web3-utils/types/tests/solidity-sha3-test.ts @@ -12,24 +12,31 @@ along with web3.js. If not, see . */ /** - * @file solidity-sha3-tests.ts + * @file solidity-sha3-test.ts * @author Josh Stevens * @date 2018 */ -import { BN, soliditySha3 } from 'web3-utils'; +import {BN, soliditySha3} from 'web3-utils'; -const bigNumber = new BN(3); - -soliditySha3('234564535', '0xfff23243', true, -10); // $ExpectType string -soliditySha3('Hello!%'); // $ExpectType string -soliditySha3('234'); // $ExpectType string -soliditySha3(0xea); // $ExpectType string -soliditySha3(bigNumber); // $ExpectType string -soliditySha3({type: 'uint256', value: '234'}); // $ExpectType string -soliditySha3({t: 'uint', v: new BN('234')}); // $ExpectType string -soliditySha3({t: 'string', v: 'Hello!%'}, {t: 'int8', v: -23}, {t: 'address', v: '0x85F43D8a49eeB85d32Cf465507DD71d507100C1d'}); // $ExpectType string -soliditySha3('0x407D73d8a49eeb85D32Cf465507dd71d507100c1'); // $ExpectType string +// $ExpectType string +soliditySha3('234564535', '0xfff23243', true, -10); +// $ExpectType string +soliditySha3('Hello!%'); +// $ExpectType string +soliditySha3('234'); +// $ExpectType string +soliditySha3(0xea); +// $ExpectType string +soliditySha3(new BN(3)); +// $ExpectType string +soliditySha3({type: 'uint256', value: '234'}); +// $ExpectType string +soliditySha3({t: 'uint', v: new BN('234')}); +// $ExpectType string +soliditySha3({t: 'string', v: 'Hello!%'}, {t: 'int8', v: -23}, {t: 'address', v: '0x85F43D8a49eeB85d32Cf465507DD71d507100C1d'}); +// $ExpectType string +soliditySha3('0x407D73d8a49eeb85D32Cf465507dd71d507100c1'); // $ExpectError soliditySha3(['hey']); diff --git a/packages/web3-utils/types/tests/string-to-hex-tests.ts b/packages/web3-utils/types/tests/string-to-hex-test.ts similarity index 85% rename from packages/web3-utils/types/tests/string-to-hex-tests.ts rename to packages/web3-utils/types/tests/string-to-hex-test.ts index ab4041d5530..48e9dc0aabc 100644 --- a/packages/web3-utils/types/tests/string-to-hex-tests.ts +++ b/packages/web3-utils/types/tests/string-to-hex-test.ts @@ -12,21 +12,20 @@ along with web3.js. If not, see . */ /** - * @file string-to-hex-tests.ts + * @file string-to-hex-test.ts * @author Josh Stevens * @date 2018 */ -import { BN, stringToHex } from 'web3-utils'; +import {BN, stringToHex} from 'web3-utils'; -const bigNumber = new BN(3); - -stringToHex('I have 100£'); // $ExpectType string +// $ExpectType string +stringToHex('I have 100£'); // $ExpectError stringToHex(232); // $ExpectError -stringToHex(bigNumber); +stringToHex(new BN(3)); // $ExpectError stringToHex(['string']); // $ExpectError diff --git a/packages/web3-utils/types/tests/test-address-tests.ts b/packages/web3-utils/types/tests/test-address-test.ts similarity index 95% rename from packages/web3-utils/types/tests/test-address-tests.ts rename to packages/web3-utils/types/tests/test-address-test.ts index 91483d861ec..c1f71a00884 100644 --- a/packages/web3-utils/types/tests/test-address-tests.ts +++ b/packages/web3-utils/types/tests/test-address-test.ts @@ -12,16 +12,17 @@ along with web3.js. If not, see . */ /** - * @file test-address-tests.ts + * @file test-address-test.ts * @author Josh Stevens * @date 2018 */ -import { BN, testAddress } from 'web3-utils'; +import {BN, testAddress} from 'web3-utils'; const bigNumber = new BN(3); -testAddress('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', '0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); // $ExpectType boolean +// $ExpectType boolean +testAddress('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', '0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); // $ExpectError testAddress(656, '0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); diff --git a/packages/web3-utils/types/tests/test-topic-tests.ts b/packages/web3-utils/types/tests/test-topic-test.ts similarity index 95% rename from packages/web3-utils/types/tests/test-topic-tests.ts rename to packages/web3-utils/types/tests/test-topic-test.ts index 475b9894200..c230f4dc629 100644 --- a/packages/web3-utils/types/tests/test-topic-tests.ts +++ b/packages/web3-utils/types/tests/test-topic-test.ts @@ -12,16 +12,17 @@ along with web3.js. If not, see . */ /** - * @file test-topic-tests.ts + * @file test-topic-test.ts * @author Josh Stevens * @date 2018 */ -import { BN, testTopic } from 'web3-utils'; +import {BN, testTopic} from 'web3-utils'; const bigNumber = new BN(3); -testTopic('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', '0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); // $ExpectType boolean +// $ExpectType boolean +testTopic('0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', '0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); // $ExpectError testTopic(656, '0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); diff --git a/packages/web3-utils/types/tests/to-ascii-tests.ts b/packages/web3-utils/types/tests/to-ascii-test.ts similarity index 87% rename from packages/web3-utils/types/tests/to-ascii-tests.ts rename to packages/web3-utils/types/tests/to-ascii-test.ts index dc42ceac866..7134d825ab1 100644 --- a/packages/web3-utils/types/tests/to-ascii-tests.ts +++ b/packages/web3-utils/types/tests/to-ascii-test.ts @@ -17,16 +17,15 @@ * @date 2018 */ -import { BN, toAscii } from 'web3-utils'; +import {BN, toAscii} from 'web3-utils'; -const bigNumber = new BN(3); - -toAscii('0x4920686176652031303021'); // $ExpectType string +// $ExpectType string +toAscii('0x4920686176652031303021'); // $ExpectError toAscii(345); // $ExpectError -toAscii(bigNumber); +toAscii(new BN(3)); // $ExpectError toAscii({}); // $ExpectError diff --git a/packages/web3-utils/types/tests/to-bn-tests.ts b/packages/web3-utils/types/tests/to-bn-test.ts similarity index 89% rename from packages/web3-utils/types/tests/to-bn-tests.ts rename to packages/web3-utils/types/tests/to-bn-test.ts index cd286aa42fa..3a730bc65e6 100644 --- a/packages/web3-utils/types/tests/to-bn-tests.ts +++ b/packages/web3-utils/types/tests/to-bn-test.ts @@ -12,15 +12,17 @@ along with web3.js. If not, see . */ /** - * @file to-bn-tests.ts + * @file to-bn-test.ts * @author Josh Stevens * @date 2018 */ -import { toBN } from 'web3-utils'; +import {toBN} from 'web3-utils'; -toBN(4); // $ExpectType BN -toBN('443'); // $ExpectType BN +// $ExpectType BN +toBN(4); +// $ExpectType BN +toBN('443'); // $ExpectError toBN({}); diff --git a/packages/web3-utils/types/tests/to-check-sum-address-tests.ts b/packages/web3-utils/types/tests/to-check-sum-address-test.ts similarity index 85% rename from packages/web3-utils/types/tests/to-check-sum-address-tests.ts rename to packages/web3-utils/types/tests/to-check-sum-address-test.ts index 93b4b6e6dfc..b4bfbe6ca61 100644 --- a/packages/web3-utils/types/tests/to-check-sum-address-tests.ts +++ b/packages/web3-utils/types/tests/to-check-sum-address-test.ts @@ -12,16 +12,15 @@ along with web3.js. If not, see . */ /** - * @file to-check-sum-address-tests.ts + * @file to-check-sum-address-test.ts * @author Josh Stevens * @date 2018 */ -import { BN, toChecksumAddress } from 'web3-utils'; +import {BN, toChecksumAddress} from 'web3-utils'; -const bigNumber = new BN(3); - -toChecksumAddress('0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); // $ExpectType string +// $ExpectType string +toChecksumAddress('0x8ee7f17bb3f88b01247c21ab6603880b64ae53e811f5e01138822e558cf1ab51'); // $ExpectError toChecksumAddress([4]); @@ -30,7 +29,7 @@ toChecksumAddress(['string']); // $ExpectError toChecksumAddress(345); // $ExpectError -toChecksumAddress(bigNumber); +toChecksumAddress(new BN(3)); // $ExpectError toChecksumAddress({}); // $ExpectError diff --git a/packages/web3-utils/types/tests/to-decimal-tests.ts b/packages/web3-utils/types/tests/to-decimal-test.ts similarity index 83% rename from packages/web3-utils/types/tests/to-decimal-tests.ts rename to packages/web3-utils/types/tests/to-decimal-test.ts index 1404347b6bf..c455c0bf089 100644 --- a/packages/web3-utils/types/tests/to-decimal-tests.ts +++ b/packages/web3-utils/types/tests/to-decimal-test.ts @@ -12,20 +12,20 @@ along with web3.js. If not, see . */ /** - * @file to-decimal-tests.ts + * @file to-decimal-test.ts * @author Josh Stevens * @date 2018 */ -import { BN, toDecimal } from 'web3-utils'; +import {BN, toDecimal} from 'web3-utils'; -const bigNumber = new BN(3); - -toDecimal('232'); // $ExpectType number -toDecimal(232); // $ExpectType number +// $ExpectType number +toDecimal('232'); +// $ExpectType number +toDecimal(232); // $ExpectError -toDecimal(bigNumber); +toDecimal(new BN(3)); // $ExpectError toDecimal(['string']); // $ExpectError diff --git a/packages/web3-utils/types/tests/to-hex-tests.ts b/packages/web3-utils/types/tests/to-hex-test.ts similarity index 82% rename from packages/web3-utils/types/tests/to-hex-tests.ts rename to packages/web3-utils/types/tests/to-hex-test.ts index 7a948e73d26..b99d4bca9bf 100644 --- a/packages/web3-utils/types/tests/to-hex-tests.ts +++ b/packages/web3-utils/types/tests/to-hex-test.ts @@ -12,18 +12,19 @@ along with web3.js. If not, see . */ /** - * @file to-hex-tests.ts + * @file to-hex-test.ts * @author Josh Stevens * @date 2018 */ -import { BN, toHex } from 'web3-utils'; +import {BN, toHex} from 'web3-utils'; -const bigNumber = new BN(3); - -toHex('234'); // $ExpectType string -toHex(234); // $ExpectType string -toHex(bigNumber); // $ExpectType string +// $ExpectType string +toHex('234'); +// $ExpectType string +toHex(234); +// $ExpectType string +toHex(new BN(3)); // $ExpectError toHex(['string']); diff --git a/packages/web3-utils/types/tests/to-twos-compement-tests.ts b/packages/web3-utils/types/tests/to-twos-compement-test.ts similarity index 78% rename from packages/web3-utils/types/tests/to-twos-compement-tests.ts rename to packages/web3-utils/types/tests/to-twos-compement-test.ts index 8638540a0ca..4341b580a64 100644 --- a/packages/web3-utils/types/tests/to-twos-compement-tests.ts +++ b/packages/web3-utils/types/tests/to-twos-compement-test.ts @@ -12,20 +12,19 @@ along with web3.js. If not, see . */ /** - * @file to-twos-compement-tests.ts + * @file to-twos-compement-test.ts * @author Josh Stevens * @date 2018 */ -import { toTwosComplement, BN } from 'web3-utils'; +import {toTwosComplement, BN} from 'web3-utils'; -const bigNumber = new BN(3); - -// toTwosComplement Tests - -toTwosComplement(4); // $ExpectType string -toTwosComplement('443'); // $ExpectType string -toTwosComplement(bigNumber); // $ExpectType string +// $ExpectType string +toTwosComplement(4); +// $ExpectType string +toTwosComplement('443'); +// $ExpectType string +toTwosComplement(new BN(3)); // $ExpectError toTwosComplement({}); diff --git a/packages/web3-utils/types/tests/to-utf8-tests.ts b/packages/web3-utils/types/tests/to-utf8-test.ts similarity index 84% rename from packages/web3-utils/types/tests/to-utf8-tests.ts rename to packages/web3-utils/types/tests/to-utf8-test.ts index 5f796cf6fc6..c6c37a7ab4c 100644 --- a/packages/web3-utils/types/tests/to-utf8-tests.ts +++ b/packages/web3-utils/types/tests/to-utf8-test.ts @@ -12,21 +12,20 @@ along with web3.js. If not, see . */ /** - * @file to-utf8-tests.ts + * @file to-utf8-test.ts * @author Josh Stevens * @date 2018 */ -import { BN, toUtf8 } from 'web3-utils'; +import {BN, toUtf8} from 'web3-utils'; -const bigNumber = new BN(3); - -toUtf8('0x49206861766520313030e282ac'); // $ExpectType string +// $ExpectType string +toUtf8('0x49206861766520313030e282ac'); // $ExpectError toUtf8(656); // $ExpectError -toUtf8(bigNumber); +toUtf8(new BN(3)); // $ExpectError toUtf8(['string']); // $ExpectError diff --git a/packages/web3-utils/types/tests/to-wei-tests.ts b/packages/web3-utils/types/tests/to-wei-test.ts similarity index 75% rename from packages/web3-utils/types/tests/to-wei-tests.ts rename to packages/web3-utils/types/tests/to-wei-test.ts index fc1a079d93e..5469c3062f2 100644 --- a/packages/web3-utils/types/tests/to-wei-tests.ts +++ b/packages/web3-utils/types/tests/to-wei-test.ts @@ -12,21 +12,27 @@ along with web3.js. If not, see . */ /** - * @file to-wei-tests.ts + * @file to-wei-test.ts * @author Josh Stevens * @date 2018 */ -import { BN, toWei } from 'web3-utils'; +import {BN, toWei} from 'web3-utils'; const bigNumber = new BN(3); -toWei('1'); // $ExpectType string | BN -toWei(1); // $ExpectType string | BN -toWei(bigNumber); // $ExpectType string | BN -toWei('1', 'finney'); // $ExpectType string | BN -toWei(1, 'finney'); // $ExpectType string | BN -toWei(bigNumber, 'finney'); // $ExpectType string | BN +// $ExpectType string | BN +toWei('1'); +// $ExpectType string | BN +toWei(1); +// $ExpectType string | BN +toWei(bigNumber); +// $ExpectType string | BN +toWei('1', 'finney'); +// $ExpectType string | BN +toWei(1, 'finney'); +// $ExpectType string | BN +toWei(bigNumber, 'finney'); // $ExpectError toWei(['string']); diff --git a/packages/web3-utils/types/tests/unit-map-tests.ts b/packages/web3-utils/types/tests/unit-map-test.ts similarity index 88% rename from packages/web3-utils/types/tests/unit-map-tests.ts rename to packages/web3-utils/types/tests/unit-map-test.ts index c920fc08822..1e780626e00 100644 --- a/packages/web3-utils/types/tests/unit-map-tests.ts +++ b/packages/web3-utils/types/tests/unit-map-test.ts @@ -12,11 +12,12 @@ along with web3.js. If not, see . */ /** - * @file unit-map-tests.ts + * @file unit-map-test.ts * @author Josh Stevens * @date 2018 */ -import { unitMap } from 'web3-utils'; +import {unitMap} from 'web3-utils'; -unitMap(); // $ExpectType Units +// $ExpectType Units +unitMap(); diff --git a/packages/web3-utils/types/tests/utf8-to-hex-tests.ts b/packages/web3-utils/types/tests/utf8-to-hex-test.ts similarity index 85% rename from packages/web3-utils/types/tests/utf8-to-hex-tests.ts rename to packages/web3-utils/types/tests/utf8-to-hex-test.ts index a1beaa5deb6..ed7da41dfe8 100644 --- a/packages/web3-utils/types/tests/utf8-to-hex-tests.ts +++ b/packages/web3-utils/types/tests/utf8-to-hex-test.ts @@ -12,21 +12,20 @@ along with web3.js. If not, see . */ /** - * @file utf8-to-hex-tests.ts + * @file utf8-to-hex-test.ts * @author Josh Stevens * @date 2018 */ -import { BN, utf8ToHex } from 'web3-utils'; +import {BN, utf8ToHex} from 'web3-utils'; -const bigNumber = new BN(3); - -utf8ToHex('I have 100£'); // $ExpectType string +// $ExpectType string +utf8ToHex('I have 100£'); // $ExpectError utf8ToHex(232); // $ExpectError -utf8ToHex(bigNumber); +utf8ToHex(new BN(3)); // $ExpectError utf8ToHex(['string']); // $ExpectError diff --git a/packages/web3-utils/types/tslint.json b/packages/web3-utils/types/tslint.json index f5f2f85ed20..dc95ea202b8 100644 --- a/packages/web3-utils/types/tslint.json +++ b/packages/web3-utils/types/tslint.json @@ -3,6 +3,7 @@ "rules": { "semicolon": false, "no-import-default-of-export-equals": false, - "file-name-casing": [true, "kebab-case"] + "file-name-casing": [true, "kebab-case"], + "whitespace": false } }