From 8dec8ba21c2f071534870567ac2d36d15ef0b2b4 Mon Sep 17 00:00:00 2001 From: Dmitrii Abramov Date: Fri, 21 Apr 2017 21:48:52 -0700 Subject: [PATCH] Custom Reporters (merge/fix) --- .vscode/settings.json | 6 + .../custom-reporters-test.js.snap | 16 +- .../__tests__/custom-reporters-test.js | 18 +- .../not-required-in-test-suite.js | 2 +- .../__tests__/add-fail-test.js | 11 + .../custom_reporters/__tests__/add-test.js | 11 + integration_tests/custom_reporters/add.js | 15 +- .../custom_reporters/package.json | 2 +- .../reporters/IncompleteReporter.js | 10 +- .../reporters/TestReporter.js | 19 +- packages/jest-cli/src/ReporterDispatcher.js | 97 +-- packages/jest-cli/src/TestRunner.js | 96 +-- .../jest-cli/src/reporters/BaseReporter.js | 10 +- .../src/reporters/CoverageReporter.js | 29 +- .../jest-cli/src/reporters/DefaultReporter.js | 13 +- .../jest-cli/src/reporters/NotifyReporter.js | 7 +- .../jest-cli/src/reporters/SummaryReporter.js | 33 +- .../jest-cli/src/reporters/VerboseReporter.js | 11 +- .../__tests__/CoverageReporter-test.js | 56 +- packages/jest-config/src/index.js | 1 + packages/jest-config/src/normalize.js | 2 +- .../src/reporterValidationErrors.js | 56 +- types/TestRunner.js | 23 +- yarn.lock | 700 ++++++++++++++++-- 24 files changed, 913 insertions(+), 331 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000000..7e62645bd9fe --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,6 @@ +{ + "jest.pathToJest": "npm run jest --", + "editor.rulers": [ + 80 + ] +} diff --git a/integration_tests/__tests__/__snapshots__/custom-reporters-test.js.snap b/integration_tests/__tests__/__snapshots__/custom-reporters-test.js.snap index 7cd86bd25226..91653b378da4 100644 --- a/integration_tests/__tests__/__snapshots__/custom-reporters-test.js.snap +++ b/integration_tests/__tests__/__snapshots__/custom-reporters-test.js.snap @@ -12,14 +12,12 @@ exports[`Custom Reporters Integration TestReporter with all tests failing 1`] = Object { "onRunComplete": Object { "called": true, - "config": "object", "numFailedTests": 1, "numPassedTests": 0, "numTotalTests": 1, }, "onRunStart": Object { "called": true, - "config": "object", "options": "object", }, "onTestResult": Object { @@ -28,11 +26,10 @@ Object { }, "onTestStart": Object { "called": true, - "config": false, - "path": true, + "path": false, }, "options": Object { - "christop": "pojer", + "christoph": "pojer", "dmitrii": "abramov", "hello": "world", }, @@ -43,14 +40,12 @@ exports[`Custom Reporters Integration TestReporter with all tests passing 1`] = Object { "onRunComplete": Object { "called": true, - "config": "object", "numFailedTests": 0, "numPassedTests": 1, "numTotalTests": 1, }, "onRunStart": Object { "called": true, - "config": "object", "options": "object", }, "onTestResult": Object { @@ -59,11 +54,10 @@ Object { }, "onTestStart": Object { "called": true, - "config": false, - "path": true, + "path": false, }, "options": Object { - "christop": "pojer", + "christoph": "pojer", "dmitrii": "abramov", "hello": "world", }, @@ -78,6 +72,8 @@ Unexpected value for Path at index 0 of reporter at index 0 string Got: number + Reporters config: + [ 3243242 ] Configuration Documentation: https://facebook.github.io/jest/docs/configuration.html diff --git a/integration_tests/__tests__/custom-reporters-test.js b/integration_tests/__tests__/custom-reporters-test.js index 183a8b81734f..dbff597edbf9 100644 --- a/integration_tests/__tests__/custom-reporters-test.js +++ b/integration_tests/__tests__/custom-reporters-test.js @@ -59,11 +59,10 @@ describe('Custom Reporters Integration', () => { }); test('TestReporter with all tests passing', () => { - const { - stdout, - status, - stderr, - } = runJest('custom_reporters', ['add-test.js']); + const {stdout, status, stderr} = runJest('custom_reporters', [ + 'add-test.js', + ]); + const parsedJSON = JSON.parse(stdout); expect(status).toBe(0); @@ -72,11 +71,9 @@ describe('Custom Reporters Integration', () => { }); test('TestReporter with all tests failing', () => { - const { - stdout, - status, - stderr, - } = runJest('custom_reporters', ['add-fail-test.js']); + const {stdout, status, stderr} = runJest('custom_reporters', [ + 'add-fail-test.js', + ]); const parsedJSON = JSON.parse(stdout); @@ -87,6 +84,7 @@ describe('Custom Reporters Integration', () => { test('IncompleteReporter for flexibility', () => { const {stderr, stdout, status} = runJest('custom_reporters', [ + '--no-cache', '--config', JSON.stringify({ reporters: ['/reporters/IncompleteReporter.js'], diff --git a/integration_tests/coverage_report/not-required-in-test-suite.js b/integration_tests/coverage_report/not-required-in-test-suite.js index 747a45c65575..4f1f42d27841 100644 --- a/integration_tests/coverage_report/not-required-in-test-suite.js +++ b/integration_tests/coverage_report/not-required-in-test-suite.js @@ -9,7 +9,7 @@ throw new Error( `this error should not be a problem because` + - `this file is never required or executed`, + `this file is never required or executed` ); // Flow annotations to make sure istanbul can instrument non ES6 source diff --git a/integration_tests/custom_reporters/__tests__/add-fail-test.js b/integration_tests/custom_reporters/__tests__/add-fail-test.js index ece775e4041b..58fd6b801dd5 100644 --- a/integration_tests/custom_reporters/__tests__/add-fail-test.js +++ b/integration_tests/custom_reporters/__tests__/add-fail-test.js @@ -1,3 +1,14 @@ +/** + * Copyright (c) 2014-present, Facebook, Inc. All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +'use strict'; + const add = require('../add'); describe('CustomReporters', () => { diff --git a/integration_tests/custom_reporters/__tests__/add-test.js b/integration_tests/custom_reporters/__tests__/add-test.js index a2130ede580c..000b2a6a09df 100644 --- a/integration_tests/custom_reporters/__tests__/add-test.js +++ b/integration_tests/custom_reporters/__tests__/add-test.js @@ -1,3 +1,14 @@ +/** + * Copyright (c) 2014-present, Facebook, Inc. All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +'use strict'; + const add = require('../add'); describe('Custom Reporters', () => { diff --git a/integration_tests/custom_reporters/add.js b/integration_tests/custom_reporters/add.js index a7276b3dd0a9..9e77033def6d 100644 --- a/integration_tests/custom_reporters/add.js +++ b/integration_tests/custom_reporters/add.js @@ -1,3 +1,12 @@ -module.exports = function add(x, y) { - return x + y; -}; +/** + * Copyright (c) 2014-present, Facebook, Inc. All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +'use strict'; + +module.exports = (x, y) => x + y; diff --git a/integration_tests/custom_reporters/package.json b/integration_tests/custom_reporters/package.json index 6fa9b322698e..590f11ffe692 100644 --- a/integration_tests/custom_reporters/package.json +++ b/integration_tests/custom_reporters/package.json @@ -4,7 +4,7 @@ ["/reporters/TestReporter.js", { "hello": "world", "dmitrii": "abramov", - "christop": "pojer" + "christoph": "pojer" }] ] } diff --git a/integration_tests/custom_reporters/reporters/IncompleteReporter.js b/integration_tests/custom_reporters/reporters/IncompleteReporter.js index 232a5b84c7a4..d952690d10d1 100644 --- a/integration_tests/custom_reporters/reporters/IncompleteReporter.js +++ b/integration_tests/custom_reporters/reporters/IncompleteReporter.js @@ -12,15 +12,11 @@ * IncompleteReporter * Reporter to test for the flexibility of the interface we implemented. * The reporters shouldn't be required to implement all the methods - * - * This only implements one mehtod onRunComplete which should be called + * + * This only implements one method onRunComplete which should be called */ class IncompleteReporter { - constructor(options) { - this.options = {}; - } - - onRunComplete(config, results) { + onRunComplete(contexts, results) { console.log('onRunComplete is called'); console.log('Passed Tests: ' + results.numPassedTests); console.log('Failed Tests: ' + results.numFailedTests); diff --git a/integration_tests/custom_reporters/reporters/TestReporter.js b/integration_tests/custom_reporters/reporters/TestReporter.js index 5a057c9194c1..cb5400d18ab3 100644 --- a/integration_tests/custom_reporters/reporters/TestReporter.js +++ b/integration_tests/custom_reporters/reporters/TestReporter.js @@ -10,18 +10,18 @@ /** * TestReporter - * Reporter for testing the outputs, without any extra + * Reporter for testing the outputs, without any extra * hassle. Uses a JSON like syntax for testing the reporters - * instead of outputting the text to stdout and using match functions + * instead of outputting the text to stdout and using match functions * to get the output. */ class TestReporter { - constructor(options) { + constructor(globalConfig, options) { this._options = options; /** * statsCollected property - * contains most of the statistics + * contains most of the statistics * related to the object to be called, * This here helps us in avoiding the string match * statements nothing else @@ -45,35 +45,32 @@ class TestReporter { } } - onTestStart(config, path) { + onTestStart(path) { const onTestStart = this._statsCollected.onTestStart; onTestStart.called = true; - onTestStart.config = config === undefined; onTestStart.path = typeof path === 'string'; } - onTestResult(config, testResult, results) { + onTestResult(test, testResult, results) { const onTestResult = this._statsCollected.onTestResult; onTestResult.called = true; onTestResult.times++; } - onRunStart(config, results, options) { + onRunStart(results, options) { this.clearLine(); const onRunStart = this._statsCollected.onRunStart; onRunStart.called = true; - onRunStart.config = typeof config; onRunStart.options = typeof options; } - onRunComplete(config, results) { + onRunComplete(contexts, results) { const onRunComplete = this._statsCollected.onRunComplete; onRunComplete.called = true; - onRunComplete.config = typeof config; onRunComplete.numPassedTests = results.numPassedTests; onRunComplete.numFailedTests = results.numFailedTests; diff --git a/packages/jest-cli/src/ReporterDispatcher.js b/packages/jest-cli/src/ReporterDispatcher.js index 00bc95421cee..9d3510fb4da8 100644 --- a/packages/jest-cli/src/ReporterDispatcher.js +++ b/packages/jest-cli/src/ReporterDispatcher.js @@ -10,100 +10,67 @@ 'use strict'; -import type {RunnerContext} from 'types/Reporters'; -import type {HasteFS} from 'types/HasteMap'; -import type {Config, Path} from 'types/Config'; +import type {Context} from 'types/Context'; +import type {Reporter, Test} from 'types/TestRunner'; import type {TestResult, AggregatedResult} from 'types/TestResult'; +import type {ReporterOnStartOptions} from 'types/Reporters'; -export type RunOptions = { +export type RunOptions = {| estimatedTime: number, showStatus: boolean, -}; +|}; class ReporterDispatcher { _disabled: boolean; - _reporters: Array; - _runnerContext: RunnerContext; - _requiredMethods: Array; + _reporters: Array; - constructor(hasteFS: HasteFS, getTestSummary: () => string) { - this._runnerContext = {getTestSummary, hasteFS}; + constructor() { this._reporters = []; } - register(reporter: Object): void { + register(reporter: Reporter): void { this._reporters.push(reporter); } - unregister(ReporterClass: Function): void { + unregister(ReporterClass: Function) { this._reporters = this._reporters.filter( reporter => !(reporter instanceof ReporterClass), ); } - onTestResult( - config: Config, - testResult: TestResult, - results: AggregatedResult, - ) { - this._callReporterMethod('onTestResult', [ - config, - testResult, - results, - this._runnerContext, - ]); - } - - onTestStart(config: Config, path: Path) { - this._callReporterMethod('onTestStart', [ - config, - path, - this._runnerContext, - ]); + onTestResult(test: Test, testResult: TestResult, results: AggregatedResult) { + this._reporters.forEach( + reporter => + reporter.onTestResult && + reporter.onTestResult(test, testResult, results), + ); } - onRunStart(config: Config, results: AggregatedResult, options: RunOptions) { - this._callReporterMethod('onRunStart', [ - config, - results, - this._runnerContext, - options, - ]); + onTestStart(test: Test) { + this._reporters.forEach( + reporter => reporter.onTestStart && reporter.onTestStart(test), + ); } - onRunComplete(config: Config, results: AggregatedResult) { - this._callReporterMethod('onRunComplete', [ - config, - results, - this._runnerContext, - ]); + onRunStart(results: AggregatedResult, options: ReporterOnStartOptions) { + this._reporters.forEach( + reporter => reporter.onRunStart && reporter.onRunStart(results, options), + ); } - /** - * Helper mehtod to call only the methods that exist - * on a given reporter - * - * @private - * @param {string} method name of the mehtod to be called - * @param {Array} reporterArgs arguments passed in to call the reporter - */ - _callReporterMethod(method: string, reporterArgs: Array) { - this._reporters.forEach(reporter => { - if (reporter[method]) { - reporter[method].apply(reporter, reporterArgs); - } - }); + async onRunComplete(contexts: Set, results: AggregatedResult) { + this._reporters.forEach( + reporter => + reporter.onRunComplete && reporter.onRunComplete(contexts, results), + ); } // Return a list of last errors for every reporter getErrors(): Array { - return this._reporters.reduce( - (list, reporter) => { - const error = reporter.getLastError && reporter.getLastError(); - return error ? list.concat(error) : list; - }, - [], - ); + return this._reporters.reduce((list, reporter) => { + const error = reporter.getLastError && reporter.getLastError(); + return error ? list.concat(error) : list; + }, []); } hasErrors(): boolean { diff --git a/packages/jest-cli/src/TestRunner.js b/packages/jest-cli/src/TestRunner.js index 998f324b0ef3..9372bf79f17d 100644 --- a/packages/jest-cli/src/TestRunner.js +++ b/packages/jest-cli/src/TestRunner.js @@ -17,7 +17,7 @@ import type { import type {GlobalConfig, ReporterConfig} from 'types/Config'; import type {Context} from 'types/Context'; import type {PathPattern} from './SearchSource'; -import type {Test} from 'types/TestRunner'; +import type {Reporter, Test} from 'types/TestRunner'; const {formatExecError} = require('jest-message-util'); @@ -44,7 +44,7 @@ class CancelRun extends Error { } } -export type Options = {| +export type TestRunnerOptions = {| maxWorkers: number, pattern: PathPattern, startRun: () => *, @@ -59,17 +59,17 @@ const TEST_WORKER_PATH = require.resolve('./TestWorker'); class TestRunner { _globalConfig: GlobalConfig; - _options: Options; + _options: TestRunnerOptions; _dispatcher: ReporterDispatcher; - constructor(globalConfig: GlobalConfig, options: Options) { + constructor(globalConfig: GlobalConfig, options: TestRunnerOptions) { this._globalConfig = globalConfig; this._dispatcher = new ReporterDispatcher(); this._options = options; this._setupReporters(); } - addReporter(reporter: Object) { + addReporter(reporter: Reporter) { this._dispatcher.register(reporter); } @@ -150,7 +150,7 @@ class TestRunner { aggregatedResults.snapshot.filesRemoved)); }; - this._dispatcher.onRunStart(this._globalConfig, aggregatedResults, { + this._dispatcher.onRunStart(aggregatedResults, { estimatedTime, showStatus: !runInBand, }); @@ -167,11 +167,7 @@ class TestRunner { updateSnapshotState(); aggregatedResults.wasInterrupted = watcher.isInterrupted(); - await this._dispatcher.onRunComplete( - contexts, - this._globalConfig, - aggregatedResults, - ); + await this._dispatcher.onRunComplete(contexts, aggregatedResults); const anyTestFailures = !(aggregatedResults.numFailedTests === 0 && aggregatedResults.numRuntimeErrorTestSuites === 0); @@ -282,30 +278,17 @@ class TestRunner { return Promise.race([runAllTests, onInterrupt]).then(cleanup, cleanup); } - /** - * Checks if default reporters should be added or not - * @private - */ _shouldAddDefaultReporters(reporters?: Array): boolean { return !reporters || reporters.indexOf(DEFAULT_REPORTER_LABEL) !== -1; } - /** - * Main method to Setup reporters to be used with TestRunner - * @private - */ _setupReporters() { - const {collectCoverage, expand, notify, verbose, reporters} = this._globalConfig; + const {collectCoverage, notify, reporters} = this._globalConfig; - this.addReporter( - verbose - ? new VerboseReporter({expand}) - : new DefaultReporter({verbose: !!verbose}), - ); const isDefault = this._shouldAddDefaultReporters(reporters); if (isDefault) { - this._setupDefaultReporters(this._globalConfig); + this._setupDefaultReporters(); } if (reporters && Array.isArray(reporters)) { @@ -317,67 +300,70 @@ class TestRunner { // want to require it if we're not in the `--coverage` mode const CoverageReporter = require('./reporters/CoverageReporter'); this.addReporter( - new CoverageReporter({maxWorkers: this._options.maxWorkers}), + new CoverageReporter(this._globalConfig, { + maxWorkers: this._options.maxWorkers, + }), ); } - this.addReporter(new SummaryReporter(this._options)); - if (notify) { this.addReporter(new NotifyReporter(this._options.startRun)); } } - _setupDefaultReporters(config: Config) { + _setupDefaultReporters() { this.addReporter( - config.verbose ? new VerboseReporter(config) : new DefaultReporter(), + this._globalConfig.verbose + ? new VerboseReporter(this._globalConfig) + : new DefaultReporter(this._globalConfig), ); - this.addReporter(new SummaryReporter(this._options)); + this.addReporter( + new SummaryReporter(this._globalConfig, { + pattern: this._options.pattern, + testNamePattern: this._options.testNamePattern, + testPathPattern: this._options.testPathPattern, + }), + ); } - /** - * Adds Custom reporters to Jest - * @private - */ _addCustomReporters(reporters: Array) { - const customReporter = reporters.filter(reporter => reporter !== 'default'); + const customReporters = reporters.filter( + reporter => reporter !== 'default', + ); - customReporter.forEach((reporter, index) => { + customReporters.forEach((reporter, index) => { const {options, path} = this._getReporterProps(reporter); try { const Reporter = require(path); - this.addReporter(new Reporter(options)); + this.addReporter(new Reporter(this._globalConfig, options)); } catch (error) { - console.error( - chalk.red( - 'An error occured while adding the reporter at path ' + path, - ), + throw new Error( + 'An error occured while adding the reporter at path "' + + path + + '".' + + error.message, ); - throw error; } }); } /** * Get properties of a reporter in an object - * to make dealing with them less painful - * - * Objects contain the following properties: - * - options - * - path + * to make dealing with them less painful. */ - _getReporterProps(reporter: ReporterConfig): Object { - let props = {}; + _getReporterProps( + reporter: ReporterConfig, + ): {path: string, options?: Object} { if (typeof reporter === 'string') { - props = {path: reporter}; + return {path: reporter}; } else if (Array.isArray(reporter)) { const [path, options] = reporter; - props = {options, path}; + return {options, path}; } - return props; + throw new Error('Reproter should be either a string or an array'); } _bailIfNeeded( @@ -391,7 +377,7 @@ class TestRunner { } else { const exit = () => process.exit(1); return this._dispatcher - .onRunComplete(contexts, this._globalConfig, aggregatedResults) + .onRunComplete(contexts, aggregatedResults) .then(exit) .catch(exit); } diff --git a/packages/jest-cli/src/reporters/BaseReporter.js b/packages/jest-cli/src/reporters/BaseReporter.js index 4d97be9f8188..fe1fb4a52bfc 100644 --- a/packages/jest-cli/src/reporters/BaseReporter.js +++ b/packages/jest-cli/src/reporters/BaseReporter.js @@ -10,7 +10,6 @@ 'use strict'; import type {AggregatedResult, TestResult} from 'types/TestResult'; -import type {GlobalConfig} from 'types/Config'; import type {Context} from 'types/Context'; import type {Test} from 'types/TestRunner'; import type {ReporterOnStartOptions} from 'types/Reporters'; @@ -24,11 +23,7 @@ class BaseReporter { process.stderr.write(message + '\n'); } - onRunStart( - globalConfig: GlobalConfig, - results: AggregatedResult, - options: ReporterOnStartOptions, - ) { + onRunStart(results: AggregatedResult, options: ReporterOnStartOptions) { preRunMessage.remove(process.stderr); } @@ -38,9 +33,8 @@ class BaseReporter { onRunComplete( contexts: Set, - globalConfig: GlobalConfig, aggregatedResults: AggregatedResult, - ): ?Promise {} + ): ?Promise {} _setError(error: Error) { this._error = error; diff --git a/packages/jest-cli/src/reporters/CoverageReporter.js b/packages/jest-cli/src/reporters/CoverageReporter.js index 2876b6b934bc..a6a491ff6512 100644 --- a/packages/jest-cli/src/reporters/CoverageReporter.js +++ b/packages/jest-cli/src/reporters/CoverageReporter.js @@ -19,6 +19,10 @@ import type {GlobalConfig} from 'types/Config'; import type {Context} from 'types/Context'; import type {Test} from 'types/TestRunner'; +type CoverageReporterOptions = { + maxWorkers: number, +}; + const BaseReporter = require('./BaseReporter'); const {clearLine} = require('jest-util'); @@ -37,14 +41,16 @@ const isInteractive = process.stdout.isTTY && !isCI; class CoverageReporter extends BaseReporter { _coverageMap: CoverageMap; - _maxWorkers: number; + _globalConfig: GlobalConfig; _sourceMapStore: any; + _maxWorkers: number; - constructor({maxWorkers}: {maxWorkers: number}) { - super(); - this._maxWorkers = maxWorkers; + constructor(globalConfig: GlobalConfig, options: CoverageReporterOptions) { + super(globalConfig); this._coverageMap = istanbulCoverage.createCoverageMap({}); + this._globalConfig = globalConfig; this._sourceMapStore = libSourceMaps.createSourceMapStore(); + this._maxWorkers = options.maxWorkers; } onTestResult( @@ -68,25 +74,24 @@ class CoverageReporter extends BaseReporter { async onRunComplete( contexts: Set, - globalConfig: GlobalConfig, aggregatedResults: AggregatedResult, ) { - await this._addUntestedFiles(globalConfig, contexts); + await this._addUntestedFiles(this._globalConfig, contexts); let map = this._coverageMap; let sourceFinder: Object; - if (globalConfig.mapCoverage) { + if (this._globalConfig.mapCoverage) { ({map, sourceFinder} = this._sourceMapStore.transformCoverage(map)); } const reporter = createReporter(); try { - if (globalConfig.coverageDirectory) { - reporter.dir = globalConfig.coverageDirectory; + if (this._globalConfig.coverageDirectory) { + reporter.dir = this._globalConfig.coverageDirectory; } - let coverageReporters = globalConfig.coverageReporters || []; + let coverageReporters = this._globalConfig.coverageReporters || []; if ( - !globalConfig.useStderr && + !this._globalConfig.useStderr && coverageReporters.length && coverageReporters.indexOf('text') === -1 ) { @@ -108,7 +113,7 @@ class CoverageReporter extends BaseReporter { ); } - this._checkThreshold(globalConfig, map); + this._checkThreshold(this._globalConfig, map); } _addUntestedFiles(globalConfig: GlobalConfig, contexts: Set) { diff --git a/packages/jest-cli/src/reporters/DefaultReporter.js b/packages/jest-cli/src/reporters/DefaultReporter.js index 7d1095a00f33..aa91bbcbc39a 100644 --- a/packages/jest-cli/src/reporters/DefaultReporter.js +++ b/packages/jest-cli/src/reporters/DefaultReporter.js @@ -28,10 +28,6 @@ const isCI = require('is-ci'); type write = (chunk: string, enc?: any, cb?: () => void) => boolean; -type Options = {| - verbose: boolean, -|}; - const TITLE_BULLET = chalk.bold('\u25cf '); const isInteractive = process.stdin.isTTY && !isCI; @@ -39,13 +35,13 @@ const isInteractive = process.stdin.isTTY && !isCI; class DefaultReporter extends BaseReporter { _clear: string; // ANSI clear sequence for the last printed status _err: write; - _options: Options; + _globalConfig: GlobalConfig; _out: write; _status: Status; - constructor(options: Options) { + constructor(globalConfig: GlobalConfig) { super(); - this._options = options; + this._globalConfig = globalConfig; this._clear = ''; this._out = process.stdout.write.bind(process.stdout); this._err = process.stderr.write.bind(process.stderr); @@ -112,7 +108,6 @@ class DefaultReporter extends BaseReporter { } onRunStart( - globalConfig: GlobalConfig, aggregatedResults: AggregatedResult, options: ReporterOnStartOptions, ) { @@ -165,7 +160,7 @@ class DefaultReporter extends BaseReporter { 'Console\n\n' + getConsoleOutput( config.rootDir, - !!this._options.verbose, + !!this._globalConfig.verbose, consoleBuffer, ), ); diff --git a/packages/jest-cli/src/reporters/NotifyReporter.js b/packages/jest-cli/src/reporters/NotifyReporter.js index dd165edb3a00..8181f26b4778 100644 --- a/packages/jest-cli/src/reporters/NotifyReporter.js +++ b/packages/jest-cli/src/reporters/NotifyReporter.js @@ -10,7 +10,6 @@ 'use strict'; import type {AggregatedResult} from 'types/TestResult'; -import type {GlobalConfig} from 'types/Config'; import type {Context} from 'types/Context'; const BaseReporter = require('./BaseReporter'); @@ -30,11 +29,7 @@ class NotifyReporter extends BaseReporter { this._startRun = startRun; } - onRunComplete( - contexts: Set, - globalConfig: GlobalConfig, - result: AggregatedResult, - ): void { + onRunComplete(contexts: Set, result: AggregatedResult): void { const success = result.numFailedTests === 0 && result.numRuntimeErrorTestSuites === 0; diff --git a/packages/jest-cli/src/reporters/SummaryReporter.js b/packages/jest-cli/src/reporters/SummaryReporter.js index eb4a2e33748f..27813f7dd262 100644 --- a/packages/jest-cli/src/reporters/SummaryReporter.js +++ b/packages/jest-cli/src/reporters/SummaryReporter.js @@ -12,10 +12,15 @@ import type {AggregatedResult, SnapshotSummary} from 'types/TestResult'; import type {GlobalConfig} from 'types/Config'; import type {Context} from 'types/Context'; -import type {Options as SummaryReporterOptions} from '../TestRunner'; import type {PathPattern} from '../SearchSource'; import type {ReporterOnStartOptions} from 'types/Reporters'; +type SummaryReporterOptions = {| + pattern: PathPattern, + testNamePattern: string, + testPathPattern: string, +|}; + const BaseReporter = require('./BaseReporter'); const {getSummary, pluralize} = require('./utils'); @@ -60,12 +65,14 @@ const NPM_EVENTS = new Set([ class SummaryReporter extends BaseReporter { _estimatedTime: number; + _globalConfig: GlobalConfig; _options: SummaryReporterOptions; - constructor(options: SummaryReporterOptions) { - super(); - this._options = options; + constructor(globalConfig: GlobalConfig, options: SummaryReporterOptions) { + super(globalConfig); + this._globalConfig = globalConfig; this._estimatedTime = 0; + this._options = options; } // If we write more than one character at a time it is possible that @@ -80,26 +87,21 @@ class SummaryReporter extends BaseReporter { } onRunStart( - globalConfig: GlobalConfig, aggregatedResults: AggregatedResult, options: ReporterOnStartOptions, ) { - super.onRunStart(globalConfig, aggregatedResults, options); + super.onRunStart(aggregatedResults, options); this._estimatedTime = options.estimatedTime; } - onRunComplete( - contexts: Set, - globalConfig: GlobalConfig, - aggregatedResults: AggregatedResult, - ) { + onRunComplete(contexts: Set, aggregatedResults: AggregatedResult) { const {numTotalTestSuites, testResults, wasInterrupted} = aggregatedResults; if (numTotalTestSuites) { const lastResult = testResults[testResults.length - 1]; // Print a newline if the last test did not fail to line up newlines // similar to when an error would have been thrown in the test. if ( - !globalConfig.verbose && + !this._globalConfig.verbose && lastResult && !lastResult.numFailingTests && !lastResult.testExecError @@ -107,8 +109,11 @@ class SummaryReporter extends BaseReporter { this.log(''); } - this._printSummary(aggregatedResults, globalConfig); - this._printSnapshotSummary(aggregatedResults.snapshot, globalConfig); + this._printSummary(aggregatedResults, this._globalConfig); + this._printSnapshotSummary( + aggregatedResults.snapshot, + this._globalConfig, + ); if (numTotalTestSuites) { const testSummary = wasInterrupted diff --git a/packages/jest-cli/src/reporters/VerboseReporter.js b/packages/jest-cli/src/reporters/VerboseReporter.js index 3a2694dc1c9b..471244e8afd8 100644 --- a/packages/jest-cli/src/reporters/VerboseReporter.js +++ b/packages/jest-cli/src/reporters/VerboseReporter.js @@ -9,6 +9,7 @@ */ 'use strict'; +import type {GlobalConfig} from 'types/Config'; import type { AggregatedResult, AssertionResult, @@ -22,11 +23,11 @@ const chalk = require('chalk'); const {ICONS} = require('../constants'); class VerboseReporter extends DefaultReporter { - _options: Config; + _globalConfig: GlobalConfig; - constructor(options: Config) { - super({verbose: true}); - this._options = options; + constructor(globalConfig: GlobalConfig) { + super(globalConfig); + this._globalConfig = globalConfig; } static filterTestResults(testResults: Array) { @@ -97,7 +98,7 @@ class VerboseReporter extends DefaultReporter { } _logTests(tests: Array, indentLevel: number) { - if (this._verboseOptions.expand) { + if (this._globalConfig.expand) { tests.forEach(test => this._logTest(test, indentLevel)); } else { const skippedCount = tests.reduce((result, test) => { diff --git a/packages/jest-cli/src/reporters/__tests__/CoverageReporter-test.js b/packages/jest-cli/src/reporters/__tests__/CoverageReporter-test.js index bfaae36f9862..1b4ec241352d 100644 --- a/packages/jest-cli/src/reporters/__tests__/CoverageReporter-test.js +++ b/packages/jest-cli/src/reporters/__tests__/CoverageReporter-test.js @@ -4,8 +4,6 @@ * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. - * - * @emails oncall+jsinfra */ 'use strict'; @@ -34,7 +32,6 @@ beforeEach(() => { describe('onRunComplete', () => { let mockAggResults; - let testReporter; beforeEach(() => { mockAggResults = { @@ -76,44 +73,47 @@ describe('onRunComplete', () => { }, }; }); - - testReporter = new CoverageReporter({}); - testReporter.log = jest.fn(); }); it('getLastError() returns an error when threshold is not met', () => { - return testReporter - .onRunComplete( - new Set(), - { - collectCoverage: true, - coverageThreshold: { - global: { - statements: 100, - }, + const testReporter = new CoverageReporter( + { + collectCoverage: true, + coverageThreshold: { + global: { + statements: 100, }, }, - mockAggResults, - ) + }, + { + maxWorkers: 2, + }, + ); + testReporter.log = jest.fn(); + return testReporter + .onRunComplete(new Set(), {}, mockAggResults) .then(() => { expect(testReporter.getLastError()).toBeTruthy(); }); }); it('getLastError() returns `undefined` when threshold is met', () => { - return testReporter - .onRunComplete( - new Set(), - { - collectCoverage: true, - coverageThreshold: { - global: { - statements: 50, - }, + const testReporter = new CoverageReporter( + { + collectCoverage: true, + coverageThreshold: { + global: { + statements: 50, }, }, - mockAggResults, - ) + }, + { + maxWorkers: 2, + }, + ); + testReporter.log = jest.fn(); + return testReporter + .onRunComplete(new Set(), {}, mockAggResults) .then(() => { expect(testReporter.getLastError()).toBeUndefined(); }); diff --git a/packages/jest-config/src/index.js b/packages/jest-config/src/index.js index 1581d952fe69..4cd060d0907a 100644 --- a/packages/jest-config/src/index.js +++ b/packages/jest-config/src/index.js @@ -83,6 +83,7 @@ const getConfigs = ( notify: options.notify, projects: options.projects, replname: options.replname, + reporters: options.reporters, rootDir: options.rootDir, silent: options.silent, testNamePattern: options.testNamePattern, diff --git a/packages/jest-config/src/normalize.js b/packages/jest-config/src/normalize.js index 0672df5ee02a..12ec068fd54a 100644 --- a/packages/jest-config/src/normalize.js +++ b/packages/jest-config/src/normalize.js @@ -21,8 +21,8 @@ const { resolve, } = require('./utils'); const {NODE_MODULES, DEFAULT_JS_PATTERN} = require('./constants'); -const {ValidationError, validate} = require('jest-validate'); const {validateReporters} = require('./reporterValidationErrors'); +const {ValidationError, validate} = require('jest-validate'); const chalk = require('chalk'); const crypto = require('crypto'); const DEFAULT_CONFIG = require('./defaults'); diff --git a/packages/jest-config/src/reporterValidationErrors.js b/packages/jest-config/src/reporterValidationErrors.js index 173e7249ca61..5786da422d87 100644 --- a/packages/jest-config/src/reporterValidationErrors.js +++ b/packages/jest-config/src/reporterValidationErrors.js @@ -4,7 +4,13 @@ * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. + * @flow */ + +'use strict'; + +import type {ReporterConfig, StringReporter, ArrayReporter} from 'types/Config'; + const {ValidationError} = require('jest-validate'); const {DOCUMENTATION_NOTE, BULLET} = require('./utils'); @@ -16,17 +22,18 @@ const ERROR = `${BULLET} Reporter Validation Error`; /** * Reporter Vaidation Error is thrown if the given arguments - * within the reporter are not valid - * + * within the reporter are not valid. + * * This is a highly specific reporter error and in the future will be * merged with jest-validate. Till then, we can make use of it. It works - * and that's what counts most at this time + * and that's what counts most at this time. */ function createReporterError( reporterIndex: number, - reporterValue: any, + reporterValue: Array | StringReporter, ): ValidationError { - const errorMessage = `Reporter at index ${reporterIndex} must be of type:\n` + + const errorMessage = + `Reporter at index ${reporterIndex} must be of type:\n` + ` ${chalk.bold.green(validReporterTypes.join(' or '))}\n` + ` but instead received:\n` + ` ${chalk.bold.red(getType(reporterValue))}`; @@ -34,31 +41,30 @@ function createReporterError( return new ValidationError(ERROR, errorMessage, DOCUMENTATION_NOTE); } -/** - * Reporter Error specific to Array configuration - */ function createArrayReporterError( + arrayReporter: ArrayReporter, reporterIndex: number, valueIndex: number, - value: any, + value: StringReporter | Object, expectedType: string, valueName: string, ): ValidationError { - const errorMessage = `Unexpected value for ${valueName} ` + + const errorMessage = + `Unexpected value for ${valueName} ` + `at index ${valueIndex} of reporter at index ${reporterIndex}\n` + ' Expected:\n' + ` ${chalk.bold.red(expectedType)}\n` + ' Got:\n' + - ` ${chalk.bold.green(getType(value))}`; + ` ${chalk.bold.green(getType(value))}\n` + + ` Reporters config:\n` + + ` ${chalk.bold.green(JSON.stringify(arrayReporter, null, 2) + .split('\n') + .join('\n '))}`; return new ValidationError(ERROR, errorMessage, DOCUMENTATION_NOTE); } -/** - * validates each reporter provided in the configuration - * @private - */ -function validateReporters(reporterConfig: Array): boolean { +function validateReporters(reporterConfig: Array): boolean { return reporterConfig.every((reporter, index) => { if (Array.isArray(reporter)) { validateArrayReporter(reporter, index); @@ -70,21 +76,23 @@ function validateReporters(reporterConfig: Array): boolean { }); } -/** - * validates values within the array reporter - * - * @param {Array} arrayReporter reporter to be validated - * @returns {boolean} true if the reporter was validated - */ function validateArrayReporter( - arrayReporter: Array, + arrayReporter: ArrayReporter, reporterIndex: number, ) { const [path, options] = arrayReporter; if (typeof path !== 'string') { - throw createArrayReporterError(reporterIndex, 0, path, 'string', 'Path'); + throw createArrayReporterError( + arrayReporter, + reporterIndex, + 0, + path, + 'string', + 'Path', + ); } else if (typeof options !== 'object') { throw createArrayReporterError( + arrayReporter, reporterIndex, 1, options, diff --git a/types/TestRunner.js b/types/TestRunner.js index 4084d5d87525..e47de45b4f99 100644 --- a/types/TestRunner.js +++ b/types/TestRunner.js @@ -12,7 +12,8 @@ import type {Context} from './Context'; import type {Environment} from 'types/Environment'; import type {GlobalConfig, Path, ProjectConfig} from './Config'; -import type {TestResult} from 'types/TestResult'; +import type {ReporterOnStartOptions} from 'types/Reporters'; +import type {TestResult, AggregatedResult} from 'types/TestResult'; import type Runtime from 'jest-runtime'; export type Test = {| @@ -21,6 +22,26 @@ export type Test = {| duration: ?number, |}; +export type Reporter = { + +onTestResult: ( + test: Test, + testResult: TestResult, + aggregatedResult: AggregatedResult, + ) => void, + +onRunStart: ( + results: AggregatedResult, + options: ReporterOnStartOptions, + ) => void, + +onTestStart: (test: Test) => void, + +onRunComplete: ( + contexts: Set, + results: AggregatedResult, + ) => ?Promise, + +getLastError: () => ?Error, +}; + +export type Tests = Array; + export type TestFramework = ( globalConfig: GlobalConfig, config: ProjectConfig, diff --git a/yarn.lock b/yarn.lock index 1effffa196e1..b3c5d3a94ff7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -46,8 +46,8 @@ ajv-keywords@^1.0.0: resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.5.1.tgz#314dd0a4b3368fad3dfcdc54ede6171b886daf3c" ajv@^4.7.0, ajv@^4.9.1: - version "4.11.6" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.6.tgz#947e93049790942b2a2d60a8289b28924d39f987" + version "4.11.7" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.7.tgz#8655a5d86d0824985cc471a1d913fb6729a0ec48" dependencies: co "^4.6.0" json-stable-stringify "^1.0.1" @@ -120,8 +120,8 @@ arr-diff@^2.0.0: arr-flatten "^1.0.1" arr-flatten@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.0.1.tgz#e5ffe54d45e19f32f216e91eb99c8ce892bb604b" + version "1.0.3" + resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.0.3.tgz#a274ed85ac08849b6bd7847c4580745dc51adfb1" array-equal@^1.0.0: version "1.0.0" @@ -176,13 +176,9 @@ assert-plus@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" -ast-types@0.8.18: - version "0.8.18" - resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.8.18.tgz#c8b98574898e8914e9d8de74b947564a9fe929af" - -ast-types@0.9.4: - version "0.9.4" - resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.9.4.tgz#410d1f81890aeb8e0a38621558ba5869ae53c91b" +ast-types@0.9.8: + version "0.9.8" + resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.9.8.tgz#6cb6a40beba31f49f20928e28439fc14a3dab078" async@^1.4.0, async@^1.5.0: version "1.5.2" @@ -239,8 +235,8 @@ babel-core@^6.23.1, babel-core@^6.24.1: source-map "^0.5.0" babel-eslint@^7.1.1: - version "7.2.1" - resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-7.2.1.tgz#079422eb73ba811e3ca0865ce87af29327f8c52f" + version "7.2.2" + resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-7.2.2.tgz#0da2cbe6554fd0fb069f19674f2db2f9c59270ff" dependencies: babel-code-frame "^6.22.0" babel-traverse "^6.23.1" @@ -260,6 +256,22 @@ babel-generator@^6.18.0, babel-generator@^6.24.1: source-map "^0.5.0" trim-right "^1.0.1" +babel-helper-builder-binary-assignment-operator-visitor@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz#cce4517ada356f4220bcae8a02c2b346f9a56664" + dependencies: + babel-helper-explode-assignable-expression "^6.24.1" + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-helper-builder-react-jsx@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-builder-react-jsx/-/babel-helper-builder-react-jsx-6.24.1.tgz#0ad7917e33c8d751e646daca4e77cc19377d2cbc" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + esutils "^2.0.0" + babel-helper-call-delegate@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz#ece6aacddc76e41c3461f88bfc575bd0daa2df8d" @@ -269,6 +281,23 @@ babel-helper-call-delegate@^6.24.1: babel-traverse "^6.24.1" babel-types "^6.24.1" +babel-helper-define-map@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-define-map/-/babel-helper-define-map-6.24.1.tgz#7a9747f258d8947d32d515f6aa1c7bd02204a080" + dependencies: + babel-helper-function-name "^6.24.1" + babel-runtime "^6.22.0" + babel-types "^6.24.1" + lodash "^4.2.0" + +babel-helper-explode-assignable-expression@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz#f25b82cf7dc10433c55f70592d5746400ac22caa" + dependencies: + babel-runtime "^6.22.0" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + babel-helper-function-name@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz#d3475b8c03ed98242a25b48351ab18399d3580a9" @@ -293,6 +322,21 @@ babel-helper-hoist-variables@^6.24.1: babel-runtime "^6.22.0" babel-types "^6.24.1" +babel-helper-optimise-call-expression@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz#f7a13427ba9f73f8f4fa993c54a97882d1244257" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-helper-regex@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-regex/-/babel-helper-regex-6.24.1.tgz#d36e22fab1008d79d88648e32116868128456ce8" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + lodash "^4.2.0" + babel-helper-remap-async-to-generator@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz#5ec581827ad723fecdd381f1c928390676e4551b" @@ -303,6 +347,17 @@ babel-helper-remap-async-to-generator@^6.24.1: babel-traverse "^6.24.1" babel-types "^6.24.1" +babel-helper-replace-supers@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz#bf6dbfe43938d17369a213ca8a8bf74b6a90ab1a" + dependencies: + babel-helper-optimise-call-expression "^6.24.1" + babel-messages "^6.23.0" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + babel-helpers@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.24.1.tgz#3471de9caec388e5c850e597e58a26ddf37602b2" @@ -316,19 +371,47 @@ babel-messages@^6.23.0: dependencies: babel-runtime "^6.22.0" -babel-plugin-syntax-async-functions@^6.8.0: +babel-plugin-check-es2015-constants@^6.22.0, babel-plugin-check-es2015-constants@^6.5.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz#35157b101426fd2ffd3da3f75c7d1e91835bbf8a" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-react-transform@2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/babel-plugin-react-transform/-/babel-plugin-react-transform-2.0.2.tgz#515bbfa996893981142d90b1f9b1635de2995109" + dependencies: + lodash "^4.6.1" + +babel-plugin-syntax-async-functions@^6.5.0, babel-plugin-syntax-async-functions@^6.8.0: version "6.13.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95" -babel-plugin-syntax-flow@^6.18.0: +babel-plugin-syntax-class-properties@^6.5.0, babel-plugin-syntax-class-properties@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-class-properties/-/babel-plugin-syntax-class-properties-6.13.0.tgz#d7eb23b79a317f8543962c505b827c7d6cac27de" + +babel-plugin-syntax-exponentiation-operator@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz#9ee7e8337290da95288201a6a57f4170317830de" + +babel-plugin-syntax-flow@^6.18.0, babel-plugin-syntax-flow@^6.5.0: version "6.18.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz#4c3ab20a2af26aa20cd25995c398c4eb70310c8d" -babel-plugin-syntax-trailing-function-commas@^6.13.0: +babel-plugin-syntax-jsx@^6.3.13, babel-plugin-syntax-jsx@^6.5.0, babel-plugin-syntax-jsx@^6.8.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz#0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946" + +babel-plugin-syntax-object-rest-spread@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5" + +babel-plugin-syntax-trailing-function-commas@^6.13.0, babel-plugin-syntax-trailing-function-commas@^6.22.0, babel-plugin-syntax-trailing-function-commas@^6.5.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz#ba0360937f8d06e40180a43fe0d5616fff532cf3" -babel-plugin-transform-async-to-generator@^6.16.0: +babel-plugin-transform-async-to-generator@^6.16.0, babel-plugin-transform-async-to-generator@^6.22.0: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz#6536e378aff6cb1d5517ac0e40eb3e9fc8d08761" dependencies: @@ -336,13 +419,132 @@ babel-plugin-transform-async-to-generator@^6.16.0: babel-plugin-syntax-async-functions "^6.8.0" babel-runtime "^6.22.0" -babel-plugin-transform-es2015-destructuring@^6.23.0: +babel-plugin-transform-class-properties@^6.5.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-class-properties/-/babel-plugin-transform-class-properties-6.24.1.tgz#6a79763ea61d33d36f37b611aa9def81a81b46ac" + dependencies: + babel-helper-function-name "^6.24.1" + babel-plugin-syntax-class-properties "^6.8.0" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-es2015-arrow-functions@^6.22.0, babel-plugin-transform-es2015-arrow-functions@^6.5.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz#452692cb711d5f79dc7f85e440ce41b9f244d221" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-block-scoped-functions@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz#bbc51b49f964d70cb8d8e0b94e820246ce3a6141" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-block-scoping@^6.23.0, babel-plugin-transform-es2015-block-scoping@^6.5.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.24.1.tgz#76c295dc3a4741b1665adfd3167215dcff32a576" + dependencies: + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + lodash "^4.2.0" + +babel-plugin-transform-es2015-classes@^6.23.0, babel-plugin-transform-es2015-classes@^6.5.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz#5a4c58a50c9c9461e564b4b2a3bfabc97a2584db" + dependencies: + babel-helper-define-map "^6.24.1" + babel-helper-function-name "^6.24.1" + babel-helper-optimise-call-expression "^6.24.1" + babel-helper-replace-supers "^6.24.1" + babel-messages "^6.23.0" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-computed-properties@^6.22.0, babel-plugin-transform-es2015-computed-properties@^6.5.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz#6fe2a8d16895d5634f4cd999b6d3480a308159b3" + dependencies: + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-es2015-destructuring@^6.23.0, babel-plugin-transform-es2015-destructuring@^6.5.0: version "6.23.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz#997bb1f1ab967f682d2b0876fe358d60e765c56d" dependencies: babel-runtime "^6.22.0" -babel-plugin-transform-es2015-parameters@^6.23.0: +babel-plugin-transform-es2015-duplicate-keys@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz#73eb3d310ca969e3ef9ec91c53741a6f1576423e" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-for-of@^6.23.0, babel-plugin-transform-es2015-for-of@^6.5.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz#f47c95b2b613df1d3ecc2fdb7573623c75248691" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-function-name@^6.22.0, babel-plugin-transform-es2015-function-name@^6.5.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz#834c89853bc36b1af0f3a4c5dbaa94fd8eacaa8b" + dependencies: + babel-helper-function-name "^6.24.1" + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-literals@^6.22.0, babel-plugin-transform-es2015-literals@^6.5.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz#4f54a02d6cd66cf915280019a31d31925377ca2e" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-modules-amd@^6.22.0, babel-plugin-transform-es2015-modules-amd@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz#3b3e54017239842d6d19c3011c4bd2f00a00d154" + dependencies: + babel-plugin-transform-es2015-modules-commonjs "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-es2015-modules-commonjs@^6.23.0, babel-plugin-transform-es2015-modules-commonjs@^6.24.1, babel-plugin-transform-es2015-modules-commonjs@^6.5.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.24.1.tgz#d3e310b40ef664a36622200097c6d440298f2bfe" + dependencies: + babel-plugin-transform-strict-mode "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-modules-systemjs@^6.23.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz#ff89a142b9119a906195f5f106ecf305d9407d23" + dependencies: + babel-helper-hoist-variables "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-es2015-modules-umd@^6.23.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz#ac997e6285cd18ed6176adb607d602344ad38468" + dependencies: + babel-plugin-transform-es2015-modules-amd "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-es2015-object-super@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz#24cef69ae21cb83a7f8603dad021f572eb278f8d" + dependencies: + babel-helper-replace-supers "^6.24.1" + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-parameters@^6.23.0, babel-plugin-transform-es2015-parameters@^6.5.0: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz#57ac351ab49caf14a97cd13b09f66fdf0a625f2b" dependencies: @@ -353,13 +555,207 @@ babel-plugin-transform-es2015-parameters@^6.23.0: babel-traverse "^6.24.1" babel-types "^6.24.1" -babel-plugin-transform-flow-strip-types@^6.18.0: +babel-plugin-transform-es2015-shorthand-properties@^6.22.0, babel-plugin-transform-es2015-shorthand-properties@^6.5.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz#24f875d6721c87661bbd99a4622e51f14de38aa0" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-spread@^6.22.0, babel-plugin-transform-es2015-spread@^6.5.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz#d6d68a99f89aedc4536c81a542e8dd9f1746f8d1" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-sticky-regex@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz#00c1cdb1aca71112cdf0cf6126c2ed6b457ccdbc" + dependencies: + babel-helper-regex "^6.24.1" + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-template-literals@^6.22.0, babel-plugin-transform-es2015-template-literals@^6.5.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz#a84b3450f7e9f8f1f6839d6d687da84bb1236d8d" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-typeof-symbol@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz#dec09f1cddff94b52ac73d505c84df59dcceb372" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-unicode-regex@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz#d38b12f42ea7323f729387f18a7c5ae1faeb35e9" + dependencies: + babel-helper-regex "^6.24.1" + babel-runtime "^6.22.0" + regexpu-core "^2.0.0" + +babel-plugin-transform-exponentiation-operator@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz#2ab0c9c7f3098fa48907772bb813fe41e8de3a0e" + dependencies: + babel-helper-builder-binary-assignment-operator-visitor "^6.24.1" + babel-plugin-syntax-exponentiation-operator "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-flow-strip-types@^6.18.0, babel-plugin-transform-flow-strip-types@^6.22.0, babel-plugin-transform-flow-strip-types@^6.5.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-flow-strip-types/-/babel-plugin-transform-flow-strip-types-6.22.0.tgz#84cb672935d43714fdc32bce84568d87441cf7cf" dependencies: babel-plugin-syntax-flow "^6.18.0" babel-runtime "^6.22.0" +babel-plugin-transform-object-assign@^6.5.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-object-assign/-/babel-plugin-transform-object-assign-6.22.0.tgz#f99d2f66f1a0b0d498e346c5359684740caa20ba" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-object-rest-spread@^6.5.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.23.0.tgz#875d6bc9be761c58a2ae3feee5dc4895d8c7f921" + dependencies: + babel-plugin-syntax-object-rest-spread "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-react-display-name@^6.23.0, babel-plugin-transform-react-display-name@^6.5.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-display-name/-/babel-plugin-transform-react-display-name-6.23.0.tgz#4398910c358441dc4cef18787264d0412ed36b37" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-react-jsx-self@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-jsx-self/-/babel-plugin-transform-react-jsx-self-6.22.0.tgz#df6d80a9da2612a121e6ddd7558bcbecf06e636e" + dependencies: + babel-plugin-syntax-jsx "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-react-jsx-source@^6.22.0, babel-plugin-transform-react-jsx-source@^6.5.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-jsx-source/-/babel-plugin-transform-react-jsx-source-6.22.0.tgz#66ac12153f5cd2d17b3c19268f4bf0197f44ecd6" + dependencies: + babel-plugin-syntax-jsx "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-react-jsx@^6.24.1, babel-plugin-transform-react-jsx@^6.5.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-jsx/-/babel-plugin-transform-react-jsx-6.24.1.tgz#840a028e7df460dfc3a2d29f0c0d91f6376e66a3" + dependencies: + babel-helper-builder-react-jsx "^6.24.1" + babel-plugin-syntax-jsx "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-regenerator@^6.22.0, babel-plugin-transform-regenerator@^6.5.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.24.1.tgz#b8da305ad43c3c99b4848e4fe4037b770d23c418" + dependencies: + regenerator-transform "0.9.11" + +babel-plugin-transform-runtime@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-runtime/-/babel-plugin-transform-runtime-6.23.0.tgz#88490d446502ea9b8e7efb0fe09ec4d99479b1ee" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-strict-mode@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz#d5faf7aa578a65bbe591cf5edae04a0c67020758" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-preset-env@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/babel-preset-env/-/babel-preset-env-1.4.0.tgz#c8e02a3bcc7792f23cded68e0355b9d4c28f0f7a" + dependencies: + babel-plugin-check-es2015-constants "^6.22.0" + babel-plugin-syntax-trailing-function-commas "^6.22.0" + babel-plugin-transform-async-to-generator "^6.22.0" + babel-plugin-transform-es2015-arrow-functions "^6.22.0" + babel-plugin-transform-es2015-block-scoped-functions "^6.22.0" + babel-plugin-transform-es2015-block-scoping "^6.23.0" + babel-plugin-transform-es2015-classes "^6.23.0" + babel-plugin-transform-es2015-computed-properties "^6.22.0" + babel-plugin-transform-es2015-destructuring "^6.23.0" + babel-plugin-transform-es2015-duplicate-keys "^6.22.0" + babel-plugin-transform-es2015-for-of "^6.23.0" + babel-plugin-transform-es2015-function-name "^6.22.0" + babel-plugin-transform-es2015-literals "^6.22.0" + babel-plugin-transform-es2015-modules-amd "^6.22.0" + babel-plugin-transform-es2015-modules-commonjs "^6.23.0" + babel-plugin-transform-es2015-modules-systemjs "^6.23.0" + babel-plugin-transform-es2015-modules-umd "^6.23.0" + babel-plugin-transform-es2015-object-super "^6.22.0" + babel-plugin-transform-es2015-parameters "^6.23.0" + babel-plugin-transform-es2015-shorthand-properties "^6.22.0" + babel-plugin-transform-es2015-spread "^6.22.0" + babel-plugin-transform-es2015-sticky-regex "^6.22.0" + babel-plugin-transform-es2015-template-literals "^6.22.0" + babel-plugin-transform-es2015-typeof-symbol "^6.23.0" + babel-plugin-transform-es2015-unicode-regex "^6.22.0" + babel-plugin-transform-exponentiation-operator "^6.22.0" + babel-plugin-transform-regenerator "^6.22.0" + browserslist "^1.4.0" + invariant "^2.2.2" + +babel-preset-flow@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-preset-flow/-/babel-preset-flow-6.23.0.tgz#e71218887085ae9a24b5be4169affb599816c49d" + dependencies: + babel-plugin-transform-flow-strip-types "^6.22.0" + +babel-preset-react-native@^1.9.1: + version "1.9.1" + resolved "https://registry.yarnpkg.com/babel-preset-react-native/-/babel-preset-react-native-1.9.1.tgz#ec8e378274410d78f550fa9f8edd70353f3bb2fe" + dependencies: + babel-plugin-check-es2015-constants "^6.5.0" + babel-plugin-react-transform "2.0.2" + babel-plugin-syntax-async-functions "^6.5.0" + babel-plugin-syntax-class-properties "^6.5.0" + babel-plugin-syntax-flow "^6.5.0" + babel-plugin-syntax-jsx "^6.5.0" + babel-plugin-syntax-trailing-function-commas "^6.5.0" + babel-plugin-transform-class-properties "^6.5.0" + babel-plugin-transform-es2015-arrow-functions "^6.5.0" + babel-plugin-transform-es2015-block-scoping "^6.5.0" + babel-plugin-transform-es2015-classes "^6.5.0" + babel-plugin-transform-es2015-computed-properties "^6.5.0" + babel-plugin-transform-es2015-destructuring "^6.5.0" + babel-plugin-transform-es2015-for-of "^6.5.0" + babel-plugin-transform-es2015-function-name "^6.5.0" + babel-plugin-transform-es2015-literals "^6.5.0" + babel-plugin-transform-es2015-modules-commonjs "^6.5.0" + babel-plugin-transform-es2015-parameters "^6.5.0" + babel-plugin-transform-es2015-shorthand-properties "^6.5.0" + babel-plugin-transform-es2015-spread "^6.5.0" + babel-plugin-transform-es2015-template-literals "^6.5.0" + babel-plugin-transform-flow-strip-types "^6.5.0" + babel-plugin-transform-object-assign "^6.5.0" + babel-plugin-transform-object-rest-spread "^6.5.0" + babel-plugin-transform-react-display-name "^6.5.0" + babel-plugin-transform-react-jsx "^6.5.0" + babel-plugin-transform-react-jsx-source "^6.5.0" + babel-plugin-transform-regenerator "^6.5.0" + react-transform-hmr "^1.0.4" + +babel-preset-react@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-preset-react/-/babel-preset-react-6.24.1.tgz#ba69dfaea45fc3ec639b6a4ecea6e17702c91380" + dependencies: + babel-plugin-syntax-jsx "^6.3.13" + babel-plugin-transform-react-display-name "^6.23.0" + babel-plugin-transform-react-jsx "^6.24.1" + babel-plugin-transform-react-jsx-self "^6.22.0" + babel-plugin-transform-react-jsx-source "^6.22.0" + babel-preset-flow "^6.23.0" + babel-register@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.24.1.tgz#7e10e13a2f71065bdfad5a1787ba45bca6ded75f" @@ -372,7 +768,7 @@ babel-register@^6.24.1: mkdirp "^0.5.1" source-map-support "^0.4.2" -babel-runtime@^6.22.0: +babel-runtime@^6.18.0, babel-runtime@^6.22.0: version "6.23.0" resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.23.0.tgz#0a9489f144de70efb3ce4300accdb329e2fc543b" dependencies: @@ -403,7 +799,7 @@ babel-traverse@^6.18.0, babel-traverse@^6.23.1, babel-traverse@^6.24.1: invariant "^2.2.0" lodash "^4.2.0" -babel-types@^6.18.0, babel-types@^6.23.0, babel-types@^6.24.1: +babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.23.0, babel-types@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.24.1.tgz#a136879dc15b3606bda0d90c1fc74304c2ff0975" dependencies: @@ -412,9 +808,9 @@ babel-types@^6.18.0, babel-types@^6.23.0, babel-types@^6.24.1: lodash "^4.2.0" to-fast-properties "^1.0.1" -babylon@6.15.0: - version "6.15.0" - resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.15.0.tgz#ba65cfa1a80e1759b0e89fb562e27dccae70348e" +babylon@7.0.0-beta.8: + version "7.0.0-beta.8" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-7.0.0-beta.8.tgz#2bdc5ae366041442c27e068cce6f0d7c06ea9949" babylon@^6.11.0, babylon@^6.13.0, babylon@^6.15.0, babylon@^6.16.1: version "6.16.1" @@ -434,6 +830,10 @@ bcrypt-pbkdf@^1.0.0: dependencies: tweetnacl "^0.14.3" +boolbase@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" + boom@2.x.x: version "2.10.1" resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f" @@ -455,6 +855,13 @@ braces@^1.8.2: preserve "^0.2.0" repeat-element "^1.1.2" +browserslist@^1.4.0: + version "1.7.7" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-1.7.7.tgz#0bd76704258be829b2398bb50e4b62d1a166b0b9" + dependencies: + caniuse-db "^1.0.30000639" + electron-to-chromium "^1.2.7" + buffer-shims@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/buffer-shims/-/buffer-shims-1.0.0.tgz#9978ce317388c649ad8793028c3477ef044a8b51" @@ -541,6 +948,27 @@ character-reference-invalid@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/character-reference-invalid/-/character-reference-invalid-1.1.0.tgz#dec9ad1dfb9f8d06b4fcdaa2adc3c4fd97af1e68" +cheerio@^0.22.0: + version "0.22.0" + resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-0.22.0.tgz#a9baa860a3f9b595a6b81b1a86873121ed3a269e" + dependencies: + css-select "~1.2.0" + dom-serializer "~0.1.0" + entities "~1.1.1" + htmlparser2 "^3.9.1" + lodash.assignin "^4.0.9" + lodash.bind "^4.1.4" + lodash.defaults "^4.0.1" + lodash.filter "^4.4.0" + lodash.flatten "^4.2.0" + lodash.foreach "^4.3.0" + lodash.map "^4.4.0" + lodash.merge "^4.4.0" + lodash.pick "^4.2.1" + lodash.reduce "^4.4.0" + lodash.reject "^4.4.0" + lodash.some "^4.4.0" + circular-json@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.1.tgz#be8b36aefccde8b3ca7aa2d6afc07a37242c0d2d" @@ -619,10 +1047,6 @@ color-name@^1.1.1: version "1.1.2" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.2.tgz#5c8ab72b64bd2215d617ae9559ebb148475cf98d" -colors@>=0.6.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63" - columnify@^1.5.4: version "1.5.4" resolved "https://registry.yarnpkg.com/columnify/-/columnify-1.5.4.tgz#4737ddf1c7b69a8a7c340570782e947eec8e78bb" @@ -843,6 +1267,19 @@ cryptiles@2.x.x: dependencies: boom "2.x.x" +css-select@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/css-select/-/css-select-1.2.0.tgz#2b3a110539c5355f1cd8d314623e870b121ec858" + dependencies: + boolbase "~1.0.0" + css-what "2.1" + domutils "1.5.1" + nth-check "~1.0.1" + +css-what@2.1: + version "2.1.0" + resolved "https://registry.yarnpkg.com/css-what/-/css-what-2.1.0.tgz#9467d032c38cfaefb9f2d79501253062f87fa1bd" + cssom@0.3.x, "cssom@>= 0.3.2 < 0.4.0": version "0.3.2" resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.2.tgz#b8036170c79f07a90ff2f16e22284027a243848b" @@ -1009,19 +1446,42 @@ ecc-jsbn@~0.1.1: dependencies: jsbn "~0.1.0" +electron-to-chromium@^1.2.7: + version "1.3.3" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.3.tgz#651eb63fe89f39db70ffc8dbd5d9b66958bc6a0e" + encoding@^0.1.11: version "0.1.12" resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.12.tgz#538b66f3ee62cd1ab51ec323829d1f9480c74beb" dependencies: iconv-lite "~0.4.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" + +enzyme@^2.8.2: + version "2.8.2" + resolved "https://registry.yarnpkg.com/enzyme/-/enzyme-2.8.2.tgz#6c8bcb05012abc4aa4bc3213fb23780b9b5b1714" + dependencies: + cheerio "^0.22.0" + function.prototype.name "^1.0.0" + is-subset "^0.1.1" + lodash "^4.17.2" + object-is "^1.0.1" + object.assign "^4.0.4" + object.entries "^1.0.3" + object.values "^1.0.3" + prop-types "^15.5.4" + uuid "^2.0.3" + error-ex@^1.2.0: 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.6.1, es-abstract@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.7.0.tgz#dfade774e01bfcd97f96180298c449c8623fb94c" dependencies: @@ -1222,7 +1682,7 @@ estraverse@~4.1.0: version "4.1.1" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.1.1.tgz#f6caca728933a850ef90661d0e17982ba47111a2" -esutils@2.0.2, esutils@^2.0.2: +esutils@2.0.2, esutils@^2.0.0, esutils@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" @@ -1291,7 +1751,7 @@ fast-levenshtein@~2.0.4: version "2.0.6" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" -fbjs@^0.8.9: +fbjs@^0.8.1, fbjs@^0.8.4, fbjs@^0.8.9: version "0.8.12" resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.12.tgz#10b5d92f76d45575fd63a217d4ea02bea2f8ed04" dependencies: @@ -1370,13 +1830,9 @@ flow-bin@^0.45.0: version "0.45.0" resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.45.0.tgz#009dd0f577a3f665c74ca8be827ae8c2dd8fd6b5" -flow-parser@0.40.0: - version "0.40.0" - resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.40.0.tgz#b3444742189093323c4319c4fe9d35391f46bcbc" - dependencies: - ast-types "0.8.18" - colors ">=0.6.2" - minimist ">=0.2.0" +flow-parser@0.43.0: + version "0.43.0" + resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.43.0.tgz#e2b8eb1ac83dd53f7b6b04a7c35b6a52c33479b7" for-in@^1.0.1: version "1.0.2" @@ -1553,6 +2009,13 @@ glob@7.1.1, glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.0.6, glob@^7.1.1: once "^1.3.0" path-is-absolute "^1.0.0" +global@^4.3.0: + version "4.3.1" + resolved "https://registry.yarnpkg.com/global/-/global-4.3.1.tgz#5f757908c7cbabce54f386ae440e11e26b7916df" + dependencies: + min-document "^2.19.0" + process "~0.5.1" + globals@^9.0.0, globals@^9.14.0: version "9.17.0" resolved "https://registry.yarnpkg.com/globals/-/globals-9.17.0.tgz#0c0ca696d9b9bb694d2e5470bd37777caad50286" @@ -1648,8 +2111,8 @@ home-or-tmp@^2.0.0: os-tmpdir "^1.0.1" hosted-git-info@^2.1.4: - version "2.4.1" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.4.1.tgz#4b0445e41c004a8bd1337773a4ff790ca40318c8" + version "2.4.2" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.4.2.tgz#0076b9f46a270506ddbaaea56496897460612a67" html-encoding-sniffer@^1.0.1: version "1.0.1" @@ -1657,6 +2120,17 @@ html-encoding-sniffer@^1.0.1: dependencies: whatwg-encoding "^1.0.1" +htmlparser2@^3.9.1: + version "3.9.2" + resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.9.2.tgz#1bdf87acca0f3f9e53fa4fcceb0f4b4cbb00b338" + dependencies: + domelementtype "^1.3.0" + domhandler "^2.3.0" + domutils "^1.5.1" + entities "^1.1.1" + inherits "^2.0.1" + readable-stream "^2.0.2" + http-signature@~1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" @@ -1742,7 +2216,7 @@ interpret@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.2.tgz#f4f623f0bb7122f15f5717c8e254b8161b5c5b2d" -invariant@^2.2.0: +invariant@^2.2.0, invariant@^2.2.2: version "2.2.2" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360" dependencies: @@ -1777,7 +2251,7 @@ is-builtin-module@^1.0.0: dependencies: builtin-modules "^1.0.0" -is-callable@^1.1.1, is-callable@^1.1.3: +is-callable@^1.1.1, is-callable@^1.1.2, is-callable@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.3.tgz#86eb75392805ddc33af71c92a0eedf74ee7604b2" @@ -1904,6 +2378,10 @@ is-stream@^1.0.1, is-stream@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" +is-subset@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-subset/-/is-subset-0.1.1.tgz#8a59117d932de1de00f245fcdd39ce43f1e939a6" + is-symbol@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.1.tgz#3cc59f00025194b6ab2e38dbae6689256b660572" @@ -2038,6 +2516,10 @@ jodid25519@^1.0.0: dependencies: jsbn "~0.1.0" +jquery@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.2.1.tgz#5c4d9de652af6cd0a770154a631bba12b015c787" + js-tokens@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.1.tgz#08e9f132484a2c45a30907e9dc4d5567b7f114d7" @@ -2081,6 +2563,10 @@ jsesc@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" +jsesc@~0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" + json-schema@0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" @@ -2380,6 +2866,12 @@ mimic-fn@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.1.0.tgz#e667783d92e89dbd342818b5230b9d62a672ad18" +min-document@^2.19.0: + version "2.19.0" + resolved "https://registry.yarnpkg.com/min-document/-/min-document-2.19.0.tgz#7bd282e3f5842ed295bb748cdd9f1ffa2c824685" + dependencies: + dom-walk "^0.1.0" + minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" @@ -2390,7 +2882,7 @@ minimist@0.0.8, minimist@~0.0.1: version "0.0.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" -minimist@1.2.0, minimist@>=0.2.0, minimist@^1.1.3: +minimist@1.2.0, minimist@^1.1.3: version "1.2.0" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" @@ -2495,6 +2987,10 @@ object-assign@^4.0.1, object-assign@^4.1.0: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" +object-is@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.0.1.tgz#0aa60ec9989a0b3ed795cf4d06f62cf1ad6539b6" + object-keys@^1.0.10, object-keys@^1.0.8: version "1.0.11" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.11.tgz#c54601778ad560f1142ce0e01bcca8b56d13426d" @@ -2507,6 +3003,15 @@ object.assign@^4.0.4: function-bind "^1.1.0" object-keys "^1.0.10" +object.entries@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.0.4.tgz#1bf9a4dd2288f5b33f3a993d257661f05d161a5f" + dependencies: + define-properties "^1.1.2" + es-abstract "^1.6.1" + function-bind "^1.1.0" + has "^1.0.1" + object.omit@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" @@ -2514,6 +3019,15 @@ object.omit@^2.0.0: for-own "^0.1.4" is-extendable "^0.1.1" +object.values@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.0.4.tgz#e524da09b4f66ff05df457546ec72ac99f13069a" + dependencies: + define-properties "^1.1.2" + es-abstract "^1.6.1" + function-bind "^1.1.0" + has "^1.0.1" + once@^1.3.0, once@^1.3.3, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" @@ -2689,12 +3203,12 @@ prettier@1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.2.2.tgz#22d17c1132faaaea1f1d4faea31f19f7a1959f3e" dependencies: - ast-types "0.9.4" + ast-types "0.9.8" babel-code-frame "6.22.0" - babylon "6.15.0" + babylon "7.0.0-beta.8" chalk "1.1.3" esutils "2.0.2" - flow-parser "0.40.0" + flow-parser "0.43.0" get-stdin "5.0.1" glob "7.1.1" jest-validate "19.0.0" @@ -2714,6 +3228,10 @@ process-nextick-args@~1.0.6: version "1.0.7" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" +process@~0.5.1: + version "0.5.2" + resolved "https://registry.yarnpkg.com/process/-/process-0.5.2.tgz#1638d8a8e34c2f440a91db95ab9aeb677fc185cf" + progress@^1.1.8: version "1.1.8" resolved "https://registry.yarnpkg.com/progress/-/progress-1.1.8.tgz#e260c78f6161cdd9b0e56cc3e0a85de17c7a57be" @@ -2724,9 +3242,9 @@ promise@^7.1.1: dependencies: asap "~2.0.3" -prop-types@^15.5.2: - version "15.5.6" - resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.5.6.tgz#797a915b1714b645ebb7c5d6cc690346205bd2aa" +prop-types@^15.5.4: + version "15.5.8" + resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.5.8.tgz#6b7b2e141083be38c8595aa51fc55775c7199394" dependencies: fbjs "^0.8.9" @@ -2753,21 +3271,53 @@ randomatic@^1.1.3: is-number "^2.0.2" kind-of "^3.0.2" -react-test-renderer@^15.4.1: +react-addons-test-utils@15.4.2: + version "15.4.2" + resolved "https://registry.yarnpkg.com/react-addons-test-utils/-/react-addons-test-utils-15.4.2.tgz#93bcaa718fcae7360d42e8fb1c09756cc36302a2" + dependencies: + fbjs "^0.8.4" + object-assign "^4.1.0" + +react-deep-force-update@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/react-deep-force-update/-/react-deep-force-update-1.0.1.tgz#f911b5be1d2a6fe387507dd6e9a767aa2924b4c7" + +react-dom@15.4.2: + version "15.4.2" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-15.4.2.tgz#015363f05b0a1fd52ae9efdd3a0060d90695208f" + dependencies: + fbjs "^0.8.1" + loose-envify "^1.1.0" + object-assign "^4.1.0" + +react-proxy@^1.1.7: + version "1.1.8" + resolved "https://registry.yarnpkg.com/react-proxy/-/react-proxy-1.1.8.tgz#9dbfd9d927528c3aa9f444e4558c37830ab8c26a" + dependencies: + lodash "^4.6.1" + react-deep-force-update "^1.0.0" + +react-test-renderer@^15.5.4: version "15.5.4" resolved "https://registry.yarnpkg.com/react-test-renderer/-/react-test-renderer-15.5.4.tgz#d4ebb23f613d685ea8f5390109c2d20fbf7c83bc" dependencies: fbjs "^0.8.9" object-assign "^4.1.0" -react@^15.4.1: - version "15.5.3" - resolved "https://registry.yarnpkg.com/react/-/react-15.5.3.tgz#84055382c025dec4e3b902bb61a8697cc79c1258" +react-transform-hmr@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/react-transform-hmr/-/react-transform-hmr-1.0.4.tgz#e1a40bd0aaefc72e8dfd7a7cda09af85066397bb" dependencies: - fbjs "^0.8.9" + global "^4.3.0" + react-proxy "^1.1.7" + +react@15.4.2: + version "15.4.2" + resolved "https://registry.yarnpkg.com/react/-/react-15.4.2.tgz#41f7991b26185392ba9bae96c8889e7e018397ef" + dependencies: + fbjs "^0.8.4" loose-envify "^1.1.0" object-assign "^4.1.0" - prop-types "^15.5.2" read-cmd-shim@^1.0.1: version "1.0.1" @@ -2831,10 +3381,22 @@ redent@^1.0.0: indent-string "^2.1.0" strip-indent "^1.0.1" -regenerator-runtime@^0.10.0: +regenerate@^1.2.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.3.2.tgz#d1941c67bad437e1be76433add5b385f95b19260" + +regenerator-runtime@^0.10.0, regenerator-runtime@^0.10.3: version "0.10.3" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.3.tgz#8c4367a904b51ea62a908ac310bf99ff90a82a3e" +regenerator-transform@0.9.11: + version "0.9.11" + resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.9.11.tgz#3a7d067520cb7b7176769eb5ff868691befe1283" + dependencies: + babel-runtime "^6.18.0" + babel-types "^6.19.0" + private "^0.1.6" + regex-cache@^0.4.2: version "0.4.3" resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.3.tgz#9b1a6c35d4d0dfcef5711ae651e8e9d3d7114145" @@ -2842,6 +3404,24 @@ regex-cache@^0.4.2: is-equal-shallow "^0.1.3" is-primitive "^2.0.0" +regexpu-core@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-2.0.0.tgz#49d038837b8dcf8bfa5b9a42139938e6ea2ae240" + dependencies: + regenerate "^1.2.1" + regjsgen "^0.2.0" + regjsparser "^0.1.4" + +regjsgen@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7" + +regjsparser@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.1.5.tgz#7ee8f84dc6fa792d3fd0ae228d24bd949ead205c" + dependencies: + jsesc "~0.5.0" + remark-parse@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/remark-parse/-/remark-parse-1.1.0.tgz#c3ca10f9a8da04615c28f09aa4e304510526ec21" @@ -3118,8 +3698,8 @@ sprintf-js@~1.0.2: resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" sshpk@^1.7.0: - version "1.11.0" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.11.0.tgz#2d8d5ebb4a6fab28ffba37fa62a90f4a3ea59d77" + version "1.13.0" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.13.0.tgz#ff2a3e4fd04497555fed97b39a0fd82fafb3a33c" dependencies: asn1 "~0.2.3" assert-plus "^1.0.0" @@ -3359,7 +3939,7 @@ typedarray@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" -typescript@^2.1.4: +typescript@^2.2.2: version "2.3.0" resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.3.0.tgz#2e63e09284392bc8158a2444c33e2093795c0418"