diff --git a/.eslintrc.js b/.eslintrc.js index 4ebd76b82db3..dacb799f1611 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -123,6 +123,7 @@ module.exports = { '^types/(.*)': './types/$1', }, }, + 'eslint-import-resolver-typescript': true, }, }, }; diff --git a/babel.config.js b/babel.config.js index f3807c45cee4..f2168c424613 100644 --- a/babel.config.js +++ b/babel.config.js @@ -2,6 +2,16 @@ module.exports = { babelrcRoots: ['examples/*'], + overrides: [ + { + presets: ['@babel/preset-flow'], + test: '**/*.js', + }, + { + presets: ['@babel/preset-typescript'], + test: '**/*.ts', + }, + ], plugins: [ ['@babel/plugin-transform-modules-commonjs', {allowTopLevelThis: true}], '@babel/plugin-transform-strict-mode', @@ -14,6 +24,5 @@ module.exports = { targets: {node: 6}, }, ], - '@babel/preset-flow', ], }; diff --git a/jest.config.js b/jest.config.js index 5a398f1cd095..fc6ef114c0fb 100644 --- a/jest.config.js +++ b/jest.config.js @@ -55,6 +55,6 @@ module.exports = { '/e2e/__tests__/iterator-to-null-test.js', ], transform: { - '^.+\\.js$': '/packages/babel-jest', + '^.+\\.[jt]s$': '/packages/babel-jest', }, }; diff --git a/package.json b/package.json index 2c1a4b692ace..807f678ea669 100644 --- a/package.json +++ b/package.json @@ -1,13 +1,17 @@ { "private": true, "devDependencies": { - "@babel/core": "^7.1.0", + "@babel/core": "^7.2.2", "@babel/plugin-external-helpers": "^7.0.0", "@babel/plugin-transform-strict-mode": "^7.0.0", "@babel/preset-env": "^7.1.0", "@babel/preset-flow": "^7.0.0", "@babel/preset-react": "^7.0.0", + "@babel/preset-typescript": "^7.0.0", "@babel/register": "^7.0.0", + "@types/babel__core": "^7.0.0", + "@types/babel__generator": "^7.0.0", + "@types/babel__template": "^7.0.0", "ansi-regex": "^4.0.0", "ansi-styles": "^3.2.0", "babel-eslint": "^9.0.0", @@ -17,6 +21,7 @@ "debug": "^4.0.1", "eslint": "^5.6.0", "eslint-config-prettier": "^3.1.0", + "eslint-import-resolver-typescript": "^1.1.1", "eslint-plugin-babel": "^5.1.0", "eslint-plugin-flowtype": "^2.35.0", "eslint-plugin-import": "^2.6.0", @@ -56,9 +61,8 @@ "resolve": "^1.4.0", "rimraf": "^2.6.2", "rollup": "^0.66.1", - "rollup-plugin-babel": "^4.0.0", + "rollup-plugin-babel": "^4.1.0", "rollup-plugin-commonjs": "^9.1.8", - "rollup-plugin-flow": "^1.1.1", "rollup-plugin-json": "^3.1.0", "rollup-plugin-node-builtins": "^2.1.1", "rollup-plugin-node-globals": "^1.4.0", @@ -66,7 +70,7 @@ "slash": "^2.0.0", "string-length": "^2.0.0", "strip-ansi": "^5.0.0", - "typescript": "^3.0.3", + "typescript": "^3.2.2", "watchify": "^3.9.0" }, "scripts": { diff --git a/packages/babel-jest/package.json b/packages/babel-jest/package.json index 6cc0a5134faf..9e6c8d974c2b 100644 --- a/packages/babel-jest/package.json +++ b/packages/babel-jest/package.json @@ -13,7 +13,8 @@ "babel-preset-jest": "^23.2.0" }, "devDependencies": { - "@babel/core": "^7.1.0" + "@babel/core": "^7.1.0", + "@types/babel__core": "^7.0.4" }, "peerDependencies": { "@babel/core": "^7.0.0" diff --git a/packages/expect/package.json b/packages/expect/package.json index 313df003904d..e78190f08eb3 100644 --- a/packages/expect/package.json +++ b/packages/expect/package.json @@ -16,6 +16,9 @@ "jest-message-util": "^23.4.0", "jest-regex-util": "^23.3.0" }, + "devDependencies": { + "@types/ansi-styles": "^3.2.1" + }, "engines": { "node": ">= 6" } diff --git a/packages/jest-changed-files/package.json b/packages/jest-changed-files/package.json index b94dae7dcfa4..fd7a58d09215 100644 --- a/packages/jest-changed-files/package.json +++ b/packages/jest-changed-files/package.json @@ -11,6 +11,9 @@ "execa": "^1.0.0", "throat": "^4.0.0" }, + "devDependencies": { + "@types/execa": "^0.9.0" + }, "engines": { "node": ">= 6" } diff --git a/packages/jest-circus/package.json b/packages/jest-circus/package.json index daa5853f288c..b8e926511208 100644 --- a/packages/jest-circus/package.json +++ b/packages/jest-circus/package.json @@ -23,6 +23,8 @@ "stack-utils": "^1.0.1" }, "devDependencies": { + "@types/babel__traverse": "^7.0.4", + "@types/stack-utils": "^1.0.1", "execa": "^1.0.0", "jest-runtime": "^23.6.0" }, diff --git a/packages/jest-cli/package.json b/packages/jest-cli/package.json index a3f983466ea1..079e2c37a4af 100644 --- a/packages/jest-cli/package.json +++ b/packages/jest-cli/package.json @@ -41,6 +41,23 @@ "which": "^1.2.12", "yargs": "^12.0.2" }, + "devDependencies": { + "@types/ansi-escapes": "^3.0.0", + "@types/exit": "^0.1.30", + "@types/glob": "^7.1.1", + "@types/graceful-fs": "^4.1.2", + "@types/is-ci": "^1.1.0", + "@types/istanbul-lib-coverage": "^1.1.0", + "@types/istanbul-lib-instrument": "^1.7.2", + "@types/istanbul-lib-source-maps": "^1.2.1", + "@types/micromatch": "^2.3.30", + "@types/node-notifier": "^0.0.28", + "@types/prompts": "^1.2.0", + "@types/rimraf": "^2.0.2", + "@types/string-length": "^2.0.0", + "@types/which": "^1.3.1", + "@types/yargs": "^12.0.2" + }, "bin": { "jest": "./bin/jest.js" }, diff --git a/packages/jest-config/package.json b/packages/jest-config/package.json index b00d0b7c52c7..3f5e21596341 100644 --- a/packages/jest-config/package.json +++ b/packages/jest-config/package.json @@ -23,6 +23,11 @@ "micromatch": "^2.3.11", "pretty-format": "^23.6.0" }, + "devDependencies": { + "@types/babel__core": "^7.0.4", + "@types/glob": "^7.1.1", + "@types/micromatch": "^2.3.30" + }, "engines": { "node": ">= 6" } diff --git a/packages/jest-diff/package.json b/packages/jest-diff/package.json index f8d179035aad..358aab25efb5 100644 --- a/packages/jest-diff/package.json +++ b/packages/jest-diff/package.json @@ -13,6 +13,9 @@ "jest-get-type": "^22.1.0", "pretty-format": "^23.6.0" }, + "devDependencies": { + "@types/diff": "^3.5.2" + }, "engines": { "node": ">= 6" } diff --git a/packages/jest-docblock/package.json b/packages/jest-docblock/package.json index fe5b997592e5..34a0aa2d1aea 100644 --- a/packages/jest-docblock/package.json +++ b/packages/jest-docblock/package.json @@ -10,6 +10,9 @@ "dependencies": { "detect-newline": "^2.1.0" }, + "devDependencies": { + "@types/detect-newline": "^2.1.0" + }, "engines": { "node": ">= 6" } diff --git a/packages/jest-environment-jsdom/package.json b/packages/jest-environment-jsdom/package.json index 7d0b1df0de4d..9fc537c8a9e3 100644 --- a/packages/jest-environment-jsdom/package.json +++ b/packages/jest-environment-jsdom/package.json @@ -12,6 +12,9 @@ "jest-util": "^23.4.0", "jsdom": "^11.5.1" }, + "devDependencies": { + "@types/jsdom": "^11.12.0" + }, "engines": { "node": ">= 6" } diff --git a/packages/jest-haste-map/package.json b/packages/jest-haste-map/package.json index 0d00cc5b2fb1..2a748bb8d522 100644 --- a/packages/jest-haste-map/package.json +++ b/packages/jest-haste-map/package.json @@ -16,6 +16,13 @@ "micromatch": "^2.3.11", "sane": "^3.0.0" }, + "devDependencies": { + "@types/fb-watchman": "^2.0.0", + "@types/graceful-fs": "^4.1.2", + "@types/invariant": "^2.2.29", + "@types/micromatch": "^2.3.30", + "@types/sane": "^2.0.0" + }, "engines": { "node": ">= 6" } diff --git a/packages/jest-jasmine2/package.json b/packages/jest-jasmine2/package.json index b22a9a9dec34..3249c56c92bd 100644 --- a/packages/jest-jasmine2/package.json +++ b/packages/jest-jasmine2/package.json @@ -22,6 +22,7 @@ "pretty-format": "^23.6.0" }, "devDependencies": { + "@types/babel__traverse": "^7.0.4", "jest-runtime": "^23.6.0" }, "engines": { diff --git a/packages/jest-leak-detector/package.json b/packages/jest-leak-detector/package.json index d4d03fa78829..9f714f91223d 100644 --- a/packages/jest-leak-detector/package.json +++ b/packages/jest-leak-detector/package.json @@ -11,6 +11,7 @@ "pretty-format": "^23.6.0" }, "devDependencies": { + "@types/weak": "^1.0.0", "weak": "^1.0.1" }, "engines": { diff --git a/packages/jest-message-util/package.json b/packages/jest-message-util/package.json index 9812ad2ed322..579861aaee38 100644 --- a/packages/jest-message-util/package.json +++ b/packages/jest-message-util/package.json @@ -16,5 +16,10 @@ "micromatch": "^2.3.11", "slash": "^2.0.0", "stack-utils": "^1.0.1" + }, + "devDependencies": { + "@types/babel__code-frame": "^7.0.0", + "@types/micromatch": "^2.3.30", + "@types/stack-utils": "^1.0.1" } } diff --git a/packages/jest-repl/package.json b/packages/jest-repl/package.json index 1fbf3068a631..6c0a54ee979e 100644 --- a/packages/jest-repl/package.json +++ b/packages/jest-repl/package.json @@ -15,6 +15,9 @@ "repl": "^0.1.3", "yargs": "^12.0.2" }, + "devDependencies": { + "@types/yargs": "^12.0.2" + }, "bin": { "jest-repl": "./bin/jest-repl.js" }, diff --git a/packages/jest-resolve/package.json b/packages/jest-resolve/package.json index 0822630cb87f..d704461537b5 100644 --- a/packages/jest-resolve/package.json +++ b/packages/jest-resolve/package.json @@ -14,6 +14,7 @@ "realpath-native": "^1.0.0" }, "devDependencies": { + "@types/browser-resolve": "^0.0.5", "jest-haste-map": "^23.6.0" }, "engines": { diff --git a/packages/jest-runner/package.json b/packages/jest-runner/package.json index e3cfd5d9609e..25da45261810 100644 --- a/packages/jest-runner/package.json +++ b/packages/jest-runner/package.json @@ -22,6 +22,11 @@ "source-map-support": "^0.5.6", "throat": "^4.0.0" }, + "devDependencies": { + "@types/exit": "^0.1.30", + "@types/graceful-fs": "^4.1.2", + "@types/source-map-support": "^0.4.1" + }, "engines": { "node": ">= 6" } diff --git a/packages/jest-runtime/package.json b/packages/jest-runtime/package.json index d9b7061017da..5b8caec7d8b0 100644 --- a/packages/jest-runtime/package.json +++ b/packages/jest-runtime/package.json @@ -32,6 +32,15 @@ "yargs": "^12.0.2" }, "devDependencies": { + "@types/babel__core": "^7.0.4", + "@types/convert-source-map": "^1.5.1", + "@types/exit": "^0.1.30", + "@types/glob": "^7.1.1", + "@types/graceful-fs": "^4.1.2", + "@types/micromatch": "^2.3.30", + "@types/strip-bom": "3.0.0", + "@types/write-file-atomic": "^2.1.1", + "@types/yargs": "^12.0.2", "jest-environment-jsdom": "^23.4.0", "jest-environment-node": "^23.4.0" }, diff --git a/packages/jest-snapshot/package.json b/packages/jest-snapshot/package.json index 0be2703adf33..b0d3e64041ba 100644 --- a/packages/jest-snapshot/package.json +++ b/packages/jest-snapshot/package.json @@ -20,6 +20,8 @@ "semver": "^5.5.0" }, "devDependencies": { + "@types/mkdirp": "^0.5.2", + "@types/semver": "^5.5.0", "prettier": "^1.13.4" }, "engines": { diff --git a/packages/jest-util/package.json b/packages/jest-util/package.json index c2b0962f73a1..16b87fd5cef0 100644 --- a/packages/jest-util/package.json +++ b/packages/jest-util/package.json @@ -18,6 +18,10 @@ "source-map": "^0.6.0" }, "devDependencies": { + "@types/callsites": "^2.0.0", + "@types/graceful-fs": "^4.1.2", + "@types/is-ci": "^1.0.10", + "@types/mkdirp": "^0.5.2", "jest-mock": "^23.2.0" }, "engines": { diff --git a/packages/jest-validate/package.json b/packages/jest-validate/package.json index 6ea5a6e5b68f..50316742a7ba 100644 --- a/packages/jest-validate/package.json +++ b/packages/jest-validate/package.json @@ -14,6 +14,10 @@ "leven": "^2.1.0", "pretty-format": "^23.6.0" }, + "devDependencies": { + "@types/camelcase": "^4.1.0", + "@types/leven": "^2.1.1" + }, "engines": { "node": ">= 6" } diff --git a/packages/jest-watcher/package.json b/packages/jest-watcher/package.json index 3734874f02bc..f8aad355791b 100644 --- a/packages/jest-watcher/package.json +++ b/packages/jest-watcher/package.json @@ -9,6 +9,10 @@ "jest-util": "^23.4.0", "string-length": "^2.0.0" }, + "devDependencies": { + "@types/ansi-escapes": "^3.0.0", + "@types/string-length": "^2.0.0" + }, "repository": { "type": "git", "url": "https://github.com/facebook/jest" diff --git a/packages/jest-worker/package.json b/packages/jest-worker/package.json index eff0f8b77e41..9c9f020c8e42 100644 --- a/packages/jest-worker/package.json +++ b/packages/jest-worker/package.json @@ -12,6 +12,8 @@ "supports-color": "^5.5.0" }, "devDependencies": { + "@types/merge-stream": "^1.1.2", + "@types/supports-color": "^5.3.0", "worker-farm": "^1.6.0" }, "engines": { diff --git a/packages/pretty-format/package.json b/packages/pretty-format/package.json index 916a74227d6e..48f190cec8aa 100644 --- a/packages/pretty-format/package.json +++ b/packages/pretty-format/package.json @@ -15,6 +15,8 @@ "ansi-styles": "^3.2.0" }, "devDependencies": { + "@types/ansi-regex": "^4.0.0", + "@types/ansi-styles": "^3.2.1", "immutable": "4.0.0-rc.9", "react": "*", "react-dom": "*", diff --git a/packages/pretty-format/src/collections.js b/packages/pretty-format/src/collections.ts similarity index 93% rename from packages/pretty-format/src/collections.js rename to packages/pretty-format/src/collections.ts index bfde775c28f1..a8a766ad761c 100644 --- a/packages/pretty-format/src/collections.js +++ b/packages/pretty-format/src/collections.ts @@ -4,17 +4,16 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @flow */ -import type {Config, Printer, Refs} from 'types/PrettyFormat'; +import {Config, Printer, Refs} from './'; const getKeysOfEnumerableProperties = (object: Object) => { - const keys = Object.keys(object).sort(); + const keys: Array = Object.keys(object).sort(); if (Object.getOwnPropertySymbols) { Object.getOwnPropertySymbols(object).forEach(symbol => { - //$FlowFixMe because property enumerable is missing in undefined + // @ts-ignore: because property enumerable is missing in undefined if (Object.getOwnPropertyDescriptor(object, symbol).enumerable) { keys.push(symbol); } @@ -180,7 +179,13 @@ export function printObjectProperties( for (let i = 0; i < keys.length; i++) { const key = keys[i]; const name = printer(key, config, indentationNext, depth, refs); - const value = printer(val[key], config, indentationNext, depth, refs); + const value = printer( + (val as any)[key], + config, + indentationNext, + depth, + refs, + ); result += indentationNext + name + ': ' + value; diff --git a/packages/pretty-format/src/index.js b/packages/pretty-format/src/index.ts similarity index 83% rename from packages/pretty-format/src/index.js rename to packages/pretty-format/src/index.ts index 987146e1edb9..737f966b6b7f 100644 --- a/packages/pretty-format/src/index.js +++ b/packages/pretty-format/src/index.ts @@ -3,22 +3,119 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - * - * @flow */ -import type { - Colors, - Config, - Options, - OptionsReceived, - NewPlugin, - Plugin, - Plugins, - Refs, - StringOrNull, - Theme, -} from 'types/PrettyFormat'; +type Colors = { + comment: {close: string; open: string}; + content: {close: string; open: string}; + prop: {close: string; open: string}; + tag: {close: string; open: string}; + value: {close: string; open: string}; +}; +type Indent = (arg0: string) => string; +export type Refs = Array; +type Print = (arg0: any) => string; +type StringOrNull = string | null; + +type Theme = { + comment: string; + content: string; + prop: string; + tag: string; + value: string; +}; + +type ThemeReceived = { + comment?: string; + content?: string; + prop?: string; + tag?: string; + value?: string; +}; + +type Options = { + callToJSON: boolean; + escapeRegex: boolean; + escapeString: boolean; + highlight: boolean; + indent: number; + maxDepth: number; + min: boolean; + plugins: Plugins; + printFunctionName: boolean; + theme: Theme; +}; + +type OptionsReceived = { + callToJSON?: boolean; + escapeRegex?: boolean; + escapeString?: boolean; + highlight?: boolean; + indent?: number; + maxDepth?: number; + min?: boolean; + plugins?: Plugins; + printFunctionName?: boolean; + theme?: ThemeReceived; +}; + +export type Config = { + callToJSON: boolean; + colors: Colors; + escapeRegex: boolean; + escapeString: boolean; + indent: string; + maxDepth: number; + min: boolean; + plugins: Plugins; + printFunctionName: boolean; + spacingInner: string; + spacingOuter: string; +}; + +export type Printer = ( + val: any, + config: Config, + indentation: string, + depth: number, + refs: Refs, + hasCalledToJSON?: boolean, +) => string; + +type Test = (arg0: any) => boolean; + +export type NewPlugin = { + serialize: ( + val: any, + config: Config, + indentation: string, + depth: number, + refs: Refs, + printer: Printer, + ) => string; + test: Test; +}; + +type PluginOptions = { + edgeSpacing: string; + min: boolean; + spacing: string; +}; + +type OldPlugin = { + print: ( + val: any, + print: Print, + indent: Indent, + options: PluginOptions, + colors: Colors, + ) => string; + test: Test; +}; + +type Plugin = NewPlugin | OldPlugin; + +type Plugins = Array; import style from 'ansi-styles'; @@ -45,18 +142,18 @@ const symbolToString = Symbol.prototype.toString; // Explicitly comparing typeof constructor to function avoids undefined as name // when mock identity-obj-proxy returns the key as the value for any key. -const getConstructorName = val => +const getConstructorName = (val: any) => (typeof val.constructor === 'function' && val.constructor.name) || 'Object'; // Is val is equal to global window object? Works even if it does not exist :) /* global window */ -const isWindow = val => typeof window !== 'undefined' && val === window; +const isWindow = (val: any) => typeof window !== 'undefined' && val === window; const SYMBOL_REGEXP = /^Symbol\((.*)\)(.*)$/; const NEWLINE_REGEXP = /\n/gi; class PrettyFormatPluginError extends Error { - constructor(message, stack) { + constructor(message: string, stack: string) { super(message); this.stack = stack; this.name = this.constructor.name; @@ -255,6 +352,10 @@ function printComplexValue( '}'; } +function isNewPlugin(plugin: Plugin): plugin is NewPlugin { + return (plugin as NewPlugin).serialize != null; +} + function printPlugin( plugin: Plugin, val: any, @@ -266,7 +367,7 @@ function printPlugin( let printed; try { - printed = plugin.serialize + printed = isNewPlugin(plugin) ? plugin.serialize(val, config, indentation, depth, refs, printer) : plugin.print( val, @@ -393,13 +494,12 @@ function validateOptions(options: OptionsReceived) { } const getColorsHighlight = (options: OptionsReceived): Colors => - // $FlowFixMe: Flow thinks keys from `Colors` are missing from `DEFAULT_THEME_KEYS` DEFAULT_THEME_KEYS.reduce((colors, key) => { const value = - options.theme && options.theme[key] !== undefined - ? options.theme[key] - : DEFAULT_THEME[key]; - const color = style[value]; + options.theme && (options.theme as any)[key] !== undefined + ? (options.theme as any)[key] + : (DEFAULT_THEME as any)[key]; + const color = (style as any)[value]; if ( color && typeof color.close === 'string' && diff --git a/packages/pretty-format/src/plugins/AsymmetricMatcher.js b/packages/pretty-format/src/plugins/AsymmetricMatcher.ts similarity index 93% rename from packages/pretty-format/src/plugins/AsymmetricMatcher.js rename to packages/pretty-format/src/plugins/AsymmetricMatcher.ts index 7cdb099fc30e..35a66d804ebb 100644 --- a/packages/pretty-format/src/plugins/AsymmetricMatcher.js +++ b/packages/pretty-format/src/plugins/AsymmetricMatcher.ts @@ -3,11 +3,9 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - * - * @flow */ -import type {Config, NewPlugin, Printer, Refs} from 'types/PrettyFormat'; +import {Config, NewPlugin, Printer, Refs} from '../'; import {printListItems, printObjectProperties} from '../collections'; @@ -90,4 +88,6 @@ export const serialize = ( export const test = (val: any) => val && val.$$typeof === asymmetricMatcher; -export default ({serialize, test}: NewPlugin); +const plugin: NewPlugin = {serialize, test}; + +export default plugin; diff --git a/packages/pretty-format/src/plugins/ConvertAnsi.js b/packages/pretty-format/src/plugins/ConvertAnsi.ts similarity index 84% rename from packages/pretty-format/src/plugins/ConvertAnsi.js rename to packages/pretty-format/src/plugins/ConvertAnsi.ts index 1a3d952beeff..5eaa5bc3c388 100644 --- a/packages/pretty-format/src/plugins/ConvertAnsi.js +++ b/packages/pretty-format/src/plugins/ConvertAnsi.ts @@ -3,17 +3,15 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - * - * @flow */ -import type {Config, Printer, NewPlugin, Refs} from 'types/PrettyFormat'; +import {Config, Printer, NewPlugin, Refs} from '../'; import ansiRegex from 'ansi-regex'; import style from 'ansi-styles'; -const toHumanReadableAnsi = text => - text.replace(ansiRegex(), (match, offset, string) => { +const toHumanReadableAnsi = (text: string) => + text.replace(ansiRegex(), match => { switch (match) { case style.red.close: case style.green.close: @@ -59,8 +57,8 @@ const toHumanReadableAnsi = text => } }); -export const test = (val: any) => - typeof val === 'string' && val.match(ansiRegex()); +export const test = (val: any): boolean => + typeof val === 'string' && !!val.match(ansiRegex()); export const serialize = ( val: string, @@ -71,4 +69,6 @@ export const serialize = ( printer: Printer, ) => printer(toHumanReadableAnsi(val), config, indentation, depth, refs); -export default ({serialize, test}: NewPlugin); +const plugin: NewPlugin = {serialize, test}; + +export default plugin; diff --git a/packages/pretty-format/src/plugins/DOMCollection.js b/packages/pretty-format/src/plugins/DOMCollection.ts similarity index 90% rename from packages/pretty-format/src/plugins/DOMCollection.js rename to packages/pretty-format/src/plugins/DOMCollection.ts index 716e83829617..6fe064edff76 100644 --- a/packages/pretty-format/src/plugins/DOMCollection.js +++ b/packages/pretty-format/src/plugins/DOMCollection.ts @@ -3,11 +3,9 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - * - * @flow */ -import type {Config, NewPlugin, Printer, Refs} from 'types/PrettyFormat'; +import {Config, NewPlugin, Printer, Refs} from '../'; import {printListItems, printObjectProperties} from '../collections'; @@ -26,7 +24,7 @@ export const test = (val: any) => testName(val.constructor.name); // Convert array of attribute objects to props object. -const propsReducer = (props, attribute) => { +const propsReducer = (props: any, attribute: any) => { props[attribute.name] = attribute.value; return props; }; @@ -72,4 +70,6 @@ export const serialize = ( ); }; -export default ({serialize, test}: NewPlugin); +const plugin: NewPlugin = {serialize, test}; + +export default plugin; diff --git a/packages/pretty-format/src/plugins/DOMElement.js b/packages/pretty-format/src/plugins/DOMElement.ts similarity index 58% rename from packages/pretty-format/src/plugins/DOMElement.js rename to packages/pretty-format/src/plugins/DOMElement.ts index b09cbeb1d409..1ea917c57cad 100644 --- a/packages/pretty-format/src/plugins/DOMElement.js +++ b/packages/pretty-format/src/plugins/DOMElement.ts @@ -3,11 +3,9 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - * - * @flow */ -import type {Config, NewPlugin, Printer, Refs} from 'types/PrettyFormat'; +import {Config, NewPlugin, Printer, Refs} from '../'; import { printChildren, @@ -18,30 +16,6 @@ import { printText, } from './lib/markup'; -type Attribute = { - name: string, - value: string, -}; - -type Element = { - attributes: Array, - childNodes: Array, - nodeType: 1, - tagName: string, -}; -type Text = { - data: string, - nodeType: 3, -}; -type Comment = { - data: string, - nodeType: 8, -}; -type DocumentFragment = { - children: Array, - nodeType: 11, -}; - const ELEMENT_NODE = 1; const TEXT_NODE = 3; const COMMENT_NODE = 8; @@ -61,33 +35,39 @@ export const test = (val: any) => val.constructor.name && testNode(val.nodeType, val.constructor.name); -// Convert array of attribute objects to keys array and props object. -const keysMapper = attribute => attribute.name; -const propsReducer = (props, attribute) => { - props[attribute.name] = attribute.value; - return props; -}; +type HandledType = Element | Text | Comment | DocumentFragment; + +function nodeIsText(node: HandledType): node is Text { + return node.nodeType === TEXT_NODE; +} + +function nodeIsComment(node: HandledType): node is Comment { + return node.nodeType === COMMENT_NODE; +} + +function nodeIsFragment(node: HandledType): node is DocumentFragment { + return node.nodeType === FRAGMENT_NODE; +} export const serialize = ( - node: Element | Text | Comment | DocumentFragment, + node: HandledType, config: Config, indentation: string, depth: number, refs: Refs, printer: Printer, ): string => { - if (node.nodeType === TEXT_NODE) { + if (nodeIsText(node)) { return printText(node.data, config); } - if (node.nodeType === COMMENT_NODE) { + if (nodeIsComment(node)) { return printComment(node.data, config); } - const type = - node.nodeType === FRAGMENT_NODE - ? `DocumentFragment` - : node.tagName.toLowerCase(); + const type = nodeIsFragment(node) + ? `DocumentFragment` + : node.tagName.toLowerCase(); if (++depth > config.maxDepth) { return printElementAsLeaf(type, config); @@ -96,8 +76,20 @@ export const serialize = ( return printElement( type, printProps( - Array.prototype.map.call(node.attributes || [], keysMapper).sort(), - Array.prototype.reduce.call(node.attributes || [], propsReducer, {}), + nodeIsFragment(node) + ? [] + : Array.from(node.attributes) + .map(attr => attr.name) + .sort(), + nodeIsFragment(node) + ? [] + : Array.from(node.attributes).reduce( + (props, attribute) => { + props[attribute.name] = attribute.value; + return props; + }, + {} as any, + ), config, indentation + config.indent, depth, @@ -117,4 +109,6 @@ export const serialize = ( ); }; -export default ({serialize, test}: NewPlugin); +const plugin: NewPlugin = {serialize, test}; + +export default plugin; diff --git a/packages/pretty-format/src/plugins/Immutable.js b/packages/pretty-format/src/plugins/Immutable.ts similarity index 95% rename from packages/pretty-format/src/plugins/Immutable.js rename to packages/pretty-format/src/plugins/Immutable.ts index 06f0adcdb0c2..91b322c1eb3c 100644 --- a/packages/pretty-format/src/plugins/Immutable.js +++ b/packages/pretty-format/src/plugins/Immutable.ts @@ -3,11 +3,9 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - * - * @flow */ -import type {Config, Printer, NewPlugin, Refs} from 'types/PrettyFormat'; +import {Config, Printer, NewPlugin, Refs} from '../'; import {printIteratorEntries, printIteratorValues} from '../collections'; // SENTINEL constants are from https://github.com/facebook/immutable-js @@ -21,8 +19,8 @@ const IS_SEQ_SENTINEL = '@@__IMMUTABLE_SEQ__@@'; const IS_SET_SENTINEL = '@@__IMMUTABLE_SET__@@'; const IS_STACK_SENTINEL = '@@__IMMUTABLE_STACK__@@'; -const getImmutableName = name => 'Immutable.' + name; -const printAsLeaf = name => '[' + name + ']'; +const getImmutableName = (name: string) => 'Immutable.' + name; +const printAsLeaf = (name: string) => '[' + name + ']'; const SPACE = ' '; const LAZY = '…'; // Seq is lazy if it calls a method like filter @@ -52,7 +50,7 @@ const printImmutableEntries = ( // Record has an entries method because it is a collection in immutable v3. // Return an iterator for Immutable Record from version v3 or v4. -const getRecordEntries = val => { +const getRecordEntries = (val: any) => { let i = 0; return { next() { @@ -239,4 +237,6 @@ export const test = (val: any) => val && (val[IS_ITERABLE_SENTINEL] === true || val[IS_RECORD_SENTINEL] === true); -export default ({serialize, test}: NewPlugin); +const plugin: NewPlugin = {serialize, test}; + +export default plugin; diff --git a/packages/pretty-format/src/plugins/ReactElement.js b/packages/pretty-format/src/plugins/ReactElement.ts similarity index 90% rename from packages/pretty-format/src/plugins/ReactElement.js rename to packages/pretty-format/src/plugins/ReactElement.ts index f83b63361c7e..4ebb97263e38 100644 --- a/packages/pretty-format/src/plugins/ReactElement.js +++ b/packages/pretty-format/src/plugins/ReactElement.ts @@ -3,11 +3,9 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - * - * @flow */ -import type {Config, NewPlugin, Printer, Refs} from 'types/PrettyFormat'; +import {Config, NewPlugin, Printer, Refs} from '../'; import { printChildren, @@ -24,7 +22,7 @@ const contextSymbol = Symbol.for('react.context'); // Given element.props.children, or subtree during recursive traversal, // return flattened array of children. -const getChildren = (arg, children = []) => { +const getChildren = (arg: any[], children = []) => { if (Array.isArray(arg)) { arg.forEach(item => { getChildren(item, children); @@ -35,7 +33,7 @@ const getChildren = (arg, children = []) => { return children; }; -const getType = element => { +const getType = (element: any) => { const type = element.type; if (typeof type === 'string') { return type; @@ -66,7 +64,7 @@ const getType = element => { return 'UNDEFINED'; }; -const getPropKeys = element => { +const getPropKeys = (element: any) => { const {props} = element; return Object.keys(props) @@ -75,7 +73,7 @@ const getPropKeys = element => { }; export const serialize = ( - element: React$Element, + element: any, config: Config, indentation: string, depth: number, @@ -109,4 +107,6 @@ export const serialize = ( export const test = (val: any) => val && val.$$typeof === elementSymbol; -export default ({serialize, test}: NewPlugin); +const plugin: NewPlugin = {serialize, test}; + +export default plugin; diff --git a/packages/pretty-format/src/plugins/ReactTestComponent.js b/packages/pretty-format/src/plugins/ReactTestComponent.ts similarity index 75% rename from packages/pretty-format/src/plugins/ReactTestComponent.js rename to packages/pretty-format/src/plugins/ReactTestComponent.ts index ca892cb9ae86..954b347cca09 100644 --- a/packages/pretty-format/src/plugins/ReactTestComponent.js +++ b/packages/pretty-format/src/plugins/ReactTestComponent.ts @@ -3,17 +3,19 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - * - * @flow */ -import type { - Config, - Printer, - NewPlugin, - ReactTestObject, - Refs, -} from 'types/PrettyFormat'; +import {Config, Printer, NewPlugin, Refs} from '../'; + +export type ReactTestObject = { + $$typeof: Symbol; + type: string; + props?: Object; + children?: null | Array; +}; + +// Child can be `number` in Stack renderer but not in Fiber renderer. +type ReactTestChild = ReactTestObject | string | number; import { printChildren, @@ -24,12 +26,12 @@ import { const testSymbol = Symbol.for('react.test.json'); -const getPropKeys = object => { +const getPropKeys = (object: ReactTestObject) => { const {props} = object; return props ? Object.keys(props) - .filter(key => props[key] !== undefined) + .filter(key => (props as any)[key] !== undefined) .sort() : []; }; @@ -76,4 +78,6 @@ export const serialize = ( export const test = (val: any) => val && val.$$typeof === testSymbol; -export default ({serialize, test}: NewPlugin); +const plugin: NewPlugin = {serialize, test}; + +export default plugin; diff --git a/packages/pretty-format/src/plugins/lib/escapeHTML.js b/packages/pretty-format/src/plugins/lib/escapeHTML.ts similarity index 96% rename from packages/pretty-format/src/plugins/lib/escapeHTML.js rename to packages/pretty-format/src/plugins/lib/escapeHTML.ts index fba2dffc3340..b9dc0d0eb484 100644 --- a/packages/pretty-format/src/plugins/lib/escapeHTML.js +++ b/packages/pretty-format/src/plugins/lib/escapeHTML.ts @@ -3,8 +3,6 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - * - * @flow */ export default function escapeHTML(str: string): string { diff --git a/packages/pretty-format/src/plugins/lib/markup.js b/packages/pretty-format/src/plugins/lib/markup.ts similarity index 97% rename from packages/pretty-format/src/plugins/lib/markup.js rename to packages/pretty-format/src/plugins/lib/markup.ts index 70ebceebc806..4134c98317b1 100644 --- a/packages/pretty-format/src/plugins/lib/markup.js +++ b/packages/pretty-format/src/plugins/lib/markup.ts @@ -3,18 +3,16 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - * - * @flow */ -import type {Config, Printer, Refs} from 'types/PrettyFormat'; +import {Config, Printer, Refs} from '../../'; import escapeHTML from './escapeHTML'; // Return empty string if keys is empty. export const printProps = ( keys: Array, - props: Object, + props: any, config: Config, indentation: string, depth: number, diff --git a/packages/pretty-format/tsconfig.json b/packages/pretty-format/tsconfig.json new file mode 100644 index 000000000000..7bb06bce6d20 --- /dev/null +++ b/packages/pretty-format/tsconfig.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "rootDir": "src", + "outDir": "build" + } +} diff --git a/scripts/browserBuild.js b/scripts/browserBuild.js index d7d879820b58..a3ad5f9df398 100644 --- a/scripts/browserBuild.js +++ b/scripts/browserBuild.js @@ -14,12 +14,15 @@ const rollupBuiltins = require('rollup-plugin-node-builtins'); const rollupGlobals = require('rollup-plugin-node-globals'); const rollupJson = require('rollup-plugin-json'); const rollupBabel = require('rollup-plugin-babel'); -const rollupFlow = require('rollup-plugin-flow'); + +const transformOptions = require('../babel.config.js'); const babelEs5Options = { // Dont load other config files babelrc: false, configFile: false, + extensions: ['.js', '.jsx', '.ts', '.tsx'], + overrides: transformOptions.overrides, plugins: [ '@babel/plugin-transform-strict-mode', '@babel/plugin-external-helpers', @@ -28,14 +31,11 @@ const babelEs5Options = { [ '@babel/preset-env', { - // Required for Rollup - modules: false, shippedProposals: true, // Target ES5 targets: 'IE 11', }, ], - '@babel/preset-flow', ], runtimeHelpers: true, }; @@ -52,13 +52,19 @@ function browserBuild(pkgName, entryPath, destination) { : undefined; }, }, - rollupFlow(), - rollupJson(), + // strip types + rollupBabel({ + babelrc: false, + configFile: false, + extensions: ['.js', '.jsx', '.ts', '.tsx'], + overrides: transformOptions.overrides, + }), rollupCommonjs(), + rollupJson(), rollupBabel(babelEs5Options), rollupGlobals(), rollupBuiltins(), - rollupResolve(), + rollupResolve({extensions: ['.js', '.jsx', '.ts', '.tsx']}), ], strict: false, }).then(bundle => diff --git a/scripts/build.js b/scripts/build.js index fa3e256272a1..d8d9bffd82be 100644 --- a/scripts/build.js +++ b/scripts/build.js @@ -15,7 +15,7 @@ * node ./scripts/build.js * node ./scripts/build.js /users/123/jest/packages/jest-111/src/111.js * - * NOTE: this script is node@4 compatible + * NOTE: this script is node@6 compatible */ 'use strict'; @@ -24,6 +24,7 @@ const fs = require('fs'); const path = require('path'); const glob = require('glob'); const mkdirp = require('mkdirp'); +const execa = require('execa'); const babel = require('@babel/core'); const chalk = require('chalk'); @@ -38,13 +39,13 @@ const SRC_DIR = 'src'; const BUILD_DIR = 'build'; const BUILD_ES5_DIR = 'build-es5'; const JS_FILES_PATTERN = '**/*.js'; +const TS_FILES_PATTERN = '**/*.ts'; const IGNORE_PATTERN = '**/__{tests,mocks}__/**'; const PACKAGES_DIR = path.resolve(__dirname, '../packages'); const INLINE_REQUIRE_BLACKLIST = /packages\/expect|(jest-(circus|diff|get-type|jasmine2|matcher-utils|message-util|regex-util|snapshot))|pretty-format\//; const transformOptions = require('../babel.config.js'); -transformOptions.babelrc = false; const prettierConfig = prettier.resolveConfig.sync(__filename); prettierConfig.trailingComma = 'none'; @@ -73,19 +74,18 @@ function getBuildPath(file, buildFolder) { const pkgSrcPath = path.resolve(PACKAGES_DIR, pkgName, SRC_DIR); const pkgBuildPath = path.resolve(PACKAGES_DIR, pkgName, buildFolder); const relativeToSrcPath = path.relative(pkgSrcPath, file); - return path.resolve(pkgBuildPath, relativeToSrcPath); + return path.resolve(pkgBuildPath, relativeToSrcPath).replace(/\.ts$/, '.js'); } function buildNodePackage(p) { const srcDir = path.resolve(p, SRC_DIR); const pattern = path.resolve(srcDir, '**/*'); - const files = glob.sync(pattern, { - nodir: true, - }); + const files = glob.sync(pattern, {nodir: true}); process.stdout.write(adjustToTerminalWidth(`${path.basename(p)}\n`)); files.forEach(file => buildFile(file, true)); + process.stdout.write(`${OK}\n`); } @@ -104,11 +104,13 @@ function buildBrowserPackage(p) { `browser field for ${pkgJsonPath} should start with "${BUILD_ES5_DIR}"` ); } - browserBuild( - p.split('/').pop(), - path.resolve(srcDir, 'index.js'), - path.resolve(p, browser) - ) + let indexFile = path.resolve(srcDir, 'index.js'); + + if (!fs.existsSync(indexFile)) { + indexFile = indexFile.replace(/\.js$/, '.ts'); + } + + browserBuild(p.split('/').pop(), indexFile, path.resolve(p, browser)) .then(() => { process.stdout.write(adjustToTerminalWidth(`${path.basename(p)}\n`)); process.stdout.write(`${OK}\n`); @@ -134,7 +136,10 @@ function buildFile(file, silent) { } mkdirp.sync(path.dirname(destPath)); - if (!micromatch.isMatch(file, JS_FILES_PATTERN)) { + if ( + !micromatch.isMatch(file, JS_FILES_PATTERN) && + !micromatch.isMatch(file, TS_FILES_PATTERN) + ) { fs.createReadStream(file).pipe(fs.createWriteStream(destPath)); silent || process.stdout.write( @@ -186,10 +191,21 @@ function buildFile(file, silent) { const files = process.argv.slice(2); +function compileTypes(packages) { + const packageWithTs = packages.filter(p => + fs.existsSync(path.resolve(p, 'tsconfig.json')) + ); + + execa.sync('tsc', ['-b', ...packageWithTs]); +} + if (files.length) { files.forEach(buildFile); } else { const packages = getPackages(); + process.stdout.write(chalk.inverse(' Typechecking \n')); + compileTypes(packages); + process.stdout.write(`${OK}\n\n`); process.stdout.write(chalk.inverse(' Building packages \n')); packages.forEach(buildNodePackage); process.stdout.write('\n'); diff --git a/scripts/watch.js b/scripts/watch.js index ad0b9ed0d51a..9704c2e94f16 100644 --- a/scripts/watch.js +++ b/scripts/watch.js @@ -13,6 +13,7 @@ const fs = require('fs'); const {execSync} = require('child_process'); const path = require('path'); const chalk = require('chalk'); +const execa = require('execa'); const getPackages = require('./getPackages'); const BUILD_CMD = `node ${path.resolve(__dirname, './build.js')}`; @@ -27,11 +28,12 @@ const exists = filename => { }; const rebuild = filename => filesToBuild.set(filename, true); -getPackages().forEach(p => { +const packages = getPackages(); +packages.forEach(p => { const srcDir = path.resolve(p, 'src'); try { fs.accessSync(srcDir, fs.F_OK); - fs.watch(path.resolve(p, 'src'), {recursive: true}, (event, filename) => { + fs.watch(srcDir, {recursive: true}, (event, filename) => { const filePath = path.resolve(srcDir, filename); if ((event === 'change' || event === 'rename') && exists(filePath)) { @@ -55,6 +57,12 @@ getPackages().forEach(p => { } }); +const packageWithTs = packages.filter(p => + fs.existsSync(path.resolve(p, 'tsconfig.json')) +); + +execa('tsc', ['-b', ...packageWithTs, '--watch']); + setInterval(() => { const files = Array.from(filesToBuild.keys()); if (files.length) { diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 000000000000..c0ed23d075f0 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,50 @@ +{ + "compilerOptions": { + "target": "es2017", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */ + "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ + "lib": ["dom", "es2017"], /* Specify library files to be included in the compilation. */ + // "allowJs": true, /* Allow javascript files to be compiled. */ + // "checkJs": true, /* Report errors in .js files. */ + // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ + "declaration": true, /* Generates corresponding '.d.ts' file. */ + // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ + // "sourceMap": true, /* Generates corresponding '.map' file. */ + // "outFile": "./", /* Concatenate and emit output to single file. */ + // "outDir": "./", /* Redirect output structure to the directory. */ + // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ + "composite": true, /* Enable project compilation */ + "emitDeclarationOnly": true, + "noEmitOnError": true, + // "importHelpers": true, /* Import emit helpers from 'tslib'. */ + // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ + + "strict": true, /* Enable all strict type-checking options. */ + + /* Additional Checks */ + "noUnusedLocals": true, /* Report errors on unused locals. */ + "noUnusedParameters": true, /* Report errors on unused parameters. */ + // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ + // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + + /* Module Resolution Options */ + "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ + // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ + // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ + // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ + // "typeRoots": [], /* List of folders to include type definitions from. */ + // "types": [], /* Type declaration files to be included in compilation. */ + // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ + "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ + // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ + + /* Source Map Options */ + // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ + // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ + + /* Experimental Options */ + // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ + // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ + } +} diff --git a/yarn.lock b/yarn.lock index 389533396255..ea7b003d26a7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9,32 +9,32 @@ dependencies: "@babel/highlight" "^7.0.0" -"@babel/core@^7.0.0", "@babel/core@^7.1.0": - version "7.1.2" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.1.2.tgz#f8d2a9ceb6832887329a7b60f9d035791400ba4e" - integrity sha512-IFeSSnjXdhDaoysIlev//UzHZbdEmm7D0EIH2qtse9xK7mXEZQpYjs2P00XlP1qYsYvid79p+Zgg6tz1mp6iVw== +"@babel/core@^7.0.0", "@babel/core@^7.1.0", "@babel/core@^7.2.2": + version "7.2.2" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.2.2.tgz#07adba6dde27bb5ad8d8672f15fde3e08184a687" + integrity sha512-59vB0RWt09cAct5EIe58+NzGP4TFSD3Bz//2/ELy3ZeTeKF6VTD1AXlH8BGGbCX0PuobZBsIzO7IAI9PH67eKw== dependencies: "@babel/code-frame" "^7.0.0" - "@babel/generator" "^7.1.2" - "@babel/helpers" "^7.1.2" - "@babel/parser" "^7.1.2" - "@babel/template" "^7.1.2" - "@babel/traverse" "^7.1.0" - "@babel/types" "^7.1.2" + "@babel/generator" "^7.2.2" + "@babel/helpers" "^7.2.0" + "@babel/parser" "^7.2.2" + "@babel/template" "^7.2.2" + "@babel/traverse" "^7.2.2" + "@babel/types" "^7.2.2" convert-source-map "^1.1.0" - debug "^3.1.0" - json5 "^0.5.0" + debug "^4.1.0" + json5 "^2.1.0" lodash "^4.17.10" resolve "^1.3.2" semver "^5.4.1" source-map "^0.5.0" -"@babel/generator@^7.0.0", "@babel/generator@^7.1.2", "@babel/generator@^7.1.3": - version "7.1.3" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.1.3.tgz#2103ec9c42d9bdad9190a6ad5ff2d456fd7b8673" - integrity sha512-ZoCZGcfIJFJuZBqxcY9OjC1KW2lWK64qrX1o4UYL3yshVhwKFYgzpWZ0vvtGMNJdTlvkw0W+HR1VnYN8q3QPFQ== +"@babel/generator@^7.0.0", "@babel/generator@^7.2.2": + version "7.2.2" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.2.2.tgz#18c816c70962640eab42fe8cae5f3947a5c65ccc" + integrity sha512-I4o675J/iS8k+P38dvJ3IBGqObLXyQLTxtrR4u9cSUJOURvafeEWb/pFMOTwtNrmq73mJzyF6ueTbO1BtN0Zeg== dependencies: - "@babel/types" "^7.1.3" + "@babel/types" "^7.2.2" jsesc "^2.5.1" lodash "^4.17.10" source-map "^0.5.0" @@ -203,14 +203,14 @@ "@babel/traverse" "^7.1.0" "@babel/types" "^7.0.0" -"@babel/helpers@^7.1.2": - version "7.1.2" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.1.2.tgz#ab752e8c35ef7d39987df4e8586c63b8846234b5" - integrity sha512-Myc3pUE8eswD73aWcartxB16K6CGmHDv9KxOmD2CeOs/FaEAQodr3VYGmlvOmog60vNQ2w8QbatuahepZwrHiA== +"@babel/helpers@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.2.0.tgz#8335f3140f3144270dc63c4732a4f8b0a50b7a21" + integrity sha512-Fr07N+ea0dMcMN8nFpuK6dUIT7/ivt9yKQdEEnjVS83tG2pHwPi03gYmk/tyuwONnZ+sY+GFFPlWGgCtW1hF9A== dependencies: "@babel/template" "^7.1.2" - "@babel/traverse" "^7.1.0" - "@babel/types" "^7.1.2" + "@babel/traverse" "^7.1.5" + "@babel/types" "^7.2.0" "@babel/highlight@^7.0.0": version "7.0.0" @@ -221,10 +221,10 @@ esutils "^2.0.2" js-tokens "^4.0.0" -"@babel/parser@^7.0.0", "@babel/parser@^7.1.2", "@babel/parser@^7.1.3": - version "7.1.3" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.1.3.tgz#2c92469bac2b7fbff810b67fca07bd138b48af77" - integrity sha512-gqmspPZOMW3MIRb9HlrnbZHXI1/KHTOroBwN1NcLL6pWxzqzEKGvRTq0W/PxS45OtQGbaFikSQpkS5zbnsQm2w== +"@babel/parser@^7.0.0", "@babel/parser@^7.1.0", "@babel/parser@^7.2.2", "@babel/parser@^7.2.3": + version "7.2.3" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.2.3.tgz#32f5df65744b70888d17872ec106b02434ba1489" + integrity sha512-0LyEcVlfCoFmci8mXx8A5oIkpkOgyo8dRHtxBnK9RRBwxO2+JZPNsqtVEZQ7mJFPxnXF9lfmU24mHOPI0qnlkA== "@babel/plugin-check-constants@^7.0.0-beta.38": version "7.0.0-beta.38" @@ -775,7 +775,7 @@ "@babel/plugin-transform-react-jsx-self" "^7.0.0" "@babel/plugin-transform-react-jsx-source" "^7.0.0" -"@babel/preset-typescript@*": +"@babel/preset-typescript@*", "@babel/preset-typescript@^7.0.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.1.0.tgz#49ad6e2084ff0bfb5f1f7fb3b5e76c434d442c7f" integrity sha512-LYveByuF9AOM8WrsNne5+N79k1YxjNB6gmpCQsnuSBAcV8QUeB+ZUxQzL7Rz7HksPbahymKkq2qBR+o36ggFZA== @@ -803,34 +803,34 @@ dependencies: regenerator-runtime "^0.12.0" -"@babel/template@^7.0.0", "@babel/template@^7.1.0", "@babel/template@^7.1.2": - version "7.1.2" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.1.2.tgz#090484a574fef5a2d2d7726a674eceda5c5b5644" - integrity sha512-SY1MmplssORfFiLDcOETrW7fCLl+PavlwMh92rrGcikQaRq4iWPVH0MpwPpY3etVMx6RnDjXtr6VZYr/IbP/Ag== +"@babel/template@^7.0.0", "@babel/template@^7.1.0", "@babel/template@^7.1.2", "@babel/template@^7.2.2": + version "7.2.2" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.2.2.tgz#005b3fdf0ed96e88041330379e0da9a708eb2907" + integrity sha512-zRL0IMM02AUDwghf5LMSSDEz7sBCO2YnNmpg3uWTZj/v1rcG2BmQUvaGU8GhU8BvfMh1k2KIAYZ7Ji9KXPUg7g== dependencies: "@babel/code-frame" "^7.0.0" - "@babel/parser" "^7.1.2" - "@babel/types" "^7.1.2" + "@babel/parser" "^7.2.2" + "@babel/types" "^7.2.2" -"@babel/traverse@^7.0.0", "@babel/traverse@^7.1.0": - version "7.1.4" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.1.4.tgz#f4f83b93d649b4b2c91121a9087fa2fa949ec2b4" - integrity sha512-my9mdrAIGdDiSVBuMjpn/oXYpva0/EZwWL3sm3Wcy/AVWO2eXnsoZruOT9jOGNRXU8KbCIu5zsKnXcAJ6PcV6Q== +"@babel/traverse@^7.0.0", "@babel/traverse@^7.1.0", "@babel/traverse@^7.1.5", "@babel/traverse@^7.2.2": + version "7.2.3" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.2.3.tgz#7ff50cefa9c7c0bd2d81231fdac122f3957748d8" + integrity sha512-Z31oUD/fJvEWVR0lNZtfgvVt512ForCTNKYcJBGbPb1QZfve4WGH8Wsy7+Mev33/45fhP/hwQtvgusNdcCMgSw== dependencies: "@babel/code-frame" "^7.0.0" - "@babel/generator" "^7.1.3" + "@babel/generator" "^7.2.2" "@babel/helper-function-name" "^7.1.0" "@babel/helper-split-export-declaration" "^7.0.0" - "@babel/parser" "^7.1.3" - "@babel/types" "^7.1.3" - debug "^3.1.0" + "@babel/parser" "^7.2.3" + "@babel/types" "^7.2.2" + debug "^4.1.0" globals "^11.1.0" lodash "^4.17.10" -"@babel/types@^7.0.0", "@babel/types@^7.1.2", "@babel/types@^7.1.3": - version "7.1.3" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.1.3.tgz#3a767004567060c2f40fca49a304712c525ee37d" - integrity sha512-RpPOVfK+yatXyn8n4PB1NW6k9qjinrXrRR8ugBN8fD6hCy5RXI6PSbVqpOJBO9oSaY7Nom4ohj35feb0UR9hSA== +"@babel/types@^7.0.0", "@babel/types@^7.1.2", "@babel/types@^7.2.0", "@babel/types@^7.2.2": + version "7.2.2" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.2.2.tgz#44e10fc24e33af524488b716cdaee5360ea8ed1e" + integrity sha512-fKCuD6UFUMkR541eDWL+2ih/xFZBXPOg/7EQFeTluMDebfqR4jrpaCjLhkWlQS4hT6nRa2PMEgXKbRB5/H2fpg== dependencies: esutils "^2.0.2" lodash "^4.17.10" @@ -1413,26 +1413,340 @@ resolved "https://registry.yarnpkg.com/@sheerun/mutationobserver-shim/-/mutationobserver-shim-0.3.2.tgz#8013f2af54a2b7d735f71560ff360d3a8176a87b" integrity sha512-vTCdPp/T/Q3oSqwHmZ5Kpa9oI7iLtGl3RQaA/NyLHikvcrPxACkkKVr/XzkSPJWXHRhKGzVvb0urJsbMlRxi1Q== +"@types/ansi-escapes@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@types/ansi-escapes/-/ansi-escapes-3.0.0.tgz#619bbc6d46fc75da6d784e53b5a25d2efff07108" + integrity sha512-aamJrX6PdmIO8E9qhZaYmXiMGXwnkF2lcga/VbqLf8g90aaKGZ4cSFP5AabqxAbmp0h69C9yE3a4fUBtVpqtmg== + dependencies: + "@types/node" "*" + +"@types/ansi-regex@^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@types/ansi-regex/-/ansi-regex-4.0.0.tgz#cb20bb66da7700ea9b26f16971f03f0e092eddad" + integrity sha512-r1W316vjsZXn1/csLC4HcCJs6jIHIzksHJd7xx+Dl+PAb0S2Dh9cR8ZsIMEfGmbBtP7JNWlf2KKahSkDP6rg3g== + +"@types/ansi-styles@^3.2.1": + version "3.2.1" + resolved "https://registry.yarnpkg.com/@types/ansi-styles/-/ansi-styles-3.2.1.tgz#49e996bb6e0b7957ca831205df31eb9a0702492c" + integrity sha512-UFa7mfKgSutXdT+elzJo8Ulr7FHgLNAyglVIOZYXFNJVQERm8DPrcwPret5BYk66LBE7fwm1XoVGi76MJkQ6ow== + dependencies: + "@types/color-name" "*" + +"@types/babel-types@*": + version "7.0.4" + resolved "https://registry.yarnpkg.com/@types/babel-types/-/babel-types-7.0.4.tgz#bfd5b0d0d1ba13e351dff65b6e52783b816826c8" + integrity sha512-WiZhq3SVJHFRgRYLXvpf65XnV6ipVHhnNaNvE8yCimejrGglkg38kEj0JcizqwSHxmPSjcTlig/6JouxLGEhGw== + +"@types/babel__code-frame@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@types/babel__code-frame/-/babel__code-frame-7.0.0.tgz#d5658827984c1e386c1b4ef30699b344d3f732a2" + integrity sha512-Rt0KuqopAdtpyvxO0JbKbwgtw7B+y0NQpTXns+tiz1lqGXywOESSKIiiQt0wnCreqEKvmrArH7KZ6bQg+w8BoA== + +"@types/babel__core@^7.0.0", "@types/babel__core@^7.0.4": + version "7.0.4" + resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.0.4.tgz#14b30c11113bad353cabfaea73e327b48edb0f0e" + integrity sha512-2Y2RK1BN5BRFfhneGfQA8mmFmTANbzGgS5uQPluoRqGNWb6uAcefqxzNbqgxPpmPkLqKapQfmYcyyl5iAQV+fA== + dependencies: + "@babel/parser" "^7.1.0" + "@babel/types" "^7.0.0" + +"@types/babel__generator@^7.0.0": + version "7.0.1" + resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.0.1.tgz#533bd37e7be8af27ebf8fcc0a053cfa4c03f4c5c" + integrity sha512-QZ+oM5v3lAh/4DqWDyCL0rVi/BJlKRANDEpShxt3Lg+rhbFA78Ec7N+8lcAIpziA/Mfp/1ShDJj2Ti3HJ/JPxA== + dependencies: + "@babel/types" "^7.0.0" + +"@types/babel__template@^7.0.0": + version "7.0.1" + resolved "https://registry.yarnpkg.com/@types/babel__template/-/babel__template-7.0.1.tgz#8de6effa729bf0b0f65eb72399b629a3998a7f10" + integrity sha512-LT1zwkpL0/2oBP+npLaOCYSWv47cxbdAvONutjalMdCIBfjtfzVNnT8rgllBmsr15QAdAZDOmYw1CPhLB2JCtA== + dependencies: + "@babel/parser" "^7.1.0" + "@babel/types" "^7.0.0" + +"@types/babel__traverse@^7.0.4": + version "7.0.4" + resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.0.4.tgz#de652399bd8493ab712e4d6b68031b7a2f72ad5f" + integrity sha512-2vARZYqR4Flf59WtqMfa9GgbOjK04xLZaN9+CMf7Cs+4cAhxZBP3K9LYRzsWxOQe402VvqX9+7DdXxB72ujEOg== + dependencies: + "@babel/types" "^7.0.0" + +"@types/browser-resolve@^0.0.5": + version "0.0.5" + resolved "https://registry.yarnpkg.com/@types/browser-resolve/-/browser-resolve-0.0.5.tgz#4d7ea4babcbfa45752a5cdc016c0a0fc4dc4de7d" + integrity sha512-3XKWKoP/RsU2Ewg9v2rkE1qmAbKIFR6nxFOsDhY2/J1u3zyDP+2vovKI/7tX1b9RqshAwQiiCsLyQr3dIGw9/w== + dependencies: + "@types/resolve" "*" + +"@types/callsites@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@types/callsites/-/callsites-2.0.0.tgz#df0db68ea34053651caee9975294be902fd04751" + integrity sha512-kUvhIE1ZlV4dYEyFnZ2lJLXMEOc7eLN6ejolVBQm0boUCX2t6p0M2nx+20UkEtDMJYtRQffuhcwO1h/U029QAw== + +"@types/camelcase@^4.1.0": + version "4.1.0" + resolved "https://registry.yarnpkg.com/@types/camelcase/-/camelcase-4.1.0.tgz#e054f7986f31658d49936261b5cd4588ef29d1ee" + integrity sha512-nsaprOtNLvUrLyFX5+mRpE9h2Q0d5YzQRr+Lav3fxdYtc1/E/U7G+Ld861NWBDDtWY3MnwKoUOhCrE1nrVxUQA== + "@types/cheerio@^0.22.8": version "0.22.9" resolved "https://registry.yarnpkg.com/@types/cheerio/-/cheerio-0.22.9.tgz#b5990152604c2ada749b7f88cab3476f21f39d7b" integrity sha512-q6LuBI0t5u04f0Q4/R+cGBqIbZMtJkVvCSF+nTfFBBdQqQvJR/mNHeWjRkszyLl7oyf2rDoKUYMEjTw5AV0hiw== +"@types/color-name@*": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.0.tgz#926f76f7e66f49cc59ad880bb15b030abbf0b66d" + integrity sha512-gZ/Rb+MFXF0pXSEQxdRoPMm5jeO3TycjOdvbpbcpHX/B+n9AqaHFe5q6Ga9CsZ7ir/UgIWPfrBzUzn3F19VH/w== + +"@types/convert-source-map@^1.5.1": + version "1.5.1" + resolved "https://registry.yarnpkg.com/@types/convert-source-map/-/convert-source-map-1.5.1.tgz#d4d180dd6adc5cb68ad99bd56e03d637881f4616" + integrity sha512-laiDIXqqthjJlyAMYAXOtN3N8+UlbM+KvZi4BaY5ZOekmVkBs/UxfK5O0HWeJVG2eW8F+Mu2ww13fTX+kY1FlQ== + +"@types/detect-newline@^2.1.0": + version "2.1.0" + resolved "https://registry.yarnpkg.com/@types/detect-newline/-/detect-newline-2.1.0.tgz#1896b5651b473792b6aba2500270fda626bc38d0" + integrity sha512-vcHS4yQkTfy+8QISuAFS+2SCjNcGs37+CWzxrrIOMv7yvPnYd6f1AeUErVEHVCu8dZreAHUqzV8RrjzeBorvtQ== + +"@types/diff@^3.5.2": + version "3.5.2" + resolved "https://registry.yarnpkg.com/@types/diff/-/diff-3.5.2.tgz#bd92300d32675bbe9f7853480730250aa859a90a" + integrity sha512-T1y8ed2DipuUGqgzWzBDUMlJM1bD1CG73ETOi08VURsGArjRfC4nqfeC5owrV7SFvgbeKDbonI/Es4vQgJ2IKA== + "@types/estree@0.0.39": version "0.0.39" resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f" integrity sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw== +"@types/events@*": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@types/events/-/events-1.2.0.tgz#81a6731ce4df43619e5c8c945383b3e62a89ea86" + integrity sha512-KEIlhXnIutzKwRbQkGWb/I4HFqBuUykAdHgDED6xqwXJfONCjF5VoE0cXEiurh3XauygxzeDzgtXUqvLkxFzzA== + +"@types/execa@^0.9.0": + version "0.9.0" + resolved "https://registry.yarnpkg.com/@types/execa/-/execa-0.9.0.tgz#9b025d2755f17e80beaf9368c3f4f319d8b0fb93" + integrity sha512-mgfd93RhzjYBUHHV532turHC2j4l/qxsF/PbfDmprHDEUHmNZGlDn1CEsulGK3AfsPdhkWzZQT/S/k0UGhLGsA== + dependencies: + "@types/node" "*" + +"@types/exit@^0.1.30": + version "0.1.30" + resolved "https://registry.yarnpkg.com/@types/exit/-/exit-0.1.30.tgz#7078b736a7d166c80b6394dc0d9de1577ca76daf" + integrity sha1-cHi3NqfRZsgLY5TcDZ3hV3ynba8= + +"@types/fb-watchman@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@types/fb-watchman/-/fb-watchman-2.0.0.tgz#ca60ded406baa8c81c65ac1f86763a5d00aa7c55" + integrity sha512-Ao2jlksPEUGCEXBvJz5e2MuDpYUtxXgtUk45cg0g5Mmy4f0j7bQuDlOlqBMgKGRl9dZAK4ZTzFtukuzj2mURlQ== + dependencies: + "@types/events" "*" + +"@types/glob@*", "@types/glob@^7.1.1": + version "7.1.1" + resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.1.tgz#aa59a1c6e3fbc421e07ccd31a944c30eba521575" + integrity sha512-1Bh06cbWJUHMC97acuD6UMG29nMt0Aqz1vF3guLfG+kHHJhy3AyohZFFxYk2f7Q1SQIrNwvncxAE0N/9s70F2w== + dependencies: + "@types/events" "*" + "@types/minimatch" "*" + "@types/node" "*" + +"@types/graceful-fs@^4.1.2": + version "4.1.2" + resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.2.tgz#fbc9575dbcc6d1d91dd768d30c5fc0c19f6c50bd" + integrity sha512-epDhsJAVxJsWfeqpzEDFhLnhHMbHie/VMFY+2Hvt5p7FemeW5ELM+6gcVYL/ZsUwdu3zrWpDE3VUTddXW+EMYg== + dependencies: + "@types/node" "*" + +"@types/invariant@^2.2.29": + version "2.2.29" + resolved "https://registry.yarnpkg.com/@types/invariant/-/invariant-2.2.29.tgz#aa845204cd0a289f65d47e0de63a6a815e30cc66" + integrity sha512-lRVw09gOvgviOfeUrKc/pmTiRZ7g7oDOU6OAutyuSHpm1/o2RaBQvRhgK8QEdu+FFuw/wnWb29A/iuxv9i8OpQ== + +"@types/is-ci@^1.0.10", "@types/is-ci@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@types/is-ci/-/is-ci-1.1.0.tgz#583c5fbfcc461be9971106b9558930d67df49227" + integrity sha512-NbyqP5D4hwl5UWnnW4Cz0gIRjhecgx/9OApcCIpp4+tjqjROGf/NBcKKDfbI3YFBTTkD3JBshiNSv5V7VoVJJg== + +"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-1.1.0.tgz#2cc2ca41051498382b43157c8227fea60363f94a" + integrity sha512-ohkhb9LehJy+PA40rDtGAji61NCgdtKLAlFoYp4cnuuQEswwdK3vz9SOIkkyc3wrk8dzjphQApNs56yyXLStaQ== + +"@types/istanbul-lib-instrument@^1.7.2": + version "1.7.2" + resolved "https://registry.yarnpkg.com/@types/istanbul-lib-instrument/-/istanbul-lib-instrument-1.7.2.tgz#44e61372876597e361148a84537be402f4c9e972" + integrity sha512-SWIpdKneXqThfrKIokt9dXSPeslS2NWcxhtr+/a2+N81aLyOMAsVTMmwaKuCoEahcI0FfhY3/79AR6Vilk9i8A== + dependencies: + "@types/babel-types" "*" + "@types/istanbul-lib-coverage" "*" + source-map "^0.6.1" + +"@types/istanbul-lib-source-maps@^1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@types/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.1.tgz#c6db98b8b9f0b5aea000f7a8922cc075a85eda9f" + integrity sha512-K0IvmTFbI2GjLG0O4AOLPV2hFItE5Bg/TY41IBZIThhLhYthJc3VjpZpM8/sIaIVtnQcX8b2k3muPDvsvhk+Fg== + dependencies: + "@types/istanbul-lib-coverage" "*" + source-map "^0.6.1" + "@types/jest@^23.1.1": version "23.3.5" resolved "https://registry.yarnpkg.com/@types/jest/-/jest-23.3.5.tgz#870a1434208b60603745bfd214fc3fc675142364" integrity sha512-3LI+vUC3Wju28vbjIjsTKakhMB8HC4l+tMz+Z8WRzVK+kmvezE5jcOvKtBpznWSI5KDLFo+FouUhpTKoekadCA== +"@types/jsdom@^11.12.0": + version "11.12.0" + resolved "https://registry.yarnpkg.com/@types/jsdom/-/jsdom-11.12.0.tgz#00ddc6f0a1b04c2f5ff6fb23eb59360ca65f12ae" + integrity sha512-XHMNZFQ0Ih3A4/NTWAO15+OsQafPKnQCanN0FYGbsTM/EoI5EoEAvvkF51/DQC2BT5low4tomp7k2RLMlriA5Q== + dependencies: + "@types/events" "*" + "@types/node" "*" + "@types/tough-cookie" "*" + parse5 "^4.0.0" + +"@types/json5@^0.0.29": + version "0.0.29" + resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" + integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4= + +"@types/leven@^2.1.1": + version "2.1.1" + resolved "https://registry.yarnpkg.com/@types/leven/-/leven-2.1.1.tgz#7cdc02ec636f80dc0bb0a53d8ee7eff2d8e8e1d8" + integrity sha512-f74SsCQnQzm244o5LHZgSLijrwG5e9BgkMHGbDlQThfh42q5RG4c+RNzUvZ347wAlQYD9kwu64qSNylxZdKs6w== + +"@types/merge-stream@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@types/merge-stream/-/merge-stream-1.1.2.tgz#a880ff66b1fbbb5eef4958d015c5947a9334dbb1" + integrity sha512-7faLmaE99g/yX0Y9pF1neh2IUqOf/fXMOWCVzsXjqI1EJ91lrgXmaBKf6bRWM164lLyiHxHt6t/ZO/cIzq61XA== + dependencies: + "@types/node" "*" + +"@types/micromatch@^2.3.30": + version "2.3.30" + resolved "https://registry.yarnpkg.com/@types/micromatch/-/micromatch-2.3.30.tgz#c2a143675f200fbcebe57fb0dab0cbf58093d4b0" + integrity sha512-6rW4NsUHaDudxJSuRlm1PdNu61CDXkgix7LBOBg7b3yWQ43XANYSPwkvX1cGiZvBVZW8c5rsCEfrfzbPkch8ag== + dependencies: + "@types/parse-glob" "*" + +"@types/minimatch@*": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" + integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA== + +"@types/mkdirp@^0.5.2": + version "0.5.2" + resolved "https://registry.yarnpkg.com/@types/mkdirp/-/mkdirp-0.5.2.tgz#503aacfe5cc2703d5484326b1b27efa67a339c1f" + integrity sha512-U5icWpv7YnZYGsN4/cmh3WD2onMY0aJIiTE6+51TwJCttdHvtCYmkBNOobHlXwrJRL0nkH9jH4kD+1FAdMN4Tg== + dependencies: + "@types/node" "*" + +"@types/node-notifier@^0.0.28": + version "0.0.28" + resolved "https://registry.yarnpkg.com/@types/node-notifier/-/node-notifier-0.0.28.tgz#86ba3d3aa8d918352cc3191d88de328b20dc93c1" + integrity sha1-hro9OqjZGDUswxkdiN4yiyDck8E= + dependencies: + "@types/node" "*" + "@types/node@*": version "10.12.0" resolved "https://registry.yarnpkg.com/@types/node/-/node-10.12.0.tgz#ea6dcbddbc5b584c83f06c60e82736d8fbb0c235" integrity sha512-3TUHC3jsBAB7qVRGxT6lWyYo2v96BMmD2PTcl47H25Lu7UXtFH/2qqmKiVrnel6Ne//0TFYf6uvNX+HW2FRkLQ== +"@types/parse-glob@*": + version "3.0.29" + resolved "https://registry.yarnpkg.com/@types/parse-glob/-/parse-glob-3.0.29.tgz#6a40ec7ebd2418ee69ee397e48e42169268a10bf" + integrity sha1-akDsfr0kGO5p7jl+SOQhaSaKEL8= + +"@types/prompts@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@types/prompts/-/prompts-1.2.0.tgz#891e73f735ad5e82e8adae3a99424128e105fb62" + integrity sha512-7JXpT2rSd4hqd2oBWU1wfEW6x6gX+qPH+gLzGEx+My3wcb67K9Rc02xNQRVn67phusmXm5Yqn4oTP2OW1G5zdQ== + +"@types/resolve@*": + version "0.0.8" + resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-0.0.8.tgz#f26074d238e02659e323ce1a13d041eee280e194" + integrity sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ== + dependencies: + "@types/node" "*" + +"@types/rimraf@^2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@types/rimraf/-/rimraf-2.0.2.tgz#7f0fc3cf0ff0ad2a99bb723ae1764f30acaf8b6e" + integrity sha512-Hm/bnWq0TCy7jmjeN5bKYij9vw5GrDFWME4IuxV08278NtU/VdGbzsBohcCUJ7+QMqmUq5hpRKB39HeQWJjztQ== + dependencies: + "@types/glob" "*" + "@types/node" "*" + +"@types/sane@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@types/sane/-/sane-2.0.0.tgz#891c272b10d1a6f735e915c731756104b5d21374" + integrity sha512-6o/YMfcKcWIK5IAxeo/1DEoVnGKBkPSPj9odxczz2i1gFY78GvguqgtNo28nyKgJUiKEWuFj11acpgdRmRFz7A== + dependencies: + "@types/node" "*" + +"@types/semver@^5.5.0": + version "5.5.0" + resolved "https://registry.yarnpkg.com/@types/semver/-/semver-5.5.0.tgz#146c2a29ee7d3bae4bf2fcb274636e264c813c45" + integrity sha512-41qEJgBH/TWgo5NFSvBCJ1qkoi3Q6ONSF2avrHq1LVEZfYpdHmj0y9SuTK+u9ZhG1sYQKBL1AWXKyLWP4RaUoQ== + +"@types/source-map-support@^0.4.1": + version "0.4.1" + resolved "https://registry.yarnpkg.com/@types/source-map-support/-/source-map-support-0.4.1.tgz#ad77158e8c6695a16629ef82b9fb9dfe7c610ac0" + integrity sha512-eoyZxYGwaeHq5zCVeoNgY1dQy6dVdm1b7K9k1FRnWkf997Tji3NLBoLAjK5WCobeh1Qs6Q5KUV1rZCmHvzaDBw== + dependencies: + "@types/node" "*" + +"@types/stack-utils@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-1.0.1.tgz#0a851d3bd96498fa25c33ab7278ed3bd65f06c3e" + integrity sha512-l42BggppR6zLmpfU6fq9HEa2oGPEI8yrSPL3GITjfRInppYFahObbIQOQK3UGxEnyQpltZLaPe75046NOZQikw== + +"@types/string-length@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@types/string-length/-/string-length-2.0.0.tgz#358ce3ff2e8c2310270ee192ddd6b79b64fed7b2" + integrity sha512-xFwWZpIWcLsrcVEybzxmxQM/26Snj1gqxmVrelC3We3Nub7q70RCtqTBVQ7nL+315fAcw4BGSFpxvMkhLApKmQ== + +"@types/strip-bom@3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@types/strip-bom/-/strip-bom-3.0.0.tgz#14a8ec3956c2e81edb7520790aecf21c290aebd2" + integrity sha1-FKjsOVbC6B7bdSB5CuzyHCkK69I= + +"@types/supports-color@^5.3.0": + version "5.3.0" + resolved "https://registry.yarnpkg.com/@types/supports-color/-/supports-color-5.3.0.tgz#eb6a52e9531fb3ebcd401cec774d1bdfb571f793" + integrity sha512-WxwTXnHTIsk7srax1icjLgX+6w1MUAJbhyCpRP/45paEElsPDQUJZDgr1UpKuL2S3Tb+ZyX9MjWwmcSD4bUoOQ== + +"@types/tough-cookie@*": + version "2.3.4" + resolved "https://registry.yarnpkg.com/@types/tough-cookie/-/tough-cookie-2.3.4.tgz#821878b81bfab971b93a265a561d54ea61f9059f" + integrity sha512-Set5ZdrAaKI/qHdFlVMgm/GsAv/wkXhSTuZFkJ+JI7HK+wIkIlOaUXSXieIvJ0+OvGIqtREFoE+NHJtEq0gtEw== + +"@types/weak@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@types/weak/-/weak-1.0.0.tgz#7b3bf891c4b53e2b8a144b7e41f4b0f6e78c2ba8" + integrity sha512-6WXZpeAac3vj5+OfQvlqYEtc88oOgvkcxbrnmBw53Da6gA+MGztL+Hns3BpnyUevgz+4DxsJblgAew1A/tkcng== + dependencies: + "@types/node" "*" + +"@types/which@^1.3.1": + version "1.3.1" + resolved "https://registry.yarnpkg.com/@types/which/-/which-1.3.1.tgz#7802c380887986ca909008afea4e08025b130f8d" + integrity sha512-ZrJDWpvg75LTGX4XwuneY9s6bF3OeZcGTpoGh3zDV9ytzcHMFsRrMIaLBRJZQMBoGyKs6unBQfVdrLZiYfb1zQ== + +"@types/write-file-atomic@^2.1.1": + version "2.1.1" + resolved "https://registry.yarnpkg.com/@types/write-file-atomic/-/write-file-atomic-2.1.1.tgz#7f9fcd6c5c8d194dba03472e3fa6cb29a839764c" + integrity sha512-mROQhTxpJsOm/S0eOxDHUy5WJ0yS8fmqsq/s+u5OuAh1TxBFSqVBTkLjbyxDPcKh7DeJXk0OYrCkxXlkf8zu1g== + dependencies: + "@types/node" "*" + +"@types/yargs@^12.0.2": + version "12.0.2" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-12.0.2.tgz#7569157b2601d49d4442023c0d22f81d23f62d1e" + integrity sha512-NUyxaQW48vjeDHybmhy7CFx/6of1+PoaEGPMI+0PzBVr5s3BTELT7gV4lNaxUsKllNS1YAjkeTEhBtzIDWs2WQ== + JSONStream@^1.0.3, JSONStream@^1.0.4, JSONStream@^1.3.4: version "1.3.5" resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0" @@ -2505,7 +2819,7 @@ babel-types@^6.24.1, babel-types@^6.26.0: lodash "^4.17.4" to-fast-properties "^1.0.3" -babylon@^6.15.0, babylon@^6.17.4, babylon@^6.18.0: +babylon@^6.17.4, babylon@^6.18.0: version "6.18.0" resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" integrity sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ== @@ -4203,10 +4517,10 @@ debug@^3.1.0: dependencies: ms "^2.1.1" -debug@^4.0.1: - version "4.1.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.0.tgz#373687bffa678b38b1cd91f861b63850035ddc87" - integrity sha512-heNPJUJIqC+xB6ayLAMHaIrmN9HKa7aQO8MGqKpvCA+uJYVcvR6l5kgdrhRuwPFHU7P5/A1w0BjByPHwpfTDKg== +debug@^4.0.1, debug@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" + integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== dependencies: ms "^2.1.1" @@ -4325,7 +4639,7 @@ deep-is@~0.1.3: resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= -deepmerge@^2.1.1: +deepmerge@^2.0.1, deepmerge@^2.1.1: version "2.2.1" resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-2.2.1.tgz#5d3ff22a01c00f645405a2fbc17d0778a1801170" integrity sha512-R9hc1Xa/NOBi9WRVUWg19rl1UB7Tt4kuPd+thNJgFZoxXsTz7ncaPaeIm+40oSGuP33DfMb4sZt1QIGiJzC4EA== @@ -5025,6 +5339,15 @@ eslint-import-resolver-node@^0.3.1: debug "^2.6.9" resolve "^1.5.0" +eslint-import-resolver-typescript@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-1.1.1.tgz#e6d42172b95144ef16610fe104ef38340edea591" + integrity sha512-jqSfumQ+H5y3FUJ6NjRkbOQSUOlbBucGTN3ELymOtcDBbPjVdm/luvJuCfCaIXGh8sEF26ma1qVdtDgl9ndhUg== + dependencies: + debug "^4.0.1" + resolve "^1.4.0" + tsconfig-paths "^3.6.0" + eslint-module-utils@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.2.0.tgz#b270362cd88b1a48ad308976ce7fa54e98411746" @@ -5234,11 +5557,6 @@ estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1, estraverse@^4.2.0: resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" integrity sha1-De4/7TH81GlhjOc0IJn8GvoL2xM= -estree-walker@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.2.1.tgz#bdafe8095383d8414d5dc2ecf4c9173b6db9412e" - integrity sha1-va/oCVOD2EFNXcLs9MkXO225QS4= - estree-walker@^0.5.2: version "0.5.2" resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.5.2.tgz#d3850be7529c9580d815600b53126515e146dd39" @@ -5831,14 +6149,6 @@ flow-bin@^0.85.0: resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.85.0.tgz#a3ca80748a35a071d5bbb2fcd61d64d977fc53a6" integrity sha512-ougBA2q6Rn9sZrjZQ9r5pTFxCotlGouySpD2yRIuq5AYwwfIT8HHhVMeSwrN5qJayjHINLJyrnsSkkPCZyfMrQ== -flow-remove-types@^1.1.0: - version "1.2.3" - resolved "https://registry.yarnpkg.com/flow-remove-types/-/flow-remove-types-1.2.3.tgz#6131aefc7da43364bb8b479758c9dec7735d1a18" - integrity sha512-ypq/U3V+t9atYiOuSJd40tekCra03EHKoRsiK/wXGrsZimuum0kdwVY7Yv0HTaoXgHW1WiayomYd+Q3kkvPl9Q== - dependencies: - babylon "^6.15.0" - vlq "^0.2.1" - flush-write-stream@^1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/flush-write-stream/-/flush-write-stream-1.0.3.tgz#c5d586ef38af6097650b49bc41b55fabb19f35bd" @@ -7839,11 +8149,25 @@ json3@^3.3.2: resolved "https://registry.yarnpkg.com/json3/-/json3-3.3.2.tgz#3c0434743df93e2f5c42aee7b19bcb483575f4e1" integrity sha1-PAQ0dD35Pi9cQq7nsZvLSDV19OE= -json5@^0.5.0, json5@^0.5.1: +json5@^0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" integrity sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE= +json5@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe" + integrity sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow== + dependencies: + minimist "^1.2.0" + +json5@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.0.tgz#e7a0c62c48285c628d20a10b85c89bb807c32850" + integrity sha512-8Mh9h6xViijj36g7Dxi+Y4S6hNGV96vcJZr/SrlHh1LR/pEn/8j/+qIBbs44YKl69Lrfctp4QD+AdWLTMqEZAQ== + dependencies: + minimist "^1.2.0" + jsonfile@^2.1.0: version "2.4.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8" @@ -10047,7 +10371,7 @@ parse-passwd@^1.0.0: resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" integrity sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY= -parse5@4.0.0: +parse5@4.0.0, parse5@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/parse5/-/parse5-4.0.0.tgz#6d78656e3da8d78b4ec0b906f7c08ef1dfe3f608" integrity sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA== @@ -11592,10 +11916,10 @@ ripemd160@^2.0.0, ripemd160@^2.0.1: hash-base "^3.0.0" inherits "^2.0.1" -rollup-plugin-babel@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/rollup-plugin-babel/-/rollup-plugin-babel-4.0.3.tgz#8282b0e22233160d679e9c7631342e848422fb02" - integrity sha512-/PP0MgbPQyRywI4zRIJim6ySjTcOLo4kQbEbROqp9kOR3kHC3FeU++QpBDZhS2BcHtJTVZMVbBV46flbBN5zxQ== +rollup-plugin-babel@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/rollup-plugin-babel/-/rollup-plugin-babel-4.1.0.tgz#c97f50c82aa8e89ddaa116cdc5c832b8ba74db17" + integrity sha512-4IYv/yTNyH4P/Cma1mWdqy42gc051i1mTe/6oe8F055WzJGSb2qs1mSDwZTo93wA6kMBgHBIR/OcBk7JMnL59Q== dependencies: "@babel/helper-module-imports" "^7.0.0" rollup-pluginutils "^2.3.0" @@ -11610,14 +11934,6 @@ rollup-plugin-commonjs@^9.1.8: resolve "^1.8.1" rollup-pluginutils "^2.3.3" -rollup-plugin-flow@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/rollup-plugin-flow/-/rollup-plugin-flow-1.1.1.tgz#6ce568f1dd559666b77ab76b4bae251407528db6" - integrity sha1-bOVo8d1Vlma3erdrS64lFAdSjbY= - dependencies: - flow-remove-types "^1.1.0" - rollup-pluginutils "^1.5.1" - rollup-plugin-json@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/rollup-plugin-json/-/rollup-plugin-json-3.1.0.tgz#7c1daf60c46bc21021ea016bd00863561a03321b" @@ -11656,14 +11972,6 @@ rollup-plugin-node-resolve@^3.4.0: is-module "^1.0.0" resolve "^1.1.6" -rollup-pluginutils@^1.5.1: - version "1.5.2" - resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-1.5.2.tgz#1e156e778f94b7255bfa1b3d0178be8f5c552408" - integrity sha1-HhVud4+UtyVb+hs9AXi+j1xVJAg= - dependencies: - estree-walker "^0.2.1" - minimatch "^3.0.2" - rollup-pluginutils@^2.3.0, rollup-pluginutils@^2.3.1, rollup-pluginutils@^2.3.3: version "2.3.3" resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.3.3.tgz#3aad9b1eb3e7fe8262820818840bf091e5ae6794" @@ -12994,6 +13302,17 @@ truncate-html@^1.0.1: "@types/cheerio" "^0.22.8" cheerio "0.22.0" +tsconfig-paths@^3.6.0: + version "3.7.0" + resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.7.0.tgz#02ae978db447b22e09dafcd4198be95c4885ceb2" + integrity sha512-7iE+Q/2E1lgvxD+c0Ot+GFFmgmfIjt/zCayyruXkXQ84BLT85gHXy0WSoQSiuFX9+d+keE/jiON7notV74ZY+A== + dependencies: + "@types/json5" "^0.0.29" + deepmerge "^2.0.1" + json5 "^1.0.1" + minimist "^1.2.0" + strip-bom "^3.0.0" + tslib@^1.8.0, tslib@^1.9.0: version "1.9.3" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286" @@ -13046,10 +13365,10 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@^3.0.0, typescript@^3.0.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.1.3.tgz#01b70247a6d3c2467f70c45795ef5ea18ce191d5" - integrity sha512-+81MUSyX+BaSo+u2RbozuQk/UWx6hfG0a5gHu4ANEM4sU96XbuIyAB+rWBW1u70c6a5QuZfuYICn3s2UjuHUpA== +typescript@^3.0.0, typescript@^3.2.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.2.2.tgz#fe8101c46aa123f8353523ebdcf5730c2ae493e5" + integrity sha512-VCj5UiSyHBjwfYacmDuc/NOk4QQixbE+Wn7MFJuS0nRuPQbof132Pw4u53dm264O8LPc2MVsc7RJNml5szurkg== ua-parser-js@^0.7.18: version "0.7.18" @@ -13499,7 +13818,7 @@ vinyl@^1.0.0: clone-stats "^0.0.1" replace-ext "0.0.1" -vlq@^0.2.1, vlq@^0.2.2: +vlq@^0.2.2: version "0.2.3" resolved "https://registry.yarnpkg.com/vlq/-/vlq-0.2.3.tgz#8f3e4328cf63b1540c0d67e1b2778386f8975b26" integrity sha512-DRibZL6DsNhIgYQ+wNdWDL2SL3bKPlVrRiBqV5yuMm++op8W4kGFtaQfCs4KEJn0wBZcHVHJ3eoywX8983k1ow==