From 796594be9ea4ac1b7a9e3e710cd17eee2332b213 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Sat, 30 Dec 2017 21:07:59 +0100 Subject: [PATCH 1/2] Flow lint warning fixes --- .flowconfig | 5 +- flow-typed/isomorphic-fetch.js | 5 + flow-typed/websocket.js | 7 + package.json | 2 +- packages/api-format/package.json | 4 +- packages/api-format/src/echo.js | 2 +- packages/api-format/src/input.js | 2 +- packages/api-format/src/output.js | 2 +- packages/api-format/src/types.js | 2 +- packages/api-format/src/util.js | 10 +- packages/api-provider/package.json | 2 +- packages/api-provider/src/http/index.js | 3 +- packages/api-provider/src/jsonRpcCoder.js | 7 +- packages/api-provider/src/types.js | 6 +- packages/api-provider/src/ws/index.js | 19 +- packages/api/package.json | 2 +- packages/api/src/api.js | 16 +- packages/api/src/types.js | 8 +- yarn.lock | 762 +++++++++++++--------- 19 files changed, 500 insertions(+), 366 deletions(-) create mode 100644 flow-typed/isomorphic-fetch.js create mode 100644 flow-typed/websocket.js diff --git a/.flowconfig b/.flowconfig index f6c238a02b52..b46cfb635f9e 100644 --- a/.flowconfig +++ b/.flowconfig @@ -6,6 +6,9 @@ [libs] ./node_modules/@polkadot/dev/flow-typed +[lints] +all=warn + [options] -unsafe.enable_getters_and_setters=true +include_warnings=true module.name_mapper='^@polkadot/api-\(format\|jsonrpc\|provider\)\(.*\)$' -> '/packages/api-\1/src\2' diff --git a/flow-typed/isomorphic-fetch.js b/flow-typed/isomorphic-fetch.js new file mode 100644 index 000000000000..8045349c6f62 --- /dev/null +++ b/flow-typed/isomorphic-fetch.js @@ -0,0 +1,5 @@ +// @flow + +declare module 'isomorphic-fetch' { + declare module.exports: void +} diff --git a/flow-typed/websocket.js b/flow-typed/websocket.js new file mode 100644 index 000000000000..834815935039 --- /dev/null +++ b/flow-typed/websocket.js @@ -0,0 +1,7 @@ +// @flow + +declare module 'websocket' { + declare module.exports: { + w3cwebsocket: WebSocket + }; +} diff --git a/package.json b/package.json index 1fc5d6041a1d..67c475798887 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "test": "jest --coverage" }, "devDependencies": { - "@polkadot/dev": "^0.13.5", + "@polkadot/dev": "^0.14.5", "lerna": "^2.5.1" } } diff --git a/packages/api-format/package.json b/packages/api-format/package.json index 43049444bcdf..c20b08cb5662 100644 --- a/packages/api-format/package.json +++ b/packages/api-format/package.json @@ -33,8 +33,8 @@ "@polkadot/api-jsonrpc": "^0.6.8" }, "dependencies": { - "@polkadot/primitives-json": "^0.4.1", - "@polkadot/util": "^0.10.1", + "@polkadot/primitives-json": "^0.4.6", + "@polkadot/util": "^0.11.1", "babel-runtime": "^6.26.0" } } diff --git a/packages/api-format/src/echo.js b/packages/api-format/src/echo.js index 62f5c38d1871..dd6caba8bb69 100644 --- a/packages/api-format/src/echo.js +++ b/packages/api-format/src/echo.js @@ -1,6 +1,6 @@ // ISC, Copyright 2017 Jaco Greeff // @flow -module.exports = function echo (value: any): any { +module.exports = function echo (value: mixed): mixed { return value; }; diff --git a/packages/api-format/src/input.js b/packages/api-format/src/input.js index cf7f2faa814a..c4cf4d0cd5eb 100644 --- a/packages/api-format/src/input.js +++ b/packages/api-format/src/input.js @@ -20,7 +20,7 @@ const formatters: { [FormatInputType]: FormatterFunction } = { 'String': echo }; -module.exports = function formatInputs (inputs: Array, values: Array): Array { +module.exports = function formatInputs (inputs: Array, values: Array): Array { const types = inputs.map(({ type }) => type); return util.formatArray(formatters, types, values); diff --git a/packages/api-format/src/output.js b/packages/api-format/src/output.js index 5a8213acacb5..b6c58692c982 100644 --- a/packages/api-format/src/output.js +++ b/packages/api-format/src/output.js @@ -15,6 +15,6 @@ const formatters: { [FormatOutputType]: FormatterFunction } = { 'StorageData': echo }; -module.exports = function formatOutput (output: InterfaceOutputType, value: any): any { +module.exports = function formatOutput (output: InterfaceOutputType, value: mixed): mixed { return util.format(formatters, output.type, value); }; diff --git a/packages/api-format/src/types.js b/packages/api-format/src/types.js index 7099809f172a..249916454588 100644 --- a/packages/api-format/src/types.js +++ b/packages/api-format/src/types.js @@ -1,4 +1,4 @@ // ISC, Copyright 2017 Jaco Greeff // @flow -export type FormatterFunction = (value: any) => any; +export type FormatterFunction = (value: mixed) => mixed; diff --git a/packages/api-format/src/util.js b/packages/api-format/src/util.js index 95997d089e7b..5825de722c26 100644 --- a/packages/api-format/src/util.js +++ b/packages/api-format/src/util.js @@ -8,7 +8,7 @@ const echo = require('./echo'); const arrayTypeRegex = /\[\]$/; -function formatSingleType (formatters: { [any]: FormatterFunction }, type: string, value: any): any { +function formatSingleType (formatters: { [string]: FormatterFunction }, type: string, value: mixed): mixed { const formatter: FormatterFunction = formatters[type]; if (isUndefined(formatter)) { @@ -24,7 +24,7 @@ function formatSingleType (formatters: { [any]: FormatterFunction }, type: strin } } -function formatArrayType (formatters: { [any]: FormatterFunction }, type: string, value: Array): any { +function formatArrayType (formatters: { [string]: FormatterFunction }, type: string, value: Array): mixed { type = type.replace(arrayTypeRegex, ''); return value.map((value) => { @@ -32,7 +32,7 @@ function formatArrayType (formatters: { [any]: FormatterFunction }, type: string }); } -function format (formatters: { [any]: FormatterFunction }, type: string, value: any): any { +function format (formatters: { [string]: FormatterFunction }, type: string, value: mixed): mixed { if (arrayTypeRegex.test(type)) { return formatArrayType(formatters, type, value); } @@ -40,8 +40,8 @@ function format (formatters: { [any]: FormatterFunction }, type: string, value: return formatSingleType(formatters, type, value); } -function formatArray (formatters: { [any]: FormatterFunction }, types: Array, values: Array): Array { - return types.map((type, index) => { +function formatArray (formatters: { [string]: FormatterFunction }, types: Array, values: Array): Array { + return types.map((type, index): mixed => { return format(formatters, type, values[index]); }); } diff --git a/packages/api-provider/package.json b/packages/api-provider/package.json index 1016506b6252..c587ca451187 100644 --- a/packages/api-provider/package.json +++ b/packages/api-provider/package.json @@ -34,7 +34,7 @@ "nock": "^9.1.0" }, "dependencies": { - "@polkadot/util": "^0.10.1", + "@polkadot/util": "^0.11.1", "babel-runtime": "^6.26.0", "isomorphic-fetch": "^2.2.1", "websocket": "^1.0.25" diff --git a/packages/api-provider/src/http/index.js b/packages/api-provider/src/http/index.js index abfb182e09a0..d1e5ea40a2e7 100644 --- a/packages/api-provider/src/http/index.js +++ b/packages/api-provider/src/http/index.js @@ -19,11 +19,12 @@ module.exports = class HttpProvider extends JsonRpcCoder implements ProviderInte this._endpoint = endpoint; } + // flowlint-next-line unsafe-getters-setters:off get isConnected (): boolean { return true; } - async send (method: string, params: Array): Promise { + async send (method: string, params: Array): Promise { const body = this.encodeJson(method, params); const response = await fetch(this._endpoint, { body, diff --git a/packages/api-provider/src/jsonRpcCoder.js b/packages/api-provider/src/jsonRpcCoder.js index 1089bdc793d1..08e6c6fc7278 100644 --- a/packages/api-provider/src/jsonRpcCoder.js +++ b/packages/api-provider/src/jsonRpcCoder.js @@ -10,7 +10,7 @@ const isUndefined = require('@polkadot/util/is/undefined'); module.exports = class JsonRpcCoder { _id: number = 0; - decodeResponse (response: JsonRpcResponse): any { + decodeResponse (response: JsonRpcResponse): mixed { assert(response, 'Empty response object received'); assert(response.jsonrpc === '2.0', 'Invalid jsonrpc field in decoded object'); @@ -27,7 +27,7 @@ module.exports = class JsonRpcCoder { return response.result; } - encodeObject (method: string, params: Array): JsonRpcRequest { + encodeObject (method: string, params: Array): JsonRpcRequest { return { id: ++this._id, jsonrpc: '2.0', @@ -36,12 +36,13 @@ module.exports = class JsonRpcCoder { }; } - encodeJson (method: string, params: Array): string { + encodeJson (method: string, params: Array): string { return JSON.stringify( this.encodeObject(method, params) ); } + // flowlint-next-line unsafe-getters-setters:off get id (): number { return this._id; } diff --git a/packages/api-provider/src/types.js b/packages/api-provider/src/types.js index b0db4b3f39f6..a493b9a53310 100644 --- a/packages/api-provider/src/types.js +++ b/packages/api-provider/src/types.js @@ -8,7 +8,7 @@ export type JsonRpcObject = { export type JsonRpcRequest = JsonRpcObject & { method: string; - params: Array; + params: Array; }; export type JsonRpcResponseBase = { @@ -16,12 +16,12 @@ export type JsonRpcResponseBase = { code: number, message: string }; - result?: any; + result?: mixed; } export type JsonRpcResponse = JsonRpcObject & JsonRpcResponseBase; export interface ProviderInterface { +isConnected: boolean; - send (method: string, params: Array): Promise; + send (method: string, params: Array): Promise; } diff --git a/packages/api-provider/src/ws/index.js b/packages/api-provider/src/ws/index.js index 44a6ac1b87aa..13fb353e554d 100644 --- a/packages/api-provider/src/ws/index.js +++ b/packages/api-provider/src/ws/index.js @@ -4,11 +4,11 @@ import type { JsonRpcResponse, ProviderInterface } from '../types'; type AwaitingType = { - callback: (error: ?Error, result: any) => void + callback: (error: ?Error, result: mixed) => void }; type WsMessageType = { - data: any + data: mixed }; require('./polyfill'); @@ -37,6 +37,7 @@ module.exports = class WsProvider extends JsonRpcCoder implements ProviderInterf } } + // flowlint-next-line unsafe-getters-setters:off get isConnected (): boolean { return this._isConnected; } @@ -67,19 +68,19 @@ module.exports = class WsProvider extends JsonRpcCoder implements ProviderInterf // console.log('connected to', this._endpoint); this._isConnected = true; - Object.keys(this._queued).forEach((id: string) => { + Object.keys(this._queued).forEach((id: number) => { try { this._websocket.send( - this._queued[((id: any): number)] + this._queued[id] ); - delete this._queued[((id: any): number)]; + delete this._queued[id]; } catch (error) { console.error(error); } }); } - _onMessage = (message: WsMessageType) => { + _onMessage = (message: WsMessageType): void => { const response: JsonRpcResponse = JSON.parse(message.data); const handler = this._handlers[response.id]; @@ -99,13 +100,13 @@ module.exports = class WsProvider extends JsonRpcCoder implements ProviderInterf delete this._handlers[response.id]; } - send (method: string, params: Array): Promise { - return new Promise((resolve, reject) => { + send (method: string, params: Array): Promise { + return new Promise((resolve, reject): void => { try { const json = this.encodeJson(method, params); this._handlers[this.id] = { - callback: (error: ?Error, result: any) => { + callback: (error: ?Error, result: mixed) => { if (error) { reject(error); } else { diff --git a/packages/api/package.json b/packages/api/package.json index 03e2577e58ca..50d6a1b04a82 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -33,7 +33,7 @@ "@polkadot/api-format": "^0.6.8", "@polkadot/api-jsonrpc": "^0.6.8", "@polkadot/api-provider": "^0.6.8", - "@polkadot/util": "^0.10.1", + "@polkadot/util": "^0.11.1", "babel-runtime": "^6.26.0" } } diff --git a/packages/api/src/api.js b/packages/api/src/api.js index 0e53e9947599..fb7e4d526f34 100644 --- a/packages/api/src/api.js +++ b/packages/api/src/api.js @@ -3,7 +3,7 @@ import type { ProviderInterface } from '@polkadot/api-provider/types'; import type { InterfaceDefinition } from '@polkadot/api-jsonrpc/types'; -import type { ApiInterface } from './types'; +import type { ApiInterface, ApiInterface$Section } from './types'; const { formatInputs, formatOutput } = require('@polkadot/api-format'); const interfaces = require('@polkadot/api-jsonrpc'); @@ -14,8 +14,8 @@ const jsonrpcSignature = require('@polkadot/util/jsonrpc/signature'); module.exports = class Api implements ApiInterface { _provider: ProviderInterface; - _chainInterface: any = null; - _stateInterface: any = null; + _chainInterface: ApiInterface$Section; + _stateInterface: ApiInterface$Section; constructor (provider: ProviderInterface) { assert(provider && isFunction(provider.send), 'Expected Provider'); @@ -26,15 +26,17 @@ module.exports = class Api implements ApiInterface { this._stateInterface = this._createInterface(interfaces, 'state'); } - get chain (): any { + // flowlint-next-line unsafe-getters-setters:off + get chain (): ApiInterface$Section { return this._chainInterface; } - get state (): any { + // flowlint-next-line unsafe-getters-setters:off + get state (): ApiInterface$Section { return this._stateInterface; } - _createInterface (definitions: { [string]: InterfaceDefinition }, section: string): any { + _createInterface (definitions: { [string]: InterfaceDefinition }, section: string): ApiInterface$Section { const definition = definitions[section]; return Object @@ -43,7 +45,7 @@ module.exports = class Api implements ApiInterface { const { inputs, output } = definition.methods[method]; const rpcName = `${section}_${method}`; - container[method] = async (..._params: Array): any => { + container[method] = async (..._params: Array): Promise => { try { assert(inputs.length === _params.length, `${inputs.length} params expected, found ${_params.length} instead`); diff --git a/packages/api/src/types.js b/packages/api/src/types.js index 9a12855c3787..899626e75c4d 100644 --- a/packages/api/src/types.js +++ b/packages/api/src/types.js @@ -1,7 +1,11 @@ // ISC, Copyright 2017 Jaco Greeff // @flow +export type ApiInterface$Section = { + [string]: () => Promise +}; + export interface ApiInterface { - +chain: any; - +state: any; + +chain: ApiInterface$Section; + +state: ApiInterface$Section; } diff --git a/yarn.lock b/yarn.lock index 1d3a3cc6f213..c457e7a245f6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,65 +2,74 @@ # yarn lockfile v1 -"@babel/code-frame@7.0.0-beta.32", "@babel/code-frame@^7.0.0-beta.31": - version "7.0.0-beta.32" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.32.tgz#04f231b8ec70370df830d9926ce0f5add074ec4c" +"@babel/code-frame@7.0.0-beta.31": + version "7.0.0-beta.31" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.31.tgz#473d021ecc573a2cce1c07d5b509d5215f46ba35" dependencies: chalk "^2.0.0" esutils "^2.0.2" js-tokens "^3.0.0" -"@babel/helper-function-name@7.0.0-beta.32": - version "7.0.0-beta.32" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.0.0-beta.32.tgz#6161af4419f1b4e3ed2d28c0c79c160e218be1f3" +"@babel/code-frame@^7.0.0-beta.35": + version "7.0.0-beta.36" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.36.tgz#2349d7ec04b3a06945ae173280ef8579b63728e4" dependencies: - "@babel/helper-get-function-arity" "7.0.0-beta.32" - "@babel/template" "7.0.0-beta.32" - "@babel/types" "7.0.0-beta.32" + chalk "^2.0.0" + esutils "^2.0.2" + js-tokens "^3.0.0" -"@babel/helper-get-function-arity@7.0.0-beta.32": - version "7.0.0-beta.32" - resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.32.tgz#93721a99db3757de575a83bab7c453299abca568" +"@babel/helper-function-name@7.0.0-beta.31": + version "7.0.0-beta.31" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.0.0-beta.31.tgz#afe63ad799209989348b1109b44feb66aa245f57" dependencies: - "@babel/types" "7.0.0-beta.32" + "@babel/helper-get-function-arity" "7.0.0-beta.31" + "@babel/template" "7.0.0-beta.31" + "@babel/traverse" "7.0.0-beta.31" + "@babel/types" "7.0.0-beta.31" -"@babel/template@7.0.0-beta.32": - version "7.0.0-beta.32" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.0.0-beta.32.tgz#e1d9fdbd2a7bcf128f2f920744a67dab18072495" +"@babel/helper-get-function-arity@7.0.0-beta.31": + version "7.0.0-beta.31" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.31.tgz#1176d79252741218e0aec872ada07efb2b37a493" dependencies: - "@babel/code-frame" "7.0.0-beta.32" - "@babel/types" "7.0.0-beta.32" - babylon "7.0.0-beta.32" + "@babel/types" "7.0.0-beta.31" + +"@babel/template@7.0.0-beta.31": + version "7.0.0-beta.31" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.0.0-beta.31.tgz#577bb29389f6c497c3e7d014617e7d6713f68bda" + dependencies: + "@babel/code-frame" "7.0.0-beta.31" + "@babel/types" "7.0.0-beta.31" + babylon "7.0.0-beta.31" lodash "^4.2.0" -"@babel/traverse@^7.0.0-beta.31": - version "7.0.0-beta.32" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.0.0-beta.32.tgz#b78b754c6e1af3360626183738e4c7a05951bc99" +"@babel/traverse@7.0.0-beta.31": + version "7.0.0-beta.31" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.0.0-beta.31.tgz#db399499ad74aefda014f0c10321ab255134b1df" dependencies: - "@babel/code-frame" "7.0.0-beta.32" - "@babel/helper-function-name" "7.0.0-beta.32" - "@babel/types" "7.0.0-beta.32" - babylon "7.0.0-beta.32" + "@babel/code-frame" "7.0.0-beta.31" + "@babel/helper-function-name" "7.0.0-beta.31" + "@babel/types" "7.0.0-beta.31" + babylon "7.0.0-beta.31" debug "^3.0.1" globals "^10.0.0" invariant "^2.2.0" lodash "^4.2.0" -"@babel/types@7.0.0-beta.32", "@babel/types@^7.0.0-beta.31": - version "7.0.0-beta.32" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.0.0-beta.32.tgz#c317d0ecc89297b80bbcb2f50608e31f6452a5ff" +"@babel/types@7.0.0-beta.31": + version "7.0.0-beta.31" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.0.0-beta.31.tgz#42c9c86784f674c173fb21882ca9643334029de4" dependencies: esutils "^2.0.2" lodash "^4.2.0" to-fast-properties "^2.0.0" -"@polkadot/dev@^0.13.5": - version "0.13.5" - resolved "https://registry.yarnpkg.com/@polkadot/dev/-/dev-0.13.5.tgz#01dc2e720d5f9a4133a944fb42ae44623cd02880" +"@polkadot/dev@^0.14.5": + version "0.14.5" + resolved "https://registry.yarnpkg.com/@polkadot/dev/-/dev-0.14.5.tgz#28c8583dced8675d1b06ddb34b549da3c99d9cdc" dependencies: babel-cli "^6.26.0" babel-core "^6.26.0" - babel-eslint "^8.0.2" + babel-eslint "^8.1.2" babel-plugin-transform-class-properties "^6.24.1" babel-plugin-transform-flow-strip-types "^6.22.0" babel-plugin-transform-object-rest-spread "^6.26.0" @@ -68,9 +77,9 @@ babel-preset-env "^1.6.1" coveralls "^3.0.0" dox "^0.9.0" - eslint "^4.11.0" - eslint-config-semistandard "^11.0.0" - eslint-config-standard "^10.2.1" + eslint "^4.14.0" + eslint-config-semistandard "^12.0.0" + eslint-config-standard "^11.0.0-beta.0" eslint-config-standard-jsx "^4.0.2" eslint-config-standard-react "^5.0.0" eslint-plugin-flowtype "^2.39.1" @@ -80,9 +89,9 @@ eslint-plugin-promise "^3.6.0" eslint-plugin-react "^7.4.0" eslint-plugin-standard "^3.0.1" - flow-bin "^0.61.0" + flow-bin "^0.62.0" flow-copy-source "^1.2.1" - jest "^21.2.1" + jest "^22.0.0" makeshift "^1.1.0" mkdirp "^0.5.1" postcss "^6.0.14" @@ -91,38 +100,33 @@ stylelint "^8.2.0" stylelint-config-standard "^18.0.0" -"@polkadot/primitives-json@^0.4.1": - version "0.4.2" - resolved "https://registry.yarnpkg.com/@polkadot/primitives-json/-/primitives-json-0.4.2.tgz#5d1ca426a76bd1ff459d759f00fbc4771431fa00" +"@polkadot/primitives-json@^0.4.6": + version "0.4.6" + resolved "https://registry.yarnpkg.com/@polkadot/primitives-json/-/primitives-json-0.4.6.tgz#c1b45cb1983b02a1773769af89522b447b87e03d" dependencies: - "@polkadot/primitives" "^0.4.2" - "@polkadot/util" "^0.9.2" + "@polkadot/primitives" "^0.4.6" + "@polkadot/util" "^0.11.1" babel-runtime "^6.26.0" -"@polkadot/primitives@^0.4.2": - version "0.4.2" - resolved "https://registry.yarnpkg.com/@polkadot/primitives/-/primitives-0.4.2.tgz#50a015a3b4ff682f7673ebe9aaaab39ecb699ee2" +"@polkadot/primitives@^0.4.6": + version "0.4.6" + resolved "https://registry.yarnpkg.com/@polkadot/primitives/-/primitives-0.4.6.tgz#c3c74ec099780cac5a4ecf709b1a74c2974c3afc" dependencies: - "@polkadot/util" "^0.9.2" + "@polkadot/util" "^0.11.1" babel-runtime "^6.26.0" -"@polkadot/util@^0.10.1": - version "0.10.1" - resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-0.10.1.tgz#3e62e413e59f63eae5ddb36524b2bec8b3ac4265" +"@polkadot/util@^0.11.1": + version "0.11.1" + resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-0.11.1.tgz#16183ee293a1188da691dee822a19b8ecdcc54d8" dependencies: babel-runtime "^6.26.0" bn.js "^4.11.8" ip-regex "^2.1.0" keccak "^1.3.0" -"@polkadot/util@^0.9.2": - version "0.9.3" - resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-0.9.3.tgz#bd8d035225024eb0a95d56dc483912db9ed73e9e" - dependencies: - babel-runtime "^6.26.0" - bn.js "^4.11.8" - ip-regex "^2.1.0" - keccak "^1.3.0" +"@types/node@*": + version "8.5.2" + resolved "https://registry.yarnpkg.com/@types/node/-/node-8.5.2.tgz#83b8103fa9a2c2e83d78f701a9aa7c9539739aa5" JSONStream@^1.0.4: version "1.3.1" @@ -139,11 +143,11 @@ abbrev@1: version "1.1.1" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" -acorn-globals@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-3.1.0.tgz#fd8270f71fbb4996b004fa880ee5d46573a731bf" +acorn-globals@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-4.1.0.tgz#ab716025dbe17c54d3ef81d32ece2b2d99fe2538" dependencies: - acorn "^4.0.4" + acorn "^5.0.0" acorn-jsx@^3.0.0: version "3.0.1" @@ -155,9 +159,9 @@ acorn@^3.0.4: version "3.3.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" -acorn@^4.0.4: - version "4.0.13" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787" +acorn@^5.0.0, acorn@^5.1.2: + version "5.3.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.3.0.tgz#7446d39459c54fb49a80e6ee6478149b940ec822" acorn@^5.2.1: version "5.2.1" @@ -420,14 +424,16 @@ babel-core@^6.0.0, babel-core@^6.26.0: slash "^1.0.0" source-map "^0.5.6" -babel-eslint@^8.0.2: - version "8.0.2" - resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-8.0.2.tgz#e44fb9a037d749486071d52d65312f5c20aa7530" +babel-eslint@^8.1.2: + version "8.1.2" + resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-8.1.2.tgz#a39230b0c20ecbaa19a35d5633bf9b9ca2c8116f" dependencies: - "@babel/code-frame" "^7.0.0-beta.31" - "@babel/traverse" "^7.0.0-beta.31" - "@babel/types" "^7.0.0-beta.31" - babylon "^7.0.0-beta.31" + "@babel/code-frame" "7.0.0-beta.31" + "@babel/traverse" "7.0.0-beta.31" + "@babel/types" "7.0.0-beta.31" + babylon "7.0.0-beta.31" + eslint-scope "~3.7.1" + eslint-visitor-keys "^1.0.0" babel-generator@^6.18.0, babel-generator@^6.26.0: version "6.26.0" @@ -543,12 +549,12 @@ babel-helpers@^6.24.1: babel-runtime "^6.22.0" babel-template "^6.24.1" -babel-jest@^21.2.0: - version "21.2.0" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-21.2.0.tgz#2ce059519a9374a2c46f2455b6fbef5ad75d863e" +babel-jest@^22.0.4: + version "22.0.4" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-22.0.4.tgz#533c46de37d7c9d7612f408c76314be9277e0c26" dependencies: - babel-plugin-istanbul "^4.0.0" - babel-preset-jest "^21.2.0" + babel-plugin-istanbul "^4.1.5" + babel-preset-jest "^22.0.3" babel-messages@^6.23.0: version "6.23.0" @@ -562,7 +568,7 @@ babel-plugin-check-es2015-constants@^6.22.0: dependencies: babel-runtime "^6.22.0" -babel-plugin-istanbul@^4.0.0: +babel-plugin-istanbul@^4.1.5: version "4.1.5" resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.5.tgz#6760cdd977f411d3e175bb064f2bc327d99b2b6e" dependencies: @@ -570,9 +576,9 @@ babel-plugin-istanbul@^4.0.0: istanbul-lib-instrument "^1.7.5" test-exclude "^4.1.1" -babel-plugin-jest-hoist@^21.2.0: - version "21.2.0" - resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-21.2.0.tgz#2cef637259bd4b628a6cace039de5fcd14dbb006" +babel-plugin-jest-hoist@^22.0.3: + version "22.0.3" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-22.0.3.tgz#62cde5fe962fd41ae89c119f481ca5cd7dd48bb4" babel-plugin-syntax-async-functions@^6.8.0: version "6.13.0" @@ -867,11 +873,11 @@ babel-preset-env@^1.6.1: invariant "^2.2.2" semver "^5.3.0" -babel-preset-jest@^21.2.0: - version "21.2.0" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-21.2.0.tgz#ff9d2bce08abd98e8a36d9a8a5189b9173b85638" +babel-preset-jest@^22.0.3: + version "22.0.3" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-22.0.3.tgz#e2bb6f6b4a509d3ea0931f013db78c5a84856693" dependencies: - babel-plugin-jest-hoist "^21.2.0" + babel-plugin-jest-hoist "^22.0.3" babel-plugin-syntax-object-rest-spread "^6.13.0" babel-register@^6.26.0: @@ -926,9 +932,9 @@ babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.24.1, babel-types@^6.26 lodash "^4.17.4" to-fast-properties "^1.0.3" -babylon@7.0.0-beta.32, babylon@^7.0.0-beta.31: - version "7.0.0-beta.32" - resolved "https://registry.yarnpkg.com/babylon/-/babylon-7.0.0-beta.32.tgz#e9033cb077f64d6895f4125968b37dc0a8c3bc6e" +babylon@7.0.0-beta.31: + version "7.0.0-beta.31" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-7.0.0-beta.31.tgz#7ec10f81e0e456fd0f855ad60fa30c2ac454283f" babylon@^6.18.0: version "6.18.0" @@ -1009,6 +1015,10 @@ braces@^1.8.2: preserve "^0.2.0" repeat-element "^1.1.2" +browser-process-hrtime@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-0.1.2.tgz#425d68a58d3447f02a04aa894187fce8af8b7b8e" + browser-resolve@^1.11.2: version "1.11.2" resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.2.tgz#8ff09b0a2c421718a1051c260b32e48f442938ce" @@ -1621,6 +1631,10 @@ detect-libc@^1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" +detect-newline@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-2.1.0.tgz#f41f1c10be4b00e87b5f13da680759f2c5bfd3e2" + diff@^3.2.0: version "3.4.0" resolved "https://registry.yarnpkg.com/diff/-/diff-3.4.0.tgz#b1d85507daf3964828de54b37d0d73ba67dda56c" @@ -1660,6 +1674,10 @@ domelementtype@~1.1.1: version "1.1.3" resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.1.3.tgz#bd28773e2642881aec51544924299c5cd822185b" +domexception@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/domexception/-/domexception-1.0.0.tgz#81fe5df81b3f057052cde3a9fa9bf536a85b9ab0" + domhandler@^2.3.0: version "2.4.1" resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.4.1.tgz#892e47000a99be55bbf3774ffea0561d8879c259" @@ -1727,19 +1745,13 @@ entities@^1.1.1, entities@~1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.1.tgz#6e5c2d0a5621b5dadaecef80b90edfb5cd7772f0" -errno@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.4.tgz#b896e23a9e5e8ba33871fc996abd3635fc9a1c7d" - dependencies: - prr "~0.0.0" - error-ex@^1.2.0, error-ex@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc" dependencies: is-arrayish "^0.2.1" -es-abstract@^1.7.0: +es-abstract@^1.5.1, es-abstract@^1.7.0: version "1.10.0" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.10.0.tgz#1ecb36c197842a00d8ee4c2dfd8646bb97d60864" dependencies: @@ -1761,7 +1773,7 @@ escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" -escodegen@^1.6.1: +escodegen@^1.9.0: version "1.9.0" resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.9.0.tgz#9811a2f265dc1cd3894420ee3717064b632b8852" dependencies: @@ -1772,9 +1784,9 @@ escodegen@^1.6.1: optionalDependencies: source-map "~0.5.6" -eslint-config-semistandard@^11.0.0: - version "11.0.0" - resolved "https://registry.yarnpkg.com/eslint-config-semistandard/-/eslint-config-semistandard-11.0.0.tgz#44eef7cfdfd47219e3a7b81b91b540e880bb2615" +eslint-config-semistandard@^12.0.0: + version "12.0.0" + resolved "https://registry.yarnpkg.com/eslint-config-semistandard/-/eslint-config-semistandard-12.0.0.tgz#e6482de68e05c2dbdddaf45c3078f6a97fe23f1a" eslint-config-standard-jsx@^4.0.0, eslint-config-standard-jsx@^4.0.2: version "4.0.2" @@ -1786,9 +1798,9 @@ eslint-config-standard-react@^5.0.0: dependencies: eslint-config-standard-jsx "^4.0.0" -eslint-config-standard@^10.2.1: - version "10.2.1" - resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-10.2.1.tgz#c061e4d066f379dc17cd562c64e819b4dd454591" +eslint-config-standard@^11.0.0-beta.0: + version "11.0.0-beta.0" + resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-11.0.0-beta.0.tgz#f8afe69803d95c685a4b8392b8793188eb03cbb3" eslint-import-resolver-node@^0.3.1: version "0.3.1" @@ -1855,28 +1867,32 @@ eslint-plugin-standard@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/eslint-plugin-standard/-/eslint-plugin-standard-3.0.1.tgz#34d0c915b45edc6f010393c7eef3823b08565cf2" -eslint-scope@^3.7.1: +eslint-scope@^3.7.1, eslint-scope@~3.7.1: version "3.7.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-3.7.1.tgz#3d63c3edfda02e06e01a452ad88caacc7cdcb6e8" dependencies: esrecurse "^4.1.0" estraverse "^4.1.1" -eslint@^4.11.0: - version "4.12.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.12.0.tgz#a7ce78eba8cc8f2443acfbbc870cc31a65135884" +eslint-visitor-keys@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d" + +eslint@^4.14.0: + version "4.14.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.14.0.tgz#96609768d1dd23304faba2d94b7fefe5a5447a82" dependencies: ajv "^5.3.0" babel-code-frame "^6.22.0" chalk "^2.1.0" concat-stream "^1.6.0" cross-spawn "^5.1.0" - debug "^3.0.1" + debug "^3.1.0" doctrine "^2.0.2" eslint-scope "^3.7.1" + eslint-visitor-keys "^1.0.0" espree "^3.5.2" esquery "^1.0.0" - estraverse "^4.2.0" esutils "^2.0.2" file-entry-cache "^2.0.0" functional-red-black-tree "^1.0.1" @@ -1992,16 +2008,16 @@ expand-template@^1.0.2: version "1.1.0" resolved "https://registry.yarnpkg.com/expand-template/-/expand-template-1.1.0.tgz#e09efba977bf98f9ee0ed25abd0c692e02aec3fc" -expect@^21.2.1: - version "21.2.1" - resolved "https://registry.yarnpkg.com/expect/-/expect-21.2.1.tgz#003ac2ac7005c3c29e73b38a272d4afadd6d1d7b" +expect@^22.0.3: + version "22.0.3" + resolved "https://registry.yarnpkg.com/expect/-/expect-22.0.3.tgz#bb486de7d41bf3eb60d3b16dfd1c158a4d91ddfa" dependencies: ansi-styles "^3.2.0" - jest-diff "^21.2.1" - jest-get-type "^21.2.0" - jest-matcher-utils "^21.2.1" - jest-message-util "^21.2.1" - jest-regex-util "^21.2.0" + jest-diff "^22.0.3" + jest-get-type "^22.0.3" + jest-matcher-utils "^22.0.3" + jest-message-util "^22.0.3" + jest-regex-util "^22.0.3" extend@^3.0.0, extend@~3.0.0, extend@~3.0.1: version "3.0.1" @@ -2111,9 +2127,9 @@ flat-cache@^1.2.1: graceful-fs "^4.1.2" write "^0.2.1" -flow-bin@^0.61.0: - version "0.61.0" - resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.61.0.tgz#d0473a8c35dbbf4de573823f4932124397d32d35" +flow-bin@^0.62.0: + version "0.62.0" + resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.62.0.tgz#14bca669a6e3f95c0bc0c2d1eb55ec4e98cb1d83" flow-copy-source@^1.2.1: version "1.2.1" @@ -2857,7 +2873,7 @@ isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" -istanbul-api@^1.1.1: +istanbul-api@^1.1.14: version "1.2.1" resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-1.2.1.tgz#0c60a0515eb11c7d65c6b50bba2c6e999acd8620" dependencies: @@ -2873,7 +2889,7 @@ istanbul-api@^1.1.1: mkdirp "^0.5.1" once "^1.4.0" -istanbul-lib-coverage@^1.0.1, istanbul-lib-coverage@^1.1.1: +istanbul-lib-coverage@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.1.1.tgz#73bfb998885299415c93d38a3e9adf784a77a9da" @@ -2883,7 +2899,7 @@ istanbul-lib-hook@^1.1.0: dependencies: append-transform "^0.4.0" -istanbul-lib-instrument@^1.4.2, istanbul-lib-instrument@^1.7.5, istanbul-lib-instrument@^1.9.1: +istanbul-lib-instrument@^1.7.5, istanbul-lib-instrument@^1.8.0, istanbul-lib-instrument@^1.9.1: version "1.9.1" resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.9.1.tgz#250b30b3531e5d3251299fdd64b0b2c9db6b558e" dependencies: @@ -2904,7 +2920,7 @@ istanbul-lib-report@^1.1.2: path-parse "^1.0.5" supports-color "^3.1.2" -istanbul-lib-source-maps@^1.1.0, istanbul-lib-source-maps@^1.2.2: +istanbul-lib-source-maps@^1.2.1, istanbul-lib-source-maps@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.2.tgz#750578602435f28a0c04ee6d7d9e0f2960e62c1c" dependencies: @@ -2920,230 +2936,251 @@ istanbul-reports@^1.1.3: dependencies: handlebars "^4.0.3" -jest-changed-files@^21.2.0: - version "21.2.0" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-21.2.0.tgz#5dbeecad42f5d88b482334902ce1cba6d9798d29" +jest-changed-files@^22.0.3: + version "22.0.3" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-22.0.3.tgz#3771315acfa24a0ed7e6c545de620db6f1b2d164" dependencies: throat "^4.0.0" -jest-cli@^21.2.1: - version "21.2.1" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-21.2.1.tgz#9c528b6629d651911138d228bdb033c157ec8c00" +jest-cli@^22.0.4: + version "22.0.4" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-22.0.4.tgz#0052abaad45c57861c05da8ab5d27bad13ad224d" dependencies: ansi-escapes "^3.0.0" chalk "^2.0.1" glob "^7.1.2" graceful-fs "^4.1.11" is-ci "^1.0.10" - istanbul-api "^1.1.1" - istanbul-lib-coverage "^1.0.1" - istanbul-lib-instrument "^1.4.2" - istanbul-lib-source-maps "^1.1.0" - jest-changed-files "^21.2.0" - jest-config "^21.2.1" - jest-environment-jsdom "^21.2.1" - jest-haste-map "^21.2.0" - jest-message-util "^21.2.1" - jest-regex-util "^21.2.0" - jest-resolve-dependencies "^21.2.0" - jest-runner "^21.2.1" - jest-runtime "^21.2.1" - jest-snapshot "^21.2.1" - jest-util "^21.2.1" + istanbul-api "^1.1.14" + istanbul-lib-coverage "^1.1.1" + istanbul-lib-instrument "^1.8.0" + istanbul-lib-source-maps "^1.2.1" + jest-changed-files "^22.0.3" + jest-config "^22.0.4" + jest-environment-jsdom "^22.0.4" + jest-get-type "^22.0.3" + jest-haste-map "^22.0.3" + jest-message-util "^22.0.3" + jest-regex-util "^22.0.3" + jest-resolve-dependencies "^22.0.3" + jest-runner "^22.0.4" + jest-runtime "^22.0.4" + jest-snapshot "^22.0.3" + jest-util "^22.0.4" + jest-worker "^22.0.3" micromatch "^2.3.11" - node-notifier "^5.0.2" - pify "^3.0.0" + node-notifier "^5.1.2" + realpath-native "^1.0.0" + rimraf "^2.5.4" slash "^1.0.0" string-length "^2.0.0" strip-ansi "^4.0.0" which "^1.2.12" - worker-farm "^1.3.1" - yargs "^9.0.0" + yargs "^10.0.3" -jest-config@^21.2.1: - version "21.2.1" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-21.2.1.tgz#c7586c79ead0bcc1f38c401e55f964f13bf2a480" +jest-config@^22.0.4: + version "22.0.4" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-22.0.4.tgz#9c2a46c0907b1a1af54d9cdbf18e99b447034e11" dependencies: chalk "^2.0.1" glob "^7.1.1" - jest-environment-jsdom "^21.2.1" - jest-environment-node "^21.2.1" - jest-get-type "^21.2.0" - jest-jasmine2 "^21.2.1" - jest-regex-util "^21.2.0" - jest-resolve "^21.2.0" - jest-util "^21.2.1" - jest-validate "^21.2.1" - pretty-format "^21.2.1" - -jest-diff@^21.2.1: - version "21.2.1" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-21.2.1.tgz#46cccb6cab2d02ce98bc314011764bb95b065b4f" + jest-environment-jsdom "^22.0.4" + jest-environment-node "^22.0.4" + jest-get-type "^22.0.3" + jest-jasmine2 "^22.0.4" + jest-regex-util "^22.0.3" + jest-resolve "^22.0.4" + jest-util "^22.0.4" + jest-validate "^22.0.3" + pretty-format "^22.0.3" + +jest-diff@^22.0.3: + version "22.0.3" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-22.0.3.tgz#ffed5aba6beaf63bb77819ba44dd520168986321" dependencies: chalk "^2.0.1" diff "^3.2.0" - jest-get-type "^21.2.0" - pretty-format "^21.2.1" + jest-get-type "^22.0.3" + pretty-format "^22.0.3" -jest-docblock@^21.2.0: - version "21.2.0" - resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-21.2.0.tgz#51529c3b30d5fd159da60c27ceedc195faf8d414" +jest-docblock@^22.0.3: + version "22.0.3" + resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-22.0.3.tgz#c33aa22682b9fc68a5373f5f82994428a2ded601" + dependencies: + detect-newline "^2.1.0" -jest-environment-jsdom@^21.2.1: - version "21.2.1" - resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-21.2.1.tgz#38d9980c8259b2a608ec232deee6289a60d9d5b4" +jest-environment-jsdom@^22.0.4: + version "22.0.4" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-22.0.4.tgz#5723d4e724775ed38948de792e62f2d6a7f452df" dependencies: - jest-mock "^21.2.0" - jest-util "^21.2.1" - jsdom "^9.12.0" + jest-mock "^22.0.3" + jest-util "^22.0.4" + jsdom "^11.5.1" -jest-environment-node@^21.2.1: - version "21.2.1" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-21.2.1.tgz#98c67df5663c7fbe20f6e792ac2272c740d3b8c8" +jest-environment-node@^22.0.4: + version "22.0.4" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-22.0.4.tgz#068671f85a545f96a5469be3a3dd228fca79c709" dependencies: - jest-mock "^21.2.0" - jest-util "^21.2.1" + jest-mock "^22.0.3" + jest-util "^22.0.4" -jest-get-type@^21.2.0: - version "21.2.0" - resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-21.2.0.tgz#f6376ab9db4b60d81e39f30749c6c466f40d4a23" +jest-get-type@^22.0.3: + version "22.0.3" + resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-22.0.3.tgz#fa894b677c0fcd55eff3fd8ee28c7be942e32d36" -jest-haste-map@^21.2.0: - version "21.2.0" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-21.2.0.tgz#1363f0a8bb4338f24f001806571eff7a4b2ff3d8" +jest-haste-map@^22.0.3: + version "22.0.3" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-22.0.3.tgz#c9ecb5c871c5465d4bde4139e527fa0dc784aa2d" dependencies: fb-watchman "^2.0.0" graceful-fs "^4.1.11" - jest-docblock "^21.2.0" + jest-docblock "^22.0.3" + jest-worker "^22.0.3" micromatch "^2.3.11" sane "^2.0.0" - worker-farm "^1.3.1" -jest-jasmine2@^21.2.1: - version "21.2.1" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-21.2.1.tgz#9cc6fc108accfa97efebce10c4308548a4ea7592" +jest-jasmine2@^22.0.4: + version "22.0.4" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-22.0.4.tgz#f7c0965116efe831ec674dc954b0134639b3dcee" dependencies: + callsites "^2.0.0" chalk "^2.0.1" - expect "^21.2.1" + expect "^22.0.3" graceful-fs "^4.1.11" - jest-diff "^21.2.1" - jest-matcher-utils "^21.2.1" - jest-message-util "^21.2.1" - jest-snapshot "^21.2.1" - p-cancelable "^0.3.0" + jest-diff "^22.0.3" + jest-matcher-utils "^22.0.3" + jest-message-util "^22.0.3" + jest-snapshot "^22.0.3" + source-map-support "^0.5.0" + +jest-leak-detector@^22.0.3: + version "22.0.3" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-22.0.3.tgz#b64904f0e8954a11edb79b0809ff4717fa762d99" + dependencies: + pretty-format "^22.0.3" + optionalDependencies: + weak "^1.0.1" -jest-matcher-utils@^21.2.1: - version "21.2.1" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-21.2.1.tgz#72c826eaba41a093ac2b4565f865eb8475de0f64" +jest-matcher-utils@^22.0.3: + version "22.0.3" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-22.0.3.tgz#2ec15ca1af7dcabf4daddc894ccce224b948674e" dependencies: chalk "^2.0.1" - jest-get-type "^21.2.0" - pretty-format "^21.2.1" + jest-get-type "^22.0.3" + pretty-format "^22.0.3" -jest-message-util@^21.2.1: - version "21.2.1" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-21.2.1.tgz#bfe5d4692c84c827d1dcf41823795558f0a1acbe" +jest-message-util@^22.0.3: + version "22.0.3" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-22.0.3.tgz#bf674b2762ef2dd53facf2136423fcca264976df" dependencies: + "@babel/code-frame" "^7.0.0-beta.35" chalk "^2.0.1" micromatch "^2.3.11" slash "^1.0.0" + stack-utils "^1.0.1" -jest-mock@^21.2.0: - version "21.2.0" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-21.2.0.tgz#7eb0770e7317968165f61ea2a7281131534b3c0f" +jest-mock@^22.0.3: + version "22.0.3" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-22.0.3.tgz#c875e47b5b729c6c020a2fab317b275c0cf88961" -jest-regex-util@^21.2.0: - version "21.2.0" - resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-21.2.0.tgz#1b1e33e63143babc3e0f2e6c9b5ba1eb34b2d530" +jest-regex-util@^22.0.3: + version "22.0.3" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-22.0.3.tgz#c5c10229de5ce2b27bf4347916d95b802ae9aa4d" -jest-resolve-dependencies@^21.2.0: - version "21.2.0" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-21.2.0.tgz#9e231e371e1a736a1ad4e4b9a843bc72bfe03d09" +jest-resolve-dependencies@^22.0.3: + version "22.0.3" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-22.0.3.tgz#202ddf370069702cd1865a1952fcc7e52c92720e" dependencies: - jest-regex-util "^21.2.0" + jest-regex-util "^22.0.3" -jest-resolve@^21.2.0: - version "21.2.0" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-21.2.0.tgz#068913ad2ba6a20218e5fd32471f3874005de3a6" +jest-resolve@^22.0.4: + version "22.0.4" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-22.0.4.tgz#a6e47f55e9388c7341b5e9732aedc6fe30906121" dependencies: browser-resolve "^1.11.2" chalk "^2.0.1" - is-builtin-module "^1.0.0" -jest-runner@^21.2.1: - version "21.2.1" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-21.2.1.tgz#194732e3e518bfb3d7cbfc0fd5871246c7e1a467" - dependencies: - jest-config "^21.2.1" - jest-docblock "^21.2.0" - jest-haste-map "^21.2.0" - jest-jasmine2 "^21.2.1" - jest-message-util "^21.2.1" - jest-runtime "^21.2.1" - jest-util "^21.2.1" - pify "^3.0.0" +jest-runner@^22.0.4: + version "22.0.4" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-22.0.4.tgz#3aa43a31b05ce8271539df580c2eb916023d3367" + dependencies: + jest-config "^22.0.4" + jest-docblock "^22.0.3" + jest-haste-map "^22.0.3" + jest-jasmine2 "^22.0.4" + jest-leak-detector "^22.0.3" + jest-message-util "^22.0.3" + jest-runtime "^22.0.4" + jest-util "^22.0.4" + jest-worker "^22.0.3" throat "^4.0.0" - worker-farm "^1.3.1" -jest-runtime@^21.2.1: - version "21.2.1" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-21.2.1.tgz#99dce15309c670442eee2ebe1ff53a3cbdbbb73e" +jest-runtime@^22.0.4: + version "22.0.4" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-22.0.4.tgz#8f69aa7b5fbb3acd35dc262cbf654e563f69b7b4" dependencies: babel-core "^6.0.0" - babel-jest "^21.2.0" - babel-plugin-istanbul "^4.0.0" + babel-jest "^22.0.4" + babel-plugin-istanbul "^4.1.5" chalk "^2.0.1" convert-source-map "^1.4.0" graceful-fs "^4.1.11" - jest-config "^21.2.1" - jest-haste-map "^21.2.0" - jest-regex-util "^21.2.0" - jest-resolve "^21.2.0" - jest-util "^21.2.1" + jest-config "^22.0.4" + jest-haste-map "^22.0.3" + jest-regex-util "^22.0.3" + jest-resolve "^22.0.4" + jest-util "^22.0.4" json-stable-stringify "^1.0.1" micromatch "^2.3.11" + realpath-native "^1.0.0" slash "^1.0.0" strip-bom "3.0.0" write-file-atomic "^2.1.0" - yargs "^9.0.0" + yargs "^10.0.3" -jest-snapshot@^21.2.1: - version "21.2.1" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-21.2.1.tgz#29e49f16202416e47343e757e5eff948c07fd7b0" +jest-snapshot@^22.0.3: + version "22.0.3" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-22.0.3.tgz#a949b393781d2fdb4773f6ea765dd67ad1da291e" dependencies: chalk "^2.0.1" - jest-diff "^21.2.1" - jest-matcher-utils "^21.2.1" + jest-diff "^22.0.3" + jest-matcher-utils "^22.0.3" mkdirp "^0.5.1" natural-compare "^1.4.0" - pretty-format "^21.2.1" + pretty-format "^22.0.3" -jest-util@^21.2.1: - version "21.2.1" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-21.2.1.tgz#a274b2f726b0897494d694a6c3d6a61ab819bb78" +jest-util@^22.0.4: + version "22.0.4" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-22.0.4.tgz#d920a513e0645aaab030cee38e4fe7d5bed8bb6d" dependencies: callsites "^2.0.0" chalk "^2.0.1" graceful-fs "^4.1.11" - jest-message-util "^21.2.1" - jest-mock "^21.2.0" - jest-validate "^21.2.1" + is-ci "^1.0.10" + jest-message-util "^22.0.3" + jest-validate "^22.0.3" mkdirp "^0.5.1" -jest-validate@^21.2.1: - version "21.2.1" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-21.2.1.tgz#cc0cbca653cd54937ba4f2a111796774530dd3c7" +jest-validate@^22.0.3: + version "22.0.3" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-22.0.3.tgz#2850d949a36c48b1a40f7eebae1d8539126f7829" dependencies: chalk "^2.0.1" - jest-get-type "^21.2.0" + jest-get-type "^22.0.3" leven "^2.1.0" - pretty-format "^21.2.1" + pretty-format "^22.0.3" -jest@^21.2.1: - version "21.2.1" - resolved "https://registry.yarnpkg.com/jest/-/jest-21.2.1.tgz#c964e0b47383768a1438e3ccf3c3d470327604e1" +jest-worker@^22.0.3: + version "22.0.3" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-22.0.3.tgz#30433faca67814a8f80559f75ab2ceaa61332fd2" dependencies: - jest-cli "^21.2.1" + merge-stream "^1.0.1" + +jest@^22.0.0: + version "22.0.4" + resolved "https://registry.yarnpkg.com/jest/-/jest-22.0.4.tgz#d3cf560ece6b825b115dce80b9826ceb40f87961" + dependencies: + jest-cli "^22.0.4" js-base64@^2.1.9: version "2.3.2" @@ -3170,28 +3207,33 @@ jsdoctypeparser@^1.2.0: dependencies: lodash "^3.7.0" -jsdom@^9.12.0: - version "9.12.0" - resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-9.12.0.tgz#e8c546fffcb06c00d4833ca84410fed7f8a097d4" +jsdom@^11.5.1: + version "11.5.1" + resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-11.5.1.tgz#5df753b8d0bca20142ce21f4f6c039f99a992929" dependencies: abab "^1.0.3" - acorn "^4.0.4" - acorn-globals "^3.1.0" + acorn "^5.1.2" + acorn-globals "^4.0.0" array-equal "^1.0.0" + browser-process-hrtime "^0.1.2" content-type-parser "^1.0.1" cssom ">= 0.3.2 < 0.4.0" cssstyle ">= 0.2.37 < 0.3.0" - escodegen "^1.6.1" + domexception "^1.0.0" + escodegen "^1.9.0" html-encoding-sniffer "^1.0.1" - nwmatcher ">= 1.3.9 < 2.0.0" - parse5 "^1.5.1" - request "^2.79.0" + left-pad "^1.2.0" + nwmatcher "^1.4.3" + parse5 "^3.0.2" + pn "^1.0.0" + request "^2.83.0" + request-promise-native "^1.0.3" sax "^1.2.1" symbol-tree "^3.2.1" - tough-cookie "^2.3.2" - webidl-conversions "^4.0.0" + tough-cookie "^2.3.3" + webidl-conversions "^4.0.2" whatwg-encoding "^1.0.1" - whatwg-url "^4.3.0" + whatwg-url "^6.3.0" xml-name-validator "^2.0.1" jsesc@^1.3.0: @@ -3309,6 +3351,10 @@ lcov-parse@^0.0.10: version "0.0.10" resolved "https://registry.yarnpkg.com/lcov-parse/-/lcov-parse-0.0.10.tgz#1b0b8ff9ac9c7889250582b70b71315d9da6d9a3" +left-pad@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.2.0.tgz#d30a73c6b8201d8f7d8e7956ba9616087a68e0ee" + lerna@^2.5.1: version "2.5.1" resolved "https://registry.yarnpkg.com/lerna/-/lerna-2.5.1.tgz#d07099bd3051ee799f98c753328bd69e96c6fab8" @@ -3412,6 +3458,10 @@ lodash.cond@^4.3.0: version "4.5.2" resolved "https://registry.yarnpkg.com/lodash.cond/-/lodash.cond-4.5.2.tgz#f471a1da486be60f6ab955d17115523dd1d255d5" +lodash.sortby@^4.7.0: + version "4.7.0" + resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" + lodash.template@^4.0.2: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.4.0.tgz#e73a0385c8355591746e020b99679c690e68fba0" @@ -3429,7 +3479,7 @@ lodash@^3.7.0: version "3.10.1" resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6" -lodash@^4.0.0, lodash@^4.1.0, lodash@^4.14.0, lodash@^4.15.0, lodash@^4.17.4, lodash@^4.2.0, lodash@^4.2.1, lodash@^4.3.0, lodash@~4.17.2: +lodash@^4.0.0, lodash@^4.1.0, lodash@^4.13.1, lodash@^4.14.0, lodash@^4.15.0, lodash@^4.17.4, lodash@^4.2.0, lodash@^4.2.1, lodash@^4.3.0, lodash@~4.17.2: version "4.17.4" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" @@ -3555,6 +3605,12 @@ meow@^3.3.0, meow@^3.7.0: redent "^1.0.0" trim-newlines "^1.0.0" +merge-stream@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-1.0.1.tgz#4041202d508a342ba00174008df0c251b8c135e1" + dependencies: + readable-stream "^2.0.1" + merge@^1.1.3: version "1.2.0" resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.0.tgz#7531e39d4949c281a66b8c5a6e0265e8b05894da" @@ -3643,7 +3699,7 @@ mute-stream@0.0.7: version "0.0.7" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" -nan@^2.2.1, nan@^2.3.0, nan@^2.3.3: +nan@^2.0.5, nan@^2.2.1, nan@^2.3.0, nan@^2.3.3: version "2.8.0" resolved "https://registry.yarnpkg.com/nan/-/nan-2.8.0.tgz#ed715f3fe9de02b57a5e6252d90a96675e1f085a" @@ -3682,7 +3738,7 @@ node-int64@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" -node-notifier@^5.0.2: +node-notifier@^5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-5.1.2.tgz#2fa9e12605fa10009d44549d6fcd8a63dde0e4ff" dependencies: @@ -3764,7 +3820,7 @@ number-is-nan@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" -"nwmatcher@>= 1.3.9 < 2.0.0": +nwmatcher@^1.4.3: version "1.4.3" resolved "https://registry.yarnpkg.com/nwmatcher/-/nwmatcher-1.4.3.tgz#64348e3b3d80f035b40ac11563d278f8b72db89c" @@ -3780,6 +3836,13 @@ object-keys@^1.0.8: version "1.0.11" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.11.tgz#c54601778ad560f1142ce0e01bcca8b56d13426d" +object.getownpropertydescriptors@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz#8758c846f5b407adab0f236e0986f14b051caa16" + dependencies: + define-properties "^1.1.2" + es-abstract "^1.5.1" + object.omit@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" @@ -3848,10 +3911,6 @@ output-file-sync@^1.1.2: mkdirp "^0.5.1" object-assign "^4.1.0" -p-cancelable@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.3.0.tgz#b9e123800bcebb7ac13a479be195b507b98d30fa" - p-finally@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" @@ -3911,9 +3970,11 @@ parse-json@^3.0.0: dependencies: error-ex "^1.3.1" -parse5@^1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/parse5/-/parse5-1.5.1.tgz#9b7f3b0de32be78dc2401b17573ccaf0f6f59d94" +parse5@^3.0.2: + version "3.0.3" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-3.0.3.tgz#042f792ffdd36851551cf4e9e066b3874ab45b5c" + dependencies: + "@types/node" "*" path-dirname@^1.0.0: version "1.0.2" @@ -4001,6 +4062,10 @@ pluralize@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-7.0.0.tgz#298b89df8b93b0221dbf421ad2b1b1ea23fc6777" +pn@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/pn/-/pn-1.0.0.tgz#1cf5a30b0d806cd18f88fc41a6b5d4ad615b3ba9" + postcss-html@^0.11.0: version "0.11.0" resolved "https://registry.yarnpkg.com/postcss-html/-/postcss-html-0.11.0.tgz#03a3ff3116f8a0fe0d46316ea21893d4db4b63af" @@ -4111,9 +4176,9 @@ preserve@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" -pretty-format@^21.2.1: - version "21.2.1" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-21.2.1.tgz#ae5407f3cf21066cd011aa1ba5fce7b6a2eddb36" +pretty-format@^22.0.3: + version "22.0.3" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-22.0.3.tgz#a2bfa59fc33ad24aa4429981bb52524b41ba5dd7" dependencies: ansi-regex "^3.0.0" ansi-styles "^3.2.0" @@ -4148,10 +4213,6 @@ propagate@0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/propagate/-/propagate-0.4.0.tgz#f3fcca0a6fe06736a7ba572966069617c130b481" -prr@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/prr/-/prr-0.0.0.tgz#1a84b85908325501411853d0081ee3fa86e2926a" - pseudomap@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" @@ -4167,6 +4228,10 @@ punycode@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" +punycode@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.0.tgz#5f863edc89b96db09074bad7947bf09056ca4e7d" + q@^1.4.1: version "1.5.1" resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" @@ -4231,7 +4296,7 @@ read-pkg@^2.0.0: normalize-package-data "^2.3.2" path-type "^2.0.0" -readable-stream@^2.0.0, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.4, readable-stream@^2.1.5, readable-stream@^2.2.2: +readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.4, readable-stream@^2.1.5, readable-stream@^2.2.2: version "2.3.3" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.3.tgz#368f2512d79f9d46fdfc71349ae7878bbc1eb95c" dependencies: @@ -4252,6 +4317,12 @@ readdirp@^2.0.0: readable-stream "^2.0.2" set-immediate-shim "^1.0.1" +realpath-native@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/realpath-native/-/realpath-native-1.0.0.tgz#7885721a83b43bd5327609f0ddecb2482305fdf0" + dependencies: + util.promisify "^1.0.0" + redent@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/redent/-/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde" @@ -4385,6 +4456,20 @@ replace-ext@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-1.0.0.tgz#de63128373fcbf7c3ccfa4de5a480c45a67958eb" +request-promise-core@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/request-promise-core/-/request-promise-core-1.1.1.tgz#3eee00b2c5aa83239cfb04c5700da36f81cd08b6" + dependencies: + lodash "^4.13.1" + +request-promise-native@^1.0.3: + version "1.0.5" + resolved "https://registry.yarnpkg.com/request-promise-native/-/request-promise-native-1.0.5.tgz#5281770f68e0c9719e5163fd3fab482215f4fda5" + dependencies: + request-promise-core "1.1.1" + stealthy-require "^1.1.0" + tough-cookie ">=2.3.3" + request@2.81.0: version "2.81.0" resolved "https://registry.yarnpkg.com/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0" @@ -4412,7 +4497,7 @@ request@2.81.0: tunnel-agent "^0.6.0" uuid "^3.0.0" -request@^2.79.0: +request@^2.79.0, request@^2.83.0: version "2.83.0" resolved "https://registry.yarnpkg.com/request/-/request-2.83.0.tgz#ca0b65da02ed62935887808e6f510381034e3356" dependencies: @@ -4489,7 +4574,7 @@ right-align@^0.1.1: dependencies: align-text "^0.1.1" -rimraf@2, rimraf@^2.2.8, rimraf@^2.5.1, rimraf@^2.6.1, rimraf@^2.6.2: +rimraf@2, rimraf@^2.2.8, rimraf@^2.5.1, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" dependencies: @@ -4613,6 +4698,12 @@ source-map-support@^0.4.15: dependencies: source-map "^0.5.6" +source-map-support@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.0.tgz#2018a7ad2bdf8faf2691e5fddab26bed5a2bacab" + dependencies: + source-map "^0.6.0" + source-map@^0.4.4: version "0.4.4" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" @@ -4623,7 +4714,7 @@ source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.1, source-map@~0.5.6: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" -source-map@^0.6.1: +source-map@^0.6.0, source-map@^0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" @@ -4675,10 +4766,18 @@ sshpk@^1.7.0: jsbn "~0.1.0" tweetnacl "~0.14.0" +stack-utils@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-1.0.1.tgz#d4f33ab54e8e38778b0ca5cfd3b3afb12db68620" + state-toggle@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/state-toggle/-/state-toggle-1.0.0.tgz#d20f9a616bb4f0c3b98b91922d25b640aa2bc425" +stealthy-require@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b" + string-length@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/string-length/-/string-length-2.0.0.tgz#d40dbb686a3ace960c1cffca562bf2c45f8363ed" @@ -4988,15 +5087,17 @@ to-fast-properties@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" -tough-cookie@^2.3.2, tough-cookie@~2.3.0, tough-cookie@~2.3.3: +tough-cookie@>=2.3.3, tough-cookie@^2.3.3, tough-cookie@~2.3.0, tough-cookie@~2.3.3: version "2.3.3" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.3.tgz#0b618a5565b6dea90bf3425d04d55edc475a7561" dependencies: punycode "^1.4.1" -tr46@~0.0.3: - version "0.0.3" - resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" +tr46@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09" + dependencies: + punycode "^2.1.0" trim-newlines@^1.0.0: version "1.0.0" @@ -5170,6 +5271,13 @@ util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" +util.promisify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/util.promisify/-/util.promisify-1.0.0.tgz#440f7165a459c9a16dc145eb8e72f35687097030" + dependencies: + define-properties "^1.1.2" + object.getownpropertydescriptors "^2.0.3" + uuid@^2.0.1: version "2.0.3" resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.3.tgz#67e2e863797215530dff318e5bf9dcebfd47b21a" @@ -5237,11 +5345,14 @@ wcwidth@^1.0.0: dependencies: defaults "^1.0.3" -webidl-conversions@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" +weak@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/weak/-/weak-1.0.1.tgz#ab99aab30706959aa0200cb8cf545bb9cb33b99e" + dependencies: + bindings "^1.2.1" + nan "^2.0.5" -webidl-conversions@^4.0.0: +webidl-conversions@^4.0.1, webidl-conversions@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" @@ -5264,12 +5375,13 @@ whatwg-fetch@>=0.10.0: version "2.0.3" resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.3.tgz#9c84ec2dcf68187ff00bc64e1274b442176e1c84" -whatwg-url@^4.3.0: - version "4.8.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-4.8.0.tgz#d2981aa9148c1e00a41c5a6131166ab4683bbcc0" +whatwg-url@^6.3.0: + version "6.4.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-6.4.0.tgz#08fdf2b9e872783a7a1f6216260a1d66cc722e08" dependencies: - tr46 "~0.0.3" - webidl-conversions "^3.0.0" + lodash.sortby "^4.7.0" + tr46 "^1.0.0" + webidl-conversions "^4.0.1" which-module@^2.0.0: version "2.0.0" @@ -5303,13 +5415,6 @@ wordwrap@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" -worker-farm@^1.3.1: - version "1.5.2" - resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.5.2.tgz#32b312e5dc3d5d45d79ef44acc2587491cd729ae" - dependencies: - errno "^0.1.4" - xtend "^4.0.1" - wrap-ansi@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" @@ -5387,27 +5492,32 @@ yargs-parser@^7.0.0: dependencies: camelcase "^4.1.0" -yargs@^8.0.2: - version "8.0.2" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-8.0.2.tgz#6299a9055b1cefc969ff7e79c1d918dceb22c360" +yargs-parser@^8.0.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-8.1.0.tgz#f1376a33b6629a5d063782944da732631e966950" dependencies: camelcase "^4.1.0" + +yargs@^10.0.3: + version "10.0.3" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-10.0.3.tgz#6542debd9080ad517ec5048fb454efe9e4d4aaae" + dependencies: cliui "^3.2.0" decamelize "^1.1.1" + find-up "^2.1.0" get-caller-file "^1.0.1" os-locale "^2.0.0" - read-pkg-up "^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 "^7.0.0" + yargs-parser "^8.0.0" -yargs@^9.0.0: - version "9.0.1" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-9.0.1.tgz#52acc23feecac34042078ee78c0c007f5085db4c" +yargs@^8.0.2: + version "8.0.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-8.0.2.tgz#6299a9055b1cefc969ff7e79c1d918dceb22c360" dependencies: camelcase "^4.1.0" cliui "^3.2.0" From b0c833e0d4a0df41668a249308bf37a71575b139 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Sat, 30 Dec 2017 21:47:22 +0100 Subject: [PATCH 2/2] Flow updates fro new flow-bin --- flow-typed/isomorphic-fetch.js | 5 ----- flow-typed/websocket.js | 7 ------- package.json | 2 +- packages/api-format/src/input.js | 5 ++--- packages/api-format/src/output.js | 5 ++--- packages/api-format/src/types.js | 3 ++- packages/api-format/src/util.js | 19 ++++++++++++++----- packages/api-provider/src/ws/index.js | 18 +++++++++--------- yarn.lock | 6 +++--- 9 files changed, 33 insertions(+), 37 deletions(-) delete mode 100644 flow-typed/isomorphic-fetch.js delete mode 100644 flow-typed/websocket.js diff --git a/flow-typed/isomorphic-fetch.js b/flow-typed/isomorphic-fetch.js deleted file mode 100644 index 8045349c6f62..000000000000 --- a/flow-typed/isomorphic-fetch.js +++ /dev/null @@ -1,5 +0,0 @@ -// @flow - -declare module 'isomorphic-fetch' { - declare module.exports: void -} diff --git a/flow-typed/websocket.js b/flow-typed/websocket.js deleted file mode 100644 index 834815935039..000000000000 --- a/flow-typed/websocket.js +++ /dev/null @@ -1,7 +0,0 @@ -// @flow - -declare module 'websocket' { - declare module.exports: { - w3cwebsocket: WebSocket - }; -} diff --git a/package.json b/package.json index 67c475798887..c57fb0ce4a42 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "test": "jest --coverage" }, "devDependencies": { - "@polkadot/dev": "^0.14.5", + "@polkadot/dev": "^0.14.6", "lerna": "^2.5.1" } } diff --git a/packages/api-format/src/input.js b/packages/api-format/src/input.js index c4cf4d0cd5eb..815efab26395 100644 --- a/packages/api-format/src/input.js +++ b/packages/api-format/src/input.js @@ -1,8 +1,7 @@ // ISC, Copyright 2017 Jaco Greeff // @flow -import type { FormatInputType, InterfaceInputType } from '@polkadot/api-jsonrpc/types'; -import type { FormatterFunction } from './types'; +import type { InterfaceInputType } from '@polkadot/api-jsonrpc/types'; const accountIdEncode = require('@polkadot/primitives-json/accountId/encode'); const h256Encode = require('@polkadot/primitives-json/h256/encode'); @@ -12,7 +11,7 @@ const headerHashEncode = require('@polkadot/primitives-json/headerHash/encode'); const echo = require('./echo'); const util = require('./util'); -const formatters: { [FormatInputType]: FormatterFunction } = { +const formatters = { 'Address': accountIdEncode, 'CallData': hashEncode, 'H256': h256Encode, diff --git a/packages/api-format/src/output.js b/packages/api-format/src/output.js index b6c58692c982..87b8a12b9dbd 100644 --- a/packages/api-format/src/output.js +++ b/packages/api-format/src/output.js @@ -1,15 +1,14 @@ // ISC, Copyright 2017 Jaco Greeff // @flow -import type { FormatOutputType, InterfaceOutputType } from '@polkadot/api-jsonrpc/types'; -import type { FormatterFunction } from './types'; +import type { InterfaceOutputType } from '@polkadot/api-jsonrpc/types'; const headerDecode = require('@polkadot/primitives-json/header/decode'); const echo = require('./echo'); const util = require('./util'); -const formatters: { [FormatOutputType]: FormatterFunction } = { +const formatters = { 'Header': headerDecode, 'OutData': echo, 'StorageData': echo diff --git a/packages/api-format/src/types.js b/packages/api-format/src/types.js index 249916454588..16f39f1c115b 100644 --- a/packages/api-format/src/types.js +++ b/packages/api-format/src/types.js @@ -1,4 +1,5 @@ // ISC, Copyright 2017 Jaco Greeff // @flow -export type FormatterFunction = (value: mixed) => mixed; +// flowlint-next-line unclear-type:off +export type FormatterFunction = (value: any) => mixed; diff --git a/packages/api-format/src/util.js b/packages/api-format/src/util.js index 5825de722c26..94a0bceca663 100644 --- a/packages/api-format/src/util.js +++ b/packages/api-format/src/util.js @@ -1,14 +1,20 @@ // ISC, Copyright 2017 Jaco Greeff // @flow +import type { FormatInputType, FormatOutputType } from '@polkadot/api-jsonrpc/types'; import type { FormatterFunction } from './types'; +type FormattersFunctionType = FormatInputType | FormatOutputType; +type FormattersFunctionMap = { + [FormattersFunctionType]: FormatterFunction +}; + const isUndefined = require('@polkadot/util/is/undefined'); const echo = require('./echo'); const arrayTypeRegex = /\[\]$/; -function formatSingleType (formatters: { [string]: FormatterFunction }, type: string, value: mixed): mixed { +function formatSingleType (formatters: FormattersFunctionMap, type: FormattersFunctionType, value: mixed): mixed { const formatter: FormatterFunction = formatters[type]; if (isUndefined(formatter)) { @@ -20,27 +26,30 @@ function formatSingleType (formatters: { [string]: FormatterFunction }, type: st try { return formatter(value); } catch (error) { + // $FlowFixMe just let JS coerce all it wants to throw new Error(`Error formatting '${value}' as '${type}': ${error.message}`); } } -function formatArrayType (formatters: { [string]: FormatterFunction }, type: string, value: Array): mixed { - type = type.replace(arrayTypeRegex, ''); +function formatArrayType (formatters: FormattersFunctionMap, type: FormattersFunctionType, value: Array): mixed { + // flowlint-next-line unclear-type:off + type = ((type.replace(arrayTypeRegex, ''): any): FormattersFunctionType); return value.map((value) => { return formatSingleType(formatters, type, value); }); } -function format (formatters: { [string]: FormatterFunction }, type: string, value: mixed): mixed { +function format (formatters: FormattersFunctionMap, type: FormattersFunctionType, value: mixed | Array): mixed { if (arrayTypeRegex.test(type)) { + // $FlowFixMe array type return formatArrayType(formatters, type, value); } return formatSingleType(formatters, type, value); } -function formatArray (formatters: { [string]: FormatterFunction }, types: Array, values: Array): Array { +function formatArray (formatters: FormattersFunctionMap, types: Array, values: Array): Array { return types.map((type, index): mixed => { return format(formatters, type, values[index]); }); diff --git a/packages/api-provider/src/ws/index.js b/packages/api-provider/src/ws/index.js index 13fb353e554d..1765f5b78aa3 100644 --- a/packages/api-provider/src/ws/index.js +++ b/packages/api-provider/src/ws/index.js @@ -7,10 +7,6 @@ type AwaitingType = { callback: (error: ?Error, result: mixed) => void }; -type WsMessageType = { - data: mixed -}; - require('./polyfill'); const assert = require('@polkadot/util/assert'); @@ -68,20 +64,24 @@ module.exports = class WsProvider extends JsonRpcCoder implements ProviderInterf // console.log('connected to', this._endpoint); this._isConnected = true; - Object.keys(this._queued).forEach((id: number) => { + Object.keys(this._queued).forEach((id) => { try { this._websocket.send( - this._queued[id] + // flowlint-next-line unclear-type:off + this._queued[((id: any): number)] ); - delete this._queued[id]; + + // flowlint-next-line unclear-type:off + delete this._queued[((id: any): number)]; } catch (error) { console.error(error); } }); } - _onMessage = (message: WsMessageType): void => { - const response: JsonRpcResponse = JSON.parse(message.data); + _onMessage = (message: MessageEvent): void => { + // flowlint-next-line unclear-type:off + const response: JsonRpcResponse = JSON.parse(((message.data: any): string)); const handler = this._handlers[response.id]; if (!handler) { diff --git a/yarn.lock b/yarn.lock index c457e7a245f6..d7ae390c83e6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -63,9 +63,9 @@ lodash "^4.2.0" to-fast-properties "^2.0.0" -"@polkadot/dev@^0.14.5": - version "0.14.5" - resolved "https://registry.yarnpkg.com/@polkadot/dev/-/dev-0.14.5.tgz#28c8583dced8675d1b06ddb34b549da3c99d9cdc" +"@polkadot/dev@^0.14.6": + version "0.14.6" + resolved "https://registry.yarnpkg.com/@polkadot/dev/-/dev-0.14.6.tgz#4677e48d6a0ce692acdaea75a36ee93968a60e48" dependencies: babel-cli "^6.26.0" babel-core "^6.26.0"