From 80dde6f9d04ec42a0d0ba1a947d391bf5c1faf78 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Tue, 28 Apr 2020 11:12:43 +0200 Subject: [PATCH 001/106] fix: handle mismatch between circus and runtime versions (#9903) * fix: handle mismatch between circus and runtime versions * changelog --- CHANGELOG.md | 1 + .../jest-circus/src/legacy-code-todo-rewrite/jestAdapter.ts | 6 ++++-- packages/jest-jasmine2/src/index.ts | 6 ++++-- packages/jest-runner/src/runTest.ts | 3 ++- packages/jest-runtime/src/cli/index.ts | 6 ++++-- 5 files changed, 15 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 07c630555d7e..e5d5f1571221 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ ### Fixes - `[expect]` Prints the Symbol name into the error message with a custom asymmetric matcher ([#9888](https://github.com/facebook/jest/pull/9888)) +- `[jest-circus, jest-jasmine2]` Support older version of `jest-runtime` ([#9903](https://github.com/facebook/jest/pull/9903) & [#9842](https://github.com/facebook/jest/pull/9842)) - `[@jest/environment]` Make sure not to reference Jest types ([#9875](https://github.com/facebook/jest/pull/9875)) - `[jest-message-util]` Code frame printing should respect `--noStackTrace` flag ([#9866](https://github.com/facebook/jest/pull/9866)) - `[jest-runtime]` Support importing CJS from ESM using `import` statements ([#9850](https://github.com/facebook/jest/pull/9850)) diff --git a/packages/jest-circus/src/legacy-code-todo-rewrite/jestAdapter.ts b/packages/jest-circus/src/legacy-code-todo-rewrite/jestAdapter.ts index a7fdf68cb0d9..4630f16c56bb 100644 --- a/packages/jest-circus/src/legacy-code-todo-rewrite/jestAdapter.ts +++ b/packages/jest-circus/src/legacy-code-todo-rewrite/jestAdapter.ts @@ -77,7 +77,8 @@ const jestAdapter = async ( }); for (const path of config.setupFilesAfterEnv) { - const esm = runtime.unstable_shouldLoadAsEsm(path); + // TODO: remove ? in Jest 26 + const esm = runtime.unstable_shouldLoadAsEsm?.(path); if (esm) { await runtime.unstable_importModule(path); @@ -86,7 +87,8 @@ const jestAdapter = async ( } } - const esm = runtime.unstable_shouldLoadAsEsm(testPath); + // TODO: remove ? in Jest 26 + const esm = runtime.unstable_shouldLoadAsEsm?.(testPath); if (esm) { await runtime.unstable_importModule(testPath); diff --git a/packages/jest-jasmine2/src/index.ts b/packages/jest-jasmine2/src/index.ts index 03d2eebdc851..c37fe26f7dbc 100644 --- a/packages/jest-jasmine2/src/index.ts +++ b/packages/jest-jasmine2/src/index.ts @@ -156,7 +156,8 @@ async function jasmine2( }); for (const path of config.setupFilesAfterEnv) { - const esm = runtime.unstable_shouldLoadAsEsm(path); + // TODO: remove ? in Jest 26 + const esm = runtime.unstable_shouldLoadAsEsm?.(path); if (esm) { await runtime.unstable_importModule(path); @@ -177,7 +178,8 @@ async function jasmine2( env.specFilter = (spec: Spec) => testNameRegex.test(spec.getFullName()); } - const esm = runtime.unstable_shouldLoadAsEsm(testPath); + // TODO: remove ? in Jest 26 + const esm = runtime.unstable_shouldLoadAsEsm?.(testPath); if (esm) { await runtime.unstable_importModule(testPath); diff --git a/packages/jest-runner/src/runTest.ts b/packages/jest-runner/src/runTest.ts index dd8735be8b57..e57c63539196 100644 --- a/packages/jest-runner/src/runTest.ts +++ b/packages/jest-runner/src/runTest.ts @@ -159,7 +159,8 @@ async function runTestInternal( const start = Date.now(); for (const path of config.setupFiles) { - const esm = runtime.unstable_shouldLoadAsEsm(path); + // TODO: remove ? in Jest 26 + const esm = runtime.unstable_shouldLoadAsEsm?.(path); if (esm) { await runtime.unstable_importModule(path); diff --git a/packages/jest-runtime/src/cli/index.ts b/packages/jest-runtime/src/cli/index.ts index 54857611e5c2..1214fdebea5b 100644 --- a/packages/jest-runtime/src/cli/index.ts +++ b/packages/jest-runtime/src/cli/index.ts @@ -94,7 +94,8 @@ export async function run( const runtime = new Runtime(config, environment, hasteMap.resolver); for (const path of config.setupFiles) { - const esm = runtime.unstable_shouldLoadAsEsm(path); + // TODO: remove ? in Jest 26 + const esm = runtime.unstable_shouldLoadAsEsm?.(path); if (esm) { await runtime.unstable_importModule(path); @@ -102,7 +103,8 @@ export async function run( runtime.requireModule(path); } } - const esm = runtime.unstable_shouldLoadAsEsm(filePath); + // TODO: remove ? in Jest 26 + const esm = runtime.unstable_shouldLoadAsEsm?.(filePath); if (esm) { await runtime.unstable_importModule(filePath); From 5db005f15960e75f54c963fd9ac6419c8cf603da Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Tue, 28 Apr 2020 13:15:13 +0200 Subject: [PATCH 002/106] chore: add teardown of `jest-runtime` (#9906) --- CHANGELOG.md | 1 + packages/jest-runner/src/runTest.ts | 2 ++ packages/jest-runtime/src/index.ts | 28 ++++++++++++++++++++++++++++ 3 files changed, 31 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e5d5f1571221..99e5f01ac925 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ - `[jest-resolve]` Update `resolve` to a version using native `realpath`, which is faster than the default JS implementation ([#9872](https://github.com/facebook/jest/pull/9872)) - `[jest-resolve]` Pass custom cached `realpath` function to `resolve` ([#9873](https://github.com/facebook/jest/pull/9873)) +- `[jest-runtime]` Add `teardown` method to clear any caches when tests complete ([#9906](https://github.com/facebook/jest/pull/9906)) ## 25.4.0 diff --git a/packages/jest-runner/src/runTest.ts b/packages/jest-runner/src/runTest.ts index e57c63539196..5d753434d398 100644 --- a/packages/jest-runner/src/runTest.ts +++ b/packages/jest-runner/src/runTest.ts @@ -301,6 +301,8 @@ async function runTestInternal( }); } finally { await environment.teardown(); + // TODO: this function might be missing, remove ? in Jest 26 + runtime.teardown?.(); sourcemapSupport.resetRetrieveHandlers(); } diff --git a/packages/jest-runtime/src/index.ts b/packages/jest-runtime/src/index.ts index ecb2d25f3ef8..59b48d66bc04 100644 --- a/packages/jest-runtime/src/index.ts +++ b/packages/jest-runtime/src/index.ts @@ -718,12 +718,17 @@ class Runtime { try { fn(); } finally { + // might be cleared within the callback + this._isolatedModuleRegistry?.clear(); + this._isolatedMockRegistry?.clear(); this._isolatedModuleRegistry = null; this._isolatedMockRegistry = null; } } resetModules(): void { + this._isolatedModuleRegistry?.clear(); + this._isolatedMockRegistry?.clear(); this._isolatedModuleRegistry = null; this._isolatedMockRegistry = null; this._mockRegistry.clear(); @@ -833,6 +838,29 @@ class Runtime { this._moduleMocker.clearAllMocks(); } + teardown(): void { + this.restoreAllMocks(); + this.resetAllMocks(); + this.resetModules(); + + this._internalModuleRegistry.clear(); + this._mockFactories = {}; + this._mockMetaDataCache = {}; + this._shouldMockModuleCache = {}; + this._shouldUnmockTransitiveDependenciesCache = {}; + this._transitiveShouldMock = {}; + this._virtualMocks = {}; + this._cacheFS = {}; + + this._sourceMapRegistry = {}; + + this._fileTransforms.clear(); + this.jestObjectCaches.clear(); + + this._v8CoverageResult = []; + this._moduleImplementation = undefined; + } + private _resolveModule(from: Config.Path, to?: string) { return to ? this._resolver.resolveModule(from, to) : from; } From 6f5009b831f565b0e8992e9a815ba0ff4675a0e8 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Tue, 28 Apr 2020 13:59:44 +0200 Subject: [PATCH 003/106] fix: hoist imports of `@jest/globals` correctly (#9806) --- e2e/__tests__/babelPluginJestHoist.test.ts | 4 +- .../__tests__/importJest.test.js | 53 +++++ .../__tests__/integration.test.js | 31 ++- packages/babel-plugin-jest-hoist/package.json | 3 +- packages/babel-plugin-jest-hoist/src/index.ts | 197 ++++++++++++++---- yarn.lock | 2 +- 6 files changed, 238 insertions(+), 52 deletions(-) create mode 100644 e2e/babel-plugin-jest-hoist/__tests__/importJest.test.js diff --git a/e2e/__tests__/babelPluginJestHoist.test.ts b/e2e/__tests__/babelPluginJestHoist.test.ts index 2f7cbd6aafdc..04a2f3e2c9e2 100644 --- a/e2e/__tests__/babelPluginJestHoist.test.ts +++ b/e2e/__tests__/babelPluginJestHoist.test.ts @@ -15,8 +15,8 @@ beforeEach(() => { run('yarn', DIR); }); -it('sucessfully runs the tests inside `babel-plugin-jest-hoist/`', () => { +it('successfully runs the tests inside `babel-plugin-jest-hoist/`', () => { const {json} = runWithJson(DIR, ['--no-cache', '--coverage']); expect(json.success).toBe(true); - expect(json.numTotalTestSuites).toBe(3); + expect(json.numTotalTestSuites).toBe(4); }); diff --git a/e2e/babel-plugin-jest-hoist/__tests__/importJest.test.js b/e2e/babel-plugin-jest-hoist/__tests__/importJest.test.js new file mode 100644 index 000000000000..2933ad991e6e --- /dev/null +++ b/e2e/babel-plugin-jest-hoist/__tests__/importJest.test.js @@ -0,0 +1,53 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + */ + +/* eslint-disable import/no-duplicates */ +import {jest} from '@jest/globals'; +import {jest as aliasedJest} from '@jest/globals'; +import * as JestGlobals from '@jest/globals'; +/* eslint-enable import/no-duplicates */ + +import a from '../__test_modules__/a'; +import b from '../__test_modules__/b'; +import c from '../__test_modules__/c'; +import d from '../__test_modules__/d'; + +// These will be hoisted above imports + +jest.unmock('../__test_modules__/a'); +aliasedJest.unmock('../__test_modules__/b'); +JestGlobals.jest.unmock('../__test_modules__/c'); + +// These will not be hoisted above imports + +{ + const jest = {unmock: () => {}}; + jest.unmock('../__test_modules__/d'); +} + +// tests + +test('named import', () => { + expect(a._isMockFunction).toBe(undefined); + expect(a()).toBe('unmocked'); +}); + +test('aliased named import', () => { + expect(b._isMockFunction).toBe(undefined); + expect(b()).toBe('unmocked'); +}); + +test('namespace import', () => { + expect(c._isMockFunction).toBe(undefined); + expect(c()).toBe('unmocked'); +}); + +test('fake jest, shadowed import', () => { + expect(d._isMockFunction).toBe(true); + expect(d()).toBe(undefined); +}); diff --git a/e2e/babel-plugin-jest-hoist/__tests__/integration.test.js b/e2e/babel-plugin-jest-hoist/__tests__/integration.test.js index 615f0e31b4e9..3e3dd10de3e2 100644 --- a/e2e/babel-plugin-jest-hoist/__tests__/integration.test.js +++ b/e2e/babel-plugin-jest-hoist/__tests__/integration.test.js @@ -15,7 +15,7 @@ import a from '../__test_modules__/a'; import b from '../__test_modules__/b'; import c from '../__test_modules__/c'; import d from '../__test_modules__/d'; -import e from '../__test_modules__/e'; +import f from '../__test_modules__/f'; import jestBackticks from '../__test_modules__/jestBackticks'; // The virtual mock call below will be hoisted above this `require` call. @@ -25,7 +25,16 @@ const virtualModule = require('virtual-module'); jest.unmock('react'); jest.deepUnmock('../__test_modules__/Unmocked'); jest.unmock('../__test_modules__/c').unmock('../__test_modules__/d'); -jest.mock('../__test_modules__/e', () => { + +let e; +(function () { + const _getJestObj = 42; + e = require('../__test_modules__/e').default; + // hoisted to the top of the function scope + jest.unmock('../__test_modules__/e'); +})(); + +jest.mock('../__test_modules__/f', () => { if (!global.CALLS) { global.CALLS = 0; } @@ -52,8 +61,13 @@ jest.mock('has-flow-types', () => (props: {children: mixed}) => 3, { // These will not be hoisted jest.unmock('../__test_modules__/a').dontMock('../__test_modules__/b'); // eslint-disable-next-line no-useless-concat -jest.unmock('../__test_modules__/' + 'c'); +jest.unmock('../__test_modules__/' + 'a'); jest.dontMock('../__test_modules__/Mocked'); +{ + const jest = {unmock: () => {}}; + // Would error (used before initialization) if hoisted to the top of the scope + jest.unmock('../__test_modules__/a'); +} // This must not throw an error const myObject = {mock: () => {}}; @@ -84,14 +98,17 @@ describe('babel-plugin-jest-hoist', () => { expect(d._isMockFunction).toBe(undefined); expect(d()).toEqual('unmocked'); + + expect(e._isMock).toBe(undefined); + expect(e()).toEqual('unmocked'); }); it('hoists mock call with 2 arguments', () => { const path = require('path'); - expect(e._isMock).toBe(true); + expect(f._isMock).toBe(true); - const mockFn = e.fn(); + const mockFn = f.fn(); expect(mockFn()).toEqual([path.sep, undefined, undefined]); }); @@ -100,10 +117,10 @@ describe('babel-plugin-jest-hoist', () => { global.CALLS = 0; - require('../__test_modules__/e'); + require('../__test_modules__/f'); expect(global.CALLS).toEqual(1); - require('../__test_modules__/e'); + require('../__test_modules__/f'); expect(global.CALLS).toEqual(1); delete global.CALLS; diff --git a/packages/babel-plugin-jest-hoist/package.json b/packages/babel-plugin-jest-hoist/package.json index de303f8cfdff..60c3d3757bf2 100644 --- a/packages/babel-plugin-jest-hoist/package.json +++ b/packages/babel-plugin-jest-hoist/package.json @@ -20,10 +20,11 @@ } }, "dependencies": { + "@babel/template": "^7.3.3", + "@babel/types": "^7.3.3", "@types/babel__traverse": "^7.0.6" }, "devDependencies": { - "@babel/types": "^7.3.3", "@types/node": "*" }, "publishConfig": { diff --git a/packages/babel-plugin-jest-hoist/src/index.ts b/packages/babel-plugin-jest-hoist/src/index.ts index 43f19e39c52f..714154256109 100644 --- a/packages/babel-plugin-jest-hoist/src/index.ts +++ b/packages/babel-plugin-jest-hoist/src/index.ts @@ -6,8 +6,21 @@ * */ -import type {NodePath, Visitor} from '@babel/traverse'; -import type {Identifier} from '@babel/types'; +import type {NodePath} from '@babel/traverse'; +import { + Expression, + Identifier, + Node, + Program, + callExpression, + isIdentifier, +} from '@babel/types'; +import {statement} from '@babel/template'; +import type {PluginObj} from '@babel/core'; + +const JEST_GLOBAL_NAME = 'jest'; +const JEST_GLOBALS_MODULE_NAME = '@jest/globals'; +const JEST_GLOBALS_MODULE_JEST_EXPORT_NAME = 'jest'; // We allow `jest`, `expect`, `require`, all default Node.js globals and all // ES2015 built-ins to be used inside of a `jest.mock` factory. @@ -70,19 +83,19 @@ const WHITELISTED_IDENTIFIERS = new Set( ].sort(), ); -const JEST_GLOBAL = {name: 'jest'}; -// TODO: Should be Visitor<{ids: Set>}>, but `ReferencedIdentifier` doesn't exist const IDVisitor = { - ReferencedIdentifier(path: NodePath) { - // @ts-ignore: passed as Visitor State - this.ids.add(path); + ReferencedIdentifier( + path: NodePath, + {ids}: {ids: Set>}, + ) { + ids.add(path); }, blacklist: ['TypeAnnotation', 'TSTypeAnnotation', 'TSTypeReference'], }; const FUNCTIONS: Record< string, - (args: Array) => boolean + (args: Array>) => boolean > = Object.create(null); FUNCTIONS.mock = args => { @@ -100,7 +113,7 @@ FUNCTIONS.mock = args => { const ids: Set> = new Set(); const parentScope = moduleFactory.parentPath.scope; - // @ts-ignore: Same as above: ReferencedIdentifier doesn't exist + // @ts-ignore: ReferencedIdentifier is not known on visitors moduleFactory.traverse(IDVisitor, {ids}); for (const id of ids) { const {name} = id.node; @@ -152,38 +165,140 @@ FUNCTIONS.deepUnmock = args => args.length === 1 && args[0].isStringLiteral(); FUNCTIONS.disableAutomock = FUNCTIONS.enableAutomock = args => args.length === 0; -export default (): {visitor: Visitor} => { - const shouldHoistExpression = (expr: NodePath): boolean => { - if (!expr.isCallExpression()) { - return false; - } +const createJestObjectGetter = statement` +function GETTER_NAME() { + const { JEST_GLOBALS_MODULE_JEST_EXPORT_NAME } = require("JEST_GLOBALS_MODULE_NAME"); + GETTER_NAME = () => JEST_GLOBALS_MODULE_JEST_EXPORT_NAME; + return JEST_GLOBALS_MODULE_JEST_EXPORT_NAME; +} +`; - // TODO: avoid type casts - the types can be arrays (is it possible to ignore that without casting?) - const callee = expr.get('callee') as NodePath; - const expressionArguments = expr.get('arguments'); - const object = callee.get('object') as NodePath; - const property = callee.get('property') as NodePath; - return ( - property.isIdentifier() && - FUNCTIONS[property.node.name] && - (object.isIdentifier(JEST_GLOBAL) || - (callee.isMemberExpression() && shouldHoistExpression(object))) && - FUNCTIONS[property.node.name]( - Array.isArray(expressionArguments) - ? expressionArguments - : [expressionArguments], - ) - ); - }; - - const visitor: Visitor = { - ExpressionStatement(path) { - if (shouldHoistExpression(path.get('expression') as NodePath)) { - // @ts-ignore: private, magical property - path.node._blockHoist = Infinity; - } - }, - }; +const isJestObject = (expression: NodePath): boolean => { + // global + if ( + expression.isIdentifier() && + expression.node.name === JEST_GLOBAL_NAME && + !expression.scope.hasBinding(JEST_GLOBAL_NAME) + ) { + return true; + } + // import { jest } from '@jest/globals' + if ( + expression.referencesImport( + JEST_GLOBALS_MODULE_NAME, + JEST_GLOBALS_MODULE_JEST_EXPORT_NAME, + ) + ) { + return true; + } + // import * as JestGlobals from '@jest/globals' + if ( + expression.isMemberExpression() && + !expression.node.computed && + expression + .get<'object'>('object') + .referencesImport(JEST_GLOBALS_MODULE_NAME, '*') && + expression.node.property.name === JEST_GLOBALS_MODULE_JEST_EXPORT_NAME + ) { + return true; + } - return {visitor}; + return false; }; + +const extractJestObjExprIfHoistable = ( + expr: NodePath, +): NodePath | null => { + if (!expr.isCallExpression()) { + return null; + } + + const callee = expr.get<'callee'>('callee'); + const args = expr.get<'arguments'>('arguments'); + + if (!callee.isMemberExpression() || callee.node.computed) { + return null; + } + + const object = callee.get<'object'>('object'); + const property = callee.get<'property'>('property') as NodePath; + const propertyName = property.node.name; + + const jestObjExpr = isJestObject(object) + ? object + : // The Jest object could be returned from another call since the functions are all chainable. + extractJestObjExprIfHoistable(object); + if (!jestObjExpr) { + return null; + } + + // Important: Call the function check last + // It might throw an error to display to the user, + // which should only happen if we're already sure it's a call on the Jest object. + const functionLooksHoistable = FUNCTIONS[propertyName]?.(args); + + return functionLooksHoistable ? jestObjExpr : null; +}; + +/* eslint-disable sort-keys,@typescript-eslint/explicit-module-boundary-types */ +export default (): PluginObj<{ + declareJestObjGetterIdentifier: () => Identifier; + jestObjGetterIdentifier?: Identifier; +}> => ({ + pre({path: program}: {path: NodePath}) { + this.declareJestObjGetterIdentifier = () => { + if (this.jestObjGetterIdentifier) { + return this.jestObjGetterIdentifier; + } + + this.jestObjGetterIdentifier = program.scope.generateUidIdentifier( + 'getJestObj', + ); + + program.unshiftContainer('body', [ + createJestObjectGetter({ + GETTER_NAME: this.jestObjGetterIdentifier.name, + JEST_GLOBALS_MODULE_JEST_EXPORT_NAME, + JEST_GLOBALS_MODULE_NAME, + }), + ]); + + return this.jestObjGetterIdentifier; + }; + }, + visitor: { + ExpressionStatement(exprStmt) { + const jestObjExpr = extractJestObjExprIfHoistable( + exprStmt.get<'expression'>('expression'), + ); + if (jestObjExpr) { + jestObjExpr.replaceWith( + callExpression(this.declareJestObjGetterIdentifier(), []), + ); + } + }, + }, + // in `post` to make sure we come after an import transform and can unshift above the `require`s + post({path: program}: {path: NodePath}) { + program.traverse({ + CallExpression: callExpr => { + const { + node: {callee}, + } = callExpr; + if ( + isIdentifier(callee) && + callee.name === this.jestObjGetterIdentifier?.name + ) { + const mockStmt = callExpr.getStatementParent(); + const mockStmtNode = mockStmt.node; + const mockStmtParent = mockStmt.parentPath; + if (mockStmtParent.isBlock()) { + mockStmt.remove(); + mockStmtParent.unshiftContainer('body', [mockStmtNode]); + } + } + }, + }); + }, +}); +/* eslint-enable sort-keys,@typescript-eslint/explicit-module-boundary-types */ diff --git a/yarn.lock b/yarn.lock index 3f604de1b915..9ca11d8bef55 100644 --- a/yarn.lock +++ b/yarn.lock @@ -994,7 +994,7 @@ dependencies: regenerator-runtime "^0.13.4" -"@babel/template@^7.0.0", "@babel/template@^7.7.4", "@babel/template@^7.8.3", "@babel/template@^7.8.6": +"@babel/template@^7.0.0", "@babel/template@^7.3.3", "@babel/template@^7.7.4", "@babel/template@^7.8.3", "@babel/template@^7.8.6": version "7.8.6" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.8.6.tgz#86b22af15f828dfb086474f964dcc3e39c43ce2b" integrity sha512-zbMsPMy/v0PWFZEhQJ66bqjhH+z0JgMoBWuikXybgG3Gkd/3t5oQ1Rw2WQhnSrsOmsKXnZOx15tkC4qON/+JPg== From 752a1763cb41cf6b483ed719316583ce6da4b5f2 Mon Sep 17 00:00:00 2001 From: James George Date: Tue, 28 Apr 2020 18:49:36 +0530 Subject: [PATCH 004/106] minor typographical fix (#9909) --- e2e/__tests__/pnp.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e/__tests__/pnp.test.ts b/e2e/__tests__/pnp.test.ts index fd60348a3820..b5cbcc139210 100644 --- a/e2e/__tests__/pnp.test.ts +++ b/e2e/__tests__/pnp.test.ts @@ -19,7 +19,7 @@ beforeEach(() => { run('yarn', DIR); }); -it('sucessfully runs the tests inside `pnp/`', () => { +it('successfully runs the tests inside `pnp/`', () => { const {json} = runWithJson(DIR, ['--no-cache', '--coverage'], { nodeOptions: `--require ${DIR}/.pnp.js`, }); From e281d53f82955624dff6426545eca92798e820c9 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Tue, 28 Apr 2020 15:26:47 +0200 Subject: [PATCH 005/106] fix: do not transform internally imported files (#9900) --- CHANGELOG.md | 1 + packages/jest-runtime/src/index.ts | 59 +++++++++++++++++++----------- 2 files changed, 38 insertions(+), 22 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 99e5f01ac925..89c7faac2588 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ - `[jest-resolve]` Update `resolve` to a version using native `realpath`, which is faster than the default JS implementation ([#9872](https://github.com/facebook/jest/pull/9872)) - `[jest-resolve]` Pass custom cached `realpath` function to `resolve` ([#9873](https://github.com/facebook/jest/pull/9873)) - `[jest-runtime]` Add `teardown` method to clear any caches when tests complete ([#9906](https://github.com/facebook/jest/pull/9906)) +- `[jest-runtime]` Do not pass files required internally through transformation when loading them ([#9900](https://github.com/facebook/jest/pull/9900)) ## 25.4.0 diff --git a/packages/jest-runtime/src/index.ts b/packages/jest-runtime/src/index.ts index 59b48d66bc04..737258df6c92 100644 --- a/packages/jest-runtime/src/index.ts +++ b/packages/jest-runtime/src/index.ts @@ -343,13 +343,13 @@ class Runtime { return core; } - const transformedFile = this.transformFile(modulePath, { + const transformedCode = this.transformFile(modulePath, { isInternalModule: false, supportsDynamicImport: true, supportsStaticESM: true, }); - const module = new SourceTextModule(transformedFile.code, { + const module = new SourceTextModule(transformedCode, { context, identifier: modulePath, importModuleDynamically: this.linkModules.bind(this), @@ -471,7 +471,7 @@ class Runtime { const manualMock = moduleName && this._resolver.getMockModule(from, moduleName); if ( - (!options || !options.isInternalModule) && + !options?.isInternalModule && !isRequireActual && !moduleResource && manualMock && @@ -491,7 +491,9 @@ class Runtime { let moduleRegistry; - if (!options || !options.isInternalModule) { + if (options?.isInternalModule) { + moduleRegistry = this._internalModuleRegistry; + } else { if ( this._moduleRegistry.get(modulePath) || !this._isolatedModuleRegistry @@ -500,8 +502,6 @@ class Runtime { } else { moduleRegistry = this._isolatedModuleRegistry; } - } else { - moduleRegistry = this._internalModuleRegistry; } const module = moduleRegistry.get(modulePath); @@ -641,7 +641,7 @@ class Runtime { moduleRegistry: ModuleRegistry, ) { if (path.extname(modulePath) === '.json') { - const text = stripBOM(fs.readFileSync(modulePath, 'utf8')); + const text = stripBOM(this.readFile(modulePath)); const transformedFile = this._scriptTransformer.transformJson( modulePath, @@ -965,7 +965,7 @@ class Runtime { value: this._createRequireImplementation(localModule, options), }); - const transformedFile = this.transformFile(filename, options); + const transformedCode = this.transformFile(filename, options); let compiledFunction: ModuleWrapper | null = null; @@ -977,7 +977,7 @@ class Runtime { if (typeof compileFunction === 'function') { try { compiledFunction = compileFunction( - transformedFile.code, + transformedCode, this.constructInjectedModuleParameters(), { filename, @@ -988,10 +988,7 @@ class Runtime { throw handlePotentialSyntaxError(e); } } else { - const script = this.createScriptFromCode( - transformedFile.code, - filename, - ); + const script = this.createScriptFromCode(transformedCode, filename); const runScript = script.runInContext( vmContext, @@ -1005,7 +1002,7 @@ class Runtime { } } } else { - const script = this.createScriptFromCode(transformedFile.code, filename); + const script = this.createScriptFromCode(transformedCode, filename); const runScript = this._environment.runScript( script, @@ -1058,22 +1055,28 @@ class Runtime { this._currentlyExecutingModulePath = lastExecutingModulePath; } - private transformFile(filename: string, options?: InternalModuleOptions) { + private transformFile( + filename: string, + options?: InternalModuleOptions, + ): string { + const source = this.readFile(filename); + + if (options?.isInternalModule) { + return source; + } + const transformedFile = this._scriptTransformer.transform( filename, this._getFullTransformationOptions(options), - this._cacheFS[filename], + source, ); - // we only care about non-internal modules - if (!options || !options.isInternalModule) { - this._fileTransforms.set(filename, transformedFile); - } + this._fileTransforms.set(filename, transformedFile); if (transformedFile.sourceMapPath) { this._sourceMapRegistry[filename] = transformedFile.sourceMapPath; } - return transformedFile; + return transformedFile.code; } private createScriptFromCode(scriptSource: string, filename: string) { @@ -1303,7 +1306,7 @@ class Runtime { resolve.paths = (moduleName: string) => this._requireResolvePaths(from.filename, moduleName); - const moduleRequire = (options && options.isInternalModule + const moduleRequire = (options?.isInternalModule ? (moduleName: string) => this.requireInternalModule(from.filename, moduleName) : this.requireModuleOrMock.bind( @@ -1635,6 +1638,18 @@ class Runtime { xtest: this._environment.global.xtest, }; } + + private readFile(filename: Config.Path): string { + let source = this._cacheFS[filename]; + + if (!source) { + source = fs.readFileSync(filename, 'utf8'); + + this._cacheFS[filename] = source; + } + + return source; + } } function invariant(condition: unknown, message?: string): asserts condition { From b4228da1dad22a7cee3ece79f5ef27fc684f6e07 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Tue, 28 Apr 2020 16:55:35 +0200 Subject: [PATCH 006/106] chore: use `Map`s rather than objects as cache holders (#9902) --- CHANGELOG.md | 1 + packages/jest-resolve/src/index.ts | 1 + packages/jest-runtime/src/index.ts | 180 ++++++++++++++++------------- tsconfig.json | 3 +- 4 files changed, 102 insertions(+), 83 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 89c7faac2588..d620b35ffb24 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ - `[jest-resolve]` Pass custom cached `realpath` function to `resolve` ([#9873](https://github.com/facebook/jest/pull/9873)) - `[jest-runtime]` Add `teardown` method to clear any caches when tests complete ([#9906](https://github.com/facebook/jest/pull/9906)) - `[jest-runtime]` Do not pass files required internally through transformation when loading them ([#9900](https://github.com/facebook/jest/pull/9900)) +- `[jest-runtime]` Use `Map`s instead of object literals as cache holders ([#9901](https://github.com/facebook/jest/pull/9901)) ## 25.4.0 diff --git a/packages/jest-resolve/src/index.ts b/packages/jest-resolve/src/index.ts index 00faa0e5f535..19937efafd7b 100644 --- a/packages/jest-resolve/src/index.ts +++ b/packages/jest-resolve/src/index.ts @@ -28,6 +28,7 @@ type FindNodeModuleConfig = { throwIfNotFound?: boolean; }; +// TODO: replace with a Map in Jest 26 type BooleanObject = Record; namespace Resolver { diff --git a/packages/jest-runtime/src/index.ts b/packages/jest-runtime/src/index.ts index 737258df6c92..69e1c22de49e 100644 --- a/packages/jest-runtime/src/index.ts +++ b/packages/jest-runtime/src/index.ts @@ -83,10 +83,17 @@ type InitialModule = Partial & type ModuleRegistry = Map; type ResolveOptions = Parameters[1]; -type BooleanObject = Record; -type CacheFS = {[path: string]: string}; - -type RequireCache = {[key: string]: Module}; +type StringMap = Map; +type BooleanMap = Map; + +const fromEntries: typeof Object.fromEntries = + Object.fromEntries ?? + function fromEntries(iterable: Iterable<[string, T]>) { + return [...iterable].reduce>((obj, [key, val]) => { + obj[key] = val; + return obj; + }, {}); + }; namespace Runtime { export type Context = JestContext; @@ -122,18 +129,19 @@ const runtimeSupportsVmModules = typeof SyntheticModule === 'function'; /* eslint-disable-next-line no-redeclare */ class Runtime { - private _cacheFS: CacheFS; + private _cacheFS: StringMap; private _config: Config.ProjectConfig; private _coverageOptions: ShouldInstrumentOptions; private _currentlyExecutingModulePath: string; private _environment: JestEnvironment; - private _explicitShouldMock: BooleanObject; + private _explicitShouldMock: BooleanMap; private _internalModuleRegistry: ModuleRegistry; private _isCurrentlyExecutingManualMock: string | null; - private _mockFactories: Record unknown>; - private _mockMetaDataCache: { - [key: string]: jestMock.MockFunctionMetadata>; - }; + private _mockFactories: Map unknown>; + private _mockMetaDataCache: Map< + string, + jestMock.MockFunctionMetadata> + >; private _mockRegistry: Map; private _isolatedMockRegistry: Map | null; private _moduleMocker: typeof jestMock; @@ -142,16 +150,16 @@ class Runtime { private _esmoduleRegistry: Map>; private _resolver: Resolver; private _shouldAutoMock: boolean; - private _shouldMockModuleCache: BooleanObject; - private _shouldUnmockTransitiveDependenciesCache: BooleanObject; - private _sourceMapRegistry: SourceMapRegistry; + private _shouldMockModuleCache: BooleanMap; + private _shouldUnmockTransitiveDependenciesCache: BooleanMap; + private _sourceMapRegistry: StringMap; private _scriptTransformer: ScriptTransformer; private _fileTransforms: Map; private _v8CoverageInstrumenter: CoverageInstrumenter | undefined; private _v8CoverageResult: V8Coverage | undefined; - private _transitiveShouldMock: BooleanObject; + private _transitiveShouldMock: BooleanMap; private _unmockList: RegExp | undefined; - private _virtualMocks: BooleanObject; + private _virtualMocks: BooleanMap; private _moduleImplementation?: typeof nativeModule.Module; private jestObjectCaches: Map; private _hasWarnedAboutRequireCacheModification = false; @@ -160,10 +168,10 @@ class Runtime { config: Config.ProjectConfig, environment: JestEnvironment, resolver: Resolver, - cacheFS?: CacheFS, + cacheFS: Record = {}, coverageOptions?: ShouldInstrumentOptions, ) { - this._cacheFS = cacheFS || Object.create(null); + this._cacheFS = new Map(Object.entries(cacheFS)); this._config = config; this._coverageOptions = coverageOptions || { changedFiles: undefined, @@ -175,10 +183,10 @@ class Runtime { }; this._currentlyExecutingModulePath = ''; this._environment = environment; - this._explicitShouldMock = Object.create(null); + this._explicitShouldMock = new Map(); this._internalModuleRegistry = new Map(); this._isCurrentlyExecutingManualMock = null; - this._mockFactories = Object.create(null); + this._mockFactories = new Map(); this._mockRegistry = new Map(); // during setup, this cannot be null (and it's fine to explode if it is) this._moduleMocker = this._environment.moduleMocker!; @@ -189,15 +197,15 @@ class Runtime { this._resolver = resolver; this._scriptTransformer = new ScriptTransformer(config); this._shouldAutoMock = config.automock; - this._sourceMapRegistry = Object.create(null); + this._sourceMapRegistry = new Map(); this._fileTransforms = new Map(); - this._virtualMocks = Object.create(null); + this._virtualMocks = new Map(); this.jestObjectCaches = new Map(); - this._mockMetaDataCache = Object.create(null); - this._shouldMockModuleCache = Object.create(null); - this._shouldUnmockTransitiveDependenciesCache = Object.create(null); - this._transitiveShouldMock = Object.create(null); + this._mockMetaDataCache = new Map(); + this._shouldMockModuleCache = new Map(); + this._shouldUnmockTransitiveDependenciesCache = new Map(); + this._transitiveShouldMock = new Map(); this._unmockList = unmockRegExpCache.get(config); if (!this._unmockList && config.unmockedModulePathPatterns) { @@ -208,13 +216,11 @@ class Runtime { } if (config.automock) { + const virtualMocks = fromEntries(this._virtualMocks); config.setupFiles.forEach(filePath => { if (filePath && filePath.includes(NODE_MODULES)) { - const moduleID = this._resolver.getModuleID( - this._virtualMocks, - filePath, - ); - this._transitiveShouldMock[moduleID] = false; + const moduleID = this._resolver.getModuleID(virtualMocks, filePath); + this._transitiveShouldMock.set(moduleID, false); } }); } @@ -459,7 +465,7 @@ class Runtime { isRequireActual?: boolean | null, ): T { const moduleID = this._resolver.getModuleID( - this._virtualMocks, + fromEntries(this._virtualMocks), from, moduleName, ); @@ -476,7 +482,7 @@ class Runtime { !moduleResource && manualMock && manualMock !== this._isCurrentlyExecutingManualMock && - this._explicitShouldMock[moduleID] !== false + this._explicitShouldMock.get(moduleID) !== false ) { modulePath = manualMock; } @@ -547,7 +553,7 @@ class Runtime { requireMock(from: Config.Path, moduleName: string): T { const moduleID = this._resolver.getModuleID( - this._virtualMocks, + fromEntries(this._virtualMocks), from, moduleName, ); @@ -563,8 +569,9 @@ class Runtime { const mockRegistry = this._isolatedMockRegistry || this._mockRegistry; - if (moduleID in this._mockFactories) { - const module = this._mockFactories[moduleID](); + if (this._mockFactories.has(moduleID)) { + // has check above makes this ok + const module = this._mockFactories.get(moduleID)!(); mockRegistry.set(moduleID, module); return module as T; } @@ -804,7 +811,7 @@ class Runtime { } getSourceMaps(): SourceMapRegistry { - return this._sourceMapRegistry; + return fromEntries(this._sourceMapRegistry); } setMock( @@ -813,17 +820,18 @@ class Runtime { mockFactory: () => unknown, options?: {virtual?: boolean}, ): void { - if (options && options.virtual) { + if (options?.virtual) { const mockPath = this._resolver.getModulePath(from, moduleName); - this._virtualMocks[mockPath] = true; + + this._virtualMocks.set(mockPath, true); } const moduleID = this._resolver.getModuleID( - this._virtualMocks, + fromEntries(this._virtualMocks), from, moduleName, ); - this._explicitShouldMock[moduleID] = true; - this._mockFactories[moduleID] = mockFactory; + this._explicitShouldMock.set(moduleID, true); + this._mockFactories.set(moduleID, mockFactory); } restoreAllMocks(): void { @@ -844,20 +852,23 @@ class Runtime { this.resetModules(); this._internalModuleRegistry.clear(); - this._mockFactories = {}; - this._mockMetaDataCache = {}; - this._shouldMockModuleCache = {}; - this._shouldUnmockTransitiveDependenciesCache = {}; - this._transitiveShouldMock = {}; - this._virtualMocks = {}; - this._cacheFS = {}; - - this._sourceMapRegistry = {}; + this._mockFactories.clear(); + this._mockMetaDataCache.clear(); + this._shouldMockModuleCache.clear(); + this._shouldUnmockTransitiveDependenciesCache.clear(); + this._explicitShouldMock.clear(); + this._transitiveShouldMock.clear(); + this._virtualMocks.clear(); + this._cacheFS.clear(); + this._unmockList = undefined; + + this._sourceMapRegistry.clear(); this._fileTransforms.clear(); this.jestObjectCaches.clear(); this._v8CoverageResult = []; + this._v8CoverageInstrumenter = undefined; this._moduleImplementation = undefined; } @@ -1074,7 +1085,7 @@ class Runtime { this._fileTransforms.set(filename, transformedFile); if (transformedFile.sourceMapPath) { - this._sourceMapRegistry[filename] = transformedFile.sourceMapPath; + this._sourceMapRegistry.set(filename, transformedFile.sourceMapPath); } return transformedFile.code; } @@ -1198,12 +1209,14 @@ class Runtime { const modulePath = this._resolver.resolveStubModuleName(from, moduleName) || this._resolveModule(from, moduleName); - if (!(modulePath in this._mockMetaDataCache)) { + if (!this._mockMetaDataCache.has(modulePath)) { // This allows us to handle circular dependencies while generating an // automock - this._mockMetaDataCache[modulePath] = - this._moduleMocker.getMetadata({}) || {}; + this._mockMetaDataCache.set( + modulePath, + this._moduleMocker.getMetadata({}) || {}, + ); // In order to avoid it being possible for automocking to potentially // cause side-effects within the module environment, we need to execute @@ -1227,36 +1240,39 @@ class Runtime { `See: https://jestjs.io/docs/manual-mocks.html#content`, ); } - this._mockMetaDataCache[modulePath] = mockMetadata; + this._mockMetaDataCache.set(modulePath, mockMetadata); } return this._moduleMocker.generateFromMetadata( - this._mockMetaDataCache[modulePath], + // added above if missing + this._mockMetaDataCache.get(modulePath)!, ); } - private _shouldMock(from: Config.Path, moduleName: string) { + private _shouldMock(from: Config.Path, moduleName: string): boolean { const explicitShouldMock = this._explicitShouldMock; const moduleID = this._resolver.getModuleID( - this._virtualMocks, + fromEntries(this._virtualMocks), from, moduleName, ); const key = from + path.delimiter + moduleID; - if (moduleID in explicitShouldMock) { - return explicitShouldMock[moduleID]; + if (explicitShouldMock.has(moduleID)) { + // guaranteed by `has` above + return explicitShouldMock.get(moduleID)!; } if ( !this._shouldAutoMock || this._resolver.isCoreModule(moduleName) || - this._shouldUnmockTransitiveDependenciesCache[key] + this._shouldUnmockTransitiveDependenciesCache.get(key) ) { return false; } - if (moduleID in this._shouldMockModuleCache) { - return this._shouldMockModuleCache[moduleID]; + if (this._shouldMockModuleCache.has(moduleID)) { + // guaranteed by `has` above + return this._shouldMockModuleCache.get(moduleID)!; } let modulePath; @@ -1265,35 +1281,35 @@ class Runtime { } catch (e) { const manualMock = this._resolver.getMockModule(from, moduleName); if (manualMock) { - this._shouldMockModuleCache[moduleID] = true; + this._shouldMockModuleCache.set(moduleID, true); return true; } throw e; } if (this._unmockList && this._unmockList.test(modulePath)) { - this._shouldMockModuleCache[moduleID] = false; + this._shouldMockModuleCache.set(moduleID, false); return false; } // transitive unmocking for package managers that store flat packages (npm3) const currentModuleID = this._resolver.getModuleID( - this._virtualMocks, + fromEntries(this._virtualMocks), from, ); if ( - this._transitiveShouldMock[currentModuleID] === false || + this._transitiveShouldMock.get(currentModuleID) === false || (from.includes(NODE_MODULES) && modulePath.includes(NODE_MODULES) && ((this._unmockList && this._unmockList.test(from)) || - explicitShouldMock[currentModuleID] === false)) + explicitShouldMock.get(currentModuleID) === false)) ) { - this._transitiveShouldMock[moduleID] = false; - this._shouldUnmockTransitiveDependenciesCache[key] = true; + this._transitiveShouldMock.set(moduleID, false); + this._shouldUnmockTransitiveDependenciesCache.set(key, true); return false; } - - return (this._shouldMockModuleCache[moduleID] = true); + this._shouldMockModuleCache.set(moduleID, true); + return true; } private _createRequireImplementation( @@ -1328,7 +1344,7 @@ class Runtime { } return true; }; - return new Proxy(Object.create(null), { + return new Proxy(Object.create(null), { defineProperty: notPermittedMethod, deleteProperty: notPermittedMethod, get: (_target, key) => @@ -1374,21 +1390,21 @@ class Runtime { }; const unmock = (moduleName: string) => { const moduleID = this._resolver.getModuleID( - this._virtualMocks, + fromEntries(this._virtualMocks), from, moduleName, ); - this._explicitShouldMock[moduleID] = false; + this._explicitShouldMock.set(moduleID, false); return jestObject; }; const deepUnmock = (moduleName: string) => { const moduleID = this._resolver.getModuleID( - this._virtualMocks, + fromEntries(this._virtualMocks), from, moduleName, ); - this._explicitShouldMock[moduleID] = false; - this._transitiveShouldMock[moduleID] = false; + this._explicitShouldMock.set(moduleID, false); + this._transitiveShouldMock.set(moduleID, false); return jestObject; }; const mock: Jest['mock'] = (moduleName, mockFactory, options) => { @@ -1397,11 +1413,11 @@ class Runtime { } const moduleID = this._resolver.getModuleID( - this._virtualMocks, + fromEntries(this._virtualMocks), from, moduleName, ); - this._explicitShouldMock[moduleID] = true; + this._explicitShouldMock.set(moduleID, true); return jestObject; }; const setMockFactory = ( @@ -1640,12 +1656,12 @@ class Runtime { } private readFile(filename: Config.Path): string { - let source = this._cacheFS[filename]; + let source = this._cacheFS.get(filename); if (!source) { source = fs.readFileSync(filename, 'utf8'); - this._cacheFS[filename] = source; + this._cacheFS.set(filename, source); } return source; diff --git a/tsconfig.json b/tsconfig.json index 2301b5e98b8b..a513c83fe2c2 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,7 +2,8 @@ "compilerOptions": { "target": "es2017", "module": "commonjs", - "lib": ["dom", "es2017"], + // Object.fromEntries + "lib": ["dom", "es2017", "es2019.object"], "declaration": true, "composite": true, "emitDeclarationOnly": true, From 7e37b0ff06de590efd6678db30e0ca73969dc2df Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Tue, 28 Apr 2020 20:23:52 +0200 Subject: [PATCH 007/106] fix: use graceful-fs all over instead of monkey patching fs (#9443) --- .eslintrc.js | 7 +++++++ CHANGELOG.md | 5 +---- e2e/Utils.ts | 2 +- e2e/__tests__/clearCache.test.ts | 2 +- e2e/__tests__/coverageHandlebars.test.ts | 2 +- e2e/__tests__/coverageRemapping.test.ts | 2 +- e2e/__tests__/coverageReport.test.ts | 2 +- e2e/__tests__/coverageTransformInstrumented.test.ts | 2 +- e2e/__tests__/globalSetup.test.ts | 2 +- e2e/__tests__/globalTeardown.test.ts | 2 +- e2e/__tests__/jsonReporter.test.ts | 2 +- e2e/__tests__/setupFilesAfterEnvConfig.test.ts | 2 +- e2e/__tests__/snapshot.test.ts | 2 +- e2e/__tests__/snapshotResolver.test.ts | 2 +- e2e/__tests__/testEnvironmentAsync.test.ts | 2 +- e2e/__tests__/testRetries.test.ts | 2 +- e2e/__tests__/toMatchInlineSnapshot.test.ts | 3 ++- .../toMatchSnapshotWithStringSerializer.test.ts | 2 +- .../toThrowErrorMatchingInlineSnapshot.test.ts | 2 +- e2e/__tests__/toThrowErrorMatchingSnapshot.test.ts | 2 +- e2e/native-esm/__tests__/native-esm.test.js | 2 ++ e2e/runJest.ts | 2 +- package.json | 2 +- packages/babel-jest/package.json | 4 +++- packages/babel-jest/src/index.ts | 2 +- packages/jest-circus/package.json | 4 +++- packages/jest-circus/src/__mocks__/testUtils.ts | 2 +- packages/jest-cli/package.json | 2 ++ packages/jest-cli/src/init/__tests__/init.test.js | 4 ++-- packages/jest-cli/src/init/index.ts | 2 +- packages/jest-config/package.json | 2 ++ packages/jest-config/src/__tests__/normalize.test.js | 2 +- packages/jest-config/src/index.ts | 2 +- packages/jest-config/src/normalize.ts | 2 +- .../jest-config/src/readConfigFileAndSetRootDir.ts | 2 +- packages/jest-config/src/resolveConfigPath.ts | 2 +- packages/jest-core/package.json | 2 +- packages/jest-core/src/__tests__/SearchSource.test.ts | 2 +- .../jest-core/src/__tests__/watch-file-changes.test.ts | 2 +- packages/jest-core/src/cli/index.ts | 4 ---- packages/jest-haste-map/package.json | 2 +- packages/jest-haste-map/src/__tests__/index.test.js | 1 - .../jest-haste-map/src/crawlers/__tests__/node.test.js | 6 +++--- packages/jest-haste-map/src/crawlers/node.ts | 2 +- packages/jest-haste-map/src/index.ts | 2 +- packages/jest-haste-map/src/lib/FSEventsWatcher.ts | 2 +- packages/jest-haste-map/src/lib/WatchmanWatcher.js | 2 +- packages/jest-haste-map/src/types.ts | 2 +- packages/jest-message-util/package.json | 2 ++ .../jest-message-util/src/__tests__/messages.test.ts | 4 ++-- packages/jest-message-util/src/index.ts | 2 +- packages/jest-reporters/package.json | 2 ++ .../src/__tests__/coverage_worker.test.js | 4 ++-- packages/jest-reporters/src/coverage_reporter.ts | 2 +- packages/jest-reporters/src/coverage_worker.ts | 2 +- packages/jest-reporters/src/generateEmptyCoverage.ts | 2 +- packages/jest-resolve/package.json | 2 ++ packages/jest-resolve/src/__tests__/resolve.test.ts | 2 +- packages/jest-resolve/src/defaultResolver.ts | 2 +- packages/jest-runner/package.json | 2 +- packages/jest-runtime/package.json | 2 +- packages/jest-runtime/src/cli/index.ts | 4 ---- packages/jest-serializer/package.json | 4 ++++ packages/jest-serializer/src/__tests__/index.test.ts | 4 +--- packages/jest-serializer/src/index.ts | 2 +- packages/jest-snapshot/package.json | 2 ++ packages/jest-snapshot/src/State.ts | 2 +- .../src/__tests__/inline_snapshots.test.ts | 6 +++--- packages/jest-snapshot/src/__tests__/utils.test.ts | 6 +++--- packages/jest-snapshot/src/index.ts | 2 +- packages/jest-snapshot/src/inline_snapshots.ts | 2 +- packages/jest-snapshot/src/utils.ts | 2 +- packages/jest-source-map/package.json | 2 +- .../jest-source-map/src/__tests__/getCallsite.test.ts | 6 +++--- packages/jest-test-sequencer/package.json | 4 ++++ .../src/__tests__/test_sequencer.test.js | 5 ++--- packages/jest-test-sequencer/src/index.ts | 2 +- packages/jest-transform/package.json | 2 +- .../src/__tests__/script_transformer.test.js | 2 +- packages/jest-util/package.json | 1 + packages/jest-util/src/installCommonGlobals.ts | 2 +- scripts/browserBuild.js | 1 + yarn.lock | 10 +++++----- 83 files changed, 120 insertions(+), 99 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index d04c2f900797..3594b3b18ec6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -142,6 +142,13 @@ module.exports = { // https://github.com/benmosher/eslint-plugin-import/issues/645 'import/order': 0, 'no-console': 0, + 'no-restricted-imports': [ + 2, + { + message: 'Please use graceful-fs instead.', + name: 'fs', + }, + ], 'no-unused-vars': 2, 'prettier/prettier': 2, 'sort-imports': [2, {ignoreDeclarationSort: true}], diff --git a/CHANGELOG.md b/CHANGELOG.md index d620b35ffb24..f204c42602c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ ### Fixes +- `[*]` Use `graceful-fs` directly in every package instead of relying on `fs` being monkey patched ([#9443](https://github.com/facebook/jest/pull/9443)) - `[expect]` Prints the Symbol name into the error message with a custom asymmetric matcher ([#9888](https://github.com/facebook/jest/pull/9888)) - `[jest-circus, jest-jasmine2]` Support older version of `jest-runtime` ([#9903](https://github.com/facebook/jest/pull/9903) & [#9842](https://github.com/facebook/jest/pull/9842)) - `[@jest/environment]` Make sure not to reference Jest types ([#9875](https://github.com/facebook/jest/pull/9875)) @@ -45,8 +46,6 @@ - `[*]` Do not generate TypeScript declaration source maps ([#9822](https://github.com/facebook/jest/pull/9822)) - `[*]` Transpile code for Node 8.3, not 8.0 ([#9827](https://github.com/facebook/jest/pull/9827)) -### Performance - ## 25.3.0 ### Features @@ -276,8 +275,6 @@ - `[jest-types]` Mark `InitialOptions` as `Partial` ([#8848](https://github.com/facebook/jest/pull/8848)) - `[jest-config]` Refactor `normalize` to be more type safe ([#8848](https://github.com/facebook/jest/pull/8848)) -### Performance - ## 24.9.0 ### Features diff --git a/e2e/Utils.ts b/e2e/Utils.ts index f377c53e5916..e4a93c0c07c0 100644 --- a/e2e/Utils.ts +++ b/e2e/Utils.ts @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. */ -import * as fs from 'fs'; import * as path from 'path'; +import * as fs from 'graceful-fs'; import type {Config} from '@jest/types'; // eslint-disable-next-line import/named diff --git a/e2e/__tests__/clearCache.test.ts b/e2e/__tests__/clearCache.test.ts index 859800c939d4..3f7897c0b9a4 100644 --- a/e2e/__tests__/clearCache.test.ts +++ b/e2e/__tests__/clearCache.test.ts @@ -5,9 +5,9 @@ * LICENSE file in the root directory of this source tree. */ -import * as fs from 'fs'; import {tmpdir} from 'os'; import * as path from 'path'; +import * as fs from 'graceful-fs'; import runJest from '../runJest'; const CACHE = path.resolve(tmpdir(), 'clear-cache-directory'); diff --git a/e2e/__tests__/coverageHandlebars.test.ts b/e2e/__tests__/coverageHandlebars.test.ts index 28337a9e5b9f..3e16071fceb5 100644 --- a/e2e/__tests__/coverageHandlebars.test.ts +++ b/e2e/__tests__/coverageHandlebars.test.ts @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. */ -import {readFileSync} from 'fs'; import * as path from 'path'; +import {readFileSync} from 'graceful-fs'; import wrap from 'jest-snapshot-serializer-raw'; import {cleanup, run} from '../Utils'; import runJest from '../runJest'; diff --git a/e2e/__tests__/coverageRemapping.test.ts b/e2e/__tests__/coverageRemapping.test.ts index 07172e613b77..9883f2053778 100644 --- a/e2e/__tests__/coverageRemapping.test.ts +++ b/e2e/__tests__/coverageRemapping.test.ts @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. */ -import {readFileSync} from 'fs'; import * as path from 'path'; +import {readFileSync} from 'graceful-fs'; import {cleanup, run} from '../Utils'; import runJest from '../runJest'; diff --git a/e2e/__tests__/coverageReport.test.ts b/e2e/__tests__/coverageReport.test.ts index 13765ec0dade..d59e16cb82f2 100644 --- a/e2e/__tests__/coverageReport.test.ts +++ b/e2e/__tests__/coverageReport.test.ts @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. */ -import * as fs from 'fs'; import * as path from 'path'; +import * as fs from 'graceful-fs'; import {wrap} from 'jest-snapshot-serializer-raw'; import {extractSummary, run} from '../Utils'; import runJest from '../runJest'; diff --git a/e2e/__tests__/coverageTransformInstrumented.test.ts b/e2e/__tests__/coverageTransformInstrumented.test.ts index c16b07fab5ce..7e0ff66eafb2 100644 --- a/e2e/__tests__/coverageTransformInstrumented.test.ts +++ b/e2e/__tests__/coverageTransformInstrumented.test.ts @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. */ -import {readFileSync} from 'fs'; import * as path from 'path'; +import {readFileSync} from 'graceful-fs'; import {cleanup, run} from '../Utils'; import runJest from '../runJest'; diff --git a/e2e/__tests__/globalSetup.test.ts b/e2e/__tests__/globalSetup.test.ts index 8e9a582f2ea7..106c89a17d23 100644 --- a/e2e/__tests__/globalSetup.test.ts +++ b/e2e/__tests__/globalSetup.test.ts @@ -5,9 +5,9 @@ * LICENSE file in the root directory of this source tree. */ -import * as fs from 'fs'; import {tmpdir} from 'os'; import * as path from 'path'; +import * as fs from 'graceful-fs'; import runJest, {json as runWithJson} from '../runJest'; import {cleanup, run} from '../Utils'; diff --git a/e2e/__tests__/globalTeardown.test.ts b/e2e/__tests__/globalTeardown.test.ts index b05d94cfabcd..7964048bbc70 100644 --- a/e2e/__tests__/globalTeardown.test.ts +++ b/e2e/__tests__/globalTeardown.test.ts @@ -5,9 +5,9 @@ * LICENSE file in the root directory of this source tree. */ -import * as fs from 'fs'; import {tmpdir} from 'os'; import * as path from 'path'; +import * as fs from 'graceful-fs'; import {createDirectory} from 'jest-util'; import runJest, {json as runWithJson} from '../runJest'; import {cleanup, run} from '../Utils'; diff --git a/e2e/__tests__/jsonReporter.test.ts b/e2e/__tests__/jsonReporter.test.ts index 92fb4d6cd97c..c695c0ef6882 100644 --- a/e2e/__tests__/jsonReporter.test.ts +++ b/e2e/__tests__/jsonReporter.test.ts @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. */ -import * as fs from 'fs'; import * as path from 'path'; +import * as fs from 'graceful-fs'; import type {FormattedTestResults} from '@jest/test-result'; import runJest from '../runJest'; diff --git a/e2e/__tests__/setupFilesAfterEnvConfig.test.ts b/e2e/__tests__/setupFilesAfterEnvConfig.test.ts index a5955368e2a1..a9c0b791b82b 100644 --- a/e2e/__tests__/setupFilesAfterEnvConfig.test.ts +++ b/e2e/__tests__/setupFilesAfterEnvConfig.test.ts @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. */ -import * as fs from 'fs'; import * as path from 'path'; +import * as fs from 'graceful-fs'; import {json as runWithJson} from '../runJest'; import {writeFiles} from '../Utils'; diff --git a/e2e/__tests__/snapshot.test.ts b/e2e/__tests__/snapshot.test.ts index 7cda913f7c44..5396a73b7f95 100644 --- a/e2e/__tests__/snapshot.test.ts +++ b/e2e/__tests__/snapshot.test.ts @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. */ -import * as fs from 'fs'; import * as path from 'path'; +import * as fs from 'graceful-fs'; import {wrap} from 'jest-snapshot-serializer-raw'; import {extractSummary} from '../Utils'; import runJest, {json as runWithJson} from '../runJest'; diff --git a/e2e/__tests__/snapshotResolver.test.ts b/e2e/__tests__/snapshotResolver.test.ts index f5c3a08a4b25..f94e0690ed39 100644 --- a/e2e/__tests__/snapshotResolver.test.ts +++ b/e2e/__tests__/snapshotResolver.test.ts @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. */ -import * as fs from 'fs'; import * as path from 'path'; +import * as fs from 'graceful-fs'; import runJest from '../runJest'; const snapshotDir = path.resolve( diff --git a/e2e/__tests__/testEnvironmentAsync.test.ts b/e2e/__tests__/testEnvironmentAsync.test.ts index fd0d7804ed46..114af7aae14f 100644 --- a/e2e/__tests__/testEnvironmentAsync.test.ts +++ b/e2e/__tests__/testEnvironmentAsync.test.ts @@ -5,9 +5,9 @@ * LICENSE file in the root directory of this source tree. */ -import * as fs from 'fs'; import * as path from 'path'; import {tmpdir} from 'os'; +import * as fs from 'graceful-fs'; import runJest from '../runJest'; import {cleanup} from '../Utils'; diff --git a/e2e/__tests__/testRetries.test.ts b/e2e/__tests__/testRetries.test.ts index cedf680ea0a2..c7a3587a448d 100644 --- a/e2e/__tests__/testRetries.test.ts +++ b/e2e/__tests__/testRetries.test.ts @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. */ -import * as fs from 'fs'; import * as path from 'path'; +import * as fs from 'graceful-fs'; import {skipSuiteOnJasmine} from '@jest/test-utils'; import runJest from '../runJest'; diff --git a/e2e/__tests__/toMatchInlineSnapshot.test.ts b/e2e/__tests__/toMatchInlineSnapshot.test.ts index f17ccae6f51a..228662fe6e57 100644 --- a/e2e/__tests__/toMatchInlineSnapshot.test.ts +++ b/e2e/__tests__/toMatchInlineSnapshot.test.ts @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. */ -import * as fs from 'fs'; import * as path from 'path'; +import * as fs from 'graceful-fs'; import {wrap} from 'jest-snapshot-serializer-raw'; import {cleanup, makeTemplate, writeFiles} from '../Utils'; import runJest from '../runJest'; @@ -256,6 +256,7 @@ test('handles mocking native modules prettier relies on', () => { const test = ` jest.mock('path', () => ({})); jest.mock('fs', () => ({})); + jest.mock('graceful-fs', () => ({})); test('inline snapshots', () => { expect({}).toMatchInlineSnapshot(); }); diff --git a/e2e/__tests__/toMatchSnapshotWithStringSerializer.test.ts b/e2e/__tests__/toMatchSnapshotWithStringSerializer.test.ts index 1296b4961a69..eafcccb6527a 100644 --- a/e2e/__tests__/toMatchSnapshotWithStringSerializer.test.ts +++ b/e2e/__tests__/toMatchSnapshotWithStringSerializer.test.ts @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. */ -import * as fs from 'fs'; import * as path from 'path'; +import * as fs from 'graceful-fs'; import {cleanup, makeTemplate, writeFiles} from '../Utils'; import runJest from '../runJest'; diff --git a/e2e/__tests__/toThrowErrorMatchingInlineSnapshot.test.ts b/e2e/__tests__/toThrowErrorMatchingInlineSnapshot.test.ts index 0dfb598115fd..da2f419b46c6 100644 --- a/e2e/__tests__/toThrowErrorMatchingInlineSnapshot.test.ts +++ b/e2e/__tests__/toThrowErrorMatchingInlineSnapshot.test.ts @@ -6,7 +6,7 @@ */ import * as path from 'path'; -import * as fs from 'fs'; +import * as fs from 'graceful-fs'; import {wrap} from 'jest-snapshot-serializer-raw'; import {cleanup, makeTemplate, writeFiles} from '../Utils'; import runJest from '../runJest'; diff --git a/e2e/__tests__/toThrowErrorMatchingSnapshot.test.ts b/e2e/__tests__/toThrowErrorMatchingSnapshot.test.ts index ed579226a02f..de3a3010ccf7 100644 --- a/e2e/__tests__/toThrowErrorMatchingSnapshot.test.ts +++ b/e2e/__tests__/toThrowErrorMatchingSnapshot.test.ts @@ -6,7 +6,7 @@ */ import * as path from 'path'; -import * as fs from 'fs'; +import * as fs from 'graceful-fs'; import {wrap} from 'jest-snapshot-serializer-raw'; import {cleanup, makeTemplate, writeFiles} from '../Utils'; import runJest from '../runJest'; diff --git a/e2e/native-esm/__tests__/native-esm.test.js b/e2e/native-esm/__tests__/native-esm.test.js index 0603e5d67e1d..737d422d9c1c 100644 --- a/e2e/native-esm/__tests__/native-esm.test.js +++ b/e2e/native-esm/__tests__/native-esm.test.js @@ -5,6 +5,8 @@ * LICENSE file in the root directory of this source tree. */ +// the point here is that it's the node core module +// eslint-disable-next-line no-restricted-imports import {readFileSync} from 'fs'; import {createRequire} from 'module'; import {dirname, resolve} from 'path'; diff --git a/e2e/runJest.ts b/e2e/runJest.ts index 98d1a6db4128..28eda5785672 100644 --- a/e2e/runJest.ts +++ b/e2e/runJest.ts @@ -7,8 +7,8 @@ */ import * as path from 'path'; -import * as fs from 'fs'; import {Writable} from 'stream'; +import * as fs from 'graceful-fs'; import execa = require('execa'); import type {Config} from '@jest/types'; import type {FormattedTestResults} from '@jest/test-result'; diff --git a/package.json b/package.json index 8658d7699537..338d2679d898 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "find-process": "^1.4.1", "glob": "^7.1.1", "globby": "^10.0.2", - "graceful-fs": "^4.2.3", + "graceful-fs": "^4.2.4", "isbinaryfile": "^4.0.0", "istanbul-lib-coverage": "^3.0.0", "istanbul-lib-report": "^3.0.0", diff --git a/packages/babel-jest/package.json b/packages/babel-jest/package.json index a6eca647bef5..c3369ac4510d 100644 --- a/packages/babel-jest/package.json +++ b/packages/babel-jest/package.json @@ -24,10 +24,12 @@ "babel-plugin-istanbul": "^6.0.0", "babel-preset-jest": "^25.4.0", "chalk": "^3.0.0", + "graceful-fs": "^4.2.4", "slash": "^3.0.0" }, "devDependencies": { - "@babel/core": "^7.1.0" + "@babel/core": "^7.1.0", + "@types/graceful-fs": "^4.1.3" }, "peerDependencies": { "@babel/core": "^7.0.0" diff --git a/packages/babel-jest/src/index.ts b/packages/babel-jest/src/index.ts index 12d2ee07a3f6..50259e0ec2cb 100644 --- a/packages/babel-jest/src/index.ts +++ b/packages/babel-jest/src/index.ts @@ -6,8 +6,8 @@ */ import {createHash} from 'crypto'; -import * as fs from 'fs'; import * as path from 'path'; +import * as fs from 'graceful-fs'; import type { TransformOptions as JestTransformOptions, Transformer, diff --git a/packages/jest-circus/package.json b/packages/jest-circus/package.json index da9d3547d944..3b365c63e79c 100644 --- a/packages/jest-circus/package.json +++ b/packages/jest-circus/package.json @@ -41,8 +41,10 @@ "@jest/test-utils": "^25.3.0", "@types/babel__traverse": "^7.0.4", "@types/co": "^4.6.0", + "@types/graceful-fs": "^4.1.3", "@types/stack-utils": "^1.0.1", - "execa": "^3.2.0" + "execa": "^3.2.0", + "graceful-fs": "^4.2.4" }, "engines": { "node": ">= 8.3" diff --git a/packages/jest-circus/src/__mocks__/testUtils.ts b/packages/jest-circus/src/__mocks__/testUtils.ts index 4a26fc4a2907..eb2c1d007466 100644 --- a/packages/jest-circus/src/__mocks__/testUtils.ts +++ b/packages/jest-circus/src/__mocks__/testUtils.ts @@ -5,10 +5,10 @@ * LICENSE file in the root directory of this source tree. */ -import * as fs from 'fs'; import {tmpdir} from 'os'; import * as path from 'path'; import {createHash} from 'crypto'; +import * as fs from 'graceful-fs'; // eslint-disable-next-line import/named import {ExecaSyncReturnValue, sync as spawnSync} from 'execa'; import {skipSuiteOnWindows} from '@jest/test-utils'; diff --git a/packages/jest-cli/package.json b/packages/jest-cli/package.json index f556af3d0144..084c2bb7ab89 100644 --- a/packages/jest-cli/package.json +++ b/packages/jest-cli/package.json @@ -17,6 +17,7 @@ "@jest/types": "^25.4.0", "chalk": "^3.0.0", "exit": "^0.1.2", + "graceful-fs": "^4.2.4", "import-local": "^3.0.2", "is-ci": "^2.0.0", "jest-config": "^25.4.0", @@ -30,6 +31,7 @@ "@jest/test-utils": "^25.3.0", "@types/exit": "^0.1.30", "@types/is-ci": "^2.0.0", + "@types/graceful-fs": "^4.1.3", "@types/prompts": "^2.0.1", "@types/yargs": "^15.0.0" }, diff --git a/packages/jest-cli/src/init/__tests__/init.test.js b/packages/jest-cli/src/init/__tests__/init.test.js index 874a6d958c75..579ab04f24fc 100644 --- a/packages/jest-cli/src/init/__tests__/init.test.js +++ b/packages/jest-cli/src/init/__tests__/init.test.js @@ -6,8 +6,8 @@ */ /* eslint-disable no-eval */ -import * as fs from 'fs'; import * as path from 'path'; +import * as fs from 'graceful-fs'; import prompts from 'prompts'; import {constants} from 'jest-config'; import init from '../'; @@ -19,7 +19,7 @@ jest.mock('../../../../jest-config/build/getCacheDirectory', () => () => '/tmp/jest', ); jest.mock('path', () => ({...jest.requireActual('path'), sep: '/'})); -jest.mock('fs', () => ({ +jest.mock('graceful-fs', () => ({ ...jest.requireActual('fs'), writeFileSync: jest.fn(), })); diff --git a/packages/jest-cli/src/init/index.ts b/packages/jest-cli/src/init/index.ts index 5f732534af27..b2503fc901f3 100644 --- a/packages/jest-cli/src/init/index.ts +++ b/packages/jest-cli/src/init/index.ts @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. */ -import * as fs from 'fs'; import * as path from 'path'; +import * as fs from 'graceful-fs'; import chalk = require('chalk'); import prompts = require('prompts'); import {sync as realpath} from 'realpath-native'; diff --git a/packages/jest-config/package.json b/packages/jest-config/package.json index 7cf920caf17f..50a2fd5a8e1d 100644 --- a/packages/jest-config/package.json +++ b/packages/jest-config/package.json @@ -24,6 +24,7 @@ "chalk": "^3.0.0", "deepmerge": "^4.2.2", "glob": "^7.1.1", + "graceful-fs": "^4.2.4", "jest-environment-jsdom": "^25.4.0", "jest-environment-node": "^25.4.0", "jest-get-type": "^25.2.6", @@ -39,6 +40,7 @@ "devDependencies": { "@types/babel__core": "^7.0.4", "@types/glob": "^7.1.1", + "@types/graceful-fs": "^4.1.3", "@types/micromatch": "^4.0.0" }, "engines": { diff --git a/packages/jest-config/src/__tests__/normalize.test.js b/packages/jest-config/src/__tests__/normalize.test.js index ee4a6658f112..4022b2baec66 100644 --- a/packages/jest-config/src/__tests__/normalize.test.js +++ b/packages/jest-config/src/__tests__/normalize.test.js @@ -19,7 +19,7 @@ const DEFAULT_CSS_PATTERN = '^.+\\.(css)$'; jest .mock('jest-resolve') .mock('path', () => jest.requireActual('path').posix) - .mock('fs', () => { + .mock('graceful-fs', () => { const realFs = jest.requireActual('fs'); return { diff --git a/packages/jest-config/src/index.ts b/packages/jest-config/src/index.ts index 85b6e34546d8..0331c2d23379 100644 --- a/packages/jest-config/src/index.ts +++ b/packages/jest-config/src/index.ts @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. */ -import * as fs from 'fs'; import * as path from 'path'; +import * as fs from 'graceful-fs'; import type {Config} from '@jest/types'; import chalk = require('chalk'); import {sync as realpath} from 'realpath-native'; diff --git a/packages/jest-config/src/normalize.ts b/packages/jest-config/src/normalize.ts index fb56b9864e26..4cff07d83bc8 100644 --- a/packages/jest-config/src/normalize.ts +++ b/packages/jest-config/src/normalize.ts @@ -6,8 +6,8 @@ */ import {createHash} from 'crypto'; -import {statSync} from 'fs'; import * as path from 'path'; +import {statSync} from 'graceful-fs'; import {sync as glob} from 'glob'; import type {Config} from '@jest/types'; import {ValidationError, validate} from 'jest-validate'; diff --git a/packages/jest-config/src/readConfigFileAndSetRootDir.ts b/packages/jest-config/src/readConfigFileAndSetRootDir.ts index 867c553b3019..c1d0242efcbc 100644 --- a/packages/jest-config/src/readConfigFileAndSetRootDir.ts +++ b/packages/jest-config/src/readConfigFileAndSetRootDir.ts @@ -6,7 +6,7 @@ */ import * as path from 'path'; -import * as fs from 'fs'; +import * as fs from 'graceful-fs'; import type {Config} from '@jest/types'; // @ts-ignore: vendored import jsonlint from './vendor/jsonlint'; diff --git a/packages/jest-config/src/resolveConfigPath.ts b/packages/jest-config/src/resolveConfigPath.ts index 52eed9a07e5c..dc8655513858 100644 --- a/packages/jest-config/src/resolveConfigPath.ts +++ b/packages/jest-config/src/resolveConfigPath.ts @@ -6,7 +6,7 @@ */ import * as path from 'path'; -import * as fs from 'fs'; +import * as fs from 'graceful-fs'; import type {Config} from '@jest/types'; import { JEST_CONFIG_BASE_NAME, diff --git a/packages/jest-core/package.json b/packages/jest-core/package.json index 19a6c5d804b8..90cf157dac3b 100644 --- a/packages/jest-core/package.json +++ b/packages/jest-core/package.json @@ -20,7 +20,7 @@ "ansi-escapes": "^4.2.1", "chalk": "^3.0.0", "exit": "^0.1.2", - "graceful-fs": "^4.2.3", + "graceful-fs": "^4.2.4", "jest-changed-files": "^25.4.0", "jest-config": "^25.4.0", "jest-haste-map": "^25.4.0", diff --git a/packages/jest-core/src/__tests__/SearchSource.test.ts b/packages/jest-core/src/__tests__/SearchSource.test.ts index 0a6815062c85..5a92a31d8bc8 100644 --- a/packages/jest-core/src/__tests__/SearchSource.test.ts +++ b/packages/jest-core/src/__tests__/SearchSource.test.ts @@ -15,7 +15,7 @@ import SearchSource, {SearchResult} from '../SearchSource'; jest.setTimeout(15000); -jest.mock('fs', () => { +jest.mock('graceful-fs', () => { const realFs = jest.requireActual('fs'); return { diff --git a/packages/jest-core/src/__tests__/watch-file-changes.test.ts b/packages/jest-core/src/__tests__/watch-file-changes.test.ts index be0f3c97760c..17ed2fc5c370 100644 --- a/packages/jest-core/src/__tests__/watch-file-changes.test.ts +++ b/packages/jest-core/src/__tests__/watch-file-changes.test.ts @@ -7,8 +7,8 @@ */ import * as path from 'path'; -import * as fs from 'fs'; import {tmpdir} from 'os'; +import * as fs from 'graceful-fs'; import {JestHook} from 'jest-watcher'; import Runtime = require('jest-runtime'); import {normalize} from 'jest-config'; diff --git a/packages/jest-core/src/cli/index.ts b/packages/jest-core/src/cli/index.ts index 9faffd0dcc15..dd8b469e7624 100644 --- a/packages/jest-core/src/cli/index.ts +++ b/packages/jest-core/src/cli/index.ts @@ -38,10 +38,6 @@ export async function runCLI( results: AggregatedResult; globalConfig: Config.GlobalConfig; }> { - const realFs = require('fs'); - const fs = require('graceful-fs'); - fs.gracefulify(realFs); - let results: AggregatedResult | undefined; // If we output a JSON object, we can't write anything to stdout, since diff --git a/packages/jest-haste-map/package.json b/packages/jest-haste-map/package.json index 8d8db4832b20..7546dd48cb71 100644 --- a/packages/jest-haste-map/package.json +++ b/packages/jest-haste-map/package.json @@ -20,7 +20,7 @@ "@jest/types": "^25.4.0", "anymatch": "^3.0.3", "fb-watchman": "^2.0.0", - "graceful-fs": "^4.2.3", + "graceful-fs": "^4.2.4", "jest-serializer": "^25.2.6", "jest-util": "^25.4.0", "jest-worker": "^25.4.0", diff --git a/packages/jest-haste-map/src/__tests__/index.test.js b/packages/jest-haste-map/src/__tests__/index.test.js index fee7fce17ff9..ebd189b385ac 100644 --- a/packages/jest-haste-map/src/__tests__/index.test.js +++ b/packages/jest-haste-map/src/__tests__/index.test.js @@ -105,7 +105,6 @@ jest.mock('graceful-fs', () => ({ mockFs[path] = data; }), })); -jest.mock('fs', () => require('graceful-fs')); const cacheFilePath = '/cache-file'; const object = data => Object.assign(Object.create(null), data); diff --git a/packages/jest-haste-map/src/crawlers/__tests__/node.test.js b/packages/jest-haste-map/src/crawlers/__tests__/node.test.js index 863ecb8c4ad2..c972f0da6dd1 100644 --- a/packages/jest-haste-map/src/crawlers/__tests__/node.test.js +++ b/packages/jest-haste-map/src/crawlers/__tests__/node.test.js @@ -33,7 +33,7 @@ jest.mock('child_process', () => ({ let mockHasReaddirWithFileTypesSupport = false; -jest.mock('fs', () => { +jest.mock('graceful-fs', () => { let mtime = 32; const size = 42; const stat = (path, callback) => { @@ -384,7 +384,7 @@ describe('node crawler', () => { describe('readdir withFileTypes support', () => { it('calls lstat for directories and symlinks if readdir withFileTypes is not supported', () => { nodeCrawl = require('../node'); - const fs = require('fs'); + const fs = require('graceful-fs'); const files = new Map(); return nodeCrawl({ @@ -416,7 +416,7 @@ describe('node crawler', () => { it('avoids calling lstat for directories and symlinks if readdir withFileTypes is supported', () => { mockHasReaddirWithFileTypesSupport = true; nodeCrawl = require('../node'); - const fs = require('fs'); + const fs = require('graceful-fs'); const files = new Map(); return nodeCrawl({ diff --git a/packages/jest-haste-map/src/crawlers/node.ts b/packages/jest-haste-map/src/crawlers/node.ts index c8254bd36361..0266816d91fb 100644 --- a/packages/jest-haste-map/src/crawlers/node.ts +++ b/packages/jest-haste-map/src/crawlers/node.ts @@ -5,9 +5,9 @@ * LICENSE file in the root directory of this source tree. */ -import * as fs from 'fs'; import * as path from 'path'; import {spawn} from 'child_process'; +import * as fs from 'graceful-fs'; import which = require('which'); import H from '../constants'; import * as fastPath from '../lib/fast_path'; diff --git a/packages/jest-haste-map/src/index.ts b/packages/jest-haste-map/src/index.ts index 5a0fbe7b96f8..866a06a1b140 100644 --- a/packages/jest-haste-map/src/index.ts +++ b/packages/jest-haste-map/src/index.ts @@ -8,9 +8,9 @@ import {execSync} from 'child_process'; import {createHash} from 'crypto'; import {EventEmitter} from 'events'; -import type {Stats} from 'fs'; import {tmpdir} from 'os'; import * as path from 'path'; +import type {Stats} from 'graceful-fs'; import {NodeWatcher, Watcher as SaneWatcher} from 'sane'; import type {Config} from '@jest/types'; import serializer from 'jest-serializer'; diff --git a/packages/jest-haste-map/src/lib/FSEventsWatcher.ts b/packages/jest-haste-map/src/lib/FSEventsWatcher.ts index f41305b1cd31..5cac36f02133 100644 --- a/packages/jest-haste-map/src/lib/FSEventsWatcher.ts +++ b/packages/jest-haste-map/src/lib/FSEventsWatcher.ts @@ -6,9 +6,9 @@ * */ -import * as fs from 'fs'; import * as path from 'path'; import {EventEmitter} from 'events'; +import * as fs from 'graceful-fs'; import anymatch, {Matcher} from 'anymatch'; import micromatch = require('micromatch'); // @ts-ignore no types diff --git a/packages/jest-haste-map/src/lib/WatchmanWatcher.js b/packages/jest-haste-map/src/lib/WatchmanWatcher.js index adce679cdf08..5f10a750684f 100644 --- a/packages/jest-haste-map/src/lib/WatchmanWatcher.js +++ b/packages/jest-haste-map/src/lib/WatchmanWatcher.js @@ -5,10 +5,10 @@ * LICENSE file in the root directory of this source tree. */ -import fs from 'fs'; import path from 'path'; import assert from 'assert'; import {EventEmitter} from 'events'; +import * as fs from 'graceful-fs'; import watchman from 'fb-watchman'; import common from 'sane/src/common'; import RecrawlWarning from 'sane/src/utils/recrawl-warning-dedupe'; diff --git a/packages/jest-haste-map/src/types.ts b/packages/jest-haste-map/src/types.ts index 953b2ecc9858..6d09b1fdc182 100644 --- a/packages/jest-haste-map/src/types.ts +++ b/packages/jest-haste-map/src/types.ts @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import type {Stats} from 'fs'; +import type {Stats} from 'graceful-fs'; import type {Config} from '@jest/types'; import type ModuleMap from './ModuleMap'; import type HasteFS from './HasteFS'; diff --git a/packages/jest-message-util/package.json b/packages/jest-message-util/package.json index 4f579e9d82da..b175037ba21c 100644 --- a/packages/jest-message-util/package.json +++ b/packages/jest-message-util/package.json @@ -24,12 +24,14 @@ "@jest/types": "^25.4.0", "@types/stack-utils": "^1.0.1", "chalk": "^3.0.0", + "graceful-fs": "^4.2.4", "micromatch": "^4.0.2", "slash": "^3.0.0", "stack-utils": "^1.0.1" }, "devDependencies": { "@types/babel__code-frame": "^7.0.0", + "@types/graceful-fs": "^4.1.3", "@types/micromatch": "^4.0.0" }, "publishConfig": { diff --git a/packages/jest-message-util/src/__tests__/messages.test.ts b/packages/jest-message-util/src/__tests__/messages.test.ts index e4b3d3bf8dad..55c24797cb58 100644 --- a/packages/jest-message-util/src/__tests__/messages.test.ts +++ b/packages/jest-message-util/src/__tests__/messages.test.ts @@ -6,14 +6,14 @@ * */ -import {readFileSync} from 'fs'; +import {readFileSync} from 'graceful-fs'; import slash = require('slash'); import tempy = require('tempy'); import {formatExecError, formatResultsErrors, formatStackTrace} from '..'; const rootDir = tempy.directory(); -jest.mock('fs', () => ({ +jest.mock('graceful-fs', () => ({ ...jest.requireActual('fs'), readFileSync: jest.fn(), })); diff --git a/packages/jest-message-util/src/index.ts b/packages/jest-message-util/src/index.ts index e205c823d648..4b49f66dab5d 100644 --- a/packages/jest-message-util/src/index.ts +++ b/packages/jest-message-util/src/index.ts @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. */ -import * as fs from 'fs'; import * as path from 'path'; +import * as fs from 'graceful-fs'; import type {Config, TestResult} from '@jest/types'; import chalk = require('chalk'); import micromatch = require('micromatch'); diff --git a/packages/jest-reporters/package.json b/packages/jest-reporters/package.json index d9ca29b2bbb8..8e7e2ad053f6 100644 --- a/packages/jest-reporters/package.json +++ b/packages/jest-reporters/package.json @@ -20,6 +20,7 @@ "chalk": "^3.0.0", "collect-v8-coverage": "^1.0.0", "exit": "^0.1.2", + "graceful-fs": "^4.2.4", "glob": "^7.1.2", "istanbul-lib-coverage": "^3.0.0", "istanbul-lib-instrument": "^4.0.0", @@ -39,6 +40,7 @@ "devDependencies": { "@types/exit": "^0.1.30", "@types/glob": "^7.1.1", + "@types/graceful-fs": "^4.1.3", "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-lib-instrument": "^1.7.2", "@types/istanbul-lib-report": "^3.0.0", diff --git a/packages/jest-reporters/src/__tests__/coverage_worker.test.js b/packages/jest-reporters/src/__tests__/coverage_worker.test.js index 86cfeecb1ab3..913cf4753c9a 100644 --- a/packages/jest-reporters/src/__tests__/coverage_worker.test.js +++ b/packages/jest-reporters/src/__tests__/coverage_worker.test.js @@ -7,7 +7,7 @@ 'use strict'; -jest.mock('fs').mock('../generateEmptyCoverage'); +jest.mock('graceful-fs').mock('../generateEmptyCoverage'); const globalConfig = {collectCoverage: true}; const config = {}; @@ -20,7 +20,7 @@ let worker; beforeEach(() => { jest.resetModules(); - fs = require('fs'); + fs = require('graceful-fs'); generateEmptyCoverage = require('../generateEmptyCoverage').default; worker = require('../coverage_worker').worker; }); diff --git a/packages/jest-reporters/src/coverage_reporter.ts b/packages/jest-reporters/src/coverage_reporter.ts index 1e87c21bdbd8..5966bdde9600 100644 --- a/packages/jest-reporters/src/coverage_reporter.ts +++ b/packages/jest-reporters/src/coverage_reporter.ts @@ -6,7 +6,7 @@ */ import * as path from 'path'; -import * as fs from 'fs'; +import * as fs from 'graceful-fs'; import type {Config} from '@jest/types'; import type { AggregatedResult, diff --git a/packages/jest-reporters/src/coverage_worker.ts b/packages/jest-reporters/src/coverage_worker.ts index d1894b97574c..f40c1aadc3d4 100644 --- a/packages/jest-reporters/src/coverage_worker.ts +++ b/packages/jest-reporters/src/coverage_worker.ts @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import * as fs from 'fs'; +import * as fs from 'graceful-fs'; import type {Config} from '@jest/types'; import exit = require('exit'); import type {CoverageReporterSerializedOptions} from './types'; diff --git a/packages/jest-reporters/src/generateEmptyCoverage.ts b/packages/jest-reporters/src/generateEmptyCoverage.ts index 38f184d61558..e4f35e7c02cf 100644 --- a/packages/jest-reporters/src/generateEmptyCoverage.ts +++ b/packages/jest-reporters/src/generateEmptyCoverage.ts @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import * as fs from 'fs'; +import * as fs from 'graceful-fs'; import type {Config} from '@jest/types'; import {readInitialCoverage} from 'istanbul-lib-instrument'; import {FileCoverage, createFileCoverage} from 'istanbul-lib-coverage'; diff --git a/packages/jest-resolve/package.json b/packages/jest-resolve/package.json index 7dc336af75c3..6cf9500d1bd8 100644 --- a/packages/jest-resolve/package.json +++ b/packages/jest-resolve/package.json @@ -20,6 +20,7 @@ "@jest/types": "^25.4.0", "browser-resolve": "^1.11.3", "chalk": "^3.0.0", + "graceful-fs": "^4.2.4", "jest-pnp-resolver": "^1.2.1", "read-pkg-up": "^7.0.1", "realpath-native": "^2.0.0", @@ -28,6 +29,7 @@ }, "devDependencies": { "@types/browser-resolve": "^1.11.0", + "@types/graceful-fs": "^4.1.3", "@types/resolve": "^1.14.0", "jest-haste-map": "^25.4.0" }, diff --git a/packages/jest-resolve/src/__tests__/resolve.test.ts b/packages/jest-resolve/src/__tests__/resolve.test.ts index 9e5499c5832f..a1f7f49a865b 100644 --- a/packages/jest-resolve/src/__tests__/resolve.test.ts +++ b/packages/jest-resolve/src/__tests__/resolve.test.ts @@ -6,8 +6,8 @@ * */ -import * as fs from 'fs'; import * as path from 'path'; +import * as fs from 'graceful-fs'; import {ModuleMap} from 'jest-haste-map'; import Resolver = require('../'); // @ts-ignore: js file diff --git a/packages/jest-resolve/src/defaultResolver.ts b/packages/jest-resolve/src/defaultResolver.ts index 0e20699364ba..e66a74036a3f 100644 --- a/packages/jest-resolve/src/defaultResolver.ts +++ b/packages/jest-resolve/src/defaultResolver.ts @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import * as fs from 'fs'; +import * as fs from 'graceful-fs'; import {sync as resolveSync} from 'resolve'; import {sync as browserResolve} from 'browser-resolve'; import {sync as realpath} from 'realpath-native'; diff --git a/packages/jest-runner/package.json b/packages/jest-runner/package.json index 87c46de216ca..fcd5c6cb1b26 100644 --- a/packages/jest-runner/package.json +++ b/packages/jest-runner/package.json @@ -23,7 +23,7 @@ "@jest/types": "^25.4.0", "chalk": "^3.0.0", "exit": "^0.1.2", - "graceful-fs": "^4.2.3", + "graceful-fs": "^4.2.4", "jest-config": "^25.4.0", "jest-docblock": "^25.3.0", "jest-haste-map": "^25.4.0", diff --git a/packages/jest-runtime/package.json b/packages/jest-runtime/package.json index 856194f2d8fc..af984cb9770b 100644 --- a/packages/jest-runtime/package.json +++ b/packages/jest-runtime/package.json @@ -29,7 +29,7 @@ "collect-v8-coverage": "^1.0.0", "exit": "^0.1.2", "glob": "^7.1.3", - "graceful-fs": "^4.2.3", + "graceful-fs": "^4.2.4", "jest-config": "^25.4.0", "jest-haste-map": "^25.4.0", "jest-message-util": "^25.4.0", diff --git a/packages/jest-runtime/src/cli/index.ts b/packages/jest-runtime/src/cli/index.ts index 1214fdebea5b..099373e2f67c 100644 --- a/packages/jest-runtime/src/cli/index.ts +++ b/packages/jest-runtime/src/cli/index.ts @@ -24,10 +24,6 @@ export async function run( cliArgv?: Config.Argv, cliInfo?: Array, ): Promise { - const realFs = require('fs'); - const fs = require('graceful-fs'); - fs.gracefulify(realFs); - let argv; if (cliArgv) { argv = cliArgv; diff --git a/packages/jest-serializer/package.json b/packages/jest-serializer/package.json index ae4bd8ec7703..33d59529d280 100644 --- a/packages/jest-serializer/package.json +++ b/packages/jest-serializer/package.json @@ -7,8 +7,12 @@ "directory": "packages/jest-serializer" }, "devDependencies": { + "@types/graceful-fs": "^4.1.3", "@types/node": "*" }, + "dependencies": { + "graceful-fs": "^4.2.4" + }, "engines": { "node": ">= 8.3" }, diff --git a/packages/jest-serializer/src/__tests__/index.test.ts b/packages/jest-serializer/src/__tests__/index.test.ts index f27a68911932..45a6951315a8 100644 --- a/packages/jest-serializer/src/__tests__/index.test.ts +++ b/packages/jest-serializer/src/__tests__/index.test.ts @@ -5,11 +5,9 @@ * LICENSE file in the root directory of this source tree. */ -'use strict'; - -import * as fs from 'fs'; import {tmpdir} from 'os'; import * as path from 'path'; +import * as fs from 'graceful-fs'; import prettyFormat = require('pretty-format'); import serializer from '..'; diff --git a/packages/jest-serializer/src/index.ts b/packages/jest-serializer/src/index.ts index 4483f5b45f7d..8f6bd7a9913d 100644 --- a/packages/jest-serializer/src/index.ts +++ b/packages/jest-serializer/src/index.ts @@ -7,8 +7,8 @@ // TODO: Remove this /// -import * as fs from 'fs'; import {deserialize as v8Deserialize, serialize as v8Serialize} from 'v8'; +import * as fs from 'graceful-fs'; type Path = string; diff --git a/packages/jest-snapshot/package.json b/packages/jest-snapshot/package.json index 7082f7ee0e96..0bba3bb1cd09 100644 --- a/packages/jest-snapshot/package.json +++ b/packages/jest-snapshot/package.json @@ -22,6 +22,7 @@ "@types/prettier": "^1.19.0", "chalk": "^3.0.0", "expect": "^25.4.0", + "graceful-fs": "^4.2.4", "jest-diff": "^25.4.0", "jest-get-type": "^25.2.6", "jest-matcher-utils": "^25.4.0", @@ -34,6 +35,7 @@ }, "devDependencies": { "@babel/traverse": "^7.3.4", + "@types/graceful-fs": "^4.1.3", "@types/natural-compare": "^1.4.0", "@types/semver": "^6.0.1", "ansi-regex": "^5.0.0", diff --git a/packages/jest-snapshot/src/State.ts b/packages/jest-snapshot/src/State.ts index 8e7824bc15c4..8cdfd52b817b 100644 --- a/packages/jest-snapshot/src/State.ts +++ b/packages/jest-snapshot/src/State.ts @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import * as fs from 'fs'; +import * as fs from 'graceful-fs'; import type {Config} from '@jest/types'; import {getStackTraceLines, getTopFrame} from 'jest-message-util'; diff --git a/packages/jest-snapshot/src/__tests__/inline_snapshots.test.ts b/packages/jest-snapshot/src/__tests__/inline_snapshots.test.ts index ceb3ac422d8b..cf7cba34c07e 100644 --- a/packages/jest-snapshot/src/__tests__/inline_snapshots.test.ts +++ b/packages/jest-snapshot/src/__tests__/inline_snapshots.test.ts @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. */ -jest.mock('fs', () => ({ - ...jest.genMockFromModule('fs'), +jest.mock('graceful-fs', () => ({ + ...jest.genMockFromModule('fs'), existsSync: jest.fn().mockReturnValue(true), readdirSync: jest.fn().mockReturnValue([]), statSync: jest.fn(filePath => ({ @@ -15,8 +15,8 @@ jest.mock('fs', () => ({ })); jest.mock('prettier'); -import * as fs from 'fs'; import * as path from 'path'; +import * as fs from 'graceful-fs'; import prettier from 'prettier'; import babelTraverse from '@babel/traverse'; import {Frame} from 'jest-message-util'; diff --git a/packages/jest-snapshot/src/__tests__/utils.test.ts b/packages/jest-snapshot/src/__tests__/utils.test.ts index df0845440f49..6f00aed6c0c4 100644 --- a/packages/jest-snapshot/src/__tests__/utils.test.ts +++ b/packages/jest-snapshot/src/__tests__/utils.test.ts @@ -5,13 +5,13 @@ * LICENSE file in the root directory of this source tree. */ -jest.mock('fs', () => ({ - ...jest.genMockFromModule('fs'), +jest.mock('graceful-fs', () => ({ + ...jest.genMockFromModule('fs'), existsSync: jest.fn().mockReturnValue(true), })); -import * as fs from 'fs'; import * as path from 'path'; +import * as fs from 'graceful-fs'; import assert = require('assert'); import chalk = require('chalk'); diff --git a/packages/jest-snapshot/src/index.ts b/packages/jest-snapshot/src/index.ts index a1edaaa8da49..2fed614d7d53 100644 --- a/packages/jest-snapshot/src/index.ts +++ b/packages/jest-snapshot/src/index.ts @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import * as fs from 'fs'; +import * as fs from 'graceful-fs'; import type {Config} from '@jest/types'; import type {FS as HasteFS} from 'jest-haste-map'; diff --git a/packages/jest-snapshot/src/inline_snapshots.ts b/packages/jest-snapshot/src/inline_snapshots.ts index 83691b63ed08..9ed55f8ae0c0 100644 --- a/packages/jest-snapshot/src/inline_snapshots.ts +++ b/packages/jest-snapshot/src/inline_snapshots.ts @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. */ -import * as fs from 'fs'; import * as path from 'path'; +import * as fs from 'graceful-fs'; import semver = require('semver'); import { CallExpression, diff --git a/packages/jest-snapshot/src/utils.ts b/packages/jest-snapshot/src/utils.ts index 0b75df741b8e..d1ef478e7fbf 100644 --- a/packages/jest-snapshot/src/utils.ts +++ b/packages/jest-snapshot/src/utils.ts @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. */ -import * as fs from 'fs'; import * as path from 'path'; +import * as fs from 'graceful-fs'; import makeDir = require('make-dir'); import naturalCompare = require('natural-compare'); import chalk = require('chalk'); diff --git a/packages/jest-source-map/package.json b/packages/jest-source-map/package.json index 35dd3a4b03c5..b3ef5b168916 100644 --- a/packages/jest-source-map/package.json +++ b/packages/jest-source-map/package.json @@ -18,7 +18,7 @@ }, "dependencies": { "callsites": "^3.0.0", - "graceful-fs": "^4.2.3", + "graceful-fs": "^4.2.4", "source-map": "^0.6.0" }, "devDependencies": { diff --git a/packages/jest-source-map/src/__tests__/getCallsite.test.ts b/packages/jest-source-map/src/__tests__/getCallsite.test.ts index 0de9b483bc64..c8bdf09eb76c 100644 --- a/packages/jest-source-map/src/__tests__/getCallsite.test.ts +++ b/packages/jest-source-map/src/__tests__/getCallsite.test.ts @@ -5,13 +5,13 @@ * LICENSE file in the root directory of this source tree. */ -import * as fs from 'fs'; +import * as fs from 'graceful-fs'; import SourceMap from 'source-map'; import getCallsite from '../getCallsite'; // Node 10.5.x compatibility -jest.mock('fs', () => ({ - ...jest.genMockFromModule('fs'), +jest.mock('graceful-fs', () => ({ + ...jest.genMockFromModule('fs'), ReadStream: jest.requireActual('fs').ReadStream, WriteStream: jest.requireActual('fs').WriteStream, })); diff --git a/packages/jest-test-sequencer/package.json b/packages/jest-test-sequencer/package.json index 167fe0758485..118532b461f6 100644 --- a/packages/jest-test-sequencer/package.json +++ b/packages/jest-test-sequencer/package.json @@ -18,10 +18,14 @@ }, "dependencies": { "@jest/test-result": "^25.4.0", + "graceful-fs": "^4.2.4", "jest-haste-map": "^25.4.0", "jest-runner": "^25.4.0", "jest-runtime": "^25.4.0" }, + "devDependencies": { + "@types/graceful-fs": "^4.1.3" + }, "engines": { "node": ">= 8.3" }, diff --git a/packages/jest-test-sequencer/src/__tests__/test_sequencer.test.js b/packages/jest-test-sequencer/src/__tests__/test_sequencer.test.js index 005338de0063..4239f37bd8da 100644 --- a/packages/jest-test-sequencer/src/__tests__/test_sequencer.test.js +++ b/packages/jest-test-sequencer/src/__tests__/test_sequencer.test.js @@ -4,13 +4,12 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ -'use strict'; -import * as fs from 'fs'; import * as path from 'path'; +import * as fs from 'graceful-fs'; import TestSequencer from '../index'; -jest.mock('fs', () => ({ +jest.mock('graceful-fs', () => ({ ...jest.genMockFromModule('fs'), existsSync: jest.fn(() => true), readFileSync: jest.fn(() => '{}'), diff --git a/packages/jest-test-sequencer/src/index.ts b/packages/jest-test-sequencer/src/index.ts index 286188126d30..26b45976311e 100644 --- a/packages/jest-test-sequencer/src/index.ts +++ b/packages/jest-test-sequencer/src/index.ts @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import * as fs from 'fs'; +import * as fs from 'graceful-fs'; import type {AggregatedResult} from '@jest/test-result'; import {getCacheFilePath} from 'jest-haste-map'; import type {Context} from 'jest-runtime'; diff --git a/packages/jest-transform/package.json b/packages/jest-transform/package.json index d3e250138097..034b2e09d5ae 100644 --- a/packages/jest-transform/package.json +++ b/packages/jest-transform/package.json @@ -23,7 +23,7 @@ "chalk": "^3.0.0", "convert-source-map": "^1.4.0", "fast-json-stable-stringify": "^2.0.0", - "graceful-fs": "^4.2.3", + "graceful-fs": "^4.2.4", "jest-haste-map": "^25.4.0", "jest-regex-util": "^25.2.6", "jest-util": "^25.4.0", diff --git a/packages/jest-transform/src/__tests__/script_transformer.test.js b/packages/jest-transform/src/__tests__/script_transformer.test.js index b6570ee1c404..6479bc62e1ce 100644 --- a/packages/jest-transform/src/__tests__/script_transformer.test.js +++ b/packages/jest-transform/src/__tests__/script_transformer.test.js @@ -10,7 +10,7 @@ import {wrap} from 'jest-snapshot-serializer-raw'; import {makeGlobalConfig, makeProjectConfig} from '../../../../TestUtils'; jest - .mock('fs', () => + .mock('graceful-fs', () => // Node 10.5.x compatibility ({ ...jest.genMockFromModule('fs'), diff --git a/packages/jest-util/package.json b/packages/jest-util/package.json index 0123d0e4d56d..2348fcb9be09 100644 --- a/packages/jest-util/package.json +++ b/packages/jest-util/package.json @@ -19,6 +19,7 @@ "dependencies": { "@jest/types": "^25.4.0", "chalk": "^3.0.0", + "graceful-fs": "^4.2.4", "is-ci": "^2.0.0", "make-dir": "^3.0.0" }, diff --git a/packages/jest-util/src/installCommonGlobals.ts b/packages/jest-util/src/installCommonGlobals.ts index bd8d3bce4077..e711df3ae2c4 100644 --- a/packages/jest-util/src/installCommonGlobals.ts +++ b/packages/jest-util/src/installCommonGlobals.ts @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import * as fs from 'fs'; +import * as fs from 'graceful-fs'; import type {Config} from '@jest/types'; import createProcessObject from './createProcessObject'; import deepCyclicCopy from './deepCyclicCopy'; diff --git a/scripts/browserBuild.js b/scripts/browserBuild.js index 4c3257380c71..6e35147a9dd6 100644 --- a/scripts/browserBuild.js +++ b/scripts/browserBuild.js @@ -64,6 +64,7 @@ function browserBuild(pkgName, entryPath, destination) { __dirname, '../packages/expect/build/fakeChalk.js', ), + 'graceful-fs': 'fs', }, extensions: ['.js', '.json', '.ts'], }, diff --git a/yarn.lock b/yarn.lock index 9ca11d8bef55..253db2b1ef97 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2332,7 +2332,7 @@ "@types/minimatch" "*" "@types/node" "*" -"@types/graceful-fs@^4.1.2": +"@types/graceful-fs@^4.1.2", "@types/graceful-fs@^4.1.3": version "4.1.3" resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.3.tgz#039af35fe26bec35003e8d86d2ee9c586354348f" integrity sha512-AiHRaEB50LQg0pZmm659vNBb9f4SJ0qrAnteuzhSeAUcJKxoYgEnprg/83kppCnc2zvtCKbdZry1a5pVY3lOTQ== @@ -7479,10 +7479,10 @@ got@^8.3.1: url-parse-lax "^3.0.0" url-to-options "^1.0.1" -graceful-fs@^4.1.10, graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.3, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0, graceful-fs@^4.2.2, graceful-fs@^4.2.3: - version "4.2.3" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.3.tgz#4a12ff1b60376ef09862c2093edd908328be8423" - integrity sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ== +graceful-fs@^4.1.10, graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.3, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0, graceful-fs@^4.2.2, graceful-fs@^4.2.4: + version "4.2.4" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" + integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== "graceful-readlink@>= 1.0.0": version "1.0.1" From 13d6194c7f92d65a42aee012b1cf8eb6513b9472 Mon Sep 17 00:00:00 2001 From: Ivan V <390700+ivandotv@users.noreply.github.com> Date: Tue, 28 Apr 2020 20:41:53 +0200 Subject: [PATCH 008/106] Add an example for mocking non-default module export class (#9883) --- CHANGELOG.md | 2 ++ docs/Es6ClassMocks.md | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f204c42602c7..5e3c4bf5ca58 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,8 @@ ### Chore & Maintenance +- `[docs]` Add an example for mocking non-default export class + ### Performance - `[jest-resolve]` Update `resolve` to a version using native `realpath`, which is faster than the default JS implementation ([#9872](https://github.com/facebook/jest/pull/9872)) diff --git a/docs/Es6ClassMocks.md b/docs/Es6ClassMocks.md index 06209155e304..e541e5c9b334 100644 --- a/docs/Es6ClassMocks.md +++ b/docs/Es6ClassMocks.md @@ -262,6 +262,22 @@ jest.mock('./sound-player', () => { This will let us inspect usage of our mocked class, using `SoundPlayer.mock.calls`: `expect(SoundPlayer).toHaveBeenCalled();` or near-equivalent: `expect(SoundPlayer.mock.calls.length).toEqual(1);` +### Mocking non default class exports + +If the class is **not** the default export from the module then you need to return an object with the key that is the same as the class export name. + +```javascript +import {SoundPlayer} from './sound-player'; +jest.mock('./sound-player', () => { + // Works and lets you check for constructor calls: + return { + SoundPlayer: jest.fn().mockImplementation(() => { + return {playSoundFile: () => {}}; + }), + }; +}); +``` + ### Spying on methods of our class Our mocked class will need to provide any member functions (`playSoundFile` in the example) that will be called during our tests, or else we'll get an error for calling a function that doesn't exist. But we'll probably want to also spy on calls to those methods, to ensure that they were called with the expected parameters. From edf63d89cec7088a31ff9ffff73f18c7398a5f5f Mon Sep 17 00:00:00 2001 From: Jakub Semik Date: Tue, 28 Apr 2020 21:17:11 +0200 Subject: [PATCH 009/106] Make it easier to copy just one badge code (#9313) --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 066adbc21f87..c2333f2951a6 100644 --- a/README.md +++ b/README.md @@ -207,8 +207,10 @@ Learn more about using [Jest on the official site!](https://jestjs.io) Show the world you're using _Jest_ `→` [![tested with jest](https://img.shields.io/badge/tested_with-jest-99424f.svg)](https://github.com/facebook/jest) [![jest](https://jestjs.io/img/jest-badge.svg)](https://github.com/facebook/jest) + ```md -[![tested with jest](https://img.shields.io/badge/tested_with-jest-99424f.svg)](https://github.com/facebook/jest) [![jest](https://jestjs.io/img/jest-badge.svg)](https://github.com/facebook/jest) +[![tested with jest](https://img.shields.io/badge/tested_with-jest-99424f.svg)](https://github.com/facebook/jest) +[![jest](https://jestjs.io/img/jest-badge.svg)](https://github.com/facebook/jest) ``` ## Contributing From 2379d0d69d0b2b8aa1fe0ea98bebded39301e8be Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Tue, 28 Apr 2020 21:44:18 +0200 Subject: [PATCH 010/106] chore: update changelog for release --- CHANGELOG.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e3c4bf5ca58..982052fb09c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,16 @@ ### Features +### Fixes + +### Chore & Maintenance + +### Performance + +## 24.5.0 + +### Features + - `[@jest/globals]` New package so Jest's globals can be explicitly imported ([#9801](https://github.com/facebook/jest/pull/9801)) - `[jest-core]` Show coverage of sources related to tests in changed files ([#9769](https://github.com/facebook/jest/pull/9769)) - `[jest-runtime]` Populate `require.cache` ([#9841](https://github.com/facebook/jest/pull/9841)) From ddd73d18adfb982b9b0d94bad7d41c9f78567ca7 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Tue, 28 Apr 2020 21:45:04 +0200 Subject: [PATCH 011/106] v25.5.0 --- lerna.json | 2 +- packages/babel-jest/package.json | 8 ++-- packages/babel-plugin-jest-hoist/package.json | 2 +- packages/babel-preset-jest/package.json | 4 +- packages/expect/package.json | 10 ++--- packages/jest-changed-files/package.json | 4 +- packages/jest-circus/package.json | 26 ++++++------- packages/jest-cli/package.json | 18 ++++----- packages/jest-config/package.json | 22 +++++------ packages/jest-console/package.json | 8 ++-- packages/jest-core/package.json | 38 +++++++++---------- packages/jest-diff/package.json | 6 +-- packages/jest-each/package.json | 8 ++-- packages/jest-environment-jsdom/package.json | 12 +++--- packages/jest-environment-node/package.json | 12 +++--- packages/jest-environment/package.json | 8 ++-- packages/jest-fake-timers/package.json | 10 ++--- packages/jest-globals/package.json | 8 ++-- packages/jest-haste-map/package.json | 12 +++--- packages/jest-jasmine2/package.json | 26 ++++++------- packages/jest-leak-detector/package.json | 4 +- packages/jest-matcher-utils/package.json | 8 ++-- packages/jest-message-util/package.json | 4 +- packages/jest-mock/package.json | 4 +- packages/jest-phabricator/package.json | 4 +- packages/jest-repl/package.json | 14 +++---- packages/jest-reporters/package.json | 20 +++++----- .../jest-resolve-dependencies/package.json | 12 +++--- packages/jest-resolve/package.json | 6 +-- packages/jest-runner/package.json | 30 +++++++-------- packages/jest-runtime/package.json | 36 +++++++++--------- packages/jest-serializer/package.json | 2 +- packages/jest-snapshot/package.json | 18 ++++----- packages/jest-source-map/package.json | 2 +- packages/jest-test-result/package.json | 6 +-- packages/jest-test-sequencer/package.json | 10 ++--- packages/jest-transform/package.json | 8 ++-- packages/jest-types/package.json | 2 +- packages/jest-util/package.json | 4 +- packages/jest-validate/package.json | 6 +-- packages/jest-watcher/package.json | 8 ++-- packages/jest-worker/package.json | 2 +- packages/jest/package.json | 6 +-- packages/pretty-format/package.json | 4 +- packages/test-utils/package.json | 2 +- 45 files changed, 233 insertions(+), 233 deletions(-) diff --git a/lerna.json b/lerna.json index b6e56f7c55fc..576ba357dfca 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "25.4.0", + "version": "25.5.0", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/babel-jest/package.json b/packages/babel-jest/package.json index c3369ac4510d..28b7baebac45 100644 --- a/packages/babel-jest/package.json +++ b/packages/babel-jest/package.json @@ -1,7 +1,7 @@ { "name": "babel-jest", "description": "Jest plugin to use babel for transformation.", - "version": "25.4.0", + "version": "25.5.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -18,11 +18,11 @@ } }, "dependencies": { - "@jest/transform": "^25.4.0", - "@jest/types": "^25.4.0", + "@jest/transform": "^25.5.0", + "@jest/types": "^25.5.0", "@types/babel__core": "^7.1.7", "babel-plugin-istanbul": "^6.0.0", - "babel-preset-jest": "^25.4.0", + "babel-preset-jest": "^25.5.0", "chalk": "^3.0.0", "graceful-fs": "^4.2.4", "slash": "^3.0.0" diff --git a/packages/babel-plugin-jest-hoist/package.json b/packages/babel-plugin-jest-hoist/package.json index 60c3d3757bf2..ae5ecc0fbba7 100644 --- a/packages/babel-plugin-jest-hoist/package.json +++ b/packages/babel-plugin-jest-hoist/package.json @@ -1,6 +1,6 @@ { "name": "babel-plugin-jest-hoist", - "version": "25.4.0", + "version": "25.5.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", diff --git a/packages/babel-preset-jest/package.json b/packages/babel-preset-jest/package.json index 9695bdbed32c..380d9b957ed0 100644 --- a/packages/babel-preset-jest/package.json +++ b/packages/babel-preset-jest/package.json @@ -1,6 +1,6 @@ { "name": "babel-preset-jest", - "version": "25.4.0", + "version": "25.5.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -9,7 +9,7 @@ "license": "MIT", "main": "index.js", "dependencies": { - "babel-plugin-jest-hoist": "^25.4.0", + "babel-plugin-jest-hoist": "^25.5.0", "babel-preset-current-node-syntax": "^0.1.2" }, "peerDependencies": { diff --git a/packages/expect/package.json b/packages/expect/package.json index 04dbdb74f56a..df859e2e4715 100644 --- a/packages/expect/package.json +++ b/packages/expect/package.json @@ -1,6 +1,6 @@ { "name": "expect", - "version": "25.4.0", + "version": "25.5.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -18,15 +18,15 @@ }, "browser": "build-es5/index.js", "dependencies": { - "@jest/types": "^25.4.0", + "@jest/types": "^25.5.0", "ansi-styles": "^4.0.0", "jest-get-type": "^25.2.6", - "jest-matcher-utils": "^25.4.0", - "jest-message-util": "^25.4.0", + "jest-matcher-utils": "^25.5.0", + "jest-message-util": "^25.5.0", "jest-regex-util": "^25.2.6" }, "devDependencies": { - "@jest/test-utils": "^25.3.0", + "@jest/test-utils": "^25.5.0", "chalk": "^3.0.0", "fast-check": "^1.13.0", "immutable": "^4.0.0-rc.12" diff --git a/packages/jest-changed-files/package.json b/packages/jest-changed-files/package.json index 454b06e57b69..78fbeb4263bb 100644 --- a/packages/jest-changed-files/package.json +++ b/packages/jest-changed-files/package.json @@ -1,6 +1,6 @@ { "name": "jest-changed-files", - "version": "25.4.0", + "version": "25.5.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -17,7 +17,7 @@ } }, "dependencies": { - "@jest/types": "^25.4.0", + "@jest/types": "^25.5.0", "execa": "^3.2.0", "throat": "^5.0.0" }, diff --git a/packages/jest-circus/package.json b/packages/jest-circus/package.json index 3b365c63e79c..22bd4c6b1078 100644 --- a/packages/jest-circus/package.json +++ b/packages/jest-circus/package.json @@ -1,6 +1,6 @@ { "name": "jest-circus", - "version": "25.4.0", + "version": "25.5.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -18,27 +18,27 @@ }, "dependencies": { "@babel/traverse": "^7.1.0", - "@jest/environment": "^25.4.0", - "@jest/test-result": "^25.4.0", - "@jest/types": "^25.4.0", + "@jest/environment": "^25.5.0", + "@jest/test-result": "^25.5.0", + "@jest/types": "^25.5.0", "chalk": "^3.0.0", "co": "^4.6.0", - "expect": "^25.4.0", + "expect": "^25.5.0", "is-generator-fn": "^2.0.0", - "jest-each": "^25.4.0", - "jest-matcher-utils": "^25.4.0", - "jest-message-util": "^25.4.0", - "jest-runtime": "^25.4.0", - "jest-snapshot": "^25.4.0", - "jest-util": "^25.4.0", - "pretty-format": "^25.4.0", + "jest-each": "^25.5.0", + "jest-matcher-utils": "^25.5.0", + "jest-message-util": "^25.5.0", + "jest-runtime": "^25.5.0", + "jest-snapshot": "^25.5.0", + "jest-util": "^25.5.0", + "pretty-format": "^25.5.0", "stack-utils": "^1.0.1", "throat": "^5.0.0" }, "devDependencies": { "@babel/core": "^7.1.0", "@babel/register": "^7.0.0", - "@jest/test-utils": "^25.3.0", + "@jest/test-utils": "^25.5.0", "@types/babel__traverse": "^7.0.4", "@types/co": "^4.6.0", "@types/graceful-fs": "^4.1.3", diff --git a/packages/jest-cli/package.json b/packages/jest-cli/package.json index 084c2bb7ab89..46ef3c026cd3 100644 --- a/packages/jest-cli/package.json +++ b/packages/jest-cli/package.json @@ -1,7 +1,7 @@ { "name": "jest-cli", "description": "Delightful JavaScript Testing.", - "version": "25.4.0", + "version": "25.5.0", "main": "build/index.js", "types": "build/index.d.ts", "typesVersions": { @@ -12,26 +12,26 @@ } }, "dependencies": { - "@jest/core": "^25.4.0", - "@jest/test-result": "^25.4.0", - "@jest/types": "^25.4.0", + "@jest/core": "^25.5.0", + "@jest/test-result": "^25.5.0", + "@jest/types": "^25.5.0", "chalk": "^3.0.0", "exit": "^0.1.2", "graceful-fs": "^4.2.4", "import-local": "^3.0.2", "is-ci": "^2.0.0", - "jest-config": "^25.4.0", - "jest-util": "^25.4.0", - "jest-validate": "^25.4.0", + "jest-config": "^25.5.0", + "jest-util": "^25.5.0", + "jest-validate": "^25.5.0", "prompts": "^2.0.1", "realpath-native": "^2.0.0", "yargs": "^15.3.1" }, "devDependencies": { - "@jest/test-utils": "^25.3.0", + "@jest/test-utils": "^25.5.0", "@types/exit": "^0.1.30", - "@types/is-ci": "^2.0.0", "@types/graceful-fs": "^4.1.3", + "@types/is-ci": "^2.0.0", "@types/prompts": "^2.0.1", "@types/yargs": "^15.0.0" }, diff --git a/packages/jest-config/package.json b/packages/jest-config/package.json index 50a2fd5a8e1d..c14b2bd75177 100644 --- a/packages/jest-config/package.json +++ b/packages/jest-config/package.json @@ -1,6 +1,6 @@ { "name": "jest-config", - "version": "25.4.0", + "version": "25.5.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -18,23 +18,23 @@ }, "dependencies": { "@babel/core": "^7.1.0", - "@jest/test-sequencer": "^25.4.0", - "@jest/types": "^25.4.0", - "babel-jest": "^25.4.0", + "@jest/test-sequencer": "^25.5.0", + "@jest/types": "^25.5.0", + "babel-jest": "^25.5.0", "chalk": "^3.0.0", "deepmerge": "^4.2.2", "glob": "^7.1.1", "graceful-fs": "^4.2.4", - "jest-environment-jsdom": "^25.4.0", - "jest-environment-node": "^25.4.0", + "jest-environment-jsdom": "^25.5.0", + "jest-environment-node": "^25.5.0", "jest-get-type": "^25.2.6", - "jest-jasmine2": "^25.4.0", + "jest-jasmine2": "^25.5.0", "jest-regex-util": "^25.2.6", - "jest-resolve": "^25.4.0", - "jest-util": "^25.4.0", - "jest-validate": "^25.4.0", + "jest-resolve": "^25.5.0", + "jest-util": "^25.5.0", + "jest-validate": "^25.5.0", "micromatch": "^4.0.2", - "pretty-format": "^25.4.0", + "pretty-format": "^25.5.0", "realpath-native": "^2.0.0" }, "devDependencies": { diff --git a/packages/jest-console/package.json b/packages/jest-console/package.json index ba663dc366ca..80b76d9c1b96 100644 --- a/packages/jest-console/package.json +++ b/packages/jest-console/package.json @@ -1,6 +1,6 @@ { "name": "@jest/console", - "version": "25.4.0", + "version": "25.5.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -17,10 +17,10 @@ } }, "dependencies": { - "@jest/types": "^25.4.0", + "@jest/types": "^25.5.0", "chalk": "^3.0.0", - "jest-message-util": "^25.4.0", - "jest-util": "^25.4.0", + "jest-message-util": "^25.5.0", + "jest-util": "^25.5.0", "slash": "^3.0.0" }, "devDependencies": { diff --git a/packages/jest-core/package.json b/packages/jest-core/package.json index 90cf157dac3b..790a6d3339ac 100644 --- a/packages/jest-core/package.json +++ b/packages/jest-core/package.json @@ -1,7 +1,7 @@ { "name": "@jest/core", "description": "Delightful JavaScript Testing.", - "version": "25.4.0", + "version": "25.5.0", "main": "build/jest.js", "types": "build/jest.d.ts", "typesVersions": { @@ -12,28 +12,28 @@ } }, "dependencies": { - "@jest/console": "^25.4.0", - "@jest/reporters": "^25.4.0", - "@jest/test-result": "^25.4.0", - "@jest/transform": "^25.4.0", - "@jest/types": "^25.4.0", + "@jest/console": "^25.5.0", + "@jest/reporters": "^25.5.0", + "@jest/test-result": "^25.5.0", + "@jest/transform": "^25.5.0", + "@jest/types": "^25.5.0", "ansi-escapes": "^4.2.1", "chalk": "^3.0.0", "exit": "^0.1.2", "graceful-fs": "^4.2.4", - "jest-changed-files": "^25.4.0", - "jest-config": "^25.4.0", - "jest-haste-map": "^25.4.0", - "jest-message-util": "^25.4.0", + "jest-changed-files": "^25.5.0", + "jest-config": "^25.5.0", + "jest-haste-map": "^25.5.0", + "jest-message-util": "^25.5.0", "jest-regex-util": "^25.2.6", - "jest-resolve": "^25.4.0", - "jest-resolve-dependencies": "^25.4.0", - "jest-runner": "^25.4.0", - "jest-runtime": "^25.4.0", - "jest-snapshot": "^25.4.0", - "jest-util": "^25.4.0", - "jest-validate": "^25.4.0", - "jest-watcher": "^25.4.0", + "jest-resolve": "^25.5.0", + "jest-resolve-dependencies": "^25.5.0", + "jest-runner": "^25.5.0", + "jest-runtime": "^25.5.0", + "jest-snapshot": "^25.5.0", + "jest-util": "^25.5.0", + "jest-validate": "^25.5.0", + "jest-watcher": "^25.5.0", "micromatch": "^4.0.2", "p-each-series": "^2.1.0", "realpath-native": "^2.0.0", @@ -42,7 +42,7 @@ "strip-ansi": "^6.0.0" }, "devDependencies": { - "@jest/test-sequencer": "^25.4.0", + "@jest/test-sequencer": "^25.5.0", "@types/exit": "^0.1.30", "@types/graceful-fs": "^4.1.2", "@types/micromatch": "^4.0.0", diff --git a/packages/jest-diff/package.json b/packages/jest-diff/package.json index 561942c03c01..4b05af5f8479 100644 --- a/packages/jest-diff/package.json +++ b/packages/jest-diff/package.json @@ -1,6 +1,6 @@ { "name": "jest-diff", - "version": "25.4.0", + "version": "25.5.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -20,10 +20,10 @@ "chalk": "^3.0.0", "diff-sequences": "^25.2.6", "jest-get-type": "^25.2.6", - "pretty-format": "^25.4.0" + "pretty-format": "^25.5.0" }, "devDependencies": { - "@jest/test-utils": "^25.3.0", + "@jest/test-utils": "^25.5.0", "strip-ansi": "^6.0.0" }, "engines": { diff --git a/packages/jest-each/package.json b/packages/jest-each/package.json index 316149df7c50..0268d2dcd54f 100644 --- a/packages/jest-each/package.json +++ b/packages/jest-each/package.json @@ -1,6 +1,6 @@ { "name": "jest-each", - "version": "25.4.0", + "version": "25.5.0", "description": "Parameterised tests for Jest", "main": "build/index.js", "types": "build/index.d.ts", @@ -25,11 +25,11 @@ "author": "Matt Phillips (mattphillips)", "license": "MIT", "dependencies": { - "@jest/types": "^25.4.0", + "@jest/types": "^25.5.0", "chalk": "^3.0.0", "jest-get-type": "^25.2.6", - "jest-util": "^25.4.0", - "pretty-format": "^25.4.0" + "jest-util": "^25.5.0", + "pretty-format": "^25.5.0" }, "engines": { "node": ">= 8.3" diff --git a/packages/jest-environment-jsdom/package.json b/packages/jest-environment-jsdom/package.json index 06c38b58c389..c25da57ea444 100644 --- a/packages/jest-environment-jsdom/package.json +++ b/packages/jest-environment-jsdom/package.json @@ -1,6 +1,6 @@ { "name": "jest-environment-jsdom", - "version": "25.4.0", + "version": "25.5.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -17,11 +17,11 @@ } }, "dependencies": { - "@jest/environment": "^25.4.0", - "@jest/fake-timers": "^25.4.0", - "@jest/types": "^25.4.0", - "jest-mock": "^25.4.0", - "jest-util": "^25.4.0", + "@jest/environment": "^25.5.0", + "@jest/fake-timers": "^25.5.0", + "@jest/types": "^25.5.0", + "jest-mock": "^25.5.0", + "jest-util": "^25.5.0", "jsdom": "^15.2.1" }, "devDependencies": { diff --git a/packages/jest-environment-node/package.json b/packages/jest-environment-node/package.json index cfec5d2b3eb0..c4f32f2c0310 100644 --- a/packages/jest-environment-node/package.json +++ b/packages/jest-environment-node/package.json @@ -1,6 +1,6 @@ { "name": "jest-environment-node", - "version": "25.4.0", + "version": "25.5.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -17,11 +17,11 @@ } }, "dependencies": { - "@jest/environment": "^25.4.0", - "@jest/fake-timers": "^25.4.0", - "@jest/types": "^25.4.0", - "jest-mock": "^25.4.0", - "jest-util": "^25.4.0", + "@jest/environment": "^25.5.0", + "@jest/fake-timers": "^25.5.0", + "@jest/types": "^25.5.0", + "jest-mock": "^25.5.0", + "jest-util": "^25.5.0", "semver": "^6.3.0" }, "devDependencies": { diff --git a/packages/jest-environment/package.json b/packages/jest-environment/package.json index 4e68a7f81dd6..21b3b2da18f0 100644 --- a/packages/jest-environment/package.json +++ b/packages/jest-environment/package.json @@ -1,6 +1,6 @@ { "name": "@jest/environment", - "version": "25.4.0", + "version": "25.5.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -17,9 +17,9 @@ } }, "dependencies": { - "@jest/fake-timers": "^25.4.0", - "@jest/types": "^25.4.0", - "jest-mock": "^25.4.0" + "@jest/fake-timers": "^25.5.0", + "@jest/types": "^25.5.0", + "jest-mock": "^25.5.0" }, "devDependencies": { "@types/node": "*" diff --git a/packages/jest-fake-timers/package.json b/packages/jest-fake-timers/package.json index e3a22a68beb7..9c114fe73b1e 100644 --- a/packages/jest-fake-timers/package.json +++ b/packages/jest-fake-timers/package.json @@ -1,6 +1,6 @@ { "name": "@jest/fake-timers", - "version": "25.4.0", + "version": "25.5.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -17,10 +17,10 @@ } }, "dependencies": { - "@jest/types": "^25.4.0", - "jest-message-util": "^25.4.0", - "jest-mock": "^25.4.0", - "jest-util": "^25.4.0", + "@jest/types": "^25.5.0", + "jest-message-util": "^25.5.0", + "jest-mock": "^25.5.0", + "jest-util": "^25.5.0", "lolex": "^5.0.0" }, "devDependencies": { diff --git a/packages/jest-globals/package.json b/packages/jest-globals/package.json index c216d3beda23..fcc69fa44994 100644 --- a/packages/jest-globals/package.json +++ b/packages/jest-globals/package.json @@ -1,6 +1,6 @@ { "name": "@jest/globals", - "version": "25.4.0", + "version": "25.5.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -20,9 +20,9 @@ } }, "dependencies": { - "@jest/environment": "^25.4.0", - "@jest/types": "^25.4.0", - "expect": "^25.4.0" + "@jest/environment": "^25.5.0", + "@jest/types": "^25.5.0", + "expect": "^25.5.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-haste-map/package.json b/packages/jest-haste-map/package.json index 7546dd48cb71..33613ae6dbda 100644 --- a/packages/jest-haste-map/package.json +++ b/packages/jest-haste-map/package.json @@ -1,6 +1,6 @@ { "name": "jest-haste-map", - "version": "25.4.0", + "version": "25.5.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -17,20 +17,20 @@ } }, "dependencies": { - "@jest/types": "^25.4.0", + "@jest/types": "^25.5.0", "anymatch": "^3.0.3", "fb-watchman": "^2.0.0", "graceful-fs": "^4.2.4", - "jest-serializer": "^25.2.6", - "jest-util": "^25.4.0", - "jest-worker": "^25.4.0", + "jest-serializer": "^25.5.0", + "jest-util": "^25.5.0", + "jest-worker": "^25.5.0", "micromatch": "^4.0.2", "sane": "^4.0.3", "walker": "^1.0.7", "which": "^2.0.2" }, "devDependencies": { - "@jest/test-utils": "^25.3.0", + "@jest/test-utils": "^25.5.0", "@types/anymatch": "^1.3.1", "@types/fb-watchman": "^2.0.0", "@types/graceful-fs": "^4.1.2", diff --git a/packages/jest-jasmine2/package.json b/packages/jest-jasmine2/package.json index 6a00b3ee56c7..0344495648b6 100644 --- a/packages/jest-jasmine2/package.json +++ b/packages/jest-jasmine2/package.json @@ -1,6 +1,6 @@ { "name": "jest-jasmine2", - "version": "25.4.0", + "version": "25.5.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -18,21 +18,21 @@ }, "dependencies": { "@babel/traverse": "^7.1.0", - "@jest/environment": "^25.4.0", - "@jest/source-map": "^25.2.6", - "@jest/test-result": "^25.4.0", - "@jest/types": "^25.4.0", + "@jest/environment": "^25.5.0", + "@jest/source-map": "^25.5.0", + "@jest/test-result": "^25.5.0", + "@jest/types": "^25.5.0", "chalk": "^3.0.0", "co": "^4.6.0", - "expect": "^25.4.0", + "expect": "^25.5.0", "is-generator-fn": "^2.0.0", - "jest-each": "^25.4.0", - "jest-matcher-utils": "^25.4.0", - "jest-message-util": "^25.4.0", - "jest-runtime": "^25.4.0", - "jest-snapshot": "^25.4.0", - "jest-util": "^25.4.0", - "pretty-format": "^25.4.0", + "jest-each": "^25.5.0", + "jest-matcher-utils": "^25.5.0", + "jest-message-util": "^25.5.0", + "jest-runtime": "^25.5.0", + "jest-snapshot": "^25.5.0", + "jest-util": "^25.5.0", + "pretty-format": "^25.5.0", "throat": "^5.0.0" }, "devDependencies": { diff --git a/packages/jest-leak-detector/package.json b/packages/jest-leak-detector/package.json index 1cfcbab61a70..d769aec2a2ad 100644 --- a/packages/jest-leak-detector/package.json +++ b/packages/jest-leak-detector/package.json @@ -1,6 +1,6 @@ { "name": "jest-leak-detector", - "version": "25.4.0", + "version": "25.5.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -18,7 +18,7 @@ }, "dependencies": { "jest-get-type": "^25.2.6", - "pretty-format": "^25.4.0" + "pretty-format": "^25.5.0" }, "devDependencies": { "@types/weak-napi": "^1.0.0", diff --git a/packages/jest-matcher-utils/package.json b/packages/jest-matcher-utils/package.json index d0e896a247f4..51c5b5ad316d 100644 --- a/packages/jest-matcher-utils/package.json +++ b/packages/jest-matcher-utils/package.json @@ -1,7 +1,7 @@ { "name": "jest-matcher-utils", "description": "A set of utility functions for expect and related packages", - "version": "25.4.0", + "version": "25.5.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -22,12 +22,12 @@ }, "dependencies": { "chalk": "^3.0.0", - "jest-diff": "^25.4.0", + "jest-diff": "^25.5.0", "jest-get-type": "^25.2.6", - "pretty-format": "^25.4.0" + "pretty-format": "^25.5.0" }, "devDependencies": { - "@jest/test-utils": "^25.3.0", + "@jest/test-utils": "^25.5.0", "@types/node": "*" }, "publishConfig": { diff --git a/packages/jest-message-util/package.json b/packages/jest-message-util/package.json index b175037ba21c..ec63967c9fd4 100644 --- a/packages/jest-message-util/package.json +++ b/packages/jest-message-util/package.json @@ -1,6 +1,6 @@ { "name": "jest-message-util", - "version": "25.4.0", + "version": "25.5.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -21,7 +21,7 @@ }, "dependencies": { "@babel/code-frame": "^7.0.0", - "@jest/types": "^25.4.0", + "@jest/types": "^25.5.0", "@types/stack-utils": "^1.0.1", "chalk": "^3.0.0", "graceful-fs": "^4.2.4", diff --git a/packages/jest-mock/package.json b/packages/jest-mock/package.json index 294324e7630d..775cc56c409d 100644 --- a/packages/jest-mock/package.json +++ b/packages/jest-mock/package.json @@ -1,6 +1,6 @@ { "name": "jest-mock", - "version": "25.4.0", + "version": "25.5.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,7 +10,7 @@ "node": ">= 8.3" }, "dependencies": { - "@jest/types": "^25.4.0" + "@jest/types": "^25.5.0" }, "devDependencies": { "@types/node": "*" diff --git a/packages/jest-phabricator/package.json b/packages/jest-phabricator/package.json index 3d0b2297fe44..27f161c7a5df 100644 --- a/packages/jest-phabricator/package.json +++ b/packages/jest-phabricator/package.json @@ -1,6 +1,6 @@ { "name": "jest-phabricator", - "version": "25.4.0", + "version": "25.5.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -15,7 +15,7 @@ } }, "dependencies": { - "@jest/test-result": "^25.4.0" + "@jest/test-result": "^25.5.0" }, "engines": { "node": ">= 8.3" diff --git a/packages/jest-repl/package.json b/packages/jest-repl/package.json index b93eeb57cfc3..f303fdc39361 100644 --- a/packages/jest-repl/package.json +++ b/packages/jest-repl/package.json @@ -1,6 +1,6 @@ { "name": "jest-repl", - "version": "25.4.0", + "version": "25.5.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -17,16 +17,16 @@ } }, "dependencies": { - "@jest/transform": "^25.4.0", - "@jest/types": "^25.4.0", - "jest-config": "^25.4.0", - "jest-runtime": "^25.4.0", - "jest-validate": "^25.4.0", + "@jest/transform": "^25.5.0", + "@jest/types": "^25.5.0", + "jest-config": "^25.5.0", + "jest-runtime": "^25.5.0", + "jest-validate": "^25.5.0", "repl": "^0.1.3", "yargs": "^15.3.1" }, "devDependencies": { - "@jest/test-utils": "^25.3.0", + "@jest/test-utils": "^25.5.0", "@types/yargs": "^15.0.0" }, "bin": "./bin/jest-repl.js", diff --git a/packages/jest-reporters/package.json b/packages/jest-reporters/package.json index 8e7e2ad053f6..2914154ea7a9 100644 --- a/packages/jest-reporters/package.json +++ b/packages/jest-reporters/package.json @@ -1,7 +1,7 @@ { "name": "@jest/reporters", "description": "Jest's reporters", - "version": "25.4.0", + "version": "25.5.0", "main": "build/index.js", "types": "build/index.d.ts", "typesVersions": { @@ -13,24 +13,24 @@ }, "dependencies": { "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^25.4.0", - "@jest/test-result": "^25.4.0", - "@jest/transform": "^25.4.0", - "@jest/types": "^25.4.0", + "@jest/console": "^25.5.0", + "@jest/test-result": "^25.5.0", + "@jest/transform": "^25.5.0", + "@jest/types": "^25.5.0", "chalk": "^3.0.0", "collect-v8-coverage": "^1.0.0", "exit": "^0.1.2", - "graceful-fs": "^4.2.4", "glob": "^7.1.2", + "graceful-fs": "^4.2.4", "istanbul-lib-coverage": "^3.0.0", "istanbul-lib-instrument": "^4.0.0", "istanbul-lib-report": "^3.0.0", "istanbul-lib-source-maps": "^4.0.0", "istanbul-reports": "^3.0.2", - "jest-haste-map": "^25.4.0", - "jest-resolve": "^25.4.0", - "jest-util": "^25.4.0", - "jest-worker": "^25.4.0", + "jest-haste-map": "^25.5.0", + "jest-resolve": "^25.5.0", + "jest-util": "^25.5.0", + "jest-worker": "^25.5.0", "slash": "^3.0.0", "source-map": "^0.6.0", "string-length": "^3.1.0", diff --git a/packages/jest-resolve-dependencies/package.json b/packages/jest-resolve-dependencies/package.json index 91ff489f1bab..9e8f43044e48 100644 --- a/packages/jest-resolve-dependencies/package.json +++ b/packages/jest-resolve-dependencies/package.json @@ -1,6 +1,6 @@ { "name": "jest-resolve-dependencies", - "version": "25.4.0", + "version": "25.5.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -17,14 +17,14 @@ } }, "dependencies": { - "@jest/types": "^25.4.0", + "@jest/types": "^25.5.0", "jest-regex-util": "^25.2.6", - "jest-snapshot": "^25.4.0" + "jest-snapshot": "^25.5.0" }, "devDependencies": { - "jest-haste-map": "^25.4.0", - "jest-resolve": "^25.4.0", - "jest-runtime": "^25.4.0" + "jest-haste-map": "^25.5.0", + "jest-resolve": "^25.5.0", + "jest-runtime": "^25.5.0" }, "engines": { "node": ">= 8.3" diff --git a/packages/jest-resolve/package.json b/packages/jest-resolve/package.json index 6cf9500d1bd8..c903864fb8f3 100644 --- a/packages/jest-resolve/package.json +++ b/packages/jest-resolve/package.json @@ -1,6 +1,6 @@ { "name": "jest-resolve", - "version": "25.4.0", + "version": "25.5.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -17,7 +17,7 @@ } }, "dependencies": { - "@jest/types": "^25.4.0", + "@jest/types": "^25.5.0", "browser-resolve": "^1.11.3", "chalk": "^3.0.0", "graceful-fs": "^4.2.4", @@ -31,7 +31,7 @@ "@types/browser-resolve": "^1.11.0", "@types/graceful-fs": "^4.1.3", "@types/resolve": "^1.14.0", - "jest-haste-map": "^25.4.0" + "jest-haste-map": "^25.5.0" }, "engines": { "node": ">= 8.3" diff --git a/packages/jest-runner/package.json b/packages/jest-runner/package.json index fcd5c6cb1b26..a7eb3357b808 100644 --- a/packages/jest-runner/package.json +++ b/packages/jest-runner/package.json @@ -1,6 +1,6 @@ { "name": "jest-runner", - "version": "25.4.0", + "version": "25.5.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -17,23 +17,23 @@ } }, "dependencies": { - "@jest/console": "^25.4.0", - "@jest/environment": "^25.4.0", - "@jest/test-result": "^25.4.0", - "@jest/types": "^25.4.0", + "@jest/console": "^25.5.0", + "@jest/environment": "^25.5.0", + "@jest/test-result": "^25.5.0", + "@jest/types": "^25.5.0", "chalk": "^3.0.0", "exit": "^0.1.2", "graceful-fs": "^4.2.4", - "jest-config": "^25.4.0", + "jest-config": "^25.5.0", "jest-docblock": "^25.3.0", - "jest-haste-map": "^25.4.0", - "jest-jasmine2": "^25.4.0", - "jest-leak-detector": "^25.4.0", - "jest-message-util": "^25.4.0", - "jest-resolve": "^25.4.0", - "jest-runtime": "^25.4.0", - "jest-util": "^25.4.0", - "jest-worker": "^25.4.0", + "jest-haste-map": "^25.5.0", + "jest-jasmine2": "^25.5.0", + "jest-leak-detector": "^25.5.0", + "jest-message-util": "^25.5.0", + "jest-resolve": "^25.5.0", + "jest-runtime": "^25.5.0", + "jest-util": "^25.5.0", + "jest-worker": "^25.5.0", "source-map-support": "^0.5.6", "throat": "^5.0.0" }, @@ -42,7 +42,7 @@ "@types/graceful-fs": "^4.1.2", "@types/node": "*", "@types/source-map-support": "^0.5.0", - "jest-circus": "^25.4.0" + "jest-circus": "^25.5.0" }, "engines": { "node": ">= 8.3" diff --git a/packages/jest-runtime/package.json b/packages/jest-runtime/package.json index af984cb9770b..360e109de6c9 100644 --- a/packages/jest-runtime/package.json +++ b/packages/jest-runtime/package.json @@ -1,6 +1,6 @@ { "name": "jest-runtime", - "version": "25.4.0", + "version": "25.5.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -17,40 +17,40 @@ } }, "dependencies": { - "@jest/console": "^25.4.0", - "@jest/environment": "^25.4.0", - "@jest/globals": "^25.4.0", - "@jest/source-map": "^25.2.6", - "@jest/test-result": "^25.4.0", - "@jest/transform": "^25.4.0", - "@jest/types": "^25.4.0", + "@jest/console": "^25.5.0", + "@jest/environment": "^25.5.0", + "@jest/globals": "^25.5.0", + "@jest/source-map": "^25.5.0", + "@jest/test-result": "^25.5.0", + "@jest/transform": "^25.5.0", + "@jest/types": "^25.5.0", "@types/yargs": "^15.0.0", "chalk": "^3.0.0", "collect-v8-coverage": "^1.0.0", "exit": "^0.1.2", "glob": "^7.1.3", "graceful-fs": "^4.2.4", - "jest-config": "^25.4.0", - "jest-haste-map": "^25.4.0", - "jest-message-util": "^25.4.0", - "jest-mock": "^25.4.0", + "jest-config": "^25.5.0", + "jest-haste-map": "^25.5.0", + "jest-message-util": "^25.5.0", + "jest-mock": "^25.5.0", "jest-regex-util": "^25.2.6", - "jest-resolve": "^25.4.0", - "jest-snapshot": "^25.4.0", - "jest-util": "^25.4.0", - "jest-validate": "^25.4.0", + "jest-resolve": "^25.5.0", + "jest-snapshot": "^25.5.0", + "jest-util": "^25.5.0", + "jest-validate": "^25.5.0", "realpath-native": "^2.0.0", "slash": "^3.0.0", "strip-bom": "^4.0.0", "yargs": "^15.3.1" }, "devDependencies": { - "@jest/test-utils": "^25.3.0", + "@jest/test-utils": "^25.5.0", "@types/exit": "^0.1.30", "@types/glob": "^7.1.1", "@types/graceful-fs": "^4.1.2", "execa": "^3.2.0", - "jest-environment-node": "^25.4.0", + "jest-environment-node": "^25.5.0", "jest-snapshot-serializer-raw": "^1.1.0" }, "bin": "./bin/jest-runtime.js", diff --git a/packages/jest-serializer/package.json b/packages/jest-serializer/package.json index 33d59529d280..c2a1f6db1ea5 100644 --- a/packages/jest-serializer/package.json +++ b/packages/jest-serializer/package.json @@ -1,6 +1,6 @@ { "name": "jest-serializer", - "version": "25.2.6", + "version": "25.5.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", diff --git a/packages/jest-snapshot/package.json b/packages/jest-snapshot/package.json index 0bba3bb1cd09..e1e0a94c74e0 100644 --- a/packages/jest-snapshot/package.json +++ b/packages/jest-snapshot/package.json @@ -1,6 +1,6 @@ { "name": "jest-snapshot", - "version": "25.4.0", + "version": "25.5.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -18,19 +18,19 @@ }, "dependencies": { "@babel/types": "^7.0.0", - "@jest/types": "^25.4.0", + "@jest/types": "^25.5.0", "@types/prettier": "^1.19.0", "chalk": "^3.0.0", - "expect": "^25.4.0", + "expect": "^25.5.0", "graceful-fs": "^4.2.4", - "jest-diff": "^25.4.0", + "jest-diff": "^25.5.0", "jest-get-type": "^25.2.6", - "jest-matcher-utils": "^25.4.0", - "jest-message-util": "^25.4.0", - "jest-resolve": "^25.4.0", + "jest-matcher-utils": "^25.5.0", + "jest-message-util": "^25.5.0", + "jest-resolve": "^25.5.0", "make-dir": "^3.0.0", "natural-compare": "^1.4.0", - "pretty-format": "^25.4.0", + "pretty-format": "^25.5.0", "semver": "^6.3.0" }, "devDependencies": { @@ -40,7 +40,7 @@ "@types/semver": "^6.0.1", "ansi-regex": "^5.0.0", "ansi-styles": "^4.2.0", - "jest-haste-map": "^25.4.0", + "jest-haste-map": "^25.5.0", "prettier": "^1.13.4" }, "engines": { diff --git a/packages/jest-source-map/package.json b/packages/jest-source-map/package.json index b3ef5b168916..adef54f96044 100644 --- a/packages/jest-source-map/package.json +++ b/packages/jest-source-map/package.json @@ -1,6 +1,6 @@ { "name": "@jest/source-map", - "version": "25.2.6", + "version": "25.5.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", diff --git a/packages/jest-test-result/package.json b/packages/jest-test-result/package.json index fba5b4302545..d3d77ac88207 100644 --- a/packages/jest-test-result/package.json +++ b/packages/jest-test-result/package.json @@ -1,6 +1,6 @@ { "name": "@jest/test-result", - "version": "25.4.0", + "version": "25.5.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -17,8 +17,8 @@ } }, "dependencies": { - "@jest/console": "^25.4.0", - "@jest/types": "^25.4.0", + "@jest/console": "^25.5.0", + "@jest/types": "^25.5.0", "@types/istanbul-lib-coverage": "^2.0.0", "collect-v8-coverage": "^1.0.0" }, diff --git a/packages/jest-test-sequencer/package.json b/packages/jest-test-sequencer/package.json index 118532b461f6..ffa59e49b508 100644 --- a/packages/jest-test-sequencer/package.json +++ b/packages/jest-test-sequencer/package.json @@ -1,6 +1,6 @@ { "name": "@jest/test-sequencer", - "version": "25.4.0", + "version": "25.5.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -17,11 +17,11 @@ } }, "dependencies": { - "@jest/test-result": "^25.4.0", + "@jest/test-result": "^25.5.0", "graceful-fs": "^4.2.4", - "jest-haste-map": "^25.4.0", - "jest-runner": "^25.4.0", - "jest-runtime": "^25.4.0" + "jest-haste-map": "^25.5.0", + "jest-runner": "^25.5.0", + "jest-runtime": "^25.5.0" }, "devDependencies": { "@types/graceful-fs": "^4.1.3" diff --git a/packages/jest-transform/package.json b/packages/jest-transform/package.json index 034b2e09d5ae..68b941c4a71a 100644 --- a/packages/jest-transform/package.json +++ b/packages/jest-transform/package.json @@ -1,6 +1,6 @@ { "name": "@jest/transform", - "version": "25.4.0", + "version": "25.5.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -18,15 +18,15 @@ }, "dependencies": { "@babel/core": "^7.1.0", - "@jest/types": "^25.4.0", + "@jest/types": "^25.5.0", "babel-plugin-istanbul": "^6.0.0", "chalk": "^3.0.0", "convert-source-map": "^1.4.0", "fast-json-stable-stringify": "^2.0.0", "graceful-fs": "^4.2.4", - "jest-haste-map": "^25.4.0", + "jest-haste-map": "^25.5.0", "jest-regex-util": "^25.2.6", - "jest-util": "^25.4.0", + "jest-util": "^25.5.0", "micromatch": "^4.0.2", "pirates": "^4.0.1", "realpath-native": "^2.0.0", diff --git a/packages/jest-types/package.json b/packages/jest-types/package.json index d4f560e9b74c..c08c41db7f8d 100644 --- a/packages/jest-types/package.json +++ b/packages/jest-types/package.json @@ -1,6 +1,6 @@ { "name": "@jest/types", - "version": "25.4.0", + "version": "25.5.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", diff --git a/packages/jest-util/package.json b/packages/jest-util/package.json index 2348fcb9be09..49c5ddbc68d2 100644 --- a/packages/jest-util/package.json +++ b/packages/jest-util/package.json @@ -1,6 +1,6 @@ { "name": "jest-util", - "version": "25.4.0", + "version": "25.5.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -17,7 +17,7 @@ } }, "dependencies": { - "@jest/types": "^25.4.0", + "@jest/types": "^25.5.0", "chalk": "^3.0.0", "graceful-fs": "^4.2.4", "is-ci": "^2.0.0", diff --git a/packages/jest-validate/package.json b/packages/jest-validate/package.json index 6c6b82dcab82..6aee18c8fd0a 100644 --- a/packages/jest-validate/package.json +++ b/packages/jest-validate/package.json @@ -1,6 +1,6 @@ { "name": "jest-validate", - "version": "25.4.0", + "version": "25.5.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -17,12 +17,12 @@ } }, "dependencies": { - "@jest/types": "^25.4.0", + "@jest/types": "^25.5.0", "camelcase": "^5.3.1", "chalk": "^3.0.0", "jest-get-type": "^25.2.6", "leven": "^3.1.0", - "pretty-format": "^25.4.0" + "pretty-format": "^25.5.0" }, "devDependencies": { "@types/yargs": "^15.0.3" diff --git a/packages/jest-watcher/package.json b/packages/jest-watcher/package.json index c95a55f5eb91..e5a677970b31 100644 --- a/packages/jest-watcher/package.json +++ b/packages/jest-watcher/package.json @@ -1,7 +1,7 @@ { "name": "jest-watcher", "description": "Delightful JavaScript Testing.", - "version": "25.4.0", + "version": "25.5.0", "main": "build/index.js", "types": "build/index.d.ts", "typesVersions": { @@ -12,11 +12,11 @@ } }, "dependencies": { - "@jest/test-result": "^25.4.0", - "@jest/types": "^25.4.0", + "@jest/test-result": "^25.5.0", + "@jest/types": "^25.5.0", "ansi-escapes": "^4.2.1", "chalk": "^3.0.0", - "jest-util": "^25.4.0", + "jest-util": "^25.5.0", "string-length": "^3.1.0" }, "devDependencies": { diff --git a/packages/jest-worker/package.json b/packages/jest-worker/package.json index ca26e4393389..da50ed5ed656 100644 --- a/packages/jest-worker/package.json +++ b/packages/jest-worker/package.json @@ -1,6 +1,6 @@ { "name": "jest-worker", - "version": "25.4.0", + "version": "25.5.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", diff --git a/packages/jest/package.json b/packages/jest/package.json index cafa26011e5d..1ba22423894b 100644 --- a/packages/jest/package.json +++ b/packages/jest/package.json @@ -1,7 +1,7 @@ { "name": "jest", "description": "Delightful JavaScript Testing.", - "version": "25.4.0", + "version": "25.5.0", "main": "build/jest.js", "types": "build/jest.d.ts", "typesVersions": { @@ -12,9 +12,9 @@ } }, "dependencies": { - "@jest/core": "^25.4.0", + "@jest/core": "^25.5.0", "import-local": "^3.0.2", - "jest-cli": "^25.4.0" + "jest-cli": "^25.5.0" }, "bin": "./bin/jest.js", "engines": { diff --git a/packages/pretty-format/package.json b/packages/pretty-format/package.json index 30f154979fdf..dedbfab6721a 100644 --- a/packages/pretty-format/package.json +++ b/packages/pretty-format/package.json @@ -1,6 +1,6 @@ { "name": "pretty-format", - "version": "25.4.0", + "version": "25.5.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -20,7 +20,7 @@ "browser": "build-es5/index.js", "author": "James Kyle ", "dependencies": { - "@jest/types": "^25.4.0", + "@jest/types": "^25.5.0", "ansi-regex": "^5.0.0", "ansi-styles": "^4.0.0", "react-is": "^16.12.0" diff --git a/packages/test-utils/package.json b/packages/test-utils/package.json index 763858ae640b..51046831e16a 100644 --- a/packages/test-utils/package.json +++ b/packages/test-utils/package.json @@ -1,6 +1,6 @@ { "name": "@jest/test-utils", - "version": "25.3.0", + "version": "25.5.0", "private": true, "license": "MIT", "main": "build/index.js", From d425a49bd575e7167bc786f3c4f2833589091fa1 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Tue, 28 Apr 2020 21:47:32 +0200 Subject: [PATCH 012/106] chore: roll new version of docs --- CHANGELOG.md | 2 +- .../version-25.5/Configuration.md | 1210 +++++++++++++++++ .../version-25.5/Es6ClassMocks.md | 364 +++++ .../versioned_docs/version-25.5/GlobalAPI.md | 676 +++++++++ .../version-25.5/JestObjectAPI.md | 672 +++++++++ .../version-25.5/JestPlatform.md | 175 +++ website/versions.json | 1 + 7 files changed, 3099 insertions(+), 1 deletion(-) create mode 100644 website/versioned_docs/version-25.5/Configuration.md create mode 100644 website/versioned_docs/version-25.5/Es6ClassMocks.md create mode 100644 website/versioned_docs/version-25.5/GlobalAPI.md create mode 100644 website/versioned_docs/version-25.5/JestObjectAPI.md create mode 100644 website/versioned_docs/version-25.5/JestPlatform.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 982052fb09c1..a2aaef5db739 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ ### Performance -## 24.5.0 +## 25.5.0 ### Features diff --git a/website/versioned_docs/version-25.5/Configuration.md b/website/versioned_docs/version-25.5/Configuration.md new file mode 100644 index 000000000000..69e68bae0396 --- /dev/null +++ b/website/versioned_docs/version-25.5/Configuration.md @@ -0,0 +1,1210 @@ +--- +id: version-25.5-configuration +title: Configuring Jest +original_id: configuration +--- + +Jest's configuration can be defined in the `package.json` file of your project, or through a `jest.config.js` file or through the `--config ` option. If you'd like to use your `package.json` to store Jest's config, the `"jest"` key should be used on the top level so Jest will know how to find your settings: + +```json +{ + "name": "my-project", + "jest": { + "verbose": true + } +} +``` + +Or through JavaScript: + +```js +// jest.config.js +module.exports = { + verbose: true, +}; +``` + +Please keep in mind that the resulting configuration must be JSON-serializable. + +When using the `--config` option, the JSON file must not contain a "jest" key: + +```json +{ + "bail": 1, + "verbose": true +} +``` + +## Options + +These options let you control Jest's behavior in your `package.json` file. The Jest philosophy is to work great by default, but sometimes you just need more configuration power. + +### Defaults + +You can retrieve Jest's default options to expand them if needed: + +```js +// jest.config.js +const {defaults} = require('jest-config'); +module.exports = { + // ... + moduleFileExtensions: [...defaults.moduleFileExtensions, 'ts', 'tsx'], + // ... +}; +``` + + + +--- + +## Reference + +### `automock` [boolean] + +Default: `false` + +This option tells Jest that all imported modules in your tests should be mocked automatically. All modules used in your tests will have a replacement implementation, keeping the API surface. + +Example: + +```js +// utils.js +export default { + authorize: () => { + return 'token'; + }, + isAuthorized: secret => secret === 'wizard', +}; +``` + +```js +//__tests__/automocking.test.js +import utils from '../utils'; + +test('if utils mocked automatically', () => { + // Public methods of `utils` are now mock functions + expect(utils.authorize.mock).toBeTruthy(); + expect(utils.isAuthorized.mock).toBeTruthy(); + + // You can provide them with your own implementation + // or pass the expected return value + utils.authorize.mockReturnValue('mocked_token'); + utils.isAuthorized.mockReturnValue(true); + + expect(utils.authorize()).toBe('mocked_token'); + expect(utils.isAuthorized('not_wizard')).toBeTruthy(); +}); +``` + +_Note: Node modules are automatically mocked when you have a manual mock in place (e.g.: `__mocks__/lodash.js`). More info [here](manual-mocks.html#mocking-node-modules)._ + +_Note: Core modules, like `fs`, are not mocked by default. They can be mocked explicitly, like `jest.mock('fs')`._ + +### `bail` [number | boolean] + +Default: `0` + +By default, Jest runs all tests and produces all errors into the console upon completion. The bail config option can be used here to have Jest stop running tests after `n` failures. Setting bail to `true` is the same as setting bail to `1`. + +### `browser` [boolean] + +Default: `false` + +Respect Browserify's [`"browser"` field](https://github.com/substack/browserify-handbook#browser-field) in `package.json` when resolving modules. Some modules export different versions based on whether they are operating in Node or a browser. + +### `cacheDirectory` [string] + +Default: `"/tmp/"` + +The directory where Jest should store its cached dependency information. + +Jest attempts to scan your dependency tree once (up-front) and cache it in order to ease some of the filesystem raking that needs to happen while running tests. This config option lets you customize where Jest stores that cache data on disk. + +### `clearMocks` [boolean] + +Default: `false` + +Automatically clear mock calls and instances before every test. Equivalent to calling `jest.clearAllMocks()` before each test. This does not remove any mock implementation that may have been provided. + +### `collectCoverage` [boolean] + +Default: `false` + +Indicates whether the coverage information should be collected while executing the test. Because this retrofits all executed files with coverage collection statements, it may significantly slow down your tests. + +### `collectCoverageFrom` [array] + +Default: `undefined` + +An array of [glob patterns](https://github.com/jonschlinkert/micromatch) indicating a set of files for which coverage information should be collected. If a file matches the specified glob pattern, coverage information will be collected for it even if no tests exist for this file and it's never required in the test suite. + +Example: + +```json +{ + "collectCoverageFrom": [ + "**/*.{js,jsx}", + "!**/node_modules/**", + "!**/vendor/**" + ] +} +``` + +This will collect coverage information for all the files inside the project's `rootDir`, except the ones that match `**/node_modules/**` or `**/vendor/**`. + +_Note: This option requires `collectCoverage` to be set to true or Jest to be invoked with `--coverage`._ + +
+ Help: + If you are seeing coverage output such as... + +``` +=============================== Coverage summary =============================== +Statements : Unknown% ( 0/0 ) +Branches : Unknown% ( 0/0 ) +Functions : Unknown% ( 0/0 ) +Lines : Unknown% ( 0/0 ) +================================================================================ +Jest: Coverage data for global was not found. +``` + +Most likely your glob patterns are not matching any files. Refer to the [micromatch](https://github.com/jonschlinkert/micromatch) documentation to ensure your globs are compatible. + +
+ +### `coverageDirectory` [string] + +Default: `undefined` + +The directory where Jest should output its coverage files. + +### `coveragePathIgnorePatterns` [array\] + +Default: `["/node_modules/"]` + +An array of regexp pattern strings that are matched against all file paths before executing the test. If the file path matches any of the patterns, coverage information will be skipped. + +These pattern strings match against the full path. Use the `` string token to include the path to your project's root directory to prevent it from accidentally ignoring all of your files in different environments that may have different root directories. Example: `["/build/", "/node_modules/"]`. + +### `coverageProvider` [string] + +Indicates which provider should be used to instrument code for coverage. Allowed values are `babel` (default) or `v8`. + +Note that using `v8` is considered experimental. This uses V8's builtin code coverage rather than one based on Babel and comes with a few caveats + +1. Your node version must include `vm.compileFunction`, which was introduced in [node 10.10](https://nodejs.org/dist/latest-v12.x/docs/api/vm.html#vm_vm_compilefunction_code_params_options) +1. Tests needs to run in Node test environment (support for `jsdom` requires [`jest-environment-jsdom-sixteen`](https://www.npmjs.com/package/jest-environment-jsdom-sixteen)) +1. V8 has way better data in the later versions, so using the latest versions of node (v13 at the time of this writing) will yield better results + +### `coverageReporters` [array\] + +Default: `["json", "lcov", "text", "clover"]` + +A list of reporter names that Jest uses when writing coverage reports. Any [istanbul reporter](https://github.com/istanbuljs/istanbuljs/tree/master/packages/istanbul-reports/lib) can be used. + +_Note: Setting this option overwrites the default values. Add `"text"` or `"text-summary"` to see a coverage summary in the console output._ + +_Note: You can pass additional options to the istanbul reporter using the tuple form. For example:_ + +```json +["json", ["lcov", {"projectRoot": "../../"}]] +``` + +### `coverageThreshold` [object] + +Default: `undefined` + +This will be used to configure minimum threshold enforcement for coverage results. Thresholds can be specified as `global`, as a [glob](https://github.com/isaacs/node-glob#glob-primer), and as a directory or file path. If thresholds aren't met, jest will fail. Thresholds specified as a positive number are taken to be the minimum percentage required. Thresholds specified as a negative number represent the maximum number of uncovered entities allowed. + +For example, with the following configuration jest will fail if there is less than 80% branch, line, and function coverage, or if there are more than 10 uncovered statements: + +```json +{ + ... + "jest": { + "coverageThreshold": { + "global": { + "branches": 80, + "functions": 80, + "lines": 80, + "statements": -10 + } + } + } +} +``` + +If globs or paths are specified alongside `global`, coverage data for matching paths will be subtracted from overall coverage and thresholds will be applied independently. Thresholds for globs are applied to all files matching the glob. If the file specified by path is not found, error is returned. + +For example, with the following configuration: + +```json +{ + ... + "jest": { + "coverageThreshold": { + "global": { + "branches": 50, + "functions": 50, + "lines": 50, + "statements": 50 + }, + "./src/components/": { + "branches": 40, + "statements": 40 + }, + "./src/reducers/**/*.js": { + "statements": 90 + }, + "./src/api/very-important-module.js": { + "branches": 100, + "functions": 100, + "lines": 100, + "statements": 100 + } + } + } +} +``` + +Jest will fail if: + +- The `./src/components` directory has less than 40% branch or statement coverage. +- One of the files matching the `./src/reducers/**/*.js` glob has less than 90% statement coverage. +- The `./src/api/very-important-module.js` file has less than 100% coverage. +- Every remaining file combined has less than 50% coverage (`global`). + +### `dependencyExtractor` [string] + +Default: `undefined` + +This option allows the use of a custom dependency extractor. It must be a node module that exports an object with an `extract` function. E.g.: + +```javascript +const fs = require('fs'); +const crypto = require('crypto'); + +module.exports = { + extract(code, filePath, defaultExtract) { + const deps = defaultExtract(code, filePath); + // Scan the file and add dependencies in `deps` (which is a `Set`) + return deps; + }, + getCacheKey() { + return crypto + .createHash('md5') + .update(fs.readFileSync(__filename)) + .digest('hex'); + }, +}; +``` + +The `extract` function should return an iterable (`Array`, `Set`, etc.) with the dependencies found in the code. + +That module can also contain a `getCacheKey` function to generate a cache key to determine if the logic has changed and any cached artifacts relying on it should be discarded. + +### `displayName` [string, object] + +default: `undefined` + +Allows for a label to be printed along side a test while it is running. This becomes more useful in multiproject repositories where there can be many jest configuration files. This visually tells which project a test belongs to. Here are sample valid values. + +```js +module.exports = { + displayName: 'CLIENT', +}; +``` + +or + +```js +module.exports = { + displayName: { + name: 'CLIENT', + color: 'blue', + }, +}; +``` + +As a secondary option, an object with the properties `name` and `color` can be passed. This allows for a custom configuration of the background color of the displayName. `displayName` defaults to white when its value is a string. Jest uses [chalk](https://github.com/chalk/chalk) to provide the color. As such, all of the valid options for colors supported by chalk are also supported by jest. + +### `errorOnDeprecated` [boolean] + +Default: `false` + +Make calling deprecated APIs throw helpful error messages. Useful for easing the upgrade process. + +### `extraGlobals` [array\] + +Default: `undefined` + +Test files run inside a [vm](https://nodejs.org/api/vm.html), which slows calls to global context properties (e.g. `Math`). With this option you can specify extra properties to be defined inside the vm for faster lookups. + +For example, if your tests call `Math` often, you can pass it by setting `extraGlobals`. + +```json +{ + ... + "jest": { + "extraGlobals": ["Math"] + } +} +``` + +### `forceCoverageMatch` [array\] + +Default: `['']` + +Test files are normally ignored from collecting code coverage. With this option, you can overwrite this behavior and include otherwise ignored files in code coverage. + +For example, if you have tests in source files named with `.t.js` extension as following: + +```javascript +// sum.t.js + +export function sum(a, b) { + return a + b; +} + +if (process.env.NODE_ENV === 'test') { + test('sum', () => { + expect(sum(1, 2)).toBe(3); + }); +} +``` + +You can collect coverage from those files with setting `forceCoverageMatch`. + +```json +{ + ... + "jest": { + "forceCoverageMatch": ["**/*.t.js"] + } +} +``` + +### `globals` [object] + +Default: `{}` + +A set of global variables that need to be available in all test environments. + +For example, the following would create a global `__DEV__` variable set to `true` in all test environments: + +```json +{ + ... + "jest": { + "globals": { + "__DEV__": true + } + } +} +``` + +Note that, if you specify a global reference value (like an object or array) here, and some code mutates that value in the midst of running a test, that mutation will _not_ be persisted across test runs for other test files. In addition the `globals` object must be json-serializable, so it can't be used to specify global functions. For that you should use `setupFiles`. + +### `globalSetup` [string] + +Default: `undefined` + +This option allows the use of a custom global setup module which exports an async function that is triggered once before all test suites. This function gets Jest's `globalConfig` object as a parameter. + +_Note: A global setup module configured in a project (using multi-project runner) will be triggered only when you run at least one test from this project._ + +_Note: Any global variables that are defined through `globalSetup` can only be read in `globalTeardown`. You cannot retrieve globals defined here in your test suites._ + +_Note: While code transformation is applied to the linked setup-file, Jest will **not** transform any code in `node_modules`. This is due to the need to load the actual transformers (e.g. `babel` or `typescript`) to perform transformation._ + +Example: + +```js +// setup.js +module.exports = async () => { + // ... + // Set reference to mongod in order to close the server during teardown. + global.__MONGOD__ = mongod; +}; +``` + +```js +// teardown.js +module.exports = async function () { + await global.__MONGOD__.stop(); +}; +``` + +### `globalTeardown` [string] + +Default: `undefined` + +This option allows the use of a custom global teardown module which exports an async function that is triggered once after all test suites. This function gets Jest's `globalConfig` object as a parameter. + +_Note: A global teardown module configured in a project (using multi-project runner) will be triggered only when you run at least one test from this project._ + +_Note: The same caveat concerning transformation of `node_modules` as for `globalSetup` applies to `globalTeardown`._ + +### `maxConcurrency` [number] + +Default: `5` + +A number limiting the number of tests that are allowed to run at the same time when using `test.concurrent`. Any test above this limit will be queued and executed once a slot is released. + +### `moduleDirectories` [array\] + +Default: `["node_modules"]` + +An array of directory names to be searched recursively up from the requiring module's location. Setting this option will _override_ the default, if you wish to still search `node_modules` for packages include it along with any other options: `["node_modules", "bower_components"]` + +### `moduleFileExtensions` [array\] + +Default: `["js", "json", "jsx", "ts", "tsx", "node"]` + +An array of file extensions your modules use. If you require modules without specifying a file extension, these are the extensions Jest will look for, in left-to-right order. + +We recommend placing the extensions most commonly used in your project on the left, so if you are using TypeScript, you may want to consider moving "ts" and/or "tsx" to the beginning of the array. + +### `moduleNameMapper` [object\>] + +Default: `null` + +A map from regular expressions to module names or to arrays of module names that allow to stub out resources, like images or styles with a single module. + +Modules that are mapped to an alias are unmocked by default, regardless of whether automocking is enabled or not. + +Use `` string token to refer to [`rootDir`](#rootdir-string) value if you want to use file paths. + +Additionally, you can substitute captured regex groups using numbered backreferences. + +Example: + +```json +{ + "moduleNameMapper": { + "^image![a-zA-Z0-9$_-]+$": "GlobalImageStub", + "^[./a-zA-Z0-9$_-]+\\.png$": "/RelativeImageStub.js", + "module_name_(.*)": "/substituted_module_$1.js", + "assets/(.*)": [ + "/images/$1", + "/photos/$1", + "/recipes/$1" + ] + } +} +``` + +The order in which the mappings are defined matters. Patterns are checked one by one until one fits. The most specific rule should be listed first. This is true for arrays of module names as well. + +_Note: If you provide module name without boundaries `^$` it may cause hard to spot errors. E.g. `relay` will replace all modules which contain `relay` as a substring in its name: `relay`, `react-relay` and `graphql-relay` will all be pointed to your stub._ + +### `modulePathIgnorePatterns` [array\] + +Default: `[]` + +An array of regexp pattern strings that are matched against all module paths before those paths are to be considered 'visible' to the module loader. If a given module's path matches any of the patterns, it will not be `require()`-able in the test environment. + +These pattern strings match against the full path. Use the `` string token to include the path to your project's root directory to prevent it from accidentally ignoring all of your files in different environments that may have different root directories. Example: `["/build/"]`. + +### `modulePaths` [array\] + +Default: `[]` + +An alternative API to setting the `NODE_PATH` env variable, `modulePaths` is an array of absolute paths to additional locations to search when resolving modules. Use the `` string token to include the path to your project's root directory. Example: `["/app/"]`. + +### `notify` [boolean] + +Default: `false` + +Activates notifications for test results. + +**Beware:** Jest uses [node-notifier](https://github.com/mikaelbr/node-notifier) to display desktop notifications. On Windows, it creates a new start menu entry on the first use and not display the notification. Notifications will be properly displayed on subsequent runs + +### `notifyMode` [string] + +Default: `failure-change` + +Specifies notification mode. Requires `notify: true`. + +#### Modes + +- `always`: always send a notification. +- `failure`: send a notification when tests fail. +- `success`: send a notification when tests pass. +- `change`: send a notification when the status changed. +- `success-change`: send a notification when tests pass or once when it fails. +- `failure-change`: send a notification when tests fail or once when it passes. + +### `preset` [string] + +Default: `undefined` + +A preset that is used as a base for Jest's configuration. A preset should point to an npm module that has a `jest-preset.json` or `jest-preset.js` file at the root. + +For example, this preset `foo-bar/jest-preset.js` will be configured as follows: + +```json +{ + "preset": "foo-bar" +} +``` + +Presets may also be relative filesystem paths. + +```json +{ + "preset": "./node_modules/foo-bar/jest-preset.js" +} +``` + +### `prettierPath` [string] + +Default: `'prettier'` + +Sets the path to the [`prettier`](https://prettier.io/) node module used to update inline snapshots. + +### `projects` [array\] + +Default: `undefined` + +When the `projects` configuration is provided with an array of paths or glob patterns, Jest will run tests in all of the specified projects at the same time. This is great for monorepos or when working on multiple projects at the same time. + +```json +{ + "projects": ["", "/examples/*"] +} +``` + +This example configuration will run Jest in the root directory as well as in every folder in the examples directory. You can have an unlimited amount of projects running in the same Jest instance. + +The projects feature can also be used to run multiple configurations or multiple [runners](#runner-string). For this purpose you can pass an array of configuration objects. For example, to run both tests and ESLint (via [jest-runner-eslint](https://github.com/jest-community/jest-runner-eslint)) in the same invocation of Jest: + +```json +{ + "projects": [ + { + "displayName": "test" + }, + { + "displayName": "lint", + "runner": "jest-runner-eslint", + "testMatch": ["/**/*.js"] + } + ] +} +``` + +_Note: When using multi project runner, it's recommended to add a `displayName` for each project. This will show the `displayName` of a project next to its tests._ + +### `reporters` [array\] + +Default: `undefined` + +Use this configuration option to add custom reporters to Jest. A custom reporter is a class that implements `onRunStart`, `onTestStart`, `onTestResult`, `onRunComplete` methods that will be called when any of those events occurs. + +If custom reporters are specified, the default Jest reporters will be overridden. To keep default reporters, `default` can be passed as a module name. + +This will override default reporters: + +```json +{ + "reporters": ["/my-custom-reporter.js"] +} +``` + +This will use custom reporter in addition to default reporters that Jest provides: + +```json +{ + "reporters": ["default", "/my-custom-reporter.js"] +} +``` + +Additionally, custom reporters can be configured by passing an `options` object as a second argument: + +```json +{ + "reporters": [ + "default", + ["/my-custom-reporter.js", {"banana": "yes", "pineapple": "no"}] + ] +} +``` + +Custom reporter modules must define a class that takes a `GlobalConfig` and reporter options as constructor arguments: + +Example reporter: + +```js +// my-custom-reporter.js +class MyCustomReporter { + constructor(globalConfig, options) { + this._globalConfig = globalConfig; + this._options = options; + } + + onRunComplete(contexts, results) { + console.log('Custom reporter output:'); + console.log('GlobalConfig: ', this._globalConfig); + console.log('Options: ', this._options); + } +} + +module.exports = MyCustomReporter; +// or export default MyCustomReporter; +``` + +Custom reporters can also force Jest to exit with non-0 code by returning an Error from `getLastError()` methods + +```js +class MyCustomReporter { + // ... + getLastError() { + if (this._shouldFail) { + return new Error('my-custom-reporter.js reported an error'); + } + } +} +``` + +For the full list of methods and argument types see `Reporter` interface in [packages/jest-reporters/src/types.ts](https://github.com/facebook/jest/blob/master/packages/jest-reporters/src/types.ts) + +### `resetMocks` [boolean] + +Default: `false` + +Automatically reset mock state before every test. Equivalent to calling `jest.resetAllMocks()` before each test. This will lead to any mocks having their fake implementations removed but does not restore their initial implementation. + +### `resetModules` [boolean] + +Default: `false` + +By default, each test file gets its own independent module registry. Enabling `resetModules` goes a step further and resets the module registry before running each individual test. This is useful to isolate modules for every test so that local module state doesn't conflict between tests. This can be done programmatically using [`jest.resetModules()`](JestObjectAPI.md#jestresetmodules). + +### `resolver` [string] + +Default: `undefined` + +This option allows the use of a custom resolver. This resolver must be a node module that exports a function expecting a string as the first argument for the path to resolve and an object with the following structure as the second argument: + +```json +{ + "basedir": string, + "browser": bool, + "defaultResolver": "function(request, options)", + "extensions": [string], + "moduleDirectory": [string], + "paths": [string], + "rootDir": [string] +} +``` + +The function should either return a path to the module that should be resolved or throw an error if the module can't be found. + +Note: the defaultResolver passed as options is the jest default resolver which might be useful when you write your custom one. It takes the same arguments as your custom one, e.g. (request, options). + +### `restoreMocks` [boolean] + +Default: `false` + +Automatically restore mock state before every test. Equivalent to calling `jest.restoreAllMocks()` before each test. This will lead to any mocks having their fake implementations removed and restores their initial implementation. + +### `rootDir` [string] + +Default: The root of the directory containing your Jest [config file](#) _or_ the `package.json` _or_ the [`pwd`](http://en.wikipedia.org/wiki/Pwd) if no `package.json` is found + +The root directory that Jest should scan for tests and modules within. If you put your Jest config inside your `package.json` and want the root directory to be the root of your repo, the value for this config param will default to the directory of the `package.json`. + +Oftentimes, you'll want to set this to `'src'` or `'lib'`, corresponding to where in your repository the code is stored. + +_Note that using `''` as a string token in any other path-based config settings will refer back to this value. So, for example, if you want your [`setupFiles`](#setupfiles-array) config entry to point at the `env-setup.js` file at the root of your project, you could set its value to `["/env-setup.js"]`._ + +### `roots` [array\] + +Default: `[""]` + +A list of paths to directories that Jest should use to search for files in. + +There are times where you only want Jest to search in a single sub-directory (such as cases where you have a `src/` directory in your repo), but prevent it from accessing the rest of the repo. + +_Note: While `rootDir` is mostly used as a token to be re-used in other configuration options, `roots` is used by the internals of Jest to locate **test files and source files**. This applies also when searching for manual mocks for modules from `node_modules` (`__mocks__` will need to live in one of the `roots`)._ + +_Note: By default, `roots` has a single entry `` but there are cases where you may want to have multiple roots within one project, for example `roots: ["/src/", "/tests/"]`._ + +### `runner` [string] + +Default: `"jest-runner"` + +This option allows you to use a custom runner instead of Jest's default test runner. Examples of runners include: + +- [`jest-runner-eslint`](https://github.com/jest-community/jest-runner-eslint) +- [`jest-runner-mocha`](https://github.com/rogeliog/jest-runner-mocha) +- [`jest-runner-tsc`](https://github.com/azz/jest-runner-tsc) +- [`jest-runner-prettier`](https://github.com/keplersj/jest-runner-prettier) + +_Note: The `runner` property value can omit the `jest-runner-` prefix of the package name._ + +To write a test-runner, export a class with which accepts `globalConfig` in the constructor, and has a `runTests` method with the signature: + +```ts +async runTests( + tests: Array, + watcher: TestWatcher, + onStart: OnTestStart, + onResult: OnTestSuccess, + onFailure: OnTestFailure, + options: TestRunnerOptions, +): Promise +``` + +If you need to restrict your test-runner to only run in serial rather than being executed in parallel your class should have the property `isSerial` to be set as `true`. + +### `setupFiles` [array] + +Default: `[]` + +A list of paths to modules that run some code to configure or set up the testing environment. Each setupFile will be run once per test file. Since every test runs in its own environment, these scripts will be executed in the testing environment immediately before executing the test code itself. + +It's also worth noting that `setupFiles` will execute _before_ [`setupFilesAfterEnv`](#setupfilesafterenv-array). + +### `setupFilesAfterEnv` [array] + +Default: `[]` + +A list of paths to modules that run some code to configure or set up the testing framework before each test file in the suite is executed. Since [`setupFiles`](#setupfiles-array) executes before the test framework is installed in the environment, this script file presents you the opportunity of running some code immediately after the test framework has been installed in the environment. + +If you want a path to be [relative to the root directory of your project](#rootdir-string), please include `` inside a path's string, like `"/a-configs-folder"`. + +For example, Jest ships with several plug-ins to `jasmine` that work by monkey-patching the jasmine API. If you wanted to add even more jasmine plugins to the mix (or if you wanted some custom, project-wide matchers for example), you could do so in these modules. + +_Note: `setupTestFrameworkScriptFile` is deprecated in favor of `setupFilesAfterEnv`._ + +Example `setupFilesAfterEnv` array in a jest.config.js: + +```js +module.exports = { + setupFilesAfterEnv: ['./jest.setup.js'], +}; +``` + +Example `jest.setup.js` file + +```js +jest.setTimeout(10000); // in milliseconds +``` + +### `snapshotResolver` [string] + +Default: `undefined` + +The path to a module that can resolve test<->snapshot path. This config option lets you customize where Jest stores snapshot files on disk. + +Example snapshot resolver module: + +```js +module.exports = { + // resolves from test to snapshot path + resolveSnapshotPath: (testPath, snapshotExtension) => + testPath.replace('__tests__', '__snapshots__') + snapshotExtension, + + // resolves from snapshot to test path + resolveTestPath: (snapshotFilePath, snapshotExtension) => + snapshotFilePath + .replace('__snapshots__', '__tests__') + .slice(0, -snapshotExtension.length), + + // Example test path, used for preflight consistency check of the implementation above + testPathForConsistencyCheck: 'some/__tests__/example.test.js', +}; +``` + +### `snapshotSerializers` [array\] + +Default: `[]` + +A list of paths to snapshot serializer modules Jest should use for snapshot testing. + +Jest has default serializers for built-in JavaScript types, HTML elements (Jest 20.0.0+), ImmutableJS (Jest 20.0.0+) and for React elements. See [snapshot test tutorial](TutorialReactNative.md#snapshot-test) for more information. + +Example serializer module: + +```js +// my-serializer-module +module.exports = { + serialize(val, config, indentation, depth, refs, printer) { + return 'Pretty foo: ' + printer(val.foo); + }, + + test(val) { + return val && val.hasOwnProperty('foo'); + }, +}; +``` + +`printer` is a function that serializes a value using existing plugins. + +To use `my-serializer-module` as a serializer, configuration would be as follows: + +```json +{ + ... + "jest": { + "snapshotSerializers": ["my-serializer-module"] + } +} +``` + +Finally tests would look as follows: + +```js +test(() => { + const bar = { + foo: { + x: 1, + y: 2, + }, + }; + + expect(bar).toMatchSnapshot(); +}); +``` + +Rendered snapshot: + +```json +Pretty foo: Object { + "x": 1, + "y": 2, +} +``` + +To make a dependency explicit instead of implicit, you can call [`expect.addSnapshotSerializer`](ExpectAPI.md#expectaddsnapshotserializerserializer) to add a module for an individual test file instead of adding its path to `snapshotSerializers` in Jest configuration. + +More about serializers API can be found [here](https://github.com/facebook/jest/tree/master/packages/pretty-format/README.md#serialize). + +### `testEnvironment` [string] + +Default: `"jsdom"` + +The test environment that will be used for testing. The default environment in Jest is a browser-like environment through [jsdom](https://github.com/tmpvar/jsdom). If you are building a node service, you can use the `node` option to use a node-like environment instead. + +By adding a `@jest-environment` docblock at the top of the file, you can specify another environment to be used for all tests in that file: + +```js +/** + * @jest-environment jsdom + */ + +test('use jsdom in this test file', () => { + const element = document.createElement('div'); + expect(element).not.toBeNull(); +}); +``` + +You can create your own module that will be used for setting up the test environment. The module must export a class with `setup`, `teardown` and `runScript` methods. You can also pass variables from this module to your test suites by assigning them to `this.global` object – this will make them available in your test suites as global variables. + +The class may optionally expose an asynchronous `handleTestEvent` method to bind to events fired by [`jest-circus`](https://github.com/facebook/jest/tree/master/packages/jest-circus). Normally, `jest-circus` test runner would pause until a promise returned from `handleTestEvent` gets fulfilled, **except for the next events**: `start_describe_definition`, `finish_describe_definition`, `add_hook`, `add_test` or `error` (for the up-to-date list you can look at [SyncEvent type in the types definitions](https://github.com/facebook/jest/tree/master/packages/jest-types/src/Circus.ts)). That is caused by backward compatibility reasons and `process.on('unhandledRejection', callback)` signature, but that usually should not be a problem for most of the use cases. + +Any docblock pragmas in test files will be passed to the environment constructor and can be used for per-test configuration. If the pragma does not have a value, it will be present in the object with it's value set to an empty string. If the pragma is not present, it will not be present in the object. + +_Note: TestEnvironment is sandboxed. Each test suite will trigger setup/teardown in their own TestEnvironment._ + +Example: + +```js +// my-custom-environment +const NodeEnvironment = require('jest-environment-node'); + +class CustomEnvironment extends NodeEnvironment { + constructor(config, context) { + super(config, context); + this.testPath = context.testPath; + this.docblockPragmas = context.docblockPragmas; + } + + async setup() { + await super.setup(); + await someSetupTasks(this.testPath); + this.global.someGlobalObject = createGlobalObject(); + + // Will trigger if docblock contains @my-custom-pragma my-pragma-value + if (this.docblockPragmas['my-custom-pragma'] === 'my-pragma-value') { + // ... + } + } + + async teardown() { + this.global.someGlobalObject = destroyGlobalObject(); + await someTeardownTasks(); + await super.teardown(); + } + + runScript(script) { + return super.runScript(script); + } + + async handleTestEvent(event, state) { + if (event.name === 'test_start') { + // ... + } + } +} + +module.exports = CustomEnvironment; +``` + +```js +// my-test-suite +let someGlobalObject; + +beforeAll(() => { + someGlobalObject = global.someGlobalObject; +}); +``` + +### `testEnvironmentOptions` [Object] + +Default: `{}` + +Test environment options that will be passed to the `testEnvironment`. The relevant options depend on the environment. For example you can override options given to [jsdom](https://github.com/tmpvar/jsdom) such as `{userAgent: "Agent/007"}`. + +### `testMatch` [array\] + +(default: `[ "**/__tests__/**/*.[jt]s?(x)", "**/?(*.)+(spec|test).[jt]s?(x)" ]`) + +The glob patterns Jest uses to detect test files. By default it looks for `.js`, `.jsx`, `.ts` and `.tsx` files inside of `__tests__` folders, as well as any files with a suffix of `.test` or `.spec` (e.g. `Component.test.js` or `Component.spec.js`). It will also find files called `test.js` or `spec.js`. + +See the [micromatch](https://github.com/jonschlinkert/micromatch) package for details of the patterns you can specify. + +See also [`testRegex` [string | array\]](#testregex-string--arraystring), but note that you cannot specify both options. + +### `testPathIgnorePatterns` [array\] + +Default: `["/node_modules/"]` + +An array of regexp pattern strings that are matched against all test paths before executing the test. If the test path matches any of the patterns, it will be skipped. + +These pattern strings match against the full path. Use the `` string token to include the path to your project's root directory to prevent it from accidentally ignoring all of your files in different environments that may have different root directories. Example: `["/build/", "/node_modules/"]`. + +### `testRegex` [string | array\] + +Default: `(/__tests__/.*|(\\.|/)(test|spec))\\.[jt]sx?$` + +The pattern or patterns Jest uses to detect test files. By default it looks for `.js`, `.jsx`, `.ts` and `.tsx` files inside of `__tests__` folders, as well as any files with a suffix of `.test` or `.spec` (e.g. `Component.test.js` or `Component.spec.js`). It will also find files called `test.js` or `spec.js`. See also [`testMatch` [array\]](#testmatch-arraystring), but note that you cannot specify both options. + +The following is a visualization of the default regex: + +```bash +├── __tests__ +│ └── component.spec.js # test +│ └── anything # test +├── package.json # not test +├── foo.test.js # test +├── bar.spec.jsx # test +└── component.js # not test +``` + +_Note: `testRegex` will try to detect test files using the **absolute file path** therefore having a folder with name that match it will run all the files as tests_ + +### `testResultsProcessor` [string] + +Default: `undefined` + +This option allows the use of a custom results processor. This processor must be a node module that exports a function expecting an object with the following structure as the first argument and return it: + +```json +{ + "success": bool, + "startTime": epoch, + "numTotalTestSuites": number, + "numPassedTestSuites": number, + "numFailedTestSuites": number, + "numRuntimeErrorTestSuites": number, + "numTotalTests": number, + "numPassedTests": number, + "numFailedTests": number, + "numPendingTests": number, + "numTodoTests": number, + "openHandles": Array, + "testResults": [{ + "numFailingTests": number, + "numPassingTests": number, + "numPendingTests": number, + "testResults": [{ + "title": string (message in it block), + "status": "failed" | "pending" | "passed", + "ancestorTitles": [string (message in describe blocks)], + "failureMessages": [string], + "numPassingAsserts": number, + "location": { + "column": number, + "line": number + } + }, + ... + ], + "perfStats": { + "start": epoch, + "end": epoch + }, + "testFilePath": absolute path to test file, + "coverage": {} + }, + ... + ] +} +``` + +### `testRunner` [string] + +Default: `jasmine2` + +This option allows use of a custom test runner. The default is jasmine2. A custom test runner can be provided by specifying a path to a test runner implementation. + +The test runner module must export a function with the following signature: + +```ts +function testRunner( + globalConfig: GlobalConfig, + config: ProjectConfig, + environment: Environment, + runtime: Runtime, + testPath: string, +): Promise; +``` + +An example of such function can be found in our default [jasmine2 test runner package](https://github.com/facebook/jest/blob/master/packages/jest-jasmine2/src/index.ts). + +### `testSequencer` [string] + +Default: `@jest/test-sequencer` + +This option allows you to use a custom sequencer instead of Jest's default. `sort` may optionally return a Promise. + +Example: + +Sort test path alphabetically. + +```js +const Sequencer = require('@jest/test-sequencer').default; + +class CustomSequencer extends Sequencer { + sort(tests) { + // Test structure information + // https://github.com/facebook/jest/blob/6b8b1404a1d9254e7d5d90a8934087a9c9899dab/packages/jest-runner/src/types.ts#L17-L21 + const copyTests = Array.from(tests); + return copyTests.sort((testA, testB) => (testA.path > testB.path ? 1 : -1)); + } +} + +module.exports = CustomSequencer; +``` + +### `testTimeout` [number] + +Default: `5000` + +Default timeout of a test in milliseconds. + +### `testURL` [string] + +Default: `http://localhost` + +This option sets the URL for the jsdom environment. It is reflected in properties such as `location.href`. + +### `timers` [string] + +Default: `real` + +Setting this value to `fake` allows the use of fake timers for functions such as `setTimeout`. Fake timers are useful when a piece of code sets a long timeout that we don't want to wait for in a test. + +### `transform` [object\] + +Default: `undefined` + +A map from regular expressions to paths to transformers. A transformer is a module that provides a synchronous function for transforming source files. For example, if you wanted to be able to use a new language feature in your modules or tests that isn't yet supported by node, you might plug in one of many compilers that compile a future version of JavaScript to a current one. Example: see the [examples/typescript](https://github.com/facebook/jest/blob/master/examples/typescript/package.json#L16) example or the [webpack tutorial](Webpack.md). + +Examples of such compilers include: + +- [Babel](https://babeljs.io/) +- [TypeScript](http://www.typescriptlang.org/) +- [async-to-gen](http://github.com/leebyron/async-to-gen#jest) +- To build your own please visit the [Custom Transformer](TutorialReact.md#custom-transformers) section + +You can pass configuration to a transformer like `{filePattern: ['path-to-transformer', {options}]}` For example, to configure babel-jest for non-default behavior, `{"\\.js$": ['babel-jest', {rootMode: "upward"}]}` + +_Note: a transformer is only run once per file unless the file has changed. During development of a transformer it can be useful to run Jest with `--no-cache` to frequently [delete Jest's cache](Troubleshooting.md#caching-issues)._ + +_Note: if you are using the `babel-jest` transformer and want to use an additional code preprocessor, keep in mind that when "transform" is overwritten in any way the `babel-jest` is not loaded automatically anymore. If you want to use it to compile JavaScript code it has to be explicitly defined. See [babel-jest plugin](https://github.com/facebook/jest/tree/master/packages/babel-jest#setup)_ + +### `transformIgnorePatterns` [array\] + +Default: `["/node_modules/"]` + +An array of regexp pattern strings that are matched against all source file paths before transformation. If the test path matches any of the patterns, it will not be transformed. + +These pattern strings match against the full path. Use the `` string token to include the path to your project's root directory to prevent it from accidentally ignoring all of your files in different environments that may have different root directories. + +Example: `["/bower_components/", "/node_modules/"]`. + +Sometimes it happens (especially in React Native or TypeScript projects) that 3rd party modules are published as untranspiled. Since all files inside `node_modules` are not transformed by default, Jest will not understand the code in these modules, resulting in syntax errors. To overcome this, you may use `transformIgnorePatterns` to whitelist such modules. You'll find a good example of this use case in [React Native Guide](https://jestjs.io/docs/en/tutorial-react-native#transformignorepatterns-customization). + +### `unmockedModulePathPatterns` [array\] + +Default: `[]` + +An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them. If a module's path matches any of the patterns in this list, it will not be automatically mocked by the module loader. + +This is useful for some commonly used 'utility' modules that are almost always used as implementation details almost all the time (like underscore/lo-dash, etc). It's generally a best practice to keep this list as small as possible and always use explicit `jest.mock()`/`jest.unmock()` calls in individual tests. Explicit per-test setup is far easier for other readers of the test to reason about the environment the test will run in. + +It is possible to override this setting in individual tests by explicitly calling `jest.mock()` at the top of the test file. + +### `verbose` [boolean] + +Default: `false` + +Indicates whether each individual test should be reported during the run. All errors will also still be shown on the bottom after execution. Note that if there is only one test file being run it will default to `true`. + +### `watchPathIgnorePatterns` [array\] + +Default: `[]` + +An array of RegExp patterns that are matched against all source file paths before re-running tests in watch mode. If the file path matches any of the patterns, when it is updated, it will not trigger a re-run of tests. + +These patterns match against the full path. Use the `` string token to include the path to your project's root directory to prevent it from accidentally ignoring all of your files in different environments that may have different root directories. Example: `["/node_modules/"]`. + +Even if nothing is specified here, the watcher will ignore changes to any hidden files and directories, i.e. files and folders that begins with a dot (`.`). + +### `watchPlugins` [array\] + +Default: `[]` + +This option allows you to use a custom watch plugins. Read more about watch plugins [here](watch-plugins). + +Examples of watch plugins include: + +- [`jest-watch-master`](https://github.com/rickhanlonii/jest-watch-master) +- [`jest-watch-select-projects`](https://github.com/rogeliog/jest-watch-select-projects) +- [`jest-watch-suspend`](https://github.com/unional/jest-watch-suspend) +- [`jest-watch-typeahead`](https://github.com/jest-community/jest-watch-typeahead) +- [`jest-watch-yarn-workspaces`](https://github.com/cameronhunter/jest-watch-directories/tree/master/packages/jest-watch-yarn-workspaces) + +_Note: The values in the `watchPlugins` property value can omit the `jest-watch-` prefix of the package name._ + +### `//` [string] + +No default + +This option allow comments in `package.json`. Include the comment text as the value of this key anywhere in `package.json`. + +Example: + +```json +{ + "name": "my-project", + "jest": { + "//": "Comment goes here", + "verbose": true + } +} +``` diff --git a/website/versioned_docs/version-25.5/Es6ClassMocks.md b/website/versioned_docs/version-25.5/Es6ClassMocks.md new file mode 100644 index 000000000000..f84c438025f4 --- /dev/null +++ b/website/versioned_docs/version-25.5/Es6ClassMocks.md @@ -0,0 +1,364 @@ +--- +id: version-25.5-es6-class-mocks +title: ES6 Class Mocks +original_id: es6-class-mocks +--- + +Jest can be used to mock ES6 classes that are imported into files you want to test. + +ES6 classes are constructor functions with some syntactic sugar. Therefore, any mock for an ES6 class must be a function or an actual ES6 class (which is, again, another function). So you can mock them using [mock functions](MockFunctions.md). + +## An ES6 Class Example + +We'll use a contrived example of a class that plays sound files, `SoundPlayer`, and a consumer class which uses that class, `SoundPlayerConsumer`. We'll mock `SoundPlayer` in our tests for `SoundPlayerConsumer`. + +```javascript +// sound-player.js +export default class SoundPlayer { + constructor() { + this.foo = 'bar'; + } + + playSoundFile(fileName) { + console.log('Playing sound file ' + fileName); + } +} +``` + +```javascript +// sound-player-consumer.js +import SoundPlayer from './sound-player'; + +export default class SoundPlayerConsumer { + constructor() { + this.soundPlayer = new SoundPlayer(); + } + + playSomethingCool() { + const coolSoundFileName = 'song.mp3'; + this.soundPlayer.playSoundFile(coolSoundFileName); + } +} +``` + +## The 4 ways to create an ES6 class mock + +### Automatic mock + +Calling `jest.mock('./sound-player')` returns a useful "automatic mock" you can use to spy on calls to the class constructor and all of its methods. It replaces the ES6 class with a mock constructor, and replaces all of its methods with [mock functions](MockFunctions.md) that always return `undefined`. Method calls are saved in `theAutomaticMock.mock.instances[index].methodName.mock.calls`. + +Please note that if you use arrow functions in your classes, they will _not_ be part of the mock. The reason for that is that arrow functions are not present on the object's prototype, they are merely properties holding a reference to a function. + +If you don't need to replace the implementation of the class, this is the easiest option to set up. For example: + +```javascript +import SoundPlayer from './sound-player'; +import SoundPlayerConsumer from './sound-player-consumer'; +jest.mock('./sound-player'); // SoundPlayer is now a mock constructor + +beforeEach(() => { + // Clear all instances and calls to constructor and all methods: + SoundPlayer.mockClear(); +}); + +it('We can check if the consumer called the class constructor', () => { + const soundPlayerConsumer = new SoundPlayerConsumer(); + expect(SoundPlayer).toHaveBeenCalledTimes(1); +}); + +it('We can check if the consumer called a method on the class instance', () => { + // Show that mockClear() is working: + expect(SoundPlayer).not.toHaveBeenCalled(); + + const soundPlayerConsumer = new SoundPlayerConsumer(); + // Constructor should have been called again: + expect(SoundPlayer).toHaveBeenCalledTimes(1); + + const coolSoundFileName = 'song.mp3'; + soundPlayerConsumer.playSomethingCool(); + + // mock.instances is available with automatic mocks: + const mockSoundPlayerInstance = SoundPlayer.mock.instances[0]; + const mockPlaySoundFile = mockSoundPlayerInstance.playSoundFile; + expect(mockPlaySoundFile.mock.calls[0][0]).toEqual(coolSoundFileName); + // Equivalent to above check: + expect(mockPlaySoundFile).toHaveBeenCalledWith(coolSoundFileName); + expect(mockPlaySoundFile).toHaveBeenCalledTimes(1); +}); +``` + +### Manual mock + +Create a [manual mock](ManualMocks.md) by saving a mock implementation in the `__mocks__` folder. This allows you to specify the implementation, and it can be used across test files. + +```javascript +// __mocks__/sound-player.js + +// Import this named export into your test file: +export const mockPlaySoundFile = jest.fn(); +const mock = jest.fn().mockImplementation(() => { + return {playSoundFile: mockPlaySoundFile}; +}); + +export default mock; +``` + +Import the mock and the mock method shared by all instances: + +```javascript +// sound-player-consumer.test.js +import SoundPlayer, {mockPlaySoundFile} from './sound-player'; +import SoundPlayerConsumer from './sound-player-consumer'; +jest.mock('./sound-player'); // SoundPlayer is now a mock constructor + +beforeEach(() => { + // Clear all instances and calls to constructor and all methods: + SoundPlayer.mockClear(); + mockPlaySoundFile.mockClear(); +}); + +it('We can check if the consumer called the class constructor', () => { + const soundPlayerConsumer = new SoundPlayerConsumer(); + expect(SoundPlayer).toHaveBeenCalledTimes(1); +}); + +it('We can check if the consumer called a method on the class instance', () => { + const soundPlayerConsumer = new SoundPlayerConsumer(); + const coolSoundFileName = 'song.mp3'; + soundPlayerConsumer.playSomethingCool(); + expect(mockPlaySoundFile).toHaveBeenCalledWith(coolSoundFileName); +}); +``` + +### Calling [`jest.mock()`](JestObjectAPI.md#jestmockmodulename-factory-options) with the module factory parameter + +`jest.mock(path, moduleFactory)` takes a **module factory** argument. A module factory is a function that returns the mock. + +In order to mock a constructor function, the module factory must return a constructor function. In other words, the module factory must be a function that returns a function - a higher-order function (HOF). + +```javascript +import SoundPlayer from './sound-player'; +const mockPlaySoundFile = jest.fn(); +jest.mock('./sound-player', () => { + return jest.fn().mockImplementation(() => { + return {playSoundFile: mockPlaySoundFile}; + }); +}); +``` + +A limitation with the factory parameter is that, since calls to `jest.mock()` are hoisted to the top of the file, it's not possible to first define a variable and then use it in the factory. An exception is made for variables that start with the word 'mock'. It's up to you to guarantee that they will be initialized on time! For example, the following will throw an out-of-scope error due to the use of 'fake' instead of 'mock' in the variable declaration: + +```javascript +// Note: this will fail +import SoundPlayer from './sound-player'; +const fakePlaySoundFile = jest.fn(); +jest.mock('./sound-player', () => { + return jest.fn().mockImplementation(() => { + return {playSoundFile: fakePlaySoundFile}; + }); +}); +``` + +### Replacing the mock using [`mockImplementation()`](MockFunctionAPI.md#mockfnmockimplementationfn) or [`mockImplementationOnce()`](MockFunctionAPI.md#mockfnmockimplementationoncefn) + +You can replace all of the above mocks in order to change the implementation, for a single test or all tests, by calling `mockImplementation()` on the existing mock. + +Calls to jest.mock are hoisted to the top of the code. You can specify a mock later, e.g. in `beforeAll()`, by calling `mockImplementation()` (or `mockImplementationOnce()`) on the existing mock instead of using the factory parameter. This also allows you to change the mock between tests, if needed: + +```javascript +import SoundPlayer from './sound-player'; +import SoundPlayerConsumer from './sound-player-consumer'; + +jest.mock('./sound-player'); + +describe('When SoundPlayer throws an error', () => { + beforeAll(() => { + SoundPlayer.mockImplementation(() => { + return { + playSoundFile: () => { + throw new Error('Test error'); + }, + }; + }); + }); + + it('Should throw an error when calling playSomethingCool', () => { + const soundPlayerConsumer = new SoundPlayerConsumer(); + expect(() => soundPlayerConsumer.playSomethingCool()).toThrow(); + }); +}); +``` + +## In depth: Understanding mock constructor functions + +Building your constructor function mock using `jest.fn().mockImplementation()` makes mocks appear more complicated than they really are. This section shows how you can create your own mocks to illustrate how mocking works. + +### Manual mock that is another ES6 class + +If you define an ES6 class using the same filename as the mocked class in the `__mocks__` folder, it will serve as the mock. This class will be used in place of the real class. This allows you to inject a test implementation for the class, but does not provide a way to spy on calls. + +For the contrived example, the mock might look like this: + +```javascript +// __mocks__/sound-player.js +export default class SoundPlayer { + constructor() { + console.log('Mock SoundPlayer: constructor was called'); + } + + playSoundFile() { + console.log('Mock SoundPlayer: playSoundFile was called'); + } +} +``` + +### Mock using module factory parameter + +The module factory function passed to `jest.mock(path, moduleFactory)` can be a HOF that returns a function\*. This will allow calling `new` on the mock. Again, this allows you to inject different behavior for testing, but does not provide a way to spy on calls. + +#### \* Module factory function must return a function + +In order to mock a constructor function, the module factory must return a constructor function. In other words, the module factory must be a function that returns a function - a higher-order function (HOF). + +```javascript +jest.mock('./sound-player', () => { + return function () { + return {playSoundFile: () => {}}; + }; +}); +``` + +**_Note: Arrow functions won't work_** + +Note that the mock can't be an arrow function because calling `new` on an arrow function is not allowed in JavaScript. So this won't work: + +```javascript +jest.mock('./sound-player', () => { + return () => { + // Does not work; arrow functions can't be called with new + return {playSoundFile: () => {}}; + }; +}); +``` + +This will throw **_TypeError: \_soundPlayer2.default is not a constructor_**, unless the code is transpiled to ES5, e.g. by `@babel/preset-env`. (ES5 doesn't have arrow functions nor classes, so both will be transpiled to plain functions.) + +## Keeping track of usage (spying on the mock) + +Injecting a test implementation is helpful, but you will probably also want to test whether the class constructor and methods are called with the correct parameters. + +### Spying on the constructor + +In order to track calls to the constructor, replace the function returned by the HOF with a Jest mock function. Create it with [`jest.fn()`](JestObjectAPI.md#jestfnimplementation), and then specify its implementation with `mockImplementation()`. + +```javascript +import SoundPlayer from './sound-player'; +jest.mock('./sound-player', () => { + // Works and lets you check for constructor calls: + return jest.fn().mockImplementation(() => { + return {playSoundFile: () => {}}; + }); +}); +``` + +This will let us inspect usage of our mocked class, using `SoundPlayer.mock.calls`: `expect(SoundPlayer).toHaveBeenCalled();` or near-equivalent: `expect(SoundPlayer.mock.calls.length).toEqual(1);` + +### Mocking non default class exports + +If the class is **not** the default export from the module then you need to return an object with the key that is the same as the class export name. + +```javascript +import {SoundPlayer} from './sound-player'; +jest.mock('./sound-player', () => { + // Works and lets you check for constructor calls: + return { + SoundPlayer: jest.fn().mockImplementation(() => { + return {playSoundFile: () => {}}; + }), + }; +}); +``` + +### Spying on methods of our class + +Our mocked class will need to provide any member functions (`playSoundFile` in the example) that will be called during our tests, or else we'll get an error for calling a function that doesn't exist. But we'll probably want to also spy on calls to those methods, to ensure that they were called with the expected parameters. + +A new object will be created each time the mock constructor function is called during tests. To spy on method calls in all of these objects, we populate `playSoundFile` with another mock function, and store a reference to that same mock function in our test file, so it's available during tests. + +```javascript +import SoundPlayer from './sound-player'; +const mockPlaySoundFile = jest.fn(); +jest.mock('./sound-player', () => { + return jest.fn().mockImplementation(() => { + return {playSoundFile: mockPlaySoundFile}; + // Now we can track calls to playSoundFile + }); +}); +``` + +The manual mock equivalent of this would be: + +```javascript +// __mocks__/sound-player.js + +// Import this named export into your test file +export const mockPlaySoundFile = jest.fn(); +const mock = jest.fn().mockImplementation(() => { + return {playSoundFile: mockPlaySoundFile}; +}); + +export default mock; +``` + +Usage is similar to the module factory function, except that you can omit the second argument from `jest.mock()`, and you must import the mocked method into your test file, since it is no longer defined there. Use the original module path for this; don't include `__mocks__`. + +### Cleaning up between tests + +To clear the record of calls to the mock constructor function and its methods, we call [`mockClear()`](MockFunctionAPI.md#mockfnmockclear) in the `beforeEach()` function: + +```javascript +beforeEach(() => { + SoundPlayer.mockClear(); + mockPlaySoundFile.mockClear(); +}); +``` + +## Complete example + +Here's a complete test file which uses the module factory parameter to `jest.mock`: + +```javascript +// sound-player-consumer.test.js +import SoundPlayerConsumer from './sound-player-consumer'; +import SoundPlayer from './sound-player'; + +const mockPlaySoundFile = jest.fn(); +jest.mock('./sound-player', () => { + return jest.fn().mockImplementation(() => { + return {playSoundFile: mockPlaySoundFile}; + }); +}); + +beforeEach(() => { + SoundPlayer.mockClear(); + mockPlaySoundFile.mockClear(); +}); + +it('The consumer should be able to call new() on SoundPlayer', () => { + const soundPlayerConsumer = new SoundPlayerConsumer(); + // Ensure constructor created the object: + expect(soundPlayerConsumer).toBeTruthy(); +}); + +it('We can check if the consumer called the class constructor', () => { + const soundPlayerConsumer = new SoundPlayerConsumer(); + expect(SoundPlayer).toHaveBeenCalledTimes(1); +}); + +it('We can check if the consumer called a method on the class instance', () => { + const soundPlayerConsumer = new SoundPlayerConsumer(); + const coolSoundFileName = 'song.mp3'; + soundPlayerConsumer.playSomethingCool(); + expect(mockPlaySoundFile.mock.calls[0][0]).toEqual(coolSoundFileName); +}); +``` diff --git a/website/versioned_docs/version-25.5/GlobalAPI.md b/website/versioned_docs/version-25.5/GlobalAPI.md new file mode 100644 index 000000000000..872aa7c6fa5d --- /dev/null +++ b/website/versioned_docs/version-25.5/GlobalAPI.md @@ -0,0 +1,676 @@ +--- +id: version-25.5-api +title: Globals +original_id: api +--- + +In your test files, Jest puts each of these methods and objects into the global environment. You don't have to require or import anything to use them. However, if you prefer explicit imports, you can do `import {describe, expect, it} from '@jest/globals'`. + +## Methods + + + +--- + +## Reference + +### `afterAll(fn, timeout)` + +Runs a function after all the tests in this file have completed. If the function returns a promise or is a generator, Jest waits for that promise to resolve before continuing. + +Optionally, you can provide a `timeout` (in milliseconds) for specifying how long to wait before aborting. _Note: The default timeout is 5 seconds._ + +This is often useful if you want to clean up some global setup state that is shared across tests. + +For example: + +```js +const globalDatabase = makeGlobalDatabase(); + +function cleanUpDatabase(db) { + db.cleanUp(); +} + +afterAll(() => { + cleanUpDatabase(globalDatabase); +}); + +test('can find things', () => { + return globalDatabase.find('thing', {}, results => { + expect(results.length).toBeGreaterThan(0); + }); +}); + +test('can insert a thing', () => { + return globalDatabase.insert('thing', makeThing(), response => { + expect(response.success).toBeTruthy(); + }); +}); +``` + +Here the `afterAll` ensures that `cleanUpDatabase` is called after all tests run. + +If `afterAll` is inside a `describe` block, it runs at the end of the describe block. + +If you want to run some cleanup after every test instead of after all tests, use `afterEach` instead. + +### `afterEach(fn, timeout)` + +Runs a function after each one of the tests in this file completes. If the function returns a promise or is a generator, Jest waits for that promise to resolve before continuing. + +Optionally, you can provide a `timeout` (in milliseconds) for specifying how long to wait before aborting. _Note: The default timeout is 5 seconds._ + +This is often useful if you want to clean up some temporary state that is created by each test. + +For example: + +```js +const globalDatabase = makeGlobalDatabase(); + +function cleanUpDatabase(db) { + db.cleanUp(); +} + +afterEach(() => { + cleanUpDatabase(globalDatabase); +}); + +test('can find things', () => { + return globalDatabase.find('thing', {}, results => { + expect(results.length).toBeGreaterThan(0); + }); +}); + +test('can insert a thing', () => { + return globalDatabase.insert('thing', makeThing(), response => { + expect(response.success).toBeTruthy(); + }); +}); +``` + +Here the `afterEach` ensures that `cleanUpDatabase` is called after each test runs. + +If `afterEach` is inside a `describe` block, it only runs after the tests that are inside this describe block. + +If you want to run some cleanup just once, after all of the tests run, use `afterAll` instead. + +### `beforeAll(fn, timeout)` + +Runs a function before any of the tests in this file run. If the function returns a promise or is a generator, Jest waits for that promise to resolve before running tests. + +Optionally, you can provide a `timeout` (in milliseconds) for specifying how long to wait before aborting. _Note: The default timeout is 5 seconds._ + +This is often useful if you want to set up some global state that will be used by many tests. + +For example: + +```js +const globalDatabase = makeGlobalDatabase(); + +beforeAll(() => { + // Clears the database and adds some testing data. + // Jest will wait for this promise to resolve before running tests. + return globalDatabase.clear().then(() => { + return globalDatabase.insert({testData: 'foo'}); + }); +}); + +// Since we only set up the database once in this example, it's important +// that our tests don't modify it. +test('can find things', () => { + return globalDatabase.find('thing', {}, results => { + expect(results.length).toBeGreaterThan(0); + }); +}); +``` + +Here the `beforeAll` ensures that the database is set up before tests run. If setup was synchronous, you could do this without `beforeAll`. The key is that Jest will wait for a promise to resolve, so you can have asynchronous setup as well. + +If `beforeAll` is inside a `describe` block, it runs at the beginning of the describe block. + +If you want to run something before every test instead of before any test runs, use `beforeEach` instead. + +### `beforeEach(fn, timeout)` + +Runs a function before each of the tests in this file runs. If the function returns a promise or is a generator, Jest waits for that promise to resolve before running the test. + +Optionally, you can provide a `timeout` (in milliseconds) for specifying how long to wait before aborting. _Note: The default timeout is 5 seconds._ + +This is often useful if you want to reset some global state that will be used by many tests. + +For example: + +```js +const globalDatabase = makeGlobalDatabase(); + +beforeEach(() => { + // Clears the database and adds some testing data. + // Jest will wait for this promise to resolve before running tests. + return globalDatabase.clear().then(() => { + return globalDatabase.insert({testData: 'foo'}); + }); +}); + +test('can find things', () => { + return globalDatabase.find('thing', {}, results => { + expect(results.length).toBeGreaterThan(0); + }); +}); + +test('can insert a thing', () => { + return globalDatabase.insert('thing', makeThing(), response => { + expect(response.success).toBeTruthy(); + }); +}); +``` + +Here the `beforeEach` ensures that the database is reset for each test. + +If `beforeEach` is inside a `describe` block, it runs for each test in the describe block. + +If you only need to run some setup code once, before any tests run, use `beforeAll` instead. + +### `describe(name, fn)` + +`describe(name, fn)` creates a block that groups together several related tests. For example, if you have a `myBeverage` object that is supposed to be delicious but not sour, you could test it with: + +```js +const myBeverage = { + delicious: true, + sour: false, +}; + +describe('my beverage', () => { + test('is delicious', () => { + expect(myBeverage.delicious).toBeTruthy(); + }); + + test('is not sour', () => { + expect(myBeverage.sour).toBeFalsy(); + }); +}); +``` + +This isn't required - you can write the `test` blocks directly at the top level. But this can be handy if you prefer your tests to be organized into groups. + +You can also nest `describe` blocks if you have a hierarchy of tests: + +```js +const binaryStringToNumber = binString => { + if (!/^[01]+$/.test(binString)) { + throw new CustomError('Not a binary number.'); + } + + return parseInt(binString, 2); +}; + +describe('binaryStringToNumber', () => { + describe('given an invalid binary string', () => { + test('composed of non-numbers throws CustomError', () => { + expect(() => binaryStringToNumber('abc')).toThrowError(CustomError); + }); + + test('with extra whitespace throws CustomError', () => { + expect(() => binaryStringToNumber(' 100')).toThrowError(CustomError); + }); + }); + + describe('given a valid binary string', () => { + test('returns the correct number', () => { + expect(binaryStringToNumber('100')).toBe(4); + }); + }); +}); +``` + +### `describe.each(table)(name, fn, timeout)` + +Use `describe.each` if you keep duplicating the same test suites with different data. `describe.each` allows you to write the test suite once and pass data in. + +`describe.each` is available with two APIs: + +#### 1. `describe.each(table)(name, fn, timeout)` + +- `table`: `Array` of Arrays with the arguments that are passed into the `fn` for each row. + - _Note_ If you pass in a 1D array of primitives, internally it will be mapped to a table i.e. `[1, 2, 3] -> [[1], [2], [3]]` +- `name`: `String` the title of the test suite. + - Generate unique test titles by positionally injecting parameters with [`printf` formatting](https://nodejs.org/api/util.html#util_util_format_format_args): + - `%p` - [pretty-format](https://www.npmjs.com/package/pretty-format). + - `%s`- String. + - `%d`- Number. + - `%i` - Integer. + - `%f` - Floating point value. + - `%j` - JSON. + - `%o` - Object. + - `%#` - Index of the test case. + - `%%` - single percent sign ('%'). This does not consume an argument. +- `fn`: `Function` the suite of tests to be ran, this is the function that will receive the parameters in each row as function arguments. +- Optionally, you can provide a `timeout` (in milliseconds) for specifying how long to wait for each row before aborting. _Note: The default timeout is 5 seconds._ + +Example: + +```js +describe.each([ + [1, 1, 2], + [1, 2, 3], + [2, 1, 3], +])('.add(%i, %i)', (a, b, expected) => { + test(`returns ${expected}`, () => { + expect(a + b).toBe(expected); + }); + + test(`returned value not be greater than ${expected}`, () => { + expect(a + b).not.toBeGreaterThan(expected); + }); + + test(`returned value not be less than ${expected}`, () => { + expect(a + b).not.toBeLessThan(expected); + }); +}); +``` + +#### 2. `` describe.each`table`(name, fn, timeout) `` + +- `table`: `Tagged Template Literal` + - First row of variable name column headings separated with `|` + - One or more subsequent rows of data supplied as template literal expressions using `${value}` syntax. +- `name`: `String` the title of the test suite, use `$variable` to inject test data into the suite title from the tagged template expressions. + - To inject nested object values use you can supply a keyPath i.e. `$variable.path.to.value` +- `fn`: `Function` the suite of tests to be ran, this is the function that will receive the test data object. +- Optionally, you can provide a `timeout` (in milliseconds) for specifying how long to wait for each row before aborting. _Note: The default timeout is 5 seconds._ + +Example: + +```js +describe.each` + a | b | expected + ${1} | ${1} | ${2} + ${1} | ${2} | ${3} + ${2} | ${1} | ${3} +`('$a + $b', ({a, b, expected}) => { + test(`returns ${expected}`, () => { + expect(a + b).toBe(expected); + }); + + test(`returned value not be greater than ${expected}`, () => { + expect(a + b).not.toBeGreaterThan(expected); + }); + + test(`returned value not be less than ${expected}`, () => { + expect(a + b).not.toBeLessThan(expected); + }); +}); +``` + +### `describe.only(name, fn)` + +Also under the alias: `fdescribe(name, fn)` + +You can use `describe.only` if you want to run only one describe block: + +```js +describe.only('my beverage', () => { + test('is delicious', () => { + expect(myBeverage.delicious).toBeTruthy(); + }); + + test('is not sour', () => { + expect(myBeverage.sour).toBeFalsy(); + }); +}); + +describe('my other beverage', () => { + // ... will be skipped +}); +``` + +### `describe.only.each(table)(name, fn)` + +Also under the aliases: `fdescribe.each(table)(name, fn)` and `` fdescribe.each`table`(name, fn) `` + +Use `describe.only.each` if you want to only run specific tests suites of data driven tests. + +`describe.only.each` is available with two APIs: + +#### `describe.only.each(table)(name, fn)` + +```js +describe.only.each([ + [1, 1, 2], + [1, 2, 3], + [2, 1, 3], +])('.add(%i, %i)', (a, b, expected) => { + test(`returns ${expected}`, () => { + expect(a + b).toBe(expected); + }); +}); + +test('will not be ran', () => { + expect(1 / 0).toBe(Infinity); +}); +``` + +#### `` describe.only.each`table`(name, fn) `` + +```js +describe.only.each` + a | b | expected + ${1} | ${1} | ${2} + ${1} | ${2} | ${3} + ${2} | ${1} | ${3} +`('returns $expected when $a is added $b', ({a, b, expected}) => { + test('passes', () => { + expect(a + b).toBe(expected); + }); +}); + +test('will not be ran', () => { + expect(1 / 0).toBe(Infinity); +}); +``` + +### `describe.skip(name, fn)` + +Also under the alias: `xdescribe(name, fn)` + +You can use `describe.skip` if you do not want to run a particular describe block: + +```js +describe('my beverage', () => { + test('is delicious', () => { + expect(myBeverage.delicious).toBeTruthy(); + }); + + test('is not sour', () => { + expect(myBeverage.sour).toBeFalsy(); + }); +}); + +describe.skip('my other beverage', () => { + // ... will be skipped +}); +``` + +Using `describe.skip` is often a cleaner alternative to temporarily commenting out a chunk of tests. + +### `describe.skip.each(table)(name, fn)` + +Also under the aliases: `xdescribe.each(table)(name, fn)` and `` xdescribe.each`table`(name, fn) `` + +Use `describe.skip.each` if you want to stop running a suite of data driven tests. + +`describe.skip.each` is available with two APIs: + +#### `describe.skip.each(table)(name, fn)` + +```js +describe.skip.each([ + [1, 1, 2], + [1, 2, 3], + [2, 1, 3], +])('.add(%i, %i)', (a, b, expected) => { + test(`returns ${expected}`, () => { + expect(a + b).toBe(expected); // will not be ran + }); +}); + +test('will be ran', () => { + expect(1 / 0).toBe(Infinity); +}); +``` + +#### `` describe.skip.each`table`(name, fn) `` + +```js +describe.skip.each` + a | b | expected + ${1} | ${1} | ${2} + ${1} | ${2} | ${3} + ${2} | ${1} | ${3} +`('returns $expected when $a is added $b', ({a, b, expected}) => { + test('will not be ran', () => { + expect(a + b).toBe(expected); // will not be ran + }); +}); + +test('will be ran', () => { + expect(1 / 0).toBe(Infinity); +}); +``` + +### `test(name, fn, timeout)` + +Also under the alias: `it(name, fn, timeout)` + +All you need in a test file is the `test` method which runs a test. For example, let's say there's a function `inchesOfRain()` that should be zero. Your whole test could be: + +```js +test('did not rain', () => { + expect(inchesOfRain()).toBe(0); +}); +``` + +The first argument is the test name; the second argument is a function that contains the expectations to test. The third argument (optional) is `timeout` (in milliseconds) for specifying how long to wait before aborting. _Note: The default timeout is 5 seconds._ + +> Note: If a **promise is returned** from `test`, Jest will wait for the promise to resolve before letting the test complete. Jest will also wait if you **provide an argument to the test function**, usually called `done`. This could be handy when you want to test callbacks. See how to test async code [here](TestingAsyncCode.md#callbacks). + +For example, let's say `fetchBeverageList()` returns a promise that is supposed to resolve to a list that has `lemon` in it. You can test this with: + +```js +test('has lemon in it', () => { + return fetchBeverageList().then(list => { + expect(list).toContain('lemon'); + }); +}); +``` + +Even though the call to `test` will return right away, the test doesn't complete until the promise resolves as well. + +### `test.each(table)(name, fn, timeout)` + +Also under the alias: `it.each(table)(name, fn)` and `` it.each`table`(name, fn) `` + +Use `test.each` if you keep duplicating the same test with different data. `test.each` allows you to write the test once and pass data in. + +`test.each` is available with two APIs: + +#### 1. `test.each(table)(name, fn, timeout)` + +- `table`: `Array` of Arrays with the arguments that are passed into the test `fn` for each row. + - _Note_ If you pass in a 1D array of primitives, internally it will be mapped to a table i.e. `[1, 2, 3] -> [[1], [2], [3]]` +- `name`: `String` the title of the test block. + - Generate unique test titles by positionally injecting parameters with [`printf` formatting](https://nodejs.org/api/util.html#util_util_format_format_args): + - `%p` - [pretty-format](https://www.npmjs.com/package/pretty-format). + - `%s`- String. + - `%d`- Number. + - `%i` - Integer. + - `%f` - Floating point value. + - `%j` - JSON. + - `%o` - Object. + - `%#` - Index of the test case. + - `%%` - single percent sign ('%'). This does not consume an argument. +- `fn`: `Function` the test to be ran, this is the function that will receive the parameters in each row as function arguments. +- Optionally, you can provide a `timeout` (in milliseconds) for specifying how long to wait for each row before aborting. _Note: The default timeout is 5 seconds._ + +Example: + +```js +test.each([ + [1, 1, 2], + [1, 2, 3], + [2, 1, 3], +])('.add(%i, %i)', (a, b, expected) => { + expect(a + b).toBe(expected); +}); +``` + +#### 2. `` test.each`table`(name, fn, timeout) `` + +- `table`: `Tagged Template Literal` + - First row of variable name column headings separated with `|` + - One or more subsequent rows of data supplied as template literal expressions using `${value}` syntax. +- `name`: `String` the title of the test, use `$variable` to inject test data into the test title from the tagged template expressions. + - To inject nested object values use you can supply a keyPath i.e. `$variable.path.to.value` +- `fn`: `Function` the test to be ran, this is the function that will receive the test data object. +- Optionally, you can provide a `timeout` (in milliseconds) for specifying how long to wait for each row before aborting. _Note: The default timeout is 5 seconds._ + +Example: + +```js +test.each` + a | b | expected + ${1} | ${1} | ${2} + ${1} | ${2} | ${3} + ${2} | ${1} | ${3} +`('returns $expected when $a is added $b', ({a, b, expected}) => { + expect(a + b).toBe(expected); +}); +``` + +### `test.only(name, fn, timeout)` + +Also under the aliases: `ftest(name, fn, timeout)`, `it.only(name, fn, timeout)`, and `fit(name, fn, timeout)` + +When you are debugging a large test file, you will often only want to run a subset of tests. You can use `.only` to specify which tests are the only ones you want to run in that test file. + +Optionally, you can provide a `timeout` (in milliseconds) for specifying how long to wait before aborting. _Note: The default timeout is 5 seconds._ + +For example, let's say you had these tests: + +```js +test.only('it is raining', () => { + expect(inchesOfRain()).toBeGreaterThan(0); +}); + +test('it is not snowing', () => { + expect(inchesOfSnow()).toBe(0); +}); +``` + +Only the "it is raining" test will run in that test file, since it is run with `test.only`. + +Usually you wouldn't check code using `test.only` into source control - you would use it for debugging, and remove it once you have fixed the broken tests. + +### `test.only.each(table)(name, fn)` + +Also under the aliases: `ftest.each(table)(name, fn)`, `it.only.each(table)(name, fn)`, `fit.each(table)(name, fn)`, `` ftest.each`table`(name, fn) ``, `` it.only.each`table`(name, fn) `` and `` fit.each`table`(name, fn) `` + +Use `test.only.each` if you want to only run specific tests with different test data. + +`test.only.each` is available with two APIs: + +#### `test.only.each(table)(name, fn)` + +```js +test.only.each([ + [1, 1, 2], + [1, 2, 3], + [2, 1, 3], +])('.add(%i, %i)', (a, b, expected) => { + expect(a + b).toBe(expected); +}); + +test('will not be ran', () => { + expect(1 / 0).toBe(Infinity); +}); +``` + +#### `` test.only.each`table`(name, fn) `` + +```js +test.only.each` + a | b | expected + ${1} | ${1} | ${2} + ${1} | ${2} | ${3} + ${2} | ${1} | ${3} +`('returns $expected when $a is added $b', ({a, b, expected}) => { + expect(a + b).toBe(expected); +}); + +test('will not be ran', () => { + expect(1 / 0).toBe(Infinity); +}); +``` + +### `test.skip(name, fn)` + +Also under the aliases: `it.skip(name, fn)`, `xit(name, fn)`, and `xtest(name, fn)` + +When you are maintaining a large codebase, you may sometimes find a test that is temporarily broken for some reason. If you want to skip running this test, but you don't want to delete this code, you can use `test.skip` to specify some tests to skip. + +For example, let's say you had these tests: + +```js +test('it is raining', () => { + expect(inchesOfRain()).toBeGreaterThan(0); +}); + +test.skip('it is not snowing', () => { + expect(inchesOfSnow()).toBe(0); +}); +``` + +Only the "it is raining" test will run, since the other test is run with `test.skip`. + +You could comment the test out, but it's often a bit nicer to use `test.skip` because it will maintain indentation and syntax highlighting. + +### `test.skip.each(table)(name, fn)` + +Also under the aliases: `it.skip.each(table)(name, fn)`, `xit.each(table)(name, fn)`, `xtest.each(table)(name, fn)`, `` it.skip.each`table`(name, fn) ``, `` xit.each`table`(name, fn) `` and `` xtest.each`table`(name, fn) `` + +Use `test.skip.each` if you want to stop running a collection of data driven tests. + +`test.skip.each` is available with two APIs: + +#### `test.skip.each(table)(name, fn)` + +```js +test.skip.each([ + [1, 1, 2], + [1, 2, 3], + [2, 1, 3], +])('.add(%i, %i)', (a, b, expected) => { + expect(a + b).toBe(expected); // will not be ran +}); + +test('will be ran', () => { + expect(1 / 0).toBe(Infinity); +}); +``` + +#### `` test.skip.each`table`(name, fn) `` + +```js +test.skip.each` + a | b | expected + ${1} | ${1} | ${2} + ${1} | ${2} | ${3} + ${2} | ${1} | ${3} +`('returns $expected when $a is added $b', ({a, b, expected}) => { + expect(a + b).toBe(expected); // will not be ran +}); + +test('will be ran', () => { + expect(1 / 0).toBe(Infinity); +}); +``` + +### `test.todo(name)` + +Also under the alias: `it.todo(name)` + +Use `test.todo` when you are planning on writing tests. These tests will be highlighted in the summary output at the end so you know how many tests you still need todo. + +_Note_: If you supply a test callback function then the `test.todo` will throw an error. If you have already implemented the test and it is broken and you do not want it to run, then use `test.skip` instead. + +#### API + +- `name`: `String` the title of the test plan. + +Example: + +```js +const add = (a, b) => a + b; + +test.todo('add should be associative'); +``` diff --git a/website/versioned_docs/version-25.5/JestObjectAPI.md b/website/versioned_docs/version-25.5/JestObjectAPI.md new file mode 100644 index 000000000000..04f2414db41a --- /dev/null +++ b/website/versioned_docs/version-25.5/JestObjectAPI.md @@ -0,0 +1,672 @@ +--- +id: version-25.5-jest-object +title: The Jest Object +original_id: jest-object +--- + +The `jest` object is automatically in scope within every test file. The methods in the `jest` object help create mocks and let you control Jest's overall behavior. It can also be imported explicitly by via `import {jest} from '@jest/globals'`. + +## Mock Modules + +### `jest.disableAutomock()` + +Disables automatic mocking in the module loader. + +> See `automock` section of [configuration](Configuration.md#automock-boolean) for more information + +After this method is called, all `require()`s will return the real versions of each module (rather than a mocked version). + +Jest configuration: + +```json +{ + "automock": true +} +``` + +Example: + +```js +// utils.js +export default { + authorize: () => { + return 'token'; + }, +}; +``` + +```js +// __tests__/disableAutomocking.js +import utils from '../utils'; + +jest.disableAutomock(); + +test('original implementation', () => { + // now we have the original implementation, + // even if we set the automocking in a jest configuration + expect(utils.authorize()).toBe('token'); +}); +``` + +This is usually useful when you have a scenario where the number of dependencies you want to mock is far less than the number of dependencies that you don't. For example, if you're writing a test for a module that uses a large number of dependencies that can be reasonably classified as "implementation details" of the module, then you likely do not want to mock them. + +Examples of dependencies that might be considered "implementation details" are things ranging from language built-ins (e.g. Array.prototype methods) to highly common utility methods (e.g. underscore/lo-dash, array utilities etc) and entire libraries like React.js. + +Returns the `jest` object for chaining. + +_Note: this method was previously called `autoMockOff`. When using `babel-jest`, calls to `disableAutomock` will automatically be hoisted to the top of the code block. Use `autoMockOff` if you want to explicitly avoid this behavior._ + +### `jest.enableAutomock()` + +Enables automatic mocking in the module loader. + +Returns the `jest` object for chaining. + +> See `automock` section of [configuration](Configuration.md#automock-boolean) for more information + +Example: + +```js +// utils.js +export default { + authorize: () => { + return 'token'; + }, + isAuthorized: secret => secret === 'wizard', +}; +``` + +```js +// __tests__/disableAutomocking.js +jest.enableAutomock(); + +import utils from '../utils'; + +test('original implementation', () => { + // now we have the mocked implementation, + expect(utils.authorize._isMockFunction).toBeTruthy(); + expect(utils.isAuthorized._isMockFunction).toBeTruthy(); +}); +``` + +_Note: this method was previously called `autoMockOn`. When using `babel-jest`, calls to `enableAutomock` will automatically be hoisted to the top of the code block. Use `autoMockOn` if you want to explicitly avoid this behavior._ + +### `jest.genMockFromModule(moduleName)` + +Given the name of a module, use the automatic mocking system to generate a mocked version of the module for you. + +This is useful when you want to create a [manual mock](ManualMocks.md) that extends the automatic mock's behavior. + +Example: + +```js +// utils.js +export default { + authorize: () => { + return 'token'; + }, + isAuthorized: secret => secret === 'wizard', +}; +``` + +```js +// __tests__/genMockFromModule.test.js +const utils = jest.genMockFromModule('../utils').default; +utils.isAuthorized = jest.fn(secret => secret === 'not wizard'); + +test('implementation created by jest.genMockFromModule', () => { + expect(utils.authorize.mock).toBeTruthy(); + expect(utils.isAuthorized('not wizard')).toEqual(true); +}); +``` + +This is how `genMockFromModule` will mock the following data types: + +#### `Function` + +Creates a new [mock function](https://jestjs.io/docs/en/mock-functions.html). The new function has no formal parameters and when called will return `undefined`. This functionality also applies to `async` functions. + +#### `Class` + +Creates new class. The interface of the original class is maintained, all of the class member functions and properties will be mocked. + +#### `Object` + +Creates a new deeply cloned object. The object keys are maintained and their values are mocked. + +#### `Array` + +Creates a new empty array, ignoring the original. + +#### `Primitives` + +Creates a new property with the same primitive value as the original property. + +Example: + +``` +// example.js +module.exports = { + function: function square(a, b) { + return a * b; + }, + asyncFunction: async function asyncSquare(a, b) { + const result = await a * b; + return result; + }, + class: new class Bar { + constructor() { + this.array = [1, 2, 3]; + } + foo() {} + }, + object: { + baz: 'foo', + bar: { + fiz: 1, + buzz: [1, 2, 3], + }, + }, + array: [1, 2, 3], + number: 123, + string: 'baz', + boolean: true, + symbol: Symbol.for('a.b.c'), +}; +``` + +```js +// __tests__/example.test.js +const example = jest.genMockFromModule('./example'); + +test('should run example code', () => { + // creates a new mocked function with no formal arguments. + expect(example.function.name).toEqual('square'); + expect(example.function.length).toEqual(0); + + // async functions get the same treatment as standard synchronous functions. + expect(example.asyncFunction.name).toEqual('asyncSquare'); + expect(example.asyncFunction.length).toEqual(0); + + // creates a new class with the same interface, member functions and properties are mocked. + expect(example.class.constructor.name).toEqual('Bar'); + expect(example.class.foo.name).toEqual('foo'); + expect(example.class.array.length).toEqual(0); + + // creates a deeply cloned version of the original object. + expect(example.object).toEqual({ + baz: 'foo', + bar: { + fiz: 1, + buzz: [], + }, + }); + + // creates a new empty array, ignoring the original array. + expect(example.array.length).toEqual(0); + + // creates a new property with the same primitive value as the original property. + expect(example.number).toEqual(123); + expect(example.string).toEqual('baz'); + expect(example.boolean).toEqual(true); + expect(example.symbol).toEqual(Symbol.for('a.b.c')); +}); +``` + +### `jest.mock(moduleName, factory, options)` + +Mocks a module with an auto-mocked version when it is being required. `factory` and `options` are optional. For example: + +```js +// banana.js +module.exports = () => 'banana'; + +// __tests__/test.js +jest.mock('../banana'); + +const banana = require('../banana'); // banana will be explicitly mocked. + +banana(); // will return 'undefined' because the function is auto-mocked. +``` + +The second argument can be used to specify an explicit module factory that is being run instead of using Jest's automocking feature: + +```js +jest.mock('../moduleName', () => { + return jest.fn(() => 42); +}); + +// This runs the function specified as second argument to `jest.mock`. +const moduleName = require('../moduleName'); +moduleName(); // Will return '42'; +``` + +When using the `factory` parameter for an ES6 module with a default export, the `__esModule: true` property needs to be specified. This property is normally generated by Babel / TypeScript, but here it needs to be set manually. When importing a default export, it's an instruction to import the property named `default` from the export object: + +```js +import moduleName, {foo} from '../moduleName'; + +jest.mock('../moduleName', () => { + return { + __esModule: true, + default: jest.fn(() => 42), + foo: jest.fn(() => 43), + }; +}); + +moduleName(); // Will return 42 +foo(); // Will return 43 +``` + +The third argument can be used to create virtual mocks – mocks of modules that don't exist anywhere in the system: + +```js +jest.mock( + '../moduleName', + () => { + /* + * Custom implementation of a module that doesn't exist in JS, + * like a generated module or a native module in react-native. + */ + }, + {virtual: true}, +); +``` + +> **Warning:** Importing a module in a setup file (as specified by `setupTestFrameworkScriptFile`) will prevent mocking for the module in question, as well as all the modules that it imports. + +Modules that are mocked with `jest.mock` are mocked only for the file that calls `jest.mock`. Another file that imports the module will get the original implementation even if it runs after the test file that mocks the module. + +Returns the `jest` object for chaining. + +### `jest.unmock(moduleName)` + +Indicates that the module system should never return a mocked version of the specified module from `require()` (e.g. that it should always return the real module). + +The most common use of this API is for specifying the module a given test intends to be testing (and thus doesn't want automatically mocked). + +Returns the `jest` object for chaining. + +### `jest.doMock(moduleName, factory, options)` + +When using `babel-jest`, calls to `mock` will automatically be hoisted to the top of the code block. Use this method if you want to explicitly avoid this behavior. + +One example when this is useful is when you want to mock a module differently within the same file: + +```js +beforeEach(() => { + jest.resetModules(); +}); + +test('moduleName 1', () => { + jest.doMock('../moduleName', () => { + return jest.fn(() => 1); + }); + const moduleName = require('../moduleName'); + expect(moduleName()).toEqual(1); +}); + +test('moduleName 2', () => { + jest.doMock('../moduleName', () => { + return jest.fn(() => 2); + }); + const moduleName = require('../moduleName'); + expect(moduleName()).toEqual(2); +}); +``` + +Using `jest.doMock()` with ES6 imports requires additional steps. Follow these if you don't want to use `require` in your tests: + +- We have to specify the `__esModule: true` property (see the [`jest.mock()`](#jestmockmodulename-factory-options) API for more information). +- Static ES6 module imports are hoisted to the top of the file, so instead we have to import them dynamically using `import()`. +- Finally, we need an environment which supports dynamic importing. Please see [Using Babel](GettingStarted.md#using-babel) for the initial setup. Then add the plugin [babel-plugin-dynamic-import-node](https://www.npmjs.com/package/babel-plugin-dynamic-import-node), or an equivalent, to your Babel config to enable dynamic importing in Node. + +```js +beforeEach(() => { + jest.resetModules(); +}); + +test('moduleName 1', () => { + jest.doMock('../moduleName', () => { + return { + __esModule: true, + default: 'default1', + foo: 'foo1', + }; + }); + return import('../moduleName').then(moduleName => { + expect(moduleName.default).toEqual('default1'); + expect(moduleName.foo).toEqual('foo1'); + }); +}); + +test('moduleName 2', () => { + jest.doMock('../moduleName', () => { + return { + __esModule: true, + default: 'default2', + foo: 'foo2', + }; + }); + return import('../moduleName').then(moduleName => { + expect(moduleName.default).toEqual('default2'); + expect(moduleName.foo).toEqual('foo2'); + }); +}); +``` + +Returns the `jest` object for chaining. + +### `jest.dontMock(moduleName)` + +When using `babel-jest`, calls to `unmock` will automatically be hoisted to the top of the code block. Use this method if you want to explicitly avoid this behavior. + +Returns the `jest` object for chaining. + +### `jest.setMock(moduleName, moduleExports)` + +Explicitly supplies the mock object that the module system should return for the specified module. + +On occasion there are times where the automatically generated mock the module system would normally provide you isn't adequate enough for your testing needs. Normally under those circumstances you should write a [manual mock](ManualMocks.md) that is more adequate for the module in question. However, on extremely rare occasions, even a manual mock isn't suitable for your purposes and you need to build the mock yourself inside your test. + +In these rare scenarios you can use this API to manually fill the slot in the module system's mock-module registry. + +Returns the `jest` object for chaining. + +_Note It is recommended to use [`jest.mock()`](#jestmockmodulename-factory-options) instead. The `jest.mock` API's second argument is a module factory instead of the expected exported module object._ + +### `jest.requireActual(moduleName)` + +Returns the actual module instead of a mock, bypassing all checks on whether the module should receive a mock implementation or not. + +Example: + +```js +jest.mock('../myModule', () => { + // Require the original module to not be mocked... + const originalModule = jest.requireActual(moduleName); + + return { + __esModule: true, // Use it when dealing with esModules + ...originalModule, + getRandom: jest.fn().mockReturnValue(10), + }; +}); + +const getRandom = require('../myModule').getRandom; + +getRandom(); // Always returns 10 +``` + +### `jest.requireMock(moduleName)` + +Returns a mock module instead of the actual module, bypassing all checks on whether the module should be required normally or not. + +### `jest.resetModules()` + +Resets the module registry - the cache of all required modules. This is useful to isolate modules where local state might conflict between tests. + +Example: + +```js +const sum1 = require('../sum'); +jest.resetModules(); +const sum2 = require('../sum'); +sum1 === sum2; +// > false (Both sum modules are separate "instances" of the sum module.) +``` + +Example in a test: + +```js +beforeEach(() => { + jest.resetModules(); +}); + +test('works', () => { + const sum = require('../sum'); +}); + +test('works too', () => { + const sum = require('../sum'); + // sum is a different copy of the sum module from the previous test. +}); +``` + +Returns the `jest` object for chaining. + +### `jest.isolateModules(fn)` + +`jest.isolateModules(fn)` goes a step further than `jest.resetModules()` and creates a sandbox registry for the modules that are loaded inside the callback function. This is useful to isolate specific modules for every test so that local module state doesn't conflict between tests. + +```js +let myModule; +jest.isolateModules(() => { + myModule = require('myModule'); +}); + +const otherCopyOfMyModule = require('myModule'); +``` + +## Mock functions + +### `jest.fn(implementation)` + +Returns a new, unused [mock function](MockFunctionAPI.md). Optionally takes a mock implementation. + +```js +const mockFn = jest.fn(); +mockFn(); +expect(mockFn).toHaveBeenCalled(); + +// With a mock implementation: +const returnsTrue = jest.fn(() => true); +console.log(returnsTrue()); // true; +``` + +### `jest.isMockFunction(fn)` + +Determines if the given function is a mocked function. + +### `jest.spyOn(object, methodName)` + +Creates a mock function similar to `jest.fn` but also tracks calls to `object[methodName]`. Returns a Jest [mock function](MockFunctionAPI.md). + +_Note: By default, `jest.spyOn` also calls the **spied** method. This is different behavior from most other test libraries. If you want to overwrite the original function, you can use `jest.spyOn(object, methodName).mockImplementation(() => customImplementation)` or `object[methodName] = jest.fn(() => customImplementation);`_ + +Example: + +```js +const video = { + play() { + return true; + }, +}; + +module.exports = video; +``` + +Example test: + +```js +const video = require('./video'); + +test('plays video', () => { + const spy = jest.spyOn(video, 'play'); + const isPlaying = video.play(); + + expect(spy).toHaveBeenCalled(); + expect(isPlaying).toBe(true); + + spy.mockRestore(); +}); +``` + +### `jest.spyOn(object, methodName, accessType?)` + +Since Jest 22.1.0+, the `jest.spyOn` method takes an optional third argument of `accessType` that can be either `'get'` or `'set'`, which proves to be useful when you want to spy on a getter or a setter, respectively. + +Example: + +```js +const video = { + // it's a getter! + get play() { + return true; + }, +}; + +module.exports = video; + +const audio = { + _volume: false, + // it's a setter! + set volume(value) { + this._volume = value; + }, + get volume() { + return this._volume; + }, +}; + +module.exports = audio; +``` + +Example test: + +```js +const video = require('./video'); + +test('plays video', () => { + const spy = jest.spyOn(video, 'play', 'get'); // we pass 'get' + const isPlaying = video.play; + + expect(spy).toHaveBeenCalled(); + expect(isPlaying).toBe(true); + + spy.mockRestore(); +}); + +const audio = require('./audio'); + +test('plays audio', () => { + const spy = jest.spyOn(audio, 'volume', 'set'); // we pass 'set' + audio.volume = 100; + + expect(spy).toHaveBeenCalled(); + expect(audio.volume).toBe(100); + + spy.mockRestore(); +}); +``` + +### `jest.clearAllMocks()` + +Clears the `mock.calls` and `mock.instances` properties of all mocks. Equivalent to calling [`.mockClear()`](MockFunctionAPI.md#mockfnmockclear) on every mocked function. + +Returns the `jest` object for chaining. + +### `jest.resetAllMocks()` + +Resets the state of all mocks. Equivalent to calling [`.mockReset()`](MockFunctionAPI.md#mockfnmockreset) on every mocked function. + +Returns the `jest` object for chaining. + +### `jest.restoreAllMocks()` + +Restores all mocks back to their original value. Equivalent to calling [`.mockRestore()`](MockFunctionAPI.md#mockfnmockrestore) on every mocked function. Beware that `jest.restoreAllMocks()` only works when the mock was created with `jest.spyOn`; other mocks will require you to manually restore them. + +## Mock timers + +### `jest.useFakeTimers()` + +Instructs Jest to use fake versions of the standard timer functions (`setTimeout`, `setInterval`, `clearTimeout`, `clearInterval`, `nextTick`, `setImmediate` and `clearImmediate`). + +Returns the `jest` object for chaining. + +### `jest.useRealTimers()` + +Instructs Jest to use the real versions of the standard timer functions. + +Returns the `jest` object for chaining. + +### `jest.runAllTicks()` + +Exhausts the **micro**-task queue (usually interfaced in node via `process.nextTick`). + +When this API is called, all pending micro-tasks that have been queued via `process.nextTick` will be executed. Additionally, if those micro-tasks themselves schedule new micro-tasks, those will be continually exhausted until there are no more micro-tasks remaining in the queue. + +### `jest.runAllTimers()` + +Exhausts both the **macro**-task queue (i.e., all tasks queued by `setTimeout()`, `setInterval()`, and `setImmediate()`) and the **micro**-task queue (usually interfaced in node via `process.nextTick`). + +When this API is called, all pending macro-tasks and micro-tasks will be executed. If those tasks themselves schedule new tasks, those will be continually exhausted until there are no more tasks remaining in the queue. + +This is often useful for synchronously executing setTimeouts during a test in order to synchronously assert about some behavior that would only happen after the `setTimeout()` or `setInterval()` callbacks executed. See the [Timer mocks](TimerMocks.md) doc for more information. + +### `jest.runAllImmediates()` + +Exhausts all tasks queued by `setImmediate()`. + +### `jest.advanceTimersByTime(msToRun)` + +##### renamed in Jest **22.0.0+** + +Also under the alias: `.runTimersToTime()` + +Executes only the macro task queue (i.e. all tasks queued by `setTimeout()` or `setInterval()` and `setImmediate()`). + +When this API is called, all timers are advanced by `msToRun` milliseconds. All pending "macro-tasks" that have been queued via `setTimeout()` or `setInterval()`, and would be executed within this time frame will be executed. Additionally if those macro-tasks schedule new macro-tasks that would be executed within the same time frame, those will be executed until there are no more macro-tasks remaining in the queue, that should be run within `msToRun` milliseconds. + +### `jest.runOnlyPendingTimers()` + +Executes only the macro-tasks that are currently pending (i.e., only the tasks that have been queued by `setTimeout()` or `setInterval()` up to this point). If any of the currently pending macro-tasks schedule new macro-tasks, those new tasks will not be executed by this call. + +This is useful for scenarios such as one where the module being tested schedules a `setTimeout()` whose callback schedules another `setTimeout()` recursively (meaning the scheduling never stops). In these scenarios, it's useful to be able to run forward in time by a single step at a time. + +### `jest.advanceTimersToNextTimer(steps)` + +Advances all timers by the needed milliseconds so that only the next timeouts/intervals will run. + +Optionally, you can provide `steps`, so it will run `steps` amount of next timeouts/intervals. + +### `jest.clearAllTimers()` + +Removes any pending timers from the timer system. + +This means, if any timers have been scheduled (but have not yet executed), they will be cleared and will never have the opportunity to execute in the future. + +### `jest.getTimerCount()` + +Returns the number of fake timers still left to run. + +## Misc + +### `jest.setTimeout(timeout)` + +Set the default timeout interval for tests and before/after hooks in milliseconds. This only affects the test file from which this function is called. + +_Note: The default timeout interval is 5 seconds if this method is not called._ + +_Note: If you want to set the timeout for all test files, a good place to do this is in `setupFilesAfterEnv`._ + +Example: + +```js +jest.setTimeout(1000); // 1 second +``` + +### `jest.retryTimes()` + +Runs failed tests n-times until they pass or until the max number of retries is exhausted. This only works with [jest-circus](https://github.com/facebook/jest/tree/master/packages/jest-circus)! + +Example in a test: + +```js +jest.retryTimes(3); +test('will fail', () => { + expect(true).toBe(false); +}); +``` + +Returns the `jest` object for chaining. diff --git a/website/versioned_docs/version-25.5/JestPlatform.md b/website/versioned_docs/version-25.5/JestPlatform.md new file mode 100644 index 000000000000..1b2ddf710cd2 --- /dev/null +++ b/website/versioned_docs/version-25.5/JestPlatform.md @@ -0,0 +1,175 @@ +--- +id: version-25.5-jest-platform +title: Jest Platform +original_id: jest-platform +--- + +You can cherry pick specific features of Jest and use them as standalone packages. Here's a list of the available packages: + +## jest-changed-files + +Tool for identifying modified files in a git/hg repository. Exports two functions: + +- `getChangedFilesForRoots` returns a promise that resolves to an object with the changed files and repos. +- `findRepos` returns a promise that resolves to a set of repositories contained in the specified path. + +### Example + +```javascript +const {getChangedFilesForRoots} = require('jest-changed-files'); + +// print the set of modified files since last commit in the current repo +getChangedFilesForRoots(['./'], { + lastCommit: true, +}).then(result => console.log(result.changedFiles)); +``` + +You can read more about `jest-changed-files` in the [readme file](https://github.com/facebook/jest/blob/master/packages/jest-changed-files/README.md). + +## jest-diff + +Tool for visualizing changes in data. Exports a function that compares two values of any type and returns a "pretty-printed" string illustrating the difference between the two arguments. + +### Example + +```javascript +const diff = require('jest-diff'); + +const a = {a: {b: {c: 5}}}; +const b = {a: {b: {c: 6}}}; + +const result = diff(a, b); + +// print diff +console.log(result); +``` + +## jest-docblock + +Tool for extracting and parsing the comments at the top of a JavaScript file. Exports various functions to manipulate the data inside the comment block. + +### Example + +```javascript +const {parseWithComments} = require('jest-docblock'); + +const code = ` +/** + * This is a sample + * + * @flow + */ + + console.log('Hello World!'); +`; + +const parsed = parseWithComments(code); + +// prints an object with two attributes: comments and pragmas. +console.log(parsed); +``` + +You can read more about `jest-docblock` in the [readme file](https://github.com/facebook/jest/blob/master/packages/jest-docblock/README.md). + +## jest-get-type + +Module that identifies the primitive type of any JavaScript value. Exports a function that returns a string with the type of the value passed as argument. + +### Example + +```javascript +const getType = require('jest-get-type'); + +const array = [1, 2, 3]; +const nullValue = null; +const undefinedValue = undefined; + +// prints 'array' +console.log(getType(array)); +// prints 'null' +console.log(getType(nullValue)); +// prints 'undefined' +console.log(getType(undefinedValue)); +``` + +## jest-validate + +Tool for validating configurations submitted by users. Exports a function that takes two arguments: the user's configuration and an object containing an example configuration and other options. The return value is an object with two attributes: + +- `hasDeprecationWarnings`, a boolean indicating whether the submitted configuration has deprecation warnings, +- `isValid`, a boolean indicating whether the configuration is correct or not. + +### Example + +```javascript +const {validate} = require('jest-validate'); + +const configByUser = { + transform: '/node_modules/my-custom-transform', +}; + +const result = validate(configByUser, { + comment: ' Documentation: http://custom-docs.com', + exampleConfig: {transform: '/node_modules/babel-jest'}, +}); + +console.log(result); +``` + +You can read more about `jest-validate` in the [readme file](https://github.com/facebook/jest/blob/master/packages/jest-validate/README.md). + +## jest-worker + +Module used for parallelization of tasks. Exports a class `JestWorker` that takes the path of Node.js module and lets you call the module's exported methods as if they were class methods, returning a promise that resolves when the specified method finishes its execution in a forked process. + +### Example + +```javascript +// heavy-task.js + +module.exports = { + myHeavyTask: args => { + // long running CPU intensive task. + }, +}; +``` + +```javascript +// main.js + +async function main() { + const worker = new Worker(require.resolve('./heavy-task.js')); + + // run 2 tasks in parallel with different arguments + const results = await Promise.all([ + worker.myHeavyTask({foo: 'bar'}), + worker.myHeavyTask({bar: 'foo'}), + ]); + + console.log(results); +} + +main(); +``` + +You can read more about `jest-worker` in the [readme file](https://github.com/facebook/jest/blob/master/packages/jest-worker/README.md). + +## pretty-format + +Exports a function that converts any JavaScript value into a human-readable string. Supports all built-in JavaScript types out of the box and allows extension for application-specific types via user-defined plugins. + +### Example + +```javascript +const prettyFormat = require('pretty-format'); + +const val = {object: {}}; +val.circularReference = val; +val[Symbol('foo')] = 'foo'; +val.map = new Map([['prop', 'value']]); +val.array = [-0, Infinity, NaN]; + +console.log(prettyFormat(val)); +``` + +You can read more about `pretty-format` in the [readme file](https://github.com/facebook/jest/blob/master/packages/pretty-format/README.md). diff --git a/website/versions.json b/website/versions.json index 309b51aa700a..359fa3ec8a76 100644 --- a/website/versions.json +++ b/website/versions.json @@ -1,4 +1,5 @@ [ + "25.5", "25.3", "25.1", "24.x", From 0740ad4982e1bbcf27cbb6a3e5e1cfd95694bff2 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Wed, 29 Apr 2020 09:48:11 +0200 Subject: [PATCH 013/106] fix: include missing `@types/graceful-fs` dep (#9913) --- CHANGELOG.md | 2 ++ packages/jest-haste-map/package.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a2aaef5db739..50237a17f7e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ ### Fixes +- `[jest-haste-map]` Add missing `@types/graceful-fs` dependency ([#9913](https://github.com/facebook/jest/pull/9913)) + ### Chore & Maintenance ### Performance diff --git a/packages/jest-haste-map/package.json b/packages/jest-haste-map/package.json index 33613ae6dbda..1cfa45f678f1 100644 --- a/packages/jest-haste-map/package.json +++ b/packages/jest-haste-map/package.json @@ -18,6 +18,7 @@ }, "dependencies": { "@jest/types": "^25.5.0", + "@types/graceful-fs": "^4.1.2", "anymatch": "^3.0.3", "fb-watchman": "^2.0.0", "graceful-fs": "^4.2.4", @@ -33,7 +34,6 @@ "@jest/test-utils": "^25.5.0", "@types/anymatch": "^1.3.1", "@types/fb-watchman": "^2.0.0", - "@types/graceful-fs": "^4.1.2", "@types/micromatch": "^4.0.0", "@types/node": "*", "@types/sane": "^2.0.0", From a5d0b083e13a33c3c670c1c92481417b08b39917 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Wed, 29 Apr 2020 10:31:37 +0200 Subject: [PATCH 014/106] fix: correctly serialize `Set` passed to worker (#9915) --- CHANGELOG.md | 1 + packages/jest-runner/src/index.ts | 3 +++ packages/jest-runner/src/testWorker.ts | 3 +++ packages/jest-runner/src/types.ts | 2 ++ 4 files changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 50237a17f7e2..5f7b0d20d544 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ### Fixes - `[jest-haste-map]` Add missing `@types/graceful-fs` dependency ([#9913](https://github.com/facebook/jest/pull/9913)) +- `[jest-runner]` Correctly serialize `Set` passed to worker ([#9915](https://github.com/facebook/jest/pull/9915)) ### Chore & Maintenance diff --git a/packages/jest-runner/src/index.ts b/packages/jest-runner/src/index.ts index 9cf5659426cb..0f1d069c6af0 100644 --- a/packages/jest-runner/src/index.ts +++ b/packages/jest-runner/src/index.ts @@ -158,6 +158,9 @@ class TestRunner { changedFiles: this._context.changedFiles && Array.from(this._context.changedFiles), + sourcesRelatedToTestsInChangedFiles: + this._context.sourcesRelatedToTestsInChangedFiles && + Array.from(this._context.sourcesRelatedToTestsInChangedFiles), }, globalConfig: this._globalConfig, path: test.path, diff --git a/packages/jest-runner/src/testWorker.ts b/packages/jest-runner/src/testWorker.ts index b7a3dcf858ff..70d45328a4ab 100644 --- a/packages/jest-runner/src/testWorker.ts +++ b/packages/jest-runner/src/testWorker.ts @@ -89,6 +89,9 @@ export async function worker({ context && { ...context, changedFiles: context.changedFiles && new Set(context.changedFiles), + sourcesRelatedToTestsInChangedFiles: + context.sourcesRelatedToTestsInChangedFiles && + new Set(context.sourcesRelatedToTestsInChangedFiles), }, ); } catch (error) { diff --git a/packages/jest-runner/src/types.ts b/packages/jest-runner/src/types.ts index 4862c886ce86..c4fc43117ff0 100644 --- a/packages/jest-runner/src/types.ts +++ b/packages/jest-runner/src/types.ts @@ -49,6 +49,7 @@ export type TestRunnerOptions = { serial: boolean; }; +// make sure all props here are present in the type below it as well export type TestRunnerContext = { changedFiles?: Set; sourcesRelatedToTestsInChangedFiles?: Set; @@ -56,6 +57,7 @@ export type TestRunnerContext = { export type TestRunnerSerializedContext = { changedFiles?: Array; + sourcesRelatedToTestsInChangedFiles?: Array; }; // TODO: Should live in `@jest/core` or `jest-watcher` From fdca483fdcd61bc4fb6e7399be63cc077b15def1 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Wed, 29 Apr 2020 11:23:31 +0200 Subject: [PATCH 015/106] fix: vary ESM cache by query (#9914) --- CHANGELOG.md | 1 + .../__snapshots__/nativeEsm.test.ts.snap | 2 +- e2e/native-esm/__tests__/native-esm.test.js | 18 ++++++++++++++++++ packages/jest-runtime/src/index.ts | 15 ++++++++------- 4 files changed, 28 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f7b0d20d544..67ef0f399423 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - `[jest-haste-map]` Add missing `@types/graceful-fs` dependency ([#9913](https://github.com/facebook/jest/pull/9913)) - `[jest-runner]` Correctly serialize `Set` passed to worker ([#9915](https://github.com/facebook/jest/pull/9915)) +- `[jest-runtime]` Vary ESM cache by query ([#9914](https://github.com/facebook/jest/pull/9914)) ### Chore & Maintenance diff --git a/e2e/__tests__/__snapshots__/nativeEsm.test.ts.snap b/e2e/__tests__/__snapshots__/nativeEsm.test.ts.snap index c16d98c7fafb..953aa9a25bfa 100644 --- a/e2e/__tests__/__snapshots__/nativeEsm.test.ts.snap +++ b/e2e/__tests__/__snapshots__/nativeEsm.test.ts.snap @@ -2,7 +2,7 @@ exports[`on node ^12.16.0 || >=13.2.0 runs test with native ESM 1`] = ` Test Suites: 1 passed, 1 total -Tests: 11 passed, 11 total +Tests: 12 passed, 12 total Snapshots: 0 total Time: <> Ran all test suites. diff --git a/e2e/native-esm/__tests__/native-esm.test.js b/e2e/native-esm/__tests__/native-esm.test.js index 737d422d9c1c..d5a574cb6534 100644 --- a/e2e/native-esm/__tests__/native-esm.test.js +++ b/e2e/native-esm/__tests__/native-esm.test.js @@ -14,6 +14,11 @@ import {fileURLToPath} from 'url'; import {jest as jestObject} from '@jest/globals'; import staticImportedStateful from '../stateful.mjs'; import staticImportedStatefulFromCjs from '../fromCjs.mjs'; +// https://github.com/benmosher/eslint-plugin-import/issues/1739 +/* eslint-disable import/no-unresolved */ +import staticImportedStatefulWithQuery from '../stateful.mjs?query=1'; +import staticImportedStatefulWithAnotherQuery from '../stateful.mjs?query=2'; +/* eslint-enable */ import {double} from '../index'; test('should have correct import.meta', () => { @@ -107,3 +112,16 @@ test('handle dynamic imports of the same module in parallel', async () => { expect(first).toBe(second); expect(first(2)).toBe(4); }); + +test('varies module cache by query', () => { + expect(staticImportedStatefulWithQuery).not.toBe( + staticImportedStatefulWithAnotherQuery, + ); + + expect(staticImportedStatefulWithQuery()).toBe(1); + expect(staticImportedStatefulWithQuery()).toBe(2); + expect(staticImportedStatefulWithAnotherQuery()).toBe(1); + expect(staticImportedStatefulWithQuery()).toBe(3); + expect(staticImportedStatefulWithAnotherQuery()).toBe(2); + expect(staticImportedStatefulWithAnotherQuery()).toBe(3); +}); diff --git a/packages/jest-runtime/src/index.ts b/packages/jest-runtime/src/index.ts index 69e1c22de49e..609abc543ad2 100644 --- a/packages/jest-runtime/src/index.ts +++ b/packages/jest-runtime/src/index.ts @@ -399,16 +399,15 @@ class Runtime { return globals; } - const resolved = this._resolveModule( - referencingModule.identifier, - specifier, - ); + const [path, query] = specifier.split('?'); + + const resolved = this._resolveModule(referencingModule.identifier, path); if ( this._resolver.isCoreModule(resolved) || this.unstable_shouldLoadAsEsm(resolved) ) { - return this.loadEsmModule(resolved); + return this.loadEsmModule(resolved, query); } return this.loadCjsAsEsm( @@ -427,9 +426,11 @@ class Runtime { 'You need to run with a version of node that supports ES Modules in the VM API.', ); - const modulePath = this._resolveModule(from, moduleName); + const [path, query] = (moduleName ?? '').split('?'); + + const modulePath = this._resolveModule(from, path); - return this.loadEsmModule(modulePath); + return this.loadEsmModule(modulePath, query); } private async loadCjsAsEsm( From 46922dae586b5a56964b9b22f746a3102185cd0f Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Wed, 29 Apr 2020 12:54:32 +0200 Subject: [PATCH 016/106] chore: update changelog for release --- CHANGELOG.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 67ef0f399423..84b399654913 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,14 +4,18 @@ ### Fixes -- `[jest-haste-map]` Add missing `@types/graceful-fs` dependency ([#9913](https://github.com/facebook/jest/pull/9913)) -- `[jest-runner]` Correctly serialize `Set` passed to worker ([#9915](https://github.com/facebook/jest/pull/9915)) -- `[jest-runtime]` Vary ESM cache by query ([#9914](https://github.com/facebook/jest/pull/9914)) - ### Chore & Maintenance ### Performance +## 25.5.1 + +### Fixes + +- `[jest-haste-map]` Add missing `@types/graceful-fs` dependency ([#9913](https://github.com/facebook/jest/pull/9913)) +- `[jest-runner]` Correctly serialize `Set` passed to worker ([#9915](https://github.com/facebook/jest/pull/9915)) +- `[jest-runtime]` Vary ESM cache by query ([#9914](https://github.com/facebook/jest/pull/9914)) + ## 25.5.0 ### Features From c5f2fd756331895b8177a19304feb49657687e22 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Wed, 29 Apr 2020 12:54:59 +0200 Subject: [PATCH 017/106] v25.5.1 --- lerna.json | 2 +- packages/babel-jest/package.json | 4 ++-- packages/jest-circus/package.json | 6 ++--- packages/jest-cli/package.json | 6 ++--- packages/jest-config/package.json | 10 ++++----- packages/jest-core/package.json | 22 +++++++++---------- packages/jest-haste-map/package.json | 2 +- packages/jest-jasmine2/package.json | 6 ++--- packages/jest-repl/package.json | 8 +++---- packages/jest-reporters/package.json | 8 +++---- .../jest-resolve-dependencies/package.json | 10 ++++----- packages/jest-resolve/package.json | 4 ++-- packages/jest-runner/package.json | 14 ++++++------ packages/jest-runtime/package.json | 12 +++++----- packages/jest-snapshot/package.json | 6 ++--- packages/jest-test-sequencer/package.json | 8 +++---- packages/jest-transform/package.json | 4 ++-- packages/jest/package.json | 6 ++--- 18 files changed, 69 insertions(+), 69 deletions(-) diff --git a/lerna.json b/lerna.json index 576ba357dfca..59c4cf92f24d 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "25.5.0", + "version": "25.5.1", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/babel-jest/package.json b/packages/babel-jest/package.json index 28b7baebac45..890ca9a6a0ab 100644 --- a/packages/babel-jest/package.json +++ b/packages/babel-jest/package.json @@ -1,7 +1,7 @@ { "name": "babel-jest", "description": "Jest plugin to use babel for transformation.", - "version": "25.5.0", + "version": "25.5.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -18,7 +18,7 @@ } }, "dependencies": { - "@jest/transform": "^25.5.0", + "@jest/transform": "^25.5.1", "@jest/types": "^25.5.0", "@types/babel__core": "^7.1.7", "babel-plugin-istanbul": "^6.0.0", diff --git a/packages/jest-circus/package.json b/packages/jest-circus/package.json index 22bd4c6b1078..79015a136683 100644 --- a/packages/jest-circus/package.json +++ b/packages/jest-circus/package.json @@ -1,6 +1,6 @@ { "name": "jest-circus", - "version": "25.5.0", + "version": "25.5.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -28,8 +28,8 @@ "jest-each": "^25.5.0", "jest-matcher-utils": "^25.5.0", "jest-message-util": "^25.5.0", - "jest-runtime": "^25.5.0", - "jest-snapshot": "^25.5.0", + "jest-runtime": "^25.5.1", + "jest-snapshot": "^25.5.1", "jest-util": "^25.5.0", "pretty-format": "^25.5.0", "stack-utils": "^1.0.1", diff --git a/packages/jest-cli/package.json b/packages/jest-cli/package.json index 46ef3c026cd3..de5859887d1d 100644 --- a/packages/jest-cli/package.json +++ b/packages/jest-cli/package.json @@ -1,7 +1,7 @@ { "name": "jest-cli", "description": "Delightful JavaScript Testing.", - "version": "25.5.0", + "version": "25.5.1", "main": "build/index.js", "types": "build/index.d.ts", "typesVersions": { @@ -12,7 +12,7 @@ } }, "dependencies": { - "@jest/core": "^25.5.0", + "@jest/core": "^25.5.1", "@jest/test-result": "^25.5.0", "@jest/types": "^25.5.0", "chalk": "^3.0.0", @@ -20,7 +20,7 @@ "graceful-fs": "^4.2.4", "import-local": "^3.0.2", "is-ci": "^2.0.0", - "jest-config": "^25.5.0", + "jest-config": "^25.5.1", "jest-util": "^25.5.0", "jest-validate": "^25.5.0", "prompts": "^2.0.1", diff --git a/packages/jest-config/package.json b/packages/jest-config/package.json index c14b2bd75177..7fb5c835b078 100644 --- a/packages/jest-config/package.json +++ b/packages/jest-config/package.json @@ -1,6 +1,6 @@ { "name": "jest-config", - "version": "25.5.0", + "version": "25.5.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -18,9 +18,9 @@ }, "dependencies": { "@babel/core": "^7.1.0", - "@jest/test-sequencer": "^25.5.0", + "@jest/test-sequencer": "^25.5.1", "@jest/types": "^25.5.0", - "babel-jest": "^25.5.0", + "babel-jest": "^25.5.1", "chalk": "^3.0.0", "deepmerge": "^4.2.2", "glob": "^7.1.1", @@ -28,9 +28,9 @@ "jest-environment-jsdom": "^25.5.0", "jest-environment-node": "^25.5.0", "jest-get-type": "^25.2.6", - "jest-jasmine2": "^25.5.0", + "jest-jasmine2": "^25.5.1", "jest-regex-util": "^25.2.6", - "jest-resolve": "^25.5.0", + "jest-resolve": "^25.5.1", "jest-util": "^25.5.0", "jest-validate": "^25.5.0", "micromatch": "^4.0.2", diff --git a/packages/jest-core/package.json b/packages/jest-core/package.json index 790a6d3339ac..53001cf54ff5 100644 --- a/packages/jest-core/package.json +++ b/packages/jest-core/package.json @@ -1,7 +1,7 @@ { "name": "@jest/core", "description": "Delightful JavaScript Testing.", - "version": "25.5.0", + "version": "25.5.1", "main": "build/jest.js", "types": "build/jest.d.ts", "typesVersions": { @@ -13,24 +13,24 @@ }, "dependencies": { "@jest/console": "^25.5.0", - "@jest/reporters": "^25.5.0", + "@jest/reporters": "^25.5.1", "@jest/test-result": "^25.5.0", - "@jest/transform": "^25.5.0", + "@jest/transform": "^25.5.1", "@jest/types": "^25.5.0", "ansi-escapes": "^4.2.1", "chalk": "^3.0.0", "exit": "^0.1.2", "graceful-fs": "^4.2.4", "jest-changed-files": "^25.5.0", - "jest-config": "^25.5.0", - "jest-haste-map": "^25.5.0", + "jest-config": "^25.5.1", + "jest-haste-map": "^25.5.1", "jest-message-util": "^25.5.0", "jest-regex-util": "^25.2.6", - "jest-resolve": "^25.5.0", - "jest-resolve-dependencies": "^25.5.0", - "jest-runner": "^25.5.0", - "jest-runtime": "^25.5.0", - "jest-snapshot": "^25.5.0", + "jest-resolve": "^25.5.1", + "jest-resolve-dependencies": "^25.5.1", + "jest-runner": "^25.5.1", + "jest-runtime": "^25.5.1", + "jest-snapshot": "^25.5.1", "jest-util": "^25.5.0", "jest-validate": "^25.5.0", "jest-watcher": "^25.5.0", @@ -42,7 +42,7 @@ "strip-ansi": "^6.0.0" }, "devDependencies": { - "@jest/test-sequencer": "^25.5.0", + "@jest/test-sequencer": "^25.5.1", "@types/exit": "^0.1.30", "@types/graceful-fs": "^4.1.2", "@types/micromatch": "^4.0.0", diff --git a/packages/jest-haste-map/package.json b/packages/jest-haste-map/package.json index 1cfa45f678f1..7b6deebf45df 100644 --- a/packages/jest-haste-map/package.json +++ b/packages/jest-haste-map/package.json @@ -1,6 +1,6 @@ { "name": "jest-haste-map", - "version": "25.5.0", + "version": "25.5.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", diff --git a/packages/jest-jasmine2/package.json b/packages/jest-jasmine2/package.json index 0344495648b6..0a32d86cb78f 100644 --- a/packages/jest-jasmine2/package.json +++ b/packages/jest-jasmine2/package.json @@ -1,6 +1,6 @@ { "name": "jest-jasmine2", - "version": "25.5.0", + "version": "25.5.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -29,8 +29,8 @@ "jest-each": "^25.5.0", "jest-matcher-utils": "^25.5.0", "jest-message-util": "^25.5.0", - "jest-runtime": "^25.5.0", - "jest-snapshot": "^25.5.0", + "jest-runtime": "^25.5.1", + "jest-snapshot": "^25.5.1", "jest-util": "^25.5.0", "pretty-format": "^25.5.0", "throat": "^5.0.0" diff --git a/packages/jest-repl/package.json b/packages/jest-repl/package.json index f303fdc39361..9fb221a0bde5 100644 --- a/packages/jest-repl/package.json +++ b/packages/jest-repl/package.json @@ -1,6 +1,6 @@ { "name": "jest-repl", - "version": "25.5.0", + "version": "25.5.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -17,10 +17,10 @@ } }, "dependencies": { - "@jest/transform": "^25.5.0", + "@jest/transform": "^25.5.1", "@jest/types": "^25.5.0", - "jest-config": "^25.5.0", - "jest-runtime": "^25.5.0", + "jest-config": "^25.5.1", + "jest-runtime": "^25.5.1", "jest-validate": "^25.5.0", "repl": "^0.1.3", "yargs": "^15.3.1" diff --git a/packages/jest-reporters/package.json b/packages/jest-reporters/package.json index 2914154ea7a9..db46b54c84d6 100644 --- a/packages/jest-reporters/package.json +++ b/packages/jest-reporters/package.json @@ -1,7 +1,7 @@ { "name": "@jest/reporters", "description": "Jest's reporters", - "version": "25.5.0", + "version": "25.5.1", "main": "build/index.js", "types": "build/index.d.ts", "typesVersions": { @@ -15,7 +15,7 @@ "@bcoe/v8-coverage": "^0.2.3", "@jest/console": "^25.5.0", "@jest/test-result": "^25.5.0", - "@jest/transform": "^25.5.0", + "@jest/transform": "^25.5.1", "@jest/types": "^25.5.0", "chalk": "^3.0.0", "collect-v8-coverage": "^1.0.0", @@ -27,8 +27,8 @@ "istanbul-lib-report": "^3.0.0", "istanbul-lib-source-maps": "^4.0.0", "istanbul-reports": "^3.0.2", - "jest-haste-map": "^25.5.0", - "jest-resolve": "^25.5.0", + "jest-haste-map": "^25.5.1", + "jest-resolve": "^25.5.1", "jest-util": "^25.5.0", "jest-worker": "^25.5.0", "slash": "^3.0.0", diff --git a/packages/jest-resolve-dependencies/package.json b/packages/jest-resolve-dependencies/package.json index 9e8f43044e48..2d4950df1637 100644 --- a/packages/jest-resolve-dependencies/package.json +++ b/packages/jest-resolve-dependencies/package.json @@ -1,6 +1,6 @@ { "name": "jest-resolve-dependencies", - "version": "25.5.0", + "version": "25.5.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -19,12 +19,12 @@ "dependencies": { "@jest/types": "^25.5.0", "jest-regex-util": "^25.2.6", - "jest-snapshot": "^25.5.0" + "jest-snapshot": "^25.5.1" }, "devDependencies": { - "jest-haste-map": "^25.5.0", - "jest-resolve": "^25.5.0", - "jest-runtime": "^25.5.0" + "jest-haste-map": "^25.5.1", + "jest-resolve": "^25.5.1", + "jest-runtime": "^25.5.1" }, "engines": { "node": ">= 8.3" diff --git a/packages/jest-resolve/package.json b/packages/jest-resolve/package.json index c903864fb8f3..4ad1b61c8f33 100644 --- a/packages/jest-resolve/package.json +++ b/packages/jest-resolve/package.json @@ -1,6 +1,6 @@ { "name": "jest-resolve", - "version": "25.5.0", + "version": "25.5.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -31,7 +31,7 @@ "@types/browser-resolve": "^1.11.0", "@types/graceful-fs": "^4.1.3", "@types/resolve": "^1.14.0", - "jest-haste-map": "^25.5.0" + "jest-haste-map": "^25.5.1" }, "engines": { "node": ">= 8.3" diff --git a/packages/jest-runner/package.json b/packages/jest-runner/package.json index a7eb3357b808..572d7a76e5cf 100644 --- a/packages/jest-runner/package.json +++ b/packages/jest-runner/package.json @@ -1,6 +1,6 @@ { "name": "jest-runner", - "version": "25.5.0", + "version": "25.5.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -24,14 +24,14 @@ "chalk": "^3.0.0", "exit": "^0.1.2", "graceful-fs": "^4.2.4", - "jest-config": "^25.5.0", + "jest-config": "^25.5.1", "jest-docblock": "^25.3.0", - "jest-haste-map": "^25.5.0", - "jest-jasmine2": "^25.5.0", + "jest-haste-map": "^25.5.1", + "jest-jasmine2": "^25.5.1", "jest-leak-detector": "^25.5.0", "jest-message-util": "^25.5.0", - "jest-resolve": "^25.5.0", - "jest-runtime": "^25.5.0", + "jest-resolve": "^25.5.1", + "jest-runtime": "^25.5.1", "jest-util": "^25.5.0", "jest-worker": "^25.5.0", "source-map-support": "^0.5.6", @@ -42,7 +42,7 @@ "@types/graceful-fs": "^4.1.2", "@types/node": "*", "@types/source-map-support": "^0.5.0", - "jest-circus": "^25.5.0" + "jest-circus": "^25.5.1" }, "engines": { "node": ">= 8.3" diff --git a/packages/jest-runtime/package.json b/packages/jest-runtime/package.json index 360e109de6c9..908e3d1d50b7 100644 --- a/packages/jest-runtime/package.json +++ b/packages/jest-runtime/package.json @@ -1,6 +1,6 @@ { "name": "jest-runtime", - "version": "25.5.0", + "version": "25.5.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -22,7 +22,7 @@ "@jest/globals": "^25.5.0", "@jest/source-map": "^25.5.0", "@jest/test-result": "^25.5.0", - "@jest/transform": "^25.5.0", + "@jest/transform": "^25.5.1", "@jest/types": "^25.5.0", "@types/yargs": "^15.0.0", "chalk": "^3.0.0", @@ -30,13 +30,13 @@ "exit": "^0.1.2", "glob": "^7.1.3", "graceful-fs": "^4.2.4", - "jest-config": "^25.5.0", - "jest-haste-map": "^25.5.0", + "jest-config": "^25.5.1", + "jest-haste-map": "^25.5.1", "jest-message-util": "^25.5.0", "jest-mock": "^25.5.0", "jest-regex-util": "^25.2.6", - "jest-resolve": "^25.5.0", - "jest-snapshot": "^25.5.0", + "jest-resolve": "^25.5.1", + "jest-snapshot": "^25.5.1", "jest-util": "^25.5.0", "jest-validate": "^25.5.0", "realpath-native": "^2.0.0", diff --git a/packages/jest-snapshot/package.json b/packages/jest-snapshot/package.json index e1e0a94c74e0..a0b502a2a48d 100644 --- a/packages/jest-snapshot/package.json +++ b/packages/jest-snapshot/package.json @@ -1,6 +1,6 @@ { "name": "jest-snapshot", - "version": "25.5.0", + "version": "25.5.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -27,7 +27,7 @@ "jest-get-type": "^25.2.6", "jest-matcher-utils": "^25.5.0", "jest-message-util": "^25.5.0", - "jest-resolve": "^25.5.0", + "jest-resolve": "^25.5.1", "make-dir": "^3.0.0", "natural-compare": "^1.4.0", "pretty-format": "^25.5.0", @@ -40,7 +40,7 @@ "@types/semver": "^6.0.1", "ansi-regex": "^5.0.0", "ansi-styles": "^4.2.0", - "jest-haste-map": "^25.5.0", + "jest-haste-map": "^25.5.1", "prettier": "^1.13.4" }, "engines": { diff --git a/packages/jest-test-sequencer/package.json b/packages/jest-test-sequencer/package.json index ffa59e49b508..775604b03def 100644 --- a/packages/jest-test-sequencer/package.json +++ b/packages/jest-test-sequencer/package.json @@ -1,6 +1,6 @@ { "name": "@jest/test-sequencer", - "version": "25.5.0", + "version": "25.5.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -19,9 +19,9 @@ "dependencies": { "@jest/test-result": "^25.5.0", "graceful-fs": "^4.2.4", - "jest-haste-map": "^25.5.0", - "jest-runner": "^25.5.0", - "jest-runtime": "^25.5.0" + "jest-haste-map": "^25.5.1", + "jest-runner": "^25.5.1", + "jest-runtime": "^25.5.1" }, "devDependencies": { "@types/graceful-fs": "^4.1.3" diff --git a/packages/jest-transform/package.json b/packages/jest-transform/package.json index 68b941c4a71a..a4bb71051a1d 100644 --- a/packages/jest-transform/package.json +++ b/packages/jest-transform/package.json @@ -1,6 +1,6 @@ { "name": "@jest/transform", - "version": "25.5.0", + "version": "25.5.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -24,7 +24,7 @@ "convert-source-map": "^1.4.0", "fast-json-stable-stringify": "^2.0.0", "graceful-fs": "^4.2.4", - "jest-haste-map": "^25.5.0", + "jest-haste-map": "^25.5.1", "jest-regex-util": "^25.2.6", "jest-util": "^25.5.0", "micromatch": "^4.0.2", diff --git a/packages/jest/package.json b/packages/jest/package.json index 1ba22423894b..0bb3af045277 100644 --- a/packages/jest/package.json +++ b/packages/jest/package.json @@ -1,7 +1,7 @@ { "name": "jest", "description": "Delightful JavaScript Testing.", - "version": "25.5.0", + "version": "25.5.1", "main": "build/jest.js", "types": "build/jest.d.ts", "typesVersions": { @@ -12,9 +12,9 @@ } }, "dependencies": { - "@jest/core": "^25.5.0", + "@jest/core": "^25.5.1", "import-local": "^3.0.2", - "jest-cli": "^25.5.0" + "jest-cli": "^25.5.1" }, "bin": "./bin/jest.js", "engines": { From e21468da33a2f3c9c2b9af0dcfba14b002737f60 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Wed, 29 Apr 2020 23:43:10 +0200 Subject: [PATCH 018/106] fix: export globals as values, not types (#9925) --- CHANGELOG.md | 2 ++ packages/jest-globals/src/index.ts | 28 ++++++++++++++-------------- packages/jest-runtime/src/index.ts | 4 ++-- 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 84b399654913..ae724ef686cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ ### Fixes +- `[jest-globals]` Export globals as values, not types ([#9925](https://github.com/facebook/jest/pull/9925)) + ### Chore & Maintenance ### Performance diff --git a/packages/jest-globals/src/index.ts b/packages/jest-globals/src/index.ts index 82bc15a3b522..cc13927c0d13 100644 --- a/packages/jest-globals/src/index.ts +++ b/packages/jest-globals/src/index.ts @@ -9,22 +9,22 @@ import importedExpect = require('expect'); import type {Jest} from '@jest/environment'; import type {Global} from '@jest/types'; -export declare type jest = Jest; +export declare const jest: Jest; -export declare type expect = typeof importedExpect; +export declare const expect: typeof importedExpect; -export declare type it = Global.GlobalAdditions['it']; -export declare type test = Global.GlobalAdditions['test']; -export declare type fit = Global.GlobalAdditions['fit']; -export declare type xit = Global.GlobalAdditions['xit']; -export declare type xtest = Global.GlobalAdditions['xtest']; -export declare type describe = Global.GlobalAdditions['describe']; -export declare type xdescribe = Global.GlobalAdditions['xdescribe']; -export declare type fdescribe = Global.GlobalAdditions['fdescribe']; -export declare type beforeAll = Global.GlobalAdditions['beforeAll']; -export declare type beforeEach = Global.GlobalAdditions['beforeEach']; -export declare type afterEach = Global.GlobalAdditions['afterEach']; -export declare type afterAll = Global.GlobalAdditions['afterAll']; +export declare const it: Global.GlobalAdditions['it']; +export declare const test: Global.GlobalAdditions['test']; +export declare const fit: Global.GlobalAdditions['fit']; +export declare const xit: Global.GlobalAdditions['xit']; +export declare const xtest: Global.GlobalAdditions['xtest']; +export declare const describe: Global.GlobalAdditions['describe']; +export declare const xdescribe: Global.GlobalAdditions['xdescribe']; +export declare const fdescribe: Global.GlobalAdditions['fdescribe']; +export declare const beforeAll: Global.GlobalAdditions['beforeAll']; +export declare const beforeEach: Global.GlobalAdditions['beforeEach']; +export declare const afterEach: Global.GlobalAdditions['afterEach']; +export declare const afterAll: Global.GlobalAdditions['afterAll']; throw new Error( 'Do not import `@jest/globals` outside of the Jest test environment', diff --git a/packages/jest-runtime/src/index.ts b/packages/jest-runtime/src/index.ts index 609abc543ad2..32c1c751b7f1 100644 --- a/packages/jest-runtime/src/index.ts +++ b/packages/jest-runtime/src/index.ts @@ -54,8 +54,8 @@ import Snapshot = require('jest-snapshot'); import stripBOM = require('strip-bom'); interface JestGlobalsValues extends Global.TestFrameworkGlobals { - jest: JestGlobals.jest; - expect: JestGlobals.expect; + jest: typeof JestGlobals.jest; + expect: typeof JestGlobals.expect; } type HasteMapOptions = { From fdd36268fd69a73069ff51f240a3aa2bf5493717 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Wed, 29 Apr 2020 23:44:07 +0200 Subject: [PATCH 019/106] chore: update changelog for release --- CHANGELOG.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ae724ef686cd..8052d1334837 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,12 +4,16 @@ ### Fixes -- `[jest-globals]` Export globals as values, not types ([#9925](https://github.com/facebook/jest/pull/9925)) - ### Chore & Maintenance ### Performance +## 25.5.2 + +### Fixes + +- `[jest-globals]` Export globals as values, not types ([#9925](https://github.com/facebook/jest/pull/9925)) + ## 25.5.1 ### Fixes From ad1b9dc090922a8ed5632ec7382ac999e6b8cac1 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Wed, 29 Apr 2020 23:49:55 +0200 Subject: [PATCH 020/106] v25.5.2 --- lerna.json | 2 +- packages/jest-circus/package.json | 4 ++-- packages/jest-cli/package.json | 6 +++--- packages/jest-config/package.json | 6 +++--- packages/jest-core/package.json | 12 ++++++------ packages/jest-globals/package.json | 2 +- packages/jest-jasmine2/package.json | 4 ++-- packages/jest-repl/package.json | 6 +++--- packages/jest-resolve-dependencies/package.json | 4 ++-- packages/jest-runner/package.json | 10 +++++----- packages/jest-runtime/package.json | 6 +++--- packages/jest-test-sequencer/package.json | 6 +++--- packages/jest/package.json | 6 +++--- 13 files changed, 37 insertions(+), 37 deletions(-) diff --git a/lerna.json b/lerna.json index 59c4cf92f24d..3efcbd662cbd 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "25.5.1", + "version": "25.5.2", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/jest-circus/package.json b/packages/jest-circus/package.json index 79015a136683..e87967be53cd 100644 --- a/packages/jest-circus/package.json +++ b/packages/jest-circus/package.json @@ -1,6 +1,6 @@ { "name": "jest-circus", - "version": "25.5.1", + "version": "25.5.2", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -28,7 +28,7 @@ "jest-each": "^25.5.0", "jest-matcher-utils": "^25.5.0", "jest-message-util": "^25.5.0", - "jest-runtime": "^25.5.1", + "jest-runtime": "^25.5.2", "jest-snapshot": "^25.5.1", "jest-util": "^25.5.0", "pretty-format": "^25.5.0", diff --git a/packages/jest-cli/package.json b/packages/jest-cli/package.json index de5859887d1d..1b1f38f6fda6 100644 --- a/packages/jest-cli/package.json +++ b/packages/jest-cli/package.json @@ -1,7 +1,7 @@ { "name": "jest-cli", "description": "Delightful JavaScript Testing.", - "version": "25.5.1", + "version": "25.5.2", "main": "build/index.js", "types": "build/index.d.ts", "typesVersions": { @@ -12,7 +12,7 @@ } }, "dependencies": { - "@jest/core": "^25.5.1", + "@jest/core": "^25.5.2", "@jest/test-result": "^25.5.0", "@jest/types": "^25.5.0", "chalk": "^3.0.0", @@ -20,7 +20,7 @@ "graceful-fs": "^4.2.4", "import-local": "^3.0.2", "is-ci": "^2.0.0", - "jest-config": "^25.5.1", + "jest-config": "^25.5.2", "jest-util": "^25.5.0", "jest-validate": "^25.5.0", "prompts": "^2.0.1", diff --git a/packages/jest-config/package.json b/packages/jest-config/package.json index 7fb5c835b078..97c6d7c9bf20 100644 --- a/packages/jest-config/package.json +++ b/packages/jest-config/package.json @@ -1,6 +1,6 @@ { "name": "jest-config", - "version": "25.5.1", + "version": "25.5.2", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -18,7 +18,7 @@ }, "dependencies": { "@babel/core": "^7.1.0", - "@jest/test-sequencer": "^25.5.1", + "@jest/test-sequencer": "^25.5.2", "@jest/types": "^25.5.0", "babel-jest": "^25.5.1", "chalk": "^3.0.0", @@ -28,7 +28,7 @@ "jest-environment-jsdom": "^25.5.0", "jest-environment-node": "^25.5.0", "jest-get-type": "^25.2.6", - "jest-jasmine2": "^25.5.1", + "jest-jasmine2": "^25.5.2", "jest-regex-util": "^25.2.6", "jest-resolve": "^25.5.1", "jest-util": "^25.5.0", diff --git a/packages/jest-core/package.json b/packages/jest-core/package.json index 53001cf54ff5..64c45292f68e 100644 --- a/packages/jest-core/package.json +++ b/packages/jest-core/package.json @@ -1,7 +1,7 @@ { "name": "@jest/core", "description": "Delightful JavaScript Testing.", - "version": "25.5.1", + "version": "25.5.2", "main": "build/jest.js", "types": "build/jest.d.ts", "typesVersions": { @@ -22,14 +22,14 @@ "exit": "^0.1.2", "graceful-fs": "^4.2.4", "jest-changed-files": "^25.5.0", - "jest-config": "^25.5.1", + "jest-config": "^25.5.2", "jest-haste-map": "^25.5.1", "jest-message-util": "^25.5.0", "jest-regex-util": "^25.2.6", "jest-resolve": "^25.5.1", - "jest-resolve-dependencies": "^25.5.1", - "jest-runner": "^25.5.1", - "jest-runtime": "^25.5.1", + "jest-resolve-dependencies": "^25.5.2", + "jest-runner": "^25.5.2", + "jest-runtime": "^25.5.2", "jest-snapshot": "^25.5.1", "jest-util": "^25.5.0", "jest-validate": "^25.5.0", @@ -42,7 +42,7 @@ "strip-ansi": "^6.0.0" }, "devDependencies": { - "@jest/test-sequencer": "^25.5.1", + "@jest/test-sequencer": "^25.5.2", "@types/exit": "^0.1.30", "@types/graceful-fs": "^4.1.2", "@types/micromatch": "^4.0.0", diff --git a/packages/jest-globals/package.json b/packages/jest-globals/package.json index fcc69fa44994..024d7d52fa17 100644 --- a/packages/jest-globals/package.json +++ b/packages/jest-globals/package.json @@ -1,6 +1,6 @@ { "name": "@jest/globals", - "version": "25.5.0", + "version": "25.5.2", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", diff --git a/packages/jest-jasmine2/package.json b/packages/jest-jasmine2/package.json index 0a32d86cb78f..fc1af7df0223 100644 --- a/packages/jest-jasmine2/package.json +++ b/packages/jest-jasmine2/package.json @@ -1,6 +1,6 @@ { "name": "jest-jasmine2", - "version": "25.5.1", + "version": "25.5.2", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -29,7 +29,7 @@ "jest-each": "^25.5.0", "jest-matcher-utils": "^25.5.0", "jest-message-util": "^25.5.0", - "jest-runtime": "^25.5.1", + "jest-runtime": "^25.5.2", "jest-snapshot": "^25.5.1", "jest-util": "^25.5.0", "pretty-format": "^25.5.0", diff --git a/packages/jest-repl/package.json b/packages/jest-repl/package.json index 9fb221a0bde5..e5112c34bd89 100644 --- a/packages/jest-repl/package.json +++ b/packages/jest-repl/package.json @@ -1,6 +1,6 @@ { "name": "jest-repl", - "version": "25.5.1", + "version": "25.5.2", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -19,8 +19,8 @@ "dependencies": { "@jest/transform": "^25.5.1", "@jest/types": "^25.5.0", - "jest-config": "^25.5.1", - "jest-runtime": "^25.5.1", + "jest-config": "^25.5.2", + "jest-runtime": "^25.5.2", "jest-validate": "^25.5.0", "repl": "^0.1.3", "yargs": "^15.3.1" diff --git a/packages/jest-resolve-dependencies/package.json b/packages/jest-resolve-dependencies/package.json index 2d4950df1637..8638c5fd4c66 100644 --- a/packages/jest-resolve-dependencies/package.json +++ b/packages/jest-resolve-dependencies/package.json @@ -1,6 +1,6 @@ { "name": "jest-resolve-dependencies", - "version": "25.5.1", + "version": "25.5.2", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -24,7 +24,7 @@ "devDependencies": { "jest-haste-map": "^25.5.1", "jest-resolve": "^25.5.1", - "jest-runtime": "^25.5.1" + "jest-runtime": "^25.5.2" }, "engines": { "node": ">= 8.3" diff --git a/packages/jest-runner/package.json b/packages/jest-runner/package.json index 572d7a76e5cf..226d0566232a 100644 --- a/packages/jest-runner/package.json +++ b/packages/jest-runner/package.json @@ -1,6 +1,6 @@ { "name": "jest-runner", - "version": "25.5.1", + "version": "25.5.2", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -24,14 +24,14 @@ "chalk": "^3.0.0", "exit": "^0.1.2", "graceful-fs": "^4.2.4", - "jest-config": "^25.5.1", + "jest-config": "^25.5.2", "jest-docblock": "^25.3.0", "jest-haste-map": "^25.5.1", - "jest-jasmine2": "^25.5.1", + "jest-jasmine2": "^25.5.2", "jest-leak-detector": "^25.5.0", "jest-message-util": "^25.5.0", "jest-resolve": "^25.5.1", - "jest-runtime": "^25.5.1", + "jest-runtime": "^25.5.2", "jest-util": "^25.5.0", "jest-worker": "^25.5.0", "source-map-support": "^0.5.6", @@ -42,7 +42,7 @@ "@types/graceful-fs": "^4.1.2", "@types/node": "*", "@types/source-map-support": "^0.5.0", - "jest-circus": "^25.5.1" + "jest-circus": "^25.5.2" }, "engines": { "node": ">= 8.3" diff --git a/packages/jest-runtime/package.json b/packages/jest-runtime/package.json index 908e3d1d50b7..e7474dbe96ab 100644 --- a/packages/jest-runtime/package.json +++ b/packages/jest-runtime/package.json @@ -1,6 +1,6 @@ { "name": "jest-runtime", - "version": "25.5.1", + "version": "25.5.2", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -19,7 +19,7 @@ "dependencies": { "@jest/console": "^25.5.0", "@jest/environment": "^25.5.0", - "@jest/globals": "^25.5.0", + "@jest/globals": "^25.5.2", "@jest/source-map": "^25.5.0", "@jest/test-result": "^25.5.0", "@jest/transform": "^25.5.1", @@ -30,7 +30,7 @@ "exit": "^0.1.2", "glob": "^7.1.3", "graceful-fs": "^4.2.4", - "jest-config": "^25.5.1", + "jest-config": "^25.5.2", "jest-haste-map": "^25.5.1", "jest-message-util": "^25.5.0", "jest-mock": "^25.5.0", diff --git a/packages/jest-test-sequencer/package.json b/packages/jest-test-sequencer/package.json index 775604b03def..27682738ca39 100644 --- a/packages/jest-test-sequencer/package.json +++ b/packages/jest-test-sequencer/package.json @@ -1,6 +1,6 @@ { "name": "@jest/test-sequencer", - "version": "25.5.1", + "version": "25.5.2", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -20,8 +20,8 @@ "@jest/test-result": "^25.5.0", "graceful-fs": "^4.2.4", "jest-haste-map": "^25.5.1", - "jest-runner": "^25.5.1", - "jest-runtime": "^25.5.1" + "jest-runner": "^25.5.2", + "jest-runtime": "^25.5.2" }, "devDependencies": { "@types/graceful-fs": "^4.1.3" diff --git a/packages/jest/package.json b/packages/jest/package.json index 0bb3af045277..b52b20afc0ae 100644 --- a/packages/jest/package.json +++ b/packages/jest/package.json @@ -1,7 +1,7 @@ { "name": "jest", "description": "Delightful JavaScript Testing.", - "version": "25.5.1", + "version": "25.5.2", "main": "build/jest.js", "types": "build/jest.d.ts", "typesVersions": { @@ -12,9 +12,9 @@ } }, "dependencies": { - "@jest/core": "^25.5.1", + "@jest/core": "^25.5.2", "import-local": "^3.0.2", - "jest-cli": "^25.5.1" + "jest-cli": "^25.5.2" }, "bin": "./bin/jest.js", "engines": { From 2fa7f4d4b822c203c848da727cb1806b423cec7c Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Thu, 30 Apr 2020 17:14:05 +0200 Subject: [PATCH 021/106] fix: plug memory leak in jest-circus when running in band (#9934) --- .circleci/config.yml | 2 +- CHANGELOG.md | 2 ++ .../src/legacy-code-todo-rewrite/jestAdapter.ts | 10 ++++++++-- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index fcee3ee8e014..578043e864e6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -58,7 +58,7 @@ jobs: - run: *install - save-cache: *save-cache - run: - command: JEST_CIRCUS=1 yarn test-ci-partial + command: JEST_CIRCUS=1 yarn test-ci-partial && JEST_CIRCUS=1 yarn test-leak - store_test_results: path: reports/junit diff --git a/CHANGELOG.md b/CHANGELOG.md index 8052d1334837..9e4741b83665 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ ### Performance +- `[jest-circus]` Fix memory leak when running in band ([#9934](https://github.com/facebook/jest/pull/9934)) + ## 25.5.2 ### Fixes diff --git a/packages/jest-circus/src/legacy-code-todo-rewrite/jestAdapter.ts b/packages/jest-circus/src/legacy-code-todo-rewrite/jestAdapter.ts index 4630f16c56bb..f5653ebf5927 100644 --- a/packages/jest-circus/src/legacy-code-todo-rewrite/jestAdapter.ts +++ b/packages/jest-circus/src/legacy-code-todo-rewrite/jestAdapter.ts @@ -11,6 +11,7 @@ import type {JestEnvironment} from '@jest/environment'; import type {TestResult} from '@jest/test-result'; import type {RuntimeType as Runtime} from 'jest-runtime'; import type {SnapshotStateType} from 'jest-snapshot'; +import {deepCyclicCopy} from 'jest-util'; const FRAMEWORK_INITIALIZER = path.resolve(__dirname, './jestAdapterInit.js'); const EXPECT_INITIALIZER = path.resolve(__dirname, './jestExpect.js'); @@ -101,7 +102,13 @@ const jestAdapter = async ( globalConfig, testPath, }); - return _addSnapshotData(results, snapshotState); + + _addSnapshotData(results, snapshotState); + + // We need to copy the results object to ensure we don't leaks the prototypes + // from the VM. Jasmine creates the result objects in the parent process, we + // should consider doing that for circus as well. + return deepCyclicCopy(results, {keepPrototype: false}); }; const _addSnapshotData = ( @@ -131,7 +138,6 @@ const _addSnapshotData = ( results.snapshot.unchecked = !status.deleted ? uncheckedCount : 0; // Copy the array to prevent memory leaks results.snapshot.uncheckedKeys = Array.from(uncheckedKeys); - return results; }; export = jestAdapter; From 3d11113affd91929578b87283fb7b0a31555d0c0 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Fri, 1 May 2020 00:12:48 +0200 Subject: [PATCH 022/106] chore: update changelog for release --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e4741b83665..7ae8c772d18b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ ### Performance +## 25.5.3 + +### Chore & Maintenance + - `[jest-circus]` Fix memory leak when running in band ([#9934](https://github.com/facebook/jest/pull/9934)) ## 25.5.2 From 80b69051271602aa62ed8de896ba80ca3150f4a5 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Fri, 1 May 2020 00:13:24 +0200 Subject: [PATCH 023/106] v25.5.3 --- lerna.json | 2 +- packages/jest-circus/package.json | 4 ++-- packages/jest-cli/package.json | 6 +++--- packages/jest-config/package.json | 4 ++-- packages/jest-core/package.json | 10 +++++----- packages/jest-repl/package.json | 6 +++--- packages/jest-runner/package.json | 8 ++++---- packages/jest-runtime/package.json | 4 ++-- packages/jest-test-sequencer/package.json | 6 +++--- packages/jest/package.json | 6 +++--- 10 files changed, 28 insertions(+), 28 deletions(-) diff --git a/lerna.json b/lerna.json index 3efcbd662cbd..b33b053db07e 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "25.5.2", + "version": "25.5.3", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/jest-circus/package.json b/packages/jest-circus/package.json index e87967be53cd..1fe2db9ff16d 100644 --- a/packages/jest-circus/package.json +++ b/packages/jest-circus/package.json @@ -1,6 +1,6 @@ { "name": "jest-circus", - "version": "25.5.2", + "version": "25.5.3", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -28,7 +28,7 @@ "jest-each": "^25.5.0", "jest-matcher-utils": "^25.5.0", "jest-message-util": "^25.5.0", - "jest-runtime": "^25.5.2", + "jest-runtime": "^25.5.3", "jest-snapshot": "^25.5.1", "jest-util": "^25.5.0", "pretty-format": "^25.5.0", diff --git a/packages/jest-cli/package.json b/packages/jest-cli/package.json index 1b1f38f6fda6..81a534547e9a 100644 --- a/packages/jest-cli/package.json +++ b/packages/jest-cli/package.json @@ -1,7 +1,7 @@ { "name": "jest-cli", "description": "Delightful JavaScript Testing.", - "version": "25.5.2", + "version": "25.5.3", "main": "build/index.js", "types": "build/index.d.ts", "typesVersions": { @@ -12,7 +12,7 @@ } }, "dependencies": { - "@jest/core": "^25.5.2", + "@jest/core": "^25.5.3", "@jest/test-result": "^25.5.0", "@jest/types": "^25.5.0", "chalk": "^3.0.0", @@ -20,7 +20,7 @@ "graceful-fs": "^4.2.4", "import-local": "^3.0.2", "is-ci": "^2.0.0", - "jest-config": "^25.5.2", + "jest-config": "^25.5.3", "jest-util": "^25.5.0", "jest-validate": "^25.5.0", "prompts": "^2.0.1", diff --git a/packages/jest-config/package.json b/packages/jest-config/package.json index 97c6d7c9bf20..d18735426d05 100644 --- a/packages/jest-config/package.json +++ b/packages/jest-config/package.json @@ -1,6 +1,6 @@ { "name": "jest-config", - "version": "25.5.2", + "version": "25.5.3", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -18,7 +18,7 @@ }, "dependencies": { "@babel/core": "^7.1.0", - "@jest/test-sequencer": "^25.5.2", + "@jest/test-sequencer": "^25.5.3", "@jest/types": "^25.5.0", "babel-jest": "^25.5.1", "chalk": "^3.0.0", diff --git a/packages/jest-core/package.json b/packages/jest-core/package.json index 64c45292f68e..3e049195ccb6 100644 --- a/packages/jest-core/package.json +++ b/packages/jest-core/package.json @@ -1,7 +1,7 @@ { "name": "@jest/core", "description": "Delightful JavaScript Testing.", - "version": "25.5.2", + "version": "25.5.3", "main": "build/jest.js", "types": "build/jest.d.ts", "typesVersions": { @@ -22,14 +22,14 @@ "exit": "^0.1.2", "graceful-fs": "^4.2.4", "jest-changed-files": "^25.5.0", - "jest-config": "^25.5.2", + "jest-config": "^25.5.3", "jest-haste-map": "^25.5.1", "jest-message-util": "^25.5.0", "jest-regex-util": "^25.2.6", "jest-resolve": "^25.5.1", "jest-resolve-dependencies": "^25.5.2", - "jest-runner": "^25.5.2", - "jest-runtime": "^25.5.2", + "jest-runner": "^25.5.3", + "jest-runtime": "^25.5.3", "jest-snapshot": "^25.5.1", "jest-util": "^25.5.0", "jest-validate": "^25.5.0", @@ -42,7 +42,7 @@ "strip-ansi": "^6.0.0" }, "devDependencies": { - "@jest/test-sequencer": "^25.5.2", + "@jest/test-sequencer": "^25.5.3", "@types/exit": "^0.1.30", "@types/graceful-fs": "^4.1.2", "@types/micromatch": "^4.0.0", diff --git a/packages/jest-repl/package.json b/packages/jest-repl/package.json index e5112c34bd89..6f00f49a321c 100644 --- a/packages/jest-repl/package.json +++ b/packages/jest-repl/package.json @@ -1,6 +1,6 @@ { "name": "jest-repl", - "version": "25.5.2", + "version": "25.5.3", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -19,8 +19,8 @@ "dependencies": { "@jest/transform": "^25.5.1", "@jest/types": "^25.5.0", - "jest-config": "^25.5.2", - "jest-runtime": "^25.5.2", + "jest-config": "^25.5.3", + "jest-runtime": "^25.5.3", "jest-validate": "^25.5.0", "repl": "^0.1.3", "yargs": "^15.3.1" diff --git a/packages/jest-runner/package.json b/packages/jest-runner/package.json index 226d0566232a..226e7ca996cf 100644 --- a/packages/jest-runner/package.json +++ b/packages/jest-runner/package.json @@ -1,6 +1,6 @@ { "name": "jest-runner", - "version": "25.5.2", + "version": "25.5.3", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -24,14 +24,14 @@ "chalk": "^3.0.0", "exit": "^0.1.2", "graceful-fs": "^4.2.4", - "jest-config": "^25.5.2", + "jest-config": "^25.5.3", "jest-docblock": "^25.3.0", "jest-haste-map": "^25.5.1", "jest-jasmine2": "^25.5.2", "jest-leak-detector": "^25.5.0", "jest-message-util": "^25.5.0", "jest-resolve": "^25.5.1", - "jest-runtime": "^25.5.2", + "jest-runtime": "^25.5.3", "jest-util": "^25.5.0", "jest-worker": "^25.5.0", "source-map-support": "^0.5.6", @@ -42,7 +42,7 @@ "@types/graceful-fs": "^4.1.2", "@types/node": "*", "@types/source-map-support": "^0.5.0", - "jest-circus": "^25.5.2" + "jest-circus": "^25.5.3" }, "engines": { "node": ">= 8.3" diff --git a/packages/jest-runtime/package.json b/packages/jest-runtime/package.json index e7474dbe96ab..d145df1016b5 100644 --- a/packages/jest-runtime/package.json +++ b/packages/jest-runtime/package.json @@ -1,6 +1,6 @@ { "name": "jest-runtime", - "version": "25.5.2", + "version": "25.5.3", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -30,7 +30,7 @@ "exit": "^0.1.2", "glob": "^7.1.3", "graceful-fs": "^4.2.4", - "jest-config": "^25.5.2", + "jest-config": "^25.5.3", "jest-haste-map": "^25.5.1", "jest-message-util": "^25.5.0", "jest-mock": "^25.5.0", diff --git a/packages/jest-test-sequencer/package.json b/packages/jest-test-sequencer/package.json index 27682738ca39..567bea76921a 100644 --- a/packages/jest-test-sequencer/package.json +++ b/packages/jest-test-sequencer/package.json @@ -1,6 +1,6 @@ { "name": "@jest/test-sequencer", - "version": "25.5.2", + "version": "25.5.3", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -20,8 +20,8 @@ "@jest/test-result": "^25.5.0", "graceful-fs": "^4.2.4", "jest-haste-map": "^25.5.1", - "jest-runner": "^25.5.2", - "jest-runtime": "^25.5.2" + "jest-runner": "^25.5.3", + "jest-runtime": "^25.5.3" }, "devDependencies": { "@types/graceful-fs": "^4.1.3" diff --git a/packages/jest/package.json b/packages/jest/package.json index b52b20afc0ae..0cf0e476ce23 100644 --- a/packages/jest/package.json +++ b/packages/jest/package.json @@ -1,7 +1,7 @@ { "name": "jest", "description": "Delightful JavaScript Testing.", - "version": "25.5.2", + "version": "25.5.3", "main": "build/jest.js", "types": "build/jest.d.ts", "typesVersions": { @@ -12,9 +12,9 @@ } }, "dependencies": { - "@jest/core": "^25.5.2", + "@jest/core": "^25.5.3", "import-local": "^3.0.2", - "jest-cli": "^25.5.2" + "jest-cli": "^25.5.3" }, "bin": "./bin/jest.js", "engines": { From 649796d20cc9c34e24cffdf0109a64ef1e9ada56 Mon Sep 17 00:00:00 2001 From: jeiea Date: Sat, 2 May 2020 04:30:39 +0900 Subject: [PATCH 024/106] fix: don't run beforeAll/afterAll in skipped block (#9931) --- CHANGELOG.md | 2 + e2e/__tests__/skipBeforeAfterAll.test.ts | 19 ++++++ .../__tests__/beforeAllFiltered.test.js | 58 +++++++++++++++++++ e2e/before-all-skipped/package.json | 5 ++ packages/jest-jasmine2/src/treeProcessor.ts | 10 ++-- 5 files changed, 89 insertions(+), 5 deletions(-) create mode 100644 e2e/__tests__/skipBeforeAfterAll.test.ts create mode 100644 e2e/before-all-skipped/__tests__/beforeAllFiltered.test.js create mode 100644 e2e/before-all-skipped/package.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ae8c772d18b..38b9b4387f3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ ### Fixes +- `[jest-jasmine2]` Don't run `beforeAll` / `afterAll` in skipped describe block ([#9931](https://github.com/facebook/jest/pull/9931)) + ### Chore & Maintenance ### Performance diff --git a/e2e/__tests__/skipBeforeAfterAll.test.ts b/e2e/__tests__/skipBeforeAfterAll.test.ts new file mode 100644 index 000000000000..52e996552e11 --- /dev/null +++ b/e2e/__tests__/skipBeforeAfterAll.test.ts @@ -0,0 +1,19 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +import * as path from 'path'; +import {json as runWithJson} from '../runJest'; + +const DIR = path.resolve(__dirname, '../before-all-skipped'); + +test('correctly skip `beforeAll`s in skipped tests', () => { + const {json} = runWithJson(DIR); + + expect(json.numTotalTests).toBe(6); + expect(json.numPassedTests).toBe(4); + expect(json.numPendingTests).toBe(2); +}); diff --git a/e2e/before-all-skipped/__tests__/beforeAllFiltered.test.js b/e2e/before-all-skipped/__tests__/beforeAllFiltered.test.js new file mode 100644 index 000000000000..4e1d0f74efa2 --- /dev/null +++ b/e2e/before-all-skipped/__tests__/beforeAllFiltered.test.js @@ -0,0 +1,58 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +let hasBeforeAllRun = false; +let hasAfterAllRun = false; + +describe.skip('in describe.skip', () => { + describe('in describe', () => { + beforeAll(() => { + hasBeforeAllRun = true; + }); + + afterAll(() => { + hasAfterAllRun = true; + }); + + test('it should be skipped', () => { + throw new Error('This should never happen'); + }); + }); +}); + +test('describe.skip should not run beforeAll', () => { + expect(hasBeforeAllRun).toBe(false); +}); + +test('describe.skip should not run afterAll', () => { + expect(hasAfterAllRun).toBe(false); +}); + +let hasBeforeAllRun2 = false; +let hasAfterAllRun2 = false; + +describe('in describe', () => { + beforeAll(() => { + hasBeforeAllRun2 = true; + }); + + afterAll(() => { + hasAfterAllRun2 = true; + }); + + test.skip('it should be skipped', () => { + throw new Error('This should never happen'); + }); +}); + +test('describe having only skipped test should not run beforeAll', () => { + expect(hasBeforeAllRun2).toBe(false); +}); + +test('describe having only skipped test should not run afterAll', () => { + expect(hasAfterAllRun2).toBe(false); +}); diff --git a/e2e/before-all-skipped/package.json b/e2e/before-all-skipped/package.json new file mode 100644 index 000000000000..148788b25446 --- /dev/null +++ b/e2e/before-all-skipped/package.json @@ -0,0 +1,5 @@ +{ + "jest": { + "testEnvironment": "node" + } +} diff --git a/packages/jest-jasmine2/src/treeProcessor.ts b/packages/jest-jasmine2/src/treeProcessor.ts index 5bd4eeebe255..e46b9abfaca8 100644 --- a/packages/jest-jasmine2/src/treeProcessor.ts +++ b/packages/jest-jasmine2/src/treeProcessor.ts @@ -23,7 +23,7 @@ export type TreeNode = { onException: (error: Error) => void; sharedUserContext: () => any; children?: Array; -} & Pick; +} & Pick; export default function treeProcessor(options: Options): void { const { @@ -64,11 +64,11 @@ export default function treeProcessor(options: Options): void { }; } - function hasEnabledTest(node: TreeNode): boolean { + function hasNoEnabledTest(node: TreeNode): boolean { if (node.children) { - return node.children.some(hasEnabledTest); + return node.children.every(hasNoEnabledTest); } - return !node.disabled; + return node.disabled || node.markedPending; } function wrapChildren(node: TreeNode, enabled: boolean) { @@ -78,7 +78,7 @@ export default function treeProcessor(options: Options): void { const children = node.children.map(child => ({ fn: getNodeHandler(child, enabled), })); - if (!hasEnabledTest(node)) { + if (hasNoEnabledTest(node)) { return children; } return node.beforeAllFns.concat(children).concat(node.afterAllFns); From 78bb25ae050eab7bf2dc1c3b89140957ca2b2537 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Sat, 2 May 2020 10:09:48 +0200 Subject: [PATCH 025/106] fix: remove warning when mutating `require.cache` (#9946) --- CHANGELOG.md | 2 ++ packages/jest-runtime/src/index.ts | 13 ++----------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 38b9b4387f3f..c9d72b2c5798 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ ### Chore & Maintenance +- `[jest-runtime]` Do not warn when mutating `require.cache` ([#9946](https://github.com/facebook/jest/pull/9946)) + ### Performance ## 25.5.3 diff --git a/packages/jest-runtime/src/index.ts b/packages/jest-runtime/src/index.ts index 32c1c751b7f1..7cfcd78bffb0 100644 --- a/packages/jest-runtime/src/index.ts +++ b/packages/jest-runtime/src/index.ts @@ -162,7 +162,6 @@ class Runtime { private _virtualMocks: BooleanMap; private _moduleImplementation?: typeof nativeModule.Module; private jestObjectCaches: Map; - private _hasWarnedAboutRequireCacheModification = false; constructor( config: Config.ProjectConfig, @@ -1335,16 +1334,8 @@ class Runtime { moduleRequire.requireMock = this.requireMock.bind(this, from.filename); moduleRequire.resolve = resolve; moduleRequire.cache = (() => { - const notPermittedMethod = () => { - if (!this._hasWarnedAboutRequireCacheModification) { - this._environment.global.console.warn( - '`require.cache` modification is not permitted', - ); - - this._hasWarnedAboutRequireCacheModification = true; - } - return true; - }; + // TODO: consider warning somehow that this does nothing. We should support deletions, anyways + const notPermittedMethod = () => true; return new Proxy(Object.create(null), { defineProperty: notPermittedMethod, deleteProperty: notPermittedMethod, From 4f97b9ffb28cf58c04caa9f5b3a353c751ca8faf Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Sat, 2 May 2020 10:16:03 +0200 Subject: [PATCH 026/106] chore: update changelog for release --- CHANGELOG.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c9d72b2c5798..cdbb3fdeec88 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,14 +4,20 @@ ### Fixes -- `[jest-jasmine2]` Don't run `beforeAll` / `afterAll` in skipped describe block ([#9931](https://github.com/facebook/jest/pull/9931)) +### Chore & Maintenance + +### Performance + +## 25.5.4 + +### Fixes + +- `[jest-jasmine2]` Don't run `beforeAll` / `afterAll` in skipped describe blocks ([#9931](https://github.com/facebook/jest/pull/9931)) ### Chore & Maintenance - `[jest-runtime]` Do not warn when mutating `require.cache` ([#9946](https://github.com/facebook/jest/pull/9946)) -### Performance - ## 25.5.3 ### Chore & Maintenance From 389d13724bbf6bb64dcde9700a6ecea3333942db Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Sat, 2 May 2020 10:16:35 +0200 Subject: [PATCH 027/106] v25.5.4 --- lerna.json | 2 +- packages/jest-circus/package.json | 4 ++-- packages/jest-cli/package.json | 6 +++--- packages/jest-config/package.json | 6 +++--- packages/jest-core/package.json | 12 ++++++------ packages/jest-jasmine2/package.json | 4 ++-- packages/jest-repl/package.json | 6 +++--- packages/jest-resolve-dependencies/package.json | 4 ++-- packages/jest-runner/package.json | 10 +++++----- packages/jest-runtime/package.json | 4 ++-- packages/jest-test-sequencer/package.json | 6 +++--- packages/jest/package.json | 6 +++--- 12 files changed, 35 insertions(+), 35 deletions(-) diff --git a/lerna.json b/lerna.json index b33b053db07e..04f0ff59052d 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "25.5.3", + "version": "25.5.4", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/jest-circus/package.json b/packages/jest-circus/package.json index 1fe2db9ff16d..bcdfe2bfa998 100644 --- a/packages/jest-circus/package.json +++ b/packages/jest-circus/package.json @@ -1,6 +1,6 @@ { "name": "jest-circus", - "version": "25.5.3", + "version": "25.5.4", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -28,7 +28,7 @@ "jest-each": "^25.5.0", "jest-matcher-utils": "^25.5.0", "jest-message-util": "^25.5.0", - "jest-runtime": "^25.5.3", + "jest-runtime": "^25.5.4", "jest-snapshot": "^25.5.1", "jest-util": "^25.5.0", "pretty-format": "^25.5.0", diff --git a/packages/jest-cli/package.json b/packages/jest-cli/package.json index 81a534547e9a..cac8d7b90e05 100644 --- a/packages/jest-cli/package.json +++ b/packages/jest-cli/package.json @@ -1,7 +1,7 @@ { "name": "jest-cli", "description": "Delightful JavaScript Testing.", - "version": "25.5.3", + "version": "25.5.4", "main": "build/index.js", "types": "build/index.d.ts", "typesVersions": { @@ -12,7 +12,7 @@ } }, "dependencies": { - "@jest/core": "^25.5.3", + "@jest/core": "^25.5.4", "@jest/test-result": "^25.5.0", "@jest/types": "^25.5.0", "chalk": "^3.0.0", @@ -20,7 +20,7 @@ "graceful-fs": "^4.2.4", "import-local": "^3.0.2", "is-ci": "^2.0.0", - "jest-config": "^25.5.3", + "jest-config": "^25.5.4", "jest-util": "^25.5.0", "jest-validate": "^25.5.0", "prompts": "^2.0.1", diff --git a/packages/jest-config/package.json b/packages/jest-config/package.json index d18735426d05..0f1e74f3bced 100644 --- a/packages/jest-config/package.json +++ b/packages/jest-config/package.json @@ -1,6 +1,6 @@ { "name": "jest-config", - "version": "25.5.3", + "version": "25.5.4", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -18,7 +18,7 @@ }, "dependencies": { "@babel/core": "^7.1.0", - "@jest/test-sequencer": "^25.5.3", + "@jest/test-sequencer": "^25.5.4", "@jest/types": "^25.5.0", "babel-jest": "^25.5.1", "chalk": "^3.0.0", @@ -28,7 +28,7 @@ "jest-environment-jsdom": "^25.5.0", "jest-environment-node": "^25.5.0", "jest-get-type": "^25.2.6", - "jest-jasmine2": "^25.5.2", + "jest-jasmine2": "^25.5.4", "jest-regex-util": "^25.2.6", "jest-resolve": "^25.5.1", "jest-util": "^25.5.0", diff --git a/packages/jest-core/package.json b/packages/jest-core/package.json index 3e049195ccb6..e8f63659e764 100644 --- a/packages/jest-core/package.json +++ b/packages/jest-core/package.json @@ -1,7 +1,7 @@ { "name": "@jest/core", "description": "Delightful JavaScript Testing.", - "version": "25.5.3", + "version": "25.5.4", "main": "build/jest.js", "types": "build/jest.d.ts", "typesVersions": { @@ -22,14 +22,14 @@ "exit": "^0.1.2", "graceful-fs": "^4.2.4", "jest-changed-files": "^25.5.0", - "jest-config": "^25.5.3", + "jest-config": "^25.5.4", "jest-haste-map": "^25.5.1", "jest-message-util": "^25.5.0", "jest-regex-util": "^25.2.6", "jest-resolve": "^25.5.1", - "jest-resolve-dependencies": "^25.5.2", - "jest-runner": "^25.5.3", - "jest-runtime": "^25.5.3", + "jest-resolve-dependencies": "^25.5.4", + "jest-runner": "^25.5.4", + "jest-runtime": "^25.5.4", "jest-snapshot": "^25.5.1", "jest-util": "^25.5.0", "jest-validate": "^25.5.0", @@ -42,7 +42,7 @@ "strip-ansi": "^6.0.0" }, "devDependencies": { - "@jest/test-sequencer": "^25.5.3", + "@jest/test-sequencer": "^25.5.4", "@types/exit": "^0.1.30", "@types/graceful-fs": "^4.1.2", "@types/micromatch": "^4.0.0", diff --git a/packages/jest-jasmine2/package.json b/packages/jest-jasmine2/package.json index fc1af7df0223..972777670d70 100644 --- a/packages/jest-jasmine2/package.json +++ b/packages/jest-jasmine2/package.json @@ -1,6 +1,6 @@ { "name": "jest-jasmine2", - "version": "25.5.2", + "version": "25.5.4", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -29,7 +29,7 @@ "jest-each": "^25.5.0", "jest-matcher-utils": "^25.5.0", "jest-message-util": "^25.5.0", - "jest-runtime": "^25.5.2", + "jest-runtime": "^25.5.4", "jest-snapshot": "^25.5.1", "jest-util": "^25.5.0", "pretty-format": "^25.5.0", diff --git a/packages/jest-repl/package.json b/packages/jest-repl/package.json index 6f00f49a321c..46d95b897e0d 100644 --- a/packages/jest-repl/package.json +++ b/packages/jest-repl/package.json @@ -1,6 +1,6 @@ { "name": "jest-repl", - "version": "25.5.3", + "version": "25.5.4", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -19,8 +19,8 @@ "dependencies": { "@jest/transform": "^25.5.1", "@jest/types": "^25.5.0", - "jest-config": "^25.5.3", - "jest-runtime": "^25.5.3", + "jest-config": "^25.5.4", + "jest-runtime": "^25.5.4", "jest-validate": "^25.5.0", "repl": "^0.1.3", "yargs": "^15.3.1" diff --git a/packages/jest-resolve-dependencies/package.json b/packages/jest-resolve-dependencies/package.json index 8638c5fd4c66..fdd77539838a 100644 --- a/packages/jest-resolve-dependencies/package.json +++ b/packages/jest-resolve-dependencies/package.json @@ -1,6 +1,6 @@ { "name": "jest-resolve-dependencies", - "version": "25.5.2", + "version": "25.5.4", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -24,7 +24,7 @@ "devDependencies": { "jest-haste-map": "^25.5.1", "jest-resolve": "^25.5.1", - "jest-runtime": "^25.5.2" + "jest-runtime": "^25.5.4" }, "engines": { "node": ">= 8.3" diff --git a/packages/jest-runner/package.json b/packages/jest-runner/package.json index 226e7ca996cf..be0f557e0b4a 100644 --- a/packages/jest-runner/package.json +++ b/packages/jest-runner/package.json @@ -1,6 +1,6 @@ { "name": "jest-runner", - "version": "25.5.3", + "version": "25.5.4", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -24,14 +24,14 @@ "chalk": "^3.0.0", "exit": "^0.1.2", "graceful-fs": "^4.2.4", - "jest-config": "^25.5.3", + "jest-config": "^25.5.4", "jest-docblock": "^25.3.0", "jest-haste-map": "^25.5.1", - "jest-jasmine2": "^25.5.2", + "jest-jasmine2": "^25.5.4", "jest-leak-detector": "^25.5.0", "jest-message-util": "^25.5.0", "jest-resolve": "^25.5.1", - "jest-runtime": "^25.5.3", + "jest-runtime": "^25.5.4", "jest-util": "^25.5.0", "jest-worker": "^25.5.0", "source-map-support": "^0.5.6", @@ -42,7 +42,7 @@ "@types/graceful-fs": "^4.1.2", "@types/node": "*", "@types/source-map-support": "^0.5.0", - "jest-circus": "^25.5.3" + "jest-circus": "^25.5.4" }, "engines": { "node": ">= 8.3" diff --git a/packages/jest-runtime/package.json b/packages/jest-runtime/package.json index d145df1016b5..bbdc4d714a54 100644 --- a/packages/jest-runtime/package.json +++ b/packages/jest-runtime/package.json @@ -1,6 +1,6 @@ { "name": "jest-runtime", - "version": "25.5.3", + "version": "25.5.4", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -30,7 +30,7 @@ "exit": "^0.1.2", "glob": "^7.1.3", "graceful-fs": "^4.2.4", - "jest-config": "^25.5.3", + "jest-config": "^25.5.4", "jest-haste-map": "^25.5.1", "jest-message-util": "^25.5.0", "jest-mock": "^25.5.0", diff --git a/packages/jest-test-sequencer/package.json b/packages/jest-test-sequencer/package.json index 567bea76921a..2672d8352b42 100644 --- a/packages/jest-test-sequencer/package.json +++ b/packages/jest-test-sequencer/package.json @@ -1,6 +1,6 @@ { "name": "@jest/test-sequencer", - "version": "25.5.3", + "version": "25.5.4", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -20,8 +20,8 @@ "@jest/test-result": "^25.5.0", "graceful-fs": "^4.2.4", "jest-haste-map": "^25.5.1", - "jest-runner": "^25.5.3", - "jest-runtime": "^25.5.3" + "jest-runner": "^25.5.4", + "jest-runtime": "^25.5.4" }, "devDependencies": { "@types/graceful-fs": "^4.1.3" diff --git a/packages/jest/package.json b/packages/jest/package.json index 0cf0e476ce23..5964b69fb1c1 100644 --- a/packages/jest/package.json +++ b/packages/jest/package.json @@ -1,7 +1,7 @@ { "name": "jest", "description": "Delightful JavaScript Testing.", - "version": "25.5.3", + "version": "25.5.4", "main": "build/jest.js", "types": "build/jest.d.ts", "typesVersions": { @@ -12,9 +12,9 @@ } }, "dependencies": { - "@jest/core": "^25.5.3", + "@jest/core": "^25.5.4", "import-local": "^3.0.2", - "jest-cli": "^25.5.3" + "jest-cli": "^25.5.4" }, "bin": "./bin/jest.js", "engines": { From 687089be9f44ccbe13b43d5a892359c89525b359 Mon Sep 17 00:00:00 2001 From: Christoph Nakazawa Date: Sat, 2 May 2020 09:19:22 +0100 Subject: [PATCH 028/106] Remove es5 builds (#9945) --- .circleci/config.yml | 12 ---- .eslintignore | 1 - .eslintrc.js | 1 - .github/workflows/nodejs.yml | 2 - .gitignore | 1 - CHANGELOG.md | 2 + e2e/browser-support/browserTest.js | 28 ---------- jest.config.js | 2 - karma.conf.js | 25 --------- package.json | 7 --- packages/expect/package.json | 1 - packages/jest-mock/package.json | 1 - packages/pretty-format/package.json | 1 - scripts/browserBuild.js | 87 ----------------------------- scripts/build.js | 39 ------------- tsconfig.json | 3 +- 16 files changed, 3 insertions(+), 210 deletions(-) delete mode 100644 e2e/browser-support/browserTest.js delete mode 100644 karma.conf.js delete mode 100644 scripts/browserBuild.js diff --git a/.circleci/config.yml b/.circleci/config.yml index 578043e864e6..404054466e1a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -104,17 +104,6 @@ jobs: - store_test_results: path: reports/junit - test-browser: - working_directory: ~/jest - docker: - - image: circleci/node:12-browsers - steps: - - checkout - - restore-cache: *restore-cache - - run: *install - - save-cache: *save-cache - - run: yarn test-ci-es5-build-in-browser - test-or-deploy-website: working_directory: ~/jest docker: @@ -140,6 +129,5 @@ workflows: - test-node-13 - test-node-14 # current - test-jest-circus - - test-browser - test-or-deploy-website: filters: *filter-ignore-gh-pages diff --git a/.eslintignore b/.eslintignore index 05311c4695d6..be8072a6a850 100644 --- a/.eslintignore +++ b/.eslintignore @@ -3,7 +3,6 @@ bin/ flow-typed/** packages/*/build/** -packages/*/build-es5/** packages/jest-diff/src/cleanupSemantic.ts website/blog website/build diff --git a/.eslintrc.js b/.eslintrc.js index 3594b3b18ec6..b72d563d7295 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -95,7 +95,6 @@ module.exports = { files: [ 'packages/jest-jasmine2/src/jasmine/**/*', 'packages/expect/src/jasmineUtils.ts', - 'e2e/browser-support/browserTest.js', '**/vendor/**/*', ], rules: { diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 78c1927a0e6f..5df30a9d3bc7 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -45,8 +45,6 @@ jobs: run: yarn verify-old-ts - name: run eslint run: yarn lint - - name: run eslint on browser builds - run: yarn lint-es5-build - name: run prettier run: yarn lint:prettier:ci - name: check copyright headers diff --git a/.gitignore b/.gitignore index 36a8de27bd81..c6b727d6dfa1 100644 --- a/.gitignore +++ b/.gitignore @@ -17,7 +17,6 @@ /node_modules /packages/*/build/ -/packages/*/build-es5/ /packages/*/coverage/ /packages/*/node_modules/ /packages/*/package-lock.json diff --git a/CHANGELOG.md b/CHANGELOG.md index cdbb3fdeec88..c2a9026dbfa3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ ### Chore & Maintenance +- `[expect, jest-mock, pretty-format]` [**BREAKING**] Remove `build-es5` from package ([#9945](https://github.com/facebook/jest/pull/9945)) + ### Performance ## 25.5.4 diff --git a/e2e/browser-support/browserTest.js b/e2e/browser-support/browserTest.js deleted file mode 100644 index 2fbeae3d08c0..000000000000 --- a/e2e/browser-support/browserTest.js +++ /dev/null @@ -1,28 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -/* eslint-disable */ -var expect = require('expect'); -var mock = require('jest-mock'); -var prettyFormat = require('pretty-format'); - -describe('es5 builds in browser', function() { - it('runs assertions', function() { - expect(1).toBe(1); - }); - - it('runs mocks', function() { - var someMockFunction = mock.fn(); - expect(someMockFunction).not.toHaveBeenCalled(); - someMockFunction(); - expect(someMockFunction).toHaveBeenCalledTimes(1); - }); - - it('pretty formats a string', function() { - expect(prettyFormat('obj')).toBe('"obj"'); - }); -}); diff --git a/jest.config.js b/jest.config.js index cb189da42604..18ad91a82b6d 100644 --- a/jest.config.js +++ b/jest.config.js @@ -23,7 +23,6 @@ module.exports = { modulePathIgnorePatterns: [ 'examples/.*', 'packages/.*/build', - 'packages/.*/build-es5', 'packages/jest-runtime/src/__tests__/test_root.*', 'website/.*', 'e2e/runtime-internal-module-registry/__mocks__', @@ -44,7 +43,6 @@ module.exports = { '/e2e/global-teardown', '\\.snap$', '/packages/.*/build', - '/packages/.*/build-es5', '/packages/.*/src/__tests__/setPrettyPrint.ts', '/packages/jest-core/src/__tests__/test_root', '/packages/jest-core/src/__tests__/__fixtures__/', diff --git a/karma.conf.js b/karma.conf.js deleted file mode 100644 index 61e032d44fa7..000000000000 --- a/karma.conf.js +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -module.exports = config => { - config.set({ - browsers: ['ChromeHeadless'], - files: ['e2e/browser-support/browserTest.js'], - frameworks: ['mocha'], - preprocessors: { - 'e2e/browser-support/browserTest.js': ['webpack'], - }, - webpack: { - mode: 'development', - }, - webpackMiddleware: { - // webpack-dev-middleware configuration - // i. e. - stats: 'errors-only', - }, - }); -}; diff --git a/package.json b/package.json index 338d2679d898..e560e0355b7e 100644 --- a/package.json +++ b/package.json @@ -59,10 +59,6 @@ "jest-snapshot-serializer-raw": "^1.1.0", "jest-watch-typeahead": "^0.5.0", "jquery": "^3.2.1", - "karma": "^4.0.1", - "karma-chrome-launcher": "^3.0.0", - "karma-mocha": "^1.3.0", - "karma-webpack": "^4.0.2", "lerna": "^3.20.2", "make-dir": "^3.0.0", "micromatch": "^4.0.2", @@ -82,7 +78,6 @@ "tempy": "~0.3.0", "throat": "^5.0.0", "typescript": "^3.8.2", - "webpack": "^4.28.4", "which": "^2.0.1" }, "scripts": { @@ -96,14 +91,12 @@ "jest": "node ./packages/jest-cli/bin/jest.js", "jest-coverage": "yarn jest --coverage", "lint": "eslint . --cache --ext js,jsx,ts,tsx,md", - "lint-es5-build": "eslint --no-eslintrc --no-ignore --env=browser packages/*/build-es5", "lint:prettier": "prettier '**/*.{md,yml,yaml}' 'website/static/**/*.{css,js}' --write --ignore-path .gitignore", "lint:prettier:ci": "prettier '**/*.{md,yml,yaml}' 'website/static/**/*.{css,js}' --check --ignore-path .gitignore", "postinstall": "opencollective postinstall && yarn build", "install-no-ts-build": "node ./scripts/remove-postinstall && yarn --no-progress --frozen-lockfile && node ./scripts/build", "remove-prettier-dep": "node ./scripts/remove-prettier-dep", "publish": "yarn build-clean && yarn build && lerna publish --silent", - "test-ci-es5-build-in-browser": "karma start --single-run", "test-ci": "yarn jest-coverage --color -i --config jest.config.ci.js && yarn test-leak && node ./scripts/mapCoverage.js && codecov", "test-ci-partial": "yarn jest --color -i --config jest.config.ci.js", "test-pretty-format-perf": "node packages/pretty-format/perf/test.js", diff --git a/packages/expect/package.json b/packages/expect/package.json index df859e2e4715..18101b026061 100644 --- a/packages/expect/package.json +++ b/packages/expect/package.json @@ -16,7 +16,6 @@ ] } }, - "browser": "build-es5/index.js", "dependencies": { "@jest/types": "^25.5.0", "ansi-styles": "^4.0.0", diff --git a/packages/jest-mock/package.json b/packages/jest-mock/package.json index 775cc56c409d..33e5455da8ac 100644 --- a/packages/jest-mock/package.json +++ b/packages/jest-mock/package.json @@ -25,7 +25,6 @@ ] } }, - "browser": "build-es5/index.js", "publishConfig": { "access": "public" }, diff --git a/packages/pretty-format/package.json b/packages/pretty-format/package.json index dedbfab6721a..66ea7d8b2c16 100644 --- a/packages/pretty-format/package.json +++ b/packages/pretty-format/package.json @@ -17,7 +17,6 @@ ] } }, - "browser": "build-es5/index.js", "author": "James Kyle ", "dependencies": { "@jest/types": "^25.5.0", diff --git a/scripts/browserBuild.js b/scripts/browserBuild.js deleted file mode 100644 index 6e35147a9dd6..000000000000 --- a/scripts/browserBuild.js +++ /dev/null @@ -1,87 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -'use strict'; - -const path = require('path'); -const webpack = require('webpack'); -const camelCase = require('camelcase'); -const rimraf = require('rimraf'); - -const transformOptions = require('../babel.config.js'); - -const babelEs5Options = { - // Dont load other config files - babelrc: false, - configFile: false, - overrides: transformOptions.overrides, - plugins: ['@babel/plugin-transform-strict-mode'], - presets: [ - [ - '@babel/preset-env', - { - // Required for Webpack - modules: 'cjs', - shippedProposals: true, - // Target ES5 - targets: 'IE 11', - }, - ], - ], -}; - -function browserBuild(pkgName, entryPath, destination) { - rimraf.sync(destination); - - return new Promise((resolve, reject) => { - webpack( - /* eslint-disable sort-keys */ - { - mode: 'development', - devtool: 'source-map', - entry: entryPath, - output: { - path: path.dirname(destination), - library: camelCase(pkgName), - libraryTarget: 'umd', - filename: path.basename(destination), - }, - module: { - rules: [ - { - test: /\.[jt]sx?$/, - loader: require.resolve('babel-loader'), - options: babelEs5Options, - }, - ], - }, - resolve: { - alias: { - chalk: path.resolve( - __dirname, - '../packages/expect/build/fakeChalk.js', - ), - 'graceful-fs': 'fs', - }, - extensions: ['.js', '.json', '.ts'], - }, - node: { - fs: 'empty', - }, - }, - /* eslint-enable */ - (err, stats) => { - if (err || stats.hasErrors()) { - reject(err || stats.toString()); - return; - } - resolve(stats); - }, - ); - }); -} - -module.exports = browserBuild; diff --git a/scripts/build.js b/scripts/build.js index 7c5e0f5c3ba7..d6d718cbe322 100644 --- a/scripts/build.js +++ b/scripts/build.js @@ -30,11 +30,9 @@ const chalk = require('chalk'); const micromatch = require('micromatch'); const prettier = require('prettier'); const {getPackages, adjustToTerminalWidth, OK} = require('./buildUtils'); -const browserBuild = require('./browserBuild'); 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}__/**'; @@ -72,39 +70,6 @@ function buildNodePackage(p) { process.stdout.write(`${OK}\n`); } -function buildBrowserPackage(p) { - const srcDir = path.resolve(p, SRC_DIR); - const pkgJsonPath = path.resolve(p, 'package.json'); - - if (!fs.existsSync(pkgJsonPath)) { - return; - } - - const browser = require(pkgJsonPath).browser; - if (browser) { - if (browser.indexOf(BUILD_ES5_DIR) !== 0) { - throw new Error( - `browser field for ${pkgJsonPath} should start with "${BUILD_ES5_DIR}"`, - ); - } - 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`); - }) - .catch(e => { - console.error(e); - process.exit(1); - }); - } -} - function buildFile(file, silent) { const destPath = getBuildPath(file, BUILD_DIR); @@ -187,8 +152,4 @@ if (files.length) { const packages = getPackages(); process.stdout.write(chalk.inverse(' Building packages \n')); packages.forEach(buildNodePackage); - process.stdout.write('\n'); - - process.stdout.write(chalk.inverse(' Building browser packages \n')); - packages.forEach(buildBrowserPackage); } diff --git a/tsconfig.json b/tsconfig.json index a513c83fe2c2..b1d9bfdd5414 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -29,7 +29,6 @@ ".yarn/releases/*", "**/__tests__/**/*", "**/__mocks__/**/*", - "**/build/**/*", - "**/build-es5/**/*" + "**/build/**/*" ] } From e19adcba981fe36e950dc8dcc3e1d6be6562a868 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Sat, 2 May 2020 10:19:46 +0200 Subject: [PATCH 029/106] chore: remove support for `browser` field in config (#9943) --- CHANGELOG.md | 2 + TestUtils.ts | 1 - docs/Configuration.md | 20 +++--- .../moduleNameMapper.test.ts.snap | 4 +- .../resolveNoFileExtensions.test.ts.snap | 2 +- .../__snapshots__/showConfig.test.ts.snap | 1 - e2e/__tests__/resolveBrowserField.test.ts | 72 ------------------- .../__tests__/__snapshots__/init.test.js.snap | 3 - packages/jest-config/src/Defaults.ts | 1 - packages/jest-config/src/Deprecated.ts | 8 +++ packages/jest-config/src/Descriptions.ts | 1 - packages/jest-config/src/ValidConfig.ts | 1 - .../src/__tests__/normalize.test.js | 14 ---- packages/jest-config/src/index.ts | 1 - packages/jest-config/src/normalize.ts | 1 - .../log_debug_messages.test.ts.snap | 1 - packages/jest-resolve/package.json | 2 - packages/jest-resolve/src/defaultResolver.ts | 5 +- packages/jest-resolve/src/index.ts | 3 - packages/jest-resolve/src/types.ts | 1 - .../src/__tests__/resolve_browser.test.js | 43 ----------- packages/jest-runtime/src/index.ts | 1 - .../script_transformer.test.js.snap | 5 +- packages/jest-types/src/Config.ts | 4 -- yarn.lock | 21 +----- 25 files changed, 29 insertions(+), 189 deletions(-) delete mode 100644 e2e/__tests__/resolveBrowserField.test.ts delete mode 100644 packages/jest-runtime/src/__tests__/resolve_browser.test.js diff --git a/CHANGELOG.md b/CHANGELOG.md index c2a9026dbfa3..0e26a16c58b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ ### Fixes +- `[jest-config, jest-resolve]` [**BREAKING**] Remove support for `browser` field ([#9943](https://github.com/facebook/jest/pull/9943)) + ### Chore & Maintenance - `[expect, jest-mock, pretty-format]` [**BREAKING**] Remove `build-es5` from package ([#9945](https://github.com/facebook/jest/pull/9945)) diff --git a/TestUtils.ts b/TestUtils.ts index a84f3f8bc630..8f4f6096707d 100644 --- a/TestUtils.ts +++ b/TestUtils.ts @@ -67,7 +67,6 @@ const DEFAULT_GLOBAL_CONFIG: Config.GlobalConfig = { const DEFAULT_PROJECT_CONFIG: Config.ProjectConfig = { automock: false, - browser: false, cache: false, cacheDirectory: '/test_cache_dir/', clearMocks: false, diff --git a/docs/Configuration.md b/docs/Configuration.md index c80c9af8b351..79353fdb783f 100644 --- a/docs/Configuration.md +++ b/docs/Configuration.md @@ -105,12 +105,6 @@ Default: `0` By default, Jest runs all tests and produces all errors into the console upon completion. The bail config option can be used here to have Jest stop running tests after `n` failures. Setting bail to `true` is the same as setting bail to `1`. -### `browser` [boolean] - -Default: `false` - -Respect Browserify's [`"browser"` field](https://github.com/substack/browserify-handbook#browser-field) in `package.json` when resolving modules. Some modules export different versions based on whether they are operating in Node or a browser. - ### `cacheDirectory` [string] Default: `"/tmp/"` @@ -689,7 +683,6 @@ This option allows the use of a custom resolver. This resolver must be a node mo ```json { "basedir": string, - "browser": bool, "defaultResolver": "function(request, options)", "extensions": [string], "moduleDirectory": [string], @@ -700,7 +693,18 @@ This option allows the use of a custom resolver. This resolver must be a node mo The function should either return a path to the module that should be resolved or throw an error if the module can't be found. -Note: the defaultResolver passed as options is the jest default resolver which might be useful when you write your custom one. It takes the same arguments as your custom one, e.g. (request, options). +Note: the defaultResolver passed as options is the Jest default resolver which might be useful when you write your custom one. It takes the same arguments as your custom one, e.g. `(request, options)`. + +For example, if you want to respect Browserify's [`"browser"` field](https://github.com/browserify/browserify-handbook/blob/master/readme.markdown#browser-field), you can use the following configuration: + +```json +{ + ... + "jest": { + "resolver": "browser-resolve" + } +} +``` ### `restoreMocks` [boolean] diff --git a/e2e/__tests__/__snapshots__/moduleNameMapper.test.ts.snap b/e2e/__tests__/__snapshots__/moduleNameMapper.test.ts.snap index ed248a26f289..3541cc32ec0a 100644 --- a/e2e/__tests__/__snapshots__/moduleNameMapper.test.ts.snap +++ b/e2e/__tests__/__snapshots__/moduleNameMapper.test.ts.snap @@ -36,7 +36,7 @@ FAIL __tests__/index.js 12 | module.exports = () => 'test'; 13 | - at createNoMappedModuleFoundError (../../packages/jest-resolve/build/index.js:545:17) + at createNoMappedModuleFoundError (../../packages/jest-resolve/build/index.js:542:17) at Object.require (index.js:10:1) `; @@ -65,6 +65,6 @@ FAIL __tests__/index.js 12 | module.exports = () => 'test'; 13 | - at createNoMappedModuleFoundError (../../packages/jest-resolve/build/index.js:545:17) + at createNoMappedModuleFoundError (../../packages/jest-resolve/build/index.js:542:17) at Object.require (index.js:10:1) `; diff --git a/e2e/__tests__/__snapshots__/resolveNoFileExtensions.test.ts.snap b/e2e/__tests__/__snapshots__/resolveNoFileExtensions.test.ts.snap index 062640b2406a..3796725b10a7 100644 --- a/e2e/__tests__/__snapshots__/resolveNoFileExtensions.test.ts.snap +++ b/e2e/__tests__/__snapshots__/resolveNoFileExtensions.test.ts.snap @@ -37,6 +37,6 @@ FAIL __tests__/test.js | ^ 9 | - at Resolver.resolveModule (../../packages/jest-resolve/build/index.js:299:11) + at Resolver.resolveModule (../../packages/jest-resolve/build/index.js:297:11) at Object.require (index.js:8:18) `; diff --git a/e2e/__tests__/__snapshots__/showConfig.test.ts.snap b/e2e/__tests__/__snapshots__/showConfig.test.ts.snap index 7f3d73efee7c..be82d2534558 100644 --- a/e2e/__tests__/__snapshots__/showConfig.test.ts.snap +++ b/e2e/__tests__/__snapshots__/showConfig.test.ts.snap @@ -5,7 +5,6 @@ exports[`--showConfig outputs config info and exits 1`] = ` "configs": [ { "automock": false, - "browser": false, "cache": false, "cacheDirectory": "/tmp/jest", "clearMocks": false, diff --git a/e2e/__tests__/resolveBrowserField.test.ts b/e2e/__tests__/resolveBrowserField.test.ts deleted file mode 100644 index 2c37924e2bc5..000000000000 --- a/e2e/__tests__/resolveBrowserField.test.ts +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -import {tmpdir} from 'os'; -import * as path from 'path'; -import {wrap} from 'jest-snapshot-serializer-raw'; -import {cleanup, writeFiles, writeSymlinks} from '../Utils'; -import runJest from '../runJest'; - -const DIR = path.resolve(tmpdir(), 'resolve-browser-field-test'); - -beforeEach(() => cleanup(DIR)); -afterAll(() => cleanup(DIR)); - -test('preserves module identity for symlinks when using browser field resolution', () => { - /* eslint-disable sort-keys */ - writeFiles(DIR, { - 'packages/needs-preserved-id/index.js': ` - console.log("needs-preserved-id executed"); - module.exports = {}; - `, - 'packages/needs-preserved-id/package.json': JSON.stringify({ - name: 'needs-preserved-id', - }), - 'packages/has-browser-field/package.json': JSON.stringify({ - name: 'has-browser-field', - browser: 'browser.js', - }), - 'packages/has-browser-field/browser.js': ` - module.exports = require("needs-preserved-id"); - `, - 'package.json': JSON.stringify({ - jest: { - testMatch: ['/test-files/test.js'], - browser: true, - }, - }), - 'test-files/test.js': ` - const id1 = require("needs-preserved-id"); - const id2 = require("has-browser-field"); - - test("module should have reference equality", () => { - expect(id1).toBe(id2); - }); - `, - }); - /* eslint-enable */ - - writeSymlinks(DIR, { - 'packages/has-browser-field': 'node_modules/has-browser-field', - 'packages/needs-preserved-id': 'node_modules/needs-preserved-id', - }); - - writeSymlinks(DIR, { - 'packages/needs-preserved-id': - 'packages/has-browser-field/node_modules/needs-preserved-id', - }); - - const {stdout, stderr, exitCode} = runJest(DIR, ['--no-watchman']); - expect(stderr).toContain('Test Suites: 1 passed, 1 total'); - expect(wrap(stdout.trim())).toMatchInlineSnapshot(` - console.log - needs-preserved-id executed - - at Object. (packages/needs-preserved-id/index.js:1:13) - `); - expect(exitCode).toEqual(0); -}); diff --git a/packages/jest-cli/src/init/__tests__/__snapshots__/init.test.js.snap b/packages/jest-cli/src/init/__tests__/__snapshots__/init.test.js.snap index a9eb4ea43840..5e4733fabd9d 100644 --- a/packages/jest-cli/src/init/__tests__/__snapshots__/init.test.js.snap +++ b/packages/jest-cli/src/init/__tests__/__snapshots__/init.test.js.snap @@ -56,9 +56,6 @@ module.exports = { // Stop running tests after \`n\` failures // bail: 0, - // Respect \\"browser\\" field in package.json when resolving modules - // browser: false, - // The directory where Jest should store its cached dependency information // cacheDirectory: \\"/tmp/jest\\", diff --git a/packages/jest-config/src/Defaults.ts b/packages/jest-config/src/Defaults.ts index 6cdc3cbe8a01..32dcbf3c0df7 100644 --- a/packages/jest-config/src/Defaults.ts +++ b/packages/jest-config/src/Defaults.ts @@ -15,7 +15,6 @@ const NODE_MODULES_REGEXP = replacePathSepForRegex(NODE_MODULES); const defaultOptions: Config.DefaultOptions = { automock: false, bail: 0, - browser: false, cache: true, cacheDirectory: getCacheDirectory(), changedFilesWithAncestor: false, diff --git a/packages/jest-config/src/Deprecated.ts b/packages/jest-config/src/Deprecated.ts index a76f26229ddd..82ffb98f6a06 100644 --- a/packages/jest-config/src/Deprecated.ts +++ b/packages/jest-config/src/Deprecated.ts @@ -11,6 +11,14 @@ import prettyFormat = require('pretty-format'); const format = (value: unknown) => prettyFormat(value, {min: true}); export default { + browser: () => ` Option ${chalk.bold( + '"browser"', + )} has been deprecated. Please install "browser-resolve" and use the "resolver" option in Jest configuration as follows: + { + ${chalk.bold('"resolve"')}: ${chalk.bold('"browser-resolve"')} + } + `, + mapCoverage: () => ` Option ${chalk.bold( '"mapCoverage"', )} has been removed, as it's no longer necessary. diff --git a/packages/jest-config/src/Descriptions.ts b/packages/jest-config/src/Descriptions.ts index 8e67339e0637..322a39af3e5b 100644 --- a/packages/jest-config/src/Descriptions.ts +++ b/packages/jest-config/src/Descriptions.ts @@ -10,7 +10,6 @@ import type {Config} from '@jest/types'; const descriptions: {[key in keyof Config.InitialOptions]: string} = { automock: 'All imported modules in your tests should be mocked automatically', bail: 'Stop running tests after `n` failures', - browser: 'Respect "browser" field in package.json when resolving modules', cacheDirectory: 'The directory where Jest should store its cached dependency information', clearMocks: 'Automatically clear mock calls and instances between every test', diff --git a/packages/jest-config/src/ValidConfig.ts b/packages/jest-config/src/ValidConfig.ts index de566c08c036..6486947f48ac 100644 --- a/packages/jest-config/src/ValidConfig.ts +++ b/packages/jest-config/src/ValidConfig.ts @@ -15,7 +15,6 @@ const NODE_MODULES_REGEXP = replacePathSepForRegex(NODE_MODULES); const initialOptions: Config.InitialOptions = { automock: false, bail: multipleValidOptions(false, 0), - browser: false, cache: true, cacheDirectory: '/tmp/user/jest', changedFilesWithAncestor: false, diff --git a/packages/jest-config/src/__tests__/normalize.test.js b/packages/jest-config/src/__tests__/normalize.test.js index 4022b2baec66..eb7ba42ad4a5 100644 --- a/packages/jest-config/src/__tests__/normalize.test.js +++ b/packages/jest-config/src/__tests__/normalize.test.js @@ -154,20 +154,6 @@ describe('automock', () => { }); }); -describe('browser', () => { - it('falsy browser is not overwritten', () => { - const {options} = normalize( - { - browser: true, - rootDir: '/root/path/foo', - }, - {}, - ); - - expect(options.browser).toBe(true); - }); -}); - describe('collectCoverageOnlyFrom', () => { it('normalizes all paths relative to rootDir', () => { const {options} = normalize( diff --git a/packages/jest-config/src/index.ts b/packages/jest-config/src/index.ts index 0331c2d23379..0bcb65fc670e 100644 --- a/packages/jest-config/src/index.ts +++ b/packages/jest-config/src/index.ts @@ -163,7 +163,6 @@ const groupOptions = ( }), projectConfig: Object.freeze({ automock: options.automock, - browser: options.browser, cache: options.cache, cacheDirectory: options.cacheDirectory, clearMocks: options.clearMocks, diff --git a/packages/jest-config/src/normalize.ts b/packages/jest-config/src/normalize.ts index 4cff07d83bc8..75727fa23c74 100644 --- a/packages/jest-config/src/normalize.ts +++ b/packages/jest-config/src/normalize.ts @@ -869,7 +869,6 @@ export default function normalize( break; } case 'automock': - case 'browser': case 'cache': case 'changedSince': case 'changedFilesWithAncestor': diff --git a/packages/jest-core/src/lib/__tests__/__snapshots__/log_debug_messages.test.ts.snap b/packages/jest-core/src/lib/__tests__/__snapshots__/log_debug_messages.test.ts.snap index 3be6c4ebb716..ddfcea653f84 100644 --- a/packages/jest-core/src/lib/__tests__/__snapshots__/log_debug_messages.test.ts.snap +++ b/packages/jest-core/src/lib/__tests__/__snapshots__/log_debug_messages.test.ts.snap @@ -4,7 +4,6 @@ exports[`prints the config object 1`] = ` { "configs": { "automock": false, - "browser": false, "cache": false, "cacheDirectory": "/test_cache_dir/", "clearMocks": false, diff --git a/packages/jest-resolve/package.json b/packages/jest-resolve/package.json index 4ad1b61c8f33..5645f2741d8b 100644 --- a/packages/jest-resolve/package.json +++ b/packages/jest-resolve/package.json @@ -18,7 +18,6 @@ }, "dependencies": { "@jest/types": "^25.5.0", - "browser-resolve": "^1.11.3", "chalk": "^3.0.0", "graceful-fs": "^4.2.4", "jest-pnp-resolver": "^1.2.1", @@ -28,7 +27,6 @@ "slash": "^3.0.0" }, "devDependencies": { - "@types/browser-resolve": "^1.11.0", "@types/graceful-fs": "^4.1.3", "@types/resolve": "^1.14.0", "jest-haste-map": "^25.5.1" diff --git a/packages/jest-resolve/src/defaultResolver.ts b/packages/jest-resolve/src/defaultResolver.ts index e66a74036a3f..cb570d390a5a 100644 --- a/packages/jest-resolve/src/defaultResolver.ts +++ b/packages/jest-resolve/src/defaultResolver.ts @@ -7,7 +7,6 @@ import * as fs from 'graceful-fs'; import {sync as resolveSync} from 'resolve'; -import {sync as browserResolve} from 'browser-resolve'; import {sync as realpath} from 'realpath-native'; import pnpResolver from 'jest-pnp-resolver'; import type {Config} from '@jest/types'; @@ -31,9 +30,7 @@ export default function defaultResolver( return pnpResolver(path, options); } - const resolve = options.browser ? browserResolve : resolveSync; - - const result = resolve(path, { + const result = resolveSync(path, { basedir: options.basedir, extensions: options.extensions, isDirectory, diff --git a/packages/jest-resolve/src/index.ts b/packages/jest-resolve/src/index.ts index 19937efafd7b..1c04a9429f96 100644 --- a/packages/jest-resolve/src/index.ts +++ b/packages/jest-resolve/src/index.ts @@ -62,7 +62,6 @@ class Resolver { constructor(moduleMap: ModuleMap, options: ResolverConfig) { this._options = { - browser: options.browser, defaultPlatform: options.defaultPlatform, extensions: options.extensions, hasCoreModules: @@ -184,7 +183,6 @@ class Resolver { const resolveNodeModule = (name: Config.Path, throwIfNotFound = false) => Resolver.findNodeModule(name, { basedir: dirname, - browser: this._options.browser, extensions, moduleDirectory, paths, @@ -438,7 +436,6 @@ class Resolver { this.getModule(updatedName) || Resolver.findNodeModule(updatedName, { basedir: dirname, - browser: this._options.browser, extensions, moduleDirectory, paths, diff --git a/packages/jest-resolve/src/types.ts b/packages/jest-resolve/src/types.ts index 7d8a11d48fc9..cbe7666ac21f 100644 --- a/packages/jest-resolve/src/types.ts +++ b/packages/jest-resolve/src/types.ts @@ -8,7 +8,6 @@ import type {Config} from '@jest/types'; export type ResolverConfig = { - browser?: boolean; defaultPlatform?: string | null; extensions: Array; hasCoreModules: boolean; diff --git a/packages/jest-runtime/src/__tests__/resolve_browser.test.js b/packages/jest-runtime/src/__tests__/resolve_browser.test.js deleted file mode 100644 index f0c5d289e84d..000000000000 --- a/packages/jest-runtime/src/__tests__/resolve_browser.test.js +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - */ - -'use strict'; - -let createRuntime; - -describe('resolve', () => { - beforeEach(() => { - createRuntime = require('createRuntime'); - }); - - it('respects "browser" dependency when browser:true configured', () => - createRuntime(__filename, { - browser: true, - }).then(runtime => { - const exports = runtime.requireModuleOrMock( - runtime.__mockRootPath, - 'jest-resolve-test', - ); - expect(exports.isBrowser).toBe(true); - })); - - it(`doesn't resolve "browser" dependency by default`, () => - createRuntime( - __filename, - {}, - { - browser: false, - }, - ).then(runtime => { - const exports = runtime.requireModuleOrMock( - runtime.__mockRootPath, - 'jest-resolve-test', - ); - expect(exports.isBrowser).toBe(false); - })); -}); diff --git a/packages/jest-runtime/src/index.ts b/packages/jest-runtime/src/index.ts index 7cfcd78bffb0..3b7b5003d1e7 100644 --- a/packages/jest-runtime/src/index.ts +++ b/packages/jest-runtime/src/index.ts @@ -302,7 +302,6 @@ class Runtime { moduleMap: HasteMap.ModuleMap, ): Resolver { return new Resolver(moduleMap, { - browser: config.browser, defaultPlatform: config.haste.defaultPlatform, extensions: config.moduleFileExtensions.map(extension => '.' + extension), hasCoreModules: true, diff --git a/packages/jest-transform/src/__tests__/__snapshots__/script_transformer.test.js.snap b/packages/jest-transform/src/__tests__/__snapshots__/script_transformer.test.js.snap index 13584d3f6693..6cf4ee642339 100644 --- a/packages/jest-transform/src/__tests__/__snapshots__/script_transformer.test.js.snap +++ b/packages/jest-transform/src/__tests__/__snapshots__/script_transformer.test.js.snap @@ -4,7 +4,6 @@ exports[`ScriptTransformer passes expected transform options to getCacheKey 1`] Object { "config": Object { "automock": false, - "browser": false, "cache": true, "cacheDirectory": "/cache/", "clearMocks": false, @@ -230,7 +229,7 @@ exports[`ScriptTransformer uses multiple preprocessors 1`] = ` const TRANSFORMED = { filename: '/fruits/banana.js', script: 'module.exports = "banana";', - config: '{"automock":false,"browser":false,"cache":true,"cacheDirectory":"/cache/","clearMocks":false,"coveragePathIgnorePatterns":[],"cwd":"/test_root_dir/","detectLeaks":false,"detectOpenHandles":false,"errorOnDeprecated":false,"extraGlobals":[],"filter":null,"forceCoverageMatch":[],"globalSetup":null,"globalTeardown":null,"globals":{},"haste":{"providesModuleNodeModules":[]},"moduleDirectories":[],"moduleFileExtensions":["js"],"moduleLoader":"/test_module_loader_path","moduleNameMapper":[],"modulePathIgnorePatterns":[],"modulePaths":[],"name":"test","prettierPath":"prettier","resetMocks":false,"resetModules":false,"resolver":null,"restoreMocks":false,"rootDir":"/","roots":[],"runner":"jest-runner","setupFiles":[],"setupFilesAfterEnv":[],"skipFilter":false,"skipNodeResolution":false,"snapshotResolver":null,"snapshotSerializers":[],"testEnvironment":"node","testEnvironmentOptions":{},"testLocationInResults":false,"testMatch":[],"testPathIgnorePatterns":[],"testRegex":["\\\\.test\\\\.js$"],"testRunner":"jest-jasmine2","testURL":"http://localhost","timers":"real","transform":[["^.+\\\\.js$","test_preprocessor"],["^.+\\\\.css$","css-preprocessor"]],"transformIgnorePatterns":["/node_modules/"],"unmockedModulePathPatterns":null,"watchPathIgnorePatterns":[]}', + config: '{"automock":false,"cache":true,"cacheDirectory":"/cache/","clearMocks":false,"coveragePathIgnorePatterns":[],"cwd":"/test_root_dir/","detectLeaks":false,"detectOpenHandles":false,"errorOnDeprecated":false,"extraGlobals":[],"filter":null,"forceCoverageMatch":[],"globalSetup":null,"globalTeardown":null,"globals":{},"haste":{"providesModuleNodeModules":[]},"moduleDirectories":[],"moduleFileExtensions":["js"],"moduleLoader":"/test_module_loader_path","moduleNameMapper":[],"modulePathIgnorePatterns":[],"modulePaths":[],"name":"test","prettierPath":"prettier","resetMocks":false,"resetModules":false,"resolver":null,"restoreMocks":false,"rootDir":"/","roots":[],"runner":"jest-runner","setupFiles":[],"setupFilesAfterEnv":[],"skipFilter":false,"skipNodeResolution":false,"snapshotResolver":null,"snapshotSerializers":[],"testEnvironment":"node","testEnvironmentOptions":{},"testLocationInResults":false,"testMatch":[],"testPathIgnorePatterns":[],"testRegex":["\\\\.test\\\\.js$"],"testRunner":"jest-jasmine2","testURL":"http://localhost","timers":"real","transform":[["^.+\\\\.js$","test_preprocessor"],["^.+\\\\.css$","css-preprocessor"]],"transformIgnorePatterns":["/node_modules/"],"unmockedModulePathPatterns":null,"watchPathIgnorePatterns":[]}', }; `; @@ -247,7 +246,7 @@ exports[`ScriptTransformer uses the supplied preprocessor 1`] = ` const TRANSFORMED = { filename: '/fruits/banana.js', script: 'module.exports = "banana";', - config: '{"automock":false,"browser":false,"cache":true,"cacheDirectory":"/cache/","clearMocks":false,"coveragePathIgnorePatterns":[],"cwd":"/test_root_dir/","detectLeaks":false,"detectOpenHandles":false,"errorOnDeprecated":false,"extraGlobals":[],"filter":null,"forceCoverageMatch":[],"globalSetup":null,"globalTeardown":null,"globals":{},"haste":{"providesModuleNodeModules":[]},"moduleDirectories":[],"moduleFileExtensions":["js"],"moduleLoader":"/test_module_loader_path","moduleNameMapper":[],"modulePathIgnorePatterns":[],"modulePaths":[],"name":"test","prettierPath":"prettier","resetMocks":false,"resetModules":false,"resolver":null,"restoreMocks":false,"rootDir":"/","roots":[],"runner":"jest-runner","setupFiles":[],"setupFilesAfterEnv":[],"skipFilter":false,"skipNodeResolution":false,"snapshotResolver":null,"snapshotSerializers":[],"testEnvironment":"node","testEnvironmentOptions":{},"testLocationInResults":false,"testMatch":[],"testPathIgnorePatterns":[],"testRegex":["\\\\.test\\\\.js$"],"testRunner":"jest-jasmine2","testURL":"http://localhost","timers":"real","transform":[["^.+\\\\.js$","test_preprocessor"]],"transformIgnorePatterns":["/node_modules/"],"unmockedModulePathPatterns":null,"watchPathIgnorePatterns":[]}', + config: '{"automock":false,"cache":true,"cacheDirectory":"/cache/","clearMocks":false,"coveragePathIgnorePatterns":[],"cwd":"/test_root_dir/","detectLeaks":false,"detectOpenHandles":false,"errorOnDeprecated":false,"extraGlobals":[],"filter":null,"forceCoverageMatch":[],"globalSetup":null,"globalTeardown":null,"globals":{},"haste":{"providesModuleNodeModules":[]},"moduleDirectories":[],"moduleFileExtensions":["js"],"moduleLoader":"/test_module_loader_path","moduleNameMapper":[],"modulePathIgnorePatterns":[],"modulePaths":[],"name":"test","prettierPath":"prettier","resetMocks":false,"resetModules":false,"resolver":null,"restoreMocks":false,"rootDir":"/","roots":[],"runner":"jest-runner","setupFiles":[],"setupFilesAfterEnv":[],"skipFilter":false,"skipNodeResolution":false,"snapshotResolver":null,"snapshotSerializers":[],"testEnvironment":"node","testEnvironmentOptions":{},"testLocationInResults":false,"testMatch":[],"testPathIgnorePatterns":[],"testRegex":["\\\\.test\\\\.js$"],"testRunner":"jest-jasmine2","testURL":"http://localhost","timers":"real","transform":[["^.+\\\\.js$","test_preprocessor"]],"transformIgnorePatterns":["/node_modules/"],"unmockedModulePathPatterns":null,"watchPathIgnorePatterns":[]}', }; `; diff --git a/packages/jest-types/src/Config.ts b/packages/jest-types/src/Config.ts index 6c5ab99f1a26..e9c02ea340e4 100644 --- a/packages/jest-types/src/Config.ts +++ b/packages/jest-types/src/Config.ts @@ -34,7 +34,6 @@ export interface ConfigGlobals { export type DefaultOptions = { automock: boolean; bail: number; - browser: boolean; cache: boolean; cacheDirectory: Path; changedFilesWithAncestor: boolean; @@ -99,7 +98,6 @@ export type InitialOptionsWithRootDir = InitialOptions & export type InitialOptions = Partial<{ automock: boolean; bail: boolean | number; - browser: boolean; cache: boolean; cacheDirectory: Path; clearMocks: boolean; @@ -301,7 +299,6 @@ export type GlobalConfig = { export type ProjectConfig = { automock: boolean; - browser: boolean; cache: boolean; cacheDirectory: Path; clearMocks: boolean; @@ -360,7 +357,6 @@ export type Argv = Arguments< all: boolean; automock: boolean; bail: boolean | number; - browser: boolean; cache: boolean; cacheDirectory: string; changedFilesWithAncestor: boolean; diff --git a/yarn.lock b/yarn.lock index 253db2b1ef97..972ca1c18448 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2217,13 +2217,6 @@ resolved "https://registry.yarnpkg.com/@types/braces/-/braces-3.0.0.tgz#7da1c0d44ff1c7eb660a36ec078ea61ba7eb42cb" integrity sha512-TbH79tcyi9FHwbyboOKeRachRq63mSuWYXOflsNO9ZyE5ClQ/JaozNKl+aWUq87qPNsXasXxi2AbgfwIJ+8GQw== -"@types/browser-resolve@^1.11.0": - version "1.11.0" - resolved "https://registry.yarnpkg.com/@types/browser-resolve/-/browser-resolve-1.11.0.tgz#28c427182a6e340b3d7082b62da8128c562f04d6" - integrity sha512-fI2q5j/5w2TuO+lIGj7bMcvOQQCo5Eq71OLiWttohpp4xW6xhA9ltN2ielMSvl5ochAIY0Z3E8LtVRMIGLYy2w== - dependencies: - "@types/resolve" "*" - "@types/cheerio@^0.22.8": version "0.22.17" resolved "https://registry.yarnpkg.com/@types/cheerio/-/cheerio-0.22.17.tgz#e54f71c3135f71ebc16c8dc62edad533872c9e72" @@ -2514,7 +2507,7 @@ "@types/prop-types" "*" csstype "^2.2.0" -"@types/resolve@*", "@types/resolve@^1.14.0": +"@types/resolve@^1.14.0": version "1.14.0" resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-1.14.0.tgz#c95d696264f8e53e764a7c0b83e9317b458b76c3" integrity sha512-bmjNBW6tok+67iOsASeYSJxSgY++BIR35nGyGLORTDirhra9reJ0shgGL3U7KPDUbOBCx8JrlCjd4d/y5uiMRQ== @@ -3818,13 +3811,6 @@ browser-process-hrtime@^1.0.0: resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz#3c9b4b7d782c8121e56f10106d84c0d0ffc94626" integrity sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow== -browser-resolve@^1.11.3: - version "1.11.3" - resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.3.tgz#9b7cbb3d0f510e4cb86bdbd796124d28b5890af6" - integrity sha512-exDi1BYWB/6raKHmDTCicQfTkqwN5fioMFV4j8BsfMU4R2DK/QfZfK7kOVkmWCNANf0snkBzqGqAJBao9gZMdQ== - dependencies: - resolve "1.1.7" - browser-stdout@1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" @@ -12731,11 +12717,6 @@ resolve-url@^0.2.1: resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= -resolve@1.1.7: - version "1.1.7" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" - integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs= - resolve@^1.1.6, resolve@^1.10.0, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.15.0, resolve@^1.15.1, resolve@^1.17.0, resolve@^1.3.2, resolve@^1.5.0, resolve@^1.8.1: version "1.17.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" From d0623eb83b16ef589295d6e759a3519269a80fde Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Sat, 2 May 2020 10:22:31 +0200 Subject: [PATCH 030/106] fix: remove `require.requireActual` and `require.requireMock` (#9854) --- CHANGELOG.md | 1 + packages/jest-environment/src/index.ts | 5 --- .../lib/__tests__/dependencyExtractor.test.js | 40 ------------------- .../src/lib/dependencyExtractor.ts | 1 - packages/jest-runtime/src/index.ts | 10 +---- 5 files changed, 3 insertions(+), 54 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e26a16c58b4..80d3a97e863d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ ### Chore & Maintenance +- `[jest-runtime]` [**BREAKING**] Remove long-deprecated `require.requireActual` and `require.requireMock` methods ([#9854](https://github.com/facebook/jest/pull/9854)) - `[expect, jest-mock, pretty-format]` [**BREAKING**] Remove `build-es5` from package ([#9945](https://github.com/facebook/jest/pull/9945)) ### Performance diff --git a/packages/jest-environment/src/index.ts b/packages/jest-environment/src/index.ts index 42ca2979c3bd..f48f1131ac39 100644 --- a/packages/jest-environment/src/index.ts +++ b/packages/jest-environment/src/index.ts @@ -58,11 +58,6 @@ export declare class JestEnvironment { export type Module = NodeModule; -export interface LocalModuleRequire extends NodeRequire { - requireActual(moduleName: string): unknown; - requireMock(moduleName: string): unknown; -} - // TODO: Move to some separate package export interface Jest { /** diff --git a/packages/jest-haste-map/src/lib/__tests__/dependencyExtractor.test.js b/packages/jest-haste-map/src/lib/__tests__/dependencyExtractor.test.js index 6ce7e444fae9..d4f8ab691942 100644 --- a/packages/jest-haste-map/src/lib/__tests__/dependencyExtractor.test.js +++ b/packages/jest-haste-map/src/lib/__tests__/dependencyExtractor.test.js @@ -184,46 +184,6 @@ describe('dependencyExtractor', () => { expect(extract(code)).toEqual(new Set(['dep1', 'dep2', 'dep3'])); }); - it('should extract dependencies from `require.requireActual` calls', () => { - const code = ` - // Good - require.requireActual('dep1'); - const dep2 = require.requireActual( - "dep2", - ); - if (require.requireActual(\`dep3\`).cond) {} - require - .requireActual('dep4'); - - // Bad - ${COMMENT_NO_NEG_LB} foo . require.requireActual('inv1') - xrequire.requireActual('inv2'); - require.requireActualx('inv3'); - require.requireActual('inv4', 'inv5'); - `; - expect(extract(code)).toEqual(new Set(['dep1', 'dep2', 'dep3', 'dep4'])); - }); - - it('should extract dependencies from `require.requireMock` calls', () => { - const code = ` - // Good - require.requireMock('dep1'); - const dep2 = require.requireMock( - "dep2", - ); - if (require.requireMock(\`dep3\`).cond) {} - require - .requireMock('dep4'); - - // Bad - ${COMMENT_NO_NEG_LB} foo . require.requireMock('inv1') - xrequire.requireMock('inv2'); - require.requireMockx('inv3'); - require.requireMock('inv4', 'inv5'); - `; - expect(extract(code)).toEqual(new Set(['dep1', 'dep2', 'dep3', 'dep4'])); - }); - it('should extract dependencies from `jest.requireActual` calls', () => { const code = ` // Good diff --git a/packages/jest-haste-map/src/lib/dependencyExtractor.ts b/packages/jest-haste-map/src/lib/dependencyExtractor.ts index d1aa4445ff3c..e99a513701ec 100644 --- a/packages/jest-haste-map/src/lib/dependencyExtractor.ts +++ b/packages/jest-haste-map/src/lib/dependencyExtractor.ts @@ -63,7 +63,6 @@ const IMPORT_OR_EXPORT_RE = createRegExp( const JEST_EXTENSIONS_RE = createRegExp( [ ...functionCallStart( - 'require\\s*\\.\\s*(?:requireActual|requireMock)', 'jest\\s*\\.\\s*(?:requireActual|requireMock|genMockFromModule)', ), CAPTURE_STRING_LITERAL(1), diff --git a/packages/jest-runtime/src/index.ts b/packages/jest-runtime/src/index.ts index 3b7b5003d1e7..1cf4cb0c0c55 100644 --- a/packages/jest-runtime/src/index.ts +++ b/packages/jest-runtime/src/index.ts @@ -23,7 +23,6 @@ import type {Config, Global} from '@jest/types'; import type { Jest, JestEnvironment, - LocalModuleRequire, Module, ModuleWrapper, } from '@jest/environment'; @@ -1314,7 +1313,7 @@ class Runtime { private _createRequireImplementation( from: InitialModule, options?: InternalModuleOptions, - ): LocalModuleRequire { + ): NodeRequire { // TODO: somehow avoid having to type the arguments - they should come from `NodeRequire/LocalModuleRequire.resolve` const resolve = (moduleName: string, options: ResolveOptions) => this._requireResolve(from.filename, moduleName, options); @@ -1324,13 +1323,8 @@ class Runtime { const moduleRequire = (options?.isInternalModule ? (moduleName: string) => this.requireInternalModule(from.filename, moduleName) - : this.requireModuleOrMock.bind( - this, - from.filename, - )) as LocalModuleRequire; + : this.requireModuleOrMock.bind(this, from.filename)) as NodeRequire; moduleRequire.extensions = Object.create(null); - moduleRequire.requireActual = this.requireActual.bind(this, from.filename); - moduleRequire.requireMock = this.requireMock.bind(this, from.filename); moduleRequire.resolve = resolve; moduleRequire.cache = (() => { // TODO: consider warning somehow that this does nothing. We should support deletions, anyways From f776624a7c50ec04307609bf67c7b103857caec2 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Sat, 2 May 2020 10:28:03 +0200 Subject: [PATCH 031/106] chore: require minimum typescript@3.8 (#9823) --- .github/workflows/nodejs.yml | 2 - CHANGELOG.md | 1 + package.json | 3 -- packages/babel-jest/package.json | 7 ---- packages/babel-plugin-jest-hoist/package.json | 7 ---- packages/diff-sequences/package.json | 7 ---- packages/expect/package.json | 7 ---- packages/jest-changed-files/package.json | 7 ---- packages/jest-circus/package.json | 7 ---- packages/jest-cli/package.json | 7 ---- packages/jest-config/package.json | 7 ---- packages/jest-console/package.json | 7 ---- packages/jest-console/src/CustomConsole.ts | 3 +- packages/jest-core/package.json | 7 ---- packages/jest-diff/package.json | 7 ---- packages/jest-docblock/package.json | 7 ---- packages/jest-each/package.json | 7 ---- packages/jest-environment-jsdom/package.json | 7 ---- packages/jest-environment-node/package.json | 7 ---- packages/jest-environment/package.json | 7 ---- packages/jest-fake-timers/package.json | 7 ---- packages/jest-get-type/package.json | 7 ---- packages/jest-globals/package.json | 7 ---- packages/jest-haste-map/package.json | 7 ---- packages/jest-jasmine2/package.json | 7 ---- packages/jest-leak-detector/package.json | 7 ---- packages/jest-matcher-utils/package.json | 7 ---- packages/jest-message-util/package.json | 7 ---- packages/jest-mock/package.json | 7 ---- packages/jest-phabricator/package.json | 7 ---- packages/jest-regex-util/package.json | 7 ---- packages/jest-repl/package.json | 7 ---- packages/jest-reporters/package.json | 7 ---- .../jest-resolve-dependencies/package.json | 7 ---- packages/jest-resolve/package.json | 7 ---- packages/jest-runner/package.json | 7 ---- packages/jest-runtime/package.json | 7 ---- packages/jest-serializer/package.json | 7 ---- packages/jest-snapshot/package.json | 7 ---- packages/jest-source-map/package.json | 7 ---- packages/jest-test-result/package.json | 7 ---- packages/jest-test-sequencer/package.json | 7 ---- packages/jest-transform/package.json | 7 ---- packages/jest-transform/src/types.ts | 5 +-- packages/jest-types/package.json | 7 ---- packages/jest-types/src/Global.ts | 9 ++--- packages/jest-util/package.json | 7 ---- packages/jest-validate/package.json | 7 ---- packages/jest-watcher/package.json | 7 ---- packages/jest-worker/package.json | 7 ---- packages/jest/package.json | 7 ---- packages/pretty-format/package.json | 7 ---- packages/test-utils/package.json | 7 ---- scripts/buildTs.js | 39 ++++--------------- yarn.lock | 10 +---- 55 files changed, 15 insertions(+), 386 deletions(-) diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 5df30a9d3bc7..e38bbbd905b4 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -41,8 +41,6 @@ jobs: run: node scripts/build.js - name: run tsc run: yarn build:ts - - name: verify ts 3.4 compatibility - run: yarn verify-old-ts - name: run eslint run: yarn lint - name: run prettier diff --git a/CHANGELOG.md b/CHANGELOG.md index 80d3a97e863d..91ec3a7baa3a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ ### Chore & Maintenance +- `[*]` [**BREAKING**] TypeScript definitions requires a minimum of TypeScript v3.8 ([#9823](https://github.com/facebook/jest/pull/9823)) - `[jest-runtime]` [**BREAKING**] Remove long-deprecated `require.requireActual` and `require.requireMock` methods ([#9854](https://github.com/facebook/jest/pull/9854)) - `[expect, jest-mock, pretty-format]` [**BREAKING**] Remove `build-es5` from package ([#9945](https://github.com/facebook/jest/pull/9945)) diff --git a/package.json b/package.json index e560e0355b7e..f0f5a3be9a1b 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,6 @@ "codecov": "^3.0.0", "debug": "^4.0.1", "dedent": "^0.7.0", - "downlevel-dts": "^0.4.0", "eslint": "^6.2.2", "eslint-config-prettier": "^6.1.0", "eslint-plugin-babel": "^5.1.0", @@ -76,7 +75,6 @@ "string-length": "^3.1.0", "strip-ansi": "^6.0.0", "tempy": "~0.3.0", - "throat": "^5.0.0", "typescript": "^3.8.2", "which": "^2.0.1" }, @@ -102,7 +100,6 @@ "test-pretty-format-perf": "node packages/pretty-format/perf/test.js", "test-leak": "yarn jest -i --detectLeaks jest-mock jest-diff jest-repl", "test": "yarn lint && yarn jest", - "verify-old-ts": "node ./scripts/verifyOldTs.js", "watch": "yarn build && node ./scripts/watch.js", "watch:ts": "yarn build:ts --watch" }, diff --git a/packages/babel-jest/package.json b/packages/babel-jest/package.json index 890ca9a6a0ab..3e502141f332 100644 --- a/packages/babel-jest/package.json +++ b/packages/babel-jest/package.json @@ -10,13 +10,6 @@ "license": "MIT", "main": "build/index.js", "types": "build/index.d.ts", - "typesVersions": { - "<3.8": { - "build/*": [ - "build/ts3.4/*" - ] - } - }, "dependencies": { "@jest/transform": "^25.5.1", "@jest/types": "^25.5.0", diff --git a/packages/babel-plugin-jest-hoist/package.json b/packages/babel-plugin-jest-hoist/package.json index ae5ecc0fbba7..a7b5973e3a7e 100644 --- a/packages/babel-plugin-jest-hoist/package.json +++ b/packages/babel-plugin-jest-hoist/package.json @@ -12,13 +12,6 @@ "license": "MIT", "main": "build/index.js", "types": "build/index.d.ts", - "typesVersions": { - "<3.8": { - "build/*": [ - "build/ts3.4/*" - ] - } - }, "dependencies": { "@babel/template": "^7.3.3", "@babel/types": "^7.3.3", diff --git a/packages/diff-sequences/package.json b/packages/diff-sequences/package.json index 7912d18f0d65..c1ca52cae128 100644 --- a/packages/diff-sequences/package.json +++ b/packages/diff-sequences/package.json @@ -20,13 +20,6 @@ }, "main": "build/index.js", "types": "build/index.d.ts", - "typesVersions": { - "<3.8": { - "build/*": [ - "build/ts3.4/*" - ] - } - }, "scripts": { "perf": "node --expose-gc perf/index.js" }, diff --git a/packages/expect/package.json b/packages/expect/package.json index 18101b026061..192ca431789a 100644 --- a/packages/expect/package.json +++ b/packages/expect/package.json @@ -9,13 +9,6 @@ "license": "MIT", "main": "build/index.js", "types": "build/index.d.ts", - "typesVersions": { - "<3.8": { - "build/*": [ - "build/ts3.4/*" - ] - } - }, "dependencies": { "@jest/types": "^25.5.0", "ansi-styles": "^4.0.0", diff --git a/packages/jest-changed-files/package.json b/packages/jest-changed-files/package.json index 78fbeb4263bb..66135646dc44 100644 --- a/packages/jest-changed-files/package.json +++ b/packages/jest-changed-files/package.json @@ -9,13 +9,6 @@ "license": "MIT", "main": "build/index.js", "types": "build/index.d.ts", - "typesVersions": { - "<3.8": { - "build/*": [ - "build/ts3.4/*" - ] - } - }, "dependencies": { "@jest/types": "^25.5.0", "execa": "^3.2.0", diff --git a/packages/jest-circus/package.json b/packages/jest-circus/package.json index bcdfe2bfa998..4936defbf169 100644 --- a/packages/jest-circus/package.json +++ b/packages/jest-circus/package.json @@ -9,13 +9,6 @@ "license": "MIT", "main": "build/index.js", "types": "build/index.d.ts", - "typesVersions": { - "<3.8": { - "build/*": [ - "build/ts3.4/*" - ] - } - }, "dependencies": { "@babel/traverse": "^7.1.0", "@jest/environment": "^25.5.0", diff --git a/packages/jest-cli/package.json b/packages/jest-cli/package.json index cac8d7b90e05..909a8f1e3398 100644 --- a/packages/jest-cli/package.json +++ b/packages/jest-cli/package.json @@ -4,13 +4,6 @@ "version": "25.5.4", "main": "build/index.js", "types": "build/index.d.ts", - "typesVersions": { - "<3.8": { - "build/*": [ - "build/ts3.4/*" - ] - } - }, "dependencies": { "@jest/core": "^25.5.4", "@jest/test-result": "^25.5.0", diff --git a/packages/jest-config/package.json b/packages/jest-config/package.json index 0f1e74f3bced..0391417fccc0 100644 --- a/packages/jest-config/package.json +++ b/packages/jest-config/package.json @@ -9,13 +9,6 @@ "license": "MIT", "main": "build/index.js", "types": "build/index.d.ts", - "typesVersions": { - "<3.8": { - "build/*": [ - "build/ts3.4/*" - ] - } - }, "dependencies": { "@babel/core": "^7.1.0", "@jest/test-sequencer": "^25.5.4", diff --git a/packages/jest-console/package.json b/packages/jest-console/package.json index 80b76d9c1b96..10323ae96373 100644 --- a/packages/jest-console/package.json +++ b/packages/jest-console/package.json @@ -9,13 +9,6 @@ "license": "MIT", "main": "build/index.js", "types": "build/index.d.ts", - "typesVersions": { - "<3.8": { - "build/*": [ - "build/ts3.4/*" - ] - } - }, "dependencies": { "@jest/types": "^25.5.0", "chalk": "^3.0.0", diff --git a/packages/jest-console/src/CustomConsole.ts b/packages/jest-console/src/CustomConsole.ts index 1bd27f3ac923..59a7e8441d7a 100644 --- a/packages/jest-console/src/CustomConsole.ts +++ b/packages/jest-console/src/CustomConsole.ts @@ -51,8 +51,7 @@ export default class CustomConsole extends Console { ); } - // use `asserts` when https://github.com/sandersn/downlevel-dts/issues/32 is fixed - assert(value: unknown, message?: string | Error): void { + assert(value: unknown, message?: string | Error): asserts value { try { assert(value, message); } catch (error) { diff --git a/packages/jest-core/package.json b/packages/jest-core/package.json index e8f63659e764..47a2bc29bdc1 100644 --- a/packages/jest-core/package.json +++ b/packages/jest-core/package.json @@ -4,13 +4,6 @@ "version": "25.5.4", "main": "build/jest.js", "types": "build/jest.d.ts", - "typesVersions": { - "<3.8": { - "build/*": [ - "build/ts3.4/*" - ] - } - }, "dependencies": { "@jest/console": "^25.5.0", "@jest/reporters": "^25.5.1", diff --git a/packages/jest-diff/package.json b/packages/jest-diff/package.json index 4b05af5f8479..8bceb6695c8e 100644 --- a/packages/jest-diff/package.json +++ b/packages/jest-diff/package.json @@ -9,13 +9,6 @@ "license": "MIT", "main": "build/index.js", "types": "build/index.d.ts", - "typesVersions": { - "<3.8": { - "build/*": [ - "build/ts3.4/*" - ] - } - }, "dependencies": { "chalk": "^3.0.0", "diff-sequences": "^25.2.6", diff --git a/packages/jest-docblock/package.json b/packages/jest-docblock/package.json index 8264e146ade3..411507e2fd51 100644 --- a/packages/jest-docblock/package.json +++ b/packages/jest-docblock/package.json @@ -9,13 +9,6 @@ "license": "MIT", "main": "build/index.js", "types": "build/index.d.ts", - "typesVersions": { - "<3.8": { - "build/*": [ - "build/ts3.4/*" - ] - } - }, "dependencies": { "detect-newline": "^3.0.0" }, diff --git a/packages/jest-each/package.json b/packages/jest-each/package.json index 0268d2dcd54f..90cc9181adfe 100644 --- a/packages/jest-each/package.json +++ b/packages/jest-each/package.json @@ -4,13 +4,6 @@ "description": "Parameterised tests for Jest", "main": "build/index.js", "types": "build/index.d.ts", - "typesVersions": { - "<3.8": { - "build/*": [ - "build/ts3.4/*" - ] - } - }, "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", diff --git a/packages/jest-environment-jsdom/package.json b/packages/jest-environment-jsdom/package.json index c25da57ea444..4dc983922ad4 100644 --- a/packages/jest-environment-jsdom/package.json +++ b/packages/jest-environment-jsdom/package.json @@ -9,13 +9,6 @@ "license": "MIT", "main": "build/index.js", "types": "build/index.d.ts", - "typesVersions": { - "<3.8": { - "build/*": [ - "build/ts3.4/*" - ] - } - }, "dependencies": { "@jest/environment": "^25.5.0", "@jest/fake-timers": "^25.5.0", diff --git a/packages/jest-environment-node/package.json b/packages/jest-environment-node/package.json index c4f32f2c0310..50fc83adb9d1 100644 --- a/packages/jest-environment-node/package.json +++ b/packages/jest-environment-node/package.json @@ -9,13 +9,6 @@ "license": "MIT", "main": "build/index.js", "types": "build/index.d.ts", - "typesVersions": { - "<3.8": { - "build/*": [ - "build/ts3.4/*" - ] - } - }, "dependencies": { "@jest/environment": "^25.5.0", "@jest/fake-timers": "^25.5.0", diff --git a/packages/jest-environment/package.json b/packages/jest-environment/package.json index 21b3b2da18f0..212cac54db82 100644 --- a/packages/jest-environment/package.json +++ b/packages/jest-environment/package.json @@ -9,13 +9,6 @@ "license": "MIT", "main": "build/index.js", "types": "build/index.d.ts", - "typesVersions": { - "<3.8": { - "build/*": [ - "build/ts3.4/*" - ] - } - }, "dependencies": { "@jest/fake-timers": "^25.5.0", "@jest/types": "^25.5.0", diff --git a/packages/jest-fake-timers/package.json b/packages/jest-fake-timers/package.json index 9c114fe73b1e..0e4850b19041 100644 --- a/packages/jest-fake-timers/package.json +++ b/packages/jest-fake-timers/package.json @@ -9,13 +9,6 @@ "license": "MIT", "main": "build/index.js", "types": "build/index.d.ts", - "typesVersions": { - "<3.8": { - "build/*": [ - "build/ts3.4/*" - ] - } - }, "dependencies": { "@jest/types": "^25.5.0", "jest-message-util": "^25.5.0", diff --git a/packages/jest-get-type/package.json b/packages/jest-get-type/package.json index ae0524cb5af4..d752bcdc2c57 100644 --- a/packages/jest-get-type/package.json +++ b/packages/jest-get-type/package.json @@ -13,13 +13,6 @@ "license": "MIT", "main": "build/index.js", "types": "build/index.d.ts", - "typesVersions": { - "<3.8": { - "build/*": [ - "build/ts3.4/*" - ] - } - }, "publishConfig": { "access": "public" }, diff --git a/packages/jest-globals/package.json b/packages/jest-globals/package.json index 024d7d52fa17..93617a4fae85 100644 --- a/packages/jest-globals/package.json +++ b/packages/jest-globals/package.json @@ -12,13 +12,6 @@ "license": "MIT", "main": "build/index.js", "types": "build/index.d.ts", - "typesVersions": { - "<3.8": { - "build/*": [ - "build/ts3.4/*" - ] - } - }, "dependencies": { "@jest/environment": "^25.5.0", "@jest/types": "^25.5.0", diff --git a/packages/jest-haste-map/package.json b/packages/jest-haste-map/package.json index 7b6deebf45df..f4dafcf41ba0 100644 --- a/packages/jest-haste-map/package.json +++ b/packages/jest-haste-map/package.json @@ -9,13 +9,6 @@ "license": "MIT", "main": "build/index.js", "types": "build/index.d.ts", - "typesVersions": { - "<3.8": { - "build/*": [ - "build/ts3.4/*" - ] - } - }, "dependencies": { "@jest/types": "^25.5.0", "@types/graceful-fs": "^4.1.2", diff --git a/packages/jest-jasmine2/package.json b/packages/jest-jasmine2/package.json index 972777670d70..0afca1f54a1f 100644 --- a/packages/jest-jasmine2/package.json +++ b/packages/jest-jasmine2/package.json @@ -9,13 +9,6 @@ "license": "MIT", "main": "build/index.js", "types": "build/index.d.ts", - "typesVersions": { - "<3.8": { - "build/*": [ - "build/ts3.4/*" - ] - } - }, "dependencies": { "@babel/traverse": "^7.1.0", "@jest/environment": "^25.5.0", diff --git a/packages/jest-leak-detector/package.json b/packages/jest-leak-detector/package.json index d769aec2a2ad..190e31f8cec9 100644 --- a/packages/jest-leak-detector/package.json +++ b/packages/jest-leak-detector/package.json @@ -9,13 +9,6 @@ "license": "MIT", "main": "build/index.js", "types": "build/index.d.ts", - "typesVersions": { - "<3.8": { - "build/*": [ - "build/ts3.4/*" - ] - } - }, "dependencies": { "jest-get-type": "^25.2.6", "pretty-format": "^25.5.0" diff --git a/packages/jest-matcher-utils/package.json b/packages/jest-matcher-utils/package.json index 51c5b5ad316d..009b9b870f7e 100644 --- a/packages/jest-matcher-utils/package.json +++ b/packages/jest-matcher-utils/package.json @@ -13,13 +13,6 @@ "license": "MIT", "main": "build/index.js", "types": "build/index.d.ts", - "typesVersions": { - "<3.8": { - "build/*": [ - "build/ts3.4/*" - ] - } - }, "dependencies": { "chalk": "^3.0.0", "jest-diff": "^25.5.0", diff --git a/packages/jest-message-util/package.json b/packages/jest-message-util/package.json index ec63967c9fd4..091c69afe882 100644 --- a/packages/jest-message-util/package.json +++ b/packages/jest-message-util/package.json @@ -12,13 +12,6 @@ "license": "MIT", "main": "build/index.js", "types": "build/index.d.ts", - "typesVersions": { - "<3.8": { - "build/*": [ - "build/ts3.4/*" - ] - } - }, "dependencies": { "@babel/code-frame": "^7.0.0", "@jest/types": "^25.5.0", diff --git a/packages/jest-mock/package.json b/packages/jest-mock/package.json index 33e5455da8ac..d69c11f518f4 100644 --- a/packages/jest-mock/package.json +++ b/packages/jest-mock/package.json @@ -18,13 +18,6 @@ "license": "MIT", "main": "build/index.js", "types": "build/index.d.ts", - "typesVersions": { - "<3.8": { - "build/*": [ - "build/ts3.4/*" - ] - } - }, "publishConfig": { "access": "public" }, diff --git a/packages/jest-phabricator/package.json b/packages/jest-phabricator/package.json index 27f161c7a5df..1df1b1093872 100644 --- a/packages/jest-phabricator/package.json +++ b/packages/jest-phabricator/package.json @@ -7,13 +7,6 @@ "directory": "packages/jest-phabricator" }, "types": "build/index.d.ts", - "typesVersions": { - "<3.8": { - "build/*": [ - "build/ts3.4/*" - ] - } - }, "dependencies": { "@jest/test-result": "^25.5.0" }, diff --git a/packages/jest-regex-util/package.json b/packages/jest-regex-util/package.json index e7b7206e03eb..641872644187 100644 --- a/packages/jest-regex-util/package.json +++ b/packages/jest-regex-util/package.json @@ -15,13 +15,6 @@ "license": "MIT", "main": "build/index.js", "types": "build/index.d.ts", - "typesVersions": { - "<3.8": { - "build/*": [ - "build/ts3.4/*" - ] - } - }, "publishConfig": { "access": "public" }, diff --git a/packages/jest-repl/package.json b/packages/jest-repl/package.json index 46d95b897e0d..f58e7ef48f1a 100644 --- a/packages/jest-repl/package.json +++ b/packages/jest-repl/package.json @@ -9,13 +9,6 @@ "license": "MIT", "main": "build/index.js", "types": "build/index.d.ts", - "typesVersions": { - "<3.8": { - "build/*": [ - "build/ts3.4/*" - ] - } - }, "dependencies": { "@jest/transform": "^25.5.1", "@jest/types": "^25.5.0", diff --git a/packages/jest-reporters/package.json b/packages/jest-reporters/package.json index db46b54c84d6..aec7082bcefa 100644 --- a/packages/jest-reporters/package.json +++ b/packages/jest-reporters/package.json @@ -4,13 +4,6 @@ "version": "25.5.1", "main": "build/index.js", "types": "build/index.d.ts", - "typesVersions": { - "<3.8": { - "build/*": [ - "build/ts3.4/*" - ] - } - }, "dependencies": { "@bcoe/v8-coverage": "^0.2.3", "@jest/console": "^25.5.0", diff --git a/packages/jest-resolve-dependencies/package.json b/packages/jest-resolve-dependencies/package.json index fdd77539838a..5435835f909d 100644 --- a/packages/jest-resolve-dependencies/package.json +++ b/packages/jest-resolve-dependencies/package.json @@ -9,13 +9,6 @@ "license": "MIT", "main": "build/index.js", "types": "build/index.d.ts", - "typesVersions": { - "<3.8": { - "build/*": [ - "build/ts3.4/*" - ] - } - }, "dependencies": { "@jest/types": "^25.5.0", "jest-regex-util": "^25.2.6", diff --git a/packages/jest-resolve/package.json b/packages/jest-resolve/package.json index 5645f2741d8b..d5d7d9519630 100644 --- a/packages/jest-resolve/package.json +++ b/packages/jest-resolve/package.json @@ -9,13 +9,6 @@ "license": "MIT", "main": "build/index.js", "types": "build/index.d.ts", - "typesVersions": { - "<3.8": { - "build/*": [ - "build/ts3.4/*" - ] - } - }, "dependencies": { "@jest/types": "^25.5.0", "chalk": "^3.0.0", diff --git a/packages/jest-runner/package.json b/packages/jest-runner/package.json index be0f557e0b4a..3113997eed45 100644 --- a/packages/jest-runner/package.json +++ b/packages/jest-runner/package.json @@ -9,13 +9,6 @@ "license": "MIT", "main": "build/index.js", "types": "build/index.d.ts", - "typesVersions": { - "<3.8": { - "build/*": [ - "build/ts3.4/*" - ] - } - }, "dependencies": { "@jest/console": "^25.5.0", "@jest/environment": "^25.5.0", diff --git a/packages/jest-runtime/package.json b/packages/jest-runtime/package.json index bbdc4d714a54..fbf9987acdcb 100644 --- a/packages/jest-runtime/package.json +++ b/packages/jest-runtime/package.json @@ -9,13 +9,6 @@ "license": "MIT", "main": "build/index.js", "types": "build/index.d.ts", - "typesVersions": { - "<3.8": { - "build/*": [ - "build/ts3.4/*" - ] - } - }, "dependencies": { "@jest/console": "^25.5.0", "@jest/environment": "^25.5.0", diff --git a/packages/jest-serializer/package.json b/packages/jest-serializer/package.json index c2a1f6db1ea5..3e5fbe5e0975 100644 --- a/packages/jest-serializer/package.json +++ b/packages/jest-serializer/package.json @@ -19,13 +19,6 @@ "license": "MIT", "main": "build/index.js", "types": "build/index.d.ts", - "typesVersions": { - "<3.8": { - "build/*": [ - "build/ts3.4/*" - ] - } - }, "publishConfig": { "access": "public" }, diff --git a/packages/jest-snapshot/package.json b/packages/jest-snapshot/package.json index a0b502a2a48d..dbf49e75795f 100644 --- a/packages/jest-snapshot/package.json +++ b/packages/jest-snapshot/package.json @@ -9,13 +9,6 @@ "license": "MIT", "main": "build/index.js", "types": "build/index.d.ts", - "typesVersions": { - "<3.8": { - "build/*": [ - "build/ts3.4/*" - ] - } - }, "dependencies": { "@babel/types": "^7.0.0", "@jest/types": "^25.5.0", diff --git a/packages/jest-source-map/package.json b/packages/jest-source-map/package.json index adef54f96044..56c7a89c2b55 100644 --- a/packages/jest-source-map/package.json +++ b/packages/jest-source-map/package.json @@ -9,13 +9,6 @@ "license": "MIT", "main": "build/index.js", "types": "build/index.d.ts", - "typesVersions": { - "<3.8": { - "build/*": [ - "build/ts3.4/*" - ] - } - }, "dependencies": { "callsites": "^3.0.0", "graceful-fs": "^4.2.4", diff --git a/packages/jest-test-result/package.json b/packages/jest-test-result/package.json index d3d77ac88207..94b3d15c0ecc 100644 --- a/packages/jest-test-result/package.json +++ b/packages/jest-test-result/package.json @@ -9,13 +9,6 @@ "license": "MIT", "main": "build/index.js", "types": "build/index.d.ts", - "typesVersions": { - "<3.8": { - "build/*": [ - "build/ts3.4/*" - ] - } - }, "dependencies": { "@jest/console": "^25.5.0", "@jest/types": "^25.5.0", diff --git a/packages/jest-test-sequencer/package.json b/packages/jest-test-sequencer/package.json index 2672d8352b42..53870f3044ab 100644 --- a/packages/jest-test-sequencer/package.json +++ b/packages/jest-test-sequencer/package.json @@ -9,13 +9,6 @@ "license": "MIT", "main": "build/index.js", "types": "build/index.d.ts", - "typesVersions": { - "<3.8": { - "build/*": [ - "build/ts3.4/*" - ] - } - }, "dependencies": { "@jest/test-result": "^25.5.0", "graceful-fs": "^4.2.4", diff --git a/packages/jest-transform/package.json b/packages/jest-transform/package.json index a4bb71051a1d..b164e245e300 100644 --- a/packages/jest-transform/package.json +++ b/packages/jest-transform/package.json @@ -9,13 +9,6 @@ "license": "MIT", "main": "build/index.js", "types": "build/index.d.ts", - "typesVersions": { - "<3.8": { - "build/*": [ - "build/ts3.4/*" - ] - } - }, "dependencies": { "@babel/core": "^7.1.0", "@jest/types": "^25.5.0", diff --git a/packages/jest-transform/src/types.ts b/packages/jest-transform/src/types.ts index b984980e1112..483c8e6cc9a4 100644 --- a/packages/jest-transform/src/types.ts +++ b/packages/jest-transform/src/types.ts @@ -27,11 +27,8 @@ export type Options = ShouldInstrumentOptions & supportsStaticESM: boolean; }>; -// extends directly after https://github.com/sandersn/downlevel-dts/issues/33 is fixed -type SourceMapWithVersion = Omit; - // This is fixed in source-map@0.7.x, but we can't upgrade yet since it's async -interface FixedRawSourceMap extends SourceMapWithVersion { +interface FixedRawSourceMap extends Omit { version: number; } diff --git a/packages/jest-types/package.json b/packages/jest-types/package.json index c08c41db7f8d..cbe5cca4bf10 100644 --- a/packages/jest-types/package.json +++ b/packages/jest-types/package.json @@ -12,13 +12,6 @@ "license": "MIT", "main": "build/index.js", "types": "build/index.d.ts", - "typesVersions": { - "<3.8": { - "build/*": [ - "build/ts3.4/*" - ] - } - }, "dependencies": { "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^1.1.1", diff --git a/packages/jest-types/src/Global.ts b/packages/jest-types/src/Global.ts index f4c0c327ead4..df96271c126a 100644 --- a/packages/jest-types/src/Global.ts +++ b/packages/jest-types/src/Global.ts @@ -93,10 +93,9 @@ export interface GlobalAdditions extends TestFrameworkGlobals { spyOnProperty: () => void; } -// TODO: Maybe add `| Window` in the future? -// extends directly after https://github.com/sandersn/downlevel-dts/issues/33 is fixed -type NodeGlobalWithoutAdditions = Omit; - -export interface Global extends GlobalAdditions, NodeGlobalWithoutAdditions { +export interface Global + extends GlobalAdditions, + // TODO: Maybe add `| Window` in the future? + Omit { [extras: string]: any; } diff --git a/packages/jest-util/package.json b/packages/jest-util/package.json index 49c5ddbc68d2..e802af44e54c 100644 --- a/packages/jest-util/package.json +++ b/packages/jest-util/package.json @@ -9,13 +9,6 @@ "license": "MIT", "main": "build/index.js", "types": "build/index.d.ts", - "typesVersions": { - "<3.8": { - "build/*": [ - "build/ts3.4/*" - ] - } - }, "dependencies": { "@jest/types": "^25.5.0", "chalk": "^3.0.0", diff --git a/packages/jest-validate/package.json b/packages/jest-validate/package.json index 6aee18c8fd0a..cf1c6a4264d2 100644 --- a/packages/jest-validate/package.json +++ b/packages/jest-validate/package.json @@ -9,13 +9,6 @@ "license": "MIT", "main": "build/index.js", "types": "build/index.d.ts", - "typesVersions": { - "<3.8": { - "build/*": [ - "build/ts3.4/*" - ] - } - }, "dependencies": { "@jest/types": "^25.5.0", "camelcase": "^5.3.1", diff --git a/packages/jest-watcher/package.json b/packages/jest-watcher/package.json index e5a677970b31..af6d9af43e3d 100644 --- a/packages/jest-watcher/package.json +++ b/packages/jest-watcher/package.json @@ -4,13 +4,6 @@ "version": "25.5.0", "main": "build/index.js", "types": "build/index.d.ts", - "typesVersions": { - "<3.8": { - "build/*": [ - "build/ts3.4/*" - ] - } - }, "dependencies": { "@jest/test-result": "^25.5.0", "@jest/types": "^25.5.0", diff --git a/packages/jest-worker/package.json b/packages/jest-worker/package.json index da50ed5ed656..cb9e664c2b9b 100644 --- a/packages/jest-worker/package.json +++ b/packages/jest-worker/package.json @@ -9,13 +9,6 @@ "license": "MIT", "main": "build/index.js", "types": "build/index.d.ts", - "typesVersions": { - "<3.8": { - "build/*": [ - "build/ts3.4/*" - ] - } - }, "dependencies": { "merge-stream": "^2.0.0", "supports-color": "^7.0.0" diff --git a/packages/jest/package.json b/packages/jest/package.json index 5964b69fb1c1..7e5bd40a521f 100644 --- a/packages/jest/package.json +++ b/packages/jest/package.json @@ -4,13 +4,6 @@ "version": "25.5.4", "main": "build/jest.js", "types": "build/jest.d.ts", - "typesVersions": { - "<3.8": { - "build/*": [ - "build/ts3.4/*" - ] - } - }, "dependencies": { "@jest/core": "^25.5.4", "import-local": "^3.0.2", diff --git a/packages/pretty-format/package.json b/packages/pretty-format/package.json index 66ea7d8b2c16..70c610ec602a 100644 --- a/packages/pretty-format/package.json +++ b/packages/pretty-format/package.json @@ -10,13 +10,6 @@ "description": "Stringify any JavaScript value.", "main": "build/index.js", "types": "build/index.d.ts", - "typesVersions": { - "<3.8": { - "build/*": [ - "build/ts3.4/*" - ] - } - }, "author": "James Kyle ", "dependencies": { "@jest/types": "^25.5.0", diff --git a/packages/test-utils/package.json b/packages/test-utils/package.json index 51046831e16a..00efbdd9a18f 100644 --- a/packages/test-utils/package.json +++ b/packages/test-utils/package.json @@ -5,13 +5,6 @@ "license": "MIT", "main": "build/index.js", "types": "build/index.d.ts", - "typesVersions": { - "<3.8": { - "build/*": [ - "build/ts3.4/*" - ] - } - }, "dependencies": { "@types/jest": "*", "@types/node": "*", diff --git a/scripts/buildTs.js b/scripts/buildTs.js index 9f8ed9c3c7cb..93af2fefe385 100644 --- a/scripts/buildTs.js +++ b/scripts/buildTs.js @@ -16,7 +16,6 @@ const util = require('util'); const chalk = require('chalk'); const execa = require('execa'); const globby = require('globby'); -const rimraf = require('rimraf'); const throat = require('throat'); const {getPackages} = require('./buildUtils'); @@ -111,34 +110,10 @@ Promise.all( } }), ), -) - .then(() => { - const downlevelArgs = ['--silent', 'downlevel-dts', 'build', 'build/ts3.4']; - - console.log(chalk.inverse(' Downleveling TypeScript definition files ')); - - return Promise.all( - packagesWithTs.map( - throat(cpus, pkgDir => { - // otherwise we get nested `ts3.4` directories - rimraf.sync(path.resolve(pkgDir, 'build/ts3.4')); - - return execa('yarn', downlevelArgs, {cwd: pkgDir, stdio: 'inherit'}); - }), - ), - ); - }) - .then(() => { - console.log( - chalk.inverse.green( - ' Successfully downleveled TypeScript definition files ', - ), - ); - }) - .catch(e => { - console.error( - chalk.inverse.red(' Unable to downlevel TypeScript definition files '), - ); - console.error(e.stack); - process.exitCode = 1; - }); +).catch(e => { + console.error( + chalk.inverse.red(' Unable to validate TypeScript definition files '), + ); + console.error(e.stack); + process.exitCode = 1; +}); diff --git a/yarn.lock b/yarn.lock index 972ca1c18448..b8c4f335b98e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5674,14 +5674,6 @@ dot-prop@^5.2.0: dependencies: is-obj "^2.0.0" -downlevel-dts@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/downlevel-dts/-/downlevel-dts-0.4.0.tgz#43f9f649c8b137373d76b4ee396d5a0227c10ddb" - integrity sha512-nh5vM3n2pRhPwZqh0iWo5gpItPAYEGEWw9yd0YpI+lO60B7A3A6iJlxDbt7kKVNbqBXKsptL+jwE/Yg5Go66WQ== - dependencies: - shelljs "^0.8.3" - typescript "^3.8.0-dev.20200111" - download@^6.2.2: version "6.2.5" resolved "https://registry.yarnpkg.com/download/-/download-6.2.5.tgz#acd6a542e4cd0bb42ca70cfc98c9e43b07039714" @@ -14386,7 +14378,7 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@*, typescript@^3.8.0-dev.20200111, typescript@^3.8.2: +typescript@*, typescript@^3.8.2: version "3.8.3" resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.8.3.tgz#409eb8544ea0335711205869ec458ab109ee1061" integrity sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w== From e8398d2a24c9f3a542ca31ee343d901671685529 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Sat, 2 May 2020 10:34:12 +0200 Subject: [PATCH 032/106] chore: run yarn to cleanup lockfile --- package.json | 1 - yarn.lock | 1317 ++------------------------------------------------ 2 files changed, 33 insertions(+), 1285 deletions(-) diff --git a/package.json b/package.json index f0f5a3be9a1b..9090ef4da801 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,6 @@ "ansi-regex": "^5.0.0", "ansi-styles": "^4.2.0", "babel-eslint": "^10.0.3", - "babel-loader": "^8.0.5", "babel-plugin-replace-ts-export-assignment": "^0.0.2", "babel-plugin-typescript-strip-namespaces": "^1.1.1", "camelcase": "^5.0.0", diff --git a/yarn.lock b/yarn.lock index b8c4f335b98e..ecc3477240e8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2649,161 +2649,6 @@ semver "^6.3.0" tsutils "^3.17.1" -"@webassemblyjs/ast@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.9.0.tgz#bd850604b4042459a5a41cd7d338cbed695ed964" - integrity sha512-C6wW5L+b7ogSDVqymbkkvuW9kruN//YisMED04xzeBBqjHa2FYnmvOlS6Xj68xWQRgWvI9cIglsjFowH/RJyEA== - dependencies: - "@webassemblyjs/helper-module-context" "1.9.0" - "@webassemblyjs/helper-wasm-bytecode" "1.9.0" - "@webassemblyjs/wast-parser" "1.9.0" - -"@webassemblyjs/floating-point-hex-parser@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.9.0.tgz#3c3d3b271bddfc84deb00f71344438311d52ffb4" - integrity sha512-TG5qcFsS8QB4g4MhrxK5TqfdNe7Ey/7YL/xN+36rRjl/BlGE/NcBvJcqsRgCP6Z92mRE+7N50pRIi8SmKUbcQA== - -"@webassemblyjs/helper-api-error@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.9.0.tgz#203f676e333b96c9da2eeab3ccef33c45928b6a2" - integrity sha512-NcMLjoFMXpsASZFxJ5h2HZRcEhDkvnNFOAKneP5RbKRzaWJN36NC4jqQHKwStIhGXu5mUWlUUk7ygdtrO8lbmw== - -"@webassemblyjs/helper-buffer@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.9.0.tgz#a1442d269c5feb23fcbc9ef759dac3547f29de00" - integrity sha512-qZol43oqhq6yBPx7YM3m9Bv7WMV9Eevj6kMi6InKOuZxhw+q9hOkvq5e/PpKSiLfyetpaBnogSbNCfBwyB00CA== - -"@webassemblyjs/helper-code-frame@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.9.0.tgz#647f8892cd2043a82ac0c8c5e75c36f1d9159f27" - integrity sha512-ERCYdJBkD9Vu4vtjUYe8LZruWuNIToYq/ME22igL+2vj2dQ2OOujIZr3MEFvfEaqKoVqpsFKAGsRdBSBjrIvZA== - dependencies: - "@webassemblyjs/wast-printer" "1.9.0" - -"@webassemblyjs/helper-fsm@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-fsm/-/helper-fsm-1.9.0.tgz#c05256b71244214671f4b08ec108ad63b70eddb8" - integrity sha512-OPRowhGbshCb5PxJ8LocpdX9Kl0uB4XsAjl6jH/dWKlk/mzsANvhwbiULsaiqT5GZGT9qinTICdj6PLuM5gslw== - -"@webassemblyjs/helper-module-context@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-module-context/-/helper-module-context-1.9.0.tgz#25d8884b76839871a08a6c6f806c3979ef712f07" - integrity sha512-MJCW8iGC08tMk2enck1aPW+BE5Cw8/7ph/VGZxwyvGbJwjktKkDK7vy7gAmMDx88D7mhDTCNKAW5tED+gZ0W8g== - dependencies: - "@webassemblyjs/ast" "1.9.0" - -"@webassemblyjs/helper-wasm-bytecode@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.9.0.tgz#4fed8beac9b8c14f8c58b70d124d549dd1fe5790" - integrity sha512-R7FStIzyNcd7xKxCZH5lE0Bqy+hGTwS3LJjuv1ZVxd9O7eHCedSdrId/hMOd20I+v8wDXEn+bjfKDLzTepoaUw== - -"@webassemblyjs/helper-wasm-section@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.9.0.tgz#5a4138d5a6292ba18b04c5ae49717e4167965346" - integrity sha512-XnMB8l3ek4tvrKUUku+IVaXNHz2YsJyOOmz+MMkZvh8h1uSJpSen6vYnw3IoQ7WwEuAhL8Efjms1ZWjqh2agvw== - dependencies: - "@webassemblyjs/ast" "1.9.0" - "@webassemblyjs/helper-buffer" "1.9.0" - "@webassemblyjs/helper-wasm-bytecode" "1.9.0" - "@webassemblyjs/wasm-gen" "1.9.0" - -"@webassemblyjs/ieee754@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.9.0.tgz#15c7a0fbaae83fb26143bbacf6d6df1702ad39e4" - integrity sha512-dcX8JuYU/gvymzIHc9DgxTzUUTLexWwt8uCTWP3otys596io0L5aW02Gb1RjYpx2+0Jus1h4ZFqjla7umFniTg== - dependencies: - "@xtuc/ieee754" "^1.2.0" - -"@webassemblyjs/leb128@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.9.0.tgz#f19ca0b76a6dc55623a09cffa769e838fa1e1c95" - integrity sha512-ENVzM5VwV1ojs9jam6vPys97B/S65YQtv/aanqnU7D8aSoHFX8GyhGg0CMfyKNIHBuAVjy3tlzd5QMMINa7wpw== - dependencies: - "@xtuc/long" "4.2.2" - -"@webassemblyjs/utf8@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.9.0.tgz#04d33b636f78e6a6813227e82402f7637b6229ab" - integrity sha512-GZbQlWtopBTP0u7cHrEx+73yZKrQoBMpwkGEIqlacljhXCkVM1kMQge/Mf+csMJAjEdSwhOyLAS0AoR3AG5P8w== - -"@webassemblyjs/wasm-edit@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.9.0.tgz#3fe6d79d3f0f922183aa86002c42dd256cfee9cf" - integrity sha512-FgHzBm80uwz5M8WKnMTn6j/sVbqilPdQXTWraSjBwFXSYGirpkSWE2R9Qvz9tNiTKQvoKILpCuTjBKzOIm0nxw== - dependencies: - "@webassemblyjs/ast" "1.9.0" - "@webassemblyjs/helper-buffer" "1.9.0" - "@webassemblyjs/helper-wasm-bytecode" "1.9.0" - "@webassemblyjs/helper-wasm-section" "1.9.0" - "@webassemblyjs/wasm-gen" "1.9.0" - "@webassemblyjs/wasm-opt" "1.9.0" - "@webassemblyjs/wasm-parser" "1.9.0" - "@webassemblyjs/wast-printer" "1.9.0" - -"@webassemblyjs/wasm-gen@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.9.0.tgz#50bc70ec68ded8e2763b01a1418bf43491a7a49c" - integrity sha512-cPE3o44YzOOHvlsb4+E9qSqjc9Qf9Na1OO/BHFy4OI91XDE14MjFN4lTMezzaIWdPqHnsTodGGNP+iRSYfGkjA== - dependencies: - "@webassemblyjs/ast" "1.9.0" - "@webassemblyjs/helper-wasm-bytecode" "1.9.0" - "@webassemblyjs/ieee754" "1.9.0" - "@webassemblyjs/leb128" "1.9.0" - "@webassemblyjs/utf8" "1.9.0" - -"@webassemblyjs/wasm-opt@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.9.0.tgz#2211181e5b31326443cc8112eb9f0b9028721a61" - integrity sha512-Qkjgm6Anhm+OMbIL0iokO7meajkzQD71ioelnfPEj6r4eOFuqm4YC3VBPqXjFyyNwowzbMD+hizmprP/Fwkl2A== - dependencies: - "@webassemblyjs/ast" "1.9.0" - "@webassemblyjs/helper-buffer" "1.9.0" - "@webassemblyjs/wasm-gen" "1.9.0" - "@webassemblyjs/wasm-parser" "1.9.0" - -"@webassemblyjs/wasm-parser@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.9.0.tgz#9d48e44826df4a6598294aa6c87469d642fff65e" - integrity sha512-9+wkMowR2AmdSWQzsPEjFU7njh8HTO5MqO8vjwEHuM+AMHioNqSBONRdr0NQQ3dVQrzp0s8lTcYqzUdb7YgELA== - dependencies: - "@webassemblyjs/ast" "1.9.0" - "@webassemblyjs/helper-api-error" "1.9.0" - "@webassemblyjs/helper-wasm-bytecode" "1.9.0" - "@webassemblyjs/ieee754" "1.9.0" - "@webassemblyjs/leb128" "1.9.0" - "@webassemblyjs/utf8" "1.9.0" - -"@webassemblyjs/wast-parser@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-parser/-/wast-parser-1.9.0.tgz#3031115d79ac5bd261556cecc3fa90a3ef451914" - integrity sha512-qsqSAP3QQ3LyZjNC/0jBJ/ToSxfYJ8kYyuiGvtn/8MK89VrNEfwj7BPQzJVHi0jGTRK2dGdJ5PRqhtjzoww+bw== - dependencies: - "@webassemblyjs/ast" "1.9.0" - "@webassemblyjs/floating-point-hex-parser" "1.9.0" - "@webassemblyjs/helper-api-error" "1.9.0" - "@webassemblyjs/helper-code-frame" "1.9.0" - "@webassemblyjs/helper-fsm" "1.9.0" - "@xtuc/long" "4.2.2" - -"@webassemblyjs/wast-printer@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.9.0.tgz#4935d54c85fef637b00ce9f52377451d00d47899" - integrity sha512-2J0nE95rHXHyQ24cWjMKJ1tqB/ds8z/cyeOZxJhcb+rW+SQASVjuznUSmdz5GpVJTzU8JkhYut0D3siFDD6wsA== - dependencies: - "@webassemblyjs/ast" "1.9.0" - "@webassemblyjs/wast-parser" "1.9.0" - "@xtuc/long" "4.2.2" - -"@xtuc/ieee754@^1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz#eef014a3145ae477a1cbc00cd1e552336dceb790" - integrity sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA== - -"@xtuc/long@4.2.2": - version "4.2.2" - resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d" - integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== - "@zkochan/cmd-shim@^3.1.0": version "3.1.0" resolved "https://registry.yarnpkg.com/@zkochan/cmd-shim/-/cmd-shim-3.1.0.tgz#2ab8ed81f5bb5452a85f25758eb9b8681982fd2e" @@ -2843,7 +2688,7 @@ absolute-path@^0.0.0: resolved "https://registry.yarnpkg.com/absolute-path/-/absolute-path-0.0.0.tgz#a78762fbdadfb5297be99b15d35a785b2f095bf7" integrity sha1-p4di+9rftSl76ZsV01p4Wy8JW/c= -accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.7: +accepts@~1.3.5, accepts@~1.3.7: version "1.3.7" resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" integrity sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA== @@ -2869,7 +2714,7 @@ acorn-walk@^6.0.1: resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-6.2.0.tgz#123cb8f3b84c2171f1f7fb252615b1c78a6b1a8c" integrity sha512-7evsyfH1cLOCdAzZAd43Cic04yKydNx0cF+7tiA19p1XnLLPU4dpCQOqpjqwokFe//vS0QqfqqjCS2JkiIs0cA== -acorn@^6.0.1, acorn@^6.2.1: +acorn@^6.0.1: version "6.4.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.1.tgz#531e58ba3f51b9dacb9a6646ca4debf5b14ca474" integrity sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA== @@ -2884,11 +2729,6 @@ address@1.1.2, address@^1.0.1: resolved "https://registry.yarnpkg.com/address/-/address-1.1.2.tgz#bf1116c9c758c51b7a933d296b72c221ed9428b6" integrity sha512-aT6camzM4xEA54YVJYSqxz1kv4IHnQZRtThJJHhUMRExaU5spC7jX5ugSwTaTgJliIgs4VhZOk7htClvQ/LmRA== -after@0.8.2: - version "0.8.2" - resolved "https://registry.yarnpkg.com/after/-/after-0.8.2.tgz#fedb394f9f0e02aa9768e702bda23b505fae7e1f" - integrity sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8= - agent-base@4, agent-base@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.3.0.tgz#8165f01c436009bccad0b1d122f05ed770efc6ee" @@ -2938,17 +2778,7 @@ airbnb-prop-types@^2.15.0: prop-types-exact "^1.2.0" react-is "^16.9.0" -ajv-errors@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/ajv-errors/-/ajv-errors-1.0.1.tgz#f35986aceb91afadec4102fbd85014950cefa64d" - integrity sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ== - -ajv-keywords@^3.1.0, ajv-keywords@^3.4.1: - version "3.4.1" - resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.4.1.tgz#ef916e271c64ac12171fd8384eaae6b2345854da" - integrity sha512-RO1ibKvd27e6FEShVFfPALuHI3WjSVNeK5FIsmme/LYRNxjKuNj+Dt7bucLa6NdSv3JcVTyMlm9kGR84z1XpaQ== - -ajv@^6.1.0, ajv@^6.10.0, ajv@^6.10.2, ajv@^6.12.0, ajv@^6.5.5: +ajv@^6.10.0, ajv@^6.10.2, ajv@^6.5.5: version "6.12.0" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.0.tgz#06d60b96d87b8454a5adaba86e7854da629db4b7" integrity sha512-D6gFiFA0RRLyUbvijN74DWAjXSFxWKaWP7mldxkVhyhAV3+SWA9HEJPHQ2c9soIeTFJqcSdFDGFgdqs1iUU2Hw== @@ -2980,11 +2810,6 @@ ansi-colors@^1.0.1: dependencies: ansi-wrap "^0.1.0" -ansi-colors@^3.0.0: - version "3.2.4" - resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.4.tgz#e3a3da4bfbae6c86a9c285625de124a234026fbf" - integrity sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA== - ansi-cyan@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/ansi-cyan/-/ansi-cyan-0.1.1.tgz#538ae528af8982f28ae30d86f2f17456d2609873" @@ -3273,11 +3098,6 @@ array.prototype.flat@^1.2.1, array.prototype.flat@^1.2.3: define-properties "^1.1.3" es-abstract "^1.17.0-next.1" -arraybuffer.slice@~0.0.7: - version "0.0.7" - resolved "https://registry.yarnpkg.com/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz#3bbc4275dd584cc1b10809b89d4e8b63a69e7675" - integrity sha512-wGUIVQXuehL5TCqQun8OW81jGzAWycqzFF8lFp+GOM5BXLYj3bKNsYC4daB7n6XjCqxQA/qgTJ+8ANR3acjrog== - arrify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" @@ -3288,15 +3108,6 @@ asap@^2.0.0, asap@~2.0.3, asap@~2.0.6: resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" integrity sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY= -asn1.js@^4.0.0: - version "4.10.1" - resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-4.10.1.tgz#b9c2bf5805f1e64aadeed6df3a2bfafb5a73f5a0" - integrity sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw== - dependencies: - bn.js "^4.0.0" - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - asn1@~0.2.3: version "0.2.4" resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136" @@ -3309,14 +3120,6 @@ assert-plus@1.0.0, assert-plus@^1.0.0: resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= -assert@^1.1.1: - version "1.5.0" - resolved "https://registry.yarnpkg.com/assert/-/assert-1.5.0.tgz#55c109aaf6e0aefdb3dc4b71240c70bf574b18eb" - integrity sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA== - dependencies: - object-assign "^4.1.1" - util "0.10.3" - assign-symbols@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" @@ -3337,11 +3140,6 @@ async-each@^1.0.1: resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.3.tgz#b727dbf87d7651602f06f4d4ac387f47d91b0cbf" integrity sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ== -async-limiter@~1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd" - integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ== - async@^2.4.0, async@^2.6.2: version "2.6.3" resolved "https://registry.yarnpkg.com/async/-/async-2.6.3.tgz#d72625e2344a3656e3a3ad4fa749fa83299d82ff" @@ -3427,17 +3225,6 @@ babel-eslint@^10.0.3: eslint-visitor-keys "^1.0.0" resolve "^1.12.0" -babel-loader@^8.0.5: - version "8.1.0" - resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-8.1.0.tgz#c611d5112bd5209abe8b9fa84c3e4da25275f1c3" - integrity sha512-7q7nC1tYOrqvUrN3LQK4GwSk/TQorZSOlO9C+RZDZpODgyN4ZlCqE5q9cDsyWOliN+aU9B4JX01xK9eJXowJLw== - dependencies: - find-cache-dir "^2.1.0" - loader-utils "^1.4.0" - mkdirp "^0.5.3" - pify "^4.0.1" - schema-utils "^2.6.5" - babel-plugin-dynamic-import-node@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.0.tgz#f00f507bdaa3c3e3ff6e7e5e98d90a7acab96f7f" @@ -3549,11 +3336,6 @@ babylon@^6.18.0: resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" integrity sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ== -backo2@1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/backo2/-/backo2-1.0.2.tgz#31ab1ac8b129363463e35b3ebb69f4dfcfba7947" - integrity sha1-MasayLEpNjRj41s+u2n038+6eUc= - bail@^1.0.0: version "1.0.5" resolved "https://registry.yarnpkg.com/bail/-/bail-1.0.5.tgz#b6fa133404a392cbc1f8c4bf63f5953351e7a776" @@ -3564,21 +3346,11 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= -base64-arraybuffer@0.1.5: - version "0.1.5" - resolved "https://registry.yarnpkg.com/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz#73926771923b5a19747ad666aa5cd4bf9c6e9ce8" - integrity sha1-c5JncZI7Whl0etZmqlzUv5xunOg= - base64-js@^1.0.2, base64-js@^1.1.2, base64-js@^1.2.3: version "1.3.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.1.tgz#58ece8cb75dd07e71ed08c736abc5fac4dbf8df1" integrity sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g== -base64id@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/base64id/-/base64id-1.0.0.tgz#47688cb99bb6804f0e06d3e763b1c32e57d8e6b6" - integrity sha1-R2iMuZu2gE8OBtPnY7HDLlfY5rY= - base@^0.11.1: version "0.11.2" resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" @@ -3612,13 +3384,6 @@ benchmark@^2.1.4: lodash "^4.17.4" platform "^1.3.3" -better-assert@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/better-assert/-/better-assert-1.0.2.tgz#40866b9e1b9e0b55b481894311e68faffaebc522" - integrity sha1-QIZrnhueC1W0gYlDEeaPr/rrxSI= - dependencies: - callsite "1.0.0" - big-integer@^1.6.44: version "1.6.48" resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.48.tgz#8fd88bd1632cba4a1c8c3e3d7159f08bb95b4b9e" @@ -3710,22 +3475,12 @@ bl@^2.2.0: readable-stream "^2.3.5" safe-buffer "^5.1.1" -blob@0.0.5: - version "0.0.5" - resolved "https://registry.yarnpkg.com/blob/-/blob-0.0.5.tgz#d680eeef25f8cd91ad533f5b01eed48e64caf683" - integrity sha512-gaqbzQPqOoamawKg0LGVd7SzLgXS+JH61oWprSLH+P+abTczqJbhTR8CmJ2u9/bUYNmHTGJx/UEmn6doAvvuig== - -bluebird@^3.3.0, bluebird@^3.5.1, bluebird@^3.5.3, bluebird@^3.5.5: +bluebird@^3.5.1, bluebird@^3.5.3, bluebird@^3.5.5: version "3.7.2" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== -bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0: - version "4.11.8" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" - integrity sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA== - -body-parser@1.19.0, body-parser@^1.16.1: +body-parser@1.19.0: version "1.19.0" resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.0.tgz#96b2709e57c9c4e09a6fd66a8fd979844f69f08a" integrity sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw== @@ -3794,18 +3549,13 @@ braces@^2.3.1, braces@^2.3.2: split-string "^3.0.2" to-regex "^3.0.1" -braces@^3.0.1, braces@^3.0.2, braces@~3.0.2: +braces@^3.0.1, braces@~3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== dependencies: fill-range "^7.0.1" -brorand@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" - integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= - browser-process-hrtime@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz#3c9b4b7d782c8121e56f10106d84c0d0ffc94626" @@ -3816,65 +3566,6 @@ browser-stdout@1.3.1: resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== -browserify-aes@^1.0.0, browserify-aes@^1.0.4: - version "1.2.0" - resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" - integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== - dependencies: - buffer-xor "^1.0.3" - cipher-base "^1.0.0" - create-hash "^1.1.0" - evp_bytestokey "^1.0.3" - inherits "^2.0.1" - safe-buffer "^5.0.1" - -browserify-cipher@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.1.tgz#8d6474c1b870bfdabcd3bcfcc1934a10e94f15f0" - integrity sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w== - dependencies: - browserify-aes "^1.0.4" - browserify-des "^1.0.0" - evp_bytestokey "^1.0.0" - -browserify-des@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.2.tgz#3af4f1f59839403572f1c66204375f7a7f703e9c" - integrity sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A== - dependencies: - cipher-base "^1.0.1" - des.js "^1.0.0" - inherits "^2.0.1" - safe-buffer "^5.1.2" - -browserify-rsa@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.0.1.tgz#21e0abfaf6f2029cf2fafb133567a701d4135524" - integrity sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ= - dependencies: - bn.js "^4.1.0" - randombytes "^2.0.1" - -browserify-sign@^4.0.0: - version "4.0.4" - resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.0.4.tgz#aa4eb68e5d7b658baa6bf6a57e630cbd7a93d298" - integrity sha1-qk62jl17ZYuqa/alfmMMvXqT0pg= - dependencies: - bn.js "^4.1.1" - browserify-rsa "^4.0.0" - create-hash "^1.1.0" - create-hmac "^1.1.2" - elliptic "^6.0.0" - inherits "^2.0.1" - parse-asn1 "^5.0.0" - -browserify-zlib@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.2.0.tgz#2869459d9aa3be245fe8fe2ca1f46e2e7f54d73f" - integrity sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA== - dependencies: - pako "~1.0.5" - browserslist@4.7.0: version "4.7.0" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.7.0.tgz#9ee89225ffc07db03409f2fee524dc8227458a17" @@ -3939,20 +3630,6 @@ buffer-from@^1.0.0: resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== -buffer-xor@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" - integrity sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk= - -buffer@^4.3.0: - version "4.9.2" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.2.tgz#230ead344002988644841ab0244af8c44bbe3ef8" - integrity sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg== - dependencies: - base64-js "^1.0.2" - ieee754 "^1.1.4" - isarray "^1.0.0" - buffer@^5.2.1: version "5.5.0" resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.5.0.tgz#9c3caa3d623c33dd1c7ef584b89b88bf9c9bc1ce" @@ -3961,11 +3638,6 @@ buffer@^5.2.1: base64-js "^1.0.2" ieee754 "^1.1.4" -builtin-status-codes@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" - integrity sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug= - builtins@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/builtins/-/builtins-1.0.3.tgz#cb94faeb61c8696451db36534e1422f94f0aee88" @@ -3996,7 +3668,7 @@ bytes@3.1.0: resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6" integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg== -cacache@^12.0.0, cacache@^12.0.2, cacache@^12.0.3: +cacache@^12.0.0, cacache@^12.0.3: version "12.0.4" resolved "https://registry.yarnpkg.com/cacache/-/cacache-12.0.4.tgz#668bcbd105aeb5f1d92fe25570ec9525c8faa40c" integrity sha512-a0tMB40oefvuInr4Cwb3GerbL9xTj1D5yg0T5xrjGCGyfvbxseIXX7BAO/u/hIXdafzOI5JC3wDwHyf24buOAQ== @@ -4064,11 +3736,6 @@ caller-path@^2.0.0: dependencies: caller-callsite "^2.0.0" -callsite@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/callsite/-/callsite-1.0.0.tgz#280398e5d664bd74038b6f0905153e6e8af1bc20" - integrity sha1-KAOY5dZkvXQDi28JBRU+borxvCA= - callsites@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" @@ -4250,7 +3917,7 @@ chokidar@3.3.0: optionalDependencies: fsevents "~2.1.1" -chokidar@^2.0.4, chokidar@^2.1.8: +chokidar@^2.0.4: version "2.1.8" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.8.tgz#804b3a7b6a99358c3c5c61e71d8728f041cff917" integrity sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg== @@ -4269,7 +3936,7 @@ chokidar@^2.0.4, chokidar@^2.1.8: optionalDependencies: fsevents "^1.2.7" -chokidar@^3.0.0, chokidar@^3.3.0: +chokidar@^3.3.0: version "3.3.1" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.3.1.tgz#c84e5b3d18d9a4d77558fef466b1bf16bbeb3450" integrity sha512-4QYCEWOcK3OJrxwvyyAOxFuhpvOVCYkr33LPfFNBjAD/w3sEzWsp2BUOkI4l9bHvWioAd0rc6NlHUOEaWkTeqg== @@ -4289,26 +3956,11 @@ chownr@^1.1.1, chownr@^1.1.2: resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== -chrome-trace-event@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.2.tgz#234090ee97c7d4ad1a2c4beae27505deffc608a4" - integrity sha512-9e/zx1jw7B4CO+c/RXoCsfg/x1AfUBioy4owYH0bJprEYAx5hRFLRhWBqHAG57D0ZM4H7vxbP7bPe0VwhQRYDQ== - dependencies: - tslib "^1.9.0" - ci-info@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== -cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" - integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - class-utils@^0.3.5: version "0.3.6" resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" @@ -4508,11 +4160,6 @@ colorette@^1.0.7: resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.1.0.tgz#1f943e5a357fac10b4e0f5aaef3b14cdc1af6ec7" integrity sha512-6S062WDQUXi6hOfkO/sBPVwE5ASXY4G2+b4atvhJfSsuUUhIaUKlkjLe9692Ipyt5/a+IPF5aVTu3V5gvXq5cg== -colors@^1.1.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" - integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== - columnify@^1.5.4: version "1.5.4" resolved "https://registry.yarnpkg.com/columnify/-/columnify-1.5.4.tgz#4737ddf1c7b69a8a7c340570782e947eec8e78bb" @@ -4533,7 +4180,7 @@ command-exists@^1.2.8: resolved "https://registry.yarnpkg.com/command-exists/-/command-exists-1.2.9.tgz#c50725af3808c8ab0260fd60b01fbfa25b954f69" integrity sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w== -commander@^2.11.0, commander@^2.19.0, commander@^2.20.0, commander@~2.20.3: +commander@^2.11.0, commander@^2.19.0, commander@~2.20.3: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== @@ -4573,26 +4220,11 @@ compare-func@^1.3.1: array-ify "^1.0.0" dot-prop "^3.0.0" -component-bind@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/component-bind/-/component-bind-1.0.0.tgz#00c608ab7dcd93897c0009651b1d3a8e1e73bbd1" - integrity sha1-AMYIq33Nk4l8AAllGx06jh5zu9E= - -component-emitter@1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.1.tgz#137918d6d78283f7df7a6b7c5a63e140e69425e6" - integrity sha1-E3kY1teCg/ffemt8WmPhQOaUJeY= - component-emitter@^1.2.1: version "1.3.0" resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg== -component-inherit@0.0.3: - version "0.0.3" - resolved "https://registry.yarnpkg.com/component-inherit/-/component-inherit-0.0.3.tgz#645fc4adf58b72b649d5cae65135619db26ff143" - integrity sha1-ZF/ErfWLcrZJ1crmUTVhnbJv8UM= - compressible@~2.0.16: version "2.0.18" resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.18.tgz#af53cca6b070d4c3c0750fbd77286a6d7cc46fba" @@ -4653,7 +4285,7 @@ config-chain@^1.1.11: ini "^1.3.4" proto-list "~1.2.1" -connect@^3.6.0, connect@^3.6.5: +connect@^3.6.5: version "3.7.0" resolved "https://registry.yarnpkg.com/connect/-/connect-3.7.0.tgz#5d49348910caa5e07a01800b030d0c35f20484f8" integrity sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ== @@ -4663,11 +4295,6 @@ connect@^3.6.0, connect@^3.6.5: parseurl "~1.3.3" utils-merge "1.0.1" -console-browserify@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.2.0.tgz#67063cef57ceb6cf4993a2ab3a55840ae8c49336" - integrity sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA== - console-control-strings@^1.0.0, console-control-strings@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" @@ -4678,11 +4305,6 @@ console-stream@^0.1.1: resolved "https://registry.yarnpkg.com/console-stream/-/console-stream-0.1.1.tgz#a095fe07b20465955f2fafd28b5d72bccd949d44" integrity sha1-oJX+B7IEZZVfL6/Si11yvM2UnUQ= -constants-browserify@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" - integrity sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U= - contains-path@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/contains-path/-/contains-path-0.1.0.tgz#fe8cf184ff6670b6baef01a9d4861a5cbec4120a" @@ -4800,11 +4422,6 @@ cookie-signature@1.0.6: resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw= -cookie@0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb" - integrity sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s= - cookie@0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.0.tgz#beb437e7022b3b6d49019d088665303ebe9c14ba" @@ -4870,37 +4487,6 @@ cosmiconfig@^5.0.0, cosmiconfig@^5.0.5, cosmiconfig@^5.1.0: js-yaml "^3.13.1" parse-json "^4.0.0" -create-ecdh@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.3.tgz#c9111b6f33045c4697f144787f9254cdc77c45ff" - integrity sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw== - dependencies: - bn.js "^4.1.0" - elliptic "^6.0.0" - -create-hash@^1.1.0, create-hash@^1.1.2: - version "1.2.0" - resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" - integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== - dependencies: - cipher-base "^1.0.1" - inherits "^2.0.1" - md5.js "^1.3.4" - ripemd160 "^2.0.1" - sha.js "^2.4.0" - -create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4: - version "1.1.7" - resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" - integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== - dependencies: - cipher-base "^1.0.3" - create-hash "^1.1.0" - inherits "^2.0.1" - ripemd160 "^2.0.0" - safe-buffer "^5.0.1" - sha.js "^2.4.8" - create-react-class@^15.6.3: version "15.6.3" resolved "https://registry.yarnpkg.com/create-react-class/-/create-react-class-15.6.3.tgz#2d73237fb3f970ae6ebe011a9e66f46dbca80036" @@ -4956,23 +4542,6 @@ crowdin-cli@^0.3.0: yamljs "^0.2.1" yargs "^2.3.0" -crypto-browserify@^3.11.0: - version "3.12.0" - resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" - integrity sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg== - dependencies: - browserify-cipher "^1.0.0" - browserify-sign "^4.0.0" - create-ecdh "^4.0.0" - create-hash "^1.1.0" - create-hmac "^1.1.0" - diffie-hellman "^5.0.0" - inherits "^2.0.1" - pbkdf2 "^3.0.3" - public-encrypt "^4.0.0" - randombytes "^2.0.0" - randomfill "^1.0.3" - crypto-random-string@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-1.0.0.tgz#a230f64f568310e1498009940790ec99545bca7e" @@ -5151,11 +4720,6 @@ currently-unhandled@^0.4.1: dependencies: array-find-index "^1.0.1" -custom-event@~1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/custom-event/-/custom-event-1.0.1.tgz#5d02a46850adf1b4a317946a3928fccb5bfd0425" - integrity sha1-XQKkaFCt8bSjF5RqOSj8y1v9BCU= - cyclist@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-1.0.1.tgz#596e9698fd0c80e12038c2b82d6eb1b35b6224d9" @@ -5189,11 +4753,6 @@ data-urls@^1.1.0: whatwg-mimetype "^2.2.0" whatwg-url "^7.0.0" -date-format@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/date-format/-/date-format-2.1.0.tgz#31d5b5ea211cf5fd764cd38baf9d033df7e125cf" - integrity sha512-bYQuGLeFxhkxNOF3rcMtiZxvCBAquGzZm6oWA1oZ0g2THUzivaRhv8uOhdr19LmoobSOLoIAxeUK2RdbM8IFTA== - dateformat@^3.0.0: version "3.0.3" resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae" @@ -5211,14 +4770,14 @@ debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.8, debug@^2.6. dependencies: ms "2.0.0" -debug@3.1.0, debug@~3.1.0: +debug@3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== dependencies: ms "2.0.0" -debug@3.2.6, debug@^3.0.0, debug@^3.1.0, debug@^3.1.1, debug@^3.2.5, debug@^3.2.6: +debug@3.2.6, debug@^3.1.0, debug@^3.1.1, debug@^3.2.5: version "3.2.6" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== @@ -5413,14 +4972,6 @@ deprecation@^2.0.0, deprecation@^2.3.1: resolved "https://registry.yarnpkg.com/deprecation/-/deprecation-2.3.1.tgz#6368cbdb40abf3373b525ac87e4a260c3a700919" integrity sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ== -des.js@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.1.tgz#5382142e1bdc53f85d86d53e5f4aa7deb91e0843" - integrity sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA== - dependencies: - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - destroy@~1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" @@ -5452,11 +5003,6 @@ dezalgo@^1.0.0: asap "^2.0.0" wrappy "1" -di@^0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/di/-/di-0.0.1.tgz#806649326ceaa7caa3306d75d985ea2748ba913c" - integrity sha1-gGZJMmzqp8qjMG112YXqJ0i6kTw= - diacritics-map@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/diacritics-map/-/diacritics-map-0.1.0.tgz#6dfc0ff9d01000a2edf2865371cac316e94977af" @@ -5472,15 +5018,6 @@ diff@^4.0.1: resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== -diffie-hellman@^5.0.0: - version "5.0.3" - resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" - integrity sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg== - dependencies: - bn.js "^4.1.0" - miller-rabin "^4.0.0" - randombytes "^2.0.0" - dir-glob@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-2.0.0.tgz#0b205d2b6aef98238ca286598a8204d29d0a0034" @@ -5582,16 +5119,6 @@ docusaurus@^1.14.2: tree-node-cli "^1.2.5" truncate-html "^1.0.3" -dom-serialize@^2.2.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/dom-serialize/-/dom-serialize-2.2.1.tgz#562ae8999f44be5ea3076f5419dcd59eb43ac95b" - integrity sha1-ViromZ9Evl6jB29UGdzVnrQ6yVs= - dependencies: - custom-event "~1.0.0" - ent "~2.2.0" - extend "^3.0.0" - void-elements "^2.0.0" - dom-serializer@0: version "0.2.2" resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.2.2.tgz#1afb81f533717175d478655debc5e332d9f9bb51" @@ -5608,11 +5135,6 @@ dom-serializer@~0.1.0, dom-serializer@~0.1.1: domelementtype "^1.3.0" entities "^1.1.1" -domain-browser@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda" - integrity sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA== - domelementtype@1, domelementtype@^1.3.0, domelementtype@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.1.tgz#d048c44b37b0d10a7f2a3d5fee3f4333d790481f" @@ -5747,19 +5269,6 @@ electron-to-chromium@^1.3.247, electron-to-chromium@^1.3.390: resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.403.tgz#c8bab4e2e72bf78bc28bad1cc355c061f9cc1918" integrity sha512-JaoxV4RzdBAZOnsF4dAlZ2ijJW72MbqO5lNfOBHUWiBQl3Rwe+mk2RCUMrRI3rSClLJ8HSNQNqcry12H+0ZjFw== -elliptic@^6.0.0: - version "6.5.2" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.2.tgz#05c5678d7173c049d8ca433552224a495d0e3762" - integrity sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw== - dependencies: - bn.js "^4.4.0" - brorand "^1.0.1" - hash.js "^1.0.0" - hmac-drbg "^1.0.0" - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.0" - "emoji-regex@>=6.0.0 <=6.1.1": version "6.1.1" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-6.1.1.tgz#c6cd0ec1b0642e2a3c67a1137efc5e796da4f88e" @@ -5780,11 +5289,6 @@ emojis-list@^2.0.0: resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" integrity sha1-TapNnbAPmBmIDHn6RXrlsJof04k= -emojis-list@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-3.0.0.tgz#5570662046ad29e2e916e71aae260abdff4f6a78" - integrity sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q== - encodeurl@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" @@ -5804,60 +5308,6 @@ end-of-stream@^1.0.0, end-of-stream@^1.1.0: dependencies: once "^1.4.0" -engine.io-client@~3.2.0: - version "3.2.1" - resolved "https://registry.yarnpkg.com/engine.io-client/-/engine.io-client-3.2.1.tgz#6f54c0475de487158a1a7c77d10178708b6add36" - integrity sha512-y5AbkytWeM4jQr7m/koQLc5AxpRKC1hEVUb/s1FUAWEJq5AzJJ4NLvzuKPuxtDi5Mq755WuDvZ6Iv2rXj4PTzw== - dependencies: - component-emitter "1.2.1" - component-inherit "0.0.3" - debug "~3.1.0" - engine.io-parser "~2.1.1" - has-cors "1.1.0" - indexof "0.0.1" - parseqs "0.0.5" - parseuri "0.0.5" - ws "~3.3.1" - xmlhttprequest-ssl "~1.5.4" - yeast "0.1.2" - -engine.io-parser@~2.1.0, engine.io-parser@~2.1.1: - version "2.1.3" - resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-2.1.3.tgz#757ab970fbf2dfb32c7b74b033216d5739ef79a6" - integrity sha512-6HXPre2O4Houl7c4g7Ic/XzPnHBvaEmN90vtRO9uLmwtRqQmTOw0QMevL1TOfL2Cpu1VzsaTmMotQgMdkzGkVA== - dependencies: - after "0.8.2" - arraybuffer.slice "~0.0.7" - base64-arraybuffer "0.1.5" - blob "0.0.5" - has-binary2 "~1.0.2" - -engine.io@~3.2.0: - version "3.2.1" - resolved "https://registry.yarnpkg.com/engine.io/-/engine.io-3.2.1.tgz#b60281c35484a70ee0351ea0ebff83ec8c9522a2" - integrity sha512-+VlKzHzMhaU+GsCIg4AoXF1UdDFjHHwMmMKqMJNDNLlUlejz58FCy4LBqB2YVJskHGYl06BatYWKP2TVdVXE5w== - dependencies: - accepts "~1.3.4" - base64id "1.0.0" - cookie "0.3.1" - debug "~3.1.0" - engine.io-parser "~2.1.0" - ws "~3.3.1" - -enhanced-resolve@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-4.1.1.tgz#2937e2b8066cd0fe7ce0990a98f0d71a35189f66" - integrity sha512-98p2zE+rL7/g/DzMHMTF4zZlCgeVdJ7yr6xzEpJRYwFYrGi9ANdn5DnJURg6RpBkyk60XYDnWIv51VfIhfNGuA== - dependencies: - graceful-fs "^4.1.2" - memory-fs "^0.5.0" - tapable "^1.0.0" - -ent@~2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/ent/-/ent-2.2.0.tgz#e964219325a21d05f44466a2f686ed6ce5f5dd1d" - integrity sha1-6WQhkyWiHQX0RGai9obtbOX13R0= - entities@^1.1.1, entities@~1.1.1: version "1.1.2" resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.2.tgz#bdfa735299664dfafd34529ed4f8522a275fea56" @@ -5946,7 +5396,7 @@ err-code@^1.0.0: resolved "https://registry.yarnpkg.com/err-code/-/err-code-1.1.2.tgz#06e0116d3028f6aef4806849eb0ea6a748ae6960" integrity sha1-BuARbTAo9q70gGhJ6w6mp0iuaWA= -errno@^0.1.3, errno@~0.1.7: +errno@~0.1.7: version "0.1.7" resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.7.tgz#4684d71779ad39af177e3f007996f7c67c852618" integrity sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg== @@ -6176,14 +5626,6 @@ eslint-rule-composer@^0.3.0: resolved "https://registry.yarnpkg.com/eslint-rule-composer/-/eslint-rule-composer-0.3.0.tgz#79320c927b0c5c0d3d3d2b76c8b4a488f25bbaf9" integrity sha512-bt+Sh8CtDmn2OajxvNO+BX7Wn4CIWMpTRm3MaiKPCQcnnlm0CS2mhui6QaoeQugs+3Kj2ESKEEGJUdVafwhiCg== -eslint-scope@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.3.tgz#ca03833310f6889a3264781aa82e63eb9cfe7848" - integrity sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg== - dependencies: - esrecurse "^4.1.0" - estraverse "^4.1.1" - eslint-scope@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.0.0.tgz#e87c8887c73e8d1ec84f1ca591645c358bfc8fb9" @@ -6312,16 +5754,6 @@ eventemitter3@^3.0.0, eventemitter3@^3.1.0: resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.2.tgz#2d3d48f9c346698fce83a85d7d664e98535df6e7" integrity sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q== -eventemitter3@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.0.tgz#d65176163887ee59f386d64c82610b696a4a74eb" - integrity sha512-qerSRB0p+UDEssxTtm6EDKcE7W4OaoisfIMl4CngyEhjpYglocpNg6UEqCvemdGhosAsg4sO2dXJOdyBifPGCg== - -events@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/events/-/events-3.1.0.tgz#84279af1b34cb75aa88bf5ff291f6d0bd9b31a59" - integrity sha512-Rv+u8MLHNOdMjTAFeT3nCjHn2aGlx435FP/sDHNaRhDEMwyI/aB22Kj2qIN8R0cw3z28psEQLYwxVKLsKrMgWg== - eventsource@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/eventsource/-/eventsource-1.0.7.tgz#8fbc72c93fcd34088090bc0a4e64f4b5cee6d8d0" @@ -6329,14 +5761,6 @@ eventsource@^1.0.7: dependencies: original "^1.0.0" -evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" - integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== - dependencies: - md5.js "^1.3.4" - safe-buffer "^5.1.1" - exec-buffer@^3.0.0: version "3.2.0" resolved "https://registry.yarnpkg.com/exec-buffer/-/exec-buffer-3.2.0.tgz#b1686dbd904c7cf982e652c1f5a79b1e5573082b" @@ -6837,7 +6261,7 @@ find-cache-dir@3.2.0: make-dir "^3.0.0" pkg-dir "^4.1.0" -find-cache-dir@^2.0.0, find-cache-dir@^2.1.0: +find-cache-dir@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-2.1.0.tgz#8d0f94cd13fe43c6c7c261a0d86115ca918c05f7" integrity sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ== @@ -6926,13 +6350,6 @@ flush-write-stream@^1.0.0: inherits "^2.0.3" readable-stream "^2.3.6" -follow-redirects@^1.0.0: - version "1.11.0" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.11.0.tgz#afa14f08ba12a52963140fe43212658897bc0ecb" - integrity sha512-KZm0V+ll8PfBrKwMzdo5D13b1bur9Iq9Zd/RMmAoQQcl2PxxFml8cxXPaaPYVbV0RjNjq1CU7zIzAOqtUPudmA== - dependencies: - debug "^3.0.0" - for-in@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" @@ -7005,15 +6422,6 @@ fs-extra@^1.0.0: jsonfile "^2.1.0" klaw "^1.0.0" -fs-extra@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" - integrity sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw== - dependencies: - graceful-fs "^4.1.2" - jsonfile "^4.0.0" - universalify "^0.1.0" - fs-extra@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" @@ -7551,18 +6959,6 @@ has-ansi@^2.0.0: dependencies: ansi-regex "^2.0.0" -has-binary2@~1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has-binary2/-/has-binary2-1.0.3.tgz#7776ac627f3ea77250cfc332dab7ddf5e4f5d11d" - integrity sha512-G1LWKhDSvhGeAQ8mPVQlqNcOB2sJdwATtZKl2pDKKHfpf/rYj24lkinxf69blJbnsvtqqNU+L3SL50vzZhXOnw== - dependencies: - isarray "2.0.1" - -has-cors@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/has-cors/-/has-cors-1.1.0.tgz#5e474793f7ea9843d1bb99c23eef49ff126fff39" - integrity sha1-XkdHk/fqmEPRu5nCPu9J/xJv/zk= - has-flag@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" @@ -7633,22 +7029,6 @@ has@^1.0.0, has@^1.0.3: dependencies: function-bind "^1.1.1" -hash-base@^3.0.0: - version "3.0.4" - resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.0.4.tgz#5fc8686847ecd73499403319a6b0a3f3f6ae4918" - integrity sha1-X8hoaEfs1zSZQDMZprCj8/auSRg= - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - -hash.js@^1.0.0, hash.js@^1.0.3: - version "1.1.7" - resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" - integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== - dependencies: - inherits "^2.0.3" - minimalistic-assert "^1.0.1" - he@1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" @@ -7669,15 +7049,6 @@ highlight.js@^9.16.2: resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.18.1.tgz#ed21aa001fe6252bb10a3d76d47573c6539fe13c" integrity sha512-OrVKYz70LHsnCgmbXctv/bfuvntIKDz177h0Co37DQ5jamGZLVmoCVMtjMtNZY3X9DrCcKfklHPNeA0uPZhSJg== -hmac-drbg@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" - integrity sha1-0nRXAQJabHdabFRXk+1QL8DGSaE= - dependencies: - hash.js "^1.0.3" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.1" - hosted-git-info@^2.1.4, hosted-git-info@^2.7.1: version "2.8.8" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.8.tgz#7539bd4bc1e0e0a895815a2e0262420b12858488" @@ -7778,15 +7149,6 @@ http-proxy-agent@^4.0.0: agent-base "6" debug "4" -http-proxy@^1.13.0: - version "1.18.0" - resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.18.0.tgz#dbe55f63e75a347db7f3d99974f2692a314a6a3a" - integrity sha512-84I2iJM/n1d4Hdgc6y2+qY5mDaz2PUVjlg9znE9byl+q0uC3DeByqBGReQu5tpLK0TAqTIXScRUV+dg7+bUPpQ== - dependencies: - eventemitter3 "^4.0.0" - follow-redirects "^1.0.0" - requires-port "^1.0.0" - http-signature@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" @@ -7796,11 +7158,6 @@ http-signature@~1.2.0: jsprim "^1.2.2" sshpk "^1.7.0" -https-browserify@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" - integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM= - https-proxy-agent@4.0.0, https-proxy-agent@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-4.0.0.tgz#702b71fb5520a132a66de1f67541d9e62154d82b" @@ -7994,11 +7351,6 @@ indexes-of@^1.0.1: resolved "https://registry.yarnpkg.com/indexes-of/-/indexes-of-1.0.1.tgz#f30f716c8e2bd346c7b67d3df3915566a7c05607" integrity sha1-8w9xbI4r00bHtn0985FVZqfAVgc= -indexof@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d" - integrity sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10= - infer-owner@^1.0.3, infer-owner@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/infer-owner/-/infer-owner-1.0.4.tgz#c4cefcaa8e51051c2a40ba2ce8a3d27295af9467" @@ -8012,16 +7364,11 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@2.0.4, inherits@^2.0.0, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.1, inherits@~2.0.3: +inherits@2, inherits@2.0.4, inherits@^2.0.0, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== -inherits@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" - integrity sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE= - inherits@2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" @@ -8617,18 +7964,6 @@ isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= -isarray@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.1.tgz#a37d94ed9cda2d59865c9f76fe596ee1f338741e" - integrity sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4= - -isbinaryfile@^3.0.0: - version "3.0.3" - resolved "https://registry.yarnpkg.com/isbinaryfile/-/isbinaryfile-3.0.3.tgz#5d6def3edebf6e8ca8cae9c30183a804b5f8be80" - integrity sha512-8cJBL5tTd2OS0dM4jz07wQd5g0dCCqIhUxPIGtZfa5L6hWlvV5MHTITy/DBAsF+Oe2LS1X3krBUhNwaGUWpWxw== - dependencies: - buffer-alloc "^1.2.0" - isbinaryfile@^4.0.0: version "4.0.6" resolved "https://registry.yarnpkg.com/isbinaryfile/-/isbinaryfile-4.0.6.tgz#edcb62b224e2b4710830b67498c8e4e5a4d2610b" @@ -8955,7 +8290,7 @@ json-buffer@3.0.0: resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898" integrity sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg= -json-parse-better-errors@^1.0.0, json-parse-better-errors@^1.0.1, json-parse-better-errors@^1.0.2: +json-parse-better-errors@^1.0.0, json-parse-better-errors@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== @@ -9048,64 +8383,6 @@ jsx-ast-utils@^2.2.1, jsx-ast-utils@^2.2.3: array-includes "^3.0.3" object.assign "^4.1.0" -karma-chrome-launcher@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/karma-chrome-launcher/-/karma-chrome-launcher-3.1.0.tgz#805a586799a4d05f4e54f72a204979f3f3066738" - integrity sha512-3dPs/n7vgz1rxxtynpzZTvb9y/GIaW8xjAwcIGttLbycqoFtI7yo1NGnQi6oFTherRE+GIhCAHZC4vEqWGhNvg== - dependencies: - which "^1.2.1" - -karma-mocha@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/karma-mocha/-/karma-mocha-1.3.0.tgz#eeaac7ffc0e201eb63c467440d2b69c7cf3778bf" - integrity sha1-7qrH/8DiAetjxGdEDStpx883eL8= - dependencies: - minimist "1.2.0" - -karma-webpack@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/karma-webpack/-/karma-webpack-4.0.2.tgz#23219bd95bdda853e3073d3874d34447c77bced0" - integrity sha512-970/okAsdUOmiMOCY8sb17A2I8neS25Ad9uhyK3GHgmRSIFJbDcNEFE8dqqUhNe9OHiCC9k3DMrSmtd/0ymP1A== - dependencies: - clone-deep "^4.0.1" - loader-utils "^1.1.0" - neo-async "^2.6.1" - schema-utils "^1.0.0" - source-map "^0.7.3" - webpack-dev-middleware "^3.7.0" - -karma@^4.0.1: - version "4.4.1" - resolved "https://registry.yarnpkg.com/karma/-/karma-4.4.1.tgz#6d9aaab037a31136dc074002620ee11e8c2e32ab" - integrity sha512-L5SIaXEYqzrh6b1wqYC42tNsFMx2PWuxky84pK9coK09MvmL7mxii3G3bZBh/0rvD27lqDd0le9jyhzvwif73A== - dependencies: - bluebird "^3.3.0" - body-parser "^1.16.1" - braces "^3.0.2" - chokidar "^3.0.0" - colors "^1.1.0" - connect "^3.6.0" - di "^0.0.1" - dom-serialize "^2.2.0" - flatted "^2.0.0" - glob "^7.1.1" - graceful-fs "^4.1.2" - http-proxy "^1.13.0" - isbinaryfile "^3.0.0" - lodash "^4.17.14" - log4js "^4.0.0" - mime "^2.3.1" - minimatch "^3.0.2" - optimist "^0.6.1" - qjobs "^1.1.4" - range-parser "^1.2.0" - rimraf "^2.6.0" - safe-buffer "^5.0.1" - socket.io "2.1.1" - source-map "^0.6.1" - tmp "0.0.33" - useragent "2.3.0" - keyv@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/keyv/-/keyv-3.0.0.tgz#44923ba39e68b12a7cec7df6c3268c031f2ef373" @@ -9274,11 +8551,6 @@ load-json-file@^5.3.0: strip-bom "^3.0.0" type-fest "^0.3.0" -loader-runner@^2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.4.0.tgz#ed47066bfe534d7e84c4c7b9998c2a75607d9357" - integrity sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw== - loader-utils@1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.2.3.tgz#1ff5dc6911c9f0a062531a4c04b609406108c2c7" @@ -9288,15 +8560,6 @@ loader-utils@1.2.3: emojis-list "^2.0.0" json5 "^1.0.1" -loader-utils@^1.1.0, loader-utils@^1.2.3, loader-utils@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.4.0.tgz#c579b5e34cb34b1a74edc6c1fb36bfa371d5a613" - integrity sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA== - dependencies: - big.js "^5.2.2" - emojis-list "^3.0.0" - json5 "^1.0.1" - locate-path@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" @@ -9491,17 +8754,6 @@ log-symbols@^2.2.0: dependencies: chalk "^2.0.1" -log4js@^4.0.0: - version "4.5.1" - resolved "https://registry.yarnpkg.com/log4js/-/log4js-4.5.1.tgz#e543625e97d9e6f3e6e7c9fc196dd6ab2cae30b5" - integrity sha512-EEEgFcE9bLgaYUKuozyFfytQM2wDHtXn4tAN41pkaxpNjAykv11GVdeI4tHtmPWW4Xrgh9R/2d7XYghDVjbKKw== - dependencies: - date-format "^2.0.0" - debug "^4.1.1" - flatted "^2.0.0" - rfdc "^1.1.4" - streamroller "^1.0.6" - logalot@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/logalot/-/logalot-2.1.0.tgz#5f8e8c90d304edf12530951a5554abb8c5e3f552" @@ -9566,7 +8818,7 @@ lpad-align@^1.0.1: longest "^1.0.0" meow "^3.3.0" -lru-cache@4.1.x, lru-cache@^4.0.1: +lru-cache@^4.0.1: version "4.1.5" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g== @@ -9699,15 +8951,6 @@ md5-file@^4.0.0: resolved "https://registry.yarnpkg.com/md5-file/-/md5-file-4.0.0.tgz#f3f7ba1e2dd1144d5bf1de698d0e5f44a4409584" integrity sha512-UC0qFwyAjn4YdPpKaDNw6gNxRf7Mcx7jC1UGCY4boCzgvU2Aoc1mOGzTtrjjLKhM5ivsnhoKpQVxKPp+1j1qwg== -md5.js@^1.3.4: - version "1.3.5" - resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" - integrity sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg== - dependencies: - hash-base "^3.0.0" - inherits "^2.0.1" - safe-buffer "^5.1.2" - mdn-data@2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-2.0.4.tgz#699b3c38ac6f1d728091a64650b65d388502fd5b" @@ -9732,22 +8975,6 @@ mem@^4.0.0: mimic-fn "^2.0.0" p-is-promise "^2.0.0" -memory-fs@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552" - integrity sha1-OpoguEYlI+RHz7x+i7gO1me/xVI= - dependencies: - errno "^0.1.3" - readable-stream "^2.0.1" - -memory-fs@^0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.5.0.tgz#324c01288b88652966d161db77838720845a8e3c" - integrity sha512-jA0rdU5KoQMC0e6ppoNRtpp6vjFq6+NY7r8hywnC7V+1Xj/MtHwGIbB1QaK/dunyjWteJzmkpd7ooeWg10T7GA== - dependencies: - errno "^0.1.3" - readable-stream "^2.0.1" - memory-pager@^1.0.2: version "1.5.0" resolved "https://registry.yarnpkg.com/memory-pager/-/memory-pager-1.5.0.tgz#d8751655d22d384682741c972f2c3d6dfa3e66b5" @@ -10079,14 +9306,6 @@ micromatch@^4.0.2: braces "^3.0.1" picomatch "^2.0.5" -miller-rabin@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" - integrity sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA== - dependencies: - bn.js "^4.0.0" - brorand "^1.0.1" - mime-db@1.43.0, "mime-db@>= 1.43.0 < 2", mime-db@^1.28.0: version "1.43.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.43.0.tgz#0a12e0502650e473d735535050e7c8f4eb4fae58" @@ -10116,7 +9335,7 @@ mime@1.6.0: resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== -mime@^2.3.1, mime@^2.4.1, mime@^2.4.4: +mime@^2.4.1: version "2.4.4" resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.4.tgz#bd7b91135fc6b01cde3e9bae33d659b63d8857e5" integrity sha512-LRxmNwziLPT828z+4YkNzloCFC2YM4wrB99k+AV5ZbEyfGNWfG8SO1FUXLmLDBSo89NrJZ4DIWeLjy1CHGhMGA== @@ -10136,17 +9355,7 @@ mimic-response@^1.0.0: resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b" integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ== -minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" - integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== - -minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" - integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= - -minimatch@3.0.4, minimatch@^3.0.2, minimatch@^3.0.4, minimatch@~3.0.2: +minimatch@3.0.4, minimatch@^3.0.4, minimatch@~3.0.2: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== @@ -10171,11 +9380,6 @@ minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0, minimist@^1.2.5: resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== -minimist@~0.0.1: - version "0.0.10" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" - integrity sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8= - minipass@^2.3.5, minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0: version "2.9.0" resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6" @@ -10222,7 +9426,7 @@ mkdirp-promise@^5.0.1: dependencies: mkdirp "*" -mkdirp@*, mkdirp@0.5.3, mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@^0.5.3, mkdirp@~0.5.1: +mkdirp@*, mkdirp@0.5.3, mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.1: version "0.5.3" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.3.tgz#5a514b7179259287952881e94410ec5465659f8c" integrity sha512-P+2gwrFqx8lhew375MQHHeTlY8AuOJSrGf0R5ddkEndUkmwpgUob/vQuBD1V22/Cw1/lJr4x+EjllSezBThzBg== @@ -10427,7 +9631,7 @@ negotiator@0.6.2: resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw== -neo-async@^2.5.0, neo-async@^2.6.0, neo-async@^2.6.1: +neo-async@^2.6.0: version "2.6.1" resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.1.tgz#ac27ada66167fa8849a6addd837f6b189ad2081c" integrity sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw== @@ -10507,35 +9711,6 @@ node-int64@^0.4.0: resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" integrity sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs= -node-libs-browser@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.2.1.tgz#b64f513d18338625f90346d27b0d235e631f6425" - integrity sha512-h/zcD8H9kaDZ9ALUWwlBUDo6TKF8a7qBSCSEGfjTVIYeqsioSKaAX+BN7NgiMGp6iSIXZ3PxgCu8KS3b71YK5Q== - dependencies: - assert "^1.1.1" - browserify-zlib "^0.2.0" - buffer "^4.3.0" - console-browserify "^1.1.0" - constants-browserify "^1.0.0" - crypto-browserify "^3.11.0" - domain-browser "^1.1.1" - events "^3.0.0" - https-browserify "^1.0.0" - os-browserify "^0.3.0" - path-browserify "0.0.1" - process "^0.11.10" - punycode "^1.2.4" - querystring-es3 "^0.2.0" - readable-stream "^2.3.3" - stream-browserify "^2.0.1" - stream-http "^2.7.2" - string_decoder "^1.0.0" - timers-browserify "^2.0.4" - tty-browserify "0.0.0" - url "^0.11.0" - util "^0.11.0" - vm-browserify "^1.0.1" - node-modules-regexp@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz#8d9dbe28964a4ac5712e9131642107c71e90ec40" @@ -10739,11 +9914,6 @@ object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= -object-component@0.0.3: - version "0.0.3" - resolved "https://registry.yarnpkg.com/object-component/-/object-component-0.0.3.tgz#f0c69aa50efc95b866c186f400a33769cb2f1291" - integrity sha1-8MaapQ78lbhmwYb0AKM3acsvEpE= - object-copy@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" @@ -10895,14 +10065,6 @@ opn@4.0.2: object-assign "^4.0.1" pinkie-promise "^2.0.0" -optimist@^0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" - integrity sha1-2j6nRob6IaGaERwybpDrFaAZZoY= - dependencies: - minimist "~0.0.1" - wordwrap "~0.0.2" - optionator@^0.8.1, optionator@^0.8.3: version "0.8.3" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" @@ -10948,11 +10110,6 @@ original@^1.0.0: dependencies: url-parse "^1.4.3" -os-browserify@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27" - integrity sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc= - os-filter-obj@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/os-filter-obj/-/os-filter-obj-2.0.0.tgz#1c0b62d5f3a2442749a2d139e6dddee6e81d8d16" @@ -11144,11 +10301,6 @@ p-waterfall@^1.0.0: dependencies: p-reduce "^1.0.0" -pako@~1.0.5: - version "1.0.11" - resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.11.tgz#6c9599d340d54dfd3946380252a35705a6b992bf" - integrity sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw== - parallel-transform@^1.1.0: version "1.2.0" resolved "https://registry.yarnpkg.com/parallel-transform/-/parallel-transform-1.2.0.tgz#9049ca37d6cb2182c3b1d2c720be94d14a5814fc" @@ -11165,18 +10317,6 @@ parent-module@^1.0.0: dependencies: callsites "^3.0.0" -parse-asn1@^5.0.0: - version "5.1.5" - resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.5.tgz#003271343da58dc94cace494faef3d2147ecea0e" - integrity sha512-jkMYn1dcJqF6d5CpU689bq7w/b5ALS9ROVSpQDPrZsqqesUJii9qutvoT5ltGedNXMO2e16YUWIghG9KxaViTQ== - dependencies: - asn1.js "^4.0.0" - browserify-aes "^1.0.0" - create-hash "^1.1.0" - evp_bytestokey "^1.0.0" - pbkdf2 "^3.0.3" - safe-buffer "^5.1.1" - parse-entities@^1.1.0: version "1.2.2" resolved "https://registry.yarnpkg.com/parse-entities/-/parse-entities-1.2.2.tgz#c31bf0f653b6661354f8973559cb86dd1d5edf50" @@ -11259,20 +10399,6 @@ parse5@^4.0.0: resolved "https://registry.yarnpkg.com/parse5/-/parse5-4.0.0.tgz#6d78656e3da8d78b4ec0b906f7c08ef1dfe3f608" integrity sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA== -parseqs@0.0.5: - version "0.0.5" - resolved "https://registry.yarnpkg.com/parseqs/-/parseqs-0.0.5.tgz#d5208a3738e46766e291ba2ea173684921a8b89d" - integrity sha1-1SCKNzjkZ2bikbouoXNoSSGouJ0= - dependencies: - better-assert "~1.0.0" - -parseuri@0.0.5: - version "0.0.5" - resolved "https://registry.yarnpkg.com/parseuri/-/parseuri-0.0.5.tgz#80204a50d4dbb779bfdc6ebe2778d90e4bce320a" - integrity sha1-gCBKUNTbt3m/3G6+J3jZDkvOMgo= - dependencies: - better-assert "~1.0.0" - parseurl@~1.3.3: version "1.3.3" resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" @@ -11283,11 +10409,6 @@ pascalcase@^0.1.1: resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= -path-browserify@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.1.tgz#e6c4ddd7ed3aa27c68a20cc4e50e1a4ee83bbc4a" - integrity sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ== - path-dirname@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" @@ -11363,17 +10484,6 @@ path-type@^4.0.0: resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== -pbkdf2@^3.0.3: - version "3.0.17" - resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.17.tgz#976c206530617b14ebb32114239f7b09336e93a6" - integrity sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA== - dependencies: - create-hash "^1.1.2" - create-hmac "^1.1.4" - ripemd160 "^2.0.1" - safe-buffer "^5.0.1" - sha.js "^2.4.8" - pend@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" @@ -11838,11 +10948,6 @@ process-nextick-args@~2.0.0: resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== -process@^0.11.10: - version "0.11.10" - resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" - integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI= - progress@^2.0.0: version "2.0.3" resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" @@ -11948,18 +11053,6 @@ psl@^1.1.28: resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24" integrity sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ== -public-encrypt@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.3.tgz#4fcc9d77a07e48ba7527e7cbe0de33d0701331e0" - integrity sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q== - dependencies: - bn.js "^4.1.0" - browserify-rsa "^4.0.0" - create-hash "^1.1.0" - parse-asn1 "^5.0.0" - randombytes "^2.0.1" - safe-buffer "^5.1.2" - pump@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/pump/-/pump-2.0.1.tgz#12399add6e4cf7526d973cbc8b5ce2e2908b3909" @@ -11985,16 +11078,6 @@ pumpify@^1.3.3: inherits "^2.0.3" pump "^2.0.0" -punycode@1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" - integrity sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0= - -punycode@^1.2.4: - version "1.4.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" - integrity sha1-wNWmOycYgArY4esPpSachN1BhF4= - punycode@^2.1.0, punycode@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" @@ -12010,11 +11093,6 @@ q@^1.1.2, q@^1.5.1: resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" integrity sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc= -qjobs@^1.1.4: - version "1.2.0" - resolved "https://registry.yarnpkg.com/qjobs/-/qjobs-1.2.0.tgz#c45e9c61800bd087ef88d7e256423bdd49e5d071" - integrity sha512-8YOJEHtxpySA3fFDyCRxA+UUV+fA+rTWnuWvylOK/NCjhY+b4ocCtmu8TtsWb+mYeU+GCHf/S66KZF/AsteKHg== - qs@6.7.0: version "6.7.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc" @@ -12039,16 +11117,6 @@ query-string@^5.0.1: object-assign "^4.1.0" strict-uri-encode "^1.0.0" -querystring-es3@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" - integrity sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM= - -querystring@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" - integrity sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA= - querystringify@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.1.1.tgz#60e5a5fd64a7f8bfa4d2ab2ed6fdf4c85bad154e" @@ -12088,22 +11156,7 @@ randomatic@^3.0.0: kind-of "^6.0.0" math-random "^1.0.1" -randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5: - version "2.1.0" - resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" - integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== - dependencies: - safe-buffer "^5.1.0" - -randomfill@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/randomfill/-/randomfill-1.0.4.tgz#c92196fc86ab42be983f1bf31778224931d61458" - integrity sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw== - dependencies: - randombytes "^2.0.5" - safe-buffer "^5.1.0" - -range-parser@^1.2.0, range-parser@^1.2.1, range-parser@~1.2.1: +range-parser@~1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== @@ -12351,7 +11404,7 @@ read@1, read@~1.0.1: dependencies: mute-stream "~0.0.4" -"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.0, readable-stream@^2.3.3, readable-stream@^2.3.5, readable-stream@^2.3.6, readable-stream@~2.3.6: +"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.0, readable-stream@^2.3.5, readable-stream@^2.3.6, readable-stream@~2.3.6: version "2.3.7" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== @@ -12754,11 +11807,6 @@ reusify@^1.0.4: resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== -rfdc@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.1.4.tgz#ba72cc1367a0ccd9cf81a870b3b58bd3ad07f8c2" - integrity sha512-5C9HXdzK8EAqN7JDif30jqsBzavB7wLpaubisuQIGHWf2gUXSpzy6ArX/+Da8RjFpagWsCn+pIgxTMAmKw9Zug== - rgb-regex@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/rgb-regex/-/rgb-regex-1.0.1.tgz#c0e0d6882df0e23be254a475e8edd41915feaeb1" @@ -12776,7 +11824,7 @@ rimraf@2.6.3: dependencies: glob "^7.1.3" -rimraf@^2.5.4, rimraf@^2.6.0, rimraf@^2.6.2, rimraf@^2.6.3: +rimraf@^2.5.4, rimraf@^2.6.2, rimraf@^2.6.3: version "2.7.1" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== @@ -12795,14 +11843,6 @@ rimraf@~2.2.6: resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.2.8.tgz#e439be2aaee327321952730f99a8929e4fc50582" integrity sha1-5Dm+Kq7jJzIZUnMPmaiSnk/FBYI= -ripemd160@^2.0.0, ripemd160@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" - integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== - dependencies: - hash-base "^3.0.0" - inherits "^2.0.1" - rst-selector-parser@^2.2.3: version "2.2.3" resolved "https://registry.yarnpkg.com/rst-selector-parser/-/rst-selector-parser-2.2.3.tgz#81b230ea2fcc6066c89e3472de794285d9b03d91" @@ -12871,7 +11911,7 @@ safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== -safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: +safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.0.tgz#b74daec49b1148f88c64b68d49b1e815c1f2f519" integrity sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg== @@ -12935,23 +11975,6 @@ scheduler@0.17.0, scheduler@^0.17.0: loose-envify "^1.1.0" object-assign "^4.1.1" -schema-utils@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-1.0.0.tgz#0b79a93204d7b600d4b2850d1f66c2a34951c770" - integrity sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g== - dependencies: - ajv "^6.1.0" - ajv-errors "^1.0.0" - ajv-keywords "^3.1.0" - -schema-utils@^2.6.5: - version "2.6.5" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.6.5.tgz#c758f0a7e624263073d396e29cd40aa101152d8a" - integrity sha512-5KXuwKziQrTVHh8j/Uxz+QUbxkaLW9X/86NBlx/gnKgtsZA2GIVMUn17qWhRFwF8jdYb3Dig5hRO/W5mZqy6SQ== - dependencies: - ajv "^6.12.0" - ajv-keywords "^3.4.1" - seek-bzip@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/seek-bzip/-/seek-bzip-1.0.5.tgz#cfe917cb3d274bcffac792758af53173eb1fabdc" @@ -13015,11 +12038,6 @@ serialize-error@^2.1.0: resolved "https://registry.yarnpkg.com/serialize-error/-/serialize-error-2.1.0.tgz#50b679d5635cdf84667bdc8e59af4e5b81d5f60a" integrity sha1-ULZ51WNc34Rme9yOWa9OW4HV9go= -serialize-javascript@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-2.1.2.tgz#ecec53b0e0317bdc95ef76ab7074b7384785fa61" - integrity sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ== - serve-static@1.14.1, serve-static@^1.13.1: version "1.14.1" resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.14.1.tgz#666e636dc4f010f7ef29970a88a674320898b2f9" @@ -13060,7 +12078,7 @@ setimmediate-napi@^1.0.3: get-symbol-from-current-process-h "^1.0.1" get-uv-event-loop-napi-h "^1.0.5" -setimmediate@^1.0.4, setimmediate@^1.0.5: +setimmediate@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" integrity sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU= @@ -13070,14 +12088,6 @@ setprototypeof@1.1.1: resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.1.tgz#7e95acb24aa92f5885e0abef5ba131330d4ae683" integrity sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw== -sha.js@^2.4.0, sha.js@^2.4.8: - version "2.4.11" - resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" - integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - shallow-clone@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/shallow-clone/-/shallow-clone-3.0.1.tgz#8f2981ad92531f55035b01fb230769a40e02efa3" @@ -13246,52 +12256,6 @@ snapdragon@^0.8.1: source-map-resolve "^0.5.0" use "^3.1.0" -socket.io-adapter@~1.1.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/socket.io-adapter/-/socket.io-adapter-1.1.2.tgz#ab3f0d6f66b8fc7fca3959ab5991f82221789be9" - integrity sha512-WzZRUj1kUjrTIrUKpZLEzFZ1OLj5FwLlAFQs9kuZJzJi5DKdU7FsWc36SNmA8iDOtwBQyT8FkrriRM8vXLYz8g== - -socket.io-client@2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/socket.io-client/-/socket.io-client-2.1.1.tgz#dcb38103436ab4578ddb026638ae2f21b623671f" - integrity sha512-jxnFyhAuFxYfjqIgduQlhzqTcOEQSn+OHKVfAxWaNWa7ecP7xSNk2Dx/3UEsDcY7NcFafxvNvKPmmO7HTwTxGQ== - dependencies: - backo2 "1.0.2" - base64-arraybuffer "0.1.5" - component-bind "1.0.0" - component-emitter "1.2.1" - debug "~3.1.0" - engine.io-client "~3.2.0" - has-binary2 "~1.0.2" - has-cors "1.1.0" - indexof "0.0.1" - object-component "0.0.3" - parseqs "0.0.5" - parseuri "0.0.5" - socket.io-parser "~3.2.0" - to-array "0.1.4" - -socket.io-parser@~3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-3.2.0.tgz#e7c6228b6aa1f814e6148aea325b51aa9499e077" - integrity sha512-FYiBx7rc/KORMJlgsXysflWx/RIvtqZbyGLlHZvjfmPTPeuD/I8MaW7cfFrj5tRltICJdgwflhfZ3NVVbVLFQA== - dependencies: - component-emitter "1.2.1" - debug "~3.1.0" - isarray "2.0.1" - -socket.io@2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/socket.io/-/socket.io-2.1.1.tgz#a069c5feabee3e6b214a75b40ce0652e1cfb9980" - integrity sha512-rORqq9c+7W0DAK3cleWNSyfv/qKXV99hV4tZe+gGLfBECw3XEhBy7x85F3wypA9688LKjtwO9pX9L33/xQI8yA== - dependencies: - debug "~3.1.0" - engine.io "~3.2.0" - has-binary2 "~1.0.2" - socket.io-adapter "~1.1.0" - socket.io-client "2.1.1" - socket.io-parser "~3.2.0" - sockjs-client@1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/sockjs-client/-/sockjs-client-1.4.0.tgz#c9f2568e19c8fd8173b4997ea3420e0bb306c7d5" @@ -13341,11 +12305,6 @@ sort-keys@^2.0.0: dependencies: is-plain-obj "^1.0.0" -source-list-map@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34" - integrity sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw== - source-map-resolve@^0.5.0: version "0.5.3" resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a" @@ -13357,7 +12316,7 @@ source-map-resolve@^0.5.0: source-map-url "^0.4.0" urix "^0.1.0" -source-map-support@^0.5.16, source-map-support@~0.5.12: +source-map-support@^0.5.16: version "0.5.16" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.16.tgz#0ae069e7fe3ba7538c64c98515e35339eac5a042" integrity sha512-efyLRJDr68D9hBBNIPWFjhpFzURh+KJykQwvMyW5UiZzYwoF6l4YMMDIJJEyFWxWCqfyxLzz6tSfUFR+kXXsVQ== @@ -13523,14 +12482,6 @@ stealthy-require@^1.1.1: resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b" integrity sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks= -stream-browserify@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.2.tgz#87521d38a44aa7ee91ce1cd2a47df0cb49dd660b" - integrity sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg== - dependencies: - inherits "~2.0.1" - readable-stream "^2.0.2" - stream-buffers@~2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/stream-buffers/-/stream-buffers-2.2.0.tgz#91d5f5130d1cef96dcfa7f726945188741d09ee4" @@ -13551,33 +12502,11 @@ stream-events@^1.0.5: dependencies: stubs "^3.0.0" -stream-http@^2.7.2: - version "2.8.3" - resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.8.3.tgz#b2d242469288a5a27ec4fe8933acf623de6514fc" - integrity sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw== - dependencies: - builtin-status-codes "^3.0.0" - inherits "^2.0.1" - readable-stream "^2.3.6" - to-arraybuffer "^1.0.0" - xtend "^4.0.0" - stream-shift@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.1.tgz#d7088281559ab2778424279b0877da3c392d5a3d" integrity sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ== -streamroller@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/streamroller/-/streamroller-1.0.6.tgz#8167d8496ed9f19f05ee4b158d9611321b8cacd9" - integrity sha512-3QC47Mhv3/aZNFpDDVO44qQb9gwB9QggMEE0sQmkTAwBVYdBRWISdsywlkfm5II1Q5y/pmrHflti/IgmIzdDBg== - dependencies: - async "^2.6.2" - date-format "^2.0.0" - debug "^3.2.6" - fs-extra "^7.0.1" - lodash "^4.17.14" - strict-uri-encode@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" @@ -13691,7 +12620,7 @@ string_decoder@0.10: resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" integrity sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ= -string_decoder@^1.0.0, string_decoder@^1.1.1: +string_decoder@^1.1.1: version "1.3.0" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== @@ -13909,7 +12838,7 @@ table@^5.2.3: slice-ansi "^2.1.0" string-width "^3.0.0" -tapable@^1.0.0, tapable@^1.1.3: +tapable@^1.0.0: version "1.1.3" resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== @@ -14009,30 +12938,6 @@ terminal-link@^2.0.0: ansi-escapes "^4.2.1" supports-hyperlinks "^2.0.0" -terser-webpack-plugin@^1.4.3: - version "1.4.3" - resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-1.4.3.tgz#5ecaf2dbdc5fb99745fd06791f46fc9ddb1c9a7c" - integrity sha512-QMxecFz/gHQwteWwSo5nTc6UaICqN1bMedC5sMtUc7y3Ha3Q8y6ZO0iCR8pq4RJC8Hjf0FEPEHZqcMB/+DFCrA== - dependencies: - cacache "^12.0.2" - find-cache-dir "^2.1.0" - is-wsl "^1.1.0" - schema-utils "^1.0.0" - serialize-javascript "^2.1.2" - source-map "^0.6.1" - terser "^4.1.2" - webpack-sources "^1.4.0" - worker-farm "^1.7.0" - -terser@^4.1.2: - version "4.6.11" - resolved "https://registry.yarnpkg.com/terser/-/terser-4.6.11.tgz#12ff99fdd62a26de2a82f508515407eb6ccd8a9f" - integrity sha512-76Ynm7OXUG5xhOpblhytE7X58oeNSmC8xnNhjWVo8CksHit0U0kO4hfNbPrrYwowLWFgM2n9L176VNx2QaHmtA== - dependencies: - commander "^2.20.0" - source-map "~0.6.1" - source-map-support "~0.5.12" - test-exclude@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" @@ -14106,13 +13011,6 @@ timed-out@^4.0.0, timed-out@^4.0.1: resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f" integrity sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8= -timers-browserify@^2.0.4: - version "2.0.11" - resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.11.tgz#800b1f3eee272e5bc53ee465a04d0e804c31211f" - integrity sha512-60aV6sgJ5YEbzUdn9c8kYGIqOubPoUdqQCul3SBAsRCZ40s6Y5cMcrW4dt3/k/EsbLVJNl9n6Vz3fTc+k2GeKQ== - dependencies: - setimmediate "^1.0.4" - timsort@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/timsort/-/timsort-0.3.0.tgz#405411a8e7e6339fe64db9a234de11dc31e02bd4" @@ -14135,7 +13033,7 @@ tiny-lr@^1.1.1: object-assign "^4.1.0" qs "^6.4.0" -tmp@0.0.33, tmp@0.0.x, tmp@^0.0.33: +tmp@^0.0.33: version "0.0.33" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== @@ -14154,16 +13052,6 @@ tmpl@1.0.x: resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1" integrity sha1-I2QN17QtAEM5ERQIIOXPRA5SHdE= -to-array@0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/to-array/-/to-array-0.1.4.tgz#17e6c11f73dd4f3d74cda7a4ff3238e9ad9bf890" - integrity sha1-F+bBH3PdTz10zaek/zI46a2b+JA= - -to-arraybuffer@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43" - integrity sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M= - to-buffer@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/to-buffer/-/to-buffer-1.1.1.tgz#493bd48f62d7c43fcded313a03dcadb2e1213a80" @@ -14304,11 +13192,6 @@ tsutils@^3.17.1: dependencies: tslib "^1.8.1" -tty-browserify@0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" - integrity sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY= - tunnel-agent@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" @@ -14414,11 +13297,6 @@ ultron@1.0.x: resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.0.2.tgz#ace116ab557cd197386a4e88f4685378c8b2e4fa" integrity sha1-rOEWq1V80Zc4ak6I9GhTeMiy5Po= -ultron@~1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.1.1.tgz#9fe1536a10a664a65266a1e3ccf85fd36302bc9c" - integrity sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og== - umask@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/umask/-/umask-1.1.0.tgz#f29cebf01df517912bb58ff9c4e50fde8e33320d" @@ -14628,14 +13506,6 @@ url-to-options@^1.0.1: resolved "https://registry.yarnpkg.com/url-to-options/-/url-to-options-1.0.1.tgz#1505a03a289a48cbd7a434efbaeec5055f5633a9" integrity sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k= -url@^0.11.0: - version "0.11.0" - resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" - integrity sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE= - dependencies: - punycode "1.3.2" - querystring "0.2.0" - urlgrey@0.4.4: version "0.4.4" resolved "https://registry.yarnpkg.com/urlgrey/-/urlgrey-0.4.4.tgz#892fe95960805e85519f1cd4389f2cb4cbb7652f" @@ -14653,14 +13523,6 @@ use@^3.1.0: resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== -useragent@2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/useragent/-/useragent-2.3.0.tgz#217f943ad540cb2128658ab23fc960f6a88c9972" - integrity sha512-4AoH4pxuSvHCjqLO04sU6U/uE65BYza8l/KKBS0b0hnUPWi+cQ2BpeTEwejCSx9SPV5/U03nniDTrWx5NrmKdw== - dependencies: - lru-cache "4.1.x" - tmp "0.0.x" - util-deprecate@^1.0.1, util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" @@ -14683,20 +13545,6 @@ util.promisify@~1.0.0: has-symbols "^1.0.1" object.getownpropertydescriptors "^2.1.0" -util@0.10.3: - version "0.10.3" - resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" - integrity sha1-evsa/lCAUkZInj23/g7TeTNqwPk= - dependencies: - inherits "2.0.1" - -util@^0.11.0: - version "0.11.1" - resolved "https://registry.yarnpkg.com/util/-/util-0.11.1.tgz#3236733720ec64bb27f6e26f421aaa2e1b588d61" - integrity sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ== - dependencies: - inherits "2.0.3" - utils-merge@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" @@ -14782,16 +13630,6 @@ vlq@^1.0.0: resolved "https://registry.yarnpkg.com/vlq/-/vlq-1.0.1.tgz#c003f6e7c0b4c1edd623fd6ee50bbc0d6a1de468" integrity sha512-gQpnTgkubC6hQgdIcRdYGDSDc+SaujOdyesZQMv6JlfQee/9Mp0Qhnys6WxDWvQnL5WZdT7o2Ul187aSt0Rq+w== -vm-browserify@^1.0.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0" - integrity sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ== - -void-elements@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/void-elements/-/void-elements-2.0.1.tgz#c066afb582bb1cb4128d60ea92392e94d5e9dbec" - integrity sha1-wGavtYK7HLQSjWDqkjkulNXp2+w= - w3c-hr-time@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz#0a89cdf5cc15822df9c360543676963e0cc308cd" @@ -14820,15 +13658,6 @@ walker@^1.0.7, walker@~1.0.5: dependencies: makeerror "1.0.x" -watchpack@^1.6.0: - version "1.6.1" - resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.6.1.tgz#280da0a8718592174010c078c7585a74cd8cd0e2" - integrity sha512-+IF9hfUFOrYOOaKyfaI7h7dquUIOgyEMoQMLA7OP5FxegKA2+XdXThAZ9TU2kucfhDH7rfMHs1oPYziVGWRnZA== - dependencies: - chokidar "^2.1.8" - graceful-fs "^4.1.2" - neo-async "^2.5.0" - wcwidth@^1.0.0, wcwidth@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8" @@ -14850,62 +13679,6 @@ webidl-conversions@^4.0.2: resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg== -webpack-dev-middleware@^3.7.0: - version "3.7.2" - resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-3.7.2.tgz#0019c3db716e3fa5cecbf64f2ab88a74bab331f3" - integrity sha512-1xC42LxbYoqLNAhV6YzTYacicgMZQTqRd27Sim9wn5hJrX3I5nxYy1SxSd4+gjUFsz1dQFj+yEe6zEVmSkeJjw== - dependencies: - memory-fs "^0.4.1" - mime "^2.4.4" - mkdirp "^0.5.1" - range-parser "^1.2.1" - webpack-log "^2.0.0" - -webpack-log@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/webpack-log/-/webpack-log-2.0.0.tgz#5b7928e0637593f119d32f6227c1e0ac31e1b47f" - integrity sha512-cX8G2vR/85UYG59FgkoMamwHUIkSSlV3bBMRsbxVXVUk2j6NleCKjQ/WE9eYg9WY4w25O9w8wKP4rzNZFmUcUg== - dependencies: - ansi-colors "^3.0.0" - uuid "^3.3.2" - -webpack-sources@^1.4.0, webpack-sources@^1.4.1: - version "1.4.3" - resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.4.3.tgz#eedd8ec0b928fbf1cbfe994e22d2d890f330a933" - integrity sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ== - dependencies: - source-list-map "^2.0.0" - source-map "~0.6.1" - -webpack@^4.28.4: - version "4.42.1" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.42.1.tgz#ae707baf091f5ca3ef9c38b884287cfe8f1983ef" - integrity sha512-SGfYMigqEfdGchGhFFJ9KyRpQKnipvEvjc1TwrXEPCM6H5Wywu10ka8o3KGrMzSMxMQKt8aCHUFh5DaQ9UmyRg== - dependencies: - "@webassemblyjs/ast" "1.9.0" - "@webassemblyjs/helper-module-context" "1.9.0" - "@webassemblyjs/wasm-edit" "1.9.0" - "@webassemblyjs/wasm-parser" "1.9.0" - acorn "^6.2.1" - ajv "^6.10.2" - ajv-keywords "^3.4.1" - chrome-trace-event "^1.0.2" - enhanced-resolve "^4.1.0" - eslint-scope "^4.0.3" - json-parse-better-errors "^1.0.2" - loader-runner "^2.4.0" - loader-utils "^1.2.3" - memory-fs "^0.4.1" - micromatch "^3.1.10" - mkdirp "^0.5.3" - neo-async "^2.6.1" - node-libs-browser "^2.2.1" - schema-utils "^1.0.0" - tapable "^1.1.3" - terser-webpack-plugin "^1.4.3" - watchpack "^1.6.0" - webpack-sources "^1.4.1" - websocket-driver@>=0.5.1: version "0.7.3" resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.3.tgz#a2d4e0d4f4f116f1e6297eba58b05d430100e9f9" @@ -14956,7 +13729,7 @@ which-module@^2.0.0: resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= -which@1.3.1, which@^1.2.1, which@^1.2.9, which@^1.3.1: +which@1.3.1, which@^1.2.9, which@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== @@ -14999,12 +13772,7 @@ wordwrap@^1.0.0: resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus= -wordwrap@~0.0.2: - version "0.0.3" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" - integrity sha1-o9XabNXAvAAI03I0u68b7WMFkQc= - -worker-farm@^1.6.0, worker-farm@^1.7.0: +worker-farm@^1.6.0: version "1.7.0" resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.7.0.tgz#26a94c5391bbca926152002f69b84a4bf772e5a8" integrity sha512-rvw3QTZc8lAxyVrqcSGVm5yP/IJ2UcB3U0graE3LCFoZ0Yn2x4EoVSqJKdB/T5M+FLcRPjz4TDacRf3OCfNUzw== @@ -15129,15 +13897,6 @@ ws@^7, ws@^7.0.0: resolved "https://registry.yarnpkg.com/ws/-/ws-7.2.3.tgz#a5411e1fb04d5ed0efee76d26d5c46d830c39b46" integrity sha512-HTDl9G9hbkNDk98naoR/cHDws7+EyYMOdL1BmjsZXRUjf7d+MficC4B7HLUPlSiho0vg+CWKrGIt/VJBd1xunQ== -ws@~3.3.1: - version "3.3.3" - resolved "https://registry.yarnpkg.com/ws/-/ws-3.3.3.tgz#f1cf84fe2d5e901ebce94efaece785f187a228f2" - integrity sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA== - dependencies: - async-limiter "~1.0.0" - safe-buffer "~5.1.0" - ultron "~1.1.0" - x-is-string@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/x-is-string/-/x-is-string-0.1.0.tgz#474b50865af3a49a9c4657f05acd145458f77d82" @@ -15195,11 +13954,6 @@ xmldom@0.1.x: resolved "https://registry.yarnpkg.com/xmldom/-/xmldom-0.1.31.tgz#b76c9a1bd9f0a9737e5a72dc37231cf38375e2ff" integrity sha512-yS2uJflVQs6n+CyjHoaBmVSqIDevTAWrzMmjG1Gc7h1qQ7uVozNhEPJAwZXWyGQ/Gafo3fCwrcaokezLPupVyQ== -xmlhttprequest-ssl@~1.5.4: - version "1.5.5" - resolved "https://registry.yarnpkg.com/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.5.tgz#c2876b06168aadc40e57d97e81191ac8f4398b3e" - integrity sha1-wodrBhaKrcQOV9l+gRkayPQ5iz4= - xpipe@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/xpipe/-/xpipe-1.0.5.tgz#8dd8bf45fc3f7f55f0e054b878f43a62614dafdf" @@ -15371,11 +14125,6 @@ yauzl@^2.4.2: buffer-crc32 "~0.2.3" fd-slicer "~1.1.0" -yeast@0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/yeast/-/yeast-0.1.2.tgz#008e06d8094320c372dbc2f8ed76a0ca6c8ac419" - integrity sha1-AI4G2AlDIMNy28L47XagymyKxBk= - zone.js@~0.10.2: version "0.10.3" resolved "https://registry.yarnpkg.com/zone.js/-/zone.js-0.10.3.tgz#3e5e4da03c607c9dcd92e37dd35687a14a140c16" From 4087075c88afb70f54732721c94174c75d8dd89f Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Sat, 2 May 2020 10:37:37 +0200 Subject: [PATCH 033/106] chore: remove lingering typesVersion check --- .github/workflows/nodejs.yml | 2 ++ package.json | 1 + scripts/buildTs.js | 4 ---- scripts/verifyOldTs.js | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index e38bbbd905b4..1463d9a82073 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -41,6 +41,8 @@ jobs: run: node scripts/build.js - name: run tsc run: yarn build:ts + - name: verify TypeScript@3.8 compatibility + run: yarn verify-old-ts - name: run eslint run: yarn lint - name: run prettier diff --git a/package.json b/package.json index 9090ef4da801..298d42498e34 100644 --- a/package.json +++ b/package.json @@ -99,6 +99,7 @@ "test-pretty-format-perf": "node packages/pretty-format/perf/test.js", "test-leak": "yarn jest -i --detectLeaks jest-mock jest-diff jest-repl", "test": "yarn lint && yarn jest", + "verify-old-ts": "node ./scripts/verifyOldTs.js", "watch": "yarn build && node ./scripts/watch.js", "watch:ts": "yarn build:ts --watch" }, diff --git a/scripts/buildTs.js b/scripts/buildTs.js index 93af2fefe385..d7112f964800 100644 --- a/scripts/buildTs.js +++ b/scripts/buildTs.js @@ -31,10 +31,6 @@ packagesWithTs.forEach(pkgDir => { const pkg = require(pkgDir + '/package.json'); assert.ok(pkg.types, `Package ${pkg.name} is missing \`types\` field`); - assert.ok( - pkg.typesVersions, - `Package ${pkg.name} is missing \`typesVersions\` field`, - ); assert.equal( pkg.types, diff --git a/scripts/verifyOldTs.js b/scripts/verifyOldTs.js index e1d864cd77ca..47c93fbc8ab4 100644 --- a/scripts/verifyOldTs.js +++ b/scripts/verifyOldTs.js @@ -32,7 +32,7 @@ const cwd = tempy.directory(); try { execa.sync('yarn', ['init', '--yes'], {cwd, stdio: 'inherit'}); - execa.sync('yarn', ['add', 'typescript@~3.4'], {cwd, stdio: 'inherit'}); + execa.sync('yarn', ['add', 'typescript@~3.8'], {cwd, stdio: 'inherit'}); fs.writeFileSync( path.join(cwd, 'tsconfig.json'), JSON.stringify(tsConfig, null, 2), From 295aedce2790ae8b7d5ce01650906796d43d8702 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Sat, 2 May 2020 10:55:36 +0200 Subject: [PATCH 034/106] chore: add missing `throat` dependency --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 298d42498e34..b405696a5139 100644 --- a/package.json +++ b/package.json @@ -74,6 +74,7 @@ "string-length": "^3.1.0", "strip-ansi": "^6.0.0", "tempy": "~0.3.0", + "throat": "^5.0.0", "typescript": "^3.8.2", "which": "^2.0.1" }, From 73acd0840e0c2a474f0b80ce0a0f6f15d8e640b2 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Sat, 2 May 2020 11:03:49 +0200 Subject: [PATCH 035/106] feat(jest-circus): Fail tests if a test takes a done callback and have return values (#9129) --- CHANGELOG.md | 1 + .../asyncAndCallback.test.ts.snap | 53 ++++++++++++++ e2e/__tests__/asyncAndCallback.test.ts | 21 ++++++ .../__tests__/promise-and-callback.test.js | 24 +++++++ e2e/promise-and-callback/package.json | 5 ++ packages/jest-circus/package.json | 2 + packages/jest-circus/src/run.ts | 10 ++- packages/jest-circus/src/utils.ts | 72 +++++++++++++------ 8 files changed, 164 insertions(+), 24 deletions(-) create mode 100644 e2e/__tests__/__snapshots__/asyncAndCallback.test.ts.snap create mode 100644 e2e/__tests__/asyncAndCallback.test.ts create mode 100644 e2e/promise-and-callback/__tests__/promise-and-callback.test.js create mode 100644 e2e/promise-and-callback/package.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 91ec3a7baa3a..cb3d544c312d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ ### Fixes +- `[jest-circus]` [**BREAKING**] Fail tests if a test takes a done callback and have return values ([#9129](https://github.com/facebook/jest/pull/9129)) - `[jest-config, jest-resolve]` [**BREAKING**] Remove support for `browser` field ([#9943](https://github.com/facebook/jest/pull/9943)) ### Chore & Maintenance diff --git a/e2e/__tests__/__snapshots__/asyncAndCallback.test.ts.snap b/e2e/__tests__/__snapshots__/asyncAndCallback.test.ts.snap new file mode 100644 index 000000000000..66a2dc6288c4 --- /dev/null +++ b/e2e/__tests__/__snapshots__/asyncAndCallback.test.ts.snap @@ -0,0 +1,53 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`errors when a test both returns a promise and takes a callback 1`] = ` +FAIL __tests__/promise-and-callback.test.js + ✕ promise-returning test with callback + ✕ async test with callback + ✕ test done before return value + + ● promise-returning test with callback + + Test functions cannot both take a 'done' callback and return something. Either use a 'done' callback, or return a promise. + Returned value: Promise {} + + 8 | 'use strict'; + 9 | + > 10 | it('promise-returning test with callback', done => { + | ^ + 11 | done(); + 12 | + 13 | return Promise.resolve(); + + at Object.it (__tests__/promise-and-callback.test.js:10:1) + + ● async test with callback + + Test functions cannot both take a 'done' callback and return something. Either use a 'done' callback, or return a promise. + Returned value: Promise {} + + 14 | }); + 15 | + > 16 | it('async test with callback', async done => { + | ^ + 17 | done(); + 18 | }); + 19 | + + at Object.it (__tests__/promise-and-callback.test.js:16:1) + + ● test done before return value + + Test functions cannot both take a 'done' callback and return something. Either use a 'done' callback, or return a promise. + Returned value: "foobar" + + 18 | }); + 19 | + > 20 | it('test done before return value', done => { + | ^ + 21 | done(); + 22 | + 23 | return 'foobar'; + + at Object.it (__tests__/promise-and-callback.test.js:20:1) +`; diff --git a/e2e/__tests__/asyncAndCallback.test.ts b/e2e/__tests__/asyncAndCallback.test.ts new file mode 100644 index 000000000000..81112af6ed72 --- /dev/null +++ b/e2e/__tests__/asyncAndCallback.test.ts @@ -0,0 +1,21 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +import {skipSuiteOnJasmine} from '@jest/test-utils'; +import wrap from 'jest-snapshot-serializer-raw'; +import runJest from '../runJest'; +import {extractSummary} from '../Utils'; + +skipSuiteOnJasmine(); + +test('errors when a test both returns a promise and takes a callback', () => { + const result = runJest('promise-and-callback'); + + const {rest} = extractSummary(result.stderr); + expect(wrap(rest)).toMatchSnapshot(); + expect(result.exitCode).toBe(1); +}); diff --git a/e2e/promise-and-callback/__tests__/promise-and-callback.test.js b/e2e/promise-and-callback/__tests__/promise-and-callback.test.js new file mode 100644 index 000000000000..042638c7ebb2 --- /dev/null +++ b/e2e/promise-and-callback/__tests__/promise-and-callback.test.js @@ -0,0 +1,24 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +'use strict'; + +it('promise-returning test with callback', done => { + done(); + + return Promise.resolve(); +}); + +it('async test with callback', async done => { + done(); +}); + +it('test done before return value', done => { + done(); + + return 'foobar'; +}); diff --git a/e2e/promise-and-callback/package.json b/e2e/promise-and-callback/package.json new file mode 100644 index 000000000000..148788b25446 --- /dev/null +++ b/e2e/promise-and-callback/package.json @@ -0,0 +1,5 @@ +{ + "jest": { + "testEnvironment": "node" + } +} diff --git a/packages/jest-circus/package.json b/packages/jest-circus/package.json index 4936defbf169..8298ec8f8646 100644 --- a/packages/jest-circus/package.json +++ b/packages/jest-circus/package.json @@ -16,6 +16,7 @@ "@jest/types": "^25.5.0", "chalk": "^3.0.0", "co": "^4.6.0", + "dedent": "^0.7.0", "expect": "^25.5.0", "is-generator-fn": "^2.0.0", "jest-each": "^25.5.0", @@ -34,6 +35,7 @@ "@jest/test-utils": "^25.5.0", "@types/babel__traverse": "^7.0.4", "@types/co": "^4.6.0", + "@types/dedent": "^0.7.0", "@types/graceful-fs": "^4.1.3", "@types/stack-utils": "^1.0.1", "execa": "^3.2.0", diff --git a/packages/jest-circus/src/run.ts b/packages/jest-circus/src/run.ts index eabd09411a44..9df9df8979d9 100644 --- a/packages/jest-circus/src/run.ts +++ b/packages/jest-circus/src/run.ts @@ -138,7 +138,10 @@ const _callCircusHook = async ({ const timeout = hook.timeout || getState().testTimeout; try { - await callAsyncCircusFn(hook.fn, testContext, {isHook: true, timeout}); + await callAsyncCircusFn(hook.fn, testContext, hook.asyncError, { + isHook: true, + timeout, + }); await dispatch({describeBlock, hook, name: 'hook_success', test}); } catch (error) { await dispatch({describeBlock, error, hook, name: 'hook_failure', test}); @@ -158,7 +161,10 @@ const _callCircusTest = async ( } try { - await callAsyncCircusFn(test.fn, testContext, {isHook: false, timeout}); + await callAsyncCircusFn(test.fn, testContext, test.asyncError, { + isHook: false, + timeout, + }); await dispatch({name: 'test_fn_success', test}); } catch (error) { await dispatch({error, name: 'test_fn_failure', test}); diff --git a/packages/jest-circus/src/utils.ts b/packages/jest-circus/src/utils.ts index fa477c12d9db..fdec52805fc2 100644 --- a/packages/jest-circus/src/utils.ts +++ b/packages/jest-circus/src/utils.ts @@ -9,6 +9,7 @@ import type {Circus} from '@jest/types'; import {convertDescriptorToString} from 'jest-util'; import isGeneratorFn from 'is-generator-fn'; import co from 'co'; +import dedent = require('dedent'); import StackUtils = require('stack-utils'); import prettyFormat = require('pretty-format'); import {getState} from './state'; @@ -153,6 +154,7 @@ function checkIsError(error: any): error is Error { export const callAsyncCircusFn = ( fn: Circus.AsyncFn, testContext: Circus.TestContext | undefined, + asyncError: Circus.Exception, {isHook, timeout}: {isHook?: boolean | null; timeout: number}, ): Promise => { let timeoutID: NodeJS.Timeout; @@ -167,24 +169,47 @@ export const callAsyncCircusFn = ( // If this fn accepts `done` callback we return a promise that fulfills as // soon as `done` called. if (fn.length) { + let returnedValue: unknown = undefined; const done = (reason?: Error | string): void => { - const errorAsErrorObject = checkIsError(reason) - ? reason - : new Error(`Failed: ${prettyFormat(reason, {maxDepth: 3})}`); - - // Consider always throwing, regardless if `reason` is set or not - if (completed && reason) { - errorAsErrorObject.message = - 'Caught error after test environment was torn down\n\n' + - errorAsErrorObject.message; - - throw errorAsErrorObject; - } - - return reason ? reject(errorAsErrorObject) : resolve(); + // We need to keep a stack here before the promise tick + const errorAtDone = new Error(); + // Use `Promise.resolve` to allow the event loop to go a single tick in case `done` is called synchronously + Promise.resolve().then(() => { + if (returnedValue !== undefined) { + asyncError.message = dedent` + Test functions cannot both take a 'done' callback and return something. Either use a 'done' callback, or return a promise. + Returned value: ${prettyFormat(returnedValue, {maxDepth: 3})} + `; + return reject(asyncError); + } + + let errorAsErrorObject: Error; + + if (checkIsError(reason)) { + errorAsErrorObject = reason; + } else { + errorAsErrorObject = errorAtDone; + errorAtDone.message = `Failed: ${prettyFormat(reason, { + maxDepth: 3, + })}`; + } + + // Consider always throwing, regardless if `reason` is set or not + if (completed && reason) { + errorAsErrorObject.message = + 'Caught error after test environment was torn down\n\n' + + errorAsErrorObject.message; + + throw errorAsErrorObject; + } + + return reason ? reject(errorAsErrorObject) : resolve(); + }); }; - return fn.call(testContext, done); + returnedValue = fn.call(testContext, done); + + return; } let returnedValue; @@ -194,7 +219,8 @@ export const callAsyncCircusFn = ( try { returnedValue = fn.call(testContext); } catch (error) { - return reject(error); + reject(error); + return; } } @@ -205,23 +231,25 @@ export const callAsyncCircusFn = ( returnedValue !== null && typeof returnedValue.then === 'function' ) { - return returnedValue.then(resolve, reject); + returnedValue.then(resolve, reject); + return; } - if (!isHook && returnedValue !== void 0) { - return reject( + if (!isHook && returnedValue !== undefined) { + reject( new Error( - ` + dedent` test functions can only return Promise or undefined. - Returned value: ${String(returnedValue)} + Returned value: ${prettyFormat(returnedValue, {maxDepth: 3})} `, ), ); + return; } // Otherwise this test is synchronous, and if it didn't throw it means // it passed. - return resolve(); + resolve(); }) .then(() => { completed = true; From 2b32fe6cf190d76d789724721776439df30ddbd2 Mon Sep 17 00:00:00 2001 From: Christoph Nakazawa Date: Sat, 2 May 2020 10:16:35 +0100 Subject: [PATCH 036/106] Remove `providesModuleNodeModules` from Jest. (#9583) --- CHANGELOG.md | 1 + TestUtils.ts | 4 +- .../__snapshots__/showConfig.test.ts.snap | 1 - packages/jest-config/src/Defaults.ts | 1 - packages/jest-config/src/ValidConfig.ts | 1 - .../src/__tests__/SearchSource.test.ts | 1 - .../log_debug_messages.test.ts.snap | 4 +- .../src/__tests__/index.test.js | 30 -- packages/jest-haste-map/src/index.ts | 51 +-- .../__tests__/runtime_require_module.test.js | 16 - packages/jest-runtime/src/index.ts | 1 - .../script_transformer.test.js.snap | 8 +- packages/jest-types/src/Config.ts | 1 - .../__snapshots__/validate.test.ts.snap | 7 +- .../src/__tests__/fixtures/jestConfig.ts | 8 +- .../src/__tests__/validate.test.ts | 4 +- .../version-22.x/TutorialReactNative.md | 19 -- yarn.lock | 292 +++++++++++++----- 18 files changed, 228 insertions(+), 222 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cb3d544c312d..1c3136ced264 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -323,6 +323,7 @@ - `[jest-validate]` [**BREAKING**] Use ESM exports ([#8874](https://github.com/facebook/jest/pull/8874)) - `[jest-types]` Mark `InitialOptions` as `Partial` ([#8848](https://github.com/facebook/jest/pull/8848)) - `[jest-config]` Refactor `normalize` to be more type safe ([#8848](https://github.com/facebook/jest/pull/8848)) +- `[jest-haste-map]` [**BREAKING**] removed `providesModuleNodeModules` ([#8535](https://github.com/facebook/jest/pull/8535)) ## 24.9.0 diff --git a/TestUtils.ts b/TestUtils.ts index 8f4f6096707d..031f9de0916a 100644 --- a/TestUtils.ts +++ b/TestUtils.ts @@ -82,9 +82,7 @@ const DEFAULT_PROJECT_CONFIG: Config.ProjectConfig = { globalSetup: null, globalTeardown: null, globals: {}, - haste: { - providesModuleNodeModules: [], - }, + haste: {}, moduleDirectories: [], moduleFileExtensions: ['js'], moduleLoader: '/test_module_loader_path', diff --git a/e2e/__tests__/__snapshots__/showConfig.test.ts.snap b/e2e/__tests__/__snapshots__/showConfig.test.ts.snap index be82d2534558..9c644c2b47e6 100644 --- a/e2e/__tests__/__snapshots__/showConfig.test.ts.snap +++ b/e2e/__tests__/__snapshots__/showConfig.test.ts.snap @@ -20,7 +20,6 @@ exports[`--showConfig outputs config info and exits 1`] = ` "globals": {}, "haste": { "computeSha1": false, - "providesModuleNodeModules": [], "throwOnModuleCollision": false }, "moduleDirectories": [ diff --git a/packages/jest-config/src/Defaults.ts b/packages/jest-config/src/Defaults.ts index 32dcbf3c0df7..f10ec309c835 100644 --- a/packages/jest-config/src/Defaults.ts +++ b/packages/jest-config/src/Defaults.ts @@ -29,7 +29,6 @@ const defaultOptions: Config.DefaultOptions = { globals: {}, haste: { computeSha1: false, - providesModuleNodeModules: [], throwOnModuleCollision: false, }, maxConcurrency: 5, diff --git a/packages/jest-config/src/ValidConfig.ts b/packages/jest-config/src/ValidConfig.ts index 6486947f48ac..4fa4022acc8c 100644 --- a/packages/jest-config/src/ValidConfig.ts +++ b/packages/jest-config/src/ValidConfig.ts @@ -56,7 +56,6 @@ const initialOptions: Config.InitialOptions = { defaultPlatform: 'ios', hasteImplModulePath: '/haste_impl.js', platforms: ['ios', 'android'], - providesModuleNodeModules: ['react', 'react-native'], throwOnModuleCollision: false, }, json: false, diff --git a/packages/jest-core/src/__tests__/SearchSource.test.ts b/packages/jest-core/src/__tests__/SearchSource.test.ts index 5a92a31d8bc8..c2effc89edd3 100644 --- a/packages/jest-core/src/__tests__/SearchSource.test.ts +++ b/packages/jest-core/src/__tests__/SearchSource.test.ts @@ -401,7 +401,6 @@ describe('SearchSource', () => { '__tests__', 'haste_impl.js', ), - providesModuleNodeModules: [], }, name: 'SearchSource-findRelatedTests-tests', rootDir, diff --git a/packages/jest-core/src/lib/__tests__/__snapshots__/log_debug_messages.test.ts.snap b/packages/jest-core/src/lib/__tests__/__snapshots__/log_debug_messages.test.ts.snap index ddfcea653f84..6cb0bf755035 100644 --- a/packages/jest-core/src/lib/__tests__/__snapshots__/log_debug_messages.test.ts.snap +++ b/packages/jest-core/src/lib/__tests__/__snapshots__/log_debug_messages.test.ts.snap @@ -18,9 +18,7 @@ exports[`prints the config object 1`] = ` "globalSetup": null, "globalTeardown": null, "globals": {}, - "haste": { - "providesModuleNodeModules": [] - }, + "haste": {}, "moduleDirectories": [], "moduleFileExtensions": [ "js" diff --git a/packages/jest-haste-map/src/__tests__/index.test.js b/packages/jest-haste-map/src/__tests__/index.test.js index ebd189b385ac..5d67e670dcde 100644 --- a/packages/jest-haste-map/src/__tests__/index.test.js +++ b/packages/jest-haste-map/src/__tests__/index.test.js @@ -329,7 +329,6 @@ describe('HasteMap', () => { const hasteMap = new HasteMap({ ...defaultConfig, mocksPattern: '/__mocks__/', - providesModuleNodeModules: ['react', 'fbjs'], }); return hasteMap.build().then(({__hasteMapForTest: data}) => { @@ -341,23 +340,6 @@ describe('HasteMap', () => { 'fruits/Pear.js': ['Pear', 32, 42, 1, 'Banana\0Strawberry', null], 'fruits/Strawberry.js': ['Strawberry', 32, 42, 1, '', null], 'fruits/__mocks__/Pear.js': ['', 32, 42, 1, 'Melon', null], - // node modules - 'fruits/node_modules/fbjs/lib/flatMap.js': [ - 'flatMap', - 32, - 42, - 1, - '', - null, - ], - 'fruits/node_modules/react/React.js': [ - 'React', - 32, - 42, - 1, - 'Component', - null, - ], 'vegetables/Melon.js': ['Melon', 32, 42, 1, '', null], }), ); @@ -367,21 +349,9 @@ describe('HasteMap', () => { Banana: {[H.GENERIC_PLATFORM]: ['fruits/Banana.js', H.MODULE]}, Melon: {[H.GENERIC_PLATFORM]: ['vegetables/Melon.js', H.MODULE]}, Pear: {[H.GENERIC_PLATFORM]: ['fruits/Pear.js', H.MODULE]}, - React: { - [H.GENERIC_PLATFORM]: [ - 'fruits/node_modules/react/React.js', - H.MODULE, - ], - }, Strawberry: { [H.GENERIC_PLATFORM]: ['fruits/Strawberry.js', H.MODULE], }, - flatMap: { - [H.GENERIC_PLATFORM]: [ - 'fruits/node_modules/fbjs/lib/flatMap.js', - H.MODULE, - ], - }, }), ); diff --git a/packages/jest-haste-map/src/index.ts b/packages/jest-haste-map/src/index.ts index 866a06a1b140..129858c1f40d 100644 --- a/packages/jest-haste-map/src/index.ts +++ b/packages/jest-haste-map/src/index.ts @@ -61,7 +61,6 @@ type Options = { mocksPattern?: string; name: string; platforms: Array; - providesModuleNodeModules?: Array; resetCache?: boolean; retainAllFiles: boolean; rootDir: string; @@ -127,28 +126,6 @@ const canUseWatchman = ((): boolean => { return false; })(); -const escapePathSeparator = (string: string) => - path.sep === '\\' ? string.replace(/(\/|\\)/g, '\\\\') : string; - -const getWhiteList = (list: Array | undefined): RegExp | null => { - if (list && list.length) { - const newList = list.map(item => - escapePathSeparator(item.replace(/(\/)/g, path.sep)), - ); - return new RegExp( - '(' + - escapePathSeparator(NODE_MODULES) + - '(?:' + - newList.join('|') + - ')(?=$|' + - escapePathSeparator(path.sep) + - '))', - 'g', - ); - } - return null; -}; - function invariant(condition: unknown, message?: string): asserts condition { if (!condition) { throw new Error(message); @@ -241,7 +218,6 @@ class HasteMap extends EventEmitter { private _console: Console; private _options: InternalOptions; private _watchers: Array; - private _whitelist: RegExp | null; private _worker: WorkerInterface | null; constructor(options: Options) { @@ -315,7 +291,6 @@ class HasteMap extends EventEmitter { hasteImplHash, dependencyExtractorHash, ); - this._whitelist = getWhiteList(options.providesModuleNodeModules); this._buildPromise = null; this._watchers = []; this._worker = null; @@ -550,7 +525,7 @@ class HasteMap extends EventEmitter { // If we retain all files in the virtual HasteFS representation, we avoid // reading them if they aren't important (node_modules). - if (this._options.retainAllFiles && this._isNodeModulesDir(filePath)) { + if (this._options.retainAllFiles && filePath.includes(NODE_MODULES)) { if (computeSha1) { return this._getWorker(workerOptions) .getSha1({ @@ -1075,32 +1050,10 @@ class HasteMap extends EventEmitter { return ( ignoreMatched || - (!this._options.retainAllFiles && this._isNodeModulesDir(filePath)) + (!this._options.retainAllFiles && filePath.includes(NODE_MODULES)) ); } - private _isNodeModulesDir(filePath: Config.Path): boolean { - if (!filePath.includes(NODE_MODULES)) { - return false; - } - - if (this._whitelist) { - const whitelist = this._whitelist; - const match = whitelist.exec(filePath); - const matchEndIndex = whitelist.lastIndex; - whitelist.lastIndex = 0; - - if (!match) { - return true; - } - - const filePathInPackage = filePath.substr(matchEndIndex); - return filePathInPackage.startsWith(NODE_MODULES); - } - - return true; - } - private _createEmptyMap(): InternalHasteMap { return { clocks: new Map(), diff --git a/packages/jest-runtime/src/__tests__/runtime_require_module.test.js b/packages/jest-runtime/src/__tests__/runtime_require_module.test.js index 685667dea150..a617c267d551 100644 --- a/packages/jest-runtime/src/__tests__/runtime_require_module.test.js +++ b/packages/jest-runtime/src/__tests__/runtime_require_module.test.js @@ -252,22 +252,6 @@ describe('Runtime requireModule', () => { expect(hastePackage.isHastePackage).toBe(true); })); - it('resolves node modules properly when crawling node_modules', () => - // While we are crawling a node module, we shouldn't put package.json - // files of node modules to resolve to `package.json` but rather resolve - // to whatever the package.json's `main` field says. - createRuntime(__filename, { - haste: { - providesModuleNodeModules: ['not-a-haste-package'], - }, - }).then(runtime => { - const hastePackage = runtime.requireModule( - runtime.__mockRootPath, - 'not-a-haste-package', - ); - expect(hastePackage.isNodeModule).toBe(true); - })); - it('resolves platform extensions based on the default platform', () => Promise.all([ createRuntime(__filename).then(runtime => { diff --git a/packages/jest-runtime/src/index.ts b/packages/jest-runtime/src/index.ts index 1cf4cb0c0c55..70ac0fa137f9 100644 --- a/packages/jest-runtime/src/index.ts +++ b/packages/jest-runtime/src/index.ts @@ -285,7 +285,6 @@ class Runtime { mocksPattern: escapePathForRegex(path.sep + '__mocks__' + path.sep), name: config.name, platforms: config.haste.platforms || ['ios', 'android'], - providesModuleNodeModules: config.haste.providesModuleNodeModules, resetCache: options && options.resetCache, retainAllFiles: false, rootDir: config.rootDir, diff --git a/packages/jest-transform/src/__tests__/__snapshots__/script_transformer.test.js.snap b/packages/jest-transform/src/__tests__/__snapshots__/script_transformer.test.js.snap index 6cf4ee642339..f2e35813f3b9 100644 --- a/packages/jest-transform/src/__tests__/__snapshots__/script_transformer.test.js.snap +++ b/packages/jest-transform/src/__tests__/__snapshots__/script_transformer.test.js.snap @@ -19,9 +19,7 @@ Object { "globalSetup": null, "globalTeardown": null, "globals": Object {}, - "haste": Object { - "providesModuleNodeModules": Array [], - }, + "haste": Object {}, "moduleDirectories": Array [], "moduleFileExtensions": Array [ "js", @@ -229,7 +227,7 @@ exports[`ScriptTransformer uses multiple preprocessors 1`] = ` const TRANSFORMED = { filename: '/fruits/banana.js', script: 'module.exports = "banana";', - config: '{"automock":false,"cache":true,"cacheDirectory":"/cache/","clearMocks":false,"coveragePathIgnorePatterns":[],"cwd":"/test_root_dir/","detectLeaks":false,"detectOpenHandles":false,"errorOnDeprecated":false,"extraGlobals":[],"filter":null,"forceCoverageMatch":[],"globalSetup":null,"globalTeardown":null,"globals":{},"haste":{"providesModuleNodeModules":[]},"moduleDirectories":[],"moduleFileExtensions":["js"],"moduleLoader":"/test_module_loader_path","moduleNameMapper":[],"modulePathIgnorePatterns":[],"modulePaths":[],"name":"test","prettierPath":"prettier","resetMocks":false,"resetModules":false,"resolver":null,"restoreMocks":false,"rootDir":"/","roots":[],"runner":"jest-runner","setupFiles":[],"setupFilesAfterEnv":[],"skipFilter":false,"skipNodeResolution":false,"snapshotResolver":null,"snapshotSerializers":[],"testEnvironment":"node","testEnvironmentOptions":{},"testLocationInResults":false,"testMatch":[],"testPathIgnorePatterns":[],"testRegex":["\\\\.test\\\\.js$"],"testRunner":"jest-jasmine2","testURL":"http://localhost","timers":"real","transform":[["^.+\\\\.js$","test_preprocessor"],["^.+\\\\.css$","css-preprocessor"]],"transformIgnorePatterns":["/node_modules/"],"unmockedModulePathPatterns":null,"watchPathIgnorePatterns":[]}', + config: '{"automock":false,"cache":true,"cacheDirectory":"/cache/","clearMocks":false,"coveragePathIgnorePatterns":[],"cwd":"/test_root_dir/","detectLeaks":false,"detectOpenHandles":false,"errorOnDeprecated":false,"extraGlobals":[],"filter":null,"forceCoverageMatch":[],"globalSetup":null,"globalTeardown":null,"globals":{},"haste":{},"moduleDirectories":[],"moduleFileExtensions":["js"],"moduleLoader":"/test_module_loader_path","moduleNameMapper":[],"modulePathIgnorePatterns":[],"modulePaths":[],"name":"test","prettierPath":"prettier","resetMocks":false,"resetModules":false,"resolver":null,"restoreMocks":false,"rootDir":"/","roots":[],"runner":"jest-runner","setupFiles":[],"setupFilesAfterEnv":[],"skipFilter":false,"skipNodeResolution":false,"snapshotResolver":null,"snapshotSerializers":[],"testEnvironment":"node","testEnvironmentOptions":{},"testLocationInResults":false,"testMatch":[],"testPathIgnorePatterns":[],"testRegex":["\\\\.test\\\\.js$"],"testRunner":"jest-jasmine2","testURL":"http://localhost","timers":"real","transform":[["^.+\\\\.js$","test_preprocessor"],["^.+\\\\.css$","css-preprocessor"]],"transformIgnorePatterns":["/node_modules/"],"unmockedModulePathPatterns":null,"watchPathIgnorePatterns":[]}', }; `; @@ -246,7 +244,7 @@ exports[`ScriptTransformer uses the supplied preprocessor 1`] = ` const TRANSFORMED = { filename: '/fruits/banana.js', script: 'module.exports = "banana";', - config: '{"automock":false,"cache":true,"cacheDirectory":"/cache/","clearMocks":false,"coveragePathIgnorePatterns":[],"cwd":"/test_root_dir/","detectLeaks":false,"detectOpenHandles":false,"errorOnDeprecated":false,"extraGlobals":[],"filter":null,"forceCoverageMatch":[],"globalSetup":null,"globalTeardown":null,"globals":{},"haste":{"providesModuleNodeModules":[]},"moduleDirectories":[],"moduleFileExtensions":["js"],"moduleLoader":"/test_module_loader_path","moduleNameMapper":[],"modulePathIgnorePatterns":[],"modulePaths":[],"name":"test","prettierPath":"prettier","resetMocks":false,"resetModules":false,"resolver":null,"restoreMocks":false,"rootDir":"/","roots":[],"runner":"jest-runner","setupFiles":[],"setupFilesAfterEnv":[],"skipFilter":false,"skipNodeResolution":false,"snapshotResolver":null,"snapshotSerializers":[],"testEnvironment":"node","testEnvironmentOptions":{},"testLocationInResults":false,"testMatch":[],"testPathIgnorePatterns":[],"testRegex":["\\\\.test\\\\.js$"],"testRunner":"jest-jasmine2","testURL":"http://localhost","timers":"real","transform":[["^.+\\\\.js$","test_preprocessor"]],"transformIgnorePatterns":["/node_modules/"],"unmockedModulePathPatterns":null,"watchPathIgnorePatterns":[]}', + config: '{"automock":false,"cache":true,"cacheDirectory":"/cache/","clearMocks":false,"coveragePathIgnorePatterns":[],"cwd":"/test_root_dir/","detectLeaks":false,"detectOpenHandles":false,"errorOnDeprecated":false,"extraGlobals":[],"filter":null,"forceCoverageMatch":[],"globalSetup":null,"globalTeardown":null,"globals":{},"haste":{},"moduleDirectories":[],"moduleFileExtensions":["js"],"moduleLoader":"/test_module_loader_path","moduleNameMapper":[],"modulePathIgnorePatterns":[],"modulePaths":[],"name":"test","prettierPath":"prettier","resetMocks":false,"resetModules":false,"resolver":null,"restoreMocks":false,"rootDir":"/","roots":[],"runner":"jest-runner","setupFiles":[],"setupFilesAfterEnv":[],"skipFilter":false,"skipNodeResolution":false,"snapshotResolver":null,"snapshotSerializers":[],"testEnvironment":"node","testEnvironmentOptions":{},"testLocationInResults":false,"testMatch":[],"testPathIgnorePatterns":[],"testRegex":["\\\\.test\\\\.js$"],"testRunner":"jest-jasmine2","testURL":"http://localhost","timers":"real","transform":[["^.+\\\\.js$","test_preprocessor"]],"transformIgnorePatterns":["/node_modules/"],"unmockedModulePathPatterns":null,"watchPathIgnorePatterns":[]}', }; `; diff --git a/packages/jest-types/src/Config.ts b/packages/jest-types/src/Config.ts index e9c02ea340e4..fcdb4f570856 100644 --- a/packages/jest-types/src/Config.ts +++ b/packages/jest-types/src/Config.ts @@ -20,7 +20,6 @@ export type HasteConfig = { defaultPlatform?: string | null; hasteImplModulePath?: string; platforms?: Array; - providesModuleNodeModules: Array; throwOnModuleCollision?: boolean; }; diff --git a/packages/jest-validate/src/__tests__/__snapshots__/validate.test.ts.snap b/packages/jest-validate/src/__tests__/__snapshots__/validate.test.ts.snap index eeaf59c1a094..c7b918a31bca 100644 --- a/packages/jest-validate/src/__tests__/__snapshots__/validate.test.ts.snap +++ b/packages/jest-validate/src/__tests__/__snapshots__/validate.test.ts.snap @@ -109,12 +109,7 @@ exports[`pretty prints valid config for Object 1`] = ` Example: { - \\"haste\\": { - \\"providesModuleNodeModules\\": [ - \\"react\\", - \\"react-native\\" - ] - } + \\"haste\\": {} } " `; diff --git a/packages/jest-validate/src/__tests__/fixtures/jestConfig.ts b/packages/jest-validate/src/__tests__/fixtures/jestConfig.ts index ec4acfd6b59b..8e1438a5e810 100644 --- a/packages/jest-validate/src/__tests__/fixtures/jestConfig.ts +++ b/packages/jest-validate/src/__tests__/fixtures/jestConfig.ts @@ -29,9 +29,7 @@ const defaultConfig = { coverageReporters: ['json', 'text', 'lcov', 'clover'], expand: false, globals: {}, - haste: { - providesModuleNodeModules: [], - }, + haste: {}, moduleDirectories: ['node_modules'], moduleFileExtensions: ['js', 'json', 'jsx', 'node'], moduleNameMapper: {}, @@ -82,9 +80,7 @@ const validConfig = { expand: false, forceExit: false, globals: {}, - haste: { - providesModuleNodeModules: ['react', 'react-native'], - }, + haste: {}, logHeapUsage: true, moduleDirectories: ['node_modules'], moduleFileExtensions: ['js', 'json', 'jsx', 'node'], diff --git a/packages/jest-validate/src/__tests__/validate.test.ts b/packages/jest-validate/src/__tests__/validate.test.ts index aaf5e2bf172c..eb5af529bb2b 100644 --- a/packages/jest-validate/src/__tests__/validate.test.ts +++ b/packages/jest-validate/src/__tests__/validate.test.ts @@ -75,8 +75,8 @@ test('omits null and undefined config values', () => { test('recursively omits null and undefined config values', () => { const config = { - haste: { - providesModuleNodeModules: null, + coverageThreshold: { + global: null, }, }; expect( diff --git a/website/versioned_docs/version-22.x/TutorialReactNative.md b/website/versioned_docs/version-22.x/TutorialReactNative.md index 83c6ebbd34ea..df5dd5253034 100644 --- a/website/versioned_docs/version-22.x/TutorialReactNative.md +++ b/website/versioned_docs/version-22.x/TutorialReactNative.md @@ -201,22 +201,3 @@ jest.mock('Text', () => { In other cases you may want to mock a native module that isn't a React component. The same technique can be applied. We recommend inspecting the native module's source code and logging the module when running a react native app on a real device and then modeling a manual mock after the real module. If you end up mocking the same modules over and over it is recommended to define these mocks in a separate file and add it to the list of `setupFiles`. - -### `@providesModule` - -If you'd like to use Facebook's `@providesModule` module system through an npm package, the default haste config option must be overwritten and npm modules must be added to `providesModuleNodeModules`: - -```json -"haste": { - "defaultPlatform": "ios", - "platforms": ["android", "ios"], - "providesModuleNodeModules": [ - "react", - "react-native", - "my-awesome-module", - "my-text-component" - ] -}, -``` - -If you'd like to test a different default platform or if you are building for other platforms, the `defaultPlatform` and `platforms` configuration option can be updated. diff --git a/yarn.lock b/yarn.lock index ecc3477240e8..c758f3cfc9f0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1115,19 +1115,19 @@ which "^1.3.1" "@hapi/address@2.x.x": - version "2.1.4" - resolved "https://registry.yarnpkg.com/@hapi/address/-/address-2.1.4.tgz#5d67ed43f3fd41a69d4b9ff7b56e7c0d1d0a81e5" - integrity sha512-QD1PhQk+s31P1ixsX0H0Suoupp3VMXzIVMSwobR3F3MSUO2YCV0B7xqLcUw/Bh8yuvd3LhpyqLQWTNcRmp6IdQ== + version "2.0.0" + resolved "https://registry.yarnpkg.com/@hapi/address/-/address-2.0.0.tgz#9f05469c88cb2fd3dcd624776b54ee95c312126a" + integrity sha512-mV6T0IYqb0xL1UALPFplXYQmR0twnXG0M6jUswpquqT2sD12BOiCiLy3EvMp/Fy7s3DZElC4/aPjEjo2jeZpvw== "@hapi/bourne@1.x.x": version "1.3.2" resolved "https://registry.yarnpkg.com/@hapi/bourne/-/bourne-1.3.2.tgz#0a7095adea067243ce3283e1b56b8a8f453b242a" integrity sha512-1dVNHT76Uu5N3eJNTYcvxee+jzX4Z9lfciqRRHCU27ihbUcYi+iSc2iml5Ke1LXe1SyJCLA0+14Jh4tXJgOppA== -"@hapi/hoek@8.x.x", "@hapi/hoek@^8.3.0": - version "8.5.1" - resolved "https://registry.yarnpkg.com/@hapi/hoek/-/hoek-8.5.1.tgz#fde96064ca446dec8c55a8c2f130957b070c6e06" - integrity sha512-yN7kbciD87WzLGc5539Tn0sApjyiGHAJgKvG9W8C7O+6c7qmoQMfVs0W4bX17eqz6C78QJqqFrtgdK5EWf6Qow== +"@hapi/hoek@8.x.x": + version "8.2.1" + resolved "https://registry.yarnpkg.com/@hapi/hoek/-/hoek-8.2.1.tgz#924af04cbb22e17359c620d2a9c946e63f58eb77" + integrity sha512-JPiBy+oSmsq3St7XlipfN5pNA6bDJ1kpa73PrK/zR29CVClDVqy04AanM/M/qx5bSF+I61DdCfAvRrujau+zRg== "@hapi/joi@^15.0.3": version "15.1.1" @@ -1140,11 +1140,11 @@ "@hapi/topo" "3.x.x" "@hapi/topo@3.x.x": - version "3.1.6" - resolved "https://registry.yarnpkg.com/@hapi/topo/-/topo-3.1.6.tgz#68d935fa3eae7fdd5ab0d7f953f3205d8b2bfc29" - integrity sha512-tAag0jEcjwH+P2quUfipd7liWCNX2F8NvYjQp2wtInsZxnMlypdw0FtAOLxtvvkO+GSRRbmNi8m/5y42PQJYCQ== + version "3.1.3" + resolved "https://registry.yarnpkg.com/@hapi/topo/-/topo-3.1.3.tgz#c7a02e0d936596d29f184e6d7fdc07e8b5efce11" + integrity sha512-JmS9/vQK6dcUYn7wc2YZTqzIKubAQcJKu2KCKAru6es482U5RT5fP1EXCPtlXpiK7PR0On/kpQKI4fRKkzpZBQ== dependencies: - "@hapi/hoek" "^8.3.0" + "@hapi/hoek" "8.x.x" "@istanbuljs/load-nyc-config@^1.0.0": version "1.0.0" @@ -2715,9 +2715,9 @@ acorn-walk@^6.0.1: integrity sha512-7evsyfH1cLOCdAzZAd43Cic04yKydNx0cF+7tiA19p1XnLLPU4dpCQOqpjqwokFe//vS0QqfqqjCS2JkiIs0cA== acorn@^6.0.1: - version "6.4.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.1.tgz#531e58ba3f51b9dacb9a6646ca4debf5b14ca474" - integrity sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA== + version "6.3.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.3.0.tgz#0087509119ffa4fc0a0041d1e93a417e68cb856e" + integrity sha512-/czfa8BwS88b9gWQVhc8eknunSA2DoJpJyTQkhheIf5E48u1N0R4q/YxxsAeqRrmK9TQ/uYfgLDfZo91UlANIA== acorn@^7.1.0, acorn@^7.1.1: version "7.1.1" @@ -3290,7 +3290,40 @@ babel-preset-current-node-syntax@^0.1.2: "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" "@babel/plugin-syntax-optional-chaining" "^7.8.3" -babel-preset-fbjs@^3.2.0, babel-preset-fbjs@^3.3.0: +babel-preset-fbjs@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/babel-preset-fbjs/-/babel-preset-fbjs-3.2.0.tgz#c0e6347d3e0379ed84b3c2434d3467567aa05297" + integrity sha512-5Jo+JeWiVz2wHUUyAlvb/sSYnXNig9r+HqGAOSfh5Fzxp7SnAaR/tEGRJ1ZX7C77kfk82658w6R5Z+uPATTD9g== + dependencies: + "@babel/plugin-proposal-class-properties" "^7.0.0" + "@babel/plugin-proposal-object-rest-spread" "^7.0.0" + "@babel/plugin-syntax-class-properties" "^7.0.0" + "@babel/plugin-syntax-flow" "^7.0.0" + "@babel/plugin-syntax-jsx" "^7.0.0" + "@babel/plugin-syntax-object-rest-spread" "^7.0.0" + "@babel/plugin-transform-arrow-functions" "^7.0.0" + "@babel/plugin-transform-block-scoped-functions" "^7.0.0" + "@babel/plugin-transform-block-scoping" "^7.0.0" + "@babel/plugin-transform-classes" "^7.0.0" + "@babel/plugin-transform-computed-properties" "^7.0.0" + "@babel/plugin-transform-destructuring" "^7.0.0" + "@babel/plugin-transform-flow-strip-types" "^7.0.0" + "@babel/plugin-transform-for-of" "^7.0.0" + "@babel/plugin-transform-function-name" "^7.0.0" + "@babel/plugin-transform-literals" "^7.0.0" + "@babel/plugin-transform-member-expression-literals" "^7.0.0" + "@babel/plugin-transform-modules-commonjs" "^7.0.0" + "@babel/plugin-transform-object-super" "^7.0.0" + "@babel/plugin-transform-parameters" "^7.0.0" + "@babel/plugin-transform-property-literals" "^7.0.0" + "@babel/plugin-transform-react-display-name" "^7.0.0" + "@babel/plugin-transform-react-jsx" "^7.0.0" + "@babel/plugin-transform-shorthand-properties" "^7.0.0" + "@babel/plugin-transform-spread" "^7.0.0" + "@babel/plugin-transform-template-literals" "^7.0.0" + babel-plugin-syntax-trailing-function-commas "^7.0.0-beta.0" + +babel-preset-fbjs@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/babel-preset-fbjs/-/babel-preset-fbjs-3.3.0.tgz#a6024764ea86c8e06a22d794ca8b69534d263541" integrity sha512-7QTLTCd2gwB2qGoi5epSULMHugSVgpcVt5YAeiFO9ABLrutDQzKfGwzxgZHLpugq8qMdg/DhRZDZ5CLKxBkEbw== @@ -3384,7 +3417,7 @@ benchmark@^2.1.4: lodash "^4.17.4" platform "^1.3.3" -big-integer@^1.6.44: +big-integer@^1.6.7: version "1.6.48" resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.48.tgz#8fd88bd1632cba4a1c8c3e3d7159f08bb95b4b9e" integrity sha512-j51egjPa7/i+RdiRuJbPdJ2FIUYYPhvYLjzoYbcMMm62ooO6F94fETG4MTs46zPAF9Brs04OajboA/qTGuz78w== @@ -3452,7 +3485,7 @@ binary-extensions@^2.0.0: resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.0.0.tgz#23c0df14f6a88077f5f986c0d167ec03c3d5537c" integrity sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow== -bindings@^1.3.0, bindings@^1.5.0: +bindings@^1.3.0: version "1.5.0" resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== @@ -3511,19 +3544,19 @@ boolbase@^1.0.0, boolbase@~1.0.0: resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24= -bplist-creator@0.0.8: - version "0.0.8" - resolved "https://registry.yarnpkg.com/bplist-creator/-/bplist-creator-0.0.8.tgz#56b2a6e79e9aec3fc33bf831d09347d73794e79c" - integrity sha512-Za9JKzD6fjLC16oX2wsXfc+qBEhJBJB1YPInoAQpMLhDuj5aVOv1baGeIQSq1Fr3OCqzvsoQcSBSwGId/Ja2PA== +bplist-creator@0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/bplist-creator/-/bplist-creator-0.0.7.tgz#37df1536092824b87c42f957b01344117372ae45" + integrity sha1-N98VNgkoJLh8QvlXsBNEEXNyrkU= dependencies: stream-buffers "~2.2.0" -bplist-parser@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/bplist-parser/-/bplist-parser-0.2.0.tgz#43a9d183e5bf9d545200ceac3e712f79ebbe8d0e" - integrity sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw== +bplist-parser@0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/bplist-parser/-/bplist-parser-0.1.1.tgz#d60d5dcc20cba6dc7e1f299b35d3e1f95dafbae6" + integrity sha1-1g1dzCDLptx+HymbNdPh+V2vuuY= dependencies: - big-integer "^1.6.44" + big-integer "^1.6.7" brace-expansion@^1.1.7: version "1.1.11" @@ -3788,7 +3821,17 @@ caniuse-api@^3.0.0: lodash.memoize "^4.1.2" lodash.uniq "^4.5.0" -caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000989, caniuse-lite@^1.0.30001038, caniuse-lite@^1.0.30001039: +caniuse-lite@^1.0.0: + version "1.0.30000985" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000985.tgz#0eb40f6c8a8c219155cbe43c4975c0efb4a0f77f" + integrity sha512-1ngiwkgqAYPG0JSSUp3PUDGPKKY59EK7NrGGX+VOxaKCNzRbNc7uXMny+c3VJfZxtoK3wSImTvG9T9sXiTw2+w== + +caniuse-lite@^1.0.30000989: + version "1.0.30001027" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001027.tgz#283e2ef17d94889cc216a22c6f85303d78ca852d" + integrity sha512-7xvKeErvXZFtUItTHgNtLgS9RJpVnwBlWX8jSo/BO8VsF6deszemZSkJJJA1KOKrXuzZH4WALpAJdq5EyfgMLg== + +caniuse-lite@^1.0.30001038, caniuse-lite@^1.0.30001039: version "1.0.30001040" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001040.tgz#103fc8e6eb1d7397e95134cd0e996743353d58ea" integrity sha512-Ep0tEPeI5wCvmJNrXjE3etgfI+lkl1fTDU6Y3ZH1mhrjkPlVI9W4pcKbMo+BQLpEWKVYYp2EmYaRsqpPC3k7lQ== @@ -4180,10 +4223,10 @@ command-exists@^1.2.8: resolved "https://registry.yarnpkg.com/command-exists/-/command-exists-1.2.9.tgz#c50725af3808c8ab0260fd60b01fbfa25b954f69" integrity sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w== -commander@^2.11.0, commander@^2.19.0, commander@~2.20.3: - version "2.20.3" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" - integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== +commander@^2.11.0, commander@^2.19.0: + version "2.20.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422" + integrity sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ== commander@^4.0.1: version "4.1.1" @@ -4200,6 +4243,11 @@ commander@~2.13.0: resolved "https://registry.yarnpkg.com/commander/-/commander-2.13.0.tgz#6964bca67685df7c1f1430c584f07d7597885b9c" integrity sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA== +commander@~2.20.3: + version "2.20.3" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== + commander@~2.8.1: version "2.8.1" resolved "https://registry.yarnpkg.com/commander/-/commander-2.8.1.tgz#06be367febfda0c330aa1e2a072d3dc9762425d4" @@ -4759,9 +4807,9 @@ dateformat@^3.0.0: integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q== dayjs@^1.8.15: - version "1.8.25" - resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.8.25.tgz#d09a8696cee7191bc1289e739f96626391b9c73c" - integrity sha512-Pk36juDfQQGDCgr0Lqd1kw15w3OS6xt21JaLPE3lCfsEf8KrERGwDNwvK1tRjrjqFC0uZBJncT4smZQ4F+uV5g== + version "1.8.15" + resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.8.15.tgz#7121bc04e6a7f2621ed6db566be4a8aaf8c3913e" + integrity sha512-HYHCI1nohG52B45vCQg8Re3hNDZbMroWPkhz50yaX7Lu0ATyjGsTdoYZBpjED9ar6chqTx2dmSmM8A51mojnAg== debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.8, debug@^2.6.9: version "2.6.9" @@ -4777,7 +4825,7 @@ debug@3.1.0: dependencies: ms "2.0.0" -debug@3.2.6, debug@^3.1.0, debug@^3.1.1, debug@^3.2.5: +debug@3.2.6, debug@^3.1.0, debug@^3.1.1, debug@^3.2.5, debug@^3.2.6: version "3.2.6" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== @@ -4886,6 +4934,11 @@ dedent@^0.7.0: resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" integrity sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw= +deep-extend@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" + integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== + deep-is@^0.1.3, deep-is@~0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" @@ -4982,6 +5035,11 @@ detect-indent@^5.0.0: resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-5.0.0.tgz#3871cc0a6a002e8c3e5b3cf7f336264675f06b9d" integrity sha1-OHHMCmoALow+Wzz38zYmRnXwa50= +detect-libc@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" + integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups= + detect-newline@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" @@ -5323,7 +5381,12 @@ env-paths@^2.2.0: resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.0.tgz#cdca557dc009152917d6166e2febe1f039685e43" integrity sha512-6u0VYSCo/OW6IoD5WCLLy9JUGARbamfSavcNXry/eu8aHVFei6CD3Sw+VGX5alea1i9pgPHW0mbu6Xj0uBh7gA== -envinfo@^7.1.0, envinfo@^7.3.1: +envinfo@^7.1.0: + version "7.3.1" + resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.3.1.tgz#892e42f7bf858b3446d9414ad240dbaf8da52f09" + integrity sha512-GvXiDTqLYrORVSCuJCsWHPXF5BFvoWMQA9xX4YVjPT1jyS3aZEHUBwjzxU/6LTPF9ReHgVEbX7IEN5UvSXHw/A== + +envinfo@^7.3.1: version "7.5.0" resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.5.0.tgz#91410bb6db262fb4f1409bd506e9ff57e91023f4" integrity sha512-jDgnJaF/Btomk+m3PZDTTCb5XIIIX3zYItnCRfF73zVgvinLoRomuhi75Y4su0PtQxWz4v66XnLLckyvyJTOIQ== @@ -6454,12 +6517,12 @@ fs.realpath@^1.0.0: integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= fsevents@^1.2.7: - version "1.2.12" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.12.tgz#db7e0d8ec3b0b45724fd4d83d43554a8f1f0de5c" - integrity sha512-Ggd/Ktt7E7I8pxZRbGIs7vwqAPscSESMrCSkx2FtWeqmheJgCo2R74fTsZFCifr0VTPwqRpPv17+6b8Zp7th0Q== + version "1.2.9" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.9.tgz#3f5ed66583ccd6f400b5a00db6f7e861363e388f" + integrity sha512-oeyj2H3EjjonWcFjD5NvZNE9Rqe4UW+nQBU2HNeKw0koVLEFIhtyETyAakeAM3de7Z/SW5kcA+fZUait9EApnw== dependencies: - bindings "^1.5.0" nan "^2.12.1" + node-pre-gyp "^0.12.0" fsevents@^2.1.2, fsevents@~2.1.1, fsevents@~2.1.2: version "2.1.2" @@ -7186,7 +7249,7 @@ humanize-ms@^1.2.1: dependencies: ms "^2.0.0" -iconv-lite@0.4.24, iconv-lite@^0.4.17, iconv-lite@^0.4.24, iconv-lite@~0.4.13: +iconv-lite@0.4.24, iconv-lite@^0.4.17, iconv-lite@^0.4.24, iconv-lite@^0.4.4, iconv-lite@~0.4.13: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== @@ -7374,7 +7437,7 @@ inherits@2.0.3: resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= -ini@^1.3.2, ini@^1.3.4, ini@^1.3.5: +ini@^1.3.2, ini@^1.3.4, ini@^1.3.5, ini@~1.3.0: version "1.3.5" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== @@ -7452,21 +7515,21 @@ inquirer@^3.0.6: through "^2.3.6" inquirer@^6.2.0: - version "6.5.2" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.5.2.tgz#ad50942375d036d327ff528c08bd5fab089928ca" - integrity sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ== + version "6.5.1" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.5.1.tgz#8bfb7a5ac02dac6ff641ac4c5ff17da112fcdb42" + integrity sha512-uxNHBeQhRXIoHWTSNYUFhQVrHYFThIt6IVo2fFmSe8aBwdR3/w6b58hJpiL/fMukFkvGzjg+hSxFtwvVmKZmXw== dependencies: - ansi-escapes "^3.2.0" + ansi-escapes "^4.2.1" chalk "^2.4.2" - cli-cursor "^2.1.0" + cli-cursor "^3.1.0" cli-width "^2.0.0" external-editor "^3.0.3" - figures "^2.0.0" - lodash "^4.17.12" - mute-stream "0.0.7" + figures "^3.0.0" + lodash "^4.17.15" + mute-stream "0.0.8" run-async "^2.2.0" rxjs "^6.4.0" - string-width "^2.1.0" + string-width "^4.1.0" strip-ansi "^5.1.0" through "^2.3.6" @@ -8197,9 +8260,9 @@ jest-zone-patch@*: integrity sha512-K5uHLHgMgi2Eyj74gbY+xSeGGekb5U48bXsgDwgipRbFdaekyZK+TAcp8auamqU4UjrAt5S4sIUZz/2bBNyTTA== jetifier@^1.6.2: - version "1.6.5" - resolved "https://registry.yarnpkg.com/jetifier/-/jetifier-1.6.5.tgz#ea87324a4230bef20a9651178ecab978ee54a8cb" - integrity sha512-T7yzBSu9PR+DqjYt+I0KVO1XTb1QhAfHnXV5Nd3xpbXM6Xg4e3vP60Q4qkNU8Fh6PHC2PivPUNN3rY7G2MxcDQ== + version "1.6.4" + resolved "https://registry.yarnpkg.com/jetifier/-/jetifier-1.6.4.tgz#6159db8e275d97980d26162897a0648b6d4a3222" + integrity sha512-+f/4OLeqY8RAmXnonI1ffeY1DR8kMNJPhv5WMFehchf7U71cjMQVKkOz1n6asz6kfVoAqKNWJz1A/18i18AcXA== jpegtran-bin@^4.0.0: version "4.0.0" @@ -8763,9 +8826,9 @@ logalot@^2.0.0: squeak "^1.0.0" logkitty@^0.6.0: - version "0.6.1" - resolved "https://registry.yarnpkg.com/logkitty/-/logkitty-0.6.1.tgz#fe29209669d261539cbd6bb998a136fc92a1a05c" - integrity sha512-cHuXN8qUZuzX/7kB6VyS7kB4xyD24e8gyHXIFNhIv+fjW3P+jEXNUhj0o/7qWJtv7UZpbnPgUqzu/AZQ8RAqxQ== + version "0.6.0" + resolved "https://registry.yarnpkg.com/logkitty/-/logkitty-0.6.0.tgz#e327d4b144dd5c11d912d002cf57ac9fbae20e15" + integrity sha512-+F1ROENmfG3b4N9WGlRz5QGTBw/xgjZe2JzZLADYeCmzdId5c+QI7WTGRofs/10hwP84aAmjK2WStx+/oQVnwA== dependencies: ansi-fragments "^0.2.1" dayjs "^1.8.15" @@ -9043,7 +9106,12 @@ merge-stream@^2.0.0: resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== -merge2@^1.2.3, merge2@^1.3.0: +merge2@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.2.3.tgz#7ee99dbd69bb6481689253f018488a1b902b0ed5" + integrity sha512-gdUU1Fwj5ep4kplwcmftruWofEFt6lfpkkr3h860CXbAB9c3hGb55EOL2ali0Td5oebvW0E1+3Sr+Ur7XfKpRA== + +merge2@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.3.0.tgz#5b366ee83b2f1582c48f87e47cf1a9352103ca81" integrity sha512-2j4DAdlBOkiSZIsaXk4mTE3sRS02yBHAtfy127xRV3bQUFqXkjHCHLW6Scv7DwNRbIWNHH8zpnz9zMaKXIdvYw== @@ -9626,6 +9694,15 @@ nearley@^2.7.10: randexp "0.4.6" semver "^5.4.1" +needle@^2.2.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/needle/-/needle-2.4.1.tgz#14af48732463d7475696f937626b1b993247a56a" + integrity sha512-x/gi6ijr4B7fwl6WYL9FwlCvRQKGlUNvnceho8wxkwXqN8jvVmmmATTmZPRRG7b/yC1eode26C2HO9jl78Du9g== + dependencies: + debug "^3.2.6" + iconv-lite "^0.4.4" + sax "^1.2.4" + negotiator@0.6.2: version "0.6.2" resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" @@ -9727,6 +9804,22 @@ node-notifier@^6.0.0: shellwords "^0.1.1" which "^1.3.1" +node-pre-gyp@^0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.12.0.tgz#39ba4bb1439da030295f899e3b520b7785766149" + integrity sha512-4KghwV8vH5k+g2ylT+sLTjy5wmUOb9vPhnM8NHvRf9dHmnW/CndrFXy2aRPaPST6dugXSdHXfeaHQm77PIz/1A== + dependencies: + detect-libc "^1.0.2" + mkdirp "^0.5.1" + needle "^2.2.1" + nopt "^4.0.1" + npm-packlist "^1.1.6" + npmlog "^4.0.2" + rc "^1.2.7" + rimraf "^2.6.1" + semver "^5.3.0" + tar "^4" + node-releases@^1.1.29, node-releases@^1.1.53: version "1.1.53" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.53.tgz#2d821bfa499ed7c5dffc5e2f28c88e78a08ee3f4" @@ -9830,7 +9923,7 @@ npm-normalize-package-bin@^1.0.0, npm-normalize-package-bin@^1.0.1: semver "^5.6.0" validate-npm-package-name "^3.0.0" -npm-packlist@^1.4.4: +npm-packlist@^1.1.6, npm-packlist@^1.4.4: version "1.4.8" resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.8.tgz#56ee6cc135b9f98ad3d51c1c95da22bbb9b2ef3e" integrity sha512-5+AZgwru5IevF5ZdnFglB5wNlHG1AOOuw28WhUq8/8emhBmLv6jX5by4WJCh7lW0uSYZYS6DXqIsyZVIXRZU9A== @@ -9862,7 +9955,7 @@ npm-run-path@^4.0.0: dependencies: path-key "^3.0.0" -npmlog@^4.1.2: +npmlog@^4.0.2, npmlog@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg== @@ -11179,6 +11272,16 @@ raw-body@~1.1.0: bytes "1" string_decoder "0.10" +rc@^1.2.7: + version "1.2.8" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" + integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== + dependencies: + deep-extend "^0.6.0" + ini "~1.3.0" + minimist "^1.2.0" + strip-json-comments "~2.0.1" + react-dev-utils@^9.1.0: version "9.1.0" resolved "https://registry.yarnpkg.com/react-dev-utils/-/react-dev-utils-9.1.0.tgz#3ad2bb8848a32319d760d0a84c56c14bdaae5e81" @@ -11233,7 +11336,17 @@ react-error-overlay@^6.0.3: resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-6.0.7.tgz#1dcfb459ab671d53f660a991513cb2f0a0553108" integrity sha512-TAv1KJFh3RhqxNvhzxj6LeT5NWklP6rDr2a0jaTfsZ5wSZWHOGeqQyejUp3xxLfPt2UpyJEcVQB/zyPcmonNFA== -react-is@^16.12.0, react-is@^16.8.1, react-is@^16.8.4, react-is@^16.8.6, react-is@^16.9.0: +react-is@^16.12.0, react-is@^16.9.0: + version "16.12.0" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.12.0.tgz#2cc0fe0fba742d97fd527c42a13bec4eeb06241c" + integrity sha512-rPCkf/mWBtKc97aLL9/txD8DZdemK0vkA3JMLShjlJB3Pj3s+lpf1KaBzMfQrAmhMQB0n1cU/SUGgKKBCe837Q== + +react-is@^16.8.1, react-is@^16.8.4: + version "16.9.0" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.9.0.tgz#21ca9561399aad0ff1a7701c01683e8ca981edcb" + integrity sha512-tJBzzzIgnnRfEm046qRcURvwQnZVXmuCbscxUO5RWrGTXpon2d4c8mI0D8WE6ydVIm29JiLB6+RslkIvym9Rjw== + +react-is@^16.8.6: version "16.13.1" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== @@ -11290,7 +11403,17 @@ react-test-renderer@*, react-test-renderer@16.11.0, react-test-renderer@^16.0.0- react-is "^16.8.6" scheduler "^0.17.0" -react@*, react@16.11.0, react@^16.8.4: +react@*, react@^16.8.4: + version "16.8.6" + resolved "https://registry.yarnpkg.com/react/-/react-16.8.6.tgz#ad6c3a9614fd3a4e9ef51117f54d888da01f2bbe" + integrity sha512-pC0uMkhLaHm11ZSJULfOBqV4tIZkx87ZLvbbQYunNixAAvjnC+snJCg0XQXn9VIsttVsbZP/H/ewzgsd5fxKXw== + dependencies: + loose-envify "^1.1.0" + object-assign "^4.1.1" + prop-types "^15.6.2" + scheduler "^0.13.6" + +react@16.11.0: version "16.11.0" resolved "https://registry.yarnpkg.com/react/-/react-16.11.0.tgz#d294545fe62299ccee83363599bf904e4a07fdbb" integrity sha512-M5Y8yITaLmU0ynd0r1Yvfq98Rmll6q8AxaEe88c8e7LxO8fZ2cNgmFt0aGAS9wzf1Ao32NKXtCl+/tVVtkxq6g== @@ -11824,7 +11947,7 @@ rimraf@2.6.3: dependencies: glob "^7.1.3" -rimraf@^2.5.4, rimraf@^2.6.2, rimraf@^2.6.3: +rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2, rimraf@^2.6.3: version "2.7.1" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== @@ -11899,10 +12022,17 @@ rxjs@^5.4.3: dependencies: symbol-observable "1.0.1" -rxjs@^6.4.0, rxjs@^6.5.3: - version "6.5.5" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.5.tgz#c5c884e3094c8cfee31bf27eb87e54ccfc87f9ec" - integrity sha512-WfQI+1gohdf0Dai/Bbmk5L5ItH5tYqm3ki2c5GdWhKjalzjg93N3avFjVStyZZz+A2Em+ZxKH5bNghw9UeylGQ== +rxjs@^6.4.0: + version "6.5.2" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.2.tgz#2e35ce815cd46d84d02a209fb4e5921e051dbec7" + integrity sha512-HUb7j3kvb7p7eCUHE3FqjoDsC1xfZQ4AHFWfTKSpZ+sAhhz5X1WX0ZuUqWbzB2QhSLp3DoLUG+hMdEDKqWo2Zg== + dependencies: + tslib "^1.9.0" + +rxjs@^6.5.3: + version "6.5.4" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.4.tgz#e0777fe0d184cec7872df147f303572d414e211c" + integrity sha512-naMQXcgEo3csAEGvw/NydRA0fuS2nDZJiw1YUWFKU7aPPAPGZEsD4Iimit96qwCieH6y614MCLYwdkrWx7z/7Q== dependencies: tslib "^1.9.0" @@ -11975,6 +12105,14 @@ scheduler@0.17.0, scheduler@^0.17.0: loose-envify "^1.1.0" object-assign "^4.1.1" +scheduler@^0.13.6: + version "0.13.6" + resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.13.6.tgz#466a4ec332467b31a91b9bf74e5347072e4cd889" + integrity sha512-IWnObHt413ucAYKsD9J1QShUKkbKLQQHdxRyw73sw4FN26iWr3DY/H34xGPe4nmL1DwXyWmSWmMrA9TfQbE/XQ== + dependencies: + loose-envify "^1.1.0" + object-assign "^4.1.1" + seek-bzip@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/seek-bzip/-/seek-bzip-1.0.5.tgz#cfe917cb3d274bcffac792758af53173eb1fabdc" @@ -12162,12 +12300,12 @@ signal-exit@^3.0.0, signal-exit@^3.0.2: integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== simple-plist@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/simple-plist/-/simple-plist-1.1.0.tgz#8354ab63eb3922a054c78ce96c209c532e907a23" - integrity sha512-2i5Tc0BYAqppM7jVzmNrI+aEUntPolIq4fDgji6WuNNn1D/qYdn2KwoLhZdzQkE04lu9L5tUoeJsjuJAvd+lFg== + version "1.0.0" + resolved "https://registry.yarnpkg.com/simple-plist/-/simple-plist-1.0.0.tgz#bed3085633b22f371e111f45d159a1ccf94b81eb" + integrity sha512-043L2rO80LVF7zfZ+fqhsEkoJFvW8o59rt/l4ctx1TJWoTx7/jkiS1R5TatD15Z1oYnuLJytzE7gcnnBuIPL2g== dependencies: - bplist-creator "0.0.8" - bplist-parser "0.2.0" + bplist-creator "0.0.7" + bplist-parser "0.1.1" plist "^3.0.1" simple-swizzle@^0.2.2: @@ -12713,7 +12851,7 @@ strip-indent@^2.0.0: resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-2.0.0.tgz#5ef8db295d01e6ed6cbf7aab96998d7822527b68" integrity sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g= -strip-json-comments@2.0.1: +strip-json-comments@2.0.1, strip-json-comments@~2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= @@ -12856,7 +12994,7 @@ tar-stream@^1.5.2: to-buffer "^1.1.1" xtend "^4.0.0" -tar@^4.4.10, tar@^4.4.12, tar@^4.4.8: +tar@^4, tar@^4.4.10, tar@^4.4.12, tar@^4.4.8: version "4.4.13" resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.13.tgz#43b364bc52888d555298637b10d60790254ab525" integrity sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA== @@ -13903,9 +14041,9 @@ x-is-string@^0.1.0: integrity sha1-R0tQhlrzpJqcRlfwWs0UVFj3fYI= xcode@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/xcode/-/xcode-2.1.0.tgz#bab64a7e954bb50ca8d19da7e09531c65a43ecfe" - integrity sha512-uCrmPITrqTEzhn0TtT57fJaNaw8YJs1aCzs+P/QqxsDbvPZSv7XMPPwXrKvHtD6pLjBM/NaVwraWJm8q83Y4iQ== + version "2.0.0" + resolved "https://registry.yarnpkg.com/xcode/-/xcode-2.0.0.tgz#134f1f94c26fbfe8a9aaa9724bfb2772419da1a2" + integrity sha512-5xF6RCjAdDEiEsbbZaS/gBRt3jZ/177otZcpoLCjGN/u1LrfgH7/Sgeeavpr/jELpyDqN2im3AKosl2G2W8hfw== dependencies: simple-plist "^1.0.0" uuid "^3.3.2" From 503a68037ea921f1b9bad417fa091a049d4f1825 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Sat, 2 May 2020 11:34:44 +0200 Subject: [PATCH 037/106] chore: move changelog entry and fix lint --- CHANGELOG.md | 2 +- packages/jest-circus/src/run.ts | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c3136ced264..0099bb296986 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ - `[*]` [**BREAKING**] TypeScript definitions requires a minimum of TypeScript v3.8 ([#9823](https://github.com/facebook/jest/pull/9823)) - `[jest-runtime]` [**BREAKING**] Remove long-deprecated `require.requireActual` and `require.requireMock` methods ([#9854](https://github.com/facebook/jest/pull/9854)) - `[expect, jest-mock, pretty-format]` [**BREAKING**] Remove `build-es5` from package ([#9945](https://github.com/facebook/jest/pull/9945)) +- `[jest-haste-map]` [**BREAKING**] removed `providesModuleNodeModules` ([#8535](https://github.com/facebook/jest/pull/8535)) ### Performance @@ -323,7 +324,6 @@ - `[jest-validate]` [**BREAKING**] Use ESM exports ([#8874](https://github.com/facebook/jest/pull/8874)) - `[jest-types]` Mark `InitialOptions` as `Partial` ([#8848](https://github.com/facebook/jest/pull/8848)) - `[jest-config]` Refactor `normalize` to be more type safe ([#8848](https://github.com/facebook/jest/pull/8848)) -- `[jest-haste-map]` [**BREAKING**] removed `providesModuleNodeModules` ([#8535](https://github.com/facebook/jest/pull/8535)) ## 24.9.0 diff --git a/packages/jest-circus/src/run.ts b/packages/jest-circus/src/run.ts index 9df9df8979d9..ae8e5392988a 100644 --- a/packages/jest-circus/src/run.ts +++ b/packages/jest-circus/src/run.ts @@ -139,9 +139,9 @@ const _callCircusHook = async ({ try { await callAsyncCircusFn(hook.fn, testContext, hook.asyncError, { - isHook: true, - timeout, - }); + isHook: true, + timeout, + }); await dispatch({describeBlock, hook, name: 'hook_success', test}); } catch (error) { await dispatch({describeBlock, error, hook, name: 'hook_failure', test}); @@ -162,9 +162,9 @@ const _callCircusTest = async ( try { await callAsyncCircusFn(test.fn, testContext, test.asyncError, { - isHook: false, - timeout, - }); + isHook: false, + timeout, + }); await dispatch({name: 'test_fn_success', test}); } catch (error) { await dispatch({error, name: 'test_fn_failure', test}); From 97a15e97fc5e951337b3634bc0b752b203562705 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Sat, 2 May 2020 11:54:49 +0200 Subject: [PATCH 038/106] chore: revert lockfile changes from 2b32fe6c --- yarn.lock | 292 ++++++++++++++---------------------------------------- 1 file changed, 77 insertions(+), 215 deletions(-) diff --git a/yarn.lock b/yarn.lock index c758f3cfc9f0..ecc3477240e8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1115,19 +1115,19 @@ which "^1.3.1" "@hapi/address@2.x.x": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@hapi/address/-/address-2.0.0.tgz#9f05469c88cb2fd3dcd624776b54ee95c312126a" - integrity sha512-mV6T0IYqb0xL1UALPFplXYQmR0twnXG0M6jUswpquqT2sD12BOiCiLy3EvMp/Fy7s3DZElC4/aPjEjo2jeZpvw== + version "2.1.4" + resolved "https://registry.yarnpkg.com/@hapi/address/-/address-2.1.4.tgz#5d67ed43f3fd41a69d4b9ff7b56e7c0d1d0a81e5" + integrity sha512-QD1PhQk+s31P1ixsX0H0Suoupp3VMXzIVMSwobR3F3MSUO2YCV0B7xqLcUw/Bh8yuvd3LhpyqLQWTNcRmp6IdQ== "@hapi/bourne@1.x.x": version "1.3.2" resolved "https://registry.yarnpkg.com/@hapi/bourne/-/bourne-1.3.2.tgz#0a7095adea067243ce3283e1b56b8a8f453b242a" integrity sha512-1dVNHT76Uu5N3eJNTYcvxee+jzX4Z9lfciqRRHCU27ihbUcYi+iSc2iml5Ke1LXe1SyJCLA0+14Jh4tXJgOppA== -"@hapi/hoek@8.x.x": - version "8.2.1" - resolved "https://registry.yarnpkg.com/@hapi/hoek/-/hoek-8.2.1.tgz#924af04cbb22e17359c620d2a9c946e63f58eb77" - integrity sha512-JPiBy+oSmsq3St7XlipfN5pNA6bDJ1kpa73PrK/zR29CVClDVqy04AanM/M/qx5bSF+I61DdCfAvRrujau+zRg== +"@hapi/hoek@8.x.x", "@hapi/hoek@^8.3.0": + version "8.5.1" + resolved "https://registry.yarnpkg.com/@hapi/hoek/-/hoek-8.5.1.tgz#fde96064ca446dec8c55a8c2f130957b070c6e06" + integrity sha512-yN7kbciD87WzLGc5539Tn0sApjyiGHAJgKvG9W8C7O+6c7qmoQMfVs0W4bX17eqz6C78QJqqFrtgdK5EWf6Qow== "@hapi/joi@^15.0.3": version "15.1.1" @@ -1140,11 +1140,11 @@ "@hapi/topo" "3.x.x" "@hapi/topo@3.x.x": - version "3.1.3" - resolved "https://registry.yarnpkg.com/@hapi/topo/-/topo-3.1.3.tgz#c7a02e0d936596d29f184e6d7fdc07e8b5efce11" - integrity sha512-JmS9/vQK6dcUYn7wc2YZTqzIKubAQcJKu2KCKAru6es482U5RT5fP1EXCPtlXpiK7PR0On/kpQKI4fRKkzpZBQ== + version "3.1.6" + resolved "https://registry.yarnpkg.com/@hapi/topo/-/topo-3.1.6.tgz#68d935fa3eae7fdd5ab0d7f953f3205d8b2bfc29" + integrity sha512-tAag0jEcjwH+P2quUfipd7liWCNX2F8NvYjQp2wtInsZxnMlypdw0FtAOLxtvvkO+GSRRbmNi8m/5y42PQJYCQ== dependencies: - "@hapi/hoek" "8.x.x" + "@hapi/hoek" "^8.3.0" "@istanbuljs/load-nyc-config@^1.0.0": version "1.0.0" @@ -2715,9 +2715,9 @@ acorn-walk@^6.0.1: integrity sha512-7evsyfH1cLOCdAzZAd43Cic04yKydNx0cF+7tiA19p1XnLLPU4dpCQOqpjqwokFe//vS0QqfqqjCS2JkiIs0cA== acorn@^6.0.1: - version "6.3.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.3.0.tgz#0087509119ffa4fc0a0041d1e93a417e68cb856e" - integrity sha512-/czfa8BwS88b9gWQVhc8eknunSA2DoJpJyTQkhheIf5E48u1N0R4q/YxxsAeqRrmK9TQ/uYfgLDfZo91UlANIA== + version "6.4.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.1.tgz#531e58ba3f51b9dacb9a6646ca4debf5b14ca474" + integrity sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA== acorn@^7.1.0, acorn@^7.1.1: version "7.1.1" @@ -3290,40 +3290,7 @@ babel-preset-current-node-syntax@^0.1.2: "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" "@babel/plugin-syntax-optional-chaining" "^7.8.3" -babel-preset-fbjs@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/babel-preset-fbjs/-/babel-preset-fbjs-3.2.0.tgz#c0e6347d3e0379ed84b3c2434d3467567aa05297" - integrity sha512-5Jo+JeWiVz2wHUUyAlvb/sSYnXNig9r+HqGAOSfh5Fzxp7SnAaR/tEGRJ1ZX7C77kfk82658w6R5Z+uPATTD9g== - dependencies: - "@babel/plugin-proposal-class-properties" "^7.0.0" - "@babel/plugin-proposal-object-rest-spread" "^7.0.0" - "@babel/plugin-syntax-class-properties" "^7.0.0" - "@babel/plugin-syntax-flow" "^7.0.0" - "@babel/plugin-syntax-jsx" "^7.0.0" - "@babel/plugin-syntax-object-rest-spread" "^7.0.0" - "@babel/plugin-transform-arrow-functions" "^7.0.0" - "@babel/plugin-transform-block-scoped-functions" "^7.0.0" - "@babel/plugin-transform-block-scoping" "^7.0.0" - "@babel/plugin-transform-classes" "^7.0.0" - "@babel/plugin-transform-computed-properties" "^7.0.0" - "@babel/plugin-transform-destructuring" "^7.0.0" - "@babel/plugin-transform-flow-strip-types" "^7.0.0" - "@babel/plugin-transform-for-of" "^7.0.0" - "@babel/plugin-transform-function-name" "^7.0.0" - "@babel/plugin-transform-literals" "^7.0.0" - "@babel/plugin-transform-member-expression-literals" "^7.0.0" - "@babel/plugin-transform-modules-commonjs" "^7.0.0" - "@babel/plugin-transform-object-super" "^7.0.0" - "@babel/plugin-transform-parameters" "^7.0.0" - "@babel/plugin-transform-property-literals" "^7.0.0" - "@babel/plugin-transform-react-display-name" "^7.0.0" - "@babel/plugin-transform-react-jsx" "^7.0.0" - "@babel/plugin-transform-shorthand-properties" "^7.0.0" - "@babel/plugin-transform-spread" "^7.0.0" - "@babel/plugin-transform-template-literals" "^7.0.0" - babel-plugin-syntax-trailing-function-commas "^7.0.0-beta.0" - -babel-preset-fbjs@^3.3.0: +babel-preset-fbjs@^3.2.0, babel-preset-fbjs@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/babel-preset-fbjs/-/babel-preset-fbjs-3.3.0.tgz#a6024764ea86c8e06a22d794ca8b69534d263541" integrity sha512-7QTLTCd2gwB2qGoi5epSULMHugSVgpcVt5YAeiFO9ABLrutDQzKfGwzxgZHLpugq8qMdg/DhRZDZ5CLKxBkEbw== @@ -3417,7 +3384,7 @@ benchmark@^2.1.4: lodash "^4.17.4" platform "^1.3.3" -big-integer@^1.6.7: +big-integer@^1.6.44: version "1.6.48" resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.48.tgz#8fd88bd1632cba4a1c8c3e3d7159f08bb95b4b9e" integrity sha512-j51egjPa7/i+RdiRuJbPdJ2FIUYYPhvYLjzoYbcMMm62ooO6F94fETG4MTs46zPAF9Brs04OajboA/qTGuz78w== @@ -3485,7 +3452,7 @@ binary-extensions@^2.0.0: resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.0.0.tgz#23c0df14f6a88077f5f986c0d167ec03c3d5537c" integrity sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow== -bindings@^1.3.0: +bindings@^1.3.0, bindings@^1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== @@ -3544,19 +3511,19 @@ boolbase@^1.0.0, boolbase@~1.0.0: resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24= -bplist-creator@0.0.7: - version "0.0.7" - resolved "https://registry.yarnpkg.com/bplist-creator/-/bplist-creator-0.0.7.tgz#37df1536092824b87c42f957b01344117372ae45" - integrity sha1-N98VNgkoJLh8QvlXsBNEEXNyrkU= +bplist-creator@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/bplist-creator/-/bplist-creator-0.0.8.tgz#56b2a6e79e9aec3fc33bf831d09347d73794e79c" + integrity sha512-Za9JKzD6fjLC16oX2wsXfc+qBEhJBJB1YPInoAQpMLhDuj5aVOv1baGeIQSq1Fr3OCqzvsoQcSBSwGId/Ja2PA== dependencies: stream-buffers "~2.2.0" -bplist-parser@0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/bplist-parser/-/bplist-parser-0.1.1.tgz#d60d5dcc20cba6dc7e1f299b35d3e1f95dafbae6" - integrity sha1-1g1dzCDLptx+HymbNdPh+V2vuuY= +bplist-parser@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/bplist-parser/-/bplist-parser-0.2.0.tgz#43a9d183e5bf9d545200ceac3e712f79ebbe8d0e" + integrity sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw== dependencies: - big-integer "^1.6.7" + big-integer "^1.6.44" brace-expansion@^1.1.7: version "1.1.11" @@ -3821,17 +3788,7 @@ caniuse-api@^3.0.0: lodash.memoize "^4.1.2" lodash.uniq "^4.5.0" -caniuse-lite@^1.0.0: - version "1.0.30000985" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000985.tgz#0eb40f6c8a8c219155cbe43c4975c0efb4a0f77f" - integrity sha512-1ngiwkgqAYPG0JSSUp3PUDGPKKY59EK7NrGGX+VOxaKCNzRbNc7uXMny+c3VJfZxtoK3wSImTvG9T9sXiTw2+w== - -caniuse-lite@^1.0.30000989: - version "1.0.30001027" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001027.tgz#283e2ef17d94889cc216a22c6f85303d78ca852d" - integrity sha512-7xvKeErvXZFtUItTHgNtLgS9RJpVnwBlWX8jSo/BO8VsF6deszemZSkJJJA1KOKrXuzZH4WALpAJdq5EyfgMLg== - -caniuse-lite@^1.0.30001038, caniuse-lite@^1.0.30001039: +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000989, caniuse-lite@^1.0.30001038, caniuse-lite@^1.0.30001039: version "1.0.30001040" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001040.tgz#103fc8e6eb1d7397e95134cd0e996743353d58ea" integrity sha512-Ep0tEPeI5wCvmJNrXjE3etgfI+lkl1fTDU6Y3ZH1mhrjkPlVI9W4pcKbMo+BQLpEWKVYYp2EmYaRsqpPC3k7lQ== @@ -4223,10 +4180,10 @@ command-exists@^1.2.8: resolved "https://registry.yarnpkg.com/command-exists/-/command-exists-1.2.9.tgz#c50725af3808c8ab0260fd60b01fbfa25b954f69" integrity sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w== -commander@^2.11.0, commander@^2.19.0: - version "2.20.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422" - integrity sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ== +commander@^2.11.0, commander@^2.19.0, commander@~2.20.3: + version "2.20.3" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== commander@^4.0.1: version "4.1.1" @@ -4243,11 +4200,6 @@ commander@~2.13.0: resolved "https://registry.yarnpkg.com/commander/-/commander-2.13.0.tgz#6964bca67685df7c1f1430c584f07d7597885b9c" integrity sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA== -commander@~2.20.3: - version "2.20.3" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" - integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== - commander@~2.8.1: version "2.8.1" resolved "https://registry.yarnpkg.com/commander/-/commander-2.8.1.tgz#06be367febfda0c330aa1e2a072d3dc9762425d4" @@ -4807,9 +4759,9 @@ dateformat@^3.0.0: integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q== dayjs@^1.8.15: - version "1.8.15" - resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.8.15.tgz#7121bc04e6a7f2621ed6db566be4a8aaf8c3913e" - integrity sha512-HYHCI1nohG52B45vCQg8Re3hNDZbMroWPkhz50yaX7Lu0ATyjGsTdoYZBpjED9ar6chqTx2dmSmM8A51mojnAg== + version "1.8.25" + resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.8.25.tgz#d09a8696cee7191bc1289e739f96626391b9c73c" + integrity sha512-Pk36juDfQQGDCgr0Lqd1kw15w3OS6xt21JaLPE3lCfsEf8KrERGwDNwvK1tRjrjqFC0uZBJncT4smZQ4F+uV5g== debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.8, debug@^2.6.9: version "2.6.9" @@ -4825,7 +4777,7 @@ debug@3.1.0: dependencies: ms "2.0.0" -debug@3.2.6, debug@^3.1.0, debug@^3.1.1, debug@^3.2.5, debug@^3.2.6: +debug@3.2.6, debug@^3.1.0, debug@^3.1.1, debug@^3.2.5: version "3.2.6" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== @@ -4934,11 +4886,6 @@ dedent@^0.7.0: resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" integrity sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw= -deep-extend@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" - integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== - deep-is@^0.1.3, deep-is@~0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" @@ -5035,11 +4982,6 @@ detect-indent@^5.0.0: resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-5.0.0.tgz#3871cc0a6a002e8c3e5b3cf7f336264675f06b9d" integrity sha1-OHHMCmoALow+Wzz38zYmRnXwa50= -detect-libc@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" - integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups= - detect-newline@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" @@ -5381,12 +5323,7 @@ env-paths@^2.2.0: resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.0.tgz#cdca557dc009152917d6166e2febe1f039685e43" integrity sha512-6u0VYSCo/OW6IoD5WCLLy9JUGARbamfSavcNXry/eu8aHVFei6CD3Sw+VGX5alea1i9pgPHW0mbu6Xj0uBh7gA== -envinfo@^7.1.0: - version "7.3.1" - resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.3.1.tgz#892e42f7bf858b3446d9414ad240dbaf8da52f09" - integrity sha512-GvXiDTqLYrORVSCuJCsWHPXF5BFvoWMQA9xX4YVjPT1jyS3aZEHUBwjzxU/6LTPF9ReHgVEbX7IEN5UvSXHw/A== - -envinfo@^7.3.1: +envinfo@^7.1.0, envinfo@^7.3.1: version "7.5.0" resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.5.0.tgz#91410bb6db262fb4f1409bd506e9ff57e91023f4" integrity sha512-jDgnJaF/Btomk+m3PZDTTCb5XIIIX3zYItnCRfF73zVgvinLoRomuhi75Y4su0PtQxWz4v66XnLLckyvyJTOIQ== @@ -6517,12 +6454,12 @@ fs.realpath@^1.0.0: integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= fsevents@^1.2.7: - version "1.2.9" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.9.tgz#3f5ed66583ccd6f400b5a00db6f7e861363e388f" - integrity sha512-oeyj2H3EjjonWcFjD5NvZNE9Rqe4UW+nQBU2HNeKw0koVLEFIhtyETyAakeAM3de7Z/SW5kcA+fZUait9EApnw== + version "1.2.12" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.12.tgz#db7e0d8ec3b0b45724fd4d83d43554a8f1f0de5c" + integrity sha512-Ggd/Ktt7E7I8pxZRbGIs7vwqAPscSESMrCSkx2FtWeqmheJgCo2R74fTsZFCifr0VTPwqRpPv17+6b8Zp7th0Q== dependencies: + bindings "^1.5.0" nan "^2.12.1" - node-pre-gyp "^0.12.0" fsevents@^2.1.2, fsevents@~2.1.1, fsevents@~2.1.2: version "2.1.2" @@ -7249,7 +7186,7 @@ humanize-ms@^1.2.1: dependencies: ms "^2.0.0" -iconv-lite@0.4.24, iconv-lite@^0.4.17, iconv-lite@^0.4.24, iconv-lite@^0.4.4, iconv-lite@~0.4.13: +iconv-lite@0.4.24, iconv-lite@^0.4.17, iconv-lite@^0.4.24, iconv-lite@~0.4.13: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== @@ -7437,7 +7374,7 @@ inherits@2.0.3: resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= -ini@^1.3.2, ini@^1.3.4, ini@^1.3.5, ini@~1.3.0: +ini@^1.3.2, ini@^1.3.4, ini@^1.3.5: version "1.3.5" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== @@ -7515,21 +7452,21 @@ inquirer@^3.0.6: through "^2.3.6" inquirer@^6.2.0: - version "6.5.1" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.5.1.tgz#8bfb7a5ac02dac6ff641ac4c5ff17da112fcdb42" - integrity sha512-uxNHBeQhRXIoHWTSNYUFhQVrHYFThIt6IVo2fFmSe8aBwdR3/w6b58hJpiL/fMukFkvGzjg+hSxFtwvVmKZmXw== + version "6.5.2" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.5.2.tgz#ad50942375d036d327ff528c08bd5fab089928ca" + integrity sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ== dependencies: - ansi-escapes "^4.2.1" + ansi-escapes "^3.2.0" chalk "^2.4.2" - cli-cursor "^3.1.0" + cli-cursor "^2.1.0" cli-width "^2.0.0" external-editor "^3.0.3" - figures "^3.0.0" - lodash "^4.17.15" - mute-stream "0.0.8" + figures "^2.0.0" + lodash "^4.17.12" + mute-stream "0.0.7" run-async "^2.2.0" rxjs "^6.4.0" - string-width "^4.1.0" + string-width "^2.1.0" strip-ansi "^5.1.0" through "^2.3.6" @@ -8260,9 +8197,9 @@ jest-zone-patch@*: integrity sha512-K5uHLHgMgi2Eyj74gbY+xSeGGekb5U48bXsgDwgipRbFdaekyZK+TAcp8auamqU4UjrAt5S4sIUZz/2bBNyTTA== jetifier@^1.6.2: - version "1.6.4" - resolved "https://registry.yarnpkg.com/jetifier/-/jetifier-1.6.4.tgz#6159db8e275d97980d26162897a0648b6d4a3222" - integrity sha512-+f/4OLeqY8RAmXnonI1ffeY1DR8kMNJPhv5WMFehchf7U71cjMQVKkOz1n6asz6kfVoAqKNWJz1A/18i18AcXA== + version "1.6.5" + resolved "https://registry.yarnpkg.com/jetifier/-/jetifier-1.6.5.tgz#ea87324a4230bef20a9651178ecab978ee54a8cb" + integrity sha512-T7yzBSu9PR+DqjYt+I0KVO1XTb1QhAfHnXV5Nd3xpbXM6Xg4e3vP60Q4qkNU8Fh6PHC2PivPUNN3rY7G2MxcDQ== jpegtran-bin@^4.0.0: version "4.0.0" @@ -8826,9 +8763,9 @@ logalot@^2.0.0: squeak "^1.0.0" logkitty@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/logkitty/-/logkitty-0.6.0.tgz#e327d4b144dd5c11d912d002cf57ac9fbae20e15" - integrity sha512-+F1ROENmfG3b4N9WGlRz5QGTBw/xgjZe2JzZLADYeCmzdId5c+QI7WTGRofs/10hwP84aAmjK2WStx+/oQVnwA== + version "0.6.1" + resolved "https://registry.yarnpkg.com/logkitty/-/logkitty-0.6.1.tgz#fe29209669d261539cbd6bb998a136fc92a1a05c" + integrity sha512-cHuXN8qUZuzX/7kB6VyS7kB4xyD24e8gyHXIFNhIv+fjW3P+jEXNUhj0o/7qWJtv7UZpbnPgUqzu/AZQ8RAqxQ== dependencies: ansi-fragments "^0.2.1" dayjs "^1.8.15" @@ -9106,12 +9043,7 @@ merge-stream@^2.0.0: resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== -merge2@^1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.2.3.tgz#7ee99dbd69bb6481689253f018488a1b902b0ed5" - integrity sha512-gdUU1Fwj5ep4kplwcmftruWofEFt6lfpkkr3h860CXbAB9c3hGb55EOL2ali0Td5oebvW0E1+3Sr+Ur7XfKpRA== - -merge2@^1.3.0: +merge2@^1.2.3, merge2@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.3.0.tgz#5b366ee83b2f1582c48f87e47cf1a9352103ca81" integrity sha512-2j4DAdlBOkiSZIsaXk4mTE3sRS02yBHAtfy127xRV3bQUFqXkjHCHLW6Scv7DwNRbIWNHH8zpnz9zMaKXIdvYw== @@ -9694,15 +9626,6 @@ nearley@^2.7.10: randexp "0.4.6" semver "^5.4.1" -needle@^2.2.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/needle/-/needle-2.4.1.tgz#14af48732463d7475696f937626b1b993247a56a" - integrity sha512-x/gi6ijr4B7fwl6WYL9FwlCvRQKGlUNvnceho8wxkwXqN8jvVmmmATTmZPRRG7b/yC1eode26C2HO9jl78Du9g== - dependencies: - debug "^3.2.6" - iconv-lite "^0.4.4" - sax "^1.2.4" - negotiator@0.6.2: version "0.6.2" resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" @@ -9804,22 +9727,6 @@ node-notifier@^6.0.0: shellwords "^0.1.1" which "^1.3.1" -node-pre-gyp@^0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.12.0.tgz#39ba4bb1439da030295f899e3b520b7785766149" - integrity sha512-4KghwV8vH5k+g2ylT+sLTjy5wmUOb9vPhnM8NHvRf9dHmnW/CndrFXy2aRPaPST6dugXSdHXfeaHQm77PIz/1A== - dependencies: - detect-libc "^1.0.2" - mkdirp "^0.5.1" - needle "^2.2.1" - nopt "^4.0.1" - npm-packlist "^1.1.6" - npmlog "^4.0.2" - rc "^1.2.7" - rimraf "^2.6.1" - semver "^5.3.0" - tar "^4" - node-releases@^1.1.29, node-releases@^1.1.53: version "1.1.53" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.53.tgz#2d821bfa499ed7c5dffc5e2f28c88e78a08ee3f4" @@ -9923,7 +9830,7 @@ npm-normalize-package-bin@^1.0.0, npm-normalize-package-bin@^1.0.1: semver "^5.6.0" validate-npm-package-name "^3.0.0" -npm-packlist@^1.1.6, npm-packlist@^1.4.4: +npm-packlist@^1.4.4: version "1.4.8" resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.8.tgz#56ee6cc135b9f98ad3d51c1c95da22bbb9b2ef3e" integrity sha512-5+AZgwru5IevF5ZdnFglB5wNlHG1AOOuw28WhUq8/8emhBmLv6jX5by4WJCh7lW0uSYZYS6DXqIsyZVIXRZU9A== @@ -9955,7 +9862,7 @@ npm-run-path@^4.0.0: dependencies: path-key "^3.0.0" -npmlog@^4.0.2, npmlog@^4.1.2: +npmlog@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg== @@ -11272,16 +11179,6 @@ raw-body@~1.1.0: bytes "1" string_decoder "0.10" -rc@^1.2.7: - version "1.2.8" - resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" - integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== - dependencies: - deep-extend "^0.6.0" - ini "~1.3.0" - minimist "^1.2.0" - strip-json-comments "~2.0.1" - react-dev-utils@^9.1.0: version "9.1.0" resolved "https://registry.yarnpkg.com/react-dev-utils/-/react-dev-utils-9.1.0.tgz#3ad2bb8848a32319d760d0a84c56c14bdaae5e81" @@ -11336,17 +11233,7 @@ react-error-overlay@^6.0.3: resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-6.0.7.tgz#1dcfb459ab671d53f660a991513cb2f0a0553108" integrity sha512-TAv1KJFh3RhqxNvhzxj6LeT5NWklP6rDr2a0jaTfsZ5wSZWHOGeqQyejUp3xxLfPt2UpyJEcVQB/zyPcmonNFA== -react-is@^16.12.0, react-is@^16.9.0: - version "16.12.0" - resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.12.0.tgz#2cc0fe0fba742d97fd527c42a13bec4eeb06241c" - integrity sha512-rPCkf/mWBtKc97aLL9/txD8DZdemK0vkA3JMLShjlJB3Pj3s+lpf1KaBzMfQrAmhMQB0n1cU/SUGgKKBCe837Q== - -react-is@^16.8.1, react-is@^16.8.4: - version "16.9.0" - resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.9.0.tgz#21ca9561399aad0ff1a7701c01683e8ca981edcb" - integrity sha512-tJBzzzIgnnRfEm046qRcURvwQnZVXmuCbscxUO5RWrGTXpon2d4c8mI0D8WE6ydVIm29JiLB6+RslkIvym9Rjw== - -react-is@^16.8.6: +react-is@^16.12.0, react-is@^16.8.1, react-is@^16.8.4, react-is@^16.8.6, react-is@^16.9.0: version "16.13.1" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== @@ -11403,17 +11290,7 @@ react-test-renderer@*, react-test-renderer@16.11.0, react-test-renderer@^16.0.0- react-is "^16.8.6" scheduler "^0.17.0" -react@*, react@^16.8.4: - version "16.8.6" - resolved "https://registry.yarnpkg.com/react/-/react-16.8.6.tgz#ad6c3a9614fd3a4e9ef51117f54d888da01f2bbe" - integrity sha512-pC0uMkhLaHm11ZSJULfOBqV4tIZkx87ZLvbbQYunNixAAvjnC+snJCg0XQXn9VIsttVsbZP/H/ewzgsd5fxKXw== - dependencies: - loose-envify "^1.1.0" - object-assign "^4.1.1" - prop-types "^15.6.2" - scheduler "^0.13.6" - -react@16.11.0: +react@*, react@16.11.0, react@^16.8.4: version "16.11.0" resolved "https://registry.yarnpkg.com/react/-/react-16.11.0.tgz#d294545fe62299ccee83363599bf904e4a07fdbb" integrity sha512-M5Y8yITaLmU0ynd0r1Yvfq98Rmll6q8AxaEe88c8e7LxO8fZ2cNgmFt0aGAS9wzf1Ao32NKXtCl+/tVVtkxq6g== @@ -11947,7 +11824,7 @@ rimraf@2.6.3: dependencies: glob "^7.1.3" -rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2, rimraf@^2.6.3: +rimraf@^2.5.4, rimraf@^2.6.2, rimraf@^2.6.3: version "2.7.1" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== @@ -12022,17 +11899,10 @@ rxjs@^5.4.3: dependencies: symbol-observable "1.0.1" -rxjs@^6.4.0: - version "6.5.2" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.2.tgz#2e35ce815cd46d84d02a209fb4e5921e051dbec7" - integrity sha512-HUb7j3kvb7p7eCUHE3FqjoDsC1xfZQ4AHFWfTKSpZ+sAhhz5X1WX0ZuUqWbzB2QhSLp3DoLUG+hMdEDKqWo2Zg== - dependencies: - tslib "^1.9.0" - -rxjs@^6.5.3: - version "6.5.4" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.4.tgz#e0777fe0d184cec7872df147f303572d414e211c" - integrity sha512-naMQXcgEo3csAEGvw/NydRA0fuS2nDZJiw1YUWFKU7aPPAPGZEsD4Iimit96qwCieH6y614MCLYwdkrWx7z/7Q== +rxjs@^6.4.0, rxjs@^6.5.3: + version "6.5.5" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.5.tgz#c5c884e3094c8cfee31bf27eb87e54ccfc87f9ec" + integrity sha512-WfQI+1gohdf0Dai/Bbmk5L5ItH5tYqm3ki2c5GdWhKjalzjg93N3avFjVStyZZz+A2Em+ZxKH5bNghw9UeylGQ== dependencies: tslib "^1.9.0" @@ -12105,14 +11975,6 @@ scheduler@0.17.0, scheduler@^0.17.0: loose-envify "^1.1.0" object-assign "^4.1.1" -scheduler@^0.13.6: - version "0.13.6" - resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.13.6.tgz#466a4ec332467b31a91b9bf74e5347072e4cd889" - integrity sha512-IWnObHt413ucAYKsD9J1QShUKkbKLQQHdxRyw73sw4FN26iWr3DY/H34xGPe4nmL1DwXyWmSWmMrA9TfQbE/XQ== - dependencies: - loose-envify "^1.1.0" - object-assign "^4.1.1" - seek-bzip@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/seek-bzip/-/seek-bzip-1.0.5.tgz#cfe917cb3d274bcffac792758af53173eb1fabdc" @@ -12300,12 +12162,12 @@ signal-exit@^3.0.0, signal-exit@^3.0.2: integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== simple-plist@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/simple-plist/-/simple-plist-1.0.0.tgz#bed3085633b22f371e111f45d159a1ccf94b81eb" - integrity sha512-043L2rO80LVF7zfZ+fqhsEkoJFvW8o59rt/l4ctx1TJWoTx7/jkiS1R5TatD15Z1oYnuLJytzE7gcnnBuIPL2g== + version "1.1.0" + resolved "https://registry.yarnpkg.com/simple-plist/-/simple-plist-1.1.0.tgz#8354ab63eb3922a054c78ce96c209c532e907a23" + integrity sha512-2i5Tc0BYAqppM7jVzmNrI+aEUntPolIq4fDgji6WuNNn1D/qYdn2KwoLhZdzQkE04lu9L5tUoeJsjuJAvd+lFg== dependencies: - bplist-creator "0.0.7" - bplist-parser "0.1.1" + bplist-creator "0.0.8" + bplist-parser "0.2.0" plist "^3.0.1" simple-swizzle@^0.2.2: @@ -12851,7 +12713,7 @@ strip-indent@^2.0.0: resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-2.0.0.tgz#5ef8db295d01e6ed6cbf7aab96998d7822527b68" integrity sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g= -strip-json-comments@2.0.1, strip-json-comments@~2.0.1: +strip-json-comments@2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= @@ -12994,7 +12856,7 @@ tar-stream@^1.5.2: to-buffer "^1.1.1" xtend "^4.0.0" -tar@^4, tar@^4.4.10, tar@^4.4.12, tar@^4.4.8: +tar@^4.4.10, tar@^4.4.12, tar@^4.4.8: version "4.4.13" resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.13.tgz#43b364bc52888d555298637b10d60790254ab525" integrity sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA== @@ -14041,9 +13903,9 @@ x-is-string@^0.1.0: integrity sha1-R0tQhlrzpJqcRlfwWs0UVFj3fYI= xcode@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/xcode/-/xcode-2.0.0.tgz#134f1f94c26fbfe8a9aaa9724bfb2772419da1a2" - integrity sha512-5xF6RCjAdDEiEsbbZaS/gBRt3jZ/177otZcpoLCjGN/u1LrfgH7/Sgeeavpr/jELpyDqN2im3AKosl2G2W8hfw== + version "2.1.0" + resolved "https://registry.yarnpkg.com/xcode/-/xcode-2.1.0.tgz#bab64a7e954bb50ca8d19da7e09531c65a43ecfe" + integrity sha512-uCrmPITrqTEzhn0TtT57fJaNaw8YJs1aCzs+P/QqxsDbvPZSv7XMPPwXrKvHtD6pLjBM/NaVwraWJm8q83Y4iQ== dependencies: simple-plist "^1.0.0" uuid "^3.3.2" From fd3062d20b5b4e108a24498050a6bb3463fd9586 Mon Sep 17 00:00:00 2001 From: cpojer Date: Sat, 2 May 2020 11:23:10 +0100 Subject: [PATCH 039/106] [BREAKING] Pojer -> Nakazawa --- website/blog/2016-03-11-javascript-unit-testing-performance.md | 2 +- website/blog/2016-04-12-jest-11.md | 2 +- website/blog/2016-06-22-jest-13.md | 2 +- website/blog/2016-07-27-jest-14.md | 2 +- website/blog/2016-09-01-jest-15.md | 2 +- website/blog/2016-10-03-jest-16.md | 2 +- website/blog/2016-12-15-2016-in-jest.md | 2 +- ...017-05-06-jest-20-delightful-testing-multi-project-runner.md | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/website/blog/2016-03-11-javascript-unit-testing-performance.md b/website/blog/2016-03-11-javascript-unit-testing-performance.md index 4daeb517fd72..26872bc3e5d7 100644 --- a/website/blog/2016-03-11-javascript-unit-testing-performance.md +++ b/website/blog/2016-03-11-javascript-unit-testing-performance.md @@ -1,6 +1,6 @@ --- title: JavaScript Unit Testing Performance -author: Christoph Pojer +author: Christoph Nakazawa authorURL: http://twitter.com/cpojer authorFBID: 100000023028168 --- diff --git a/website/blog/2016-04-12-jest-11.md b/website/blog/2016-04-12-jest-11.md index c2d2e7bc0652..298f4449a23d 100644 --- a/website/blog/2016-04-12-jest-11.md +++ b/website/blog/2016-04-12-jest-11.md @@ -1,6 +1,6 @@ --- title: Jest 11.0 -author: Christoph Pojer +author: Christoph Nakazawa authorURL: http://twitter.com/cpojer authorFBID: 100000023028168 --- diff --git a/website/blog/2016-06-22-jest-13.md b/website/blog/2016-06-22-jest-13.md index e0ea31c97caf..593cb8d3a142 100644 --- a/website/blog/2016-06-22-jest-13.md +++ b/website/blog/2016-06-22-jest-13.md @@ -1,6 +1,6 @@ --- title: Jest 13.0: Flow & REPL -author: Christoph Pojer +author: Christoph Nakazawa authorURL: http://twitter.com/cpojer authorFBID: 100000023028168 --- diff --git a/website/blog/2016-07-27-jest-14.md b/website/blog/2016-07-27-jest-14.md index 2700c14e6b4e..228f0ad9e77a 100644 --- a/website/blog/2016-07-27-jest-14.md +++ b/website/blog/2016-07-27-jest-14.md @@ -1,6 +1,6 @@ --- title: Jest 14.0: React Tree Snapshot Testing -author: Christoph Pojer +author: Christoph Nakazawa authorURL: http://twitter.com/cpojer authorFBID: 100000023028168 --- diff --git a/website/blog/2016-09-01-jest-15.md b/website/blog/2016-09-01-jest-15.md index c64ed4da6b9f..a24b7e93db21 100644 --- a/website/blog/2016-09-01-jest-15.md +++ b/website/blog/2016-09-01-jest-15.md @@ -1,6 +1,6 @@ --- title: Jest 15.0: New Defaults for Jest -author: Christoph Pojer +author: Christoph Nakazawa authorURL: http://twitter.com/cpojer authorFBID: 100000023028168 --- diff --git a/website/blog/2016-10-03-jest-16.md b/website/blog/2016-10-03-jest-16.md index aeb81980879e..56c18685ea9c 100644 --- a/website/blog/2016-10-03-jest-16.md +++ b/website/blog/2016-10-03-jest-16.md @@ -1,6 +1,6 @@ --- title: Jest 16.0: Turbocharged CLI & Community Update -author: Christoph Pojer +author: Christoph Nakazawa authorURL: http://twitter.com/cpojer authorFBID: 100000023028168 --- diff --git a/website/blog/2016-12-15-2016-in-jest.md b/website/blog/2016-12-15-2016-in-jest.md index 619e2ada75d8..d765b9916405 100644 --- a/website/blog/2016-12-15-2016-in-jest.md +++ b/website/blog/2016-12-15-2016-in-jest.md @@ -1,6 +1,6 @@ --- title: 2016 in Jest -author: Christoph Pojer +author: Christoph Nakazawa authorURL: http://twitter.com/cpojer authorFBID: 100000023028168 --- diff --git a/website/blog/2017-05-06-jest-20-delightful-testing-multi-project-runner.md b/website/blog/2017-05-06-jest-20-delightful-testing-multi-project-runner.md index b518e4363c9d..515cd405871f 100644 --- a/website/blog/2017-05-06-jest-20-delightful-testing-multi-project-runner.md +++ b/website/blog/2017-05-06-jest-20-delightful-testing-multi-project-runner.md @@ -1,6 +1,6 @@ --- title: Jest 20: 💖 Delightful Testing & 🏃🏽 Multi-Project-Runner -author: Christoph Pojer +author: Christoph Nakazawa authorURL: http://twitter.com/cpojer authorFBID: 100000023028168 --- From 37a94023cdad2a12c2d37edb6dc87728ef62c34d Mon Sep 17 00:00:00 2001 From: Christoph Nakazawa Date: Sat, 2 May 2020 11:45:32 +0100 Subject: [PATCH 040/106] Remove leftover `providesModuleNodeModules` (#9948) --- packages/jest-core/src/__tests__/SearchSource.test.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/jest-core/src/__tests__/SearchSource.test.ts b/packages/jest-core/src/__tests__/SearchSource.test.ts index c2effc89edd3..fbc4513ef1f6 100644 --- a/packages/jest-core/src/__tests__/SearchSource.test.ts +++ b/packages/jest-core/src/__tests__/SearchSource.test.ts @@ -545,7 +545,6 @@ describe('SearchSource', () => { __dirname, '../../../jest-haste-map/src/__tests__/haste_impl.js', ), - providesModuleNodeModules: [], }, name: 'SearchSource-findRelatedSourcesFromTestsInChangedFiles-tests', rootDir, From 56782b9542f69c59b0361f1dc5e0fe6bd3ca2f90 Mon Sep 17 00:00:00 2001 From: Mikhail Bodrov Date: Sat, 2 May 2020 14:03:34 +0300 Subject: [PATCH 041/106] chore: drop node 8 support (#9423) --- .circleci/config.yml | 17 ----------------- .github/workflows/nodejs.yml | 3 +-- CHANGELOG.md | 1 + babel.config.js | 2 +- package.json | 3 +-- packages/babel-jest/package.json | 2 +- packages/babel-plugin-jest-hoist/package.json | 2 +- packages/babel-preset-jest/package.json | 2 +- packages/diff-sequences/package.json | 2 +- packages/eslint-config-fb-strict/package.json | 2 +- packages/expect/package.json | 2 +- .../__snapshots__/matchers.test.js.snap | 4 ++-- packages/jest-changed-files/package.json | 2 +- packages/jest-circus/package.json | 2 +- packages/jest-cli/package.json | 2 +- packages/jest-config/package.json | 2 +- .../jest-config/src/__tests__/Defaults.test.ts | 2 -- .../src/__tests__/readConfig.test.ts | 2 -- .../src/__tests__/readConfigs.test.ts | 2 -- packages/jest-config/src/importEsm.ts | 14 -------------- .../src/readConfigFileAndSetRootDir.ts | 7 +++++-- packages/jest-console/package.json | 2 +- packages/jest-core/package.json | 2 +- packages/jest-diff/package.json | 2 +- packages/jest-docblock/package.json | 2 +- packages/jest-each/package.json | 2 +- packages/jest-environment-jsdom/package.json | 2 +- packages/jest-environment-node/package.json | 8 ++------ packages/jest-environment-node/src/index.ts | 8 -------- packages/jest-environment/package.json | 2 +- packages/jest-fake-timers/package.json | 2 +- packages/jest-get-type/package.json | 2 +- packages/jest-globals/package.json | 2 +- packages/jest-haste-map/package.json | 2 +- packages/jest-jasmine2/package.json | 2 +- packages/jest-leak-detector/package.json | 2 +- packages/jest-matcher-utils/package.json | 2 +- packages/jest-message-util/package.json | 2 +- packages/jest-mock/package.json | 2 +- packages/jest-phabricator/package.json | 2 +- packages/jest-regex-util/package.json | 2 +- packages/jest-repl/package.json | 2 +- packages/jest-reporters/package.json | 2 +- packages/jest-resolve-dependencies/package.json | 2 +- packages/jest-resolve/package.json | 2 +- packages/jest-runner/package.json | 2 +- packages/jest-runtime/package.json | 2 +- packages/jest-serializer/package.json | 2 +- packages/jest-snapshot/package.json | 2 +- packages/jest-source-map/package.json | 2 +- packages/jest-test-result/package.json | 2 +- packages/jest-test-sequencer/package.json | 2 +- packages/jest-transform/package.json | 2 +- packages/jest-types/package.json | 2 +- packages/jest-util/package.json | 2 +- packages/jest-validate/package.json | 2 +- packages/jest-watcher/package.json | 2 +- packages/jest-worker/package.json | 2 +- packages/jest/package.json | 2 +- packages/pretty-format/package.json | 2 +- packages/test-utils/package.json | 2 +- 61 files changed, 61 insertions(+), 108 deletions(-) delete mode 100644 packages/jest-config/src/importEsm.ts diff --git a/.circleci/config.yml b/.circleci/config.yml index 404054466e1a..bd9be807475f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -18,22 +18,6 @@ aliases: version: 2 jobs: - test-node-8: - working_directory: ~/jest - docker: - - image: circleci/node:8 - steps: - - checkout - - run: - command: yarn remove-prettier-dep - - restore-cache: *restore-cache - - run: *install - - save-cache: *save-cache - - run: - command: yarn test-ci-partial - - store_test_results: - path: reports/junit - test-node-10: working_directory: ~/jest docker: @@ -123,7 +107,6 @@ workflows: version: 2 build-and-deploy: jobs: - - test-node-8 - test-node-10 - test-node-12 - test-node-13 diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 1463d9a82073..733cd73f5ea0 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -54,8 +54,7 @@ jobs: strategy: fail-fast: false matrix: - # https://github.com/actions/setup-node/issues/27 - node-version: [8.17.0, 10.x, 12.x, 13.x, 14.x] + node-version: [10.x, 12.x, 13.x, 14.x] os: [ubuntu-latest, macOS-latest, windows-latest] runs-on: ${{ matrix.os }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 0099bb296986..4aef120e9361 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ ### Chore & Maintenance - `[*]` [**BREAKING**] TypeScript definitions requires a minimum of TypeScript v3.8 ([#9823](https://github.com/facebook/jest/pull/9823)) +- `[*]` [**BREAKING**] Drop support for Node 8 ([#9423](https://github.com/facebook/jest/pull/9423)) - `[jest-runtime]` [**BREAKING**] Remove long-deprecated `require.requireActual` and `require.requireMock` methods ([#9854](https://github.com/facebook/jest/pull/9854)) - `[expect, jest-mock, pretty-format]` [**BREAKING**] Remove `build-es5` from package ([#9945](https://github.com/facebook/jest/pull/9945)) - `[jest-haste-map]` [**BREAKING**] removed `providesModuleNodeModules` ([#8535](https://github.com/facebook/jest/pull/8535)) diff --git a/babel.config.js b/babel.config.js index b01524bb0f50..d2ff271d1ea6 100644 --- a/babel.config.js +++ b/babel.config.js @@ -40,7 +40,7 @@ module.exports = { }, ], ], - test: 'packages/jest-config/src/importEsm.ts', + test: 'packages/jest-config/src/readConfigFileAndSetRootDir.ts', }, ], plugins: [ diff --git a/package.json b/package.json index b405696a5139..da549c4849a9 100644 --- a/package.json +++ b/package.json @@ -93,7 +93,6 @@ "lint:prettier:ci": "prettier '**/*.{md,yml,yaml}' 'website/static/**/*.{css,js}' --check --ignore-path .gitignore", "postinstall": "opencollective postinstall && yarn build", "install-no-ts-build": "node ./scripts/remove-postinstall && yarn --no-progress --frozen-lockfile && node ./scripts/build", - "remove-prettier-dep": "node ./scripts/remove-prettier-dep", "publish": "yarn build-clean && yarn build && lerna publish --silent", "test-ci": "yarn jest-coverage --color -i --config jest.config.ci.js && yarn test-leak && node ./scripts/mapCoverage.js && codecov", "test-ci-partial": "yarn jest --color -i --config jest.config.ci.js", @@ -132,6 +131,6 @@ "logo": "https://opencollective.com/jest/logo.txt" }, "engines": { - "node": ">= 8.3" + "node": ">= 10.14.2" } } diff --git a/packages/babel-jest/package.json b/packages/babel-jest/package.json index 3e502141f332..0e1e276306ec 100644 --- a/packages/babel-jest/package.json +++ b/packages/babel-jest/package.json @@ -28,7 +28,7 @@ "@babel/core": "^7.0.0" }, "engines": { - "node": ">= 8.3" + "node": ">= 10.14.2" }, "publishConfig": { "access": "public" diff --git a/packages/babel-plugin-jest-hoist/package.json b/packages/babel-plugin-jest-hoist/package.json index a7b5973e3a7e..be774845d5ba 100644 --- a/packages/babel-plugin-jest-hoist/package.json +++ b/packages/babel-plugin-jest-hoist/package.json @@ -7,7 +7,7 @@ "directory": "packages/babel-plugin-jest-hoist" }, "engines": { - "node": ">= 8.3" + "node": ">= 10.14.2" }, "license": "MIT", "main": "build/index.js", diff --git a/packages/babel-preset-jest/package.json b/packages/babel-preset-jest/package.json index 380d9b957ed0..0e651f95d6cf 100644 --- a/packages/babel-preset-jest/package.json +++ b/packages/babel-preset-jest/package.json @@ -16,7 +16,7 @@ "@babel/core": "^7.0.0" }, "engines": { - "node": ">= 8.3" + "node": ">= 10.14.2" }, "publishConfig": { "access": "public" diff --git a/packages/diff-sequences/package.json b/packages/diff-sequences/package.json index c1ca52cae128..6d1e08a84d90 100644 --- a/packages/diff-sequences/package.json +++ b/packages/diff-sequences/package.json @@ -16,7 +16,7 @@ "diff" ], "engines": { - "node": ">= 8.3" + "node": ">= 10.14.2" }, "main": "build/index.js", "types": "build/index.d.ts", diff --git a/packages/eslint-config-fb-strict/package.json b/packages/eslint-config-fb-strict/package.json index b9c262e3b51c..11787b8927f6 100644 --- a/packages/eslint-config-fb-strict/package.json +++ b/packages/eslint-config-fb-strict/package.json @@ -20,7 +20,7 @@ "eslint-plugin-react": "^7.1.0" }, "engines": { - "node": ">= 8.3" + "node": ">= 10.14.2" }, "publishConfig": { "access": "public" diff --git a/packages/expect/package.json b/packages/expect/package.json index 192ca431789a..9680531bdb7e 100644 --- a/packages/expect/package.json +++ b/packages/expect/package.json @@ -24,7 +24,7 @@ "immutable": "^4.0.0-rc.12" }, "engines": { - "node": ">= 8.3" + "node": ">= 10.14.2" }, "publishConfig": { "access": "public" diff --git a/packages/expect/src/__tests__/__snapshots__/matchers.test.js.snap b/packages/expect/src/__tests__/__snapshots__/matchers.test.js.snap index 652e3020ab90..aa0d250d4cb4 100644 --- a/packages/expect/src/__tests__/__snapshots__/matchers.test.js.snap +++ b/packages/expect/src/__tests__/__snapshots__/matchers.test.js.snap @@ -2022,11 +2022,11 @@ exports[`.toEqual() {pass: false} expect("type TypeName = T extends Function + type TypeName = T extends Function ? "function" : "object"; `; -exports[`.toEqual() {pass: false} expect(/abc/gy).toEqual(/abc/g) 1`] = ` +exports[`.toEqual() {pass: false} expect(/abc/gsy).toEqual(/abc/g) 1`] = ` expect(received).toEqual(expected) // deep equality Expected: /abc/g -Received: /abc/gy +Received: /abc/gsy `; exports[`.toEqual() {pass: false} expect([1, 2]).toEqual([2, 1]) 1`] = ` diff --git a/packages/jest-changed-files/package.json b/packages/jest-changed-files/package.json index 66135646dc44..627500626d2c 100644 --- a/packages/jest-changed-files/package.json +++ b/packages/jest-changed-files/package.json @@ -15,7 +15,7 @@ "throat": "^5.0.0" }, "engines": { - "node": ">= 8.3" + "node": ">= 10.14.2" }, "publishConfig": { "access": "public" diff --git a/packages/jest-circus/package.json b/packages/jest-circus/package.json index 8298ec8f8646..1bab55493862 100644 --- a/packages/jest-circus/package.json +++ b/packages/jest-circus/package.json @@ -42,7 +42,7 @@ "graceful-fs": "^4.2.4" }, "engines": { - "node": ">= 8.3" + "node": ">= 10.14.2" }, "publishConfig": { "access": "public" diff --git a/packages/jest-cli/package.json b/packages/jest-cli/package.json index 909a8f1e3398..202bdeedeea1 100644 --- a/packages/jest-cli/package.json +++ b/packages/jest-cli/package.json @@ -32,7 +32,7 @@ "jest": "./bin/jest.js" }, "engines": { - "node": ">= 8.3" + "node": ">= 10.14.2" }, "repository": { "type": "git", diff --git a/packages/jest-config/package.json b/packages/jest-config/package.json index 0391417fccc0..5a25bd861f6f 100644 --- a/packages/jest-config/package.json +++ b/packages/jest-config/package.json @@ -37,7 +37,7 @@ "@types/micromatch": "^4.0.0" }, "engines": { - "node": ">= 8.3" + "node": ">= 10.14.2" }, "publishConfig": { "access": "public" diff --git a/packages/jest-config/src/__tests__/Defaults.test.ts b/packages/jest-config/src/__tests__/Defaults.test.ts index 739ca8ee771e..31eda54e2efe 100644 --- a/packages/jest-config/src/__tests__/Defaults.test.ts +++ b/packages/jest-config/src/__tests__/Defaults.test.ts @@ -7,8 +7,6 @@ import {defaults} from '../index'; -jest.mock('../importEsm', () => (s: string) => import(s)); - test('get configuration defaults', () => { expect(defaults).toBeDefined(); }); diff --git a/packages/jest-config/src/__tests__/readConfig.test.ts b/packages/jest-config/src/__tests__/readConfig.test.ts index d3583b82ed6c..8566c78423e2 100644 --- a/packages/jest-config/src/__tests__/readConfig.test.ts +++ b/packages/jest-config/src/__tests__/readConfig.test.ts @@ -7,8 +7,6 @@ import {readConfig} from '../index'; -jest.mock('../importEsm', () => (s: string) => import(s)); - test('readConfig() throws when an object is passed without a file path', async () => { await expect( readConfig( diff --git a/packages/jest-config/src/__tests__/readConfigs.test.ts b/packages/jest-config/src/__tests__/readConfigs.test.ts index 29b3497b4885..be939256c090 100644 --- a/packages/jest-config/src/__tests__/readConfigs.test.ts +++ b/packages/jest-config/src/__tests__/readConfigs.test.ts @@ -7,8 +7,6 @@ import {readConfigs} from '../index'; -jest.mock('../importEsm', () => (s: string) => import(s)); - test('readConfigs() throws when called without project paths', async () => { await expect( // @ts-ignore diff --git a/packages/jest-config/src/importEsm.ts b/packages/jest-config/src/importEsm.ts deleted file mode 100644 index 85d82fa10dd2..000000000000 --- a/packages/jest-config/src/importEsm.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -import {pathToFileURL} from 'url'; - -// this is in a separate file so that node 8 don't explode with a syntax error. -// Remove this file when we drop support for Node 8 -export default (specifier: string): Promise<{default: unknown}> => - // node `import()` supports URL, but TypeScript doesn't know that - import(pathToFileURL(specifier).href); diff --git a/packages/jest-config/src/readConfigFileAndSetRootDir.ts b/packages/jest-config/src/readConfigFileAndSetRootDir.ts index c1d0242efcbc..0a4628092eb0 100644 --- a/packages/jest-config/src/readConfigFileAndSetRootDir.ts +++ b/packages/jest-config/src/readConfigFileAndSetRootDir.ts @@ -6,12 +6,12 @@ */ import * as path from 'path'; +import {pathToFileURL} from 'url'; import * as fs from 'graceful-fs'; import type {Config} from '@jest/types'; // @ts-ignore: vendored import jsonlint from './vendor/jsonlint'; import {JEST_CONFIG_EXT_JSON, PACKAGE_JSON} from './constants'; -import importEsm from './importEsm'; // Read the configuration and set its `rootDir` // 1. If it's a `package.json` file, we look into its "jest" property @@ -28,7 +28,10 @@ export default async function readConfigFileAndSetRootDir( } catch (error) { if (error.code === 'ERR_REQUIRE_ESM') { try { - const importedConfig = await importEsm(configPath); + const configUrl = pathToFileURL(configPath); + + // node `import()` supports URL, but TypeScript doesn't know that + const importedConfig = await import(configUrl.href); if (!importedConfig.default) { throw new Error( diff --git a/packages/jest-console/package.json b/packages/jest-console/package.json index 10323ae96373..cb50286f7621 100644 --- a/packages/jest-console/package.json +++ b/packages/jest-console/package.json @@ -20,7 +20,7 @@ "@types/node": "*" }, "engines": { - "node": ">= 8.3" + "node": ">= 10.14.2" }, "publishConfig": { "access": "public" diff --git a/packages/jest-core/package.json b/packages/jest-core/package.json index 47a2bc29bdc1..c7c65b165225 100644 --- a/packages/jest-core/package.json +++ b/packages/jest-core/package.json @@ -44,7 +44,7 @@ "jest-snapshot-serializer-raw": "^1.1.0" }, "engines": { - "node": ">= 8.3" + "node": ">= 10.14.2" }, "repository": { "type": "git", diff --git a/packages/jest-diff/package.json b/packages/jest-diff/package.json index 8bceb6695c8e..9506bbf47045 100644 --- a/packages/jest-diff/package.json +++ b/packages/jest-diff/package.json @@ -20,7 +20,7 @@ "strip-ansi": "^6.0.0" }, "engines": { - "node": ">= 8.3" + "node": ">= 10.14.2" }, "publishConfig": { "access": "public" diff --git a/packages/jest-docblock/package.json b/packages/jest-docblock/package.json index 411507e2fd51..7a909edd4c79 100644 --- a/packages/jest-docblock/package.json +++ b/packages/jest-docblock/package.json @@ -16,7 +16,7 @@ "@types/node": "*" }, "engines": { - "node": ">= 8.3" + "node": ">= 10.14.2" }, "publishConfig": { "access": "public" diff --git a/packages/jest-each/package.json b/packages/jest-each/package.json index 90cc9181adfe..aa8dce0cdd7b 100644 --- a/packages/jest-each/package.json +++ b/packages/jest-each/package.json @@ -25,7 +25,7 @@ "pretty-format": "^25.5.0" }, "engines": { - "node": ">= 8.3" + "node": ">= 10.14.2" }, "publishConfig": { "access": "public" diff --git a/packages/jest-environment-jsdom/package.json b/packages/jest-environment-jsdom/package.json index 4dc983922ad4..d91a427f2103 100644 --- a/packages/jest-environment-jsdom/package.json +++ b/packages/jest-environment-jsdom/package.json @@ -21,7 +21,7 @@ "@types/jsdom": "^12.2.4" }, "engines": { - "node": ">= 8.3" + "node": ">= 10.14.2" }, "publishConfig": { "access": "public" diff --git a/packages/jest-environment-node/package.json b/packages/jest-environment-node/package.json index 50fc83adb9d1..8d54d5edeba5 100644 --- a/packages/jest-environment-node/package.json +++ b/packages/jest-environment-node/package.json @@ -14,14 +14,10 @@ "@jest/fake-timers": "^25.5.0", "@jest/types": "^25.5.0", "jest-mock": "^25.5.0", - "jest-util": "^25.5.0", - "semver": "^6.3.0" - }, - "devDependencies": { - "@types/semver": "^6.2.1" + "jest-util": "^25.5.0" }, "engines": { - "node": ">= 8.3" + "node": ">= 10.14.2" }, "publishConfig": { "access": "public" diff --git a/packages/jest-environment-node/src/index.ts b/packages/jest-environment-node/src/index.ts index 60b4c6ee9bc9..d5faba29e8f6 100644 --- a/packages/jest-environment-node/src/index.ts +++ b/packages/jest-environment-node/src/index.ts @@ -14,7 +14,6 @@ import { LolexFakeTimers, } from '@jest/fake-timers'; import type {JestEnvironment} from '@jest/environment'; -import {lt as semverLt} from 'semver'; type Timer = { id: number; @@ -122,11 +121,4 @@ class NodeEnvironment implements JestEnvironment { } } -// node 10 had a bug in `vm.compileFunction` that was fixed in https://github.com/nodejs/node/pull/23206. -// Let's just pretend the env doesn't support the function. -// Make sure engine requirement is high enough when we drop node 8 so we can remove this condition -if (semverLt(process.version, '10.14.2')) { - delete NodeEnvironment.prototype.getVmContext; -} - export = NodeEnvironment; diff --git a/packages/jest-environment/package.json b/packages/jest-environment/package.json index 212cac54db82..167f984b08b7 100644 --- a/packages/jest-environment/package.json +++ b/packages/jest-environment/package.json @@ -18,7 +18,7 @@ "@types/node": "*" }, "engines": { - "node": ">= 8.3" + "node": ">= 10.14.2" }, "publishConfig": { "access": "public" diff --git a/packages/jest-fake-timers/package.json b/packages/jest-fake-timers/package.json index 0e4850b19041..524bc45263b5 100644 --- a/packages/jest-fake-timers/package.json +++ b/packages/jest-fake-timers/package.json @@ -21,7 +21,7 @@ "@types/node": "*" }, "engines": { - "node": ">= 8.3" + "node": ">= 10.14.2" }, "publishConfig": { "access": "public" diff --git a/packages/jest-get-type/package.json b/packages/jest-get-type/package.json index d752bcdc2c57..5f112ea4bde8 100644 --- a/packages/jest-get-type/package.json +++ b/packages/jest-get-type/package.json @@ -8,7 +8,7 @@ "directory": "packages/jest-get-type" }, "engines": { - "node": ">= 8.3" + "node": ">= 10.14.2" }, "license": "MIT", "main": "build/index.js", diff --git a/packages/jest-globals/package.json b/packages/jest-globals/package.json index 93617a4fae85..793872be905c 100644 --- a/packages/jest-globals/package.json +++ b/packages/jest-globals/package.json @@ -7,7 +7,7 @@ "directory": "packages/jest-globals" }, "engines": { - "node": ">= 8.3" + "node": ">= 10.14.2" }, "license": "MIT", "main": "build/index.js", diff --git a/packages/jest-haste-map/package.json b/packages/jest-haste-map/package.json index f4dafcf41ba0..a67445e06c4c 100644 --- a/packages/jest-haste-map/package.json +++ b/packages/jest-haste-map/package.json @@ -36,7 +36,7 @@ "fsevents": "^2.1.2" }, "engines": { - "node": ">= 8.3" + "node": ">= 10.14.2" }, "publishConfig": { "access": "public" diff --git a/packages/jest-jasmine2/package.json b/packages/jest-jasmine2/package.json index 0afca1f54a1f..672d237af121 100644 --- a/packages/jest-jasmine2/package.json +++ b/packages/jest-jasmine2/package.json @@ -33,7 +33,7 @@ "@types/co": "^4.6.2" }, "engines": { - "node": ">= 8.3" + "node": ">= 10.14.2" }, "publishConfig": { "access": "public" diff --git a/packages/jest-leak-detector/package.json b/packages/jest-leak-detector/package.json index 190e31f8cec9..e6395551be8d 100644 --- a/packages/jest-leak-detector/package.json +++ b/packages/jest-leak-detector/package.json @@ -18,7 +18,7 @@ "weak-napi": "^1.0.3" }, "engines": { - "node": ">= 8.3" + "node": ">= 10.14.2" }, "publishConfig": { "access": "public" diff --git a/packages/jest-matcher-utils/package.json b/packages/jest-matcher-utils/package.json index 009b9b870f7e..ad6b36a73ab0 100644 --- a/packages/jest-matcher-utils/package.json +++ b/packages/jest-matcher-utils/package.json @@ -8,7 +8,7 @@ "directory": "packages/jest-matcher-utils" }, "engines": { - "node": ">= 8.3" + "node": ">= 10.14.2" }, "license": "MIT", "main": "build/index.js", diff --git a/packages/jest-message-util/package.json b/packages/jest-message-util/package.json index 091c69afe882..5d7496076956 100644 --- a/packages/jest-message-util/package.json +++ b/packages/jest-message-util/package.json @@ -7,7 +7,7 @@ "directory": "packages/jest-message-util" }, "engines": { - "node": ">= 8.3" + "node": ">= 10.14.2" }, "license": "MIT", "main": "build/index.js", diff --git a/packages/jest-mock/package.json b/packages/jest-mock/package.json index d69c11f518f4..764e818fa302 100644 --- a/packages/jest-mock/package.json +++ b/packages/jest-mock/package.json @@ -7,7 +7,7 @@ "directory": "packages/jest-mock" }, "engines": { - "node": ">= 8.3" + "node": ">= 10.14.2" }, "dependencies": { "@jest/types": "^25.5.0" diff --git a/packages/jest-phabricator/package.json b/packages/jest-phabricator/package.json index 1df1b1093872..0bce0aa572ca 100644 --- a/packages/jest-phabricator/package.json +++ b/packages/jest-phabricator/package.json @@ -11,7 +11,7 @@ "@jest/test-result": "^25.5.0" }, "engines": { - "node": ">= 8.3" + "node": ">= 10.14.2" }, "license": "MIT", "main": "build/index.js", diff --git a/packages/jest-regex-util/package.json b/packages/jest-regex-util/package.json index 641872644187..e8bc03e28a93 100644 --- a/packages/jest-regex-util/package.json +++ b/packages/jest-regex-util/package.json @@ -10,7 +10,7 @@ "@types/node": "*" }, "engines": { - "node": ">= 8.3" + "node": ">= 10.14.2" }, "license": "MIT", "main": "build/index.js", diff --git a/packages/jest-repl/package.json b/packages/jest-repl/package.json index f58e7ef48f1a..de7b8199f5d4 100644 --- a/packages/jest-repl/package.json +++ b/packages/jest-repl/package.json @@ -24,7 +24,7 @@ }, "bin": "./bin/jest-repl.js", "engines": { - "node": ">= 8.3" + "node": ">= 10.14.2" }, "publishConfig": { "access": "public" diff --git a/packages/jest-reporters/package.json b/packages/jest-reporters/package.json index aec7082bcefa..121eb380587f 100644 --- a/packages/jest-reporters/package.json +++ b/packages/jest-reporters/package.json @@ -47,7 +47,7 @@ "node-notifier": "^6.0.0" }, "engines": { - "node": ">= 8.3" + "node": ">= 10.14.2" }, "repository": { "type": "git", diff --git a/packages/jest-resolve-dependencies/package.json b/packages/jest-resolve-dependencies/package.json index 5435835f909d..a91aa60aa4bc 100644 --- a/packages/jest-resolve-dependencies/package.json +++ b/packages/jest-resolve-dependencies/package.json @@ -20,7 +20,7 @@ "jest-runtime": "^25.5.4" }, "engines": { - "node": ">= 8.3" + "node": ">= 10.14.2" }, "publishConfig": { "access": "public" diff --git a/packages/jest-resolve/package.json b/packages/jest-resolve/package.json index d5d7d9519630..5a4f35574c88 100644 --- a/packages/jest-resolve/package.json +++ b/packages/jest-resolve/package.json @@ -25,7 +25,7 @@ "jest-haste-map": "^25.5.1" }, "engines": { - "node": ">= 8.3" + "node": ">= 10.14.2" }, "publishConfig": { "access": "public" diff --git a/packages/jest-runner/package.json b/packages/jest-runner/package.json index 3113997eed45..6e9f8e74d32b 100644 --- a/packages/jest-runner/package.json +++ b/packages/jest-runner/package.json @@ -38,7 +38,7 @@ "jest-circus": "^25.5.4" }, "engines": { - "node": ">= 8.3" + "node": ">= 10.14.2" }, "publishConfig": { "access": "public" diff --git a/packages/jest-runtime/package.json b/packages/jest-runtime/package.json index fbf9987acdcb..fd62239b1908 100644 --- a/packages/jest-runtime/package.json +++ b/packages/jest-runtime/package.json @@ -48,7 +48,7 @@ }, "bin": "./bin/jest-runtime.js", "engines": { - "node": ">= 8.3" + "node": ">= 10.14.2" }, "publishConfig": { "access": "public" diff --git a/packages/jest-serializer/package.json b/packages/jest-serializer/package.json index 3e5fbe5e0975..e530df25fcc5 100644 --- a/packages/jest-serializer/package.json +++ b/packages/jest-serializer/package.json @@ -14,7 +14,7 @@ "graceful-fs": "^4.2.4" }, "engines": { - "node": ">= 8.3" + "node": ">= 10.14.2" }, "license": "MIT", "main": "build/index.js", diff --git a/packages/jest-snapshot/package.json b/packages/jest-snapshot/package.json index dbf49e75795f..874be145fb39 100644 --- a/packages/jest-snapshot/package.json +++ b/packages/jest-snapshot/package.json @@ -37,7 +37,7 @@ "prettier": "^1.13.4" }, "engines": { - "node": ">= 8.3" + "node": ">= 10.14.2" }, "publishConfig": { "access": "public" diff --git a/packages/jest-source-map/package.json b/packages/jest-source-map/package.json index 56c7a89c2b55..d59ebb2efc3b 100644 --- a/packages/jest-source-map/package.json +++ b/packages/jest-source-map/package.json @@ -18,7 +18,7 @@ "@types/graceful-fs": "^4.1.2" }, "engines": { - "node": ">= 8.3" + "node": ">= 10.14.2" }, "publishConfig": { "access": "public" diff --git a/packages/jest-test-result/package.json b/packages/jest-test-result/package.json index 94b3d15c0ecc..8c3f3c9999e7 100644 --- a/packages/jest-test-result/package.json +++ b/packages/jest-test-result/package.json @@ -16,7 +16,7 @@ "collect-v8-coverage": "^1.0.0" }, "engines": { - "node": ">= 8.3" + "node": ">= 10.14.2" }, "publishConfig": { "access": "public" diff --git a/packages/jest-test-sequencer/package.json b/packages/jest-test-sequencer/package.json index 53870f3044ab..66b19f1131a0 100644 --- a/packages/jest-test-sequencer/package.json +++ b/packages/jest-test-sequencer/package.json @@ -20,7 +20,7 @@ "@types/graceful-fs": "^4.1.3" }, "engines": { - "node": ">= 8.3" + "node": ">= 10.14.2" }, "publishConfig": { "access": "public" diff --git a/packages/jest-transform/package.json b/packages/jest-transform/package.json index b164e245e300..a72838d33528 100644 --- a/packages/jest-transform/package.json +++ b/packages/jest-transform/package.json @@ -38,7 +38,7 @@ "jest-snapshot-serializer-raw": "^1.1.0" }, "engines": { - "node": ">= 8.3" + "node": ">= 10.14.2" }, "publishConfig": { "access": "public" diff --git a/packages/jest-types/package.json b/packages/jest-types/package.json index cbe5cca4bf10..988e9035b893 100644 --- a/packages/jest-types/package.json +++ b/packages/jest-types/package.json @@ -7,7 +7,7 @@ "directory": "packages/jest-types" }, "engines": { - "node": ">= 8.3" + "node": ">= 10.14.2" }, "license": "MIT", "main": "build/index.js", diff --git a/packages/jest-util/package.json b/packages/jest-util/package.json index e802af44e54c..72f39de53d15 100644 --- a/packages/jest-util/package.json +++ b/packages/jest-util/package.json @@ -22,7 +22,7 @@ "@types/node": "*" }, "engines": { - "node": ">= 8.3" + "node": ">= 10.14.2" }, "publishConfig": { "access": "public" diff --git a/packages/jest-validate/package.json b/packages/jest-validate/package.json index cf1c6a4264d2..0e175c1236ec 100644 --- a/packages/jest-validate/package.json +++ b/packages/jest-validate/package.json @@ -21,7 +21,7 @@ "@types/yargs": "^15.0.3" }, "engines": { - "node": ">= 8.3" + "node": ">= 10.14.2" }, "publishConfig": { "access": "public" diff --git a/packages/jest-watcher/package.json b/packages/jest-watcher/package.json index af6d9af43e3d..5047c4d4798c 100644 --- a/packages/jest-watcher/package.json +++ b/packages/jest-watcher/package.json @@ -24,7 +24,7 @@ "url": "https://github.com/facebook/jest/issues" }, "engines": { - "node": ">= 8.3" + "node": ">= 10.14.2" }, "homepage": "https://jestjs.io/", "license": "MIT", diff --git a/packages/jest-worker/package.json b/packages/jest-worker/package.json index cb9e664c2b9b..03b5ce075404 100644 --- a/packages/jest-worker/package.json +++ b/packages/jest-worker/package.json @@ -21,7 +21,7 @@ "worker-farm": "^1.6.0" }, "engines": { - "node": ">= 8.3" + "node": ">= 10.14.2" }, "publishConfig": { "access": "public" diff --git a/packages/jest/package.json b/packages/jest/package.json index 7e5bd40a521f..c82c4e8e8d39 100644 --- a/packages/jest/package.json +++ b/packages/jest/package.json @@ -11,7 +11,7 @@ }, "bin": "./bin/jest.js", "engines": { - "node": ">= 8.3" + "node": ">= 10.14.2" }, "repository": { "type": "git", diff --git a/packages/pretty-format/package.json b/packages/pretty-format/package.json index 70c610ec602a..abb2f74337f5 100644 --- a/packages/pretty-format/package.json +++ b/packages/pretty-format/package.json @@ -27,7 +27,7 @@ "react-test-renderer": "*" }, "engines": { - "node": ">= 8.3" + "node": ">= 10.14.2" }, "publishConfig": { "access": "public" diff --git a/packages/test-utils/package.json b/packages/test-utils/package.json index 00efbdd9a18f..1284358d04e2 100644 --- a/packages/test-utils/package.json +++ b/packages/test-utils/package.json @@ -14,6 +14,6 @@ "semver": "^6.3.0" }, "engines": { - "node": ">= 8.3" + "node": ">= 10.14.2" } } From 77f714513daeb41855b872a86d6eca27e24f65bf Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Sat, 2 May 2020 13:30:45 +0200 Subject: [PATCH 042/106] chore: remove checks for compileFunction (#9949) --- docs/CLI.md | 6 +-- docs/Configuration.md | 6 +-- .../__snapshots__/globals.test.ts.snap | 12 ++++++ e2e/__tests__/globals.test.ts | 37 +------------------ packages/jest-runner/src/runTest.ts | 6 +-- packages/jest-runtime/src/index.ts | 36 ++++++------------ 6 files changed, 28 insertions(+), 75 deletions(-) diff --git a/docs/CLI.md b/docs/CLI.md index 8a6d09579b23..a6ed467c95d0 100644 --- a/docs/CLI.md +++ b/docs/CLI.md @@ -156,11 +156,7 @@ Alias: `--collectCoverage`. Indicates that test coverage information should be c Indicates which provider should be used to instrument code for coverage. Allowed values are `babel` (default) or `v8`. -Note that using `v8` is considered experimental. This uses V8's builtin code coverage rather than one based on Babel and comes with a few caveats - -1. Your node version must include `vm.compileFunction`, which was introduced in [node 10.10](https://nodejs.org/dist/latest-v12.x/docs/api/vm.html#vm_vm_compilefunction_code_params_options) -1. Tests needs to run in Node test environment (support for `jsdom` requires [`jest-environment-jsdom-sixteen`](https://www.npmjs.com/package/jest-environment-jsdom-sixteen)) -1. V8 has way better data in the later versions, so using the latest versions of node (v13 at the time of this writing) will yield better results +Note that using `v8` is considered experimental. This uses V8's builtin code coverage rather than one based on Babel. It is not as well tested, and it has also improved in the last few releases of Node. Using the latest versions of node (v14 at the time of this writing) will yield better results. ### `--debug` diff --git a/docs/Configuration.md b/docs/Configuration.md index 79353fdb783f..37dbef0871f6 100644 --- a/docs/Configuration.md +++ b/docs/Configuration.md @@ -183,11 +183,7 @@ These pattern strings match against the full path. Use the `` string to Indicates which provider should be used to instrument code for coverage. Allowed values are `babel` (default) or `v8`. -Note that using `v8` is considered experimental. This uses V8's builtin code coverage rather than one based on Babel and comes with a few caveats - -1. Your node version must include `vm.compileFunction`, which was introduced in [node 10.10](https://nodejs.org/dist/latest-v12.x/docs/api/vm.html#vm_vm_compilefunction_code_params_options) -1. Tests needs to run in Node test environment (support for `jsdom` requires [`jest-environment-jsdom-sixteen`](https://www.npmjs.com/package/jest-environment-jsdom-sixteen)) -1. V8 has way better data in the later versions, so using the latest versions of node (v13 at the time of this writing) will yield better results +Note that using `v8` is considered experimental. This uses V8's builtin code coverage rather than one based on Babel. It is not as well tested, and it has also improved in the last few releases of Node. Using the latest versions of node (v14 at the time of this writing) will yield better results. ### `coverageReporters` [array\] diff --git a/e2e/__tests__/__snapshots__/globals.test.ts.snap b/e2e/__tests__/__snapshots__/globals.test.ts.snap index cb6eb9d23f87..55a290d7b1c6 100644 --- a/e2e/__tests__/__snapshots__/globals.test.ts.snap +++ b/e2e/__tests__/__snapshots__/globals.test.ts.snap @@ -18,6 +18,18 @@ Ran all test suites. `; exports[`cannot have describe with no implementation 1`] = ` +FAIL __tests__/onlyConstructs.test.js + ● Test suite failed to run + + Missing second argument. It must be a callback function. + + > 1 | describe('describe, no implementation'); + | ^ + + at Object.describe (__tests__/onlyConstructs.test.js:1:1) +`; + +exports[`cannot have describe with no implementation 2`] = ` Test Suites: 1 failed, 1 total Tests: 0 total Snapshots: 0 total diff --git a/e2e/__tests__/globals.test.ts b/e2e/__tests__/globals.test.ts index 7429f600c71f..3f561f8483aa 100644 --- a/e2e/__tests__/globals.test.ts +++ b/e2e/__tests__/globals.test.ts @@ -7,7 +7,6 @@ import * as path from 'path'; import {tmpdir} from 'os'; -import {compileFunction} from 'vm'; import {wrap} from 'jest-snapshot-serializer-raw'; import runJest from '../runJest'; import { @@ -127,41 +126,7 @@ test('cannot have describe with no implementation', () => { const rest = cleanStderr(stderr); const {summary} = extractSummary(stderr); - const rightTrimmedRest = rest - .split('\n') - .map(l => l.trimRight()) - .join('\n') - .trim(); - - if (typeof compileFunction === 'function') { - expect(rightTrimmedRest).toEqual( - ` -FAIL __tests__/onlyConstructs.test.js - ● Test suite failed to run - - Missing second argument. It must be a callback function. - - > 1 | describe('describe, no implementation'); - | ^ - - at Object.describe (__tests__/onlyConstructs.test.js:1:1) - `.trim(), - ); - } else { - expect(rightTrimmedRest).toEqual( - ` -FAIL __tests__/onlyConstructs.test.js - ● Test suite failed to run - - Missing second argument. It must be a callback function. - - > 1 | describe('describe, no implementation'); - | ^ - - at Object. (__tests__/onlyConstructs.test.js:1:10) - `.trim(), - ); - } + expect(wrap(rest)).toMatchSnapshot(); expect(wrap(summary)).toMatchSnapshot(); }); diff --git a/packages/jest-runner/src/runTest.ts b/packages/jest-runner/src/runTest.ts index 5d753434d398..7abfdf81729c 100644 --- a/packages/jest-runner/src/runTest.ts +++ b/packages/jest-runner/src/runTest.ts @@ -6,7 +6,6 @@ * */ -import {compileFunction} from 'vm'; import type {Config} from '@jest/types'; import type {TestResult} from '@jest/test-result'; import { @@ -226,11 +225,10 @@ async function runTestInternal( }; } - // if we don't have `getVmContext` on the env,or `compileFunction` available skip coverage + // if we don't have `getVmContext` on the env skip coverage const collectV8Coverage = globalConfig.coverageProvider === 'v8' && - typeof environment.getVmContext === 'function' && - typeof compileFunction === 'function'; + typeof environment.getVmContext === 'function'; try { await environment.setup(); diff --git a/packages/jest-runtime/src/index.ts b/packages/jest-runtime/src/index.ts index 70ac0fa137f9..bfabc318e665 100644 --- a/packages/jest-runtime/src/index.ts +++ b/packages/jest-runtime/src/index.ts @@ -982,31 +982,17 @@ class Runtime { const vmContext = this._environment.getVmContext(); if (vmContext) { - if (typeof compileFunction === 'function') { - try { - compiledFunction = compileFunction( - transformedCode, - this.constructInjectedModuleParameters(), - { - filename, - parsingContext: vmContext, - }, - ) as ModuleWrapper; - } catch (e) { - throw handlePotentialSyntaxError(e); - } - } else { - const script = this.createScriptFromCode(transformedCode, filename); - - const runScript = script.runInContext( - vmContext, - ) as RunScriptEvalResult; - - if (runScript === null) { - compiledFunction = null; - } else { - compiledFunction = runScript[EVAL_RESULT_VARIABLE]; - } + try { + compiledFunction = compileFunction( + transformedCode, + this.constructInjectedModuleParameters(), + { + filename, + parsingContext: vmContext, + }, + ) as ModuleWrapper; + } catch (e) { + throw handlePotentialSyntaxError(e); } } } else { From bc31829269c7958428f9a7234f45390d2e0ec8e6 Mon Sep 17 00:00:00 2001 From: Hieu Lam Date: Sat, 2 May 2020 18:36:50 +0700 Subject: [PATCH 043/106] feat: upgrade to JSDOM 16 (#9606) --- CHANGELOG.md | 2 + ...consoleLogOutputWhenRunInBand.test.ts.snap | 2 +- .../consoleLogOutputWhenRunInBand.test.ts | 16 +- e2e/__tests__/jestEnvironmentJsdom.test.ts | 28 +++ packages/jest-environment-jsdom/package.json | 4 +- packages/jest-environment-jsdom/src/index.ts | 13 +- yarn.lock | 237 ++++++++++-------- 7 files changed, 174 insertions(+), 128 deletions(-) create mode 100644 e2e/__tests__/jestEnvironmentJsdom.test.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 4aef120e9361..5b6d876b649b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ### Features +- `[jest-environment-jsdom]` [**BREAKING**] Upgrade `jsdom` to v16 ([#9606](https://github.com/facebook/jest/pull/9606)) + ### Fixes - `[jest-circus]` [**BREAKING**] Fail tests if a test takes a done callback and have return values ([#9129](https://github.com/facebook/jest/pull/9129)) diff --git a/e2e/__tests__/__snapshots__/consoleLogOutputWhenRunInBand.test.ts.snap b/e2e/__tests__/__snapshots__/consoleLogOutputWhenRunInBand.test.ts.snap index 571dd419e639..f4728989cc42 100644 --- a/e2e/__tests__/__snapshots__/consoleLogOutputWhenRunInBand.test.ts.snap +++ b/e2e/__tests__/__snapshots__/consoleLogOutputWhenRunInBand.test.ts.snap @@ -20,6 +20,6 @@ exports[`prints console.logs when run with forceExit 3`] = ` console.log Hey - at Object. (__tests__/a-banana.js:1:1) + at Object.log (__tests__/a-banana.js:1:30) `; diff --git a/e2e/__tests__/consoleLogOutputWhenRunInBand.test.ts b/e2e/__tests__/consoleLogOutputWhenRunInBand.test.ts index 3e505c906365..618c48048ef6 100644 --- a/e2e/__tests__/consoleLogOutputWhenRunInBand.test.ts +++ b/e2e/__tests__/consoleLogOutputWhenRunInBand.test.ts @@ -15,8 +15,6 @@ const DIR = path.resolve(__dirname, '../console-log-output-when-run-in-band'); beforeEach(() => cleanup(DIR)); afterAll(() => cleanup(DIR)); -const nodeMajorVersion = Number(process.versions.node.split('.')[0]); - test('prints console.logs when run with forceExit', () => { writeFiles(DIR, { '__tests__/a-banana.js': ` @@ -25,26 +23,14 @@ test('prints console.logs when run with forceExit', () => { 'package.json': '{}', }); - const {stderr, exitCode, ...res} = runJest(DIR, [ + const {stderr, stdout, exitCode} = runJest(DIR, [ '-i', '--ci=false', '--forceExit', ]); - let {stdout} = res; const {rest, summary} = extractSummary(stderr); - if (nodeMajorVersion < 12) { - expect(stdout).toContain( - 'at Object..test (__tests__/a-banana.js:1:1)', - ); - - stdout = stdout.replace( - 'at Object..test (__tests__/a-banana.js:1:1)', - 'at Object. (__tests__/a-banana.js:1:1)', - ); - } - expect(exitCode).toBe(0); expect(wrap(rest)).toMatchSnapshot(); expect(wrap(summary)).toMatchSnapshot(); diff --git a/e2e/__tests__/jestEnvironmentJsdom.test.ts b/e2e/__tests__/jestEnvironmentJsdom.test.ts new file mode 100644 index 000000000000..e13abfcec114 --- /dev/null +++ b/e2e/__tests__/jestEnvironmentJsdom.test.ts @@ -0,0 +1,28 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +import * as path from 'path'; +import {tmpdir} from 'os'; +import {cleanup, writeFiles} from '../Utils'; +import runJest from '../runJest'; + +const DIR = path.resolve(tmpdir(), 'jest_environment_jsdom_test'); + +beforeEach(() => cleanup(DIR)); +afterAll(() => cleanup(DIR)); + +test('check is not leaking memory', () => { + writeFiles(DIR, { + '__tests__/a.test.js': `test('a', () => console.log('a'));`, + '__tests__/b.test.js': `test('b', () => console.log('b'));`, + 'package.json': JSON.stringify({jest: {testEnvironment: 'jsdom'}}), + }); + + const {stderr} = runJest(DIR, ['--detect-leaks', '--runInBand']); + expect(stderr).toMatch(/PASS\s__tests__\/a.test.js/); + expect(stderr).toMatch(/PASS\s__tests__\/b.test.js/); +}); diff --git a/packages/jest-environment-jsdom/package.json b/packages/jest-environment-jsdom/package.json index d91a427f2103..d532935ccf69 100644 --- a/packages/jest-environment-jsdom/package.json +++ b/packages/jest-environment-jsdom/package.json @@ -15,10 +15,10 @@ "@jest/types": "^25.5.0", "jest-mock": "^25.5.0", "jest-util": "^25.5.0", - "jsdom": "^15.2.1" + "jsdom": "^16.2.2" }, "devDependencies": { - "@types/jsdom": "^12.2.4" + "@types/jsdom": "^16.2.1" }, "engines": { "node": ">= 10.14.2" diff --git a/packages/jest-environment-jsdom/src/index.ts b/packages/jest-environment-jsdom/src/index.ts index 4979dcd04e02..9b887a7a1ed5 100644 --- a/packages/jest-environment-jsdom/src/index.ts +++ b/packages/jest-environment-jsdom/src/index.ts @@ -47,6 +47,10 @@ class JSDOMEnvironment implements JestEnvironment { throw new Error('JSDOM did not return a Window object'); } + // In the `jsdom@16`, ArrayBuffer was not added to Window, ref: https://github.com/jsdom/jsdom/commit/3a4fd6258e6b13e9cf8341ddba60a06b9b5c7b5b + // Install ArrayBuffer to Window to fix it. Make sure the test is passed, ref: https://github.com/facebook/jest/pull/7626 + global.ArrayBuffer = ArrayBuffer; + // Node's error-message stack size is limited at 10, but it's pretty useful // to see more than that when a test fails. this.global.Error.stackTraceLimit = 100; @@ -126,7 +130,14 @@ class JSDOMEnvironment implements JestEnvironment { runScript(script: Script): T | null { if (this.dom) { - return this.dom.runVMScript(script) as any; + return script.runInContext(this.dom.getInternalVMContext()); + } + return null; + } + + getVmContext() { + if (this.dom) { + return this.dom.getInternalVMContext(); } return null; } diff --git a/yarn.lock b/yarn.lock index ecc3477240e8..b8f9312e754f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2381,14 +2381,14 @@ resolved "https://registry.yarnpkg.com/@types/jest/-/jest-24.0.2.tgz#a10ad017ee020b2dfa97655323dbf1f38f14f588" integrity sha512-YCGS1XGfAnDLUy8IL7iZf+Tnl0jhnaWUhrx8H/WyaDnjsu9dQBO8jiQqgJi/4BEryY6gvaqf1OvB1B2BvsW4dg== -"@types/jsdom@^12.2.4": - version "12.2.4" - resolved "https://registry.yarnpkg.com/@types/jsdom/-/jsdom-12.2.4.tgz#845cd4d43f95b8406d9b724ec30c03edadcd9528" - integrity sha512-q+De3S/Ri6U9uPx89YA1XuC+QIBgndIfvBaaJG0pRT8Oqa75k4Mr7G9CRZjIvlbLGIukO/31DFGFJYlQBmXf/A== +"@types/jsdom@^16.2.1": + version "16.2.1" + resolved "https://registry.yarnpkg.com/@types/jsdom/-/jsdom-16.2.1.tgz#9e6eee6a578f74eed5997558ab430dbc11aac753" + integrity sha512-KCEq427OsWfpX7FRyEMb3i2XIuz8Pt3XPls4nmX0iMTDJWsHD4Kzoa3v4Uv9c9IDf11ALeHUtPcyAjTz/HV03Q== dependencies: "@types/node" "*" + "@types/parse5" "*" "@types/tough-cookie" "*" - parse5 "^4.0.0" "@types/json-schema@^7.0.3": version "7.0.4" @@ -2458,6 +2458,11 @@ resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e" integrity sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA== +"@types/parse5@*": + version "5.0.2" + resolved "https://registry.yarnpkg.com/@types/parse5/-/parse5-5.0.2.tgz#a877a4658f8238c8266faef300ae41c84d72ec8a" + integrity sha512-BOl+6KDs4ItndUWUFchy3aEqGdHhw0BC4Uu+qoDonN/f0rbUnJbm71Ulj8Tt9jLFRaAxPLKvdS1bBLfx1qXR9g== + "@types/prettier@^1.19.0": version "1.19.1" resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-1.19.1.tgz#33509849f8e679e4add158959fdb086440e9553f" @@ -2666,7 +2671,7 @@ JSONStream@^1.0.4, JSONStream@^1.3.4: jsonparse "^1.2.0" through ">=2.2.7 <3" -abab@^2.0.0: +abab@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.3.tgz#623e2075e02eb2d3f2475e49f99c91846467907a" integrity sha512-tsFzPpcttalNjFBCFMqsKYQcWxxen1pgJR56by//QwvJc4/OUS3kPOOttx2tSIfjsylB0pYu7f5D3K1RCxUnUg== @@ -2696,30 +2701,25 @@ accepts@~1.3.5, accepts@~1.3.7: mime-types "~2.1.24" negotiator "0.6.2" -acorn-globals@^4.3.2: - version "4.3.4" - resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-4.3.4.tgz#9fa1926addc11c97308c4e66d7add0d40c3272e7" - integrity sha512-clfQEh21R+D0leSbUdWf3OcfqyaCSAQ8Ryq00bofSekfr9W8u1jyYZo6ir0xu9Gtcf7BjcHJpnbZH7JOCpP60A== +acorn-globals@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-6.0.0.tgz#46cdd39f0f8ff08a876619b55f5ac8a6dc770b45" + integrity sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg== dependencies: - acorn "^6.0.1" - acorn-walk "^6.0.1" + acorn "^7.1.1" + acorn-walk "^7.1.1" acorn-jsx@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.2.0.tgz#4c66069173d6fdd68ed85239fc256226182b2ebe" integrity sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ== -acorn-walk@^6.0.1: - version "6.2.0" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-6.2.0.tgz#123cb8f3b84c2171f1f7fb252615b1c78a6b1a8c" - integrity sha512-7evsyfH1cLOCdAzZAd43Cic04yKydNx0cF+7tiA19p1XnLLPU4dpCQOqpjqwokFe//vS0QqfqqjCS2JkiIs0cA== - -acorn@^6.0.1: - version "6.4.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.1.tgz#531e58ba3f51b9dacb9a6646ca4debf5b14ca474" - integrity sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA== +acorn-walk@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-7.1.1.tgz#345f0dffad5c735e7373d2fec9a1023e6a44b83e" + integrity sha512-wdlPY2tm/9XBr7QkKlq0WQVgiuGTX6YWPyRyBviSoScBuLfTVQhvwg6wJ369GJ/1nPfTLMfnrFIfjqVg6d+jQQ== -acorn@^7.1.0, acorn@^7.1.1: +acorn@^7.1.1: version "7.1.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.1.1.tgz#e35668de0b402f359de515c5482a1ab9f89a69bf" integrity sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg== @@ -3006,11 +3006,6 @@ array-differ@^2.0.3: resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-2.1.0.tgz#4b9c1c3f14b906757082925769e8ab904f4801b1" integrity sha512-KbUpJgx909ZscOc/7CLATBFam7P1Z1QRQInvgT0UztM9Q72aGKCunKASAl7WNW0tnPmPyEMeMhdsfWhfmW037w== -array-equal@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93" - integrity sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM= - array-filter@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/array-filter/-/array-filter-1.0.0.tgz#baf79e62e6ef4c2a4c0b831232daffec251f9d83" @@ -4691,7 +4686,7 @@ csso@^4.0.2: dependencies: css-tree "1.0.0-alpha.39" -cssom@^0.4.1: +cssom@^0.4.4: version "0.4.4" resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.4.4.tgz#5a66cf93d2d0b661d80bf6a44fb65f5c2e4e0a10" integrity sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw== @@ -4701,7 +4696,7 @@ cssom@~0.3.6: resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.8.tgz#9f1276f5b2b463f2114d3f2c75250af8c1a36f4a" integrity sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg== -cssstyle@^2.0.0: +cssstyle@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-2.2.0.tgz#e4c44debccd6b7911ed617a4395e5754bba59992" integrity sha512-sEb3XFPx3jNnCAMtqrXPDeSgQr+jojtCeNf8cvMNMh1cG970+lljssvQDzPq6lmmJu2Vhqood/gtEomBiHOGnA== @@ -4744,14 +4739,14 @@ dashdash@^1.12.0: dependencies: assert-plus "^1.0.0" -data-urls@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-1.1.0.tgz#15ee0582baa5e22bb59c77140da8f9c76963bbfe" - integrity sha512-YTWYI9se1P55u58gL5GkQHW4P6VJBJ5iBT+B5a7i2Tjadhv52paJG0qHX4A0OR6/t52odI64KP2YvFpkDOi3eQ== +data-urls@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-2.0.0.tgz#156485a72963a970f5d5821aaf642bef2bf2db9b" + integrity sha512-X5eWTSXO/BJmpdIKCRuKUgSCgAN0OwliVK3yPKbwIWU1Tdw5BRajxlzMidvh+gwko9AfQ9zIj52pzF91Q3YAvQ== dependencies: - abab "^2.0.0" - whatwg-mimetype "^2.2.0" - whatwg-url "^7.0.0" + abab "^2.0.3" + whatwg-mimetype "^2.3.0" + whatwg-url "^8.0.0" dateformat@^3.0.0: version "3.0.3" @@ -4816,6 +4811,11 @@ decamelize@^1.1.0, decamelize@^1.1.2, decamelize@^1.2.0: resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= +decimal.js@^10.2.0: + version "10.2.0" + resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.2.0.tgz#39466113a9e036111d02f82489b5fd6b0b5ed231" + integrity sha512-vDPw+rDgn3bZe1+F/pyEwb1oMG2XTlRVgAa6B4KccTEpYgF8w6eQllVbQcfIJnZyvzFtFpxnpGtx8dd7DJp/Rw== + decode-uri-component@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" @@ -5145,12 +5145,12 @@ domelementtype@^2.0.1: resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.0.1.tgz#1f8bdfe91f5a78063274e803b4bdcedf6e94f94d" integrity sha512-5HOHUDsYZWV8FGWN0Njbr/Rn7f/eWSQi1v7+HsUVwXgn8nWWlL64zKDkS0n8ZmQ3mlWOMuXOnR+7Nx/5tMO5AQ== -domexception@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/domexception/-/domexception-1.0.1.tgz#937442644ca6a31261ef36e3ec677fe805582c90" - integrity sha512-raigMkn7CJNNo6Ihro1fzG7wr3fHuYVytzquZKX5n0yizGsTcYgzdIUwj1X9pK0VvjeihV+XiclP+DjwbsSKug== +domexception@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/domexception/-/domexception-2.0.1.tgz#fb44aefba793e1574b0af6aed2801d057529f304" + integrity sha512-yxJ2mFy/sibVQlu5qHjOkf9J3K6zgmCxgJ94u2EdvDOV09H+32LtRswEcUsmUWN72pVLOEnTSRaIVVzVQgS0dg== dependencies: - webidl-conversions "^4.0.2" + webidl-conversions "^5.0.0" domhandler@^2.3.0: version "2.4.2" @@ -5478,7 +5478,7 @@ escape-string-regexp@^2.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== -escodegen@^1.11.1: +escodegen@^1.14.1: version "1.14.1" resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.14.1.tgz#ba01d0c8278b5e95a9a45350142026659027a457" integrity sha512-Bmt7NcRySdIfNPfU2ZoXDrrXsG9ZjvDxcAlMfDUgRBjLOWTuIACXPBFJH7Z+cLb40JeQco5toikyc9t9P8E9SQ== @@ -7076,12 +7076,12 @@ html-element-map@^1.2.0: dependencies: array-filter "^1.0.0" -html-encoding-sniffer@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-1.0.2.tgz#e70d84b94da53aa375e11fe3a351be6642ca46f8" - integrity sha512-71lZziiDnsuabfdYiUeWdCVyKuqwWi23L8YeIgV9jSSZHCtb6wB1BKWooH7L3tn4/FuZJMVWyNaIDr4RGmaSYw== +html-encoding-sniffer@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz#42a6dc4fd33f00281176e8b23759ca4e4fa185f3" + integrity sha512-D5JbOMBIR/TVZkubHT+OyT2705QvogUW4IBn6nHd756OwieSF9aDYFj4dv6HHEVGYbHaLETa3WggZYWWMyy3ZQ== dependencies: - whatwg-encoding "^1.0.1" + whatwg-encoding "^1.0.5" html-escaper@^2.0.0: version "2.0.2" @@ -7828,6 +7828,11 @@ is-png@^1.0.0: resolved "https://registry.yarnpkg.com/is-png/-/is-png-1.1.0.tgz#d574b12bf275c0350455570b0e5b57ab062077ce" integrity sha1-1XSxK/J1wDUEVVcLDltXqwYgd84= +is-potential-custom-element-name@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.0.tgz#0c52e54bcca391bb2c494b21e8626d7336c6e397" + integrity sha1-DFLlS8yjkbssSUsh6GJtczbG45c= + is-promise@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" @@ -8243,36 +8248,36 @@ jsc-android@^245459.0.0: resolved "https://registry.yarnpkg.com/jsc-android/-/jsc-android-245459.0.0.tgz#e584258dd0b04c9159a27fb104cd5d491fd202c9" integrity sha512-wkjURqwaB1daNkDi2OYYbsLnIdC/lUM2nPXQKRs5pqEU9chDg435bjvo+LSaHotDENygHQDHe+ntUkkw2gwMtg== -jsdom@^15.2.1: - version "15.2.1" - resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-15.2.1.tgz#d2feb1aef7183f86be521b8c6833ff5296d07ec5" - integrity sha512-fAl1W0/7T2G5vURSyxBzrJ1LSdQn6Tr5UX/xD4PXDx/PDgwygedfW6El/KIj3xJ7FU61TTYnc/l/B7P49Eqt6g== - dependencies: - abab "^2.0.0" - acorn "^7.1.0" - acorn-globals "^4.3.2" - array-equal "^1.0.0" - cssom "^0.4.1" - cssstyle "^2.0.0" - data-urls "^1.1.0" - domexception "^1.0.1" - escodegen "^1.11.1" - html-encoding-sniffer "^1.0.2" +jsdom@^16.2.2: + version "16.2.2" + resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-16.2.2.tgz#76f2f7541646beb46a938f5dc476b88705bedf2b" + integrity sha512-pDFQbcYtKBHxRaP55zGXCJWgFHkDAYbKcsXEK/3Icu9nKYZkutUXfLBwbD+09XDutkYSHcgfQLZ0qvpAAm9mvg== + dependencies: + abab "^2.0.3" + acorn "^7.1.1" + acorn-globals "^6.0.0" + cssom "^0.4.4" + cssstyle "^2.2.0" + data-urls "^2.0.0" + decimal.js "^10.2.0" + domexception "^2.0.1" + escodegen "^1.14.1" + html-encoding-sniffer "^2.0.1" + is-potential-custom-element-name "^1.0.0" nwsapi "^2.2.0" - parse5 "5.1.0" - pn "^1.1.0" - request "^2.88.0" - request-promise-native "^1.0.7" - saxes "^3.1.9" - symbol-tree "^3.2.2" + parse5 "5.1.1" + request "^2.88.2" + request-promise-native "^1.0.8" + saxes "^5.0.0" + symbol-tree "^3.2.4" tough-cookie "^3.0.1" - w3c-hr-time "^1.0.1" - w3c-xmlserializer "^1.1.2" - webidl-conversions "^4.0.2" + w3c-hr-time "^1.0.2" + w3c-xmlserializer "^2.0.0" + webidl-conversions "^6.0.0" whatwg-encoding "^1.0.5" whatwg-mimetype "^2.3.0" - whatwg-url "^7.0.0" - ws "^7.0.0" + whatwg-url "^8.0.0" + ws "^7.2.3" xml-name-validator "^3.0.0" jsesc@^2.5.1: @@ -10382,10 +10387,10 @@ parse-url@^5.0.0: parse-path "^4.0.0" protocols "^1.4.0" -parse5@5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/parse5/-/parse5-5.1.0.tgz#c59341c9723f414c452975564c7c00a68d58acd2" - integrity sha512-fxNG2sQjHvlVAYmzBZS9YlDp6PTSSDwa98vkD4QgVDDCAo84z5X1t5XyJQ62ImdLXx5NdIIfihey6xpum9/gRQ== +parse5@5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-5.1.1.tgz#f68e4e5ba1852ac2cadc00f4555fff6c2abb6178" + integrity sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug== parse5@^3.0.1: version "3.0.3" @@ -10394,11 +10399,6 @@ parse5@^3.0.1: dependencies: "@types/node" "*" -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== - parseurl@~1.3.3: version "1.3.3" resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" @@ -10586,11 +10586,6 @@ plugin-error@^0.1.2: arr-union "^2.0.1" extend-shallow "^1.1.2" -pn@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/pn/-/pn-1.1.0.tgz#e2f4cef0e219f463c179ab37463e4e1ecdccbafb" - integrity sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA== - portfinder@^1.0.25: version "1.0.25" resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.25.tgz#254fd337ffba869f4b9d37edc298059cb4d35eca" @@ -11660,7 +11655,7 @@ request-promise-core@1.1.3: dependencies: lodash "^4.17.15" -request-promise-native@^1.0.7: +request-promise-native@^1.0.8: version "1.0.8" resolved "https://registry.yarnpkg.com/request-promise-native/-/request-promise-native-1.0.8.tgz#a455b960b826e44e2bf8999af64dff2bfe58cb36" integrity sha512-dapwLGqkHtwL5AEbfenuzjTYg35Jd6KPytsC2/TLkVMz8rm+tNt72MGUWT1RP/aYawMpN6HqbNGBQaRcBtjQMQ== @@ -11669,7 +11664,7 @@ request-promise-native@^1.0.7: stealthy-require "^1.1.1" tough-cookie "^2.3.3" -request@^2.53.0, request@^2.88.0: +request@^2.53.0, request@^2.88.0, request@^2.88.2: version "2.88.2" resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== @@ -11960,12 +11955,12 @@ sax@^1.2.1, sax@^1.2.4, sax@~1.2.4: resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== -saxes@^3.1.9: - version "3.1.11" - resolved "https://registry.yarnpkg.com/saxes/-/saxes-3.1.11.tgz#d59d1fd332ec92ad98a2e0b2ee644702384b1c5b" - integrity sha512-Ydydq3zC+WYDJK1+gRxRapLIED9PWeSuuS41wqyoRmzvhhh9nc+QQrVMKJYzJFULazeGhzSV0QleN2wD3boh2g== +saxes@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/saxes/-/saxes-5.0.0.tgz#b7d30284d7583a5ca6ad0248b56d8889da53788b" + integrity sha512-LXTZygxhf8lfwKaTP/8N9CsVdjTlea3teze4lL6u37ivbgGbV0GGMuNtS/I9rnD/HC2/txUM7Df4S2LVl1qhiA== dependencies: - xmlchars "^2.1.1" + xmlchars "^2.2.0" scheduler@0.17.0, scheduler@^0.17.0: version "0.17.0" @@ -12823,7 +12818,7 @@ symbol-observable@1.0.1: resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.1.tgz#8340fc4702c3122df5d22288f88283f513d3fdd4" integrity sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ= -symbol-tree@^3.2.2: +symbol-tree@^3.2.4: version "3.2.4" resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== @@ -13128,6 +13123,13 @@ tr46@^1.0.1: dependencies: punycode "^2.1.0" +tr46@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-2.0.2.tgz#03273586def1595ae08fedb38d7733cee91d2479" + integrity sha512-3n1qG+/5kg+jrbTzwAykB5yRYtQCTqOGKq5U5PE3b0a1/mzo6snDhjGS0zJVJunO0NrT3Dg1MLy5TjWP/UJppg== + dependencies: + punycode "^2.1.1" + tree-node-cli@^1.2.5: version "1.3.0" resolved "https://registry.yarnpkg.com/tree-node-cli/-/tree-node-cli-1.3.0.tgz#f7c03e4d14c7b7c42412d3d2a605940102f192cd" @@ -13630,20 +13632,18 @@ vlq@^1.0.0: resolved "https://registry.yarnpkg.com/vlq/-/vlq-1.0.1.tgz#c003f6e7c0b4c1edd623fd6ee50bbc0d6a1de468" integrity sha512-gQpnTgkubC6hQgdIcRdYGDSDc+SaujOdyesZQMv6JlfQee/9Mp0Qhnys6WxDWvQnL5WZdT7o2Ul187aSt0Rq+w== -w3c-hr-time@^1.0.1: +w3c-hr-time@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz#0a89cdf5cc15822df9c360543676963e0cc308cd" integrity sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ== dependencies: browser-process-hrtime "^1.0.0" -w3c-xmlserializer@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/w3c-xmlserializer/-/w3c-xmlserializer-1.1.2.tgz#30485ca7d70a6fd052420a3d12fd90e6339ce794" - integrity sha512-p10l/ayESzrBMYWRID6xbuCKh2Fp77+sA0doRuGn4tTIMrrZVeqfpKjXHY+oDh3K4nLdPgNwMTVP6Vp4pvqbNg== +w3c-xmlserializer@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/w3c-xmlserializer/-/w3c-xmlserializer-2.0.0.tgz#3e7104a05b75146cc60f564380b7f683acf1020a" + integrity sha512-4tzD0mF8iSiMiNs30BiLO3EpfGLZUT2MSX/G+o7ZywDzliWQ3OPtTZ0PTC3B3ca1UAf4cJMHB+2Bf56EriJuRA== dependencies: - domexception "^1.0.1" - webidl-conversions "^4.0.2" xml-name-validator "^3.0.0" wait-for-expect@^1.3.0: @@ -13679,6 +13679,16 @@ webidl-conversions@^4.0.2: resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg== +webidl-conversions@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-5.0.0.tgz#ae59c8a00b121543a2acc65c0434f57b0fc11aff" + integrity sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA== + +webidl-conversions@^6.0.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-6.1.0.tgz#9111b4d7ea80acd40f5270d666621afa78b69514" + integrity sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w== + websocket-driver@>=0.5.1: version "0.7.3" resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.3.tgz#a2d4e0d4f4f116f1e6297eba58b05d430100e9f9" @@ -13693,7 +13703,7 @@ websocket-extensions@>=0.1.1: resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.3.tgz#5d2ff22977003ec687a4b87073dfbbac146ccf29" integrity sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg== -whatwg-encoding@^1.0.1, whatwg-encoding@^1.0.5: +whatwg-encoding@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz#5abacf777c32166a51d085d6b4f3e7d27113ddb0" integrity sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw== @@ -13710,7 +13720,7 @@ whatwg-fetch@>=0.10.0, whatwg-fetch@^3.0.0: resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-3.0.0.tgz#fc804e458cc460009b1a2b966bc8817d2578aefb" integrity sha512-9GSJUgz1D4MfyKU7KRqwOjXCXTqWdFNvEr7eUBYchQiVc744mqK/MzXPNR2WsPkmkOa4ywfg8C2n8h+13Bey1Q== -whatwg-mimetype@^2.2.0, whatwg-mimetype@^2.3.0: +whatwg-mimetype@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz#3d4b1e0312d2079879f826aff18dbeeca5960fbf" integrity sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g== @@ -13724,6 +13734,15 @@ whatwg-url@^7.0.0: tr46 "^1.0.1" webidl-conversions "^4.0.2" +whatwg-url@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-8.0.0.tgz#37f256cb746398e19b107bd6ef820b4ae2d15871" + integrity sha512-41ou2Dugpij8/LPO5Pq64K5q++MnRCBpEHvQr26/mArEKTkCV5aoXIqyhuYtE0pkqScXwhf2JP57rkRTYM29lQ== + dependencies: + lodash.sortby "^4.7.0" + tr46 "^2.0.0" + webidl-conversions "^5.0.0" + which-module@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" @@ -13892,10 +13911,10 @@ ws@^1.1.0, ws@^1.1.5: options ">=0.0.5" ultron "1.0.x" -ws@^7, ws@^7.0.0: - version "7.2.3" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.2.3.tgz#a5411e1fb04d5ed0efee76d26d5c46d830c39b46" - integrity sha512-HTDl9G9hbkNDk98naoR/cHDws7+EyYMOdL1BmjsZXRUjf7d+MficC4B7HLUPlSiho0vg+CWKrGIt/VJBd1xunQ== +ws@^7, ws@^7.2.3: + version "7.2.5" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.2.5.tgz#abb1370d4626a5a9cd79d8de404aa18b3465d10d" + integrity sha512-C34cIU4+DB2vMyAbmEKossWq2ZQDr6QEyuuCzWrM9zfw1sGc0mYiJ0UnG9zzNykt49C2Fi34hvr2vssFQRS6EA== x-is-string@^0.1.0: version "0.1.0" @@ -13937,7 +13956,7 @@ xmlbuilder@^9.0.7: resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-9.0.7.tgz#132ee63d2ec5565c557e20f4c22df9aca686b10d" integrity sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0= -xmlchars@^2.1.1: +xmlchars@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb" integrity sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw== From 6792ff2c55e13c7494a4971e7949ca5403eedfb9 Mon Sep 17 00:00:00 2001 From: Andrew Leedham Date: Sat, 2 May 2020 12:47:59 +0100 Subject: [PATCH 044/106] chore: upgrade chalk to v4 (#9752) --- CHANGELOG.md | 1 + package.json | 2 +- packages/babel-jest/package.json | 2 +- packages/expect/package.json | 2 +- packages/jest-circus/package.json | 2 +- packages/jest-cli/package.json | 2 +- packages/jest-config/package.json | 2 +- packages/jest-console/package.json | 2 +- packages/jest-core/package.json | 2 +- packages/jest-diff/package.json | 2 +- packages/jest-each/package.json | 2 +- packages/jest-jasmine2/package.json | 2 +- packages/jest-matcher-utils/package.json | 2 +- packages/jest-message-util/package.json | 2 +- packages/jest-reporters/package.json | 2 +- packages/jest-resolve/package.json | 2 +- packages/jest-runner/package.json | 2 +- packages/jest-runtime/package.json | 2 +- packages/jest-snapshot/package.json | 2 +- packages/jest-transform/package.json | 2 +- packages/jest-types/package.json | 2 +- packages/jest-util/package.json | 2 +- packages/jest-validate/package.json | 2 +- packages/jest-watcher/package.json | 2 +- tsconfig.json | 3 +-- yarn.lock | 8 ++++++++ 26 files changed, 33 insertions(+), 25 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b6d876b649b..e6422a6724cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ - `[*]` [**BREAKING**] TypeScript definitions requires a minimum of TypeScript v3.8 ([#9823](https://github.com/facebook/jest/pull/9823)) - `[*]` [**BREAKING**] Drop support for Node 8 ([#9423](https://github.com/facebook/jest/pull/9423)) +- `[*]` Upgrade to chalk@4 ([#9752](https://github.com/facebook/jest/pull/9752)) - `[jest-runtime]` [**BREAKING**] Remove long-deprecated `require.requireActual` and `require.requireMock` methods ([#9854](https://github.com/facebook/jest/pull/9854)) - `[expect, jest-mock, pretty-format]` [**BREAKING**] Remove `build-es5` from package ([#9945](https://github.com/facebook/jest/pull/9945)) - `[jest-haste-map]` [**BREAKING**] removed `providesModuleNodeModules` ([#8535](https://github.com/facebook/jest/pull/8535)) diff --git a/package.json b/package.json index da549c4849a9..43b81354976b 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "babel-plugin-replace-ts-export-assignment": "^0.0.2", "babel-plugin-typescript-strip-namespaces": "^1.1.1", "camelcase": "^5.0.0", - "chalk": "^3.0.0", + "chalk": "^4.0.0", "chokidar": "^3.3.0", "codecov": "^3.0.0", "debug": "^4.0.1", diff --git a/packages/babel-jest/package.json b/packages/babel-jest/package.json index 0e1e276306ec..ffdb541eeacb 100644 --- a/packages/babel-jest/package.json +++ b/packages/babel-jest/package.json @@ -16,7 +16,7 @@ "@types/babel__core": "^7.1.7", "babel-plugin-istanbul": "^6.0.0", "babel-preset-jest": "^25.5.0", - "chalk": "^3.0.0", + "chalk": "^4.0.0", "graceful-fs": "^4.2.4", "slash": "^3.0.0" }, diff --git a/packages/expect/package.json b/packages/expect/package.json index 9680531bdb7e..c428a5ad2214 100644 --- a/packages/expect/package.json +++ b/packages/expect/package.json @@ -19,7 +19,7 @@ }, "devDependencies": { "@jest/test-utils": "^25.5.0", - "chalk": "^3.0.0", + "chalk": "^4.0.0", "fast-check": "^1.13.0", "immutable": "^4.0.0-rc.12" }, diff --git a/packages/jest-circus/package.json b/packages/jest-circus/package.json index 1bab55493862..7e8a454fb3a5 100644 --- a/packages/jest-circus/package.json +++ b/packages/jest-circus/package.json @@ -14,7 +14,7 @@ "@jest/environment": "^25.5.0", "@jest/test-result": "^25.5.0", "@jest/types": "^25.5.0", - "chalk": "^3.0.0", + "chalk": "^4.0.0", "co": "^4.6.0", "dedent": "^0.7.0", "expect": "^25.5.0", diff --git a/packages/jest-cli/package.json b/packages/jest-cli/package.json index 202bdeedeea1..2602a4695309 100644 --- a/packages/jest-cli/package.json +++ b/packages/jest-cli/package.json @@ -8,7 +8,7 @@ "@jest/core": "^25.5.4", "@jest/test-result": "^25.5.0", "@jest/types": "^25.5.0", - "chalk": "^3.0.0", + "chalk": "^4.0.0", "exit": "^0.1.2", "graceful-fs": "^4.2.4", "import-local": "^3.0.2", diff --git a/packages/jest-config/package.json b/packages/jest-config/package.json index 5a25bd861f6f..4bbbff1e5702 100644 --- a/packages/jest-config/package.json +++ b/packages/jest-config/package.json @@ -14,7 +14,7 @@ "@jest/test-sequencer": "^25.5.4", "@jest/types": "^25.5.0", "babel-jest": "^25.5.1", - "chalk": "^3.0.0", + "chalk": "^4.0.0", "deepmerge": "^4.2.2", "glob": "^7.1.1", "graceful-fs": "^4.2.4", diff --git a/packages/jest-console/package.json b/packages/jest-console/package.json index cb50286f7621..9557015393b1 100644 --- a/packages/jest-console/package.json +++ b/packages/jest-console/package.json @@ -11,7 +11,7 @@ "types": "build/index.d.ts", "dependencies": { "@jest/types": "^25.5.0", - "chalk": "^3.0.0", + "chalk": "^4.0.0", "jest-message-util": "^25.5.0", "jest-util": "^25.5.0", "slash": "^3.0.0" diff --git a/packages/jest-core/package.json b/packages/jest-core/package.json index c7c65b165225..f798770bf4f9 100644 --- a/packages/jest-core/package.json +++ b/packages/jest-core/package.json @@ -11,7 +11,7 @@ "@jest/transform": "^25.5.1", "@jest/types": "^25.5.0", "ansi-escapes": "^4.2.1", - "chalk": "^3.0.0", + "chalk": "^4.0.0", "exit": "^0.1.2", "graceful-fs": "^4.2.4", "jest-changed-files": "^25.5.0", diff --git a/packages/jest-diff/package.json b/packages/jest-diff/package.json index 9506bbf47045..033f6920d1ba 100644 --- a/packages/jest-diff/package.json +++ b/packages/jest-diff/package.json @@ -10,7 +10,7 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "chalk": "^3.0.0", + "chalk": "^4.0.0", "diff-sequences": "^25.2.6", "jest-get-type": "^25.2.6", "pretty-format": "^25.5.0" diff --git a/packages/jest-each/package.json b/packages/jest-each/package.json index aa8dce0cdd7b..9fb2eb180323 100644 --- a/packages/jest-each/package.json +++ b/packages/jest-each/package.json @@ -19,7 +19,7 @@ "license": "MIT", "dependencies": { "@jest/types": "^25.5.0", - "chalk": "^3.0.0", + "chalk": "^4.0.0", "jest-get-type": "^25.2.6", "jest-util": "^25.5.0", "pretty-format": "^25.5.0" diff --git a/packages/jest-jasmine2/package.json b/packages/jest-jasmine2/package.json index 672d237af121..b93d9ec501bb 100644 --- a/packages/jest-jasmine2/package.json +++ b/packages/jest-jasmine2/package.json @@ -15,7 +15,7 @@ "@jest/source-map": "^25.5.0", "@jest/test-result": "^25.5.0", "@jest/types": "^25.5.0", - "chalk": "^3.0.0", + "chalk": "^4.0.0", "co": "^4.6.0", "expect": "^25.5.0", "is-generator-fn": "^2.0.0", diff --git a/packages/jest-matcher-utils/package.json b/packages/jest-matcher-utils/package.json index ad6b36a73ab0..9a97c06662f0 100644 --- a/packages/jest-matcher-utils/package.json +++ b/packages/jest-matcher-utils/package.json @@ -14,7 +14,7 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "chalk": "^3.0.0", + "chalk": "^4.0.0", "jest-diff": "^25.5.0", "jest-get-type": "^25.2.6", "pretty-format": "^25.5.0" diff --git a/packages/jest-message-util/package.json b/packages/jest-message-util/package.json index 5d7496076956..5347f48f5425 100644 --- a/packages/jest-message-util/package.json +++ b/packages/jest-message-util/package.json @@ -16,7 +16,7 @@ "@babel/code-frame": "^7.0.0", "@jest/types": "^25.5.0", "@types/stack-utils": "^1.0.1", - "chalk": "^3.0.0", + "chalk": "^4.0.0", "graceful-fs": "^4.2.4", "micromatch": "^4.0.2", "slash": "^3.0.0", diff --git a/packages/jest-reporters/package.json b/packages/jest-reporters/package.json index 121eb380587f..27223625b0df 100644 --- a/packages/jest-reporters/package.json +++ b/packages/jest-reporters/package.json @@ -10,7 +10,7 @@ "@jest/test-result": "^25.5.0", "@jest/transform": "^25.5.1", "@jest/types": "^25.5.0", - "chalk": "^3.0.0", + "chalk": "^4.0.0", "collect-v8-coverage": "^1.0.0", "exit": "^0.1.2", "glob": "^7.1.2", diff --git a/packages/jest-resolve/package.json b/packages/jest-resolve/package.json index 5a4f35574c88..b3560e65268a 100644 --- a/packages/jest-resolve/package.json +++ b/packages/jest-resolve/package.json @@ -11,7 +11,7 @@ "types": "build/index.d.ts", "dependencies": { "@jest/types": "^25.5.0", - "chalk": "^3.0.0", + "chalk": "^4.0.0", "graceful-fs": "^4.2.4", "jest-pnp-resolver": "^1.2.1", "read-pkg-up": "^7.0.1", diff --git a/packages/jest-runner/package.json b/packages/jest-runner/package.json index 6e9f8e74d32b..4397080248db 100644 --- a/packages/jest-runner/package.json +++ b/packages/jest-runner/package.json @@ -14,7 +14,7 @@ "@jest/environment": "^25.5.0", "@jest/test-result": "^25.5.0", "@jest/types": "^25.5.0", - "chalk": "^3.0.0", + "chalk": "^4.0.0", "exit": "^0.1.2", "graceful-fs": "^4.2.4", "jest-config": "^25.5.4", diff --git a/packages/jest-runtime/package.json b/packages/jest-runtime/package.json index fd62239b1908..ad58bb078d09 100644 --- a/packages/jest-runtime/package.json +++ b/packages/jest-runtime/package.json @@ -18,7 +18,7 @@ "@jest/transform": "^25.5.1", "@jest/types": "^25.5.0", "@types/yargs": "^15.0.0", - "chalk": "^3.0.0", + "chalk": "^4.0.0", "collect-v8-coverage": "^1.0.0", "exit": "^0.1.2", "glob": "^7.1.3", diff --git a/packages/jest-snapshot/package.json b/packages/jest-snapshot/package.json index 874be145fb39..cd023c616d16 100644 --- a/packages/jest-snapshot/package.json +++ b/packages/jest-snapshot/package.json @@ -13,7 +13,7 @@ "@babel/types": "^7.0.0", "@jest/types": "^25.5.0", "@types/prettier": "^1.19.0", - "chalk": "^3.0.0", + "chalk": "^4.0.0", "expect": "^25.5.0", "graceful-fs": "^4.2.4", "jest-diff": "^25.5.0", diff --git a/packages/jest-transform/package.json b/packages/jest-transform/package.json index a72838d33528..34eaf2bd5b9c 100644 --- a/packages/jest-transform/package.json +++ b/packages/jest-transform/package.json @@ -13,7 +13,7 @@ "@babel/core": "^7.1.0", "@jest/types": "^25.5.0", "babel-plugin-istanbul": "^6.0.0", - "chalk": "^3.0.0", + "chalk": "^4.0.0", "convert-source-map": "^1.4.0", "fast-json-stable-stringify": "^2.0.0", "graceful-fs": "^4.2.4", diff --git a/packages/jest-types/package.json b/packages/jest-types/package.json index 988e9035b893..2f4739c02855 100644 --- a/packages/jest-types/package.json +++ b/packages/jest-types/package.json @@ -16,7 +16,7 @@ "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^1.1.1", "@types/yargs": "^15.0.0", - "chalk": "^3.0.0" + "chalk": "^4.0.0" }, "devDependencies": { "@types/node": "*" diff --git a/packages/jest-util/package.json b/packages/jest-util/package.json index 72f39de53d15..005517f0216f 100644 --- a/packages/jest-util/package.json +++ b/packages/jest-util/package.json @@ -11,7 +11,7 @@ "types": "build/index.d.ts", "dependencies": { "@jest/types": "^25.5.0", - "chalk": "^3.0.0", + "chalk": "^4.0.0", "graceful-fs": "^4.2.4", "is-ci": "^2.0.0", "make-dir": "^3.0.0" diff --git a/packages/jest-validate/package.json b/packages/jest-validate/package.json index 0e175c1236ec..eeade977e96e 100644 --- a/packages/jest-validate/package.json +++ b/packages/jest-validate/package.json @@ -12,7 +12,7 @@ "dependencies": { "@jest/types": "^25.5.0", "camelcase": "^5.3.1", - "chalk": "^3.0.0", + "chalk": "^4.0.0", "jest-get-type": "^25.2.6", "leven": "^3.1.0", "pretty-format": "^25.5.0" diff --git a/packages/jest-watcher/package.json b/packages/jest-watcher/package.json index 5047c4d4798c..14b321d64a89 100644 --- a/packages/jest-watcher/package.json +++ b/packages/jest-watcher/package.json @@ -8,7 +8,7 @@ "@jest/test-result": "^25.5.0", "@jest/types": "^25.5.0", "ansi-escapes": "^4.2.1", - "chalk": "^3.0.0", + "chalk": "^4.0.0", "jest-util": "^25.5.0", "string-length": "^3.1.0" }, diff --git a/tsconfig.json b/tsconfig.json index b1d9bfdd5414..d5e967ef95d0 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -7,8 +7,7 @@ "declaration": true, "composite": true, "emitDeclarationOnly": true, - // blocked by https://github.com/chalk/chalk/pull/390 - // "isolatedModules": true, + "isolatedModules": true, "importsNotUsedAsValues": "error", "strict": true, diff --git a/yarn.lock b/yarn.lock index b8f9312e754f..c580faf092eb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3838,6 +3838,14 @@ chalk@^3.0.0: ansi-styles "^4.1.0" supports-color "^7.1.0" +chalk@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.0.0.tgz#6e98081ed2d17faab615eb52ac66ec1fe6209e72" + integrity sha512-N9oWFcegS0sFr9oh1oz2d7Npos6vNoWW9HvtCg5N1KRFpUhaAhvTv5Y58g880fZaEYSNm3qDz8SU1UrGvp+n7A== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + character-entities-legacy@^1.0.0: version "1.1.4" resolved "https://registry.yarnpkg.com/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz#94bc1845dce70a5bb9d2ecc748725661293d8fc1" From c6b19a4f653fafebc0ec2fb34dc27f309ef5850d Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Sat, 2 May 2020 14:02:56 +0200 Subject: [PATCH 045/106] chore: run some jsdom tests in leak check (#9938) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 43b81354976b..65f1067dcdb4 100644 --- a/package.json +++ b/package.json @@ -97,7 +97,7 @@ "test-ci": "yarn jest-coverage --color -i --config jest.config.ci.js && yarn test-leak && node ./scripts/mapCoverage.js && codecov", "test-ci-partial": "yarn jest --color -i --config jest.config.ci.js", "test-pretty-format-perf": "node packages/pretty-format/perf/test.js", - "test-leak": "yarn jest -i --detectLeaks jest-mock jest-diff jest-repl", + "test-leak": "yarn jest -i --detectLeaks jest-mock jest-diff jest-repl pretty-format", "test": "yarn lint && yarn jest", "verify-old-ts": "node ./scripts/verifyOldTs.js", "watch": "yarn build && node ./scripts/watch.js", From ba962e7e9669a4a2f723c2536c97462c8ddfff2d Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Sat, 2 May 2020 14:12:44 +0200 Subject: [PATCH 046/106] v26.0.0-alpha.0 --- lerna.json | 2 +- packages/babel-jest/package.json | 8 ++-- packages/babel-plugin-jest-hoist/package.json | 2 +- packages/babel-preset-jest/package.json | 4 +- packages/diff-sequences/package.json | 2 +- packages/eslint-config-fb-strict/package.json | 2 +- packages/expect/package.json | 14 +++---- packages/jest-changed-files/package.json | 4 +- packages/jest-circus/package.json | 26 ++++++------ packages/jest-cli/package.json | 16 ++++---- packages/jest-config/package.json | 26 ++++++------ packages/jest-console/package.json | 8 ++-- packages/jest-core/package.json | 40 +++++++++---------- packages/jest-diff/package.json | 10 ++--- packages/jest-docblock/package.json | 2 +- packages/jest-each/package.json | 10 ++--- packages/jest-environment-jsdom/package.json | 12 +++--- packages/jest-environment-node/package.json | 12 +++--- packages/jest-environment/package.json | 8 ++-- packages/jest-fake-timers/package.json | 10 ++--- packages/jest-get-type/package.json | 2 +- packages/jest-globals/package.json | 8 ++-- packages/jest-haste-map/package.json | 12 +++--- packages/jest-jasmine2/package.json | 26 ++++++------ packages/jest-leak-detector/package.json | 6 +-- packages/jest-matcher-utils/package.json | 10 ++--- packages/jest-message-util/package.json | 4 +- packages/jest-mock/package.json | 4 +- packages/jest-phabricator/package.json | 4 +- packages/jest-regex-util/package.json | 2 +- packages/jest-repl/package.json | 14 +++---- packages/jest-reporters/package.json | 18 ++++----- .../jest-resolve-dependencies/package.json | 14 +++---- packages/jest-resolve/package.json | 6 +-- packages/jest-runner/package.json | 32 +++++++-------- packages/jest-runtime/package.json | 38 +++++++++--------- packages/jest-serializer/package.json | 2 +- packages/jest-snapshot/package.json | 20 +++++----- packages/jest-source-map/package.json | 2 +- packages/jest-test-result/package.json | 6 +-- packages/jest-test-sequencer/package.json | 10 ++--- packages/jest-transform/package.json | 10 ++--- packages/jest-types/package.json | 2 +- packages/jest-util/package.json | 4 +- packages/jest-validate/package.json | 8 ++-- packages/jest-watcher/package.json | 8 ++-- packages/jest-worker/package.json | 2 +- packages/jest/package.json | 6 +-- packages/pretty-format/package.json | 4 +- packages/test-utils/package.json | 2 +- 50 files changed, 252 insertions(+), 252 deletions(-) diff --git a/lerna.json b/lerna.json index 04f0ff59052d..d9c35ddc909e 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "25.5.4", + "version": "26.0.0-alpha.0", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/babel-jest/package.json b/packages/babel-jest/package.json index ffdb541eeacb..00fab713bb9a 100644 --- a/packages/babel-jest/package.json +++ b/packages/babel-jest/package.json @@ -1,7 +1,7 @@ { "name": "babel-jest", "description": "Jest plugin to use babel for transformation.", - "version": "25.5.1", + "version": "26.0.0-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -11,11 +11,11 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/transform": "^25.5.1", - "@jest/types": "^25.5.0", + "@jest/transform": "^26.0.0-alpha.0", + "@jest/types": "^26.0.0-alpha.0", "@types/babel__core": "^7.1.7", "babel-plugin-istanbul": "^6.0.0", - "babel-preset-jest": "^25.5.0", + "babel-preset-jest": "^26.0.0-alpha.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.4", "slash": "^3.0.0" diff --git a/packages/babel-plugin-jest-hoist/package.json b/packages/babel-plugin-jest-hoist/package.json index be774845d5ba..b4ed92dfc9f3 100644 --- a/packages/babel-plugin-jest-hoist/package.json +++ b/packages/babel-plugin-jest-hoist/package.json @@ -1,6 +1,6 @@ { "name": "babel-plugin-jest-hoist", - "version": "25.5.0", + "version": "26.0.0-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", diff --git a/packages/babel-preset-jest/package.json b/packages/babel-preset-jest/package.json index 0e651f95d6cf..cffdb9b65a96 100644 --- a/packages/babel-preset-jest/package.json +++ b/packages/babel-preset-jest/package.json @@ -1,6 +1,6 @@ { "name": "babel-preset-jest", - "version": "25.5.0", + "version": "26.0.0-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -9,7 +9,7 @@ "license": "MIT", "main": "index.js", "dependencies": { - "babel-plugin-jest-hoist": "^25.5.0", + "babel-plugin-jest-hoist": "^26.0.0-alpha.0", "babel-preset-current-node-syntax": "^0.1.2" }, "peerDependencies": { diff --git a/packages/diff-sequences/package.json b/packages/diff-sequences/package.json index 6d1e08a84d90..8404453610b6 100644 --- a/packages/diff-sequences/package.json +++ b/packages/diff-sequences/package.json @@ -1,6 +1,6 @@ { "name": "diff-sequences", - "version": "25.2.6", + "version": "26.0.0-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", diff --git a/packages/eslint-config-fb-strict/package.json b/packages/eslint-config-fb-strict/package.json index 11787b8927f6..6bba3cbe8e32 100644 --- a/packages/eslint-config-fb-strict/package.json +++ b/packages/eslint-config-fb-strict/package.json @@ -1,6 +1,6 @@ { "name": "eslint-config-fb-strict", - "version": "25.2.6", + "version": "26.0.0-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", diff --git a/packages/expect/package.json b/packages/expect/package.json index c428a5ad2214..37f055c5f19d 100644 --- a/packages/expect/package.json +++ b/packages/expect/package.json @@ -1,6 +1,6 @@ { "name": "expect", - "version": "25.5.0", + "version": "26.0.0-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,15 +10,15 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/types": "^25.5.0", + "@jest/types": "^26.0.0-alpha.0", "ansi-styles": "^4.0.0", - "jest-get-type": "^25.2.6", - "jest-matcher-utils": "^25.5.0", - "jest-message-util": "^25.5.0", - "jest-regex-util": "^25.2.6" + "jest-get-type": "^26.0.0-alpha.0", + "jest-matcher-utils": "^26.0.0-alpha.0", + "jest-message-util": "^26.0.0-alpha.0", + "jest-regex-util": "^26.0.0-alpha.0" }, "devDependencies": { - "@jest/test-utils": "^25.5.0", + "@jest/test-utils": "^26.0.0-alpha.0", "chalk": "^4.0.0", "fast-check": "^1.13.0", "immutable": "^4.0.0-rc.12" diff --git a/packages/jest-changed-files/package.json b/packages/jest-changed-files/package.json index 627500626d2c..227b968c3f13 100644 --- a/packages/jest-changed-files/package.json +++ b/packages/jest-changed-files/package.json @@ -1,6 +1,6 @@ { "name": "jest-changed-files", - "version": "25.5.0", + "version": "26.0.0-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,7 +10,7 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/types": "^25.5.0", + "@jest/types": "^26.0.0-alpha.0", "execa": "^3.2.0", "throat": "^5.0.0" }, diff --git a/packages/jest-circus/package.json b/packages/jest-circus/package.json index 7e8a454fb3a5..d0496a218c2f 100644 --- a/packages/jest-circus/package.json +++ b/packages/jest-circus/package.json @@ -1,6 +1,6 @@ { "name": "jest-circus", - "version": "25.5.4", + "version": "26.0.0-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -11,28 +11,28 @@ "types": "build/index.d.ts", "dependencies": { "@babel/traverse": "^7.1.0", - "@jest/environment": "^25.5.0", - "@jest/test-result": "^25.5.0", - "@jest/types": "^25.5.0", + "@jest/environment": "^26.0.0-alpha.0", + "@jest/test-result": "^26.0.0-alpha.0", + "@jest/types": "^26.0.0-alpha.0", "chalk": "^4.0.0", "co": "^4.6.0", "dedent": "^0.7.0", - "expect": "^25.5.0", + "expect": "^26.0.0-alpha.0", "is-generator-fn": "^2.0.0", - "jest-each": "^25.5.0", - "jest-matcher-utils": "^25.5.0", - "jest-message-util": "^25.5.0", - "jest-runtime": "^25.5.4", - "jest-snapshot": "^25.5.1", - "jest-util": "^25.5.0", - "pretty-format": "^25.5.0", + "jest-each": "^26.0.0-alpha.0", + "jest-matcher-utils": "^26.0.0-alpha.0", + "jest-message-util": "^26.0.0-alpha.0", + "jest-runtime": "^26.0.0-alpha.0", + "jest-snapshot": "^26.0.0-alpha.0", + "jest-util": "^26.0.0-alpha.0", + "pretty-format": "^26.0.0-alpha.0", "stack-utils": "^1.0.1", "throat": "^5.0.0" }, "devDependencies": { "@babel/core": "^7.1.0", "@babel/register": "^7.0.0", - "@jest/test-utils": "^25.5.0", + "@jest/test-utils": "^26.0.0-alpha.0", "@types/babel__traverse": "^7.0.4", "@types/co": "^4.6.0", "@types/dedent": "^0.7.0", diff --git a/packages/jest-cli/package.json b/packages/jest-cli/package.json index 2602a4695309..2cdeae5b3054 100644 --- a/packages/jest-cli/package.json +++ b/packages/jest-cli/package.json @@ -1,27 +1,27 @@ { "name": "jest-cli", "description": "Delightful JavaScript Testing.", - "version": "25.5.4", + "version": "26.0.0-alpha.0", "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/core": "^25.5.4", - "@jest/test-result": "^25.5.0", - "@jest/types": "^25.5.0", + "@jest/core": "^26.0.0-alpha.0", + "@jest/test-result": "^26.0.0-alpha.0", + "@jest/types": "^26.0.0-alpha.0", "chalk": "^4.0.0", "exit": "^0.1.2", "graceful-fs": "^4.2.4", "import-local": "^3.0.2", "is-ci": "^2.0.0", - "jest-config": "^25.5.4", - "jest-util": "^25.5.0", - "jest-validate": "^25.5.0", + "jest-config": "^26.0.0-alpha.0", + "jest-util": "^26.0.0-alpha.0", + "jest-validate": "^26.0.0-alpha.0", "prompts": "^2.0.1", "realpath-native": "^2.0.0", "yargs": "^15.3.1" }, "devDependencies": { - "@jest/test-utils": "^25.5.0", + "@jest/test-utils": "^26.0.0-alpha.0", "@types/exit": "^0.1.30", "@types/graceful-fs": "^4.1.3", "@types/is-ci": "^2.0.0", diff --git a/packages/jest-config/package.json b/packages/jest-config/package.json index 4bbbff1e5702..baba47cccfc1 100644 --- a/packages/jest-config/package.json +++ b/packages/jest-config/package.json @@ -1,6 +1,6 @@ { "name": "jest-config", - "version": "25.5.4", + "version": "26.0.0-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -11,23 +11,23 @@ "types": "build/index.d.ts", "dependencies": { "@babel/core": "^7.1.0", - "@jest/test-sequencer": "^25.5.4", - "@jest/types": "^25.5.0", - "babel-jest": "^25.5.1", + "@jest/test-sequencer": "^26.0.0-alpha.0", + "@jest/types": "^26.0.0-alpha.0", + "babel-jest": "^26.0.0-alpha.0", "chalk": "^4.0.0", "deepmerge": "^4.2.2", "glob": "^7.1.1", "graceful-fs": "^4.2.4", - "jest-environment-jsdom": "^25.5.0", - "jest-environment-node": "^25.5.0", - "jest-get-type": "^25.2.6", - "jest-jasmine2": "^25.5.4", - "jest-regex-util": "^25.2.6", - "jest-resolve": "^25.5.1", - "jest-util": "^25.5.0", - "jest-validate": "^25.5.0", + "jest-environment-jsdom": "^26.0.0-alpha.0", + "jest-environment-node": "^26.0.0-alpha.0", + "jest-get-type": "^26.0.0-alpha.0", + "jest-jasmine2": "^26.0.0-alpha.0", + "jest-regex-util": "^26.0.0-alpha.0", + "jest-resolve": "^26.0.0-alpha.0", + "jest-util": "^26.0.0-alpha.0", + "jest-validate": "^26.0.0-alpha.0", "micromatch": "^4.0.2", - "pretty-format": "^25.5.0", + "pretty-format": "^26.0.0-alpha.0", "realpath-native": "^2.0.0" }, "devDependencies": { diff --git a/packages/jest-console/package.json b/packages/jest-console/package.json index 9557015393b1..d17ddb44b84b 100644 --- a/packages/jest-console/package.json +++ b/packages/jest-console/package.json @@ -1,6 +1,6 @@ { "name": "@jest/console", - "version": "25.5.0", + "version": "26.0.0-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,10 +10,10 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/types": "^25.5.0", + "@jest/types": "^26.0.0-alpha.0", "chalk": "^4.0.0", - "jest-message-util": "^25.5.0", - "jest-util": "^25.5.0", + "jest-message-util": "^26.0.0-alpha.0", + "jest-util": "^26.0.0-alpha.0", "slash": "^3.0.0" }, "devDependencies": { diff --git a/packages/jest-core/package.json b/packages/jest-core/package.json index f798770bf4f9..98d95d21bcdf 100644 --- a/packages/jest-core/package.json +++ b/packages/jest-core/package.json @@ -1,32 +1,32 @@ { "name": "@jest/core", "description": "Delightful JavaScript Testing.", - "version": "25.5.4", + "version": "26.0.0-alpha.0", "main": "build/jest.js", "types": "build/jest.d.ts", "dependencies": { - "@jest/console": "^25.5.0", - "@jest/reporters": "^25.5.1", - "@jest/test-result": "^25.5.0", - "@jest/transform": "^25.5.1", - "@jest/types": "^25.5.0", + "@jest/console": "^26.0.0-alpha.0", + "@jest/reporters": "^26.0.0-alpha.0", + "@jest/test-result": "^26.0.0-alpha.0", + "@jest/transform": "^26.0.0-alpha.0", + "@jest/types": "^26.0.0-alpha.0", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", "exit": "^0.1.2", "graceful-fs": "^4.2.4", - "jest-changed-files": "^25.5.0", - "jest-config": "^25.5.4", - "jest-haste-map": "^25.5.1", - "jest-message-util": "^25.5.0", - "jest-regex-util": "^25.2.6", - "jest-resolve": "^25.5.1", - "jest-resolve-dependencies": "^25.5.4", - "jest-runner": "^25.5.4", - "jest-runtime": "^25.5.4", - "jest-snapshot": "^25.5.1", - "jest-util": "^25.5.0", - "jest-validate": "^25.5.0", - "jest-watcher": "^25.5.0", + "jest-changed-files": "^26.0.0-alpha.0", + "jest-config": "^26.0.0-alpha.0", + "jest-haste-map": "^26.0.0-alpha.0", + "jest-message-util": "^26.0.0-alpha.0", + "jest-regex-util": "^26.0.0-alpha.0", + "jest-resolve": "^26.0.0-alpha.0", + "jest-resolve-dependencies": "^26.0.0-alpha.0", + "jest-runner": "^26.0.0-alpha.0", + "jest-runtime": "^26.0.0-alpha.0", + "jest-snapshot": "^26.0.0-alpha.0", + "jest-util": "^26.0.0-alpha.0", + "jest-validate": "^26.0.0-alpha.0", + "jest-watcher": "^26.0.0-alpha.0", "micromatch": "^4.0.2", "p-each-series": "^2.1.0", "realpath-native": "^2.0.0", @@ -35,7 +35,7 @@ "strip-ansi": "^6.0.0" }, "devDependencies": { - "@jest/test-sequencer": "^25.5.4", + "@jest/test-sequencer": "^26.0.0-alpha.0", "@types/exit": "^0.1.30", "@types/graceful-fs": "^4.1.2", "@types/micromatch": "^4.0.0", diff --git a/packages/jest-diff/package.json b/packages/jest-diff/package.json index 033f6920d1ba..87bb316647d4 100644 --- a/packages/jest-diff/package.json +++ b/packages/jest-diff/package.json @@ -1,6 +1,6 @@ { "name": "jest-diff", - "version": "25.5.0", + "version": "26.0.0-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -11,12 +11,12 @@ "types": "build/index.d.ts", "dependencies": { "chalk": "^4.0.0", - "diff-sequences": "^25.2.6", - "jest-get-type": "^25.2.6", - "pretty-format": "^25.5.0" + "diff-sequences": "^26.0.0-alpha.0", + "jest-get-type": "^26.0.0-alpha.0", + "pretty-format": "^26.0.0-alpha.0" }, "devDependencies": { - "@jest/test-utils": "^25.5.0", + "@jest/test-utils": "^26.0.0-alpha.0", "strip-ansi": "^6.0.0" }, "engines": { diff --git a/packages/jest-docblock/package.json b/packages/jest-docblock/package.json index 7a909edd4c79..06bea1a2cf1d 100644 --- a/packages/jest-docblock/package.json +++ b/packages/jest-docblock/package.json @@ -1,6 +1,6 @@ { "name": "jest-docblock", - "version": "25.3.0", + "version": "26.0.0-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", diff --git a/packages/jest-each/package.json b/packages/jest-each/package.json index 9fb2eb180323..e7e8eeaea1db 100644 --- a/packages/jest-each/package.json +++ b/packages/jest-each/package.json @@ -1,6 +1,6 @@ { "name": "jest-each", - "version": "25.5.0", + "version": "26.0.0-alpha.0", "description": "Parameterised tests for Jest", "main": "build/index.js", "types": "build/index.d.ts", @@ -18,11 +18,11 @@ "author": "Matt Phillips (mattphillips)", "license": "MIT", "dependencies": { - "@jest/types": "^25.5.0", + "@jest/types": "^26.0.0-alpha.0", "chalk": "^4.0.0", - "jest-get-type": "^25.2.6", - "jest-util": "^25.5.0", - "pretty-format": "^25.5.0" + "jest-get-type": "^26.0.0-alpha.0", + "jest-util": "^26.0.0-alpha.0", + "pretty-format": "^26.0.0-alpha.0" }, "engines": { "node": ">= 10.14.2" diff --git a/packages/jest-environment-jsdom/package.json b/packages/jest-environment-jsdom/package.json index d532935ccf69..81a0503d115c 100644 --- a/packages/jest-environment-jsdom/package.json +++ b/packages/jest-environment-jsdom/package.json @@ -1,6 +1,6 @@ { "name": "jest-environment-jsdom", - "version": "25.5.0", + "version": "26.0.0-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,11 +10,11 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/environment": "^25.5.0", - "@jest/fake-timers": "^25.5.0", - "@jest/types": "^25.5.0", - "jest-mock": "^25.5.0", - "jest-util": "^25.5.0", + "@jest/environment": "^26.0.0-alpha.0", + "@jest/fake-timers": "^26.0.0-alpha.0", + "@jest/types": "^26.0.0-alpha.0", + "jest-mock": "^26.0.0-alpha.0", + "jest-util": "^26.0.0-alpha.0", "jsdom": "^16.2.2" }, "devDependencies": { diff --git a/packages/jest-environment-node/package.json b/packages/jest-environment-node/package.json index 8d54d5edeba5..d0a026f3e8ed 100644 --- a/packages/jest-environment-node/package.json +++ b/packages/jest-environment-node/package.json @@ -1,6 +1,6 @@ { "name": "jest-environment-node", - "version": "25.5.0", + "version": "26.0.0-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,11 +10,11 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/environment": "^25.5.0", - "@jest/fake-timers": "^25.5.0", - "@jest/types": "^25.5.0", - "jest-mock": "^25.5.0", - "jest-util": "^25.5.0" + "@jest/environment": "^26.0.0-alpha.0", + "@jest/fake-timers": "^26.0.0-alpha.0", + "@jest/types": "^26.0.0-alpha.0", + "jest-mock": "^26.0.0-alpha.0", + "jest-util": "^26.0.0-alpha.0" }, "engines": { "node": ">= 10.14.2" diff --git a/packages/jest-environment/package.json b/packages/jest-environment/package.json index 167f984b08b7..37768c59827a 100644 --- a/packages/jest-environment/package.json +++ b/packages/jest-environment/package.json @@ -1,6 +1,6 @@ { "name": "@jest/environment", - "version": "25.5.0", + "version": "26.0.0-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,9 +10,9 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/fake-timers": "^25.5.0", - "@jest/types": "^25.5.0", - "jest-mock": "^25.5.0" + "@jest/fake-timers": "^26.0.0-alpha.0", + "@jest/types": "^26.0.0-alpha.0", + "jest-mock": "^26.0.0-alpha.0" }, "devDependencies": { "@types/node": "*" diff --git a/packages/jest-fake-timers/package.json b/packages/jest-fake-timers/package.json index 524bc45263b5..aeebf7229c23 100644 --- a/packages/jest-fake-timers/package.json +++ b/packages/jest-fake-timers/package.json @@ -1,6 +1,6 @@ { "name": "@jest/fake-timers", - "version": "25.5.0", + "version": "26.0.0-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,10 +10,10 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/types": "^25.5.0", - "jest-message-util": "^25.5.0", - "jest-mock": "^25.5.0", - "jest-util": "^25.5.0", + "@jest/types": "^26.0.0-alpha.0", + "jest-message-util": "^26.0.0-alpha.0", + "jest-mock": "^26.0.0-alpha.0", + "jest-util": "^26.0.0-alpha.0", "lolex": "^5.0.0" }, "devDependencies": { diff --git a/packages/jest-get-type/package.json b/packages/jest-get-type/package.json index 5f112ea4bde8..d5174f8d465b 100644 --- a/packages/jest-get-type/package.json +++ b/packages/jest-get-type/package.json @@ -1,7 +1,7 @@ { "name": "jest-get-type", "description": "A utility function to get the type of a value", - "version": "25.2.6", + "version": "26.0.0-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", diff --git a/packages/jest-globals/package.json b/packages/jest-globals/package.json index 793872be905c..e41c59da2d3a 100644 --- a/packages/jest-globals/package.json +++ b/packages/jest-globals/package.json @@ -1,6 +1,6 @@ { "name": "@jest/globals", - "version": "25.5.2", + "version": "26.0.0-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -13,9 +13,9 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/environment": "^25.5.0", - "@jest/types": "^25.5.0", - "expect": "^25.5.0" + "@jest/environment": "^26.0.0-alpha.0", + "@jest/types": "^26.0.0-alpha.0", + "expect": "^26.0.0-alpha.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-haste-map/package.json b/packages/jest-haste-map/package.json index a67445e06c4c..c48ee0765c32 100644 --- a/packages/jest-haste-map/package.json +++ b/packages/jest-haste-map/package.json @@ -1,6 +1,6 @@ { "name": "jest-haste-map", - "version": "25.5.1", + "version": "26.0.0-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,21 +10,21 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/types": "^25.5.0", + "@jest/types": "^26.0.0-alpha.0", "@types/graceful-fs": "^4.1.2", "anymatch": "^3.0.3", "fb-watchman": "^2.0.0", "graceful-fs": "^4.2.4", - "jest-serializer": "^25.5.0", - "jest-util": "^25.5.0", - "jest-worker": "^25.5.0", + "jest-serializer": "^26.0.0-alpha.0", + "jest-util": "^26.0.0-alpha.0", + "jest-worker": "^26.0.0-alpha.0", "micromatch": "^4.0.2", "sane": "^4.0.3", "walker": "^1.0.7", "which": "^2.0.2" }, "devDependencies": { - "@jest/test-utils": "^25.5.0", + "@jest/test-utils": "^26.0.0-alpha.0", "@types/anymatch": "^1.3.1", "@types/fb-watchman": "^2.0.0", "@types/micromatch": "^4.0.0", diff --git a/packages/jest-jasmine2/package.json b/packages/jest-jasmine2/package.json index b93d9ec501bb..446484de783b 100644 --- a/packages/jest-jasmine2/package.json +++ b/packages/jest-jasmine2/package.json @@ -1,6 +1,6 @@ { "name": "jest-jasmine2", - "version": "25.5.4", + "version": "26.0.0-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -11,21 +11,21 @@ "types": "build/index.d.ts", "dependencies": { "@babel/traverse": "^7.1.0", - "@jest/environment": "^25.5.0", - "@jest/source-map": "^25.5.0", - "@jest/test-result": "^25.5.0", - "@jest/types": "^25.5.0", + "@jest/environment": "^26.0.0-alpha.0", + "@jest/source-map": "^26.0.0-alpha.0", + "@jest/test-result": "^26.0.0-alpha.0", + "@jest/types": "^26.0.0-alpha.0", "chalk": "^4.0.0", "co": "^4.6.0", - "expect": "^25.5.0", + "expect": "^26.0.0-alpha.0", "is-generator-fn": "^2.0.0", - "jest-each": "^25.5.0", - "jest-matcher-utils": "^25.5.0", - "jest-message-util": "^25.5.0", - "jest-runtime": "^25.5.4", - "jest-snapshot": "^25.5.1", - "jest-util": "^25.5.0", - "pretty-format": "^25.5.0", + "jest-each": "^26.0.0-alpha.0", + "jest-matcher-utils": "^26.0.0-alpha.0", + "jest-message-util": "^26.0.0-alpha.0", + "jest-runtime": "^26.0.0-alpha.0", + "jest-snapshot": "^26.0.0-alpha.0", + "jest-util": "^26.0.0-alpha.0", + "pretty-format": "^26.0.0-alpha.0", "throat": "^5.0.0" }, "devDependencies": { diff --git a/packages/jest-leak-detector/package.json b/packages/jest-leak-detector/package.json index e6395551be8d..8cf628e2e434 100644 --- a/packages/jest-leak-detector/package.json +++ b/packages/jest-leak-detector/package.json @@ -1,6 +1,6 @@ { "name": "jest-leak-detector", - "version": "25.5.0", + "version": "26.0.0-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,8 +10,8 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "jest-get-type": "^25.2.6", - "pretty-format": "^25.5.0" + "jest-get-type": "^26.0.0-alpha.0", + "pretty-format": "^26.0.0-alpha.0" }, "devDependencies": { "@types/weak-napi": "^1.0.0", diff --git a/packages/jest-matcher-utils/package.json b/packages/jest-matcher-utils/package.json index 9a97c06662f0..361db470f8f4 100644 --- a/packages/jest-matcher-utils/package.json +++ b/packages/jest-matcher-utils/package.json @@ -1,7 +1,7 @@ { "name": "jest-matcher-utils", "description": "A set of utility functions for expect and related packages", - "version": "25.5.0", + "version": "26.0.0-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -15,12 +15,12 @@ "types": "build/index.d.ts", "dependencies": { "chalk": "^4.0.0", - "jest-diff": "^25.5.0", - "jest-get-type": "^25.2.6", - "pretty-format": "^25.5.0" + "jest-diff": "^26.0.0-alpha.0", + "jest-get-type": "^26.0.0-alpha.0", + "pretty-format": "^26.0.0-alpha.0" }, "devDependencies": { - "@jest/test-utils": "^25.5.0", + "@jest/test-utils": "^26.0.0-alpha.0", "@types/node": "*" }, "publishConfig": { diff --git a/packages/jest-message-util/package.json b/packages/jest-message-util/package.json index 5347f48f5425..2b95361ad09f 100644 --- a/packages/jest-message-util/package.json +++ b/packages/jest-message-util/package.json @@ -1,6 +1,6 @@ { "name": "jest-message-util", - "version": "25.5.0", + "version": "26.0.0-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -14,7 +14,7 @@ "types": "build/index.d.ts", "dependencies": { "@babel/code-frame": "^7.0.0", - "@jest/types": "^25.5.0", + "@jest/types": "^26.0.0-alpha.0", "@types/stack-utils": "^1.0.1", "chalk": "^4.0.0", "graceful-fs": "^4.2.4", diff --git a/packages/jest-mock/package.json b/packages/jest-mock/package.json index 764e818fa302..6a725554a805 100644 --- a/packages/jest-mock/package.json +++ b/packages/jest-mock/package.json @@ -1,6 +1,6 @@ { "name": "jest-mock", - "version": "25.5.0", + "version": "26.0.0-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,7 +10,7 @@ "node": ">= 10.14.2" }, "dependencies": { - "@jest/types": "^25.5.0" + "@jest/types": "^26.0.0-alpha.0" }, "devDependencies": { "@types/node": "*" diff --git a/packages/jest-phabricator/package.json b/packages/jest-phabricator/package.json index 0bce0aa572ca..f3bc9d88f5b9 100644 --- a/packages/jest-phabricator/package.json +++ b/packages/jest-phabricator/package.json @@ -1,6 +1,6 @@ { "name": "jest-phabricator", - "version": "25.5.0", + "version": "26.0.0-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -8,7 +8,7 @@ }, "types": "build/index.d.ts", "dependencies": { - "@jest/test-result": "^25.5.0" + "@jest/test-result": "^26.0.0-alpha.0" }, "engines": { "node": ">= 10.14.2" diff --git a/packages/jest-regex-util/package.json b/packages/jest-regex-util/package.json index e8bc03e28a93..15bd6aa55a59 100644 --- a/packages/jest-regex-util/package.json +++ b/packages/jest-regex-util/package.json @@ -1,6 +1,6 @@ { "name": "jest-regex-util", - "version": "25.2.6", + "version": "26.0.0-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", diff --git a/packages/jest-repl/package.json b/packages/jest-repl/package.json index de7b8199f5d4..792d7dbb8e69 100644 --- a/packages/jest-repl/package.json +++ b/packages/jest-repl/package.json @@ -1,6 +1,6 @@ { "name": "jest-repl", - "version": "25.5.4", + "version": "26.0.0-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,16 +10,16 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/transform": "^25.5.1", - "@jest/types": "^25.5.0", - "jest-config": "^25.5.4", - "jest-runtime": "^25.5.4", - "jest-validate": "^25.5.0", + "@jest/transform": "^26.0.0-alpha.0", + "@jest/types": "^26.0.0-alpha.0", + "jest-config": "^26.0.0-alpha.0", + "jest-runtime": "^26.0.0-alpha.0", + "jest-validate": "^26.0.0-alpha.0", "repl": "^0.1.3", "yargs": "^15.3.1" }, "devDependencies": { - "@jest/test-utils": "^25.5.0", + "@jest/test-utils": "^26.0.0-alpha.0", "@types/yargs": "^15.0.0" }, "bin": "./bin/jest-repl.js", diff --git a/packages/jest-reporters/package.json b/packages/jest-reporters/package.json index 27223625b0df..584ed3291e61 100644 --- a/packages/jest-reporters/package.json +++ b/packages/jest-reporters/package.json @@ -1,15 +1,15 @@ { "name": "@jest/reporters", "description": "Jest's reporters", - "version": "25.5.1", + "version": "26.0.0-alpha.0", "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^25.5.0", - "@jest/test-result": "^25.5.0", - "@jest/transform": "^25.5.1", - "@jest/types": "^25.5.0", + "@jest/console": "^26.0.0-alpha.0", + "@jest/test-result": "^26.0.0-alpha.0", + "@jest/transform": "^26.0.0-alpha.0", + "@jest/types": "^26.0.0-alpha.0", "chalk": "^4.0.0", "collect-v8-coverage": "^1.0.0", "exit": "^0.1.2", @@ -20,10 +20,10 @@ "istanbul-lib-report": "^3.0.0", "istanbul-lib-source-maps": "^4.0.0", "istanbul-reports": "^3.0.2", - "jest-haste-map": "^25.5.1", - "jest-resolve": "^25.5.1", - "jest-util": "^25.5.0", - "jest-worker": "^25.5.0", + "jest-haste-map": "^26.0.0-alpha.0", + "jest-resolve": "^26.0.0-alpha.0", + "jest-util": "^26.0.0-alpha.0", + "jest-worker": "^26.0.0-alpha.0", "slash": "^3.0.0", "source-map": "^0.6.0", "string-length": "^3.1.0", diff --git a/packages/jest-resolve-dependencies/package.json b/packages/jest-resolve-dependencies/package.json index a91aa60aa4bc..2f7a9d112b95 100644 --- a/packages/jest-resolve-dependencies/package.json +++ b/packages/jest-resolve-dependencies/package.json @@ -1,6 +1,6 @@ { "name": "jest-resolve-dependencies", - "version": "25.5.4", + "version": "26.0.0-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,14 +10,14 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/types": "^25.5.0", - "jest-regex-util": "^25.2.6", - "jest-snapshot": "^25.5.1" + "@jest/types": "^26.0.0-alpha.0", + "jest-regex-util": "^26.0.0-alpha.0", + "jest-snapshot": "^26.0.0-alpha.0" }, "devDependencies": { - "jest-haste-map": "^25.5.1", - "jest-resolve": "^25.5.1", - "jest-runtime": "^25.5.4" + "jest-haste-map": "^26.0.0-alpha.0", + "jest-resolve": "^26.0.0-alpha.0", + "jest-runtime": "^26.0.0-alpha.0" }, "engines": { "node": ">= 10.14.2" diff --git a/packages/jest-resolve/package.json b/packages/jest-resolve/package.json index b3560e65268a..f563a3946c0a 100644 --- a/packages/jest-resolve/package.json +++ b/packages/jest-resolve/package.json @@ -1,6 +1,6 @@ { "name": "jest-resolve", - "version": "25.5.1", + "version": "26.0.0-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,7 +10,7 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/types": "^25.5.0", + "@jest/types": "^26.0.0-alpha.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.4", "jest-pnp-resolver": "^1.2.1", @@ -22,7 +22,7 @@ "devDependencies": { "@types/graceful-fs": "^4.1.3", "@types/resolve": "^1.14.0", - "jest-haste-map": "^25.5.1" + "jest-haste-map": "^26.0.0-alpha.0" }, "engines": { "node": ">= 10.14.2" diff --git a/packages/jest-runner/package.json b/packages/jest-runner/package.json index 4397080248db..84cc374bc253 100644 --- a/packages/jest-runner/package.json +++ b/packages/jest-runner/package.json @@ -1,6 +1,6 @@ { "name": "jest-runner", - "version": "25.5.4", + "version": "26.0.0-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,23 +10,23 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/console": "^25.5.0", - "@jest/environment": "^25.5.0", - "@jest/test-result": "^25.5.0", - "@jest/types": "^25.5.0", + "@jest/console": "^26.0.0-alpha.0", + "@jest/environment": "^26.0.0-alpha.0", + "@jest/test-result": "^26.0.0-alpha.0", + "@jest/types": "^26.0.0-alpha.0", "chalk": "^4.0.0", "exit": "^0.1.2", "graceful-fs": "^4.2.4", - "jest-config": "^25.5.4", - "jest-docblock": "^25.3.0", - "jest-haste-map": "^25.5.1", - "jest-jasmine2": "^25.5.4", - "jest-leak-detector": "^25.5.0", - "jest-message-util": "^25.5.0", - "jest-resolve": "^25.5.1", - "jest-runtime": "^25.5.4", - "jest-util": "^25.5.0", - "jest-worker": "^25.5.0", + "jest-config": "^26.0.0-alpha.0", + "jest-docblock": "^26.0.0-alpha.0", + "jest-haste-map": "^26.0.0-alpha.0", + "jest-jasmine2": "^26.0.0-alpha.0", + "jest-leak-detector": "^26.0.0-alpha.0", + "jest-message-util": "^26.0.0-alpha.0", + "jest-resolve": "^26.0.0-alpha.0", + "jest-runtime": "^26.0.0-alpha.0", + "jest-util": "^26.0.0-alpha.0", + "jest-worker": "^26.0.0-alpha.0", "source-map-support": "^0.5.6", "throat": "^5.0.0" }, @@ -35,7 +35,7 @@ "@types/graceful-fs": "^4.1.2", "@types/node": "*", "@types/source-map-support": "^0.5.0", - "jest-circus": "^25.5.4" + "jest-circus": "^26.0.0-alpha.0" }, "engines": { "node": ">= 10.14.2" diff --git a/packages/jest-runtime/package.json b/packages/jest-runtime/package.json index ad58bb078d09..15664857cc1b 100644 --- a/packages/jest-runtime/package.json +++ b/packages/jest-runtime/package.json @@ -1,6 +1,6 @@ { "name": "jest-runtime", - "version": "25.5.4", + "version": "26.0.0-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,40 +10,40 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/console": "^25.5.0", - "@jest/environment": "^25.5.0", - "@jest/globals": "^25.5.2", - "@jest/source-map": "^25.5.0", - "@jest/test-result": "^25.5.0", - "@jest/transform": "^25.5.1", - "@jest/types": "^25.5.0", + "@jest/console": "^26.0.0-alpha.0", + "@jest/environment": "^26.0.0-alpha.0", + "@jest/globals": "^26.0.0-alpha.0", + "@jest/source-map": "^26.0.0-alpha.0", + "@jest/test-result": "^26.0.0-alpha.0", + "@jest/transform": "^26.0.0-alpha.0", + "@jest/types": "^26.0.0-alpha.0", "@types/yargs": "^15.0.0", "chalk": "^4.0.0", "collect-v8-coverage": "^1.0.0", "exit": "^0.1.2", "glob": "^7.1.3", "graceful-fs": "^4.2.4", - "jest-config": "^25.5.4", - "jest-haste-map": "^25.5.1", - "jest-message-util": "^25.5.0", - "jest-mock": "^25.5.0", - "jest-regex-util": "^25.2.6", - "jest-resolve": "^25.5.1", - "jest-snapshot": "^25.5.1", - "jest-util": "^25.5.0", - "jest-validate": "^25.5.0", + "jest-config": "^26.0.0-alpha.0", + "jest-haste-map": "^26.0.0-alpha.0", + "jest-message-util": "^26.0.0-alpha.0", + "jest-mock": "^26.0.0-alpha.0", + "jest-regex-util": "^26.0.0-alpha.0", + "jest-resolve": "^26.0.0-alpha.0", + "jest-snapshot": "^26.0.0-alpha.0", + "jest-util": "^26.0.0-alpha.0", + "jest-validate": "^26.0.0-alpha.0", "realpath-native": "^2.0.0", "slash": "^3.0.0", "strip-bom": "^4.0.0", "yargs": "^15.3.1" }, "devDependencies": { - "@jest/test-utils": "^25.5.0", + "@jest/test-utils": "^26.0.0-alpha.0", "@types/exit": "^0.1.30", "@types/glob": "^7.1.1", "@types/graceful-fs": "^4.1.2", "execa": "^3.2.0", - "jest-environment-node": "^25.5.0", + "jest-environment-node": "^26.0.0-alpha.0", "jest-snapshot-serializer-raw": "^1.1.0" }, "bin": "./bin/jest-runtime.js", diff --git a/packages/jest-serializer/package.json b/packages/jest-serializer/package.json index e530df25fcc5..335ba8ffa151 100644 --- a/packages/jest-serializer/package.json +++ b/packages/jest-serializer/package.json @@ -1,6 +1,6 @@ { "name": "jest-serializer", - "version": "25.5.0", + "version": "26.0.0-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", diff --git a/packages/jest-snapshot/package.json b/packages/jest-snapshot/package.json index cd023c616d16..34b97a2c2bbb 100644 --- a/packages/jest-snapshot/package.json +++ b/packages/jest-snapshot/package.json @@ -1,6 +1,6 @@ { "name": "jest-snapshot", - "version": "25.5.1", + "version": "26.0.0-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -11,19 +11,19 @@ "types": "build/index.d.ts", "dependencies": { "@babel/types": "^7.0.0", - "@jest/types": "^25.5.0", + "@jest/types": "^26.0.0-alpha.0", "@types/prettier": "^1.19.0", "chalk": "^4.0.0", - "expect": "^25.5.0", + "expect": "^26.0.0-alpha.0", "graceful-fs": "^4.2.4", - "jest-diff": "^25.5.0", - "jest-get-type": "^25.2.6", - "jest-matcher-utils": "^25.5.0", - "jest-message-util": "^25.5.0", - "jest-resolve": "^25.5.1", + "jest-diff": "^26.0.0-alpha.0", + "jest-get-type": "^26.0.0-alpha.0", + "jest-matcher-utils": "^26.0.0-alpha.0", + "jest-message-util": "^26.0.0-alpha.0", + "jest-resolve": "^26.0.0-alpha.0", "make-dir": "^3.0.0", "natural-compare": "^1.4.0", - "pretty-format": "^25.5.0", + "pretty-format": "^26.0.0-alpha.0", "semver": "^6.3.0" }, "devDependencies": { @@ -33,7 +33,7 @@ "@types/semver": "^6.0.1", "ansi-regex": "^5.0.0", "ansi-styles": "^4.2.0", - "jest-haste-map": "^25.5.1", + "jest-haste-map": "^26.0.0-alpha.0", "prettier": "^1.13.4" }, "engines": { diff --git a/packages/jest-source-map/package.json b/packages/jest-source-map/package.json index d59ebb2efc3b..87216beeb381 100644 --- a/packages/jest-source-map/package.json +++ b/packages/jest-source-map/package.json @@ -1,6 +1,6 @@ { "name": "@jest/source-map", - "version": "25.5.0", + "version": "26.0.0-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", diff --git a/packages/jest-test-result/package.json b/packages/jest-test-result/package.json index 8c3f3c9999e7..2b9e9b71423d 100644 --- a/packages/jest-test-result/package.json +++ b/packages/jest-test-result/package.json @@ -1,6 +1,6 @@ { "name": "@jest/test-result", - "version": "25.5.0", + "version": "26.0.0-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,8 +10,8 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/console": "^25.5.0", - "@jest/types": "^25.5.0", + "@jest/console": "^26.0.0-alpha.0", + "@jest/types": "^26.0.0-alpha.0", "@types/istanbul-lib-coverage": "^2.0.0", "collect-v8-coverage": "^1.0.0" }, diff --git a/packages/jest-test-sequencer/package.json b/packages/jest-test-sequencer/package.json index 66b19f1131a0..99d8a1fe5ea2 100644 --- a/packages/jest-test-sequencer/package.json +++ b/packages/jest-test-sequencer/package.json @@ -1,6 +1,6 @@ { "name": "@jest/test-sequencer", - "version": "25.5.4", + "version": "26.0.0-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,11 +10,11 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/test-result": "^25.5.0", + "@jest/test-result": "^26.0.0-alpha.0", "graceful-fs": "^4.2.4", - "jest-haste-map": "^25.5.1", - "jest-runner": "^25.5.4", - "jest-runtime": "^25.5.4" + "jest-haste-map": "^26.0.0-alpha.0", + "jest-runner": "^26.0.0-alpha.0", + "jest-runtime": "^26.0.0-alpha.0" }, "devDependencies": { "@types/graceful-fs": "^4.1.3" diff --git a/packages/jest-transform/package.json b/packages/jest-transform/package.json index 34eaf2bd5b9c..3265e7083aa3 100644 --- a/packages/jest-transform/package.json +++ b/packages/jest-transform/package.json @@ -1,6 +1,6 @@ { "name": "@jest/transform", - "version": "25.5.1", + "version": "26.0.0-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -11,15 +11,15 @@ "types": "build/index.d.ts", "dependencies": { "@babel/core": "^7.1.0", - "@jest/types": "^25.5.0", + "@jest/types": "^26.0.0-alpha.0", "babel-plugin-istanbul": "^6.0.0", "chalk": "^4.0.0", "convert-source-map": "^1.4.0", "fast-json-stable-stringify": "^2.0.0", "graceful-fs": "^4.2.4", - "jest-haste-map": "^25.5.1", - "jest-regex-util": "^25.2.6", - "jest-util": "^25.5.0", + "jest-haste-map": "^26.0.0-alpha.0", + "jest-regex-util": "^26.0.0-alpha.0", + "jest-util": "^26.0.0-alpha.0", "micromatch": "^4.0.2", "pirates": "^4.0.1", "realpath-native": "^2.0.0", diff --git a/packages/jest-types/package.json b/packages/jest-types/package.json index 2f4739c02855..b7ad47fed30f 100644 --- a/packages/jest-types/package.json +++ b/packages/jest-types/package.json @@ -1,6 +1,6 @@ { "name": "@jest/types", - "version": "25.5.0", + "version": "26.0.0-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", diff --git a/packages/jest-util/package.json b/packages/jest-util/package.json index 005517f0216f..d79db348a944 100644 --- a/packages/jest-util/package.json +++ b/packages/jest-util/package.json @@ -1,6 +1,6 @@ { "name": "jest-util", - "version": "25.5.0", + "version": "26.0.0-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,7 +10,7 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/types": "^25.5.0", + "@jest/types": "^26.0.0-alpha.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.4", "is-ci": "^2.0.0", diff --git a/packages/jest-validate/package.json b/packages/jest-validate/package.json index eeade977e96e..986a4a0e8bc1 100644 --- a/packages/jest-validate/package.json +++ b/packages/jest-validate/package.json @@ -1,6 +1,6 @@ { "name": "jest-validate", - "version": "25.5.0", + "version": "26.0.0-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,12 +10,12 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/types": "^25.5.0", + "@jest/types": "^26.0.0-alpha.0", "camelcase": "^5.3.1", "chalk": "^4.0.0", - "jest-get-type": "^25.2.6", + "jest-get-type": "^26.0.0-alpha.0", "leven": "^3.1.0", - "pretty-format": "^25.5.0" + "pretty-format": "^26.0.0-alpha.0" }, "devDependencies": { "@types/yargs": "^15.0.3" diff --git a/packages/jest-watcher/package.json b/packages/jest-watcher/package.json index 14b321d64a89..7fc18cc779f3 100644 --- a/packages/jest-watcher/package.json +++ b/packages/jest-watcher/package.json @@ -1,15 +1,15 @@ { "name": "jest-watcher", "description": "Delightful JavaScript Testing.", - "version": "25.5.0", + "version": "26.0.0-alpha.0", "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/test-result": "^25.5.0", - "@jest/types": "^25.5.0", + "@jest/test-result": "^26.0.0-alpha.0", + "@jest/types": "^26.0.0-alpha.0", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", - "jest-util": "^25.5.0", + "jest-util": "^26.0.0-alpha.0", "string-length": "^3.1.0" }, "devDependencies": { diff --git a/packages/jest-worker/package.json b/packages/jest-worker/package.json index 03b5ce075404..1edf8ade1ceb 100644 --- a/packages/jest-worker/package.json +++ b/packages/jest-worker/package.json @@ -1,6 +1,6 @@ { "name": "jest-worker", - "version": "25.5.0", + "version": "26.0.0-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", diff --git a/packages/jest/package.json b/packages/jest/package.json index c82c4e8e8d39..de3d3a735646 100644 --- a/packages/jest/package.json +++ b/packages/jest/package.json @@ -1,13 +1,13 @@ { "name": "jest", "description": "Delightful JavaScript Testing.", - "version": "25.5.4", + "version": "26.0.0-alpha.0", "main": "build/jest.js", "types": "build/jest.d.ts", "dependencies": { - "@jest/core": "^25.5.4", + "@jest/core": "^26.0.0-alpha.0", "import-local": "^3.0.2", - "jest-cli": "^25.5.4" + "jest-cli": "^26.0.0-alpha.0" }, "bin": "./bin/jest.js", "engines": { diff --git a/packages/pretty-format/package.json b/packages/pretty-format/package.json index abb2f74337f5..d80431ea6cdd 100644 --- a/packages/pretty-format/package.json +++ b/packages/pretty-format/package.json @@ -1,6 +1,6 @@ { "name": "pretty-format", - "version": "25.5.0", + "version": "26.0.0-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -12,7 +12,7 @@ "types": "build/index.d.ts", "author": "James Kyle ", "dependencies": { - "@jest/types": "^25.5.0", + "@jest/types": "^26.0.0-alpha.0", "ansi-regex": "^5.0.0", "ansi-styles": "^4.0.0", "react-is": "^16.12.0" diff --git a/packages/test-utils/package.json b/packages/test-utils/package.json index 1284358d04e2..fd0f346f30fd 100644 --- a/packages/test-utils/package.json +++ b/packages/test-utils/package.json @@ -1,6 +1,6 @@ { "name": "@jest/test-utils", - "version": "25.5.0", + "version": "26.0.0-alpha.0", "private": true, "license": "MIT", "main": "build/index.js", From 71a048e04afd057d7e16f9eb2c3bb579501e1abf Mon Sep 17 00:00:00 2001 From: Varun Varada Date: Sat, 2 May 2020 07:21:37 -0500 Subject: [PATCH 047/106] Fix time duration formatting as per SI (#9765) --- CHANGELOG.md | 1 + CONTRIBUTING.md | 2 +- e2e/Utils.ts | 4 +- e2e/__tests__/overrideGlobals.test.ts | 2 +- packages/jest-circus/src/utils.ts | 4 +- packages/jest-console/src/BufferedConsole.ts | 4 +- packages/jest-console/src/CustomConsole.ts | 4 +- .../src/__tests__/queueRunner.test.ts | 2 +- packages/jest-jasmine2/src/queueRunner.ts | 5 +- .../summary_reporter.test.js.snap | 8 +-- .../jest-reporters/src/get_result_header.ts | 3 +- packages/jest-reporters/src/utils.ts | 8 +-- .../jest-reporters/src/verbose_reporter.ts | 6 ++- .../src/__tests__/formatTime.test.ts | 52 +++++++++++++++++++ packages/jest-util/src/formatTime.ts | 22 ++++++++ packages/jest-util/src/index.ts | 1 + packages/pretty-format/package.json | 1 + packages/pretty-format/perf/test.js | 7 +-- 18 files changed, 109 insertions(+), 27 deletions(-) create mode 100644 packages/jest-util/src/__tests__/formatTime.test.ts create mode 100644 packages/jest-util/src/formatTime.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index e6422a6724cf..76bf69d13223 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -89,6 +89,7 @@ ### Fixes +- `[jest-circus, jest-console, jest-jasmine2, jest-reporters, jest-util, pretty-format]` Fix time durating formatting and consolidate time formatting code ([#9765](https://github.com/facebook/jest/pull/9765)) - `[expect]` Restore support for passing functions to `toHaveLength` matcher ([#9796](https://github.com/facebook/jest/pull/9796)) - `[jest-changed-files]` `--only-changed` should include staged files ([#9799](https://github.com/facebook/jest/pull/9799)) - `[jest-circus]` Throw on nested test definitions ([#9828](https://github.com/facebook/jest/pull/9828)) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2db2441d35b4..a8a81a5899de 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -117,7 +117,7 @@ PASS __tests__/clear_cache.test.js Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 0 total -Time: 0.232s, estimated 1s +Time: 0.232 s, estimated 1 s Ran all test suites. ``` diff --git a/e2e/Utils.ts b/e2e/Utils.ts index e4a93c0c07c0..ef725bd99eb6 100644 --- a/e2e/Utils.ts +++ b/e2e/Utils.ts @@ -142,7 +142,7 @@ export const copyDir = (src: string, dest: string) => { export const replaceTime = (str: string) => str - .replace(/\d*\.?\d+m?s/g, '<>') + .replace(/\d*\.?\d+ m?s\b/g, '<>') .replace(/, estimated <>/g, ''); // Since Jest does not guarantee the order of tests we'll sort the output. @@ -194,7 +194,7 @@ export const extractSummary = (stdout: string) => { const rest = stdout .replace(match[0], '') // remove all timestamps - .replace(/\s*\(\d*\.?\d+m?s\)$/gm, ''); + .replace(/\s*\(\d*\.?\d+ m?s\b\)$/gm, ''); return { rest: rest.trim(), diff --git a/e2e/__tests__/overrideGlobals.test.ts b/e2e/__tests__/overrideGlobals.test.ts index 56dca22dd05d..20437f29e342 100644 --- a/e2e/__tests__/overrideGlobals.test.ts +++ b/e2e/__tests__/overrideGlobals.test.ts @@ -13,7 +13,7 @@ test('overriding native promise does not freeze Jest', () => { }); test('has a duration even if time is faked', () => { - const regex = /works well \((\d+)ms\)/; + const regex = /works well \((\d+) ms\)/; const {stderr} = runJest('override-globals', ['--verbose']); expect(stderr).toMatch(regex); diff --git a/packages/jest-circus/src/utils.ts b/packages/jest-circus/src/utils.ts index fdec52805fc2..29f7862a8c58 100644 --- a/packages/jest-circus/src/utils.ts +++ b/packages/jest-circus/src/utils.ts @@ -6,7 +6,7 @@ */ import type {Circus} from '@jest/types'; -import {convertDescriptorToString} from 'jest-util'; +import {convertDescriptorToString, formatTime} from 'jest-util'; import isGeneratorFn from 'is-generator-fn'; import co from 'co'; import dedent = require('dedent'); @@ -139,7 +139,7 @@ export const describeBlockHasTests = ( describe.tests.length > 0 || describe.children.some(describeBlockHasTests); const _makeTimeoutMessage = (timeout: number, isHook: boolean) => - `Exceeded timeout of ${timeout}ms for a ${ + `Exceeded timeout of ${formatTime(timeout)} for a ${ isHook ? 'hook' : 'test' }.\nUse jest.setTimeout(newTimeout) to increase the timeout value, if this is a long-running test.`; diff --git a/packages/jest-console/src/BufferedConsole.ts b/packages/jest-console/src/BufferedConsole.ts index 2bf53f350f72..6cf73e4d01a9 100644 --- a/packages/jest-console/src/BufferedConsole.ts +++ b/packages/jest-console/src/BufferedConsole.ts @@ -9,7 +9,7 @@ import assert = require('assert'); import {Console} from 'console'; import {format} from 'util'; import chalk = require('chalk'); -import {ErrorWithStack} from 'jest-util'; +import {ErrorWithStack, formatTime} from 'jest-util'; import type { ConsoleBuffer, LogCounters, @@ -154,7 +154,7 @@ export default class BufferedConsole extends Console { if (startTime) { const endTime = new Date(); const time = endTime.getTime() - startTime.getTime(); - this._log('time', format(`${label}: ${time}ms`)); + this._log('time', format(`${label}: ${formatTime(time)}`)); delete this._timers[label]; } } diff --git a/packages/jest-console/src/CustomConsole.ts b/packages/jest-console/src/CustomConsole.ts index 59a7e8441d7a..eecaa706720a 100644 --- a/packages/jest-console/src/CustomConsole.ts +++ b/packages/jest-console/src/CustomConsole.ts @@ -9,7 +9,7 @@ import assert = require('assert'); import {format} from 'util'; import {Console} from 'console'; import chalk = require('chalk'); -import {clearLine} from 'jest-util'; +import {clearLine, formatTime} from 'jest-util'; import type {LogCounters, LogMessage, LogTimers, LogType} from './types'; type Formatter = (type: LogType, message: LogMessage) => string; @@ -131,7 +131,7 @@ export default class CustomConsole extends Console { if (startTime) { const endTime = new Date().getTime(); const time = endTime - startTime.getTime(); - this._log('time', format(`${label}: ${time}ms`)); + this._log('time', format(`${label}: ${formatTime(time)}`)); delete this._timers[label]; } } diff --git a/packages/jest-jasmine2/src/__tests__/queueRunner.test.ts b/packages/jest-jasmine2/src/__tests__/queueRunner.test.ts index d98fe7fcfe3d..325c41042e0e 100644 --- a/packages/jest-jasmine2/src/__tests__/queueRunner.test.ts +++ b/packages/jest-jasmine2/src/__tests__/queueRunner.test.ts @@ -113,7 +113,7 @@ describe('queueRunner', () => { expect(onException).toHaveBeenCalled(); // i.e. the `message` of the error passed to `onException`. expect(onException.mock.calls[0][0].message).toEqual( - 'Timeout - Async callback was not invoked within the 0ms timeout ' + + 'Timeout - Async callback was not invoked within the 0 ms timeout ' + 'specified by jest.setTimeout.', ); expect(fnTwo).toHaveBeenCalled(); diff --git a/packages/jest-jasmine2/src/queueRunner.ts b/packages/jest-jasmine2/src/queueRunner.ts index c20c6d601cbb..c57130a201cb 100644 --- a/packages/jest-jasmine2/src/queueRunner.ts +++ b/packages/jest-jasmine2/src/queueRunner.ts @@ -5,6 +5,7 @@ * LICENSE file in the root directory of this source tree. */ +import {formatTime} from 'jest-util'; // @ts-ignore ignore vendor file import PCancelable from './PCancelable'; import pTimeout from './pTimeout'; @@ -71,8 +72,8 @@ export default function queueRunner(options: Options) { () => { initError.message = 'Timeout - Async callback was not invoked within the ' + - timeoutMs + - 'ms timeout specified by jest.setTimeout.'; + formatTime(timeoutMs) + + ' timeout specified by jest.setTimeout.'; initError.stack = initError.message + initError.stack; options.onException(initError); }, diff --git a/packages/jest-reporters/src/__tests__/__snapshots__/summary_reporter.test.js.snap b/packages/jest-reporters/src/__tests__/__snapshots__/summary_reporter.test.js.snap index 81cc12f595a4..93092c94bb4c 100644 --- a/packages/jest-reporters/src/__tests__/__snapshots__/summary_reporter.test.js.snap +++ b/packages/jest-reporters/src/__tests__/__snapshots__/summary_reporter.test.js.snap @@ -13,7 +13,7 @@ exports[`snapshots all have results (after update) 1`] = ` Test Suites: 1 failed, 1 total Tests: 1 failed, 1 total Snapshots: 1 failed, 1 removed, 1 file removed, 1 updated, 1 written, 2 passed, 2 total -Time: 0.01s +Time: 0.01 s Ran all test suites. " `; @@ -31,7 +31,7 @@ exports[`snapshots all have results (no update) 1`] = ` Test Suites: 1 failed, 1 total Tests: 1 failed, 1 total Snapshots: 1 failed, 1 obsolete, 1 file obsolete, 1 updated, 1 written, 2 passed, 2 total -Time: 0.01s +Time: 0.01 s Ran all test suites. " `; @@ -43,7 +43,7 @@ exports[`snapshots needs update with npm test 1`] = ` Test Suites: 1 failed, 1 total Tests: 1 failed, 1 total Snapshots: 2 failed, 2 total -Time: 0.01s +Time: 0.01 s Ran all test suites. " `; @@ -55,7 +55,7 @@ exports[`snapshots needs update with yarn test 1`] = ` Test Suites: 1 failed, 1 total Tests: 1 failed, 1 total Snapshots: 2 failed, 2 total -Time: 0.01s +Time: 0.01 s Ran all test suites. " `; diff --git a/packages/jest-reporters/src/get_result_header.ts b/packages/jest-reporters/src/get_result_header.ts index ff2c951cf039..2b9dd7b25403 100644 --- a/packages/jest-reporters/src/get_result_header.ts +++ b/packages/jest-reporters/src/get_result_header.ts @@ -8,6 +8,7 @@ import type {Config} from '@jest/types'; import type {TestResult} from '@jest/test-result'; import chalk = require('chalk'); +import {formatTime} from 'jest-util'; import {formatTestPath, printDisplayName} from './utils'; import terminalLink = require('terminal-link'); @@ -47,7 +48,7 @@ export default ( const testDetail = []; if (runTime !== null && runTime > 5) { - testDetail.push(LONG_TEST_COLOR(runTime + 's')); + testDetail.push(LONG_TEST_COLOR(formatTime(runTime, 0))); } if (result.memoryUsage) { diff --git a/packages/jest-reporters/src/utils.ts b/packages/jest-reporters/src/utils.ts index fbb85e1166d7..fdeb1814e3fc 100644 --- a/packages/jest-reporters/src/utils.ts +++ b/packages/jest-reporters/src/utils.ts @@ -10,7 +10,7 @@ import type {Config} from '@jest/types'; import type {AggregatedResult} from '@jest/test-result'; import chalk = require('chalk'); import slash = require('slash'); -import {pluralize} from 'jest-util'; +import {formatTime, pluralize} from 'jest-util'; import type {SummaryOptions} from './types'; const PROGRESS_BAR_WIDTH = 40; @@ -185,11 +185,11 @@ const renderTime = (runTime: number, estimatedTime: number, width: number) => { // If we are more than one second over the estimated time, highlight it. const renderedTime = estimatedTime && runTime >= estimatedTime + 1 - ? chalk.bold.yellow(runTime + 's') - : runTime + 's'; + ? chalk.bold.yellow(formatTime(runTime, 0)) + : formatTime(runTime, 0); let time = chalk.bold(`Time:`) + ` ${renderedTime}`; if (runTime < estimatedTime) { - time += `, estimated ${estimatedTime}s`; + time += `, estimated ${formatTime(estimatedTime, 0)}`; } // Only show a progress bar if the test run is actually going to take diff --git a/packages/jest-reporters/src/verbose_reporter.ts b/packages/jest-reporters/src/verbose_reporter.ts index 98f0877d449a..61620532170a 100644 --- a/packages/jest-reporters/src/verbose_reporter.ts +++ b/packages/jest-reporters/src/verbose_reporter.ts @@ -13,7 +13,7 @@ import type { TestResult, } from '@jest/test-result'; import chalk = require('chalk'); -import {specialChars} from 'jest-util'; +import {formatTime, specialChars} from 'jest-util'; import type {Test} from './types'; import DefaultReporter from './default_reporter'; @@ -107,7 +107,9 @@ export default class VerboseReporter extends DefaultReporter { private _logTest(test: AssertionResult, indentLevel: number) { const status = this._getIcon(test.status); - const time = test.duration ? ` (${test.duration.toFixed(0)}ms)` : ''; + const time = test.duration + ? ` (${formatTime(Math.round(test.duration))})` + : ''; this._logLine(status + ' ' + chalk.dim(test.title + time), indentLevel); } diff --git a/packages/jest-util/src/__tests__/formatTime.test.ts b/packages/jest-util/src/__tests__/formatTime.test.ts new file mode 100644 index 000000000000..a4506d11b21f --- /dev/null +++ b/packages/jest-util/src/__tests__/formatTime.test.ts @@ -0,0 +1,52 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +import formatTime from '../formatTime'; + +it('defaults to milliseconds', () => { + expect(formatTime(42)).toBe('42 ms'); +}); + +it('formats seconds properly', () => { + expect(formatTime(42, 0)).toBe('42 s'); +}); + +it('formats milliseconds properly', () => { + expect(formatTime(42, -3)).toBe('42 ms'); +}); + +it('formats microseconds properly', () => { + expect(formatTime(42, -6)).toBe('42 μs'); +}); + +it('formats nanoseconds properly', () => { + expect(formatTime(42, -9)).toBe('42 ns'); +}); + +it('interprets lower than lowest powers as nanoseconds', () => { + expect(formatTime(42, -12)).toBe('42 ns'); +}); + +it('interprets higher than highest powers as seconds', () => { + expect(formatTime(42, 3)).toBe('42 s'); +}); + +it('interprets non-multiple-of-3 powers as next higher prefix', () => { + expect(formatTime(42, -4)).toBe('42 ms'); +}); + +it('formats the quantity properly when pad length is lower', () => { + expect(formatTime(42, -3, 1)).toBe('42 ms'); +}); + +it('formats the quantity properly when pad length is equal', () => { + expect(formatTime(42, -3, 2)).toBe('42 ms'); +}); + +it('left pads the quantity properly when pad length is higher', () => { + expect(formatTime(42, -3, 5)).toBe(' 42 ms'); +}); diff --git a/packages/jest-util/src/formatTime.ts b/packages/jest-util/src/formatTime.ts new file mode 100644 index 000000000000..e29214d7838b --- /dev/null +++ b/packages/jest-util/src/formatTime.ts @@ -0,0 +1,22 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +export default function formatTime( + time: number, + prefixPower: number = -3, + padLeftLength: number = 0, +): string { + const prefixes = ['n', 'μ', 'm', '']; + const prefixIndex = Math.max( + 0, + Math.min( + Math.trunc(prefixPower / 3) + prefixes.length - 1, + prefixes.length - 1, + ), + ); + return `${String(time).padStart(padLeftLength)} ${prefixes[prefixIndex]}s`; +} diff --git a/packages/jest-util/src/index.ts b/packages/jest-util/src/index.ts index e7b81c46931c..e8318c550bbf 100644 --- a/packages/jest-util/src/index.ts +++ b/packages/jest-util/src/index.ts @@ -20,5 +20,6 @@ export {default as replacePathSepForGlob} from './replacePathSepForGlob'; export {default as testPathPatternToRegExp} from './testPathPatternToRegExp'; import * as preRunMessage from './preRunMessage'; export {default as pluralize} from './pluralize'; +export {default as formatTime} from './formatTime'; export {preRunMessage, specialChars}; diff --git a/packages/pretty-format/package.json b/packages/pretty-format/package.json index d80431ea6cdd..9ce32eb0cc0d 100644 --- a/packages/pretty-format/package.json +++ b/packages/pretty-format/package.json @@ -22,6 +22,7 @@ "@types/react-is": "^16.7.1", "@types/react-test-renderer": "*", "immutable": "4.0.0-rc.9", + "jest-util": "^25.2.6", "react": "*", "react-dom": "*", "react-test-renderer": "*" diff --git a/packages/pretty-format/perf/test.js b/packages/pretty-format/perf/test.js index e155834f704c..9159d76f3e5f 100644 --- a/packages/pretty-format/perf/test.js +++ b/packages/pretty-format/perf/test.js @@ -8,6 +8,7 @@ const util = require('util'); const chalk = require('chalk'); const React = require('react'); +const {formatTime} = require('jest-util'); const ReactTestRenderer = require('react-test-renderer'); const prettyFormat = require('../build'); const ReactTestComponent = require('../build/plugins/ReactTestComponent'); @@ -78,13 +79,13 @@ function test(name, value, ignoreResult, prettyFormatOpts) { let message = current.name; if (current.time) { - message += ' - ' + String(current.time).padStart(6) + 'ns'; + message += ' - ' + formatTime(current.time, -9, 6); } if (current.total) { message += ' - ' + - current.total / NANOSECONDS + - 's total (' + + formatTime(current.total / NANOSECONDS, 0) + + ' total (' + TIMES_TO_RUN + ' runs)'; } From ed53434a82d70de0212d91c2a2296f68ab4da2d0 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Sat, 2 May 2020 14:31:58 +0200 Subject: [PATCH 048/106] chore: move changelog entry and fix tets utils dependency --- CHANGELOG.md | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 76bf69d13223..a8175d2a73b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ ### Fixes +- `[jest-circus, jest-console, jest-jasmine2, jest-reporters, jest-util, pretty-format]` Fix time durating formatting and consolidate time formatting code ([#9765](https://github.com/facebook/jest/pull/9765)) - `[jest-circus]` [**BREAKING**] Fail tests if a test takes a done callback and have return values ([#9129](https://github.com/facebook/jest/pull/9129)) - `[jest-config, jest-resolve]` [**BREAKING**] Remove support for `browser` field ([#9943](https://github.com/facebook/jest/pull/9943)) @@ -89,7 +90,6 @@ ### Fixes -- `[jest-circus, jest-console, jest-jasmine2, jest-reporters, jest-util, pretty-format]` Fix time durating formatting and consolidate time formatting code ([#9765](https://github.com/facebook/jest/pull/9765)) - `[expect]` Restore support for passing functions to `toHaveLength` matcher ([#9796](https://github.com/facebook/jest/pull/9796)) - `[jest-changed-files]` `--only-changed` should include staged files ([#9799](https://github.com/facebook/jest/pull/9799)) - `[jest-circus]` Throw on nested test definitions ([#9828](https://github.com/facebook/jest/pull/9828)) diff --git a/package.json b/package.json index 65f1067dcdb4..167ce8961414 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "@babel/preset-react": "^7.0.0", "@babel/preset-typescript": "^7.0.0", "@babel/register": "^7.0.0", - "@jest/test-utils": "^25.1.0", + "@jest/test-utils": "*", "@types/babel__core": "^7.0.0", "@types/babel__generator": "^7.0.0", "@types/babel__template": "^7.0.0", From 81fe06e480877ec6da95648b964eb9327214d97f Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Sat, 2 May 2020 14:34:46 +0200 Subject: [PATCH 049/106] chore: update lockfile due to beta release --- yarn.lock | 735 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 724 insertions(+), 11 deletions(-) diff --git a/yarn.lock b/yarn.lock index c580faf092eb..60ec64f23232 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1170,6 +1170,60 @@ chalk "^2.0.1" slash "^2.0.0" +"@jest/console@^25.5.0": + version "25.5.0" + resolved "https://registry.yarnpkg.com/@jest/console/-/console-25.5.0.tgz#770800799d510f37329c508a9edd0b7b447d9abb" + integrity sha512-T48kZa6MK1Y6k4b89sexwmSF4YLeZS/Udqg3Jj3jG/cHH+N/sLFCEoXEDMOKugJQ9FxPN1osxIknvKkxt6MKyw== + dependencies: + "@jest/types" "^25.5.0" + chalk "^3.0.0" + jest-message-util "^25.5.0" + jest-util "^25.5.0" + slash "^3.0.0" + +"@jest/core@^25.5.4": + version "25.5.4" + resolved "https://registry.yarnpkg.com/@jest/core/-/core-25.5.4.tgz#3ef7412f7339210f003cdf36646bbca786efe7b4" + integrity sha512-3uSo7laYxF00Dg/DMgbn4xMJKmDdWvZnf89n8Xj/5/AeQ2dOQmn6b6Hkj/MleyzZWXpwv+WSdYWl4cLsy2JsoA== + dependencies: + "@jest/console" "^25.5.0" + "@jest/reporters" "^25.5.1" + "@jest/test-result" "^25.5.0" + "@jest/transform" "^25.5.1" + "@jest/types" "^25.5.0" + ansi-escapes "^4.2.1" + chalk "^3.0.0" + exit "^0.1.2" + graceful-fs "^4.2.4" + jest-changed-files "^25.5.0" + jest-config "^25.5.4" + jest-haste-map "^25.5.1" + jest-message-util "^25.5.0" + jest-regex-util "^25.2.6" + jest-resolve "^25.5.1" + jest-resolve-dependencies "^25.5.4" + jest-runner "^25.5.4" + jest-runtime "^25.5.4" + jest-snapshot "^25.5.1" + jest-util "^25.5.0" + jest-validate "^25.5.0" + jest-watcher "^25.5.0" + micromatch "^4.0.2" + p-each-series "^2.1.0" + realpath-native "^2.0.0" + rimraf "^3.0.0" + slash "^3.0.0" + strip-ansi "^6.0.0" + +"@jest/environment@^25.5.0": + version "25.5.0" + resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-25.5.0.tgz#aa33b0c21a716c65686638e7ef816c0e3a0c7b37" + integrity sha512-U2VXPEqL07E/V7pSZMSQCvV5Ea4lqOlT+0ZFijl/i316cRMHvZ4qC+jBdryd+lmRetjQo0YIQr6cVPNxxK87mA== + dependencies: + "@jest/fake-timers" "^25.5.0" + "@jest/types" "^25.5.0" + jest-mock "^25.5.0" + "@jest/fake-timers@^24.9.0": version "24.9.0" resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-24.9.0.tgz#ba3e6bf0eecd09a636049896434d306636540c93" @@ -1179,6 +1233,58 @@ jest-message-util "^24.9.0" jest-mock "^24.9.0" +"@jest/fake-timers@^25.5.0": + version "25.5.0" + resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-25.5.0.tgz#46352e00533c024c90c2bc2ad9f2959f7f114185" + integrity sha512-9y2+uGnESw/oyOI3eww9yaxdZyHq7XvprfP/eeoCsjqKYts2yRlsHS/SgjPDV8FyMfn2nbMy8YzUk6nyvdLOpQ== + dependencies: + "@jest/types" "^25.5.0" + jest-message-util "^25.5.0" + jest-mock "^25.5.0" + jest-util "^25.5.0" + lolex "^5.0.0" + +"@jest/globals@^25.5.2": + version "25.5.2" + resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-25.5.2.tgz#5e45e9de8d228716af3257eeb3991cc2e162ca88" + integrity sha512-AgAS/Ny7Q2RCIj5kZ+0MuKM1wbF0WMLxbCVl/GOMoCNbODRdJ541IxJ98xnZdVSZXivKpJlNPIWa3QmY0l4CXA== + dependencies: + "@jest/environment" "^25.5.0" + "@jest/types" "^25.5.0" + expect "^25.5.0" + +"@jest/reporters@^25.5.1": + version "25.5.1" + resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-25.5.1.tgz#cb686bcc680f664c2dbaf7ed873e93aa6811538b" + integrity sha512-3jbd8pPDTuhYJ7vqiHXbSwTJQNavczPs+f1kRprRDxETeE3u6srJ+f0NPuwvOmk+lmunZzPkYWIFZDLHQPkviw== + dependencies: + "@bcoe/v8-coverage" "^0.2.3" + "@jest/console" "^25.5.0" + "@jest/test-result" "^25.5.0" + "@jest/transform" "^25.5.1" + "@jest/types" "^25.5.0" + chalk "^3.0.0" + collect-v8-coverage "^1.0.0" + exit "^0.1.2" + glob "^7.1.2" + graceful-fs "^4.2.4" + istanbul-lib-coverage "^3.0.0" + istanbul-lib-instrument "^4.0.0" + istanbul-lib-report "^3.0.0" + istanbul-lib-source-maps "^4.0.0" + istanbul-reports "^3.0.2" + jest-haste-map "^25.5.1" + jest-resolve "^25.5.1" + jest-util "^25.5.0" + jest-worker "^25.5.0" + slash "^3.0.0" + source-map "^0.6.0" + string-length "^3.1.0" + terminal-link "^2.0.0" + v8-to-istanbul "^4.1.3" + optionalDependencies: + node-notifier "^6.0.0" + "@jest/source-map@^24.9.0": version "24.9.0" resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-24.9.0.tgz#0e263a94430be4b41da683ccc1e6bffe2a191714" @@ -1188,6 +1294,15 @@ graceful-fs "^4.1.15" source-map "^0.6.0" +"@jest/source-map@^25.5.0": + version "25.5.0" + resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-25.5.0.tgz#df5c20d6050aa292c2c6d3f0d2c7606af315bd1b" + integrity sha512-eIGx0xN12yVpMcPaVpjXPnn3N30QGJCJQSkEDUt9x1fI1Gdvb07Ml6K5iN2hG7NmMP6FDmtPEssE3z6doOYUwQ== + dependencies: + callsites "^3.0.0" + graceful-fs "^4.2.4" + source-map "^0.6.0" + "@jest/test-result@^24.9.0": version "24.9.0" resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-24.9.0.tgz#11796e8aa9dbf88ea025757b3152595ad06ba0ca" @@ -1197,6 +1312,54 @@ "@jest/types" "^24.9.0" "@types/istanbul-lib-coverage" "^2.0.0" +"@jest/test-result@^25.5.0": + version "25.5.0" + resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-25.5.0.tgz#139a043230cdeffe9ba2d8341b27f2efc77ce87c" + integrity sha512-oV+hPJgXN7IQf/fHWkcS99y0smKLU2czLBJ9WA0jHITLst58HpQMtzSYxzaBvYc6U5U6jfoMthqsUlUlbRXs0A== + dependencies: + "@jest/console" "^25.5.0" + "@jest/types" "^25.5.0" + "@types/istanbul-lib-coverage" "^2.0.0" + collect-v8-coverage "^1.0.0" + +"@jest/test-sequencer@^25.5.4": + version "25.5.4" + resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-25.5.4.tgz#9b4e685b36954c38d0f052e596d28161bdc8b737" + integrity sha512-pTJGEkSeg1EkCO2YWq6hbFvKNXk8ejqlxiOg1jBNLnWrgXOkdY6UmqZpwGFXNnRt9B8nO1uWMzLLZ4eCmhkPNA== + dependencies: + "@jest/test-result" "^25.5.0" + graceful-fs "^4.2.4" + jest-haste-map "^25.5.1" + jest-runner "^25.5.4" + jest-runtime "^25.5.4" + +"@jest/test-utils@*": + version "0.0.0" + resolved "https://registry.yarnpkg.com/@jest/test-utils/-/test-utils-0.0.0.tgz#3c4c3cef69fdcaf3620147ea426a60c73ad48f0b" + integrity sha512-I7+1ZrMNkQylj9ULDwvytutSOpEs2RxOiY6dhZs//9zASoxSZUwC5vWE/l77Bq+4ffq2a/nGjqrLGBcoAmL9Qw== + +"@jest/transform@^25.5.1": + version "25.5.1" + resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-25.5.1.tgz#0469ddc17699dd2bf985db55fa0fb9309f5c2db3" + integrity sha512-Y8CEoVwXb4QwA6Y/9uDkn0Xfz0finGkieuV0xkdF9UtZGJeLukD5nLkaVrVsODB1ojRWlaoD0AJZpVHCSnJEvg== + dependencies: + "@babel/core" "^7.1.0" + "@jest/types" "^25.5.0" + babel-plugin-istanbul "^6.0.0" + chalk "^3.0.0" + convert-source-map "^1.4.0" + fast-json-stable-stringify "^2.0.0" + graceful-fs "^4.2.4" + jest-haste-map "^25.5.1" + jest-regex-util "^25.2.6" + jest-util "^25.5.0" + micromatch "^4.0.2" + pirates "^4.0.1" + realpath-native "^2.0.0" + slash "^3.0.0" + source-map "^0.6.1" + write-file-atomic "^3.0.0" + "@jest/types@^24.9.0": version "24.9.0" resolved "https://registry.yarnpkg.com/@jest/types/-/types-24.9.0.tgz#63cb26cb7500d069e5a389441a7c6ab5e909fc59" @@ -1206,6 +1369,16 @@ "@types/istanbul-reports" "^1.1.1" "@types/yargs" "^13.0.0" +"@jest/types@^25.5.0": + version "25.5.0" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-25.5.0.tgz#4d6a4793f7b9599fc3680877b856a97dbccf2a9d" + integrity sha512-OXD0RgQ86Tu3MazKo8bnrkDRaDXXMGUqd+kTtLtK1Zb7CRzQcaSRPPPV37SvYTdevXEBVxe0HXylEjs8ibkmCw== + dependencies: + "@types/istanbul-lib-coverage" "^2.0.0" + "@types/istanbul-reports" "^1.1.1" + "@types/yargs" "^15.0.0" + chalk "^3.0.0" + "@lerna/add@3.20.0": version "3.20.0" resolved "https://registry.yarnpkg.com/@lerna/add/-/add-3.20.0.tgz#bea7edf36fc93fb72ec34cb9ba854c48d4abf309" @@ -2671,7 +2844,7 @@ JSONStream@^1.0.4, JSONStream@^1.3.4: jsonparse "^1.2.0" through ">=2.2.7 <3" -abab@^2.0.3: +abab@^2.0.0, abab@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.3.tgz#623e2075e02eb2d3f2475e49f99c91846467907a" integrity sha512-tsFzPpcttalNjFBCFMqsKYQcWxxen1pgJR56by//QwvJc4/OUS3kPOOttx2tSIfjsylB0pYu7f5D3K1RCxUnUg== @@ -2701,6 +2874,14 @@ accepts@~1.3.5, accepts@~1.3.7: mime-types "~2.1.24" negotiator "0.6.2" +acorn-globals@^4.3.2: + version "4.3.4" + resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-4.3.4.tgz#9fa1926addc11c97308c4e66d7add0d40c3272e7" + integrity sha512-clfQEh21R+D0leSbUdWf3OcfqyaCSAQ8Ryq00bofSekfr9W8u1jyYZo6ir0xu9Gtcf7BjcHJpnbZH7JOCpP60A== + dependencies: + acorn "^6.0.1" + acorn-walk "^6.0.1" + acorn-globals@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-6.0.0.tgz#46cdd39f0f8ff08a876619b55f5ac8a6dc770b45" @@ -2714,12 +2895,22 @@ acorn-jsx@^5.2.0: resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.2.0.tgz#4c66069173d6fdd68ed85239fc256226182b2ebe" integrity sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ== +acorn-walk@^6.0.1: + version "6.2.0" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-6.2.0.tgz#123cb8f3b84c2171f1f7fb252615b1c78a6b1a8c" + integrity sha512-7evsyfH1cLOCdAzZAd43Cic04yKydNx0cF+7tiA19p1XnLLPU4dpCQOqpjqwokFe//vS0QqfqqjCS2JkiIs0cA== + acorn-walk@^7.1.1: version "7.1.1" resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-7.1.1.tgz#345f0dffad5c735e7373d2fec9a1023e6a44b83e" integrity sha512-wdlPY2tm/9XBr7QkKlq0WQVgiuGTX6YWPyRyBviSoScBuLfTVQhvwg6wJ369GJ/1nPfTLMfnrFIfjqVg6d+jQQ== -acorn@^7.1.1: +acorn@^6.0.1: + version "6.4.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.1.tgz#531e58ba3f51b9dacb9a6646ca4debf5b14ca474" + integrity sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA== + +acorn@^7.1.0, acorn@^7.1.1: version "7.1.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.1.1.tgz#e35668de0b402f359de515c5482a1ab9f89a69bf" integrity sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg== @@ -3006,6 +3197,11 @@ array-differ@^2.0.3: resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-2.1.0.tgz#4b9c1c3f14b906757082925769e8ab904f4801b1" integrity sha512-KbUpJgx909ZscOc/7CLATBFam7P1Z1QRQInvgT0UztM9Q72aGKCunKASAl7WNW0tnPmPyEMeMhdsfWhfmW037w== +array-equal@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93" + integrity sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM= + array-filter@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/array-filter/-/array-filter-1.0.0.tgz#baf79e62e6ef4c2a4c0b831232daffec251f9d83" @@ -3220,6 +3416,20 @@ babel-eslint@^10.0.3: eslint-visitor-keys "^1.0.0" resolve "^1.12.0" +babel-jest@*, babel-jest@^25.5.1: + version "25.5.1" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-25.5.1.tgz#bc2e6101f849d6f6aec09720ffc7bc5332e62853" + integrity sha512-9dA9+GmMjIzgPnYtkhBg73gOo/RHqPmLruP3BaGL4KEX3Dwz6pI8auSN8G8+iuEG90+GSswyKvslN+JYSaacaQ== + dependencies: + "@jest/transform" "^25.5.1" + "@jest/types" "^25.5.0" + "@types/babel__core" "^7.1.7" + babel-plugin-istanbul "^6.0.0" + babel-preset-jest "^25.5.0" + chalk "^3.0.0" + graceful-fs "^4.2.4" + slash "^3.0.0" + babel-plugin-dynamic-import-node@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.0.tgz#f00f507bdaa3c3e3ff6e7e5e98d90a7acab96f7f" @@ -3238,6 +3448,15 @@ babel-plugin-istanbul@^6.0.0: istanbul-lib-instrument "^4.0.0" test-exclude "^6.0.0" +babel-plugin-jest-hoist@^25.5.0: + version "25.5.0" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-25.5.0.tgz#129c80ba5c7fc75baf3a45b93e2e372d57ca2677" + integrity sha512-u+/W+WAjMlvoocYGTwthAiQSxDcJAyHpQ6oWlHdFZaaN+Rlk8Q7iiwDPg2lN/FyJtAYnKjFxbn7xus4HCFkg5g== + dependencies: + "@babel/template" "^7.3.3" + "@babel/types" "^7.3.3" + "@types/babel__traverse" "^7.0.6" + babel-plugin-replace-ts-export-assignment@^0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/babel-plugin-replace-ts-export-assignment/-/babel-plugin-replace-ts-export-assignment-0.0.2.tgz#927a30ba303fcf271108980a8d4f80a693e1d53f" @@ -3318,6 +3537,14 @@ babel-preset-fbjs@^3.2.0, babel-preset-fbjs@^3.3.0: "@babel/plugin-transform-template-literals" "^7.0.0" babel-plugin-syntax-trailing-function-commas "^7.0.0-beta.0" +babel-preset-jest@^25.5.0: + version "25.5.0" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-25.5.0.tgz#c1d7f191829487a907764c65307faa0e66590b49" + integrity sha512-8ZczygctQkBU+63DtSOKGh7tFL0CeCuz+1ieud9lJ1WPQ9O6A1a/r+LGn6Y705PA6whHQ3T1XuB/PmpfNYf8Fw== + dependencies: + babel-plugin-jest-hoist "^25.5.0" + babel-preset-current-node-syntax "^0.1.2" + babel-runtime@^6.22.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" @@ -3556,6 +3783,13 @@ browser-process-hrtime@^1.0.0: resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz#3c9b4b7d782c8121e56f10106d84c0d0ffc94626" integrity sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow== +browser-resolve@^1.11.3: + version "1.11.3" + resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.3.tgz#9b7cbb3d0f510e4cb86bdbd796124d28b5890af6" + integrity sha512-exDi1BYWB/6raKHmDTCicQfTkqwN5fioMFV4j8BsfMU4R2DK/QfZfK7kOVkmWCNANf0snkBzqGqAJBao9gZMdQ== + dependencies: + resolve "1.1.7" + browser-stdout@1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" @@ -4694,7 +4928,7 @@ csso@^4.0.2: dependencies: css-tree "1.0.0-alpha.39" -cssom@^0.4.4: +cssom@^0.4.1, cssom@^0.4.4: version "0.4.4" resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.4.4.tgz#5a66cf93d2d0b661d80bf6a44fb65f5c2e4e0a10" integrity sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw== @@ -4704,6 +4938,13 @@ cssom@~0.3.6: resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.8.tgz#9f1276f5b2b463f2114d3f2c75250af8c1a36f4a" integrity sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg== +cssstyle@^2.0.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-2.3.0.tgz#ff665a0ddbdc31864b09647f34163443d90b0852" + integrity sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A== + dependencies: + cssom "~0.3.6" + cssstyle@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-2.2.0.tgz#e4c44debccd6b7911ed617a4395e5754bba59992" @@ -4747,6 +4988,15 @@ dashdash@^1.12.0: dependencies: assert-plus "^1.0.0" +data-urls@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-1.1.0.tgz#15ee0582baa5e22bb59c77140da8f9c76963bbfe" + integrity sha512-YTWYI9se1P55u58gL5GkQHW4P6VJBJ5iBT+B5a7i2Tjadhv52paJG0qHX4A0OR6/t52odI64KP2YvFpkDOi3eQ== + dependencies: + abab "^2.0.0" + whatwg-mimetype "^2.2.0" + whatwg-url "^7.0.0" + data-urls@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-2.0.0.tgz#156485a72963a970f5d5821aaf642bef2bf2db9b" @@ -5016,6 +5266,11 @@ diacritics-map@^0.1.0: resolved "https://registry.yarnpkg.com/diacritics-map/-/diacritics-map-0.1.0.tgz#6dfc0ff9d01000a2edf2865371cac316e94977af" integrity sha1-bfwP+dAQAKLt8oZTccrDFulJd68= +diff-sequences@^25.2.6: + version "25.2.6" + resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-25.2.6.tgz#5f467c00edd35352b7bca46d7927d60e687a76dd" + integrity sha512-Hq8o7+6GaZeoFjtpgvRBUknSXNeJiCx7V9Fr94ZMljNiCr9n9L8H8aJqgWOQiDDGdyn29fRNcDdRVJ5fdyihfg== + diff@3.5.0: version "3.5.0" resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" @@ -5153,6 +5408,13 @@ domelementtype@^2.0.1: resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.0.1.tgz#1f8bdfe91f5a78063274e803b4bdcedf6e94f94d" integrity sha512-5HOHUDsYZWV8FGWN0Njbr/Rn7f/eWSQi1v7+HsUVwXgn8nWWlL64zKDkS0n8ZmQ3mlWOMuXOnR+7Nx/5tMO5AQ== +domexception@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/domexception/-/domexception-1.0.1.tgz#937442644ca6a31261ef36e3ec677fe805582c90" + integrity sha512-raigMkn7CJNNo6Ihro1fzG7wr3fHuYVytzquZKX5n0yizGsTcYgzdIUwj1X9pK0VvjeihV+XiclP+DjwbsSKug== + dependencies: + webidl-conversions "^4.0.2" + domexception@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/domexception/-/domexception-2.0.1.tgz#fb44aefba793e1574b0af6aed2801d057529f304" @@ -5486,7 +5748,7 @@ escape-string-regexp@^2.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== -escodegen@^1.14.1: +escodegen@^1.11.1, escodegen@^1.14.1: version "1.14.1" resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.14.1.tgz#ba01d0c8278b5e95a9a45350142026659027a457" integrity sha512-Bmt7NcRySdIfNPfU2ZoXDrrXsG9ZjvDxcAlMfDUgRBjLOWTuIACXPBFJH7Z+cLb40JeQco5toikyc9t9P8E9SQ== @@ -5859,6 +6121,18 @@ expand-range@^1.8.1: dependencies: fill-range "^2.1.0" +expect@^25.5.0: + version "25.5.0" + resolved "https://registry.yarnpkg.com/expect/-/expect-25.5.0.tgz#f07f848712a2813bb59167da3fb828ca21f58bba" + integrity sha512-w7KAXo0+6qqZZhovCaBVPSIqQp7/UTcx4M9uKt2m6pd2VB1voyC8JizLRqeEqud3AAVP02g+hbErDu5gu64tlA== + dependencies: + "@jest/types" "^25.5.0" + ansi-styles "^4.0.0" + jest-get-type "^25.2.6" + jest-matcher-utils "^25.5.0" + jest-message-util "^25.5.0" + jest-regex-util "^25.2.6" + express@^4.17.1: version "4.17.1" resolved "https://registry.yarnpkg.com/express/-/express-4.17.1.tgz#4491fc38605cf51f8629d39c2b5d026f98a4c134" @@ -7084,6 +7358,13 @@ html-element-map@^1.2.0: dependencies: array-filter "^1.0.0" +html-encoding-sniffer@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-1.0.2.tgz#e70d84b94da53aa375e11fe3a351be6642ca46f8" + integrity sha512-71lZziiDnsuabfdYiUeWdCVyKuqwWi23L8YeIgV9jSSZHCtb6wB1BKWooH7L3tn4/FuZJMVWyNaIDr4RGmaSYw== + dependencies: + whatwg-encoding "^1.0.1" + html-encoding-sniffer@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz#42a6dc4fd33f00281176e8b23759ca4e4fa185f3" @@ -8074,11 +8355,122 @@ iterall@^1.2.2: resolved "https://registry.yarnpkg.com/iterall/-/iterall-1.3.0.tgz#afcb08492e2915cbd8a0884eb93a8c94d0d72fea" integrity sha512-QZ9qOMdF+QLHxy1QIpUHUU1D5pS2CG2P69LF6L6CPjPYA/XMOmKV3PZpawHoAjHNyB0swdVTRxdYT4tbBbxqwg== +jest-changed-files@^25.5.0: + version "25.5.0" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-25.5.0.tgz#141cc23567ceb3f534526f8614ba39421383634c" + integrity sha512-EOw9QEqapsDT7mKF162m8HFzRPbmP8qJQny6ldVOdOVBz3ACgPm/1nAn5fPQ/NDaYhX/AHkrGwwkCncpAVSXcw== + dependencies: + "@jest/types" "^25.5.0" + execa "^3.2.0" + throat "^5.0.0" + +jest-cli@^25.5.4: + version "25.5.4" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-25.5.4.tgz#b9f1a84d1301a92c5c217684cb79840831db9f0d" + integrity sha512-rG8uJkIiOUpnREh1768/N3n27Cm+xPFkSNFO91tgg+8o2rXeVLStz+vkXkGr4UtzH6t1SNbjwoiswd7p4AhHTw== + dependencies: + "@jest/core" "^25.5.4" + "@jest/test-result" "^25.5.0" + "@jest/types" "^25.5.0" + chalk "^3.0.0" + exit "^0.1.2" + graceful-fs "^4.2.4" + import-local "^3.0.2" + is-ci "^2.0.0" + jest-config "^25.5.4" + jest-util "^25.5.0" + jest-validate "^25.5.0" + prompts "^2.0.1" + realpath-native "^2.0.0" + yargs "^15.3.1" + +jest-config@^25.5.4: + version "25.5.4" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-25.5.4.tgz#38e2057b3f976ef7309b2b2c8dcd2a708a67f02c" + integrity sha512-SZwR91SwcdK6bz7Gco8qL7YY2sx8tFJYzvg216DLihTWf+LKY/DoJXpM9nTzYakSyfblbqeU48p/p7Jzy05Atg== + dependencies: + "@babel/core" "^7.1.0" + "@jest/test-sequencer" "^25.5.4" + "@jest/types" "^25.5.0" + babel-jest "^25.5.1" + chalk "^3.0.0" + deepmerge "^4.2.2" + glob "^7.1.1" + graceful-fs "^4.2.4" + jest-environment-jsdom "^25.5.0" + jest-environment-node "^25.5.0" + jest-get-type "^25.2.6" + jest-jasmine2 "^25.5.4" + jest-regex-util "^25.2.6" + jest-resolve "^25.5.1" + jest-util "^25.5.0" + jest-validate "^25.5.0" + micromatch "^4.0.2" + pretty-format "^25.5.0" + realpath-native "^2.0.0" + +jest-diff@^25.5.0: + version "25.5.0" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-25.5.0.tgz#1dd26ed64f96667c068cef026b677dfa01afcfa9" + integrity sha512-z1kygetuPiREYdNIumRpAHY6RXiGmp70YHptjdaxTWGmA085W3iCnXNx0DhflK3vwrKmrRWyY1wUpkPMVxMK7A== + dependencies: + chalk "^3.0.0" + diff-sequences "^25.2.6" + jest-get-type "^25.2.6" + pretty-format "^25.5.0" + +jest-docblock@^25.3.0: + version "25.3.0" + resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-25.3.0.tgz#8b777a27e3477cd77a168c05290c471a575623ef" + integrity sha512-aktF0kCar8+zxRHxQZwxMy70stc9R1mOmrLsT5VO3pIT0uzGRSDAXxSlz4NqQWpuLjPpuMhPRl7H+5FRsvIQAg== + dependencies: + detect-newline "^3.0.0" + +jest-each@^25.5.0: + version "25.5.0" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-25.5.0.tgz#0c3c2797e8225cb7bec7e4d249dcd96b934be516" + integrity sha512-QBogUxna3D8vtiItvn54xXde7+vuzqRrEeaw8r1s+1TG9eZLVJE5ZkKoSUlqFwRjnlaA4hyKGiu9OlkFIuKnjA== + dependencies: + "@jest/types" "^25.5.0" + chalk "^3.0.0" + jest-get-type "^25.2.6" + jest-util "^25.5.0" + pretty-format "^25.5.0" + +jest-environment-jsdom@^25.5.0: + version "25.5.0" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-25.5.0.tgz#dcbe4da2ea997707997040ecf6e2560aec4e9834" + integrity sha512-7Jr02ydaq4jaWMZLY+Skn8wL5nVIYpWvmeatOHL3tOcV3Zw8sjnPpx+ZdeBfc457p8jCR9J6YCc+Lga0oIy62A== + dependencies: + "@jest/environment" "^25.5.0" + "@jest/fake-timers" "^25.5.0" + "@jest/types" "^25.5.0" + jest-mock "^25.5.0" + jest-util "^25.5.0" + jsdom "^15.2.1" + +jest-environment-node@*, jest-environment-node@^25.5.0: + version "25.5.0" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-25.5.0.tgz#0f55270d94804902988e64adca37c6ce0f7d07a1" + integrity sha512-iuxK6rQR2En9EID+2k+IBs5fCFd919gVVK5BeND82fYeLWPqvRcFNPKu9+gxTwfB5XwBGBvZ0HFQa+cHtIoslA== + dependencies: + "@jest/environment" "^25.5.0" + "@jest/fake-timers" "^25.5.0" + "@jest/types" "^25.5.0" + jest-mock "^25.5.0" + jest-util "^25.5.0" + semver "^6.3.0" + jest-get-type@^24.9.0: version "24.9.0" resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-24.9.0.tgz#1684a0c8a50f2e4901b6644ae861f579eed2ef0e" integrity sha512-lUseMzAley4LhIcpSP9Jf+fTrQ4a1yHQwLNeeVa2cEmbCGeoZAtYPOIv8JaxLD/sUpKxetKGP+gsHl8f8TSj8Q== +jest-get-type@^25.2.6: + version "25.2.6" + resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-25.2.6.tgz#0b0a32fab8908b44d508be81681487dbabb8d877" + integrity sha512-DxjtyzOHjObRM+sM1knti6or+eOgcGU4xVSb2HNP1TqO4ahsT+rqZg+nyqHWJSvWgKC5cG3QjGFBqxLghiF/Ig== + jest-haste-map@^24.7.1: version "24.9.0" resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-24.9.0.tgz#b38a5d64274934e21fa417ae9a9fbeb77ceaac7d" @@ -8098,6 +8490,49 @@ jest-haste-map@^24.7.1: optionalDependencies: fsevents "^1.2.7" +jest-haste-map@^25.5.1: + version "25.5.1" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-25.5.1.tgz#1df10f716c1d94e60a1ebf7798c9fb3da2620943" + integrity sha512-dddgh9UZjV7SCDQUrQ+5t9yy8iEgKc1AKqZR9YDww8xsVOtzPQSMVLDChc21+g29oTRexb9/B0bIlZL+sWmvAQ== + dependencies: + "@jest/types" "^25.5.0" + "@types/graceful-fs" "^4.1.2" + anymatch "^3.0.3" + fb-watchman "^2.0.0" + graceful-fs "^4.2.4" + jest-serializer "^25.5.0" + jest-util "^25.5.0" + jest-worker "^25.5.0" + micromatch "^4.0.2" + sane "^4.0.3" + walker "^1.0.7" + which "^2.0.2" + optionalDependencies: + fsevents "^2.1.2" + +jest-jasmine2@^25.5.4: + version "25.5.4" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-25.5.4.tgz#66ca8b328fb1a3c5364816f8958f6970a8526968" + integrity sha512-9acbWEfbmS8UpdcfqnDO+uBUgKa/9hcRh983IHdM+pKmJPL77G0sWAAK0V0kr5LK3a8cSBfkFSoncXwQlRZfkQ== + dependencies: + "@babel/traverse" "^7.1.0" + "@jest/environment" "^25.5.0" + "@jest/source-map" "^25.5.0" + "@jest/test-result" "^25.5.0" + "@jest/types" "^25.5.0" + chalk "^3.0.0" + co "^4.6.0" + expect "^25.5.0" + is-generator-fn "^2.0.0" + jest-each "^25.5.0" + jest-matcher-utils "^25.5.0" + jest-message-util "^25.5.0" + jest-runtime "^25.5.4" + jest-snapshot "^25.5.1" + jest-util "^25.5.0" + pretty-format "^25.5.0" + throat "^5.0.0" + jest-junit@^10.0.0: version "10.0.0" resolved "https://registry.yarnpkg.com/jest-junit/-/jest-junit-10.0.0.tgz#c94b91c24920a327c9d2a075e897b2dba4af494b" @@ -8109,6 +8544,24 @@ jest-junit@^10.0.0: uuid "^3.3.3" xml "^1.0.1" +jest-leak-detector@^25.5.0: + version "25.5.0" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-25.5.0.tgz#2291c6294b0ce404241bb56fe60e2d0c3e34f0bb" + integrity sha512-rV7JdLsanS8OkdDpZtgBf61L5xZ4NnYLBq72r6ldxahJWWczZjXawRsoHyXzibM5ed7C2QRjpp6ypgwGdKyoVA== + dependencies: + jest-get-type "^25.2.6" + pretty-format "^25.5.0" + +jest-matcher-utils@^25.5.0: + version "25.5.0" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-25.5.0.tgz#fbc98a12d730e5d2453d7f1ed4a4d948e34b7867" + integrity sha512-VWI269+9JS5cpndnpCwm7dy7JtGQT30UHfrnM3mXl22gHGt/b7NkjBqXfbhZ8V4B7ANUsjK18PlSBmG0YH7gjw== + dependencies: + chalk "^3.0.0" + jest-diff "^25.5.0" + jest-get-type "^25.2.6" + pretty-format "^25.5.0" + jest-message-util@^24.9.0: version "24.9.0" resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-24.9.0.tgz#527f54a1e380f5e202a8d1149b0ec872f43119e3" @@ -8123,6 +8576,20 @@ jest-message-util@^24.9.0: slash "^2.0.0" stack-utils "^1.0.1" +jest-message-util@^25.5.0: + version "25.5.0" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-25.5.0.tgz#ea11d93204cc7ae97456e1d8716251185b8880ea" + integrity sha512-ezddz3YCT/LT0SKAmylVyWWIGYoKHOFOFXx3/nA4m794lfVUskMcwhip6vTgdVrOtYdjeQeis2ypzes9mZb4EA== + dependencies: + "@babel/code-frame" "^7.0.0" + "@jest/types" "^25.5.0" + "@types/stack-utils" "^1.0.1" + chalk "^3.0.0" + graceful-fs "^4.2.4" + micromatch "^4.0.2" + slash "^3.0.0" + stack-utils "^1.0.1" + jest-mock@^24.9.0: version "24.9.0" resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-24.9.0.tgz#c22835541ee379b908673ad51087a2185c13f1c6" @@ -8130,16 +8597,116 @@ jest-mock@^24.9.0: dependencies: "@jest/types" "^24.9.0" +jest-mock@^25.5.0: + version "25.5.0" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-25.5.0.tgz#a91a54dabd14e37ecd61665d6b6e06360a55387a" + integrity sha512-eXWuTV8mKzp/ovHc5+3USJMYsTBhyQ+5A1Mak35dey/RG8GlM4YWVylZuGgVXinaW6tpvk/RSecmF37FKUlpXA== + dependencies: + "@jest/types" "^25.5.0" + jest-pnp-resolver@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.1.tgz#ecdae604c077a7fbc70defb6d517c3c1c898923a" integrity sha512-pgFw2tm54fzgYvc/OHrnysABEObZCUNFnhjoRjaVOCN8NYc032/gVjPaHD4Aq6ApkSieWtfKAFQtmDKAmhupnQ== +jest-regex-util@^25.2.1, jest-regex-util@^25.2.6: + version "25.2.6" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-25.2.6.tgz#d847d38ba15d2118d3b06390056028d0f2fd3964" + integrity sha512-KQqf7a0NrtCkYmZZzodPftn7fL1cq3GQAFVMn5Hg8uKx/fIenLEobNanUxb7abQ1sjADHBseG/2FGpsv/wr+Qw== + +jest-resolve-dependencies@^25.5.4: + version "25.5.4" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-25.5.4.tgz#85501f53957c8e3be446e863a74777b5a17397a7" + integrity sha512-yFmbPd+DAQjJQg88HveObcGBA32nqNZ02fjYmtL16t1xw9bAttSn5UGRRhzMHIQbsep7znWvAvnD4kDqOFM0Uw== + dependencies: + "@jest/types" "^25.5.0" + jest-regex-util "^25.2.6" + jest-snapshot "^25.5.1" + +jest-resolve@^25.5.1: + version "25.5.1" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-25.5.1.tgz#0e6fbcfa7c26d2a5fe8f456088dc332a79266829" + integrity sha512-Hc09hYch5aWdtejsUZhA+vSzcotf7fajSlPA6EZPE1RmPBAD39XtJhvHWFStid58iit4IPDLI/Da4cwdDmAHiQ== + dependencies: + "@jest/types" "^25.5.0" + browser-resolve "^1.11.3" + chalk "^3.0.0" + graceful-fs "^4.2.4" + jest-pnp-resolver "^1.2.1" + read-pkg-up "^7.0.1" + realpath-native "^2.0.0" + resolve "^1.17.0" + slash "^3.0.0" + +jest-runner@^25.5.4: + version "25.5.4" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-25.5.4.tgz#ffec5df3875da5f5c878ae6d0a17b8e4ecd7c71d" + integrity sha512-V/2R7fKZo6blP8E9BL9vJ8aTU4TH2beuqGNxHbxi6t14XzTb+x90B3FRgdvuHm41GY8ch4xxvf0ATH4hdpjTqg== + dependencies: + "@jest/console" "^25.5.0" + "@jest/environment" "^25.5.0" + "@jest/test-result" "^25.5.0" + "@jest/types" "^25.5.0" + chalk "^3.0.0" + exit "^0.1.2" + graceful-fs "^4.2.4" + jest-config "^25.5.4" + jest-docblock "^25.3.0" + jest-haste-map "^25.5.1" + jest-jasmine2 "^25.5.4" + jest-leak-detector "^25.5.0" + jest-message-util "^25.5.0" + jest-resolve "^25.5.1" + jest-runtime "^25.5.4" + jest-util "^25.5.0" + jest-worker "^25.5.0" + source-map-support "^0.5.6" + throat "^5.0.0" + +jest-runtime@^25.5.4: + version "25.5.4" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-25.5.4.tgz#dc981fe2cb2137abcd319e74ccae7f7eeffbfaab" + integrity sha512-RWTt8LeWh3GvjYtASH2eezkc8AehVoWKK20udV6n3/gC87wlTbE1kIA+opCvNWyyPeBs6ptYsc6nyHUb1GlUVQ== + dependencies: + "@jest/console" "^25.5.0" + "@jest/environment" "^25.5.0" + "@jest/globals" "^25.5.2" + "@jest/source-map" "^25.5.0" + "@jest/test-result" "^25.5.0" + "@jest/transform" "^25.5.1" + "@jest/types" "^25.5.0" + "@types/yargs" "^15.0.0" + chalk "^3.0.0" + collect-v8-coverage "^1.0.0" + exit "^0.1.2" + glob "^7.1.3" + graceful-fs "^4.2.4" + jest-config "^25.5.4" + jest-haste-map "^25.5.1" + jest-message-util "^25.5.0" + jest-mock "^25.5.0" + jest-regex-util "^25.2.6" + jest-resolve "^25.5.1" + jest-snapshot "^25.5.1" + jest-util "^25.5.0" + jest-validate "^25.5.0" + realpath-native "^2.0.0" + slash "^3.0.0" + strip-bom "^4.0.0" + yargs "^15.3.1" + jest-serializer@^24.4.0, jest-serializer@^24.9.0: version "24.9.0" resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-24.9.0.tgz#e6d7d7ef96d31e8b9079a714754c5d5c58288e73" integrity sha512-DxYipDr8OvfrKH3Kel6NdED3OXxjvxXZ1uIY2I9OFbGg+vUkkg7AGvi65qbhbWNPvDckXmzMPbK3u3HaDO49bQ== +jest-serializer@^25.5.0: + version "25.5.0" + resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-25.5.0.tgz#a993f484e769b4ed54e70e0efdb74007f503072b" + integrity sha512-LxD8fY1lByomEPflwur9o4e2a5twSQ7TaVNLlFUuToIdoJuBt8tzHfCsZ42Ok6LkKXWzFWf3AGmheuLAA7LcCA== + dependencies: + graceful-fs "^4.2.4" + jest-silent-reporter@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/jest-silent-reporter/-/jest-silent-reporter-0.2.1.tgz#554dd62b800989cdbcfba22bf30a1c0db6ad289c" @@ -8153,6 +8720,27 @@ jest-snapshot-serializer-raw@^1.1.0: resolved "https://registry.yarnpkg.com/jest-snapshot-serializer-raw/-/jest-snapshot-serializer-raw-1.1.0.tgz#1d7f09c02f3dbbc3ae70b5b7598fb2f45e37d6c8" integrity sha512-OL3bXRCnSn7Kur3YTGYj+A3Hwh2eyb5QL5VLQ9OSsPBOva7r3sCB0Jf1rOT/KN3ypzH42hrkDz96lpbiMo+AlQ== +jest-snapshot@^25.5.1: + version "25.5.1" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-25.5.1.tgz#1a2a576491f9961eb8d00c2e5fd479bc28e5ff7f" + integrity sha512-C02JE1TUe64p2v1auUJ2ze5vcuv32tkv9PyhEb318e8XOKF7MOyXdJ7kdjbvrp3ChPLU2usI7Rjxs97Dj5P0uQ== + dependencies: + "@babel/types" "^7.0.0" + "@jest/types" "^25.5.0" + "@types/prettier" "^1.19.0" + chalk "^3.0.0" + expect "^25.5.0" + graceful-fs "^4.2.4" + jest-diff "^25.5.0" + jest-get-type "^25.2.6" + jest-matcher-utils "^25.5.0" + jest-message-util "^25.5.0" + jest-resolve "^25.5.1" + make-dir "^3.0.0" + natural-compare "^1.4.0" + pretty-format "^25.5.0" + semver "^6.3.0" + jest-util@^24.0.0, jest-util@^24.9.0: version "24.9.0" resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-24.9.0.tgz#7396814e48536d2e85a37de3e4c431d7cb140162" @@ -8171,6 +8759,17 @@ jest-util@^24.0.0, jest-util@^24.9.0: slash "^2.0.0" source-map "^0.6.0" +jest-util@^25.2.6, jest-util@^25.5.0: + version "25.5.0" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-25.5.0.tgz#31c63b5d6e901274d264a4fec849230aa3fa35b0" + integrity sha512-KVlX+WWg1zUTB9ktvhsg2PXZVdkI1NBevOJSkTKYAyXyH4QSvh+Lay/e/v+bmaFfrkfx43xD8QTfgobzlEXdIA== + dependencies: + "@jest/types" "^25.5.0" + chalk "^3.0.0" + graceful-fs "^4.2.4" + is-ci "^2.0.0" + make-dir "^3.0.0" + jest-validate@^24.7.0, jest-validate@^24.9.0: version "24.9.0" resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-24.9.0.tgz#0775c55360d173cd854e40180756d4ff52def8ab" @@ -8183,6 +8782,18 @@ jest-validate@^24.7.0, jest-validate@^24.9.0: leven "^3.1.0" pretty-format "^24.9.0" +jest-validate@^25.5.0: + version "25.5.0" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-25.5.0.tgz#fb4c93f332c2e4cf70151a628e58a35e459a413a" + integrity sha512-okUFKqhZIpo3jDdtUXUZ2LxGUZJIlfdYBvZb1aczzxrlyMlqdnnws9MOxezoLGhSaFc2XYaHNReNQfj5zPIWyQ== + dependencies: + "@jest/types" "^25.5.0" + camelcase "^5.3.1" + chalk "^3.0.0" + jest-get-type "^25.2.6" + leven "^3.1.0" + pretty-format "^25.5.0" + jest-watch-typeahead@^0.5.0: version "0.5.0" resolved "https://registry.yarnpkg.com/jest-watch-typeahead/-/jest-watch-typeahead-0.5.0.tgz#903dba6112f22daae7e90b0a271853f7ff182008" @@ -8196,6 +8807,18 @@ jest-watch-typeahead@^0.5.0: string-length "^3.1.0" strip-ansi "^6.0.0" +jest-watcher@^25.2.4, jest-watcher@^25.5.0: + version "25.5.0" + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-25.5.0.tgz#d6110d101df98badebe435003956fd4a465e8456" + integrity sha512-XrSfJnVASEl+5+bb51V0Q7WQx65dTSk7NL4yDdVjPnRNpM0hG+ncFmDYJo9O8jaSRcAitVbuVawyXCRoxGrT5Q== + dependencies: + "@jest/test-result" "^25.5.0" + "@jest/types" "^25.5.0" + ansi-escapes "^4.2.1" + chalk "^3.0.0" + jest-util "^25.5.0" + string-length "^3.1.0" + jest-worker@^24.6.0, jest-worker@^24.9.0: version "24.9.0" resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-24.9.0.tgz#5dbfdb5b2d322e98567898238a9697bcce67b3e5" @@ -8204,11 +8827,28 @@ jest-worker@^24.6.0, jest-worker@^24.9.0: merge-stream "^2.0.0" supports-color "^6.1.0" +jest-worker@^25.5.0: + version "25.5.0" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-25.5.0.tgz#2611d071b79cea0f43ee57a3d118593ac1547db1" + integrity sha512-/dsSmUkIy5EBGfv/IjjqmFxrNAUpBERfGs1oHROyD7yxjG/w+t0GOJDX8O1k32ySmd7+a5IhnJU2qQFcJ4n1vw== + dependencies: + merge-stream "^2.0.0" + supports-color "^7.0.0" + jest-zone-patch@*: version "0.0.10" resolved "https://registry.yarnpkg.com/jest-zone-patch/-/jest-zone-patch-0.0.10.tgz#58252f44ab4aad45aaed62a705819577b9709b82" integrity sha512-K5uHLHgMgi2Eyj74gbY+xSeGGekb5U48bXsgDwgipRbFdaekyZK+TAcp8auamqU4UjrAt5S4sIUZz/2bBNyTTA== +jest@*: + version "25.5.4" + resolved "https://registry.yarnpkg.com/jest/-/jest-25.5.4.tgz#f21107b6489cfe32b076ce2adcadee3587acb9db" + integrity sha512-hHFJROBTqZahnO+X+PMtT6G2/ztqAZJveGqz//FnWWHurizkD05PQGzRZOhF3XP6z7SJmL+5tCfW8qV06JypwQ== + dependencies: + "@jest/core" "^25.5.4" + import-local "^3.0.2" + jest-cli "^25.5.4" + jetifier@^1.6.2: version "1.6.5" resolved "https://registry.yarnpkg.com/jetifier/-/jetifier-1.6.5.tgz#ea87324a4230bef20a9651178ecab978ee54a8cb" @@ -8256,6 +8896,38 @@ jsc-android@^245459.0.0: resolved "https://registry.yarnpkg.com/jsc-android/-/jsc-android-245459.0.0.tgz#e584258dd0b04c9159a27fb104cd5d491fd202c9" integrity sha512-wkjURqwaB1daNkDi2OYYbsLnIdC/lUM2nPXQKRs5pqEU9chDg435bjvo+LSaHotDENygHQDHe+ntUkkw2gwMtg== +jsdom@^15.2.1: + version "15.2.1" + resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-15.2.1.tgz#d2feb1aef7183f86be521b8c6833ff5296d07ec5" + integrity sha512-fAl1W0/7T2G5vURSyxBzrJ1LSdQn6Tr5UX/xD4PXDx/PDgwygedfW6El/KIj3xJ7FU61TTYnc/l/B7P49Eqt6g== + dependencies: + abab "^2.0.0" + acorn "^7.1.0" + acorn-globals "^4.3.2" + array-equal "^1.0.0" + cssom "^0.4.1" + cssstyle "^2.0.0" + data-urls "^1.1.0" + domexception "^1.0.1" + escodegen "^1.11.1" + html-encoding-sniffer "^1.0.2" + nwsapi "^2.2.0" + parse5 "5.1.0" + pn "^1.1.0" + request "^2.88.0" + request-promise-native "^1.0.7" + saxes "^3.1.9" + symbol-tree "^3.2.2" + tough-cookie "^3.0.1" + w3c-hr-time "^1.0.1" + w3c-xmlserializer "^1.1.2" + webidl-conversions "^4.0.2" + whatwg-encoding "^1.0.5" + whatwg-mimetype "^2.3.0" + whatwg-url "^7.0.0" + ws "^7.0.0" + xml-name-validator "^3.0.0" + jsdom@^16.2.2: version "16.2.2" resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-16.2.2.tgz#76f2f7541646beb46a938f5dc476b88705bedf2b" @@ -10395,6 +11067,11 @@ parse-url@^5.0.0: parse-path "^4.0.0" protocols "^1.4.0" +parse5@5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-5.1.0.tgz#c59341c9723f414c452975564c7c00a68d58acd2" + integrity sha512-fxNG2sQjHvlVAYmzBZS9YlDp6PTSSDwa98vkD4QgVDDCAo84z5X1t5XyJQ62ImdLXx5NdIIfihey6xpum9/gRQ== + parse5@5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/parse5/-/parse5-5.1.1.tgz#f68e4e5ba1852ac2cadc00f4555fff6c2abb6178" @@ -10594,6 +11271,11 @@ plugin-error@^0.1.2: arr-union "^2.0.1" extend-shallow "^1.1.2" +pn@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/pn/-/pn-1.1.0.tgz#e2f4cef0e219f463c179ab37463e4e1ecdccbafb" + integrity sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA== + portfinder@^1.0.25: version "1.0.25" resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.25.tgz#254fd337ffba869f4b9d37edc298059cb4d35eca" @@ -10934,6 +11616,16 @@ pretty-format@^24.7.0, pretty-format@^24.8.0, pretty-format@^24.9.0: ansi-styles "^3.2.0" react-is "^16.8.4" +pretty-format@^25.2.0, pretty-format@^25.5.0: + version "25.5.0" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-25.5.0.tgz#7873c1d774f682c34b8d48b6743a2bf2ac55791a" + integrity sha512-kbo/kq2LQ/A/is0PQwsEHM7Ca6//bGPPvU6UnsdDRSKTWxT/ru/xb88v4BJf6a69H+uTytOEsTusT9ksd/1iWQ== + dependencies: + "@jest/types" "^25.5.0" + ansi-regex "^5.0.0" + ansi-styles "^4.0.0" + react-is "^16.12.0" + prismjs@^1.17.1: version "1.20.0" resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.20.0.tgz#9b685fc480a3514ee7198eac6a3bf5024319ff03" @@ -11663,7 +12355,7 @@ request-promise-core@1.1.3: dependencies: lodash "^4.17.15" -request-promise-native@^1.0.8: +request-promise-native@^1.0.7, request-promise-native@^1.0.8: version "1.0.8" resolved "https://registry.yarnpkg.com/request-promise-native/-/request-promise-native-1.0.8.tgz#a455b960b826e44e2bf8999af64dff2bfe58cb36" integrity sha512-dapwLGqkHtwL5AEbfenuzjTYg35Jd6KPytsC2/TLkVMz8rm+tNt72MGUWT1RP/aYawMpN6HqbNGBQaRcBtjQMQ== @@ -11765,6 +12457,11 @@ resolve-url@^0.2.1: resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= +resolve@1.1.7: + version "1.1.7" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" + integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs= + resolve@^1.1.6, resolve@^1.10.0, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.15.0, resolve@^1.15.1, resolve@^1.17.0, resolve@^1.3.2, resolve@^1.5.0, resolve@^1.8.1: version "1.17.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" @@ -11963,6 +12660,13 @@ sax@^1.2.1, sax@^1.2.4, sax@~1.2.4: resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== +saxes@^3.1.9: + version "3.1.11" + resolved "https://registry.yarnpkg.com/saxes/-/saxes-3.1.11.tgz#d59d1fd332ec92ad98a2e0b2ee644702384b1c5b" + integrity sha512-Ydydq3zC+WYDJK1+gRxRapLIED9PWeSuuS41wqyoRmzvhhh9nc+QQrVMKJYzJFULazeGhzSV0QleN2wD3boh2g== + dependencies: + xmlchars "^2.1.1" + saxes@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/saxes/-/saxes-5.0.0.tgz#b7d30284d7583a5ca6ad0248b56d8889da53788b" @@ -12826,7 +13530,7 @@ symbol-observable@1.0.1: resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.1.tgz#8340fc4702c3122df5d22288f88283f513d3fdd4" integrity sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ= -symbol-tree@^3.2.4: +symbol-tree@^3.2.2, symbol-tree@^3.2.4: version "3.2.4" resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== @@ -13640,13 +14344,22 @@ vlq@^1.0.0: resolved "https://registry.yarnpkg.com/vlq/-/vlq-1.0.1.tgz#c003f6e7c0b4c1edd623fd6ee50bbc0d6a1de468" integrity sha512-gQpnTgkubC6hQgdIcRdYGDSDc+SaujOdyesZQMv6JlfQee/9Mp0Qhnys6WxDWvQnL5WZdT7o2Ul187aSt0Rq+w== -w3c-hr-time@^1.0.2: +w3c-hr-time@^1.0.1, w3c-hr-time@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz#0a89cdf5cc15822df9c360543676963e0cc308cd" integrity sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ== dependencies: browser-process-hrtime "^1.0.0" +w3c-xmlserializer@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/w3c-xmlserializer/-/w3c-xmlserializer-1.1.2.tgz#30485ca7d70a6fd052420a3d12fd90e6339ce794" + integrity sha512-p10l/ayESzrBMYWRID6xbuCKh2Fp77+sA0doRuGn4tTIMrrZVeqfpKjXHY+oDh3K4nLdPgNwMTVP6Vp4pvqbNg== + dependencies: + domexception "^1.0.1" + webidl-conversions "^4.0.2" + xml-name-validator "^3.0.0" + w3c-xmlserializer@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/w3c-xmlserializer/-/w3c-xmlserializer-2.0.0.tgz#3e7104a05b75146cc60f564380b7f683acf1020a" @@ -13711,7 +14424,7 @@ websocket-extensions@>=0.1.1: resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.3.tgz#5d2ff22977003ec687a4b87073dfbbac146ccf29" integrity sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg== -whatwg-encoding@^1.0.5: +whatwg-encoding@^1.0.1, whatwg-encoding@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz#5abacf777c32166a51d085d6b4f3e7d27113ddb0" integrity sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw== @@ -13728,7 +14441,7 @@ whatwg-fetch@>=0.10.0, whatwg-fetch@^3.0.0: resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-3.0.0.tgz#fc804e458cc460009b1a2b966bc8817d2578aefb" integrity sha512-9GSJUgz1D4MfyKU7KRqwOjXCXTqWdFNvEr7eUBYchQiVc744mqK/MzXPNR2WsPkmkOa4ywfg8C2n8h+13Bey1Q== -whatwg-mimetype@^2.3.0: +whatwg-mimetype@^2.2.0, whatwg-mimetype@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz#3d4b1e0312d2079879f826aff18dbeeca5960fbf" integrity sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g== @@ -13919,7 +14632,7 @@ ws@^1.1.0, ws@^1.1.5: options ">=0.0.5" ultron "1.0.x" -ws@^7, ws@^7.2.3: +ws@^7, ws@^7.0.0, ws@^7.2.3: version "7.2.5" resolved "https://registry.yarnpkg.com/ws/-/ws-7.2.5.tgz#abb1370d4626a5a9cd79d8de404aa18b3465d10d" integrity sha512-C34cIU4+DB2vMyAbmEKossWq2ZQDr6QEyuuCzWrM9zfw1sGc0mYiJ0UnG9zzNykt49C2Fi34hvr2vssFQRS6EA== @@ -13964,7 +14677,7 @@ xmlbuilder@^9.0.7: resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-9.0.7.tgz#132ee63d2ec5565c557e20f4c22df9aca686b10d" integrity sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0= -xmlchars@^2.2.0: +xmlchars@^2.1.1, xmlchars@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb" integrity sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw== From ea04be53b3b129a6c826100491427287d1e856ff Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Sat, 2 May 2020 14:51:08 +0200 Subject: [PATCH 050/106] chore: another try at fixing test-utils dependency --- package.json | 2 +- yarn.lock | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/package.json b/package.json index 167ce8961414..2ef156fc4462 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "@babel/preset-react": "^7.0.0", "@babel/preset-typescript": "^7.0.0", "@babel/register": "^7.0.0", - "@jest/test-utils": "*", + "@jest/test-utils": "^26.0.0-alpha.0", "@types/babel__core": "^7.0.0", "@types/babel__generator": "^7.0.0", "@types/babel__template": "^7.0.0", diff --git a/yarn.lock b/yarn.lock index 60ec64f23232..cc68e87a74a0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1333,11 +1333,6 @@ jest-runner "^25.5.4" jest-runtime "^25.5.4" -"@jest/test-utils@*": - version "0.0.0" - resolved "https://registry.yarnpkg.com/@jest/test-utils/-/test-utils-0.0.0.tgz#3c4c3cef69fdcaf3620147ea426a60c73ad48f0b" - integrity sha512-I7+1ZrMNkQylj9ULDwvytutSOpEs2RxOiY6dhZs//9zASoxSZUwC5vWE/l77Bq+4ffq2a/nGjqrLGBcoAmL9Qw== - "@jest/transform@^25.5.1": version "25.5.1" resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-25.5.1.tgz#0469ddc17699dd2bf985db55fa0fb9309f5c2db3" From cab5c395eec8671814cecc79a94c71e5d3a43c71 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Sat, 2 May 2020 16:16:59 +0200 Subject: [PATCH 051/106] chore: bump dated dependencies (#9951) --- package.json | 13 +- packages/jest-changed-files/package.json | 2 +- packages/jest-circus/package.json | 4 +- packages/jest-message-util/package.json | 2 +- .../__snapshots__/messages.test.ts.snap | 1 - packages/jest-reporters/package.json | 4 +- packages/jest-runtime/package.json | 2 +- packages/jest-runtime/src/index.ts | 2 +- packages/jest-snapshot/package.json | 8 +- packages/jest-validate/package.json | 2 +- .../jest-validate/src/validateCLIOptions.ts | 2 +- packages/jest-watcher/package.json | 2 +- packages/test-utils/package.json | 4 +- yarn.lock | 1171 ++++++++--------- 14 files changed, 584 insertions(+), 635 deletions(-) diff --git a/package.json b/package.json index 2ef156fc4462..18d96ca8fa16 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "babel-eslint": "^10.0.3", "babel-plugin-replace-ts-export-assignment": "^0.0.2", "babel-plugin-typescript-strip-namespaces": "^1.1.1", - "camelcase": "^5.0.0", + "camelcase": "^6.0.0", "chalk": "^4.0.0", "chokidar": "^3.3.0", "codecov": "^3.0.0", @@ -42,11 +42,11 @@ "eslint-plugin-markdown": "^1.0.0", "eslint-plugin-prettier": "^3.0.1", "eslint-plugin-react": "^7.1.0", - "execa": "^3.2.0", + "execa": "^4.0.0", "fast-check": "^1.13.0", "find-process": "^1.4.1", "glob": "^7.1.1", - "globby": "^10.0.2", + "globby": "^11.0.0", "graceful-fs": "^4.2.4", "isbinaryfile": "^4.0.0", "istanbul-lib-coverage": "^3.0.0", @@ -60,7 +60,6 @@ "lerna": "^3.20.2", "make-dir": "^3.0.0", "micromatch": "^4.0.2", - "mocha": "^7.0.0", "mock-fs": "^4.4.1", "opencollective": "^1.0.3", "prettier": "^2.0.1", @@ -69,11 +68,11 @@ "realpath-native": "^2.0.0", "resolve": "^1.15.0", "rimraf": "^3.0.0", - "semver": "^6.3.0", + "semver": "^7.3.2", "slash": "^3.0.0", - "string-length": "^3.1.0", + "string-length": "^4.0.1", "strip-ansi": "^6.0.0", - "tempy": "~0.3.0", + "tempy": "^0.5.0", "throat": "^5.0.0", "typescript": "^3.8.2", "which": "^2.0.1" diff --git a/packages/jest-changed-files/package.json b/packages/jest-changed-files/package.json index 227b968c3f13..c4bff7797d67 100644 --- a/packages/jest-changed-files/package.json +++ b/packages/jest-changed-files/package.json @@ -11,7 +11,7 @@ "types": "build/index.d.ts", "dependencies": { "@jest/types": "^26.0.0-alpha.0", - "execa": "^3.2.0", + "execa": "^4.0.0", "throat": "^5.0.0" }, "engines": { diff --git a/packages/jest-circus/package.json b/packages/jest-circus/package.json index d0496a218c2f..9bc84136a1fc 100644 --- a/packages/jest-circus/package.json +++ b/packages/jest-circus/package.json @@ -26,7 +26,7 @@ "jest-snapshot": "^26.0.0-alpha.0", "jest-util": "^26.0.0-alpha.0", "pretty-format": "^26.0.0-alpha.0", - "stack-utils": "^1.0.1", + "stack-utils": "^2.0.2", "throat": "^5.0.0" }, "devDependencies": { @@ -38,7 +38,7 @@ "@types/dedent": "^0.7.0", "@types/graceful-fs": "^4.1.3", "@types/stack-utils": "^1.0.1", - "execa": "^3.2.0", + "execa": "^4.0.0", "graceful-fs": "^4.2.4" }, "engines": { diff --git a/packages/jest-message-util/package.json b/packages/jest-message-util/package.json index 2b95361ad09f..36c2e6f86f40 100644 --- a/packages/jest-message-util/package.json +++ b/packages/jest-message-util/package.json @@ -20,7 +20,7 @@ "graceful-fs": "^4.2.4", "micromatch": "^4.0.2", "slash": "^3.0.0", - "stack-utils": "^1.0.1" + "stack-utils": "^2.0.2" }, "devDependencies": { "@types/babel__code-frame": "^7.0.0", diff --git a/packages/jest-message-util/src/__tests__/__snapshots__/messages.test.ts.snap b/packages/jest-message-util/src/__tests__/__snapshots__/messages.test.ts.snap index 99256df0436c..ccce82f85b46 100644 --- a/packages/jest-message-util/src/__tests__/__snapshots__/messages.test.ts.snap +++ b/packages/jest-message-util/src/__tests__/__snapshots__/messages.test.ts.snap @@ -31,7 +31,6 @@ exports[`formatStackTrace should strip node internals 1`] = ` \\"string\\" at Object.it (__tests__/test.js:8:14) - at internal/process/next_tick.js:188:7 " `; diff --git a/packages/jest-reporters/package.json b/packages/jest-reporters/package.json index 584ed3291e61..97119f652615 100644 --- a/packages/jest-reporters/package.json +++ b/packages/jest-reporters/package.json @@ -26,7 +26,7 @@ "jest-worker": "^26.0.0-alpha.0", "slash": "^3.0.0", "source-map": "^0.6.0", - "string-length": "^3.1.0", + "string-length": "^4.0.1", "terminal-link": "^2.0.0", "v8-to-istanbul": "^4.1.3" }, @@ -44,7 +44,7 @@ "strip-ansi": "^6.0.0" }, "optionalDependencies": { - "node-notifier": "^6.0.0" + "node-notifier": "^7.0.0" }, "engines": { "node": ">= 10.14.2" diff --git a/packages/jest-runtime/package.json b/packages/jest-runtime/package.json index 15664857cc1b..2891ea3efc65 100644 --- a/packages/jest-runtime/package.json +++ b/packages/jest-runtime/package.json @@ -42,7 +42,7 @@ "@types/exit": "^0.1.30", "@types/glob": "^7.1.1", "@types/graceful-fs": "^4.1.2", - "execa": "^3.2.0", + "execa": "^4.0.0", "jest-environment-node": "^26.0.0-alpha.0", "jest-snapshot-serializer-raw": "^1.1.0" }, diff --git a/packages/jest-runtime/src/index.ts b/packages/jest-runtime/src/index.ts index bfabc318e665..da46c8fc5dab 100644 --- a/packages/jest-runtime/src/index.ts +++ b/packages/jest-runtime/src/index.ts @@ -1314,7 +1314,7 @@ class Runtime { moduleRequire.cache = (() => { // TODO: consider warning somehow that this does nothing. We should support deletions, anyways const notPermittedMethod = () => true; - return new Proxy(Object.create(null), { + return new Proxy(Object.create(null), { defineProperty: notPermittedMethod, deleteProperty: notPermittedMethod, get: (_target, key) => diff --git a/packages/jest-snapshot/package.json b/packages/jest-snapshot/package.json index 34b97a2c2bbb..c58c02161ba6 100644 --- a/packages/jest-snapshot/package.json +++ b/packages/jest-snapshot/package.json @@ -12,7 +12,7 @@ "dependencies": { "@babel/types": "^7.0.0", "@jest/types": "^26.0.0-alpha.0", - "@types/prettier": "^1.19.0", + "@types/prettier": "^2.0.0", "chalk": "^4.0.0", "expect": "^26.0.0-alpha.0", "graceful-fs": "^4.2.4", @@ -24,17 +24,17 @@ "make-dir": "^3.0.0", "natural-compare": "^1.4.0", "pretty-format": "^26.0.0-alpha.0", - "semver": "^6.3.0" + "semver": "^7.3.2" }, "devDependencies": { "@babel/traverse": "^7.3.4", "@types/graceful-fs": "^4.1.3", "@types/natural-compare": "^1.4.0", - "@types/semver": "^6.0.1", + "@types/semver": "^7.1.0", "ansi-regex": "^5.0.0", "ansi-styles": "^4.2.0", "jest-haste-map": "^26.0.0-alpha.0", - "prettier": "^1.13.4" + "prettier": "^1.19.1" }, "engines": { "node": ">= 10.14.2" diff --git a/packages/jest-validate/package.json b/packages/jest-validate/package.json index 986a4a0e8bc1..bad5e1f76cd7 100644 --- a/packages/jest-validate/package.json +++ b/packages/jest-validate/package.json @@ -11,7 +11,7 @@ "types": "build/index.d.ts", "dependencies": { "@jest/types": "^26.0.0-alpha.0", - "camelcase": "^5.3.1", + "camelcase": "^6.0.0", "chalk": "^4.0.0", "jest-get-type": "^26.0.0-alpha.0", "leven": "^3.1.0", diff --git a/packages/jest-validate/src/validateCLIOptions.ts b/packages/jest-validate/src/validateCLIOptions.ts index d24c5debf80d..e3f34dfacc63 100644 --- a/packages/jest-validate/src/validateCLIOptions.ts +++ b/packages/jest-validate/src/validateCLIOptions.ts @@ -7,7 +7,7 @@ import type {Config} from '@jest/types'; import chalk = require('chalk'); -import camelcase from 'camelcase'; +import camelcase = require('camelcase'); import type {Options} from 'yargs'; import {ValidationError, createDidYouMeanMessage, format} from './utils'; import {deprecationWarning} from './deprecated'; diff --git a/packages/jest-watcher/package.json b/packages/jest-watcher/package.json index 7fc18cc779f3..098c6592ed58 100644 --- a/packages/jest-watcher/package.json +++ b/packages/jest-watcher/package.json @@ -10,7 +10,7 @@ "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", "jest-util": "^26.0.0-alpha.0", - "string-length": "^3.1.0" + "string-length": "^4.0.1" }, "devDependencies": { "@types/node": "*" diff --git a/packages/test-utils/package.json b/packages/test-utils/package.json index fd0f346f30fd..48c04a41af0a 100644 --- a/packages/test-utils/package.json +++ b/packages/test-utils/package.json @@ -8,10 +8,10 @@ "dependencies": { "@types/jest": "*", "@types/node": "*", - "@types/semver": "^6.2.1", + "@types/semver": "^7.1.0", "ansi-regex": "^5.0.0", "ansi-styles": "^4.1.0", - "semver": "^6.3.0" + "semver": "^7.3.2" }, "engines": { "node": ">= 10.14.2" diff --git a/yarn.lock b/yarn.lock index cc68e87a74a0..471aa0cdd4b6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3,34 +3,34 @@ "@angular/common@^9.0.0": - version "9.1.1" - resolved "https://registry.yarnpkg.com/@angular/common/-/common-9.1.1.tgz#29828cbb5e1f3f81cd6aa9468e9e1d4f02c1c7e8" - integrity sha512-bS13veMs7//YqYjYJ+JI78ylaCyVcdFKZKikd5SZa6+r6fajcyvLnSKqrKypG3O1BeJ8vOG/Pq54P5gWhbR6eA== + version "9.1.4" + resolved "https://registry.yarnpkg.com/@angular/common/-/common-9.1.4.tgz#23d7b42cd87aba634b78b8d73e12c6ebffe86043" + integrity sha512-JvCoCWVbx0tF7l/0WTi24ui/mc2SElyVSNchR4VK/FViARnkvnSBdI/Ef5QWXrsPyKU4PYBtnWWgyxRspH+FBA== "@angular/compiler@^9.0.0": - version "9.1.1" - resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-9.1.1.tgz#c2964849cc42d483ef2a5dd06d8e91d69a8ebe12" - integrity sha512-u1IP6IzUgK6lIzrG1cxp96umXgtThyhuFn/KPoyVt7wPxZ6vVR0ZxjM7zycEcrMGzk0nf0nyOKaksJk9sTXTbg== + version "9.1.4" + resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-9.1.4.tgz#fe833fc3b74768bdd56b1bdd0010870f38ffaedc" + integrity sha512-B+f3lviFNEJtL9V9exSKYPSz2Ddb6dxgPzQR7GSjGikDo+fKMtC1PjNwgJooS9gavhQx30uwkEEMIPYQbM6nNA== "@angular/core@^9.0.0": - version "9.1.1" - resolved "https://registry.yarnpkg.com/@angular/core/-/core-9.1.1.tgz#0a4bb3f81e4103d141556dd5c7272f05bc78cfaa" - integrity sha512-6lDlUlePafr/392hOvvTZZl6xPHT50U6658sHUAVIr0Un4mJ2MHNHKZtO45bpn3hM4gjFcYRQ7Rpd0umW74iTA== + version "9.1.4" + resolved "https://registry.yarnpkg.com/@angular/core/-/core-9.1.4.tgz#85f5322f42cf8add597fc6b02913e8fc3308c361" + integrity sha512-ND240vncmVD2KVe/KSQU3d/DxxoRipFg1+jFOFZGt0n0orCBHk/V1fu9iaG1sRyldL0+rCQ+fTI+1N4DTmMnxA== "@angular/forms@^9.0.0": - version "9.1.1" - resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-9.1.1.tgz#3090829dd2989207fd9a4dbc5b44b3ff9b2fe948" - integrity sha512-NX+LuK8JFisiq3uHCOK6YoN/yIb2R9Ye5mwiOPkuZA3lZLKCnUXqCHZbM8VHy/WdjIxxeUaFMJc38yV8RVoabg== + version "9.1.4" + resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-9.1.4.tgz#7cb75b5731bd6cbcf4a45b7b2cc68b3581de8cc1" + integrity sha512-Njt+pMLfPBchL0/ayIjJqXL6ZfM4Ccvf7KO1wS1HMzh3QlmfNa0JSgc4pfrbRJAMN9g7V/FYLyKejs1bJZkenA== "@angular/platform-browser-dynamic@^9.0.0": - version "9.1.1" - resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-9.1.1.tgz#aaaa31a8ddf6e810755644180703118c792b8ca0" - integrity sha512-kEox5UOwkRLjGKXLh5o5SYopoAylpKgrXtRrKRKTCMmZTpYSe1bLlXMjpwMAMZ9ZFSTvWp9iX94aT5bJDpLrRQ== + version "9.1.4" + resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-9.1.4.tgz#bf1cde9156bd29eeeef932b683b0c993614f75d5" + integrity sha512-YtVbnxyS6FU7xNpA6A95tmSfrB8+WC7OH3mbP8M9NaGk0OYz8B/JOe1HByP4JRpEGCvBtXdJ2NSW/MpLIT8SiQ== "@angular/platform-browser@^9.0.0": - version "9.1.1" - resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-9.1.1.tgz#bb5a98a3a33a307436684c4c7e2c448c786ae466" - integrity sha512-tjALKhdAWPErj0euIIdvx/31AHEZ7is7ADsMu+nYn2NY2gcPUuiqq3RCUJVxBYJ2Cclq1nlF0i2rEDKh7TrBKg== + version "9.1.4" + resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-9.1.4.tgz#c4fe868f12a6593702967a957a6bc8aa50c34f3b" + integrity sha512-mBCHfTl+5tQfaUiGlDujP7mFBzovFc54Zi2kcCE8DSdSSVQ2TPBo6hXa6y2cL3hJPFZzQ7mC4ORFrsGADhHn/w== "@babel/code-frame@7.5.5": version "7.5.5" @@ -46,28 +46,28 @@ dependencies: "@babel/highlight" "^7.8.3" -"@babel/compat-data@^7.8.6", "@babel/compat-data@^7.9.0": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.9.0.tgz#04815556fc90b0c174abd2c0c1bb966faa036a6c" - integrity sha512-zeFQrr+284Ekvd9e7KAX954LkapWiOmQtsfHirhxqfdlX6MEC32iRE+pqUGlYIBchdevaCwvzxWGSy/YBNI85g== +"@babel/compat-data@^7.9.6": + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.9.6.tgz#3f604c40e420131affe6f2c8052e9a275ae2049b" + integrity sha512-5QPTrNen2bm7RBc7dsOmcA5hbrS4O2Vhmk5XOL4zWW/zD/hV0iinpefDlkm+tBBy8kDtFaaeEvmAqt+nURAV2g== dependencies: - browserslist "^4.9.1" + browserslist "^4.11.1" invariant "^2.2.4" semver "^5.5.0" "@babel/core@*", "@babel/core@^7.0.0", "@babel/core@^7.1.0", "@babel/core@^7.3.4", "@babel/core@^7.7.4", "@babel/core@^7.7.5": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.9.0.tgz#ac977b538b77e132ff706f3b8a4dbad09c03c56e" - integrity sha512-kWc7L0fw1xwvI0zi8OKVBuxRVefwGOrKSQMvrQ3dW+bIIavBY3/NpXmpjMy7bQnLgwgzWQZ8TlM57YHpHNHz4w== + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.9.6.tgz#d9aa1f580abf3b2286ef40b6904d390904c63376" + integrity sha512-nD3deLvbsApbHAHttzIssYqgb883yU/d9roe4RZymBCDaZryMJDbptVpEpeQuRh4BJ+SYI8le9YGxKvFEvl1Wg== dependencies: "@babel/code-frame" "^7.8.3" - "@babel/generator" "^7.9.0" + "@babel/generator" "^7.9.6" "@babel/helper-module-transforms" "^7.9.0" - "@babel/helpers" "^7.9.0" - "@babel/parser" "^7.9.0" + "@babel/helpers" "^7.9.6" + "@babel/parser" "^7.9.6" "@babel/template" "^7.8.6" - "@babel/traverse" "^7.9.0" - "@babel/types" "^7.9.0" + "@babel/traverse" "^7.9.6" + "@babel/types" "^7.9.6" convert-source-map "^1.7.0" debug "^4.1.0" gensync "^1.0.0-beta.1" @@ -77,12 +77,12 @@ semver "^5.4.1" source-map "^0.5.0" -"@babel/generator@^7.5.0", "@babel/generator@^7.9.0", "@babel/generator@^7.9.5": - version "7.9.5" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.9.5.tgz#27f0917741acc41e6eaaced6d68f96c3fa9afaf9" - integrity sha512-GbNIxVB3ZJe3tLeDm1HSn2AhuD/mVcyLDpgtLXa5tplmWrJdF/elxB56XNqCuD6szyNkDi6wuoKXln3QeBmCHQ== +"@babel/generator@^7.5.0", "@babel/generator@^7.9.6": + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.9.6.tgz#5408c82ac5de98cda0d77d8124e99fa1f2170a43" + integrity sha512-+htwWKJbH2bL72HRluF8zumBxzuX0ZZUFl3JLNyoUjM/Ho8wnVpPXM6aUz8cfKDqQ/h7zHqKt4xzJteUosckqQ== dependencies: - "@babel/types" "^7.9.5" + "@babel/types" "^7.9.6" jsesc "^2.5.1" lodash "^4.17.13" source-map "^0.5.0" @@ -119,27 +119,27 @@ "@babel/helper-annotate-as-pure" "^7.8.3" "@babel/types" "^7.9.0" -"@babel/helper-compilation-targets@^7.8.7": - version "7.8.7" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.8.7.tgz#dac1eea159c0e4bd46e309b5a1b04a66b53c1dde" - integrity sha512-4mWm8DCK2LugIS+p1yArqvG1Pf162upsIsjE7cNBjez+NjliQpVhj20obE520nao0o14DaTnFJv+Fw5a0JpoUw== +"@babel/helper-compilation-targets@^7.9.6": + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.9.6.tgz#1e05b7ccc9d38d2f8b40b458b380a04dcfadd38a" + integrity sha512-x2Nvu0igO0ejXzx09B/1fGBxY9NXQlBW2kZsSxCJft+KHN8t9XWzIvFxtPHnBOAXpVsdxZKZFbRUC8TsNKajMw== dependencies: - "@babel/compat-data" "^7.8.6" - browserslist "^4.9.1" + "@babel/compat-data" "^7.9.6" + browserslist "^4.11.1" invariant "^2.2.4" levenary "^1.1.1" semver "^5.5.0" -"@babel/helper-create-class-features-plugin@^7.8.3": - version "7.9.5" - resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.9.5.tgz#79753d44017806b481017f24b02fd4113c7106ea" - integrity sha512-IipaxGaQmW4TfWoXdqjY0TzoXQ1HRS0kPpEgvjosb3u7Uedcq297xFqDQiCcQtRRwzIMif+N1MLVI8C5a4/PAA== +"@babel/helper-create-class-features-plugin@^7.8.3", "@babel/helper-create-class-features-plugin@^7.9.6": + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.9.6.tgz#965c8b0a9f051801fd9d3b372ca0ccf200a90897" + integrity sha512-6N9IeuyHvMBRyjNYOMJHrhwtu4WJMrYf8hVbEHD3pbbbmNOk1kmXSQs7bA4dYDUaIx4ZEzdnvo6NwC3WHd/Qow== dependencies: "@babel/helper-function-name" "^7.9.5" "@babel/helper-member-expression-to-functions" "^7.8.3" "@babel/helper-optimise-call-expression" "^7.8.3" "@babel/helper-plugin-utils" "^7.8.3" - "@babel/helper-replace-supers" "^7.8.6" + "@babel/helper-replace-supers" "^7.9.6" "@babel/helper-split-export-declaration" "^7.8.3" "@babel/helper-create-regexp-features-plugin@^7.8.3", "@babel/helper-create-regexp-features-plugin@^7.8.8": @@ -248,15 +248,15 @@ "@babel/traverse" "^7.8.3" "@babel/types" "^7.8.3" -"@babel/helper-replace-supers@^7.8.3", "@babel/helper-replace-supers@^7.8.6": - version "7.8.6" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.8.6.tgz#5ada744fd5ad73203bf1d67459a27dcba67effc8" - integrity sha512-PeMArdA4Sv/Wf4zXwBKPqVj7n9UF/xg6slNRtZW84FM7JpE1CbG8B612FyM4cxrf4fMAMGO0kR7voy1ForHHFA== +"@babel/helper-replace-supers@^7.8.3", "@babel/helper-replace-supers@^7.8.6", "@babel/helper-replace-supers@^7.9.6": + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.9.6.tgz#03149d7e6a5586ab6764996cd31d6981a17e1444" + integrity sha512-qX+chbxkbArLyCImk3bWV+jB5gTNU/rsze+JlcF6Nf8tVTigPJSI1o1oBow/9Resa1yehUO9lIipsmu9oG4RzA== dependencies: "@babel/helper-member-expression-to-functions" "^7.8.3" "@babel/helper-optimise-call-expression" "^7.8.3" - "@babel/traverse" "^7.8.6" - "@babel/types" "^7.8.6" + "@babel/traverse" "^7.9.6" + "@babel/types" "^7.9.6" "@babel/helper-simple-access@^7.8.3": version "7.8.3" @@ -288,14 +288,14 @@ "@babel/traverse" "^7.8.3" "@babel/types" "^7.8.3" -"@babel/helpers@^7.9.0": - version "7.9.2" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.9.2.tgz#b42a81a811f1e7313b88cba8adc66b3d9ae6c09f" - integrity sha512-JwLvzlXVPjO8eU9c/wF9/zOIN7X6h8DYf7mG4CiFRZRvZNKEF5dQ3H3V+ASkHoIB3mWhatgl5ONhyqHRI6MppA== +"@babel/helpers@^7.9.6": + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.9.6.tgz#092c774743471d0bb6c7de3ad465ab3d3486d580" + integrity sha512-tI4bUbldloLcHWoRUMAj4g1bF313M/o6fBKhIsb3QnGVPwRm9JsNf/gqMkQ7zjqReABiffPV6RWj7hEglID5Iw== dependencies: "@babel/template" "^7.8.3" - "@babel/traverse" "^7.9.0" - "@babel/types" "^7.9.0" + "@babel/traverse" "^7.9.6" + "@babel/types" "^7.9.6" "@babel/highlight@^7.0.0", "@babel/highlight@^7.8.3": version "7.9.0" @@ -306,10 +306,10 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.0.0", "@babel/parser@^7.1.0", "@babel/parser@^7.7.0", "@babel/parser@^7.7.5", "@babel/parser@^7.8.6", "@babel/parser@^7.9.0": - version "7.9.4" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.9.4.tgz#68a35e6b0319bbc014465be43828300113f2f2e8" - integrity sha512-bC49otXX6N0/VYhgOMh4gnP26E9xnDZK3TmbNpxYzzz9BQLBosQwfyOe9/cXUU3txYhTzLCbcqd5c8y/OmCjHA== +"@babel/parser@^7.0.0", "@babel/parser@^7.1.0", "@babel/parser@^7.7.0", "@babel/parser@^7.7.5", "@babel/parser@^7.8.6", "@babel/parser@^7.9.6": + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.9.6.tgz#3b1bbb30dabe600cd72db58720998376ff653bc7" + integrity sha512-AoeIEJn8vt+d/6+PXDRPaksYhnlbMIiejioBZvvMQsOjW/JYK6k/0dKnvvP3EhK5GfMBWDPtrxRtegWdAcdq9Q== "@babel/plugin-external-helpers@^7.0.0": version "7.8.3" @@ -384,10 +384,10 @@ "@babel/helper-plugin-utils" "^7.8.3" "@babel/plugin-syntax-numeric-separator" "^7.8.3" -"@babel/plugin-proposal-object-rest-spread@^7.0.0", "@babel/plugin-proposal-object-rest-spread@^7.7.4", "@babel/plugin-proposal-object-rest-spread@^7.9.5": - version "7.9.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.9.5.tgz#3fd65911306d8746014ec0d0cf78f0e39a149116" - integrity sha512-VP2oXvAf7KCYTthbUHwBlewbl1Iq059f6seJGsxMizaCdgHIeczOr7FBqELhSqfkIl04Fi8okzWzl63UKbQmmg== +"@babel/plugin-proposal-object-rest-spread@^7.0.0", "@babel/plugin-proposal-object-rest-spread@^7.7.4", "@babel/plugin-proposal-object-rest-spread@^7.9.6": + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.9.6.tgz#7a093586fcb18b08266eb1a7177da671ac575b63" + integrity sha512-Ga6/fhGqA9Hj+y6whNpPv8psyaK5xzrQwSPsGPloVkvmH+PqW1ixdnfJ9uIO06OjQNYol3PMnfmJ8vfZtkzF+A== dependencies: "@babel/helper-plugin-utils" "^7.8.3" "@babel/plugin-syntax-object-rest-spread" "^7.8.0" @@ -655,34 +655,34 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.3" -"@babel/plugin-transform-modules-amd@^7.9.0": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.9.0.tgz#19755ee721912cf5bb04c07d50280af3484efef4" - integrity sha512-vZgDDF003B14O8zJy0XXLnPH4sg+9X5hFBBGN1V+B2rgrB+J2xIypSN6Rk9imB2hSTHQi5OHLrFWsZab1GMk+Q== +"@babel/plugin-transform-modules-amd@^7.9.6": + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.9.6.tgz#8539ec42c153d12ea3836e0e3ac30d5aae7b258e" + integrity sha512-zoT0kgC3EixAyIAU+9vfaUVKTv9IxBDSabgHoUCBP6FqEJ+iNiN7ip7NBKcYqbfUDfuC2mFCbM7vbu4qJgOnDw== dependencies: "@babel/helper-module-transforms" "^7.9.0" "@babel/helper-plugin-utils" "^7.8.3" - babel-plugin-dynamic-import-node "^2.3.0" + babel-plugin-dynamic-import-node "^2.3.3" -"@babel/plugin-transform-modules-commonjs@^7.0.0", "@babel/plugin-transform-modules-commonjs@^7.1.0", "@babel/plugin-transform-modules-commonjs@^7.9.0": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.9.0.tgz#e3e72f4cbc9b4a260e30be0ea59bdf5a39748940" - integrity sha512-qzlCrLnKqio4SlgJ6FMMLBe4bySNis8DFn1VkGmOcxG9gqEyPIOzeQrA//u0HAKrWpJlpZbZMPB1n/OPa4+n8g== +"@babel/plugin-transform-modules-commonjs@^7.0.0", "@babel/plugin-transform-modules-commonjs@^7.1.0", "@babel/plugin-transform-modules-commonjs@^7.9.6": + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.9.6.tgz#64b7474a4279ee588cacd1906695ca721687c277" + integrity sha512-7H25fSlLcn+iYimmsNe3uK1at79IE6SKW9q0/QeEHTMC9MdOZ+4bA+T1VFB5fgOqBWoqlifXRzYD0JPdmIrgSQ== dependencies: "@babel/helper-module-transforms" "^7.9.0" "@babel/helper-plugin-utils" "^7.8.3" "@babel/helper-simple-access" "^7.8.3" - babel-plugin-dynamic-import-node "^2.3.0" + babel-plugin-dynamic-import-node "^2.3.3" -"@babel/plugin-transform-modules-systemjs@^7.9.0": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.9.0.tgz#e9fd46a296fc91e009b64e07ddaa86d6f0edeb90" - integrity sha512-FsiAv/nao/ud2ZWy4wFacoLOm5uxl0ExSQ7ErvP7jpoihLR6Cq90ilOFyX9UXct3rbtKsAiZ9kFt5XGfPe/5SQ== +"@babel/plugin-transform-modules-systemjs@^7.9.6": + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.9.6.tgz#207f1461c78a231d5337a92140e52422510d81a4" + integrity sha512-NW5XQuW3N2tTHim8e1b7qGy7s0kZ2OH3m5octc49K1SdAKGxYxeIx7hiIz05kS1R2R+hOWcsr1eYwcGhrdHsrg== dependencies: "@babel/helper-hoist-variables" "^7.8.3" "@babel/helper-module-transforms" "^7.9.0" "@babel/helper-plugin-utils" "^7.8.3" - babel-plugin-dynamic-import-node "^2.3.0" + babel-plugin-dynamic-import-node "^2.3.3" "@babel/plugin-transform-modules-umd@^7.9.0": version "7.9.0" @@ -793,9 +793,9 @@ "@babel/helper-plugin-utils" "^7.8.3" "@babel/plugin-transform-runtime@^7.0.0": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.9.0.tgz#45468c0ae74cc13204e1d3b1f4ce6ee83258af0b" - integrity sha512-pUu9VSf3kI1OqbWINQ7MaugnitRss1z533436waNXp+0N3ur3zfut37sXiQMxkuCF4VUjwZucen/quskCh7NHw== + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.9.6.tgz#3ba804438ad0d880a17bca5eaa0cdf1edeedb2fd" + integrity sha512-qcmiECD0mYOjOIt8YHNsAP1SxPooC/rDmfmiSK9BNY72EitdSc7l44WTEklaWuFtbOEBjNhWWyph/kOImbNJ4w== dependencies: "@babel/helper-module-imports" "^7.8.3" "@babel/helper-plugin-utils" "^7.8.3" @@ -847,11 +847,11 @@ "@babel/helper-plugin-utils" "^7.8.3" "@babel/plugin-transform-typescript@^7.5.0", "@babel/plugin-transform-typescript@^7.9.0": - version "7.9.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.9.4.tgz#4bb4dde4f10bbf2d787fce9707fb09b483e33359" - integrity sha512-yeWeUkKx2auDbSxRe8MusAG+n4m9BFY/v+lPjmQDgOFX5qnySkUY5oXzkp6FwPdsYqnKay6lorXYdC0n3bZO7w== + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.9.6.tgz#2248971416a506fc78278fc0c0ea3179224af1e9" + integrity sha512-8OvsRdvpt3Iesf2qsAn+YdlwAJD7zJ+vhFZmDCa4b8dTp7MmHtKk5FF2mCsGxjZwuwsy/yIIay/nLmxST1ctVQ== dependencies: - "@babel/helper-create-class-features-plugin" "^7.8.3" + "@babel/helper-create-class-features-plugin" "^7.9.6" "@babel/helper-plugin-utils" "^7.8.3" "@babel/plugin-syntax-typescript" "^7.8.3" @@ -872,12 +872,12 @@ regenerator-runtime "^0.13.4" "@babel/preset-env@*", "@babel/preset-env@^7.1.0", "@babel/preset-env@^7.7.4": - version "7.9.5" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.9.5.tgz#8ddc76039bc45b774b19e2fc548f6807d8a8919f" - integrity sha512-eWGYeADTlPJH+wq1F0wNfPbVS1w1wtmMJiYk55Td5Yu28AsdR9AsC97sZ0Qq8fHqQuslVSIYSGJMcblr345GfQ== + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.9.6.tgz#df063b276c6455ec6fcfc6e53aacc38da9b0aea6" + integrity sha512-0gQJ9RTzO0heXOhzftog+a/WyOuqMrAIugVYxMYf83gh1CQaQDjMtsOpqOwXyDL/5JcWsrCm8l4ju8QC97O7EQ== dependencies: - "@babel/compat-data" "^7.9.0" - "@babel/helper-compilation-targets" "^7.8.7" + "@babel/compat-data" "^7.9.6" + "@babel/helper-compilation-targets" "^7.9.6" "@babel/helper-module-imports" "^7.8.3" "@babel/helper-plugin-utils" "^7.8.3" "@babel/plugin-proposal-async-generator-functions" "^7.8.3" @@ -885,7 +885,7 @@ "@babel/plugin-proposal-json-strings" "^7.8.3" "@babel/plugin-proposal-nullish-coalescing-operator" "^7.8.3" "@babel/plugin-proposal-numeric-separator" "^7.8.3" - "@babel/plugin-proposal-object-rest-spread" "^7.9.5" + "@babel/plugin-proposal-object-rest-spread" "^7.9.6" "@babel/plugin-proposal-optional-catch-binding" "^7.8.3" "@babel/plugin-proposal-optional-chaining" "^7.9.0" "@babel/plugin-proposal-unicode-property-regex" "^7.8.3" @@ -912,9 +912,9 @@ "@babel/plugin-transform-function-name" "^7.8.3" "@babel/plugin-transform-literals" "^7.8.3" "@babel/plugin-transform-member-expression-literals" "^7.8.3" - "@babel/plugin-transform-modules-amd" "^7.9.0" - "@babel/plugin-transform-modules-commonjs" "^7.9.0" - "@babel/plugin-transform-modules-systemjs" "^7.9.0" + "@babel/plugin-transform-modules-amd" "^7.9.6" + "@babel/plugin-transform-modules-commonjs" "^7.9.6" + "@babel/plugin-transform-modules-systemjs" "^7.9.6" "@babel/plugin-transform-modules-umd" "^7.9.0" "@babel/plugin-transform-named-capturing-groups-regex" "^7.8.3" "@babel/plugin-transform-new-target" "^7.8.3" @@ -930,8 +930,8 @@ "@babel/plugin-transform-typeof-symbol" "^7.8.4" "@babel/plugin-transform-unicode-regex" "^7.8.3" "@babel/preset-modules" "^0.1.3" - "@babel/types" "^7.9.5" - browserslist "^4.9.1" + "@babel/types" "^7.9.6" + browserslist "^4.11.1" core-js-compat "^3.6.2" invariant "^2.2.2" levenary "^1.1.1" @@ -980,17 +980,17 @@ source-map-support "^0.5.16" "@babel/runtime-corejs3@^7.8.3": - version "7.9.2" - resolved "https://registry.yarnpkg.com/@babel/runtime-corejs3/-/runtime-corejs3-7.9.2.tgz#26fe4aa77e9f1ecef9b776559bbb8e84d34284b7" - integrity sha512-HHxmgxbIzOfFlZ+tdeRKtaxWOMUoCG5Mu3wKeUmOxjYrwb3AAHgnmtCUbPPK11/raIWLIBK250t8E2BPO0p7jA== + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/runtime-corejs3/-/runtime-corejs3-7.9.6.tgz#67aded13fffbbc2cb93247388cf84d77a4be9a71" + integrity sha512-6toWAfaALQjt3KMZQc6fABqZwUDDuWzz+cAfPhqyEnzxvdWOAkjwPNxgF8xlmo7OWLsSjaKjsskpKHRLaMArOA== dependencies: core-js-pure "^3.0.0" regenerator-runtime "^0.13.4" "@babel/runtime@^7.0.0", "@babel/runtime@^7.4.5", "@babel/runtime@^7.5.5", "@babel/runtime@^7.8.4": - version "7.9.2" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.9.2.tgz#d90df0583a3a252f09aaa619665367bae518db06" - integrity sha512-NE2DtOdufG7R5vnfQUTehdTfNycfUANEtCa9PssN9O/xmTzP4E08UI797ixaei6hBEVL9BI/PsdJS5x7mWoB9Q== + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.9.6.tgz#a9102eb5cadedf3f31d08a9ecf294af7827ea29f" + integrity sha512-64AF1xY3OAkFHqOb9s4jpgk1Mm5vDZ4L3acHvAml+53nO1XbXLuDodsVpO4OIUsmemlUHMxNdYMNJmsvOwLrvQ== dependencies: regenerator-runtime "^0.13.4" @@ -1003,25 +1003,25 @@ "@babel/parser" "^7.8.6" "@babel/types" "^7.8.6" -"@babel/traverse@^7.0.0", "@babel/traverse@^7.1.0", "@babel/traverse@^7.3.4", "@babel/traverse@^7.7.0", "@babel/traverse@^7.7.4", "@babel/traverse@^7.8.3", "@babel/traverse@^7.8.6", "@babel/traverse@^7.9.0": - version "7.9.5" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.9.5.tgz#6e7c56b44e2ac7011a948c21e283ddd9d9db97a2" - integrity sha512-c4gH3jsvSuGUezlP6rzSJ6jf8fYjLj3hsMZRx/nX0h+fmHN0w+ekubRrHPqnMec0meycA2nwCsJ7dC8IPem2FQ== +"@babel/traverse@^7.0.0", "@babel/traverse@^7.1.0", "@babel/traverse@^7.3.4", "@babel/traverse@^7.7.0", "@babel/traverse@^7.7.4", "@babel/traverse@^7.8.3", "@babel/traverse@^7.9.6": + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.9.6.tgz#5540d7577697bf619cc57b92aa0f1c231a94f442" + integrity sha512-b3rAHSjbxy6VEAvlxM8OV/0X4XrG72zoxme6q1MOoe2vd0bEc+TwayhuC1+Dfgqh1QEG+pj7atQqvUprHIccsg== dependencies: "@babel/code-frame" "^7.8.3" - "@babel/generator" "^7.9.5" + "@babel/generator" "^7.9.6" "@babel/helper-function-name" "^7.9.5" "@babel/helper-split-export-declaration" "^7.8.3" - "@babel/parser" "^7.9.0" - "@babel/types" "^7.9.5" + "@babel/parser" "^7.9.6" + "@babel/types" "^7.9.6" debug "^4.1.0" globals "^11.1.0" lodash "^4.17.13" -"@babel/types@^7.0.0", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4", "@babel/types@^7.7.0", "@babel/types@^7.7.4", "@babel/types@^7.8.3", "@babel/types@^7.8.6", "@babel/types@^7.9.0", "@babel/types@^7.9.5": - version "7.9.5" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.9.5.tgz#89231f82915a8a566a703b3b20133f73da6b9444" - integrity sha512-XjnvNqenk818r5zMaba+sLQjnbda31UfUURv3ei0qPQw4u+j2jMyJ5b11y8ZHYTRSI3NnInQkkkRT4fLqqPdHg== +"@babel/types@^7.0.0", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4", "@babel/types@^7.7.0", "@babel/types@^7.7.4", "@babel/types@^7.8.3", "@babel/types@^7.8.6", "@babel/types@^7.9.0", "@babel/types@^7.9.5", "@babel/types@^7.9.6": + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.9.6.tgz#2c5502b427251e9de1bd2dff95add646d95cc9f7" + integrity sha512-qxXzvBO//jO9ZnoasKF1uJzHd2+M6Q2ZPIVfnFps8JJvXy0ZBbwbNOmE6SGIY5XOY6d1Bo5lb9d9RJ8nv3WSeA== dependencies: "@babel/helper-validator-identifier" "^7.9.5" lodash "^4.17.13" @@ -2100,12 +2100,12 @@ dependencies: "@octokit/types" "^2.0.0" -"@octokit/endpoint@^6.0.0": - version "6.0.0" - resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-6.0.0.tgz#4c7acd79ab72df78732a7d63b09be53ec5a2230b" - integrity sha512-3nx+MEYoZeD0uJ+7F/gvELLvQJzLXhep2Az0bBSXagbApDvDW0LWwpnAIY/hb0Jwe17A0fJdz0O12dPh05cj7A== +"@octokit/endpoint@^6.0.1": + version "6.0.1" + resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-6.0.1.tgz#16d5c0e7a83e3a644d1ddbe8cded6c3d038d31d7" + integrity sha512-pOPHaSz57SFT/m3R5P8MUu4wLPszokn5pXcB/pzavLTQf2jbU+6iayTvzaY6/BiotuRS0qyEUkx3QglT4U958A== dependencies: - "@octokit/types" "^2.0.0" + "@octokit/types" "^2.11.1" is-plain-object "^3.0.0" universal-user-agent "^5.0.0" @@ -2153,13 +2153,13 @@ once "^1.4.0" "@octokit/request@^5.2.0": - version "5.3.4" - resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.3.4.tgz#fbc950bf785d59da3b0399fc6d042c8cf52e2905" - integrity sha512-qyj8G8BxQyXjt9Xu6NvfvOr1E0l35lsXtwm3SopsYg/JWXjlsnwqLc8rsD2OLguEL/JjLfBvrXr4az7z8Lch2A== + version "5.4.2" + resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.4.2.tgz#74f8e5bbd39dc738a1b127629791f8ad1b3193ee" + integrity sha512-zKdnGuQ2TQ2vFk9VU8awFT4+EYf92Z/v3OlzRaSh4RIP0H6cvW1BFPXq4XYvNez+TPQjqN+0uSkCYnMFFhcFrw== dependencies: - "@octokit/endpoint" "^6.0.0" + "@octokit/endpoint" "^6.0.1" "@octokit/request-error" "^2.0.0" - "@octokit/types" "^2.0.0" + "@octokit/types" "^2.11.1" deprecation "^2.0.0" is-plain-object "^3.0.0" node-fetch "^2.3.0" @@ -2188,26 +2188,26 @@ once "^1.4.0" universal-user-agent "^4.0.0" -"@octokit/types@^2.0.0", "@octokit/types@^2.0.1": - version "2.8.1" - resolved "https://registry.yarnpkg.com/@octokit/types/-/types-2.8.1.tgz#935ba46c3abb745e913b1110b87f1ca75f2a3792" - integrity sha512-1fzZcYTvPkrJsS9MX7oTMun447Q/tJo5XOtXQsKqmbTbwQV1f+R58pDmjDbzeFbQ7KzMJaDN7Sq4bCh/WHmgLg== +"@octokit/types@^2.0.0", "@octokit/types@^2.0.1", "@octokit/types@^2.11.1": + version "2.12.2" + resolved "https://registry.yarnpkg.com/@octokit/types/-/types-2.12.2.tgz#e9fbffa294adb54140946d436da9f73bc94b169c" + integrity sha512-1GHLI/Jll3j6F0GbYyZPFTcHZMGjAiRfkTEoRUyaVVk2IWbDdwEiClAJvXzfXCDayuGSNCqAUH8lpjZtqW9GDw== dependencies: "@types/node" ">= 8" -"@react-native-community/cli-debugger-ui@^4.7.0": - version "4.7.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-debugger-ui/-/cli-debugger-ui-4.7.0.tgz#4a8689f56b99378b24bbbf0ff6a89869d667f013" - integrity sha512-Z/xJ08Wz3J2fKDPrwxtQ44XSHnWsF6dnT0H2AANw63bWjnrR0E3sh8Nk8/oO+j9R7LH8S0+NHJdlniXYtL/bNg== +"@react-native-community/cli-debugger-ui@^4.8.0": + version "4.8.0" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-debugger-ui/-/cli-debugger-ui-4.8.0.tgz#9a6419b29be69422e0056bbb1874775750351d22" + integrity sha512-Eq9lHINDXiBAwmFRCMN8jeKk6FTDnTxAfITkjPUNNTj7q3K+fH/oyOMJjxbIZbryIJY6g+g/ln6vsS2WzISNYQ== dependencies: serve-static "^1.13.1" "@react-native-community/cli-platform-android@^4.2.0": - version "4.7.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-android/-/cli-platform-android-4.7.0.tgz#aace6b8004b8d3aae40d6affaad1c472e0310a25" - integrity sha512-Lb6D0ipmFwYLJeQy5/NI4uJpeSHw85rd84C40wwpoUfsCgZhA93WUJdFkuQEIDkfTqs5Yqgl+/szhIZdnIXPxw== + version "4.8.0" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-android/-/cli-platform-android-4.8.0.tgz#f495b227e82c75c676dfa53c0dac33bf438b50b8" + integrity sha512-sYa4K0t0VL99j+bloHTL2BwXFJpHCdPN4SRTm9/wfxuWDkiPFvo9TaX0adh7GbUoKalLq2k0z+iEpHMN3HtZiw== dependencies: - "@react-native-community/cli-tools" "^4.7.0" + "@react-native-community/cli-tools" "^4.8.0" chalk "^3.0.0" execa "^1.0.0" fs-extra "^8.1.0" @@ -2219,11 +2219,11 @@ xmldoc "^1.1.2" "@react-native-community/cli-platform-ios@^4.2.0": - version "4.7.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-ios/-/cli-platform-ios-4.7.0.tgz#471dcdbd2645c5650f16c0eddcca50e47ca78398" - integrity sha512-XqnxP6H6+PG/wn4+Pwas5jaTSr5n7x6v8trkPY8iO37b8sq7tJLNYznaBMROF43i0NqO48JdhquYOqnDN8FdBA== + version "4.8.0" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-ios/-/cli-platform-ios-4.8.0.tgz#bfa20f398837256ee943192930d1f94fa92f521d" + integrity sha512-UZyc/bwG23HKsvHVmDrlZulIRMK8Jl7njN9oCO0pohOYxRJIwueRP7A8IPCwVVohmSEuNmhCWpMIIxTAo7zzwg== dependencies: - "@react-native-community/cli-tools" "^4.7.0" + "@react-native-community/cli-tools" "^4.8.0" chalk "^3.0.0" glob "^7.1.3" js-yaml "^3.13.1" @@ -2231,30 +2231,32 @@ plist "^3.0.1" xcode "^2.0.0" -"@react-native-community/cli-tools@^4.7.0": - version "4.7.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-tools/-/cli-tools-4.7.0.tgz#83d49277e7f56fef87bdfd0ba55d2cfa20190689" - integrity sha512-llNWJEWXhGMsaHLWoieraPeWuva3kRsIEPi8oRVTybyz82JjR71mN0OFs41o1OnAR6+TR9d5cJPN+mIOESugEA== +"@react-native-community/cli-tools@^4.8.0": + version "4.8.0" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-tools/-/cli-tools-4.8.0.tgz#144a029c741c2cf40a7f9c059819ce9a69e7f1e3" + integrity sha512-voXGruhYyyhCbEYM2uZ54dMZcBgXFFcQxVK3nLwJDG9nSQGObZInj9Zf76ix5qGnvKKGWIGUcbmRhyLpAzTXuQ== dependencies: chalk "^3.0.0" lodash "^4.17.15" mime "^2.4.1" node-fetch "^2.6.0" + open "^6.2.0" + shell-quote "1.6.1" -"@react-native-community/cli-types@^4.7.0": - version "4.7.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-types/-/cli-types-4.7.0.tgz#871905753f8ff83cf10c48e8df3fdd63cd7667a0" - integrity sha512-Pw05Rsh/ENFs/Utv1SVRFfdMAn+W9yy1AOhyIKB36JX0Xw00sIZQDyZVsVfmaLSOpRpJ/qUdKWXB/WYV4XYELw== +"@react-native-community/cli-types@^4.8.0": + version "4.8.0" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-types/-/cli-types-4.8.0.tgz#d929f0d47ecdc69027de02a89d17f0ece9ee3ca2" + integrity sha512-gkjQdmzskQJdddVNRBATa7rWMbamD2j4B7w9shbg20tIBYoh/tgHdkgiLqZQSfBKa8HqrAkeCJTYaT1oV4oReQ== "@react-native-community/cli@^4.2.0": - version "4.7.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli/-/cli-4.7.0.tgz#be692631356d14fd1ffe23f25b479dca9e8e7c95" - integrity sha512-DbpxcPC7lFCJ112dPXL4DBKh5TfH0QK2OTG7uEGjfsApT4c01Lae6OMTNSssXgXTcNJApqIT5a6GXK2vSE0CEQ== + version "4.8.0" + resolved "https://registry.yarnpkg.com/@react-native-community/cli/-/cli-4.8.0.tgz#b9e3916ceb0fe6bcbc2943fea2caa0ca3739d080" + integrity sha512-z4qHfxtoTxKhQ0V9B02a82IxBkEBH5FfKnaJn9WL5Tf4SmE91ER8ZNVEWNr97S4TCFVYDrpM7iKnrYpNi/ciYQ== dependencies: "@hapi/joi" "^15.0.3" - "@react-native-community/cli-debugger-ui" "^4.7.0" - "@react-native-community/cli-tools" "^4.7.0" - "@react-native-community/cli-types" "^4.7.0" + "@react-native-community/cli-debugger-ui" "^4.8.0" + "@react-native-community/cli-tools" "^4.8.0" + "@react-native-community/cli-types" "^4.8.0" chalk "^3.0.0" command-exists "^1.2.8" commander "^2.19.0" @@ -2328,9 +2330,9 @@ "@types/react-dom" "^16.8.5" "@tootallnate/once@1": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.0.0.tgz#9c13c2574c92d4503b005feca8f2e16cc1611506" - integrity sha512-KYyTT/T6ALPkIRd2Ge080X/BsXvy9O0hcWTtMWkPvwAwF99+vn6Dv4GzrFT/Nn1LePr+FFDbRXXlqmsy9lw2zA== + version "1.1.2" + resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82" + integrity sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw== "@types/anymatch@^1.3.1": version "1.3.1" @@ -2374,9 +2376,9 @@ "@babel/types" "^7.0.0" "@types/babel__traverse@*", "@types/babel__traverse@^7.0.4", "@types/babel__traverse@^7.0.6": - version "7.0.10" - resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.0.10.tgz#d9a99f017317d9b3d1abc2ced45d3bca68df0daf" - integrity sha512-74fNdUGrWsgIB/V9kTO5FGHPWYY6Eqn+3Z7L6Hc4e/BxjYV7puvBqp5HwsVYYfLm6iURYBNCx4Ut37OF9yitCw== + version "7.0.11" + resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.0.11.tgz#1ae3010e8bf8851d324878b42acec71986486d18" + integrity sha512-ddHK5icION5U6q11+tV2f9Mo6CZVuT8GJKld2q9LqHSZbvLbH34Kcu2yFGckZut453+eQU6btIA3RihmnRgI+Q== dependencies: "@babel/types" "^7.3.0" @@ -2386,9 +2388,9 @@ integrity sha512-TbH79tcyi9FHwbyboOKeRachRq63mSuWYXOflsNO9ZyE5ClQ/JaozNKl+aWUq87qPNsXasXxi2AbgfwIJ+8GQw== "@types/cheerio@^0.22.8": - version "0.22.17" - resolved "https://registry.yarnpkg.com/@types/cheerio/-/cheerio-0.22.17.tgz#e54f71c3135f71ebc16c8dc62edad533872c9e72" - integrity sha512-izlm+hbqWN9csuB9GSMfCnAyd3/57XZi3rfz1B0C4QBGVMp+9xQ7+9KYnep+ySfUrCWql4lGzkLf0XmprXcz9g== + version "0.22.18" + resolved "https://registry.yarnpkg.com/@types/cheerio/-/cheerio-0.22.18.tgz#19018dceae691509901e339d63edf1e935978fe6" + integrity sha512-Fq7R3fINAPSdUEhOyjG4iVxgHrOnqDJbY0/BUuiN0pvD/rfmZWekVZnv+vcs8TtpA2XF50uv50LaE4EnpEL/Hw== dependencies: "@types/node" "*" @@ -2424,13 +2426,6 @@ resolved "https://registry.yarnpkg.com/@types/debug/-/debug-4.1.5.tgz#b14efa8852b7768d898906613c23f688713e02cd" integrity sha512-Q1y515GcOdTHgagaVFhHnIFQ38ygs/kmxdNpvpou+raI9UO3YZcHDngBSYKQklcKlvA7iuQlmIKbzvmxcOE9CQ== -"@types/decompress@^4.2.3": - version "4.2.3" - resolved "https://registry.yarnpkg.com/@types/decompress/-/decompress-4.2.3.tgz#98eed48af80001038aa05690b2094915f296fe65" - integrity sha512-W24e3Ycz1UZPgr1ZEDHlK4XnvOr+CpJH3qNsFeqXwwlW/9END9gxn3oJSsp7gYdiQxrXUHwUUd3xuzVz37MrZQ== - dependencies: - "@types/node" "*" - "@types/dedent@0.7.0", "@types/dedent@^0.7.0": version "0.7.0" resolved "https://registry.yarnpkg.com/@types/dedent/-/dedent-0.7.0.tgz#155f339ca404e6dd90b9ce46a3f78fd69ca9b050" @@ -2465,12 +2460,12 @@ dependencies: "@types/events" "*" -"@types/find-cache-dir@^2.0.0": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@types/find-cache-dir/-/find-cache-dir-2.0.1.tgz#7d44d34f6fcde70989517cb4f66042a9bf83f5e3" - integrity sha512-L+8XrNQEa8EL8C9rwWxbC2R+K7tWVg+Ib5zTp0GmFajjUvTBGDqaY0WAdDBGSXdO0eEG3O0FCjdIHNfjyluF1Q== +"@types/find-cache-dir@^3.2.0": + version "3.2.0" + resolved "https://registry.yarnpkg.com/@types/find-cache-dir/-/find-cache-dir-3.2.0.tgz#eaaf331699dccf52c47926e4d4f8f3ed8db33f3c" + integrity sha512-+JeT9qb2Jwzw72WdjU+TSvD5O1QRPWCeRpDJV+guiIq+2hwR0DFGw+nZNbTFjMIVe6Bf4GgAKeB/6Ytx6+MbeQ== -"@types/find-package-json@^1.1.0": +"@types/find-package-json@^1.1.1": version "1.1.1" resolved "https://registry.yarnpkg.com/@types/find-package-json/-/find-package-json-1.1.1.tgz#c0d296ac74fe3309ed0fe75a9c3edb42a776d30c" integrity sha512-XMCocYkg6VUpkbOQMKa3M5cgc3MvU/LJKQwd3VUJrWZbLr2ARUggupsCAF8DxjEEIuSO6HlnH+vl+XV4bgVeEQ== @@ -2529,9 +2524,9 @@ "@types/istanbul-lib-coverage" "*" "@types/istanbul-lib-source-maps@^4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@types/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.0.tgz#d67b612f453baf7abda33a9baf1cb072189ad909" - integrity sha512-pwtxTGrYUe4T/J990fuUk49oJ/MEa2vyugpCnX4n//Owak1lK2vusySEKtolJevFpDuO761Ja+e6PZbxczfn7A== + version "4.0.1" + resolved "https://registry.yarnpkg.com/@types/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz#8acb1f6230bf9d732e9fc30590e5ccaabbefec7b" + integrity sha512-WH6e5naLXI3vB2Px3whNeYxzDgm6S6sk3Ht8e3/BiWwEnzZi72wja3bWzWwcgbFTFp8hBLB7NT2p3lNJgxCxvA== dependencies: "@types/istanbul-lib-coverage" "*" source-map "^0.6.1" @@ -2573,7 +2568,7 @@ resolved "https://registry.yarnpkg.com/@types/lolex/-/lolex-5.1.0.tgz#11b4c4756c007306d0feeaf2f08f88350c635d2b" integrity sha512-hCQ2dOEQUw1LwofdIpMMGGqENd5p5ANzvcTe1nXTjcQL84r7tcLXFJlBgi0Ggz0f7BLmE2epf0C5Q07iq2gV0g== -"@types/md5-file@^4.0.0": +"@types/md5-file@^4.0.1": version "4.0.1" resolved "https://registry.yarnpkg.com/@types/md5-file/-/md5-file-4.0.1.tgz#5e6cfb7949dc375049b8f6fd8f91adacfc176c63" integrity sha512-uK6vlo/LJp6iNWinpSzZwMe8Auzs0UYxesm7OGfQS3oz6PJciHtrKcqVOGk4wjYKawrl234vwNWvHyXH1ZzRyQ== @@ -2597,10 +2592,10 @@ 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== +"@types/mkdirp@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@types/mkdirp/-/mkdirp-1.0.0.tgz#16ce0eabe4a9a3afe64557ad0ee6886ec3d32927" + integrity sha512-ONFY9//bCEr3DWKON3iDv/Q8LXnhaYYaNDeFSN0AtO5o4sLf9F0pstJKKKjQhXE0kJEeHs8eR6SAsROhhc2Csw== dependencies: "@types/node" "*" @@ -2617,9 +2612,9 @@ "@types/node" "*" "@types/node@*", "@types/node@>= 8": - version "13.11.1" - resolved "https://registry.yarnpkg.com/@types/node/-/node-13.11.1.tgz#49a2a83df9d26daacead30d0ccc8762b128d53c7" - integrity sha512-eWQGP3qtxwL8FGneRrC5DwrJLGN4/dH1clNTuLfN81HCrxVtxRjygDTUoZJ5ASlDEeo0ppYFQjQIlXhtXpOn6g== + version "13.13.4" + resolved "https://registry.yarnpkg.com/@types/node/-/node-13.13.4.tgz#1581d6c16e3d4803eb079c87d4ac893ee7501c2c" + integrity sha512-x26ur3dSXgv5AwKS0lNfbjpCakGIduWU1DU91Zz58ONRWrIKGunmZBNv4P7N+e27sJkiGDsw/3fT4AtsqQBrBA== "@types/normalize-package-data@^2.4.0": version "2.4.0" @@ -2636,10 +2631,15 @@ resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-1.19.1.tgz#33509849f8e679e4add158959fdb086440e9553f" integrity sha512-5qOlnZscTn4xxM5MeGXAMOsIOIKIbh9e85zJWfBRVPlRMEVawzoPhINYbRGkBZCI8LxvBe7tJCdWiarA99OZfQ== +"@types/prettier@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.0.0.tgz#dc85454b953178cc6043df5208b9e949b54a3bc4" + integrity sha512-/rM+sWiuOZ5dvuVzV37sUuklsbg+JPOP8d+nNFlo2ZtfpzPiPvh1/gc8liWOLBqe+sR+ZM7guPaIcTt6UZTo7Q== + "@types/prompts@^2.0.1": - version "2.0.5" - resolved "https://registry.yarnpkg.com/@types/prompts/-/prompts-2.0.5.tgz#b3cb5cd2c69a0da11b21ea6618bffdab6091336c" - integrity sha512-07dV9H+uEmGjtudYst7UlRnctQfd/22zJ2/k1ykZR4Kx/n42hC314v1NCxvaesZebvJJ8i5AVMtBaMbSIR3oBw== + version "2.0.6" + resolved "https://registry.yarnpkg.com/@types/prompts/-/prompts-2.0.6.tgz#269331ab7236ae811745f6c729b991b24511864e" + integrity sha512-CLphLAE33GBC1dX4+rKr/kcS778zBHjLkagC//Kh4gI9McfyGscUMowltN5LLCRuj28PGLZCdVaZNpIMQYH7og== "@types/prop-types@*": version "15.7.3" @@ -2652,9 +2652,9 @@ integrity sha512-ce5d3q03Ex0sy4R14722Rmt6MT07Ua+k4FwDfdcToYJcMKNtRVQvJ6JCAPdAmAnbRb6CsX6aYb9m96NGod9uTw== "@types/react-dom@^16.8.5": - version "16.9.6" - resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-16.9.6.tgz#9e7f83d90566521cc2083be2277c6712dcaf754c" - integrity sha512-S6ihtlPMDotrlCJE9ST1fRmYrQNNwfgL61UB4I1W7M6kPulUKx9fXAleW5zpdIjUQ4fTaaog8uERezjsGUj9HQ== + version "16.9.7" + resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-16.9.7.tgz#60844d48ce252d7b2dccf0c7bb937130e27c0cd2" + integrity sha512-GHTYhM8/OwUCf254WO5xqR/aqD3gC9kSTLpopWGpQLpnw23jk44RvMHsyUSEplvRJZdHxhJGMMLF0kCPYHPhQA== dependencies: "@types/react" "*" @@ -2702,10 +2702,12 @@ dependencies: "@types/node" "*" -"@types/semver@^6.0.1", "@types/semver@^6.2.1": - version "6.2.1" - resolved "https://registry.yarnpkg.com/@types/semver/-/semver-6.2.1.tgz#a236185670a7860f1597cf73bea2e16d001461ba" - integrity sha512-+beqKQOh9PYxuHvijhVl+tIHvT6tuwOrE9m14zd+MT2A38KoKZhh7pYJ0SNleLtwDsiIxHDsIk9bv01oOxvSvA== +"@types/semver@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.1.0.tgz#c8c630d4c18cd326beff77404887596f96408408" + integrity sha512-pOKLaubrAEMUItGNpgwl0HMFPrSAFic8oSVIvfu1UwcgGNmNyK9gyhBHKmBnUTwwVvpZfkzUC0GaMgnL6P86uA== + dependencies: + "@types/node" "*" "@types/source-map-support@^0.5.0": version "0.5.1" @@ -2734,12 +2736,10 @@ resolved "https://registry.yarnpkg.com/@types/tough-cookie/-/tough-cookie-4.0.0.tgz#fef1904e4668b6e5ecee60c52cc6a078ffa6697d" integrity sha512-I99sngh224D0M7XgW1s120zxCt3VYQ3IQsuw3P3jbq5GG4yc79+ZjyKznyOGIQrflfylLgcfekeZW/vk0yng6A== -"@types/uuid@3.4.6": - version "3.4.6" - resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-3.4.6.tgz#d2c4c48eb85a757bf2927f75f939942d521e3016" - integrity sha512-cCdlC/1kGEZdEglzOieLDYBxHsvEOIg7kp/2FYyVR9Pxakq+Qf/inL3RKQ+PA8gOlI/NnL+fXmQH12nwcGzsHw== - dependencies: - "@types/node" "*" +"@types/uuid@7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-7.0.0.tgz#9f6993ccc8210efa90bda7e1afabbb06a9f860cd" + integrity sha512-RiX1I0lK9WFLFqy2xOxke396f0wKIzk5sAll0tL4J4XDYJXURI7JOs96XQb3nP+2gEpQ/LutBb66jgiT5oQshQ== "@types/weak-napi@^1.0.0": version "1.0.0" @@ -2965,9 +2965,9 @@ airbnb-prop-types@^2.15.0: react-is "^16.9.0" ajv@^6.10.0, ajv@^6.10.2, ajv@^6.5.5: - version "6.12.0" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.0.tgz#06d60b96d87b8454a5adaba86e7854da629db4b7" - integrity sha512-D6gFiFA0RRLyUbvijN74DWAjXSFxWKaWP7mldxkVhyhAV3+SWA9HEJPHQ2c9soIeTFJqcSdFDGFgdqs1iUU2Hw== + version "6.12.2" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.2.tgz#c629c5eced17baf314437918d2da88c99d5958cd" + integrity sha512-k+V+hzjm5q/Mr8ef/1Y9goCmlsK4I6Sm74teeyGvFk1XrOsbsKLjEdrvny42CZ+a8sXbk8KWpY/bDwS+FLL2UQ== dependencies: fast-deep-equal "^3.1.1" fast-json-stable-stringify "^2.0.0" @@ -2984,11 +2984,6 @@ anser@^1.4.9: resolved "https://registry.yarnpkg.com/anser/-/anser-1.4.9.tgz#1f85423a5dcf8da4631a341665ff675b96845760" integrity sha512-AI+BjTeGt2+WFk4eWcqbQ7snZpDBt8SaLlj0RT2h5xfdWaiy51OjYvqwMrNzJLGy8iOAL6nKDITWO+rd4MkYEA== -ansi-colors@3.2.3: - version "3.2.3" - resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.3.tgz#57d35b8686e851e2cc04c403f1c00203976a1813" - integrity sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw== - ansi-colors@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-1.1.0.tgz#6374b4dd5d4718ff3ce27a671a3b1cad077132a9" @@ -3425,10 +3420,10 @@ babel-jest@*, babel-jest@^25.5.1: graceful-fs "^4.2.4" slash "^3.0.0" -babel-plugin-dynamic-import-node@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.0.tgz#f00f507bdaa3c3e3ff6e7e5e98d90a7acab96f7f" - integrity sha512-o6qFkpeQEBxcqt0XYlWzAVxNCSCZdUgcR8IRlhD/8DylxjjO4foPcvTW0GGKa/cVt3rvxZ7o5ippJ+/0nvLhlQ== +babel-plugin-dynamic-import-node@^2.3.3: + version "2.3.3" + resolved "https://registry.yarnpkg.com/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz#84fda19c976ec5c6defef57f9427b3def66e17a3" + integrity sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ== dependencies: object.assign "^4.1.0" @@ -3692,6 +3687,15 @@ bl@^2.2.0: readable-stream "^2.3.5" safe-buffer "^5.1.1" +bl@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/bl/-/bl-4.0.2.tgz#52b71e9088515d0606d9dd9cc7aa48dc1f98e73a" + integrity sha512-j4OH8f6Qg2bGuWfRiltT2HYGx0e1QcBTrK9KAHNMwMZdQnDZFk0ZSYIpADjYCB3U12nicC5tVJwSIhwOWjb4RQ== + dependencies: + buffer "^5.5.0" + inherits "^2.0.4" + readable-stream "^3.4.0" + bluebird@^3.5.1, bluebird@^3.5.3, bluebird@^3.5.5: version "3.7.2" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" @@ -3785,11 +3789,6 @@ browser-resolve@^1.11.3: dependencies: resolve "1.1.7" -browser-stdout@1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" - integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== - browserslist@4.7.0: version "4.7.0" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.7.0.tgz#9ee89225ffc07db03409f2fee524dc8227458a17" @@ -3799,13 +3798,13 @@ browserslist@4.7.0: electron-to-chromium "^1.3.247" node-releases "^1.1.29" -browserslist@^4.0.0, browserslist@^4.11.1, browserslist@^4.8.5, browserslist@^4.9.1: - version "4.11.1" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.11.1.tgz#92f855ee88d6e050e7e7311d987992014f1a1f1b" - integrity sha512-DCTr3kDrKEYNw6Jb9HFxVLQNaue8z+0ZfRBRjmCunKDEXEBajKDj2Y+Uelg+Pi29OnvaSGwjOsnRyNEkXzHg5g== +browserslist@^4.0.0, browserslist@^4.11.1, browserslist@^4.8.5: + version "4.12.0" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.12.0.tgz#06c6d5715a1ede6c51fc39ff67fd647f740b656d" + integrity sha512-UH2GkcEDSI0k/lRkuDSzFl9ZZ87skSy9w2XAn1MsZnL+4c4rqbBd3e82UWHbYDpztABrPBhZsTEeuxVfHppqDg== dependencies: - caniuse-lite "^1.0.30001038" - electron-to-chromium "^1.3.390" + caniuse-lite "^1.0.30001043" + electron-to-chromium "^1.3.413" node-releases "^1.1.53" pkg-up "^2.0.0" @@ -3816,7 +3815,7 @@ bser@2.1.1: dependencies: node-int64 "^0.4.0" -bson@^1.1.1: +bson@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/bson/-/bson-1.1.4.tgz#f76870d799f15b854dffb7ee32f0a874797f7e89" integrity sha512-S/yKGU1syOMzO86+dGpg2qGoDL0zvzcb262G+gqEy6TgP6rt6z6qxSFX/8X6vLC91P7G7C3nLs0+bvDzmvBA3Q== @@ -3854,10 +3853,10 @@ buffer-from@^1.0.0: resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== -buffer@^5.2.1: - version "5.5.0" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.5.0.tgz#9c3caa3d623c33dd1c7ef584b89b88bf9c9bc1ce" - integrity sha512-9FTEDjLjwoAkEwyMGDjYJQN2gfRgOKBKRfiglhvibGbpeeU/pQn1bJxQqm32OD/AIeEuHxU9roxXxg34Byp/Ww== +buffer@^5.2.1, buffer@^5.5.0: + version "5.6.0" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.6.0.tgz#a31749dc7d81d84db08abf937b6b8c4033f62786" + integrity sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw== dependencies: base64-js "^1.0.2" ieee754 "^1.1.4" @@ -4002,6 +4001,11 @@ camelcase@^5.0.0, camelcase@^5.3.1: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== +camelcase@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.0.0.tgz#5259f7c30e35e278f1bdc2a4d91230b37cad981e" + integrity sha512-8KMDF1Vz2gzOq54ONPJS65IvTUaB1cHJ2DMM7MbPmLZljDH1qpzzLsWdiN9pHh6qvkRVDTi/07+eNGch/oLU4w== + caniuse-api@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/caniuse-api/-/caniuse-api-3.0.0.tgz#5e4d90e2274961d46291997df599e3ed008ee4c0" @@ -4012,10 +4016,10 @@ caniuse-api@^3.0.0: lodash.memoize "^4.1.2" lodash.uniq "^4.5.0" -caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000989, caniuse-lite@^1.0.30001038, caniuse-lite@^1.0.30001039: - version "1.0.30001040" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001040.tgz#103fc8e6eb1d7397e95134cd0e996743353d58ea" - integrity sha512-Ep0tEPeI5wCvmJNrXjE3etgfI+lkl1fTDU6Y3ZH1mhrjkPlVI9W4pcKbMo+BQLpEWKVYYp2EmYaRsqpPC3k7lQ== +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000989, caniuse-lite@^1.0.30001039, caniuse-lite@^1.0.30001043: + version "1.0.30001048" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001048.tgz#4bb4f1bc2eb304e5e1154da80b93dee3f1cf447e" + integrity sha512-g1iSHKVxornw0K8LG9LLdf+Fxnv7T1Z+mMsf0/YYLclQX4Cd522Ap0Lrw6NFqHgezit78dtyWxzlV2Xfc7vgRg== capture-exit@^2.0.0: version "2.0.0" @@ -4075,6 +4079,11 @@ chalk@^4.0.0: ansi-styles "^4.1.0" supports-color "^7.1.0" +char-regex@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf" + integrity sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw== + character-entities-legacy@^1.0.0: version "1.1.4" resolved "https://registry.yarnpkg.com/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz#94bc1845dce70a5bb9d2ecc748725661293d8fc1" @@ -4134,21 +4143,6 @@ cheerio@^1.0.0-rc.3: lodash "^4.15.0" parse5 "^3.0.1" -chokidar@3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.3.0.tgz#12c0714668c55800f659e262d4962a97faf554a6" - integrity sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A== - dependencies: - anymatch "~3.1.1" - braces "~3.0.2" - glob-parent "~5.1.0" - is-binary-path "~2.1.0" - is-glob "~4.0.1" - normalize-path "~3.0.0" - readdirp "~3.2.0" - optionalDependencies: - fsevents "~2.1.1" - chokidar@^2.0.4: version "2.1.8" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.8.tgz#804b3a7b6a99358c3c5c61e71d8728f041cff917" @@ -4169,9 +4163,9 @@ chokidar@^2.0.4: fsevents "^1.2.7" chokidar@^3.3.0: - version "3.3.1" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.3.1.tgz#c84e5b3d18d9a4d77558fef466b1bf16bbeb3450" - integrity sha512-4QYCEWOcK3OJrxwvyyAOxFuhpvOVCYkr33LPfFNBjAD/w3sEzWsp2BUOkI4l9bHvWioAd0rc6NlHUOEaWkTeqg== + version "3.4.0" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.4.0.tgz#b30611423ce376357c765b9b8f904b9fba3c0be8" + integrity sha512-aXAaho2VJtisB/1fg1+3nlLJqGOuewTzQpd/Tz0yTg2R0e4IGtshYvtjowyEumcBv2z+y4+kc75Mz7j5xJskcQ== dependencies: anymatch "~3.1.1" braces "~3.0.2" @@ -4179,7 +4173,7 @@ chokidar@^3.3.0: is-binary-path "~2.1.0" is-glob "~4.0.1" normalize-path "~3.0.0" - readdirp "~3.3.0" + readdirp "~3.4.0" optionalDependencies: fsevents "~2.1.2" @@ -4228,9 +4222,9 @@ cli-spinners@^2.0.0: integrity sha512-Xs2Hf2nzrvJMFKimOR7YR0QwZ8fc0u98kdtwN1eNAZzNQgH3vK2pXzff6GJtKh7S5hoJ87ECiAiZFS2fb5Ii2w== cli-width@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639" - integrity sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk= + version "2.2.1" + resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.1.tgz#b0433d0b4e9c847ef18868a4ef16fd5fc8271c48" + integrity sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw== clipboard@^2.0.0: version "2.0.6" @@ -4423,9 +4417,9 @@ commander@^4.0.1: integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA== commander@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-5.0.0.tgz#dbf1909b49e5044f8fdaf0adc809f0c0722bdfd0" - integrity sha512-JrDGPAKjMGSP1G0DUoaceEJ3DZgAfr/q6X7FVk4+U5KxUSKviYGM2k6zWkfyyBHy5rAtzgYJFa1ro2O9PtoxwQ== + version "5.1.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-5.1.0.tgz#46abbd1652f8e059bddaef99bbdcb2ad9cf179ae" + integrity sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg== commander@~2.13.0: version "2.13.0" @@ -4774,10 +4768,10 @@ crowdin-cli@^0.3.0: yamljs "^0.2.1" yargs "^2.3.0" -crypto-random-string@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-1.0.0.tgz#a230f64f568310e1498009940790ec99545bca7e" - integrity sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4= +crypto-random-string@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-2.0.0.tgz#ef2a7a966ec11083388369baa02ebead229b30d5" + integrity sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA== css-color-names@0.0.4, css-color-names@^0.0.4: version "0.0.4" @@ -4933,20 +4927,13 @@ cssom@~0.3.6: resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.8.tgz#9f1276f5b2b463f2114d3f2c75250af8c1a36f4a" integrity sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg== -cssstyle@^2.0.0: +cssstyle@^2.0.0, cssstyle@^2.2.0: version "2.3.0" resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-2.3.0.tgz#ff665a0ddbdc31864b09647f34163443d90b0852" integrity sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A== dependencies: cssom "~0.3.6" -cssstyle@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-2.2.0.tgz#e4c44debccd6b7911ed617a4395e5754bba59992" - integrity sha512-sEb3XFPx3jNnCAMtqrXPDeSgQr+jojtCeNf8cvMNMh1cG970+lljssvQDzPq6lmmJu2Vhqood/gtEomBiHOGnA== - dependencies: - cssom "~0.3.6" - csstype@^2.2.0: version "2.6.10" resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.10.tgz#e63af50e66d7c266edb6b32909cfd0aabe03928b" @@ -5007,9 +4994,9 @@ dateformat@^3.0.0: integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q== dayjs@^1.8.15: - version "1.8.25" - resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.8.25.tgz#d09a8696cee7191bc1289e739f96626391b9c73c" - integrity sha512-Pk36juDfQQGDCgr0Lqd1kw15w3OS6xt21JaLPE3lCfsEf8KrERGwDNwvK1tRjrjqFC0uZBJncT4smZQ4F+uV5g== + version "1.8.26" + resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.8.26.tgz#c6d62ccdf058ca72a8d14bb93a23501058db9f1e" + integrity sha512-KqtAuIfdNfZR5sJY1Dixr2Is4ZvcCqhb0dZpCOt5dGEFiMzoIbjkTSzUb4QKTCsP+WNpGwUjAFIZrnZvUxxkhw== debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.8, debug@^2.6.9: version "2.6.9" @@ -5025,13 +5012,6 @@ debug@3.1.0: dependencies: ms "2.0.0" -debug@3.2.6, debug@^3.1.0, debug@^3.1.1, debug@^3.2.5: - version "3.2.6" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" - integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== - dependencies: - ms "^2.1.1" - debug@4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" @@ -5046,6 +5026,13 @@ debug@4.1.0: dependencies: ms "^2.1.1" +debug@^3.1.0, debug@^3.1.1, debug@^3.2.5: + version "3.2.6" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" + integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== + dependencies: + ms "^2.1.1" + debuglog@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492" @@ -5266,11 +5253,6 @@ diff-sequences@^25.2.6: resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-25.2.6.tgz#5f467c00edd35352b7bca46d7927d60e687a76dd" integrity sha512-Hq8o7+6GaZeoFjtpgvRBUknSXNeJiCx7V9Fr94ZMljNiCr9n9L8H8aJqgWOQiDDGdyn29fRNcDdRVJ5fdyihfg== -diff@3.5.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" - integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== - diff@^4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" @@ -5529,10 +5511,10 @@ ee-first@1.1.1: resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= -electron-to-chromium@^1.3.247, electron-to-chromium@^1.3.390: - version "1.3.403" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.403.tgz#c8bab4e2e72bf78bc28bad1cc355c061f9cc1918" - integrity sha512-JaoxV4RzdBAZOnsF4dAlZ2ijJW72MbqO5lNfOBHUWiBQl3Rwe+mk2RCUMrRI3rSClLJ8HSNQNqcry12H+0ZjFw== +electron-to-chromium@^1.3.247, electron-to-chromium@^1.3.413: + version "1.3.427" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.427.tgz#ea43d02908a8c71f47ebb46e09de5a3cf8236f04" + integrity sha512-/rG5G7Opcw68/Yrb4qYkz07h3bESVRJjUl4X/FrKLXzoUJleKm6D7K7rTTz8V5LUWnd+BbTOyxJX2XprRqHD8A== "emoji-regex@>=6.0.0 <=6.1.1": version "6.1.1" @@ -5566,7 +5548,7 @@ encoding@^0.1.11: dependencies: iconv-lite "~0.4.13" -end-of-stream@^1.0.0, end-of-stream@^1.1.0: +end-of-stream@^1.0.0, end-of-stream@^1.1.0, end-of-stream@^1.4.1: version "1.4.4" resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== @@ -5589,9 +5571,9 @@ env-paths@^2.2.0: integrity sha512-6u0VYSCo/OW6IoD5WCLLy9JUGARbamfSavcNXry/eu8aHVFei6CD3Sw+VGX5alea1i9pgPHW0mbu6Xj0uBh7gA== envinfo@^7.1.0, envinfo@^7.3.1: - version "7.5.0" - resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.5.0.tgz#91410bb6db262fb4f1409bd506e9ff57e91023f4" - integrity sha512-jDgnJaF/Btomk+m3PZDTTCb5XIIIX3zYItnCRfF73zVgvinLoRomuhi75Y4su0PtQxWz4v66XnLLckyvyJTOIQ== + version "7.5.1" + resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.5.1.tgz#93c26897225a00457c75e734d354ea9106a72236" + integrity sha512-hQBkDf2iO4Nv0CNHpCuSBeaSrveU6nThVxFGTrq/eDlV716UQk09zChaJae4mZRsos1x4YLY2TaH3LHUae3ZmQ== enzyme-adapter-react-16@*: version "1.15.2" @@ -5761,9 +5743,9 @@ eslint-config-fbjs@^3.1.1: integrity sha512-Vpyqz+ZcyLyiUGUdUfiQmZnxiQ4Nj/KDRKed/Y5qSm+xHbQJ5zcZUQwLUMWHQicpDHewsdXwlpUAblvy1DtGvg== eslint-config-prettier@^6.1.0: - version "6.10.1" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.10.1.tgz#129ef9ec575d5ddc0e269667bf09defcd898642a" - integrity sha512-svTy6zh1ecQojvpbJSgH3aei/Rt7C6i090l5f2WQ4aB05lYHeZIR1qL4wZyyILTbtmnbHP5Yn8MrsOJMGa8RkQ== + version "6.11.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.11.0.tgz#f6d2238c1290d01c859a8b5c1f7d352a0b0da8b1" + integrity sha512-oB8cpLWSAjOVFEJhhyMZh6NOEOtBVziaqdDQ86+qhDHFbZXoRTM7pNSvFRfW/W/L/LrQ38C99J5CGuRBBzBsdA== dependencies: get-stdin "^6.0.0" @@ -5855,9 +5837,9 @@ eslint-plugin-markdown@^1.0.0: unified "^6.1.2" eslint-plugin-prettier@^3.0.1: - version "3.1.2" - resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.2.tgz#432e5a667666ab84ce72f945c72f77d996a5c9ba" - integrity sha512-GlolCC9y3XZfv3RQfwGew7NnuFDKsfI4lbvRK+PIIo23SFH+LemGs4cKwzAaRa+Mdb+lQO/STaIayno8T5sJJA== + version "3.1.3" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.3.tgz#ae116a0fc0e598fdae48743a4430903de5b4e6ca" + integrity sha512-+HG5jmu/dN3ZV3T6eCD7a4BlAySdN7mLIbJYo0z1cFQuI+r2DiTJEFeF68ots93PsnrMxbzIZ2S/ieX+mkrBeQ== dependencies: prettier-linter-helpers "^1.0.0" @@ -5976,11 +5958,11 @@ esprima@^4.0.0, esprima@^4.0.1: integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== esquery@^1.0.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.2.0.tgz#a010a519c0288f2530b3404124bfb5f02e9797fe" - integrity sha512-weltsSqdeWIX9G2qQZz7KlTRJdkkOCTPgLYJUz1Hacf48R4YOwGPHO3+ORfWedqJKbq5WQmsgK90n+pFLIKt/Q== + version "1.3.1" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.3.1.tgz#b78b5828aa8e214e29fb74c4d5b752e1c033da57" + integrity sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ== dependencies: - estraverse "^5.0.0" + estraverse "^5.1.0" esrecurse@^4.1.0: version "4.2.1" @@ -5994,10 +5976,10 @@ estraverse@^4.1.0, estraverse@^4.1.1, estraverse@^4.2.0: resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== -estraverse@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.0.0.tgz#ac81750b482c11cca26e4b07e83ed8f75fbcdc22" - integrity sha512-j3acdrMzqrxmJTNj5dbr1YbjacrYgAxVMeF0gK16E3j494mOe7xygM/ZLIguEQ0ETwAg2hlJCtHRGav+y0Ny5A== +estraverse@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.1.0.tgz#374309d39fd935ae500e7b92e8a6b4c720e59642" + integrity sha512-FyohXK+R0vE+y1nHLoBM7ZTyqRpqAlhdZHCWIWEviFLiGB8b04H6bQs8G+XTthacvT8VuwvteiP7RJSxMs8UEw== esutils@^2.0.2: version "2.0.3" @@ -6084,6 +6066,21 @@ execa@^3.2.0: signal-exit "^3.0.2" strip-final-newline "^2.0.0" +execa@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-4.0.0.tgz#7f37d6ec17f09e6b8fc53288611695b6d12b9daf" + integrity sha512-JbDUxwV3BoT5ZVXQrSVbAiaXhXUkIwvbhPIwZ0N13kX+5yCzOhUNdocxB/UQRuYOHRYYwAxKYwJYc0T4D12pDA== + dependencies: + cross-spawn "^7.0.0" + get-stream "^5.0.0" + human-signals "^1.1.1" + is-stream "^2.0.0" + merge-stream "^2.0.0" + npm-run-path "^4.0.0" + onetime "^5.1.0" + signal-exit "^3.0.2" + strip-final-newline "^2.0.0" + executable@^4.1.0: version "4.1.1" resolved "https://registry.yarnpkg.com/executable/-/executable-4.1.1.tgz#41532bff361d3e57af4d763b70582db18f5d133c" @@ -6259,9 +6256,9 @@ fancy-log@^1.3.2: time-stamp "^1.0.0" fast-check@^1.13.0: - version "1.24.1" - resolved "https://registry.yarnpkg.com/fast-check/-/fast-check-1.24.1.tgz#42a153e664122b1a2defdaea4e9b8311635fa7e7" - integrity sha512-ECF5LDbt4F8sJyTDI62fRLn0BdHDAdBacxlEsxaYbtqwbsdWofoYZUSaUp9tJrLsqCQ8jG28SkNvPZpDfNo3tw== + version "1.24.2" + resolved "https://registry.yarnpkg.com/fast-check/-/fast-check-1.24.2.tgz#1f5e4a3c20530c3a85a861e60f680c32229d4fcb" + integrity sha512-ZL48cyZZLJnVsUj127Zi1mfFLM98yzw0LlSSH8CMeVmpL5RCfSRcZSZZ0kJWrRK4eOgNFnXXKNDbzuRb3Vsdhg== dependencies: pure-rand "^2.0.0" tslib "^1.10.0" @@ -6288,7 +6285,7 @@ fast-glob@^2.0.2, fast-glob@^2.2.6: merge2 "^1.2.3" micromatch "^3.1.10" -fast-glob@^3.0.3: +fast-glob@^3.1.1: version "3.2.2" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.2.tgz#ade1a9d91148965d4bf7c51f72e1ca662d32e63d" integrity sha512-UDV82o4uQyljznxwMxyVRJgZZt3O5wENYojjzbaGEGZgeOxkLFf+V4cnUD+krzb2F72E18RhamkMZ7AdeggF7A== @@ -6529,13 +6526,13 @@ finalhandler@1.1.2, finalhandler@~1.1.2: statuses "~1.5.0" unpipe "~1.0.0" -find-cache-dir@3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-3.2.0.tgz#e7fe44c1abc1299f516146e563108fd1006c1874" - integrity sha512-1JKclkYYsf1q9WIJKLZa9S9muC+08RIjzAlLrK4QcYLJMS6mk9yombQ9qf+zJ7H9LS800k0s44L4sDq9VYzqyg== +find-cache-dir@3.3.1: + version "3.3.1" + resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-3.3.1.tgz#89b33fad4a4670daa94f855f7fbe31d6d84fe880" + integrity sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ== dependencies: commondir "^1.0.1" - make-dir "^3.0.0" + make-dir "^3.0.2" pkg-dir "^4.1.0" find-cache-dir@^2.0.0: @@ -6607,13 +6604,6 @@ flat-cache@^2.0.1: rimraf "2.6.3" write "1.0.3" -flat@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/flat/-/flat-4.1.0.tgz#090bec8b05e39cba309747f1d588f04dbaf98db2" - integrity sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw== - dependencies: - is-buffer "~2.0.3" - flatted@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.2.tgz#4575b21e2bcee7434aa9be662f4b7b5f9c2b5138" @@ -6738,10 +6728,10 @@ fsevents@^1.2.7: bindings "^1.5.0" nan "^2.12.1" -fsevents@^2.1.2, fsevents@~2.1.1, fsevents@~2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.2.tgz#4c0a1fb34bc68e543b4b82a9ec392bfbda840805" - integrity sha512-R4wDiBwZ0KzpgOWetKDug1FZcYhqYnUYKtfZYt4mD5SBz76q0KR4Q9o7GIPamsVPGmW3EYPPJ0dOOjvx32ldZA== +fsevents@^2.1.2, fsevents@~2.1.2: + version "2.1.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e" + integrity sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ== function-bind@^1.1.1: version "1.1.1" @@ -6819,18 +6809,11 @@ get-pkg-repo@^1.0.0: parse-github-repo-url "^1.3.0" through2 "^2.0.0" -get-port@*: +get-port@*, get-port@5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/get-port/-/get-port-5.1.1.tgz#0469ed07563479de6efb986baf053dcd7d4e3193" integrity sha512-g/Q1aTSDOxFpchXC4i8ZWvxA1lnPqx/JHqcpIw0/LX9T8x/GBbi6YnlN5nhaKIFkT8oFsscUKgDJYxfwfS6QsQ== -get-port@5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/get-port/-/get-port-5.0.0.tgz#aa22b6b86fd926dd7884de3e23332c9f70c031a6" - integrity sha512-imzMU0FjsZqNa6BqOjbbW6w5BivHIuQKopjpPqcnx0AVHJQKCxK1O+Ab3OrVXhrekqfVMjwA9ZYu062R+KcIsQ== - dependencies: - type-fest "^0.3.0" - get-port@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/get-port/-/get-port-4.2.0.tgz#e37368b1e863b7629c43c5a323625f95cf24b119" @@ -6990,18 +6973,6 @@ glob-to-regexp@^0.3.0: resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab" integrity sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs= -glob@7.1.3: - version "7.1.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" - integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - glob@^7.0.0, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6, glob@~7.1.1: version "7.1.6" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" @@ -7055,18 +7026,16 @@ globby@8.0.2, globby@^8.0.1: pify "^3.0.0" slash "^1.0.0" -globby@^10.0.2: - version "10.0.2" - resolved "https://registry.yarnpkg.com/globby/-/globby-10.0.2.tgz#277593e745acaa4646c3ab411289ec47a0392543" - integrity sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg== +globby@^11.0.0: + version "11.0.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.0.tgz#56fd0e9f0d4f8fb0c456f1ab0dee96e1380bc154" + integrity sha512-iuehFnR3xu5wBBtm4xi0dMe92Ob87ufyu/dHwpDYfbcpYpIbrO5OnS8M1vWvrBhSGEJ3/Ecj7gnX76P8YxpPEg== dependencies: - "@types/glob" "^7.1.1" array-union "^2.1.0" dir-glob "^3.0.1" - fast-glob "^3.0.3" - glob "^7.1.3" - ignore "^5.1.1" - merge2 "^1.2.3" + fast-glob "^3.1.1" + ignore "^5.1.4" + merge2 "^1.3.0" slash "^3.0.0" globby@^9.2.0: @@ -7177,11 +7146,6 @@ gray-matter@^2.1.0: js-yaml "^3.8.1" toml "^2.3.2" -growl@1.10.5: - version "1.10.5" - resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" - integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== - growly@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" @@ -7306,11 +7270,6 @@ has@^1.0.0, has@^1.0.3: dependencies: function-bind "^1.1.1" -he@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" - integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== - hermes-engine@~0.4.0: version "0.4.1" resolved "https://registry.yarnpkg.com/hermes-engine/-/hermes-engine-0.4.1.tgz#2d02b295596298643c4d24b86687eb554db9e950" @@ -7442,12 +7401,12 @@ http-signature@~1.2.0: jsprim "^1.2.2" sshpk "^1.7.0" -https-proxy-agent@4.0.0, https-proxy-agent@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-4.0.0.tgz#702b71fb5520a132a66de1f67541d9e62154d82b" - integrity sha512-zoDhWrkR3of1l9QAL8/scJZyLu8j/gBkcwcaQOZh7Gyh/+uJQzGVETdgT30akuwkpL8HTRfssqI3BZuV18teDg== +https-proxy-agent@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz#e2a90542abb68a762e0a0850f6c9edadfd8506b2" + integrity sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA== dependencies: - agent-base "5" + agent-base "6" debug "4" https-proxy-agent@^2.2.3: @@ -7458,6 +7417,14 @@ https-proxy-agent@^2.2.3: agent-base "^4.3.0" debug "^3.1.0" +https-proxy-agent@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-4.0.0.tgz#702b71fb5520a132a66de1f67541d9e62154d82b" + integrity sha512-zoDhWrkR3of1l9QAL8/scJZyLu8j/gBkcwcaQOZh7Gyh/+uJQzGVETdgT30akuwkpL8HTRfssqI3BZuV18teDg== + dependencies: + agent-base "5" + debug "4" + human-signals@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3" @@ -7504,7 +7471,7 @@ ignore@^4.0.3, ignore@^4.0.6: resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== -ignore@^5.0.5, ignore@^5.1.1: +ignore@^5.0.5, ignore@^5.1.4: version "5.1.4" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.4.tgz#84b7b3dbe64552b6ef0eca99f6743dbec6d97adf" integrity sha512-MzbUSahkTW1u7JpKKjY7LCARd1fU5W2rLdxlM4kdkayuCwZImjkpluF9CM1aLewYJguPDqewLam18Y6AU69A8A== @@ -7648,7 +7615,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@2.0.4, inherits@^2.0.0, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.3: +inherits@2, inherits@2.0.4, inherits@^2.0.0, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -7888,11 +7855,6 @@ is-buffer@^1.1.4, is-buffer@^1.1.5: resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== -is-buffer@~2.0.3: - version "2.0.4" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.4.tgz#3e572f23c8411a5cfd9557c849e3665e0b290623" - integrity sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A== - is-callable@^1.1.4, is-callable@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.5.tgz#f7e46b596890456db74e7f6e976cb3273d06faab" @@ -8117,11 +8079,6 @@ is-potential-custom-element-name@^1.0.0: resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.0.tgz#0c52e54bcca391bb2c494b21e8626d7336c6e397" integrity sha1-DFLlS8yjkbssSUsh6GJtczbG45c= -is-promise@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" - integrity sha1-eaKp7OfwlugPNtKy87wWwf9L8/o= - is-regex@^1.0.4, is-regex@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.5.tgz#39d589a358bf18967f726967120b8fc1aed74eae" @@ -9420,13 +9377,6 @@ lodash@^4.15.0, lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17. resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== -log-symbols@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-3.0.0.tgz#f3a08516a5dea893336a7dee14d18a1cfdab77c4" - integrity sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ== - dependencies: - chalk "^2.4.2" - log-symbols@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-2.2.0.tgz#5740e1c5d6f0dfda4ad9323b5332107ef6b4c40a" @@ -9533,10 +9483,10 @@ make-dir@^2.0.0, make-dir@^2.1.0: pify "^4.0.1" semver "^5.6.0" -make-dir@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.0.2.tgz#04a1acbf22221e1d6ef43559f43e05a90dbb4392" - integrity sha512-rYKABKutXa6vXTXhoV18cBE7PaewPXHe/Bdq4v+ZLMhxbWApkFFplT0LcbMW+6BbjnQXzZ/sAvSE/JdguApG5w== +make-dir@^3.0.0, make-dir@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" + integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== dependencies: semver "^6.0.0" @@ -9986,10 +9936,10 @@ micromatch@^4.0.2: braces "^3.0.1" picomatch "^2.0.5" -mime-db@1.43.0, "mime-db@>= 1.43.0 < 2", mime-db@^1.28.0: - version "1.43.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.43.0.tgz#0a12e0502650e473d735535050e7c8f4eb4fae58" - integrity sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ== +mime-db@1.44.0, "mime-db@>= 1.43.0 < 2", mime-db@^1.28.0: + version "1.44.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92" + integrity sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg== mime-db@~1.23.0: version "1.23.0" @@ -10004,11 +9954,11 @@ mime-types@2.1.11: mime-db "~1.23.0" mime-types@^2.1.12, mime-types@~2.1.19, mime-types@~2.1.24: - version "2.1.26" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.26.tgz#9c921fc09b7e149a65dfdc0da4d20997200b0a06" - integrity sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ== + version "2.1.27" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.27.tgz#47949f98e279ea53119f5722e0f34e529bec009f" + integrity sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w== dependencies: - mime-db "1.43.0" + mime-db "1.44.0" mime@1.6.0: version "1.6.0" @@ -10016,9 +9966,9 @@ mime@1.6.0: integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== mime@^2.4.1: - version "2.4.4" - resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.4.tgz#bd7b91135fc6b01cde3e9bae33d659b63d8857e5" - integrity sha512-LRxmNwziLPT828z+4YkNzloCFC2YM4wrB99k+AV5ZbEyfGNWfG8SO1FUXLmLDBSo89NrJZ4DIWeLjy1CHGhMGA== + version "2.4.5" + resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.5.tgz#d8de2ecb92982dedbb6541c9b6841d7f218ea009" + integrity sha512-3hQhEUF027BuxZjQA3s7rIv/7VCQPa27hN9u9g87sEkWaKwQPuXOkVKtOeiyUrnWqTDiOs8Ed2rwg733mB0R5w== mimic-fn@^1.0.0: version "1.2.0" @@ -10106,101 +10056,76 @@ mkdirp-promise@^5.0.1: dependencies: mkdirp "*" -mkdirp@*, mkdirp@0.5.3, mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.1: - version "0.5.3" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.3.tgz#5a514b7179259287952881e94410ec5465659f8c" - integrity sha512-P+2gwrFqx8lhew375MQHHeTlY8AuOJSrGf0R5ddkEndUkmwpgUob/vQuBD1V22/Cw1/lJr4x+EjllSezBThzBg== +mkdirp@*, mkdirp@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" + integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== + +mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.1: + version "0.5.5" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" + integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== dependencies: minimist "^1.2.5" -mocha@^7.0.0: - version "7.1.1" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-7.1.1.tgz#89fbb30d09429845b1bb893a830bf5771049a441" - integrity sha512-3qQsu3ijNS3GkWcccT5Zw0hf/rWvu1fTN9sPvEd81hlwsr30GX2GcDSSoBxo24IR8FelmrAydGC6/1J5QQP4WA== - dependencies: - ansi-colors "3.2.3" - browser-stdout "1.3.1" - chokidar "3.3.0" - debug "3.2.6" - diff "3.5.0" - escape-string-regexp "1.0.5" - find-up "3.0.0" - glob "7.1.3" - growl "1.10.5" - he "1.2.0" - js-yaml "3.13.1" - log-symbols "3.0.0" - minimatch "3.0.4" - mkdirp "0.5.3" - ms "2.1.1" - node-environment-flags "1.0.6" - object.assign "4.1.0" - strip-json-comments "2.0.1" - supports-color "6.0.0" - which "1.3.1" - wide-align "1.1.3" - yargs "13.3.2" - yargs-parser "13.1.2" - yargs-unparser "1.6.0" - mock-fs@^4.4.1: - version "4.11.0" - resolved "https://registry.yarnpkg.com/mock-fs/-/mock-fs-4.11.0.tgz#0828107e4b843a6ba855ecebfe3c6e073b69db92" - integrity sha512-Yp4o3/ZA15wsXqJTT+R+9w2AYIkD1i80Lds47wDbuUhOvQvm+O2EfjFZSz0pMgZZSPHRhGxgcd2+GL4+jZMtdw== + version "4.12.0" + resolved "https://registry.yarnpkg.com/mock-fs/-/mock-fs-4.12.0.tgz#a5d50b12d2d75e5bec9dac3b67ffe3c41d31ade4" + integrity sha512-/P/HtrlvBxY4o/PzXY9cCNBrdylDNxg7gnrv2sMNxj+UJ2m8jSpl0/A6fuJeNAWr99ZvGWH8XCbE0vmnM5KupQ== modify-values@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/modify-values/-/modify-values-1.0.1.tgz#b3939fa605546474e3e3e3c63d64bd43b4ee6022" integrity sha512-xV2bxeN6F7oYjZWTe/YPAy6MN2M+sL4u/Rlm2AHCIVGfo2p1yGmBHQ6vHehl4bRTZBdHu3TSkWdYgkwpYzAGSw== -mongodb-memory-server-core@6.3.2: - version "6.3.2" - resolved "https://registry.yarnpkg.com/mongodb-memory-server-core/-/mongodb-memory-server-core-6.3.2.tgz#85d9abc6ecd0d58e5bacd9cdc313075d8ef91575" - integrity sha512-QMLYf6CIyBEjh9EyfDdISPwlmD3FEDpyQBwl0ecws4CHMcP8mrA1rw1KzhorhvfiGgSdmxnENxAO8pTzxw2EhQ== +mongodb-memory-server-core@6.5.2: + version "6.5.2" + resolved "https://registry.yarnpkg.com/mongodb-memory-server-core/-/mongodb-memory-server-core-6.5.2.tgz#21c96b6e3104b999905ecb232f83d2432467a0f5" + integrity sha512-Cs1wB+GrL2KconDD2emk6ptU1OqdYia11I7fw5sOqnEWc8stTQ4rtptbRcLmHyTcTgRYC/fsQQvzbbd7DBf4DQ== dependencies: "@types/cross-spawn" "^6.0.1" "@types/debug" "^4.1.5" - "@types/decompress" "^4.2.3" "@types/dedent" "^0.7.0" - "@types/find-cache-dir" "^2.0.0" - "@types/find-package-json" "^1.1.0" + "@types/find-cache-dir" "^3.2.0" + "@types/find-package-json" "^1.1.1" "@types/get-port" "^4.0.1" "@types/lockfile" "^1.0.1" - "@types/md5-file" "^4.0.0" - "@types/mkdirp" "^0.5.2" + "@types/md5-file" "^4.0.1" + "@types/mkdirp" "^1.0.0" "@types/tmp" "0.1.0" - "@types/uuid" "3.4.6" + "@types/uuid" "7.0.0" camelcase "^5.3.1" cross-spawn "^7.0.1" debug "^4.1.1" - decompress "^4.2.0" dedent "^0.7.0" - find-cache-dir "3.2.0" + find-cache-dir "3.3.1" find-package-json "^1.2.0" - get-port "5.0.0" - https-proxy-agent "4.0.0" + get-port "5.1.1" + https-proxy-agent "5.0.0" lockfile "^1.0.4" md5-file "^4.0.0" - mkdirp "^0.5.1" + mkdirp "^1.0.3" + tar-stream "^2.1.1" tmp "^0.1.0" - uuid "^3.3.3" + uuid "^7.0.2" + yauzl "^2.10.0" optionalDependencies: - mongodb "^3.2.7" + mongodb "^3.5.4" mongodb-memory-server@^6.3.2: - version "6.3.2" - resolved "https://registry.yarnpkg.com/mongodb-memory-server/-/mongodb-memory-server-6.3.2.tgz#486f480d7ba272f42c282e636d8834332b2836f0" - integrity sha512-iTwSAfmSooCkbmKoPU1iyT8RC+pCHIzk+9GCyCu7eHMst4k08+e3o4CYoFZbqOvmNLdbqsfjwWENZe7exkGd/Q== + version "6.5.2" + resolved "https://registry.yarnpkg.com/mongodb-memory-server/-/mongodb-memory-server-6.5.2.tgz#47f4c19ab830f63ee6119629072eee2df7d8957a" + integrity sha512-PUCiWcHGwyqQiZF3J4iCy1DXqPjoNtehV2qMFJ26rhNBFzmc5SW+9/FUQwGNLge5/Lm1dEwcraJD5PUe8m9Kdg== dependencies: - mongodb-memory-server-core "6.3.2" + mongodb-memory-server-core "6.5.2" -mongodb@^3.1.13, mongodb@^3.2.7: - version "3.5.5" - resolved "https://registry.yarnpkg.com/mongodb/-/mongodb-3.5.5.tgz#1334c3e5a384469ac7ef0dea69d59acc829a496a" - integrity sha512-GCjDxR3UOltDq00Zcpzql6dQo1sVry60OXJY3TDmFc2SWFY6c8Gn1Ardidc5jDirvJrx2GC3knGOImKphbSL3A== +mongodb@^3.1.13, mongodb@^3.5.4: + version "3.5.7" + resolved "https://registry.yarnpkg.com/mongodb/-/mongodb-3.5.7.tgz#6dcfff3bdbf67a53263dcca1647c265eea1d065d" + integrity sha512-lMtleRT+vIgY/JhhTn1nyGwnSMmJkJELp+4ZbrjctrnBxuLbj6rmLuJFz8W2xUzUqWmqoyVxJLYuC58ZKpcTYQ== dependencies: bl "^2.2.0" - bson "^1.1.1" + bson "^1.1.4" denque "^1.4.1" require_optional "^1.0.1" safe-buffer "^5.1.2" @@ -10269,9 +10194,9 @@ mz@^2.5.0: thenify-all "^1.0.0" nan@^2.12.1: - version "2.14.0" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.0.tgz#7818f722027b2459a86f0295d434d1fc2336c52c" - integrity sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg== + version "2.14.1" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.1.tgz#d7be34dfa3105b91494c3147089315eff8874b01" + integrity sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw== nanomatch@^1.2.9: version "1.2.13" @@ -10296,9 +10221,9 @@ natural-compare@^1.4.0: integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= nearley@^2.7.10: - version "2.19.1" - resolved "https://registry.yarnpkg.com/nearley/-/nearley-2.19.1.tgz#4af4006e16645ff800e9f993c3af039857d9dbdc" - integrity sha512-xq47GIUGXxU9vQg7g/y1o1xuKnkO7ev4nRWqftmQrLkfnE/FjRqDaGOUakM8XHPn/6pW3bGjU2wgoJyId90rqg== + version "2.19.3" + resolved "https://registry.yarnpkg.com/nearley/-/nearley-2.19.3.tgz#ae3b040e27616b5348102c436d1719209476a5a1" + integrity sha512-FpAy1PmTsUpOtgxr23g4jRNvJHYzZEW2PixXeSzksLR/ykPfwKhAodc2+9wQhY+JneWLcvkDw6q7FJIsIdF/aQ== dependencies: commander "^2.19.0" moo "^0.5.0" @@ -10326,14 +10251,6 @@ node-addon-api@^1.1.0: resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-1.7.1.tgz#cf813cd69bb8d9100f6bdca6755fc268f54ac492" integrity sha512-2+DuKodWvwRTrCfKOeR24KIc5unKjOh8mz17NCzVnHWfjAdDqbfbjqh7gUT+BkXBRQM52+xCHciKWonJ3CbJMQ== -node-environment-flags@1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/node-environment-flags/-/node-environment-flags-1.0.6.tgz#a30ac13621f6f7d674260a54dede048c3982c088" - integrity sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw== - dependencies: - object.getownpropertydescriptors "^2.0.3" - semver "^5.7.0" - node-fetch-npm@^2.0.2: version "2.0.4" resolved "https://registry.yarnpkg.com/node-fetch-npm/-/node-fetch-npm-2.0.4.tgz#6507d0e17a9ec0be3bec516958a497cec54bf5a4" @@ -10407,15 +10324,27 @@ node-notifier@^6.0.0: shellwords "^0.1.1" which "^1.3.1" +node-notifier@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-7.0.0.tgz#513bc42f2aa3a49fce1980a7ff375957c71f718a" + integrity sha512-y8ThJESxsHcak81PGpzWwQKxzk+5YtP3IxR8AYdpXQ1IB6FmcVzFdZXrkPin49F/DKUCfeeiziB8ptY9npzGuA== + dependencies: + growly "^1.3.0" + is-wsl "^2.1.1" + semver "^7.2.1" + shellwords "^0.1.1" + uuid "^7.0.3" + which "^2.0.2" + node-releases@^1.1.29, node-releases@^1.1.53: version "1.1.53" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.53.tgz#2d821bfa499ed7c5dffc5e2f28c88e78a08ee3f4" integrity sha512-wp8zyQVwef2hpZ/dJH7SfSrIPD6YoJz6BDQDpGEkcA0s3LpAQoxBIYmfIq6QAhC1DhwsyCgTaTTcONwX8qzCuQ== node-stream-zip@^1.9.1: - version "1.9.1" - resolved "https://registry.yarnpkg.com/node-stream-zip/-/node-stream-zip-1.9.1.tgz#66d210204da7c60e2d6d685eb21a11d016981fd0" - integrity sha512-7/Xs9gkuYF0WBimz5OrSc6UVKLDTxvBG2yLGtEK8PSx94d86o/6iQLvIe/140ATz35JDqHKWIxh3GcA3u5hB0w== + version "1.10.1" + resolved "https://registry.yarnpkg.com/node-stream-zip/-/node-stream-zip-1.10.1.tgz#d4c648e8d4cf97311e655b3c998d344ccbb421a8" + integrity sha512-fd2jdfvs3xJhSGpipy3EgCHGgFMXZkJh6HeQ8LURfMUW9oHcPEMWLXO657MtMRGJCHvQYQk6dTHZmNycu87PEg== nopt@^4.0.1: version "4.0.3" @@ -10609,9 +10538,12 @@ object-inspect@^1.7.0: integrity sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw== object-is@^1.0.1, object-is@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.0.2.tgz#6b80eb84fe451498f65007982f035a5b445edec4" - integrity sha512-Epah+btZd5wrrfjkJZq1AOB9O6OxUQto45hzFd7lXGrpHPGE0W1k+426yrZV+k6NJOzLNNW/nVsmZdIWsAqoOQ== + version "1.1.2" + resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.1.2.tgz#c5d2e87ff9e119f78b7a088441519e2eec1573b6" + integrity sha512-5lHCz+0uufF6wZ7CRFWJN3hp8Jqblpgve06U5CMQ3f//6iDjPr2PEo9MWCjEssDsa+UZEL4PkFpr+BMop6aKzQ== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.5" object-keys@^1.0.11, object-keys@^1.0.12, object-keys@^1.1.1: version "1.1.1" @@ -10625,7 +10557,7 @@ object-visit@^1.0.0: dependencies: isobject "^3.0.0" -object.assign@4.1.0, object.assign@^4.1.0: +object.assign@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w== @@ -11174,7 +11106,7 @@ performance-now@^2.1.0: resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= -picomatch@^2.0.4, picomatch@^2.0.5, picomatch@^2.0.7, picomatch@^2.2.1: +picomatch@^2.0.4, picomatch@^2.0.5, picomatch@^2.2.1: version "2.2.2" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== @@ -11272,9 +11204,9 @@ pn@^1.1.0: integrity sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA== portfinder@^1.0.25: - version "1.0.25" - resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.25.tgz#254fd337ffba869f4b9d37edc298059cb4d35eca" - integrity sha512-6ElJnHBbxVA1XSLgBp7G1FiCkQdlqGzuF7DswL5tcea+E8UpuvPU7beVAjjRwCioTS9ZluNbu+ZyRvgTsmqEBg== + version "1.0.26" + resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.26.tgz#475658d56ca30bed72ac7f1378ed350bd1b64e70" + integrity sha512-Xi7mKxJHHMI3rIUrnm/jjUgwhbYMkp/XKEcZX3aG4BrumLpq3nmoQMX+ClYnDZnZ/New7IatC1no5RX0zo1vXQ== dependencies: async "^2.6.2" debug "^3.1.1" @@ -11556,9 +11488,9 @@ postcss-value-parser@^3.0.0: integrity sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ== postcss-value-parser@^4.0.2, postcss-value-parser@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.0.3.tgz#651ff4593aa9eda8d5d0d66593a2417aeaeb325d" - integrity sha512-N7h4pG+Nnu5BEIzyeaaIYWs0LI5XC40OrRh5L60z0QjFsqGWcHcbkBvpe1WYpcIS9yQ8sOi/vIPt1ejQCrMVrg== + version "4.1.0" + resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz#443f6a20ced6481a2bda4fa8532a6e55d789a2cb" + integrity sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ== postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.23, postcss@^7.0.27: version "7.0.27" @@ -11591,15 +11523,15 @@ prettier-linter-helpers@^1.0.0: dependencies: fast-diff "^1.1.2" -prettier@^1.13.4: +prettier@^1.19.1: version "1.19.1" resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb" integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew== prettier@^2.0.1: - version "2.0.4" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.0.4.tgz#2d1bae173e355996ee355ec9830a7a1ee05457ef" - integrity sha512-SVJIQ51spzFDvh4fIbCLvciiDMCrRhlN3mbZvv/+ycjvmF5E73bKdGfU8QDLNmjYJf+lsGnDBC4UUnvTe5OO0w== + version "2.0.5" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.0.5.tgz#d6d56282455243f2f92cc1716692c08aa31522d4" + integrity sha512-7PtVymN48hGcO4fGjybyBSIWDsLU4H4XlvOHfq91pz9kkGlonzwTfYkaIEwiRg/dAJF9YlbsduBAgtYLi+8cFg== pretty-format@^24.7.0, pretty-format@^24.8.0, pretty-format@^24.9.0: version "24.9.0" @@ -11970,7 +11902,17 @@ react-refresh@^0.4.0: resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.4.2.tgz#54a277a6caaac2803d88f1d6f13c1dcfbd81e334" integrity sha512-kv5QlFFSZWo7OlJFNYbxRtY66JImuP2LcrFgyJfQaf85gSP+byzG21UbDQEYjU7f//ny8rwiEkO6py2Y+fEgAQ== -react-test-renderer@*, react-test-renderer@16.11.0, react-test-renderer@^16.0.0-0: +react-test-renderer@*, react-test-renderer@^16.0.0-0: + version "16.13.1" + resolved "https://registry.yarnpkg.com/react-test-renderer/-/react-test-renderer-16.13.1.tgz#de25ea358d9012606de51e012d9742e7f0deabc1" + integrity sha512-Sn2VRyOK2YJJldOqoh8Tn/lWQ+ZiKhyZTPtaO0Q6yNj+QDbmRkVFap6pZPy3YQk8DScRDfyqm/KxKYP9gCMRiQ== + dependencies: + object-assign "^4.1.1" + prop-types "^15.6.2" + react-is "^16.8.6" + scheduler "^0.19.1" + +react-test-renderer@16.11.0: version "16.11.0" resolved "https://registry.yarnpkg.com/react-test-renderer/-/react-test-renderer-16.11.0.tgz#72574566496462c808ac449b0287a4c0a1a7d8f8" integrity sha512-nh9gDl8R4ut+ZNNb2EeKO5VMvTKxwzurbSMuGBoKtjpjbg8JK/u3eVPVNi1h1Ue+eYK9oSzJjb+K3lzLxyA4ag== @@ -11980,7 +11922,16 @@ react-test-renderer@*, react-test-renderer@16.11.0, react-test-renderer@^16.0.0- react-is "^16.8.6" scheduler "^0.17.0" -react@*, react@16.11.0, react@^16.8.4: +react@*, react@^16.8.4: + version "16.13.1" + resolved "https://registry.yarnpkg.com/react/-/react-16.13.1.tgz#2e818822f1a9743122c063d6410d85c1e3afe48e" + integrity sha512-YMZQQq32xHLX0bz5Mnibv1/LHb3Sqzngu7xstSM+vrkE5Kzr9xE0yMByK5kMoTK30YVJE61WfbxIFFvfeDKT1w== + dependencies: + loose-envify "^1.1.0" + object-assign "^4.1.1" + prop-types "^15.6.2" + +react@16.11.0: version "16.11.0" resolved "https://registry.yarnpkg.com/react/-/react-16.11.0.tgz#d294545fe62299ccee83363599bf904e4a07fdbb" integrity sha512-M5Y8yITaLmU0ynd0r1Yvfq98Rmll6q8AxaEe88c8e7LxO8fZ2cNgmFt0aGAS9wzf1Ao32NKXtCl+/tVVtkxq6g== @@ -12107,7 +12058,7 @@ read@1, read@~1.0.1: string_decoder "~1.1.1" util-deprecate "~1.0.1" -"readable-stream@2 || 3", readable-stream@^3.0.2, readable-stream@^3.1.1: +"readable-stream@2 || 3", readable-stream@^3.0.2, readable-stream@^3.1.1, readable-stream@^3.4.0: version "3.6.0" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== @@ -12135,19 +12086,12 @@ readdirp@^2.2.1: micromatch "^3.1.10" readable-stream "^2.0.2" -readdirp@~3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.2.0.tgz#c30c33352b12c96dfb4b895421a49fd5a9593839" - integrity sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ== - dependencies: - picomatch "^2.0.4" - -readdirp@~3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.3.0.tgz#984458d13a1e42e2e9f5841b129e162f369aff17" - integrity sha512-zz0pAkSPOXXm1viEwygWIPSPkcBYjW1xU5j/JBh5t9bGCJwa6f9+BJa6VaB2g+b55yVrmXzqkyLf4xaWYM0IkQ== +readdirp@~3.4.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.4.0.tgz#9fdccdf9e9155805449221ac645e8303ab5b9ada" + integrity sha512-0xe001vZBnJEK+uKcj8qOhyAKPzIT+gStxWr3LCB0DwcXR5NZJ3IaC+yGnHCYzB/S7ov3m3EEbZI2zeNvX+hGQ== dependencies: - picomatch "^2.0.7" + picomatch "^2.2.1" realpath-native@^2.0.0: version "2.0.0" @@ -12552,11 +12496,9 @@ rsvp@^4.8.4: integrity sha512-nfMOlASu9OnRJo1mbEk2cz0D56a1MBNrJ7orjRZQG10XDyuvwksKbuXNp6qa+kbn839HwjwhBzhFmdsaEAfauA== run-async@^2.2.0, run-async@^2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.0.tgz#e59054a5b86876cfae07f431d18cbaddc594f1e8" - integrity sha512-xJTbh/d7Lm7SBhc1tNvTpeCHaEzoyxPrqNlvSdMfBTYwaY++UJFyXUOxAtsRUXjlqOfj8luNaR9vjCh4KeV+pg== - dependencies: - is-promise "^2.1.0" + version "2.4.1" + resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" + integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ== run-parallel@^1.1.9: version "1.1.9" @@ -12663,9 +12605,9 @@ saxes@^3.1.9: xmlchars "^2.1.1" saxes@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/saxes/-/saxes-5.0.0.tgz#b7d30284d7583a5ca6ad0248b56d8889da53788b" - integrity sha512-LXTZygxhf8lfwKaTP/8N9CsVdjTlea3teze4lL6u37ivbgGbV0GGMuNtS/I9rnD/HC2/txUM7Df4S2LVl1qhiA== + version "5.0.1" + resolved "https://registry.yarnpkg.com/saxes/-/saxes-5.0.1.tgz#eebab953fa3b7608dbe94e5dadb15c888fa6696d" + integrity sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw== dependencies: xmlchars "^2.2.0" @@ -12677,6 +12619,14 @@ scheduler@0.17.0, scheduler@^0.17.0: loose-envify "^1.1.0" object-assign "^4.1.1" +scheduler@^0.19.1: + version "0.19.1" + resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.19.1.tgz#4f3e2ed2c1a7d65681f4c854fa8c5a1ccb40f196" + integrity sha512-n/zwRWRYSUj0/3g/otKDRPMh6qv2SYMWNq85IEa8iZyAv8od9zDYpGSnpBEjNgcMNq6Scbu5KfIPxNF72R/2EA== + dependencies: + loose-envify "^1.1.0" + object-assign "^4.1.1" + seek-bzip@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/seek-bzip/-/seek-bzip-1.0.5.tgz#cfe917cb3d274bcffac792758af53173eb1fabdc" @@ -12716,6 +12666,11 @@ semver@^6.0.0, semver@^6.1.2, semver@^6.2.0, semver@^6.3.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== +semver@^7.2.1, semver@^7.3.2: + version "7.3.2" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938" + integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ== + send@0.17.1: version "0.17.1" resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8" @@ -12837,9 +12792,9 @@ shell-quote@1.7.2, shell-quote@^1.6.1: integrity sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg== shelljs@^0.8.3: - version "0.8.3" - resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.3.tgz#a7f3319520ebf09ee81275b2368adb286659b097" - integrity sha512-fc0BKlAWiLpwZljmOvAOTE/gXawtCoNrP5oaY7KIaQbbyHeQVg01pSEuEGvGh3HEdBU4baCD7wQBwADmM/7f7A== + version "0.8.4" + resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.4.tgz#de7684feeb767f8716b326078a8a00875890e3c2" + integrity sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ== dependencies: glob "^7.0.0" interpret "^1.0.0" @@ -13019,9 +12974,9 @@ source-map-resolve@^0.5.0: urix "^0.1.0" source-map-support@^0.5.16: - version "0.5.16" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.16.tgz#0ae069e7fe3ba7538c64c98515e35339eac5a042" - integrity sha512-efyLRJDr68D9hBBNIPWFjhpFzURh+KJykQwvMyW5UiZzYwoF6l4YMMDIJJEyFWxWCqfyxLzz6tSfUFR+kXXsVQ== + version "0.5.19" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61" + integrity sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw== dependencies: buffer-from "^1.0.0" source-map "^0.6.0" @@ -13070,9 +13025,9 @@ spdx-correct@^3.0.0: spdx-license-ids "^3.0.0" spdx-exceptions@^2.1.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz#2ea450aee74f2a89bfb94519c07fcd6f41322977" - integrity sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA== + version "2.3.0" + resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz#3f28ce1a77a00372683eade4a433183527a2163d" + integrity sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A== spdx-expression-parse@^3.0.0: version "3.0.0" @@ -13154,6 +13109,13 @@ stack-utils@^1.0.1: resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-1.0.2.tgz#33eba3897788558bebfc2db059dc158ec36cebb8" integrity sha512-MTX+MeG5U994cazkjd/9KNAapsHnibjMLnfXodlkXw76JEea0UiNzrqidzo1emMwk7w5Qhc9jd4Bn9TBb1MFwA== +stack-utils@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.2.tgz#5cf48b4557becb4638d0bc4f21d23f5d19586593" + integrity sha512-0H7QK2ECz3fyZMzQ8rH0j2ykpfbnd20BFtfg/SqVC2+sCTtcw0aDTGB7dk+de4U4uUeuz6nOtJcrkFFLG1B0Rg== + dependencies: + escape-string-regexp "^2.0.0" + stacktrace-parser@^0.1.3: version "0.1.9" resolved "https://registry.yarnpkg.com/stacktrace-parser/-/stacktrace-parser-0.1.9.tgz#11e6d61d42e8cfc87293143d0766408b7a87b00f" @@ -13222,6 +13184,14 @@ string-length@^3.1.0: astral-regex "^1.0.0" strip-ansi "^5.2.0" +string-length@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.1.tgz#4a973bf31ef77c4edbceadd6af2611996985f8a1" + integrity sha512-PKyXUd0LK0ePjSOnWn34V2uD6acUWev9uy0Ft05k0E8xRW+SKcA0F7eMr7h5xlzfn+4O3N+55rduYyet3Jk+jw== + dependencies: + char-regex "^1.0.2" + strip-ansi "^6.0.0" + string-template@~0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/string-template/-/string-template-0.2.1.tgz#42932e598a352d01fc22ec3367d9d84eec6c9add" @@ -13415,11 +13385,6 @@ strip-indent@^2.0.0: resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-2.0.0.tgz#5ef8db295d01e6ed6cbf7aab96998d7822527b68" integrity sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g= -strip-json-comments@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" - integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= - strip-json-comments@^3.0.1: version "3.1.0" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.0.tgz#7638d31422129ecf4457440009fba03f9f9ac180" @@ -13456,16 +13421,9 @@ stylehacks@^4.0.0: postcss-selector-parser "^3.0.0" sudo-prompt@^9.0.0: - version "9.1.1" - resolved "https://registry.yarnpkg.com/sudo-prompt/-/sudo-prompt-9.1.1.tgz#73853d729770392caec029e2470db9c221754db0" - integrity sha512-es33J1g2HjMpyAhz8lOR+ICmXXAqTuKbuXuUWLhOLew20oN9oUCgCJx615U/v7aioZg7IX5lIh9x34vwneu4pA== - -supports-color@6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.0.0.tgz#76cfe742cf1f41bb9b1c29ad03068c05b4c0e40a" - integrity sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg== - dependencies: - has-flag "^3.0.0" + version "9.2.1" + resolved "https://registry.yarnpkg.com/sudo-prompt/-/sudo-prompt-9.2.1.tgz#77efb84309c9ca489527a4e749f287e6bdd52afd" + integrity sha512-Mu7R0g4ig9TUuGSxJavny5Rv0egCEtpZRNMrZaYS1vxkiIxGiGUwoezU3LazIQ+KE04hTrTfNPgxU5gzi7F5Pw== supports-color@^2.0.0: version "2.0.0" @@ -13558,6 +13516,17 @@ tar-stream@^1.5.2: to-buffer "^1.1.1" xtend "^4.0.0" +tar-stream@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.1.2.tgz#6d5ef1a7e5783a95ff70b69b97455a5968dc1325" + integrity sha512-UaF6FoJ32WqALZGOIAApXx+OdxhekNMChu6axLJR85zMMjXKWFGjbIRe+J6P4UnRGg9rAwWvbTT0oI7hD/Un7Q== + dependencies: + bl "^4.0.1" + end-of-stream "^1.4.1" + fs-constants "^1.0.0" + inherits "^2.0.3" + readable-stream "^3.1.1" + tar@^4.4.10, tar@^4.4.12, tar@^4.4.8: version "4.4.13" resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.13.tgz#43b364bc52888d555298637b10d60790254ab525" @@ -13595,6 +13564,11 @@ temp-dir@^1.0.0: resolved "https://registry.yarnpkg.com/temp-dir/-/temp-dir-1.0.0.tgz#0a7c0ea26d3a39afa7e0ebea9c1fc0bc4daa011d" integrity sha1-CnwOom06Oa+n4OvqnB/AvE2qAR0= +temp-dir@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/temp-dir/-/temp-dir-2.0.0.tgz#bde92b05bdfeb1516e804c9c00ad45177f31321e" + integrity sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg== + temp-write@^3.4.0: version "3.4.0" resolved "https://registry.yarnpkg.com/temp-write/-/temp-write-3.4.0.tgz#8cff630fb7e9da05f047c74ce4ce4d685457d492" @@ -13623,14 +13597,15 @@ tempfile@^2.0.0: temp-dir "^1.0.0" uuid "^3.0.1" -tempy@~0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/tempy/-/tempy-0.3.0.tgz#6f6c5b295695a16130996ad5ab01a8bd726e8bf8" - integrity sha512-WrH/pui8YCwmeiAoxV+lpRH9HpRtgBhSR2ViBPgpGb/wnYDzp21R4MN45fsCGvLROvY67o3byhJRYRONJyImVQ== +tempy@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/tempy/-/tempy-0.5.0.tgz#2785c89df39fcc4d1714fc554813225e1581d70b" + integrity sha512-VEY96x7gbIRfsxqsafy2l5yVxxp3PhwAGoWMyC2D2Zt5DmEv+2tGiPOrquNRpf21hhGnKLVEsuqleqiZmKG/qw== dependencies: - temp-dir "^1.0.0" - type-fest "^0.3.1" - unique-string "^1.0.0" + is-stream "^2.0.0" + temp-dir "^2.0.0" + type-fest "^0.12.0" + unique-string "^2.0.0" terminal-link@^2.0.0: version "2.1.1" @@ -13930,7 +13905,12 @@ type-fest@^0.11.0: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.11.0.tgz#97abf0872310fed88a5c466b25681576145e33f1" integrity sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ== -type-fest@^0.3.0, type-fest@^0.3.1: +type-fest@^0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.12.0.tgz#f57a27ab81c68d136a51fd71467eff94157fa1ee" + integrity sha512-53RyidyjvkGpnWPMF9bQgFtWp+Sl8O2Rp13VavmJgfAP9WWG6q6TkrKU8iyJdnwnfgHI6k2hTlgqH4aSdjoTbg== + +type-fest@^0.3.0: version "0.3.1" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.3.1.tgz#63d00d204e059474fe5e1b7c011112bbd1dc29e1" integrity sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ== @@ -13989,12 +13969,11 @@ uglify-es@^3.1.9: source-map "~0.6.1" uglify-js@^3.1.4: - version "3.8.1" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.8.1.tgz#43bb15ce6f545eaa0a64c49fd29375ea09fa0f93" - integrity sha512-W7KxyzeaQmZvUFbGj4+YFshhVrMBGSg2IbcYAjGWGvx8DHvJMclbTDMpffdxFUGPBHjIytk7KJUR/KUXstUGDw== + version "3.9.1" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.9.1.tgz#a56a71c8caa2d36b5556cc1fd57df01ae3491539" + integrity sha512-JUPoL1jHsc9fOjVFHdQIhqEEJsQvfKDjlubcCilu8U26uZ73qOg8VsN8O1jbuei44ZPlwL7kmbAdM4tzaUvqnA== dependencies: commander "~2.20.3" - source-map "~0.6.1" uid-number@0.0.6: version "0.0.6" @@ -14012,9 +13991,9 @@ umask@^1.1.0: integrity sha1-8pzr8B31F5ErtY/5xOUP3o4zMg0= unbzip2-stream@^1.0.9: - version "1.4.1" - resolved "https://registry.yarnpkg.com/unbzip2-stream/-/unbzip2-stream-1.4.1.tgz#151b104af853df3efdaa135d8b1eca850a44b426" - integrity sha512-sgDYfSDPMsA4Hr2/w7vOlrJBlwzmyakk1+hW8ObLvxSp0LA36LcL2XItGvOT3OSblohSdevMuT8FQjLsqyy4sA== + version "1.4.2" + resolved "https://registry.yarnpkg.com/unbzip2-stream/-/unbzip2-stream-1.4.2.tgz#84eb9e783b186d8fb397515fbb656f312f1a7dbf" + integrity sha512-pZMVAofMrrHX6Ik39hCk470kulCbmZ2SWfQLPmTWqfJV/oUm0gn1CblvHdUu4+54Je6Jq34x8kY6XjTy6dMkOg== dependencies: buffer "^5.2.1" through "^2.3.8" @@ -14096,12 +14075,12 @@ unique-slug@^2.0.0: dependencies: imurmurhash "^0.1.4" -unique-string@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-1.0.0.tgz#9e1057cca851abb93398f8b33ae187b99caec11a" - integrity sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo= +unique-string@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-2.0.0.tgz#39c6451f81afb2749de2b233e3f7c5e8843bd89d" + integrity sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg== dependencies: - crypto-random-string "^1.0.0" + crypto-random-string "^2.0.0" unist-util-is@^3.0.0: version "3.0.0" @@ -14264,6 +14243,11 @@ uuid@^3.0.1, uuid@^3.3.2, uuid@^3.3.3: resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== +uuid@^7.0.2, uuid@^7.0.3: + version "7.0.3" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-7.0.3.tgz#c5c9f2c8cf25dc0a372c4df1441c41f5bd0c680b" + integrity sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg== + v8-compile-cache@^2.0.3: version "2.1.0" resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz#e14de37b31a6d194f5690d67efc4e7f6fc6ab30e" @@ -14464,7 +14448,7 @@ which-module@^2.0.0: resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= -which@1.3.1, which@^1.2.9, which@^1.3.1: +which@^1.2.9, which@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== @@ -14478,7 +14462,7 @@ which@^2.0.1, which@^2.0.2: dependencies: isexe "^2.0.0" -wide-align@1.1.3, wide-align@^1.1.0: +wide-align@^1.1.0: version "1.1.3" resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== @@ -14729,14 +14713,6 @@ yamljs@^0.2.1: argparse "^1.0.7" glob "^7.0.5" -yargs-parser@13.1.2, yargs-parser@^13.1.2: - version "13.1.2" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38" - integrity sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg== - dependencies: - camelcase "^5.0.0" - decamelize "^1.2.0" - yargs-parser@^10.0.0: version "10.1.0" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-10.1.0.tgz#7202265b89f7e9e9f2e5765e0fe735a905edbaa8" @@ -14761,38 +14737,13 @@ yargs-parser@^15.0.1: decamelize "^1.2.0" yargs-parser@^18.1.1: - version "18.1.2" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.2.tgz#2f482bea2136dbde0861683abea7756d30b504f1" - integrity sha512-hlIPNR3IzC1YuL1c2UwwDKpXlNFBqD1Fswwh1khz5+d8Cq/8yc/Mn0i+rQXduu8hcrFKvO7Eryk+09NecTQAAQ== + version "18.1.3" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0" + integrity sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ== dependencies: camelcase "^5.0.0" decamelize "^1.2.0" -yargs-unparser@1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-1.6.0.tgz#ef25c2c769ff6bd09e4b0f9d7c605fb27846ea9f" - integrity sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw== - dependencies: - flat "^4.1.0" - lodash "^4.17.15" - yargs "^13.3.0" - -yargs@13.3.2, yargs@^13.3.0: - version "13.3.2" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd" - integrity sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw== - dependencies: - cliui "^5.0.0" - find-up "^3.0.0" - get-caller-file "^2.0.1" - require-directory "^2.1.1" - require-main-filename "^2.0.0" - set-blocking "^2.0.0" - string-width "^3.0.0" - which-module "^2.0.0" - y18n "^4.0.0" - yargs-parser "^13.1.2" - yargs@^12.0.5: version "12.0.5" resolved "https://registry.yarnpkg.com/yargs/-/yargs-12.0.5.tgz#05f5997b609647b64f66b81e3b4b10a368e7ad13" @@ -14852,7 +14803,7 @@ yargs@^2.3.0: dependencies: wordwrap "0.0.2" -yauzl@^2.4.2: +yauzl@^2.10.0, yauzl@^2.4.2: version "2.10.0" resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.10.0.tgz#c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9" integrity sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk= From 1cc205c274defb24f8b827b8a0c53c161c79d106 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Sat, 2 May 2020 17:58:06 +0200 Subject: [PATCH 052/106] chore: remove dependency on `realpath-native` (#9952) --- CHANGELOG.md | 1 + .../moduleNameMapper.test.ts.snap | 4 ++-- .../resolveNoFileExtensions.test.ts.snap | 2 +- e2e/__tests__/hasteMapSize.test.ts | 4 ++-- package.json | 1 - packages/jest-cli/package.json | 1 - packages/jest-cli/src/cli/index.ts | 5 ++--- packages/jest-cli/src/init/index.ts | 4 ++-- packages/jest-config/package.json | 3 +-- packages/jest-config/src/getCacheDirectory.ts | 7 ++++--- packages/jest-config/src/index.ts | 4 ++-- packages/jest-config/src/normalize.ts | 7 +++---- packages/jest-core/package.json | 1 - packages/jest-core/src/runJest.ts | 5 ++--- packages/jest-resolve/package.json | 2 +- .../src/__tests__/resolve.test.ts | 7 +++++-- packages/jest-resolve/src/defaultResolver.ts | 14 ++----------- packages/jest-resolve/src/index.ts | 7 +++---- packages/jest-resolve/src/nodeModulesPaths.ts | 4 ++-- packages/jest-runtime/package.json | 1 - packages/jest-runtime/src/cli/index.ts | 5 ++--- packages/jest-transform/package.json | 1 - .../jest-transform/src/ScriptTransformer.ts | 18 +++++++--------- .../src/__tests__/script_transformer.test.js | 7 ++++++- packages/jest-util/src/index.ts | 1 + packages/jest-util/src/tryRealpath.ts | 21 +++++++++++++++++++ 26 files changed, 72 insertions(+), 65 deletions(-) create mode 100644 packages/jest-util/src/tryRealpath.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index a8175d2a73b6..020c97b4cb4b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ - `[*]` [**BREAKING**] TypeScript definitions requires a minimum of TypeScript v3.8 ([#9823](https://github.com/facebook/jest/pull/9823)) - `[*]` [**BREAKING**] Drop support for Node 8 ([#9423](https://github.com/facebook/jest/pull/9423)) - `[*]` Upgrade to chalk@4 ([#9752](https://github.com/facebook/jest/pull/9752)) +- `[*]` Remove usage of `realpath-native` ([#9952](https://github.com/facebook/jest/pull/9952)) - `[jest-runtime]` [**BREAKING**] Remove long-deprecated `require.requireActual` and `require.requireMock` methods ([#9854](https://github.com/facebook/jest/pull/9854)) - `[expect, jest-mock, pretty-format]` [**BREAKING**] Remove `build-es5` from package ([#9945](https://github.com/facebook/jest/pull/9945)) - `[jest-haste-map]` [**BREAKING**] removed `providesModuleNodeModules` ([#8535](https://github.com/facebook/jest/pull/8535)) diff --git a/e2e/__tests__/__snapshots__/moduleNameMapper.test.ts.snap b/e2e/__tests__/__snapshots__/moduleNameMapper.test.ts.snap index 3541cc32ec0a..d65a0391ff07 100644 --- a/e2e/__tests__/__snapshots__/moduleNameMapper.test.ts.snap +++ b/e2e/__tests__/__snapshots__/moduleNameMapper.test.ts.snap @@ -36,7 +36,7 @@ FAIL __tests__/index.js 12 | module.exports = () => 'test'; 13 | - at createNoMappedModuleFoundError (../../packages/jest-resolve/build/index.js:542:17) + at createNoMappedModuleFoundError (../../packages/jest-resolve/build/index.js:541:17) at Object.require (index.js:10:1) `; @@ -65,6 +65,6 @@ FAIL __tests__/index.js 12 | module.exports = () => 'test'; 13 | - at createNoMappedModuleFoundError (../../packages/jest-resolve/build/index.js:542:17) + at createNoMappedModuleFoundError (../../packages/jest-resolve/build/index.js:541:17) at Object.require (index.js:10:1) `; diff --git a/e2e/__tests__/__snapshots__/resolveNoFileExtensions.test.ts.snap b/e2e/__tests__/__snapshots__/resolveNoFileExtensions.test.ts.snap index 3796725b10a7..a62a66e69f80 100644 --- a/e2e/__tests__/__snapshots__/resolveNoFileExtensions.test.ts.snap +++ b/e2e/__tests__/__snapshots__/resolveNoFileExtensions.test.ts.snap @@ -37,6 +37,6 @@ FAIL __tests__/test.js | ^ 9 | - at Resolver.resolveModule (../../packages/jest-resolve/build/index.js:297:11) + at Resolver.resolveModule (../../packages/jest-resolve/build/index.js:296:11) at Object.require (index.js:8:18) `; diff --git a/e2e/__tests__/hasteMapSize.test.ts b/e2e/__tests__/hasteMapSize.test.ts index 610ef1af3227..228eb83f1e7d 100644 --- a/e2e/__tests__/hasteMapSize.test.ts +++ b/e2e/__tests__/hasteMapSize.test.ts @@ -7,11 +7,11 @@ import {tmpdir} from 'os'; import * as path from 'path'; +import {realpathSync} from 'graceful-fs'; import HasteMap = require('jest-haste-map'); -import {sync as realpath} from 'realpath-native'; import {cleanup, writeFiles} from '../Utils'; -const DIR = path.resolve(realpath(tmpdir()), 'haste_map_size'); +const DIR = path.resolve(realpathSync.native(tmpdir()), 'haste_map_size'); beforeEach(() => { cleanup(DIR); diff --git a/package.json b/package.json index 18d96ca8fa16..2a7707c2a31d 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,6 @@ "prettier": "^2.0.1", "progress": "^2.0.0", "promise": "^8.0.2", - "realpath-native": "^2.0.0", "resolve": "^1.15.0", "rimraf": "^3.0.0", "semver": "^7.3.2", diff --git a/packages/jest-cli/package.json b/packages/jest-cli/package.json index 2cdeae5b3054..eb3bfc715299 100644 --- a/packages/jest-cli/package.json +++ b/packages/jest-cli/package.json @@ -17,7 +17,6 @@ "jest-util": "^26.0.0-alpha.0", "jest-validate": "^26.0.0-alpha.0", "prompts": "^2.0.1", - "realpath-native": "^2.0.0", "yargs": "^15.3.1" }, "devDependencies": { diff --git a/packages/jest-cli/src/cli/index.ts b/packages/jest-cli/src/cli/index.ts index 06fb3bf4d31a..41d3302c7e0c 100644 --- a/packages/jest-cli/src/cli/index.ts +++ b/packages/jest-cli/src/cli/index.ts @@ -8,14 +8,13 @@ import * as path from 'path'; import type {Config} from '@jest/types'; import type {AggregatedResult} from '@jest/test-result'; -import {clearLine} from 'jest-util'; +import {clearLine, tryRealpath} from 'jest-util'; import {validateCLIOptions} from 'jest-validate'; import {deprecationEntries} from 'jest-config'; import {getVersion, runCLI} from '@jest/core'; import chalk = require('chalk'); import exit = require('exit'); import yargs = require('yargs'); -import {sync as realpath} from 'realpath-native'; import init from '../init'; import * as args from './args'; @@ -97,7 +96,7 @@ const getProjectListFromCLIArgs = ( if (!projects.length && process.platform === 'win32') { try { - projects.push(realpath(process.cwd())); + projects.push(tryRealpath(process.cwd())); } catch (err) { // do nothing, just catch error // process.binding('fs').realpath can throw, e.g. on mapped drives diff --git a/packages/jest-cli/src/init/index.ts b/packages/jest-cli/src/init/index.ts index b2503fc901f3..bd7c030b09e3 100644 --- a/packages/jest-cli/src/init/index.ts +++ b/packages/jest-cli/src/init/index.ts @@ -9,8 +9,8 @@ import * as path from 'path'; import * as fs from 'graceful-fs'; import chalk = require('chalk'); import prompts = require('prompts'); -import {sync as realpath} from 'realpath-native'; import {constants} from 'jest-config'; +import {tryRealpath} from 'jest-util'; import defaultQuestions, {testScriptQuestion} from './questions'; import {MalformedPackageJsonError, NotFoundPackageJsonError} from './errors'; import generateConfigFile from './generate_config_file'; @@ -35,7 +35,7 @@ type PromptsResults = { const getConfigFilename = (ext: string) => JEST_CONFIG_BASE_NAME + ext; export default async ( - rootDir: string = realpath(process.cwd()), + rootDir: string = tryRealpath(process.cwd()), ): Promise => { // prerequisite checks const projectPackageJsonPath: string = path.join(rootDir, PACKAGE_JSON); diff --git a/packages/jest-config/package.json b/packages/jest-config/package.json index baba47cccfc1..a5f29e8168d2 100644 --- a/packages/jest-config/package.json +++ b/packages/jest-config/package.json @@ -27,8 +27,7 @@ "jest-util": "^26.0.0-alpha.0", "jest-validate": "^26.0.0-alpha.0", "micromatch": "^4.0.2", - "pretty-format": "^26.0.0-alpha.0", - "realpath-native": "^2.0.0" + "pretty-format": "^26.0.0-alpha.0" }, "devDependencies": { "@types/babel__core": "^7.0.4", diff --git a/packages/jest-config/src/getCacheDirectory.ts b/packages/jest-config/src/getCacheDirectory.ts index 2871d1e5eaab..c23a08870a26 100644 --- a/packages/jest-config/src/getCacheDirectory.ts +++ b/packages/jest-config/src/getCacheDirectory.ts @@ -7,11 +7,12 @@ import * as path from 'path'; import {tmpdir} from 'os'; -import {sync as realpath} from 'realpath-native'; +import type {Config} from '@jest/types'; +import {tryRealpath} from 'jest-util'; -const getCacheDirectory = () => { +const getCacheDirectory: () => Config.Path = () => { const {getuid} = process; - const tmpdirPath = path.join(realpath(tmpdir()), 'jest'); + const tmpdirPath = path.join(tryRealpath(tmpdir()), 'jest'); if (getuid == null) { return tmpdirPath; } else { diff --git a/packages/jest-config/src/index.ts b/packages/jest-config/src/index.ts index 0bcb65fc670e..68d6b5ddf55c 100644 --- a/packages/jest-config/src/index.ts +++ b/packages/jest-config/src/index.ts @@ -8,8 +8,8 @@ import * as path from 'path'; import * as fs from 'graceful-fs'; import type {Config} from '@jest/types'; +import {tryRealpath} from 'jest-util'; import chalk = require('chalk'); -import {sync as realpath} from 'realpath-native'; import {isJSONString, replaceRootDirInPath} from './utils'; import normalize from './normalize'; import resolveConfigPath from './resolveConfigPath'; @@ -295,7 +295,7 @@ export async function readConfigs( if (projects.length > 0) { const projectIsCwd = process.platform === 'win32' - ? projects[0] === realpath(process.cwd()) + ? projects[0] === tryRealpath(process.cwd()) : projects[0] === process.cwd(); const parsedConfigs = await Promise.all( diff --git a/packages/jest-config/src/normalize.ts b/packages/jest-config/src/normalize.ts index 75727fa23c74..8ec7da7f35a2 100644 --- a/packages/jest-config/src/normalize.ts +++ b/packages/jest-config/src/normalize.ts @@ -11,10 +11,9 @@ import {statSync} from 'graceful-fs'; import {sync as glob} from 'glob'; import type {Config} from '@jest/types'; import {ValidationError, validate} from 'jest-validate'; -import {clearLine, replacePathSepForGlob} from 'jest-util'; +import {clearLine, replacePathSepForGlob, tryRealpath} from 'jest-util'; import chalk = require('chalk'); import micromatch = require('micromatch'); -import {sync as realpath} from 'realpath-native'; import Resolver = require('jest-resolve'); import {replacePathSepForRegex} from 'jest-regex-util'; import merge = require('deepmerge'); @@ -391,7 +390,7 @@ const normalizeRootDir = ( try { // try to resolve windows short paths, ignoring errors (permission errors, mostly) - options.rootDir = realpath(options.rootDir); + options.rootDir = tryRealpath(options.rootDir); } catch (e) { // ignored } @@ -955,7 +954,7 @@ export default function normalize( try { // try to resolve windows short paths, ignoring errors (permission errors, mostly) - newOptions.cwd = realpath(process.cwd()); + newOptions.cwd = tryRealpath(process.cwd()); } catch (e) { // ignored } diff --git a/packages/jest-core/package.json b/packages/jest-core/package.json index 98d95d21bcdf..831e401092e6 100644 --- a/packages/jest-core/package.json +++ b/packages/jest-core/package.json @@ -29,7 +29,6 @@ "jest-watcher": "^26.0.0-alpha.0", "micromatch": "^4.0.2", "p-each-series": "^2.1.0", - "realpath-native": "^2.0.0", "rimraf": "^3.0.0", "slash": "^3.0.0", "strip-ansi": "^6.0.0" diff --git a/packages/jest-core/src/runJest.ts b/packages/jest-core/src/runJest.ts index bea930899c0d..91107ee0637c 100644 --- a/packages/jest-core/src/runJest.ts +++ b/packages/jest-core/src/runJest.ts @@ -7,9 +7,8 @@ import * as path from 'path'; import chalk = require('chalk'); -import {sync as realpath} from 'realpath-native'; import {CustomConsole} from '@jest/console'; -import {interopRequireDefault} from 'jest-util'; +import {interopRequireDefault, tryRealpath} from 'jest-util'; import exit = require('exit'); import * as fs from 'graceful-fs'; import {JestHook, JestHookEmitter} from 'jest-watcher'; @@ -100,7 +99,7 @@ const processResults = ( } if (isJSON) { if (outputFile) { - const cwd = realpath(process.cwd()); + const cwd = tryRealpath(process.cwd()); const filePath = path.resolve(cwd, outputFile); fs.writeFileSync(filePath, JSON.stringify(formatTestResults(runResults))); diff --git a/packages/jest-resolve/package.json b/packages/jest-resolve/package.json index f563a3946c0a..91936f09cf0f 100644 --- a/packages/jest-resolve/package.json +++ b/packages/jest-resolve/package.json @@ -11,11 +11,11 @@ "types": "build/index.d.ts", "dependencies": { "@jest/types": "^26.0.0-alpha.0", + "jest-util": "^26.0.0-alpha.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.4", "jest-pnp-resolver": "^1.2.1", "read-pkg-up": "^7.0.1", - "realpath-native": "^2.0.0", "resolve": "^1.17.0", "slash": "^3.0.0" }, diff --git a/packages/jest-resolve/src/__tests__/resolve.test.ts b/packages/jest-resolve/src/__tests__/resolve.test.ts index a1f7f49a865b..6ecefafd513d 100644 --- a/packages/jest-resolve/src/__tests__/resolve.test.ts +++ b/packages/jest-resolve/src/__tests__/resolve.test.ts @@ -234,8 +234,11 @@ describe('Resolver.getModulePaths() -> nodeModulesPaths()', () => { // pathstrings instead of actually trying to access the physical directory. // This test suite won't work otherwise, since we cannot make assumptions // about the test environment when it comes to absolute paths. - jest.doMock('realpath-native', () => ({ - sync: (dirInput: string) => dirInput, + jest.doMock('graceful-fs', () => ({ + ...jest.requireActual('graceful-fs'), + realPathSync: { + native: (dirInput: string) => dirInput, + }, })); }); diff --git a/packages/jest-resolve/src/defaultResolver.ts b/packages/jest-resolve/src/defaultResolver.ts index cb570d390a5a..77e4c6981546 100644 --- a/packages/jest-resolve/src/defaultResolver.ts +++ b/packages/jest-resolve/src/defaultResolver.ts @@ -7,8 +7,8 @@ import * as fs from 'graceful-fs'; import {sync as resolveSync} from 'resolve'; -import {sync as realpath} from 'realpath-native'; import pnpResolver from 'jest-pnp-resolver'; +import {tryRealpath} from 'jest-util'; import type {Config} from '@jest/types'; type ResolverOptions = { @@ -95,17 +95,7 @@ function realpathCached(path: Config.Path): Config.Path { return result; } - try { - result = realpath(path); - } catch (error) { - if (error.code !== 'ENOENT') { - throw error; - } - } - - if (!result) { - result = path; - } + result = tryRealpath(path); checkedRealpathPaths.set(path, result); diff --git a/packages/jest-resolve/src/index.ts b/packages/jest-resolve/src/index.ts index 1c04a9429f96..1efebd10b974 100644 --- a/packages/jest-resolve/src/index.ts +++ b/packages/jest-resolve/src/index.ts @@ -8,14 +8,14 @@ import * as path from 'path'; import type {Config} from '@jest/types'; import type {ModuleMap} from 'jest-haste-map'; -import {sync as realpath} from 'realpath-native'; -import chalk = require('chalk'); +import {tryRealpath} from 'jest-util'; import nodeModulesPaths from './nodeModulesPaths'; import isBuiltinModule from './isBuiltinModule'; import defaultResolver, {clearDefaultResolverCache} from './defaultResolver'; import type {ResolverConfig} from './types'; import ModuleNotFoundError from './ModuleNotFoundError'; import shouldLoadAsEsm, {clearCachedLookups} from './shouldLoadAsEsm'; +import chalk = require('chalk'); type FindNodeModuleConfig = { basedir: Config.Path; @@ -41,8 +41,7 @@ namespace Resolver { const NATIVE_PLATFORM = 'native'; // We might be inside a symlink. -const cwd = process.cwd(); -const resolvedCwd = realpath(cwd) || cwd; +const resolvedCwd = tryRealpath(process.cwd()); const {NODE_PATH} = process.env; const nodePaths = NODE_PATH ? NODE_PATH.split(path.delimiter) diff --git a/packages/jest-resolve/src/nodeModulesPaths.ts b/packages/jest-resolve/src/nodeModulesPaths.ts index dddf52229a13..1c311b70df52 100644 --- a/packages/jest-resolve/src/nodeModulesPaths.ts +++ b/packages/jest-resolve/src/nodeModulesPaths.ts @@ -9,7 +9,7 @@ import * as path from 'path'; import type {Config} from '@jest/types'; -import {sync as realpath} from 'realpath-native'; +import {tryRealpath} from 'jest-util'; type NodeModulesPathsOptions = { moduleDirectory?: Array; @@ -40,7 +40,7 @@ export default function nodeModulesPaths( // traverses parents of the physical path, not the symlinked path let physicalBasedir; try { - physicalBasedir = realpath(basedirAbs); + physicalBasedir = tryRealpath(basedirAbs); } catch (err) { // realpath can throw, e.g. on mapped drives physicalBasedir = basedirAbs; diff --git a/packages/jest-runtime/package.json b/packages/jest-runtime/package.json index 2891ea3efc65..9a934f038170 100644 --- a/packages/jest-runtime/package.json +++ b/packages/jest-runtime/package.json @@ -32,7 +32,6 @@ "jest-snapshot": "^26.0.0-alpha.0", "jest-util": "^26.0.0-alpha.0", "jest-validate": "^26.0.0-alpha.0", - "realpath-native": "^2.0.0", "slash": "^3.0.0", "strip-bom": "^4.0.0", "yargs": "^15.3.1" diff --git a/packages/jest-runtime/src/cli/index.ts b/packages/jest-runtime/src/cli/index.ts index 099373e2f67c..490848a2ba1e 100644 --- a/packages/jest-runtime/src/cli/index.ts +++ b/packages/jest-runtime/src/cli/index.ts @@ -8,12 +8,11 @@ import {cpus} from 'os'; import * as path from 'path'; import chalk = require('chalk'); -import {sync as realpath} from 'realpath-native'; import yargs = require('yargs'); import type {Config} from '@jest/types'; import type {JestEnvironment} from '@jest/environment'; import {CustomConsole} from '@jest/console'; -import {setGlobal} from 'jest-util'; +import {setGlobal, tryRealpath} from 'jest-util'; import {validateCLIOptions} from 'jest-validate'; import {deprecationEntries, readConfig} from 'jest-config'; import {VERSION} from '../version'; @@ -53,7 +52,7 @@ export async function run( return; } - const root = realpath(process.cwd()); + const root = tryRealpath(process.cwd()); const filePath = path.resolve(root, argv._[0]); if (argv.debug) { diff --git a/packages/jest-transform/package.json b/packages/jest-transform/package.json index 3265e7083aa3..68e6d8912662 100644 --- a/packages/jest-transform/package.json +++ b/packages/jest-transform/package.json @@ -22,7 +22,6 @@ "jest-util": "^26.0.0-alpha.0", "micromatch": "^4.0.2", "pirates": "^4.0.1", - "realpath-native": "^2.0.0", "slash": "^3.0.0", "source-map": "^0.6.1", "write-file-atomic": "^3.0.0" diff --git a/packages/jest-transform/src/ScriptTransformer.ts b/packages/jest-transform/src/ScriptTransformer.ts index 46ae3afb049f..0cf17915da3c 100644 --- a/packages/jest-transform/src/ScriptTransformer.ts +++ b/packages/jest-transform/src/ScriptTransformer.ts @@ -8,7 +8,12 @@ import {createHash} from 'crypto'; import * as path from 'path'; import type {Config} from '@jest/types'; -import {createDirectory, interopRequireDefault, isPromise} from 'jest-util'; +import { + createDirectory, + interopRequireDefault, + isPromise, + tryRealpath, +} from 'jest-util'; import * as fs from 'graceful-fs'; import {transformSync as babelTransform} from '@babel/core'; // @ts-ignore: should just be `require.resolve`, but the tests mess that up @@ -18,7 +23,6 @@ import HasteMap = require('jest-haste-map'); import stableStringify = require('fast-json-stable-stringify'); import slash = require('slash'); import {sync as writeFileAtomic} from 'write-file-atomic'; -import {sync as realpath} from 'realpath-native'; import {addHook} from 'pirates'; import type { Options, @@ -247,14 +251,6 @@ export default class ScriptTransformer { return input; } - private _getRealPath(filepath: Config.Path): Config.Path { - try { - return realpath(filepath) || filepath; - } catch (err) { - return filepath; - } - } - // We don't want to expose transformers to the outside - this function is just // to warm up `this._transformCache` preloadTransformer(filepath: Config.Path): void { @@ -269,7 +265,7 @@ export default class ScriptTransformer { supportsDynamicImport = false, supportsStaticESM = false, ): TransformResult { - const filename = this._getRealPath(filepath); + const filename = tryRealpath(filepath); const transform = this._getTransformer(filename); const cacheFilePath = this._getFileCachePath( filename, diff --git a/packages/jest-transform/src/__tests__/script_transformer.test.js b/packages/jest-transform/src/__tests__/script_transformer.test.js index 6479bc62e1ce..4d2796689fa6 100644 --- a/packages/jest-transform/src/__tests__/script_transformer.test.js +++ b/packages/jest-transform/src/__tests__/script_transformer.test.js @@ -29,7 +29,12 @@ jest }), }), ) - .mock('graceful-fs') + .mock('graceful-fs', () => ({ + ...jest.requireActual('graceful-fs'), + realPathSync: { + native: dirInput => dirInput, + }, + })) .mock('jest-haste-map', () => ({ getCacheFilePath: (cacheDir, baseDir, version) => cacheDir + baseDir, })) diff --git a/packages/jest-util/src/index.ts b/packages/jest-util/src/index.ts index e8318c550bbf..cfd00f7fd55d 100644 --- a/packages/jest-util/src/index.ts +++ b/packages/jest-util/src/index.ts @@ -21,5 +21,6 @@ export {default as testPathPatternToRegExp} from './testPathPatternToRegExp'; import * as preRunMessage from './preRunMessage'; export {default as pluralize} from './pluralize'; export {default as formatTime} from './formatTime'; +export {default as tryRealpath} from './tryRealpath'; export {preRunMessage, specialChars}; diff --git a/packages/jest-util/src/tryRealpath.ts b/packages/jest-util/src/tryRealpath.ts new file mode 100644 index 000000000000..ff14e377a963 --- /dev/null +++ b/packages/jest-util/src/tryRealpath.ts @@ -0,0 +1,21 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +import {realpathSync} from 'graceful-fs'; +import type {Config} from '@jest/types'; + +export default function tryRealpath(path: Config.Path): Config.Path { + try { + path = realpathSync.native(path); + } catch (error) { + if (error.code !== 'ENOENT') { + throw error; + } + } + + return path; +} From b6052e02e7de30a76e98d04bf48d3437d0091408 Mon Sep 17 00:00:00 2001 From: Michael Wu Date: Sun, 3 May 2020 01:12:25 +0900 Subject: [PATCH 053/106] Update jest-phabricator documentation (#8662) --- CHANGELOG.md | 1 + packages/jest-phabricator/README.md | 22 ++++++++++++++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 020c97b4cb4b..e594f68425cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ - `[jest-runtime]` [**BREAKING**] Remove long-deprecated `require.requireActual` and `require.requireMock` methods ([#9854](https://github.com/facebook/jest/pull/9854)) - `[expect, jest-mock, pretty-format]` [**BREAKING**] Remove `build-es5` from package ([#9945](https://github.com/facebook/jest/pull/9945)) - `[jest-haste-map]` [**BREAKING**] removed `providesModuleNodeModules` ([#8535](https://github.com/facebook/jest/pull/8535)) +- `[docs]` Fix example reference implementation to use Jest with Phabricator ([#8662](https://github.com/facebook/jest/pull/8662)) ### Performance diff --git a/packages/jest-phabricator/README.md b/packages/jest-phabricator/README.md index 97a3fdf505be..c657a1f7276c 100644 --- a/packages/jest-phabricator/README.md +++ b/packages/jest-phabricator/README.md @@ -16,6 +16,15 @@ You need to add the jest unit engine to your .arcconfig: ... ``` +Or use the `ArcanistConfigurationDrivenUnitTestEngine` and add an entry to your .arcunit + +```json +"jest": { + "type": "jest", + "include": "(\\.js$)" +} +``` + In `JestUnitTestEngine` there are a couple of constants you probably need to modify: - `PROCESSOR` points to the path or the processor @@ -26,12 +35,16 @@ If you need to pass to Jest a custom configuration you can either use `JEST_PATH ## Reference implementation ```php -class JestUnitTestEngine extends ArcanistBaseUnitTestEngine { +final class JestUnitTestEngine extends ArcanistUnitTestEngine { const PROCESSOR = 'jest/packages/jest-phabricator/build/index.js'; const JEST_PATH = 'jest/packages/jest/bin/jest.js'; const TOO_MANY_FILES_TO_COVER = 100; const GIGANTIC_DIFF_THRESHOLD = 200; + public function getEngineConfigurationName() { + return 'jest'; + } + private function getRoot() { return $this->getWorkingCopy()->getProjectRoot(); } @@ -129,6 +142,9 @@ class JestUnitTestEngine extends ArcanistBaseUnitTestEngine { $results[] = $this->getFutureResults($future); } + if (empty($results)) { + return array(); + } return call_user_func_array('array_merge', $results); } @@ -177,6 +193,7 @@ class JestUnitTestEngine extends ArcanistBaseUnitTestEngine { } $console->writeOut("Finished tests.\n"); + // $console->writeErr(implode(', ', $result_arrays)); return call_user_func_array('array_merge', $result_arrays); } @@ -184,8 +201,8 @@ class JestUnitTestEngine extends ArcanistBaseUnitTestEngine { $output_JSON = $this->getOutputJSON(); $options = array( '--colors', - '--findRelatedTests', '--json', + '--passWithNoTests true', '--outputFile=' . $output_JSON, '--testResultsProcessor=' . self::PROCESSOR ); @@ -194,6 +211,7 @@ class JestUnitTestEngine extends ArcanistBaseUnitTestEngine { // A better solution would involve knowing what's the machine buffer size limit // for exec and check if the command can stay within it. if (count($paths) < self::TOO_MANY_FILES_TO_COVER) { + $options[] = '--findRelatedTests ' . join(' ', $paths); $options[] = '--coverage'; $options[] = '--collectCoverageOnlyFrom '. join(' ', $paths); } From 3078172822bce962e73dc12b22290f34605646df Mon Sep 17 00:00:00 2001 From: Daniel Morrison Date: Sat, 2 May 2020 19:11:57 +0100 Subject: [PATCH 054/106] Updated config docs with default transform value (#8583) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Updated config docs - transform I've added a default option to clear up any confusion, hopefully that will make it more obvious how it should be added back in when additional transformers are added. * Updated change log for #8583 * Update docs/Configuration.md Co-Authored-By: Tim Seckinger * Update Configuration.md * transform is an object instead of array - fixing. * --amend * update versioned docs Co-authored-by: Tim Seckinger Co-authored-by: Michał Pierzchała --- CHANGELOG.md | 1 + docs/Configuration.md | 4 ++-- website/versioned_docs/version-22.x/Configuration.md | 4 ++-- website/versioned_docs/version-23.x/Configuration.md | 4 ++-- website/versioned_docs/version-24.x/Configuration.md | 4 ++-- website/versioned_docs/version-25.1/Configuration.md | 4 ++-- website/versioned_docs/version-25.3/Configuration.md | 4 ++-- website/versioned_docs/version-25.5/Configuration.md | 4 ++-- 8 files changed, 15 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e594f68425cf..9f18737254d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ - `[expect, jest-mock, pretty-format]` [**BREAKING**] Remove `build-es5` from package ([#9945](https://github.com/facebook/jest/pull/9945)) - `[jest-haste-map]` [**BREAKING**] removed `providesModuleNodeModules` ([#8535](https://github.com/facebook/jest/pull/8535)) - `[docs]` Fix example reference implementation to use Jest with Phabricator ([#8662](https://github.com/facebook/jest/pull/8662)) +- `[docs]` Added default compiler to tranform ([#8583](https://github.com/facebook/jest/pull/8583)) ### Performance diff --git a/docs/Configuration.md b/docs/Configuration.md index 37dbef0871f6..2edb1f7132e9 100644 --- a/docs/Configuration.md +++ b/docs/Configuration.md @@ -1119,7 +1119,7 @@ Setting this value to `fake` allows the use of fake timers for functions such as ### `transform` [object\] -Default: `undefined` +Default: `{"^.+\\.[jt]sx?$": "babel-jest"}` A map from regular expressions to paths to transformers. A transformer is a module that provides a synchronous function for transforming source files. For example, if you wanted to be able to use a new language feature in your modules or tests that isn't yet supported by node, you might plug in one of many compilers that compile a future version of JavaScript to a current one. Example: see the [examples/typescript](https://github.com/facebook/jest/blob/master/examples/typescript/package.json#L16) example or the [webpack tutorial](Webpack.md). @@ -1134,7 +1134,7 @@ You can pass configuration to a transformer like `{filePattern: ['path-to-transf _Note: a transformer is only run once per file unless the file has changed. During development of a transformer it can be useful to run Jest with `--no-cache` to frequently [delete Jest's cache](Troubleshooting.md#caching-issues)._ -_Note: if you are using the `babel-jest` transformer and want to use an additional code preprocessor, keep in mind that when "transform" is overwritten in any way the `babel-jest` is not loaded automatically anymore. If you want to use it to compile JavaScript code it has to be explicitly defined. See [babel-jest plugin](https://github.com/facebook/jest/tree/master/packages/babel-jest#setup)_ +_Note: when adding additional code transformers, this will overwrite the default config and `babel-jest` is no longer automatically loaded. If you want to use it to compile JavaScript or Typescript, it has to be explicitly defined by adding `{"^.+\\.[jt]sx?$": "babel-jest"}` to the transform property. See [babel-jest plugin](https://github.com/facebook/jest/tree/master/packages/babel-jest#setup)_ ### `transformIgnorePatterns` [array\] diff --git a/website/versioned_docs/version-22.x/Configuration.md b/website/versioned_docs/version-22.x/Configuration.md index f1be8eb98924..041f4ac17f77 100644 --- a/website/versioned_docs/version-22.x/Configuration.md +++ b/website/versioned_docs/version-22.x/Configuration.md @@ -835,7 +835,7 @@ Setting this value to `fake` allows the use of fake timers for functions such as ### `transform` [object\] -Default: `undefined` +Default: `{"^.+\\.[jt]sx?$": "babel-jest"}` A map from regular expressions to paths to transformers. A transformer is a module that provides a synchronous function for transforming source files. For example, if you wanted to be able to use a new language feature in your modules or tests that isn't yet supported by node, you might plug in one of many compilers that compile a future version of JavaScript to a current one. Example: see the [examples/typescript](https://github.com/facebook/jest/blob/master/examples/typescript/package.json#L16) example or the [webpack tutorial](Webpack.md). @@ -848,7 +848,7 @@ Examples of such compilers include: _Note: a transformer is only run once per file unless the file has changed. During development of a transformer it can be useful to run Jest with `--no-cache` to frequently [delete Jest's cache](Troubleshooting.md#caching-issues)._ -_Note: if you are using the `babel-jest` transformer and want to use an additional code preprocessor, keep in mind that when "transform" is overwritten in any way the `babel-jest` is not loaded automatically anymore. If you want to use it to compile JavaScript code it has to be explicitly defined. See [babel-jest plugin](https://github.com/facebook/jest/tree/master/packages/babel-jest#setup)_ +_Note: when adding additional code transformers, this will overwrite the default config and `babel-jest` is no longer automatically loaded. If you want to use it to compile JavaScript or Typescript, it has to be explicitly defined by adding `{"^.+\\.[jt]sx?$": "babel-jest"}` to the transform property. See [babel-jest plugin](https://github.com/facebook/jest/tree/master/packages/babel-jest#setup)_ ### `transformIgnorePatterns` [array\] diff --git a/website/versioned_docs/version-23.x/Configuration.md b/website/versioned_docs/version-23.x/Configuration.md index 178809f2b84b..9f139dbe56a1 100644 --- a/website/versioned_docs/version-23.x/Configuration.md +++ b/website/versioned_docs/version-23.x/Configuration.md @@ -904,7 +904,7 @@ Setting this value to `fake` allows the use of fake timers for functions such as ### `transform` [object\] -Default: `undefined` +Default: `{"^.+\\.[jt]sx?$": "babel-jest"}` A map from regular expressions to paths to transformers. A transformer is a module that provides a synchronous function for transforming source files. For example, if you wanted to be able to use a new language feature in your modules or tests that isn't yet supported by node, you might plug in one of many compilers that compile a future version of JavaScript to a current one. Example: see the [examples/typescript](https://github.com/facebook/jest/blob/master/examples/typescript/package.json#L16) example or the [webpack tutorial](Webpack.md). @@ -917,7 +917,7 @@ Examples of such compilers include: _Note: a transformer is only run once per file unless the file has changed. During development of a transformer it can be useful to run Jest with `--no-cache` to frequently [delete Jest's cache](Troubleshooting.md#caching-issues)._ -_Note: if you are using the `babel-jest` transformer and want to use an additional code preprocessor, keep in mind that when "transform" is overwritten in any way the `babel-jest` is not loaded automatically anymore. If you want to use it to compile JavaScript code it has to be explicitly defined. See [babel-jest plugin](https://github.com/facebook/jest/tree/master/packages/babel-jest#setup)_ +_Note: when adding additional code transformers, this will overwrite the default config and `babel-jest` is no longer automatically loaded. If you want to use it to compile JavaScript or Typescript, it has to be explicitly defined by adding `{"^.+\\.[jt]sx?$": "babel-jest"}` to the transform property. See [babel-jest plugin](https://github.com/facebook/jest/tree/master/packages/babel-jest#setup)_ ### `transformIgnorePatterns` [array\] diff --git a/website/versioned_docs/version-24.x/Configuration.md b/website/versioned_docs/version-24.x/Configuration.md index ffc940ea66bb..680a60f4977d 100644 --- a/website/versioned_docs/version-24.x/Configuration.md +++ b/website/versioned_docs/version-24.x/Configuration.md @@ -1092,7 +1092,7 @@ Setting this value to `fake` allows the use of fake timers for functions such as ### `transform` [object\] -Default: `undefined` +Default: `{"^.+\\.[jt]sx?$": "babel-jest"}` A map from regular expressions to paths to transformers. A transformer is a module that provides a synchronous function for transforming source files. For example, if you wanted to be able to use a new language feature in your modules or tests that isn't yet supported by node, you might plug in one of many compilers that compile a future version of JavaScript to a current one. Example: see the [examples/typescript](https://github.com/facebook/jest/blob/master/examples/typescript/package.json#L16) example or the [webpack tutorial](Webpack.md). @@ -1107,7 +1107,7 @@ You can pass configuration to a transformer like `{filePattern: ['path-to-transf _Note: a transformer is only run once per file unless the file has changed. During development of a transformer it can be useful to run Jest with `--no-cache` to frequently [delete Jest's cache](Troubleshooting.md#caching-issues)._ -_Note: if you are using the `babel-jest` transformer and want to use an additional code preprocessor, keep in mind that when "transform" is overwritten in any way the `babel-jest` is not loaded automatically anymore. If you want to use it to compile JavaScript code it has to be explicitly defined. See [babel-jest plugin](https://github.com/facebook/jest/tree/master/packages/babel-jest#setup)_ +_Note: when adding additional code transformers, this will overwrite the default config and `babel-jest` is no longer automatically loaded. If you want to use it to compile JavaScript or Typescript, it has to be explicitly defined by adding `{"^.+\\.[jt]sx?$": "babel-jest"}` to the transform property. See [babel-jest plugin](https://github.com/facebook/jest/tree/master/packages/babel-jest#setup)_ ### `transformIgnorePatterns` [array\] diff --git a/website/versioned_docs/version-25.1/Configuration.md b/website/versioned_docs/version-25.1/Configuration.md index ea8a7682c213..41af1a1b9b47 100644 --- a/website/versioned_docs/version-25.1/Configuration.md +++ b/website/versioned_docs/version-25.1/Configuration.md @@ -1107,7 +1107,7 @@ Setting this value to `fake` allows the use of fake timers for functions such as ### `transform` [object\] -Default: `undefined` +Default: `{"^.+\\.[jt]sx?$": "babel-jest"}` A map from regular expressions to paths to transformers. A transformer is a module that provides a synchronous function for transforming source files. For example, if you wanted to be able to use a new language feature in your modules or tests that isn't yet supported by node, you might plug in one of many compilers that compile a future version of JavaScript to a current one. Example: see the [examples/typescript](https://github.com/facebook/jest/blob/master/examples/typescript/package.json#L16) example or the [webpack tutorial](Webpack.md). @@ -1122,7 +1122,7 @@ You can pass configuration to a transformer like `{filePattern: ['path-to-transf _Note: a transformer is only run once per file unless the file has changed. During development of a transformer it can be useful to run Jest with `--no-cache` to frequently [delete Jest's cache](Troubleshooting.md#caching-issues)._ -_Note: if you are using the `babel-jest` transformer and want to use an additional code preprocessor, keep in mind that when "transform" is overwritten in any way the `babel-jest` is not loaded automatically anymore. If you want to use it to compile JavaScript code it has to be explicitly defined. See [babel-jest plugin](https://github.com/facebook/jest/tree/master/packages/babel-jest#setup)_ +_Note: when adding additional code transformers, this will overwrite the default config and `babel-jest` is no longer automatically loaded. If you want to use it to compile JavaScript or Typescript, it has to be explicitly defined by adding `{"^.+\\.[jt]sx?$": "babel-jest"}` to the transform property. See [babel-jest plugin](https://github.com/facebook/jest/tree/master/packages/babel-jest#setup)_ ### `transformIgnorePatterns` [array\] diff --git a/website/versioned_docs/version-25.3/Configuration.md b/website/versioned_docs/version-25.3/Configuration.md index aebb2597a7c8..3c2a23692126 100644 --- a/website/versioned_docs/version-25.3/Configuration.md +++ b/website/versioned_docs/version-25.3/Configuration.md @@ -1120,7 +1120,7 @@ Setting this value to `fake` allows the use of fake timers for functions such as ### `transform` [object\] -Default: `undefined` +Default: `{"^.+\\.[jt]sx?$": "babel-jest"}` A map from regular expressions to paths to transformers. A transformer is a module that provides a synchronous function for transforming source files. For example, if you wanted to be able to use a new language feature in your modules or tests that isn't yet supported by node, you might plug in one of many compilers that compile a future version of JavaScript to a current one. Example: see the [examples/typescript](https://github.com/facebook/jest/blob/master/examples/typescript/package.json#L16) example or the [webpack tutorial](Webpack.md). @@ -1135,7 +1135,7 @@ You can pass configuration to a transformer like `{filePattern: ['path-to-transf _Note: a transformer is only run once per file unless the file has changed. During development of a transformer it can be useful to run Jest with `--no-cache` to frequently [delete Jest's cache](Troubleshooting.md#caching-issues)._ -_Note: if you are using the `babel-jest` transformer and want to use an additional code preprocessor, keep in mind that when "transform" is overwritten in any way the `babel-jest` is not loaded automatically anymore. If you want to use it to compile JavaScript code it has to be explicitly defined. See [babel-jest plugin](https://github.com/facebook/jest/tree/master/packages/babel-jest#setup)_ +_Note: when adding additional code transformers, this will overwrite the default config and `babel-jest` is no longer automatically loaded. If you want to use it to compile JavaScript or Typescript, it has to be explicitly defined by adding `{"^.+\\.[jt]sx?$": "babel-jest"}` to the transform property. See [babel-jest plugin](https://github.com/facebook/jest/tree/master/packages/babel-jest#setup)_ ### `transformIgnorePatterns` [array\] diff --git a/website/versioned_docs/version-25.5/Configuration.md b/website/versioned_docs/version-25.5/Configuration.md index 69e68bae0396..0655b2d4b1eb 100644 --- a/website/versioned_docs/version-25.5/Configuration.md +++ b/website/versioned_docs/version-25.5/Configuration.md @@ -1120,7 +1120,7 @@ Setting this value to `fake` allows the use of fake timers for functions such as ### `transform` [object\] -Default: `undefined` +Default: `{"^.+\\.[jt]sx?$": "babel-jest"}` A map from regular expressions to paths to transformers. A transformer is a module that provides a synchronous function for transforming source files. For example, if you wanted to be able to use a new language feature in your modules or tests that isn't yet supported by node, you might plug in one of many compilers that compile a future version of JavaScript to a current one. Example: see the [examples/typescript](https://github.com/facebook/jest/blob/master/examples/typescript/package.json#L16) example or the [webpack tutorial](Webpack.md). @@ -1135,7 +1135,7 @@ You can pass configuration to a transformer like `{filePattern: ['path-to-transf _Note: a transformer is only run once per file unless the file has changed. During development of a transformer it can be useful to run Jest with `--no-cache` to frequently [delete Jest's cache](Troubleshooting.md#caching-issues)._ -_Note: if you are using the `babel-jest` transformer and want to use an additional code preprocessor, keep in mind that when "transform" is overwritten in any way the `babel-jest` is not loaded automatically anymore. If you want to use it to compile JavaScript code it has to be explicitly defined. See [babel-jest plugin](https://github.com/facebook/jest/tree/master/packages/babel-jest#setup)_ +_Note: when adding additional code transformers, this will overwrite the default config and `babel-jest` is no longer automatically loaded. If you want to use it to compile JavaScript or Typescript, it has to be explicitly defined by adding `{"^.+\\.[jt]sx?$": "babel-jest"}` to the transform property. See [babel-jest plugin](https://github.com/facebook/jest/tree/master/packages/babel-jest#setup)_ ### `transformIgnorePatterns` [array\] From 42f920c1d117718d5ea6f34a5fe0cf1560bb6acc Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Sat, 2 May 2020 20:25:30 +0200 Subject: [PATCH 055/106] chore: update ts-eslint (#9953) --- package.json | 4 +- .../src/extractExpectedAssertionsErrors.ts | 10 ++++- .../jest-circus/src/formatNodeAssertErrors.ts | 5 ++- .../src/lib/active_filters_message.ts | 2 +- packages/jest-core/src/plugins/quit.ts | 6 +-- .../src/plugins/test_name_pattern.ts | 11 +++-- .../src/plugins/test_path_pattern.ts | 11 +++-- .../jest-core/src/plugins/update_snapshots.ts | 5 ++- .../plugins/update_snapshots_interactive.ts | 13 +++--- packages/jest-diff/src/index.ts | 1 + packages/jest-each/src/index.ts | 6 ++- packages/jest-environment-jsdom/src/index.ts | 4 +- packages/jest-haste-map/src/getMockName.ts | 2 +- .../src/lib/normalizePathSep.ts | 5 ++- .../src/assertionErrorMessage.ts | 2 +- packages/jest-types/src/Circus.ts | 2 +- packages/jest-validate/src/validate.ts | 5 ++- packages/jest-watcher/src/BaseWatchPlugin.ts | 4 +- packages/jest-watcher/src/JestHooks.ts | 4 +- yarn.lock | 40 +++++++++---------- 20 files changed, 83 insertions(+), 59 deletions(-) diff --git a/package.json b/package.json index 2a7707c2a31d..0f268394eaa3 100644 --- a/package.json +++ b/package.json @@ -18,8 +18,8 @@ "@types/jest": "24.0.2", "@types/node": "*", "@types/which": "^1.3.2", - "@typescript-eslint/eslint-plugin": "^2.19.0", - "@typescript-eslint/parser": "^2.19.0", + "@typescript-eslint/eslint-plugin": "^2.30.0", + "@typescript-eslint/parser": "^2.30.0", "ansi-regex": "^5.0.0", "ansi-styles": "^4.2.0", "babel-eslint": "^10.0.3", diff --git a/packages/expect/src/extractExpectedAssertionsErrors.ts b/packages/expect/src/extractExpectedAssertionsErrors.ts index de97acc2dc4d..44aa5ba95b2a 100644 --- a/packages/expect/src/extractExpectedAssertionsErrors.ts +++ b/packages/expect/src/extractExpectedAssertionsErrors.ts @@ -23,10 +23,16 @@ const resetAssertionsLocalState = () => { }); }; +type AssertionsErrors = Array<{ + actual: string; + error: string; + expected: string | number; +}>; + // Create and format all errors related to the mismatched number of `expect` // calls and reset the matcher's state. -const extractExpectedAssertionsErrors = () => { - const result = []; +const extractExpectedAssertionsErrors: () => AssertionsErrors = () => { + const result: AssertionsErrors = []; const { assertionCalls, expectedAssertionsNumber, diff --git a/packages/jest-circus/src/formatNodeAssertErrors.ts b/packages/jest-circus/src/formatNodeAssertErrors.ts index 69a3c144fd26..d9dbdee0bb8e 100644 --- a/packages/jest-circus/src/formatNodeAssertErrors.ts +++ b/packages/jest-circus/src/formatNodeAssertErrors.ts @@ -38,7 +38,10 @@ const humanReadableOperators: Record = { strictEqual: 'to strictly be equal', }; -const formatNodeAssertErrors = (event: Circus.Event, state: Circus.State) => { +const formatNodeAssertErrors = ( + event: Circus.Event, + state: Circus.State, +): void => { if (event.name === 'test_done') { event.test.errors = event.test.errors.map((errors: Circus.TestError) => { let error; diff --git a/packages/jest-core/src/lib/active_filters_message.ts b/packages/jest-core/src/lib/active_filters_message.ts index 9f7d40801743..7d2a29780487 100644 --- a/packages/jest-core/src/lib/active_filters_message.ts +++ b/packages/jest-core/src/lib/active_filters_message.ts @@ -11,7 +11,7 @@ import type {Config} from '@jest/types'; const activeFilters = ( globalConfig: Config.GlobalConfig, delimiter: string = '\n', -) => { +): string => { const {testNamePattern, testPathPattern} = globalConfig; if (testNamePattern || testPathPattern) { const filters = [ diff --git a/packages/jest-core/src/plugins/quit.ts b/packages/jest-core/src/plugins/quit.ts index 462de025729c..ac4c0646351e 100644 --- a/packages/jest-core/src/plugins/quit.ts +++ b/packages/jest-core/src/plugins/quit.ts @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import {BaseWatchPlugin} from 'jest-watcher'; +import {BaseWatchPlugin, UsageData} from 'jest-watcher'; class QuitPlugin extends BaseWatchPlugin { isInternal: true; @@ -15,7 +15,7 @@ class QuitPlugin extends BaseWatchPlugin { this.isInternal = true; } - async run() { + async run(): Promise { if (typeof this._stdin.setRawMode === 'function') { this._stdin.setRawMode(false); } @@ -23,7 +23,7 @@ class QuitPlugin extends BaseWatchPlugin { process.exit(0); } - getUsageInfo() { + getUsageInfo(): UsageData { return { key: 'q', prompt: 'quit watch mode', diff --git a/packages/jest-core/src/plugins/test_name_pattern.ts b/packages/jest-core/src/plugins/test_name_pattern.ts index 5c76866ef9ff..64391e1dc18a 100644 --- a/packages/jest-core/src/plugins/test_name_pattern.ts +++ b/packages/jest-core/src/plugins/test_name_pattern.ts @@ -6,7 +6,12 @@ */ import type {Config} from '@jest/types'; -import {BaseWatchPlugin, Prompt, UpdateConfigCallback} from 'jest-watcher'; +import { + BaseWatchPlugin, + Prompt, + UpdateConfigCallback, + UsageData, +} from 'jest-watcher'; import TestNamePatternPrompt from '../TestNamePatternPrompt'; import activeFilters from '../lib/active_filters_message'; @@ -20,14 +25,14 @@ class TestNamePatternPlugin extends BaseWatchPlugin { this.isInternal = true; } - getUsageInfo() { + getUsageInfo(): UsageData { return { key: 't', prompt: 'filter by a test name regex pattern', }; } - onKey(key: string) { + onKey(key: string): void { this._prompt.put(key); } diff --git a/packages/jest-core/src/plugins/test_path_pattern.ts b/packages/jest-core/src/plugins/test_path_pattern.ts index 5abe1e1e9279..05b4e3d67c0c 100644 --- a/packages/jest-core/src/plugins/test_path_pattern.ts +++ b/packages/jest-core/src/plugins/test_path_pattern.ts @@ -6,7 +6,12 @@ */ import type {Config} from '@jest/types'; -import {BaseWatchPlugin, Prompt, UpdateConfigCallback} from 'jest-watcher'; +import { + BaseWatchPlugin, + Prompt, + UpdateConfigCallback, + UsageData, +} from 'jest-watcher'; import TestPathPatternPrompt from '../TestPathPatternPrompt'; import activeFilters from '../lib/active_filters_message'; @@ -20,14 +25,14 @@ class TestPathPatternPlugin extends BaseWatchPlugin { this.isInternal = true; } - getUsageInfo() { + getUsageInfo(): UsageData { return { key: 'p', prompt: 'filter by a filename regex pattern', }; } - onKey(key: string) { + onKey(key: string): void { this._prompt.put(key); } diff --git a/packages/jest-core/src/plugins/update_snapshots.ts b/packages/jest-core/src/plugins/update_snapshots.ts index 9c07e919018d..1a637895d500 100644 --- a/packages/jest-core/src/plugins/update_snapshots.ts +++ b/packages/jest-core/src/plugins/update_snapshots.ts @@ -10,6 +10,7 @@ import { BaseWatchPlugin, JestHookSubscriber, UpdateConfigCallback, + UsageData, } from 'jest-watcher'; class UpdateSnapshotsPlugin extends BaseWatchPlugin { @@ -30,13 +31,13 @@ class UpdateSnapshotsPlugin extends BaseWatchPlugin { return Promise.resolve(false); } - apply(hooks: JestHookSubscriber) { + apply(hooks: JestHookSubscriber): void { hooks.onTestRunComplete(results => { this._hasSnapshotFailure = results.snapshot.failure; }); } - getUsageInfo() { + getUsageInfo(): UsageData | null { if (this._hasSnapshotFailure) { return { key: 'u', diff --git a/packages/jest-core/src/plugins/update_snapshots_interactive.ts b/packages/jest-core/src/plugins/update_snapshots_interactive.ts index 31414365672d..7a73d62b27c9 100644 --- a/packages/jest-core/src/plugins/update_snapshots_interactive.ts +++ b/packages/jest-core/src/plugins/update_snapshots_interactive.ts @@ -7,7 +7,7 @@ import type {Config} from '@jest/types'; import type {AggregatedResult, AssertionLocation} from '@jest/test-result'; -import {BaseWatchPlugin, JestHookSubscriber} from 'jest-watcher'; +import {BaseWatchPlugin, JestHookSubscriber, UsageData} from 'jest-watcher'; import SnapshotInteractiveMode from '../SnapshotInteractiveMode'; class UpdateSnapshotInteractivePlugin extends BaseWatchPlugin { @@ -41,7 +41,7 @@ class UpdateSnapshotInteractivePlugin extends BaseWatchPlugin { return failedTestPaths; } - apply(hooks: JestHookSubscriber) { + apply(hooks: JestHookSubscriber): void { hooks.onTestRunComplete(results => { this._failedSnapshotTestAssertions = this.getFailedSnapshotTestAssertions( results, @@ -52,7 +52,7 @@ class UpdateSnapshotInteractivePlugin extends BaseWatchPlugin { }); } - onKey(key: string) { + onKey(key: string): void { if (this._snapshotInteractiveMode.isActive()) { this._snapshotInteractiveMode.put(key); } @@ -85,11 +85,8 @@ class UpdateSnapshotInteractivePlugin extends BaseWatchPlugin { } } - getUsageInfo() { - if ( - this._failedSnapshotTestAssertions && - this._failedSnapshotTestAssertions.length > 0 - ) { + getUsageInfo(): UsageData | null { + if (this._failedSnapshotTestAssertions?.length > 0) { return { key: 'i', prompt: 'update failing snapshots interactively', diff --git a/packages/jest-diff/src/index.ts b/packages/jest-diff/src/index.ts index 9c9b7f7be867..75957a113d88 100644 --- a/packages/jest-diff/src/index.ts +++ b/packages/jest-diff/src/index.ts @@ -50,6 +50,7 @@ const FALLBACK_FORMAT_OPTIONS_0 = {...FALLBACK_FORMAT_OPTIONS, indent: 0}; // Generate a string that will highlight the difference between two values // with green and red. (similar to how github does code diffing) +// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types function diff(a: any, b: any, options?: DiffOptions): string | null { if (Object.is(a, b)) { return NO_DIFF_MESSAGE; diff --git a/packages/jest-each/src/index.ts b/packages/jest-each/src/index.ts index 9836bd2136cb..b22d4e305ef6 100644 --- a/packages/jest-each/src/index.ts +++ b/packages/jest-each/src/index.ts @@ -49,8 +49,10 @@ const install = ( return {describe, fdescribe, fit, it, test, xdescribe, xit, xtest}; }; -const each = (table: Global.EachTable, ...data: Global.TemplateData) => - install(global as Global, table, ...data); +const each = ( + table: Global.EachTable, + ...data: Global.TemplateData +): ReturnType => install(global as Global, table, ...data); each.withGlobal = (g: Global) => ( table: Global.EachTable, diff --git a/packages/jest-environment-jsdom/src/index.ts b/packages/jest-environment-jsdom/src/index.ts index 9b887a7a1ed5..595ba752c56b 100644 --- a/packages/jest-environment-jsdom/src/index.ts +++ b/packages/jest-environment-jsdom/src/index.ts @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import type {Script} from 'vm'; +import type {Context, Script} from 'vm'; import type {Config, Global} from '@jest/types'; import {installCommonGlobals} from 'jest-util'; import {ModuleMocker} from 'jest-mock'; @@ -135,7 +135,7 @@ class JSDOMEnvironment implements JestEnvironment { return null; } - getVmContext() { + getVmContext(): Context | null { if (this.dom) { return this.dom.getInternalVMContext(); } diff --git a/packages/jest-haste-map/src/getMockName.ts b/packages/jest-haste-map/src/getMockName.ts index a30db82f1c73..428456985d7a 100644 --- a/packages/jest-haste-map/src/getMockName.ts +++ b/packages/jest-haste-map/src/getMockName.ts @@ -9,7 +9,7 @@ import * as path from 'path'; const MOCKS_PATTERN = path.sep + '__mocks__' + path.sep; -const getMockName = (filePath: string) => { +const getMockName = (filePath: string): string => { const mockPath = filePath.split(MOCKS_PATTERN)[1]; return mockPath .substring(0, mockPath.lastIndexOf(path.extname(mockPath))) diff --git a/packages/jest-haste-map/src/lib/normalizePathSep.ts b/packages/jest-haste-map/src/lib/normalizePathSep.ts index 9e89d0c87e11..2dc7ea57e503 100644 --- a/packages/jest-haste-map/src/lib/normalizePathSep.ts +++ b/packages/jest-haste-map/src/lib/normalizePathSep.ts @@ -9,9 +9,10 @@ import * as path from 'path'; let normalizePathSep: (string: string) => string; if (path.sep === '/') { - normalizePathSep = (filePath: string) => filePath; + normalizePathSep = (filePath: string): string => filePath; } else { - normalizePathSep = (filePath: string) => filePath.replace(/\//g, path.sep); + normalizePathSep = (filePath: string): string => + filePath.replace(/\//g, path.sep); } export default normalizePathSep; diff --git a/packages/jest-jasmine2/src/assertionErrorMessage.ts b/packages/jest-jasmine2/src/assertionErrorMessage.ts index 98433f477fb8..9f252eec604c 100644 --- a/packages/jest-jasmine2/src/assertionErrorMessage.ts +++ b/packages/jest-jasmine2/src/assertionErrorMessage.ts @@ -95,7 +95,7 @@ const assertMatcherHint = ( function assertionErrorMessage( error: AssertionErrorWithStack, options: DiffOptions, -) { +): string { const {expected, actual, generatedMessage, message, operator, stack} = error; const diffString = diff(expected, actual, options); const hasCustomMessage = !generatedMessage; diff --git a/packages/jest-types/src/Circus.ts b/packages/jest-types/src/Circus.ts index 1ffc9cf4673c..bd82d0e0082a 100644 --- a/packages/jest-types/src/Circus.ts +++ b/packages/jest-types/src/Circus.ts @@ -208,7 +208,7 @@ export type DescribeBlock = { tests: Array; }; -export type TestError = Exception | Array<[Exception | undefined, Exception]>; // the error from the test, as well as a backup error for async +export type TestError = Exception | [Exception | undefined, Exception]; // the error from the test, as well as a backup error for async export type TestEntry = { asyncError: Exception; // Used if the test failure contains no usable stack trace diff --git a/packages/jest-validate/src/validate.ts b/packages/jest-validate/src/validate.ts index 11713a4360ed..4e63da9eaed9 100644 --- a/packages/jest-validate/src/validate.ts +++ b/packages/jest-validate/src/validate.ts @@ -95,7 +95,10 @@ const allowsMultipleTypes = (key: string): boolean => key === 'maxWorkers'; const isOfTypeStringOrNumber = (value: any): boolean => typeof value === 'number' || typeof value === 'string'; -const validate = (config: Record, options: ValidationOptions) => { +const validate = ( + config: Record, + options: ValidationOptions, +): {hasDeprecationWarnings: boolean; isValid: boolean} => { hasDeprecationWarnings = false; // Preserve default blacklist entries even with user-supplied blacklist diff --git a/packages/jest-watcher/src/BaseWatchPlugin.ts b/packages/jest-watcher/src/BaseWatchPlugin.ts index 17ed0d7c21e8..5f59a98a249e 100644 --- a/packages/jest-watcher/src/BaseWatchPlugin.ts +++ b/packages/jest-watcher/src/BaseWatchPlugin.ts @@ -28,13 +28,13 @@ class BaseWatchPlugin implements WatchPlugin { this._stdout = stdout; } - apply(_hooks: JestHookSubscriber) {} + apply(_hooks: JestHookSubscriber): void {} getUsageInfo(_globalConfig: Config.GlobalConfig): UsageData | null { return null; } - onKey(_key: string) {} + onKey(_key: string): void {} run( _globalConfig: Config.GlobalConfig, diff --git a/packages/jest-watcher/src/JestHooks.ts b/packages/jest-watcher/src/JestHooks.ts index 6f7f5fc4d03e..0e49c7681ca7 100644 --- a/packages/jest-watcher/src/JestHooks.ts +++ b/packages/jest-watcher/src/JestHooks.ts @@ -66,8 +66,8 @@ class JestHooks { }; } - isUsed(hook: AvailableHooks) { - return this._listeners[hook] && this._listeners[hook].length; + isUsed(hook: AvailableHooks): boolean { + return this._listeners[hook]?.length > 0; } getSubscriber(): Readonly { diff --git a/yarn.lock b/yarn.lock index 471aa0cdd4b6..abaad9b68bd8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2779,40 +2779,40 @@ dependencies: "@types/yargs-parser" "*" -"@typescript-eslint/eslint-plugin@^2.19.0": - version "2.27.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.27.0.tgz#e479cdc4c9cf46f96b4c287755733311b0d0ba4b" - integrity sha512-/my+vVHRN7zYgcp0n4z5A6HAK7bvKGBiswaM5zIlOQczsxj/aiD7RcgD+dvVFuwFaGh5+kM7XA6Q6PN0bvb1tw== +"@typescript-eslint/eslint-plugin@^2.30.0": + version "2.30.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.30.0.tgz#312a37e80542a764d96e8ad88a105316cdcd7b05" + integrity sha512-PGejii0qIZ9Q40RB2jIHyUpRWs1GJuHP1pkoCiaeicfwO9z7Fx03NQzupuyzAmv+q9/gFNHu7lo1ByMXe8PNyg== dependencies: - "@typescript-eslint/experimental-utils" "2.27.0" + "@typescript-eslint/experimental-utils" "2.30.0" functional-red-black-tree "^1.0.1" regexpp "^3.0.0" tsutils "^3.17.1" -"@typescript-eslint/experimental-utils@2.27.0", "@typescript-eslint/experimental-utils@^2.5.0": - version "2.27.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-2.27.0.tgz#801a952c10b58e486c9a0b36cf21e2aab1e9e01a" - integrity sha512-vOsYzjwJlY6E0NJRXPTeCGqjv5OHgRU1kzxHKWJVPjDYGbPgLudBXjIlc+OD1hDBZ4l1DLbOc5VjofKahsu9Jw== +"@typescript-eslint/experimental-utils@2.30.0", "@typescript-eslint/experimental-utils@^2.5.0": + version "2.30.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-2.30.0.tgz#9845e868c01f3aed66472c561d4b6bac44809dd0" + integrity sha512-L3/tS9t+hAHksy8xuorhOzhdefN0ERPDWmR9CclsIGOUqGKy6tqc/P+SoXeJRye5gazkuPO0cK9MQRnolykzkA== dependencies: "@types/json-schema" "^7.0.3" - "@typescript-eslint/typescript-estree" "2.27.0" + "@typescript-eslint/typescript-estree" "2.30.0" eslint-scope "^5.0.0" eslint-utils "^2.0.0" -"@typescript-eslint/parser@^2.19.0": - version "2.27.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-2.27.0.tgz#d91664335b2c46584294e42eb4ff35838c427287" - integrity sha512-HFUXZY+EdwrJXZo31DW4IS1ujQW3krzlRjBrFRrJcMDh0zCu107/nRfhk/uBasO8m0NVDbBF5WZKcIUMRO7vPg== +"@typescript-eslint/parser@^2.30.0": + version "2.30.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-2.30.0.tgz#7681c305a6f4341ae2579f5e3a75846c29eee9ce" + integrity sha512-9kDOxzp0K85UnpmPJqUzdWaCNorYYgk1yZmf4IKzpeTlSAclnFsrLjfwD9mQExctLoLoGAUXq1co+fbr+3HeFw== dependencies: "@types/eslint-visitor-keys" "^1.0.0" - "@typescript-eslint/experimental-utils" "2.27.0" - "@typescript-eslint/typescript-estree" "2.27.0" + "@typescript-eslint/experimental-utils" "2.30.0" + "@typescript-eslint/typescript-estree" "2.30.0" eslint-visitor-keys "^1.1.0" -"@typescript-eslint/typescript-estree@2.27.0": - version "2.27.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-2.27.0.tgz#a288e54605412da8b81f1660b56c8b2e42966ce8" - integrity sha512-t2miCCJIb/FU8yArjAvxllxbTiyNqaXJag7UOpB5DVoM3+xnjeOngtqlJkLRnMtzaRcJhe3CIR9RmL40omubhg== +"@typescript-eslint/typescript-estree@2.30.0": + version "2.30.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-2.30.0.tgz#1b8e848b55144270255ffbfe4c63291f8f766615" + integrity sha512-nI5WOechrA0qAhnr+DzqwmqHsx7Ulr/+0H7bWCcClDhhWkSyZR5BmTvnBEyONwJCTWHfc5PAQExX24VD26IAVw== dependencies: debug "^4.1.1" eslint-visitor-keys "^1.1.0" From 7a3c9977847cc9fafed6f6662289f3c35e44e0c6 Mon Sep 17 00:00:00 2001 From: Tim Seckinger Date: Sat, 2 May 2020 22:17:40 +0200 Subject: [PATCH 056/106] jest-circus: throw if a test / hook is defined asynchronously (#8096) --- CHANGELOG.md | 1 + .../circusDeclarationErrors.test.ts.snap | 61 +++++++++++++++++++ e2e/__tests__/beforeEachQueue.ts | 3 + e2e/__tests__/circusDeclarationErrors.test.ts | 24 ++++++++ .../__tests__/asyncDefinition.test.js | 20 ++++++ e2e/circus-declaration-errors/package.json | 5 ++ packages/jest-circus/src/eventHandler.ts | 19 +++++- packages/jest-circus/src/state.ts | 3 +- packages/jest-types/src/Circus.ts | 1 + 9 files changed, 134 insertions(+), 3 deletions(-) create mode 100644 e2e/__tests__/__snapshots__/circusDeclarationErrors.test.ts.snap create mode 100644 e2e/__tests__/circusDeclarationErrors.test.ts create mode 100644 e2e/circus-declaration-errors/__tests__/asyncDefinition.test.js create mode 100644 e2e/circus-declaration-errors/package.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f18737254d9..ac92ed7f0cd7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ - `[jest-circus, jest-console, jest-jasmine2, jest-reporters, jest-util, pretty-format]` Fix time durating formatting and consolidate time formatting code ([#9765](https://github.com/facebook/jest/pull/9765)) - `[jest-circus]` [**BREAKING**] Fail tests if a test takes a done callback and have return values ([#9129](https://github.com/facebook/jest/pull/9129)) +- `[jest-circus]` [**BREAKING**] Throw a proper error if a test / hook is defined asynchronously ([#8096](https://github.com/facebook/jest/pull/8096)) - `[jest-config, jest-resolve]` [**BREAKING**] Remove support for `browser` field ([#9943](https://github.com/facebook/jest/pull/9943)) ### Chore & Maintenance diff --git a/e2e/__tests__/__snapshots__/circusDeclarationErrors.test.ts.snap b/e2e/__tests__/__snapshots__/circusDeclarationErrors.test.ts.snap new file mode 100644 index 000000000000..83a0e4eab83d --- /dev/null +++ b/e2e/__tests__/__snapshots__/circusDeclarationErrors.test.ts.snap @@ -0,0 +1,61 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`defining tests and hooks asynchronously throws 1`] = ` +FAIL __tests__/asyncDefinition.test.js + + + ● Test suite failed to run + + Cannot add a test after tests have started running. Tests must be defined synchronously. + + 10 | + 11 | Promise.resolve().then(() => { + > 12 | test('async definition inside describe', () => {}); + | ^ + 13 | afterAll(() => {}); + 14 | }); + 15 | }); + + at test (__tests__/asyncDefinition.test.js:12:5) + + ● Test suite failed to run + + Cannot add a hook after tests have started running. Hooks must be defined synchronously. + + 11 | Promise.resolve().then(() => { + 12 | test('async definition inside describe', () => {}); + > 13 | afterAll(() => {}); + | ^ + 14 | }); + 15 | }); + 16 | + + at afterAll (__tests__/asyncDefinition.test.js:13:5) + + ● Test suite failed to run + + Cannot add a test after tests have started running. Tests must be defined synchronously. + + 16 | + 17 | Promise.resolve().then(() => { + > 18 | test('async definition outside describe', () => {}); + | ^ + 19 | afterAll(() => {}); + 20 | }); + 21 | + + at test (__tests__/asyncDefinition.test.js:18:3) + + ● Test suite failed to run + + Cannot add a hook after tests have started running. Hooks must be defined synchronously. + + 17 | Promise.resolve().then(() => { + 18 | test('async definition outside describe', () => {}); + > 19 | afterAll(() => {}); + | ^ + 20 | }); + 21 | + + at afterAll (__tests__/asyncDefinition.test.js:19:3) +`; diff --git a/e2e/__tests__/beforeEachQueue.ts b/e2e/__tests__/beforeEachQueue.ts index a7d6738b39d5..23f84ad72e4a 100644 --- a/e2e/__tests__/beforeEachQueue.ts +++ b/e2e/__tests__/beforeEachQueue.ts @@ -5,9 +5,12 @@ * LICENSE file in the root directory of this source tree. */ +import {skipSuiteOnJestCircus} from '@jest/test-utils'; import {wrap} from 'jest-snapshot-serializer-raw'; import runJest from '../runJest'; +skipSuiteOnJestCircus(); // Circus does not support funky async definitions + describe('Correct beforeEach order', () => { it('ensures the correct order for beforeEach', () => { const result = runJest('before-each-queue'); diff --git a/e2e/__tests__/circusDeclarationErrors.test.ts b/e2e/__tests__/circusDeclarationErrors.test.ts new file mode 100644 index 000000000000..9de4ff365930 --- /dev/null +++ b/e2e/__tests__/circusDeclarationErrors.test.ts @@ -0,0 +1,24 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +import {skipSuiteOnJasmine} from '@jest/test-utils'; +import {wrap} from 'jest-snapshot-serializer-raw'; +import {extractSummary} from '../Utils'; +import runJest from '../runJest'; + +skipSuiteOnJasmine(); + +it('defining tests and hooks asynchronously throws', () => { + const result = runJest('circus-declaration-errors', [ + 'asyncDefinition.test.js', + ]); + + expect(result.exitCode).toBe(1); + + const {rest} = extractSummary(result.stderr); + expect(wrap(rest)).toMatchSnapshot(); +}); diff --git a/e2e/circus-declaration-errors/__tests__/asyncDefinition.test.js b/e2e/circus-declaration-errors/__tests__/asyncDefinition.test.js new file mode 100644 index 000000000000..5a519faa3be7 --- /dev/null +++ b/e2e/circus-declaration-errors/__tests__/asyncDefinition.test.js @@ -0,0 +1,20 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +describe('describe', () => { + test('correct test def', () => {}); + + Promise.resolve().then(() => { + test('async definition inside describe', () => {}); + afterAll(() => {}); + }); +}); + +Promise.resolve().then(() => { + test('async definition outside describe', () => {}); + afterAll(() => {}); +}); diff --git a/e2e/circus-declaration-errors/package.json b/e2e/circus-declaration-errors/package.json new file mode 100644 index 000000000000..148788b25446 --- /dev/null +++ b/e2e/circus-declaration-errors/package.json @@ -0,0 +1,5 @@ +{ + "jest": { + "testEnvironment": "node" + } +} diff --git a/packages/jest-circus/src/eventHandler.ts b/packages/jest-circus/src/eventHandler.ts index 2e1327a8ad6b..87a2061a649f 100644 --- a/packages/jest-circus/src/eventHandler.ts +++ b/packages/jest-circus/src/eventHandler.ts @@ -88,14 +88,22 @@ const eventHandler: Circus.EventHandler = ( break; } case 'add_hook': { - const {currentDescribeBlock} = state; + const {currentDescribeBlock, hasStarted} = state; const {asyncError, fn, hookType: type, timeout} = event; const parent = currentDescribeBlock; + + if (hasStarted) { + asyncError.message = + 'Cannot add a hook after tests have started running. Hooks must be defined synchronously.'; + state.unhandledErrors.push(asyncError); + break; + } + currentDescribeBlock.hooks.push({asyncError, fn, parent, timeout, type}); break; } case 'add_test': { - const {currentDescribeBlock, currentlyRunningTest} = state; + const {currentDescribeBlock, currentlyRunningTest, hasStarted} = state; const {asyncError, fn, mode, testName: name, timeout} = event; if (currentlyRunningTest) { @@ -103,6 +111,12 @@ const eventHandler: Circus.EventHandler = ( `Tests cannot be nested. Test "${name}" cannot run because it is nested within "${currentlyRunningTest.name}".`, ); } + if (hasStarted) { + asyncError.message = + 'Cannot add a test after tests have started running. Tests must be defined synchronously.'; + state.unhandledErrors.push(asyncError); + break; + } const test = makeTest( fn, @@ -168,6 +182,7 @@ const eventHandler: Circus.EventHandler = ( break; } case 'run_start': { + state.hasStarted = true; global[TEST_TIMEOUT_SYMBOL] && (state.testTimeout = global[TEST_TIMEOUT_SYMBOL]); break; diff --git a/packages/jest-circus/src/state.ts b/packages/jest-circus/src/state.ts index 3342479821b1..be81a73045f6 100644 --- a/packages/jest-circus/src/state.ts +++ b/packages/jest-circus/src/state.ts @@ -24,7 +24,8 @@ const INITIAL_STATE: Circus.State = { currentDescribeBlock: ROOT_DESCRIBE_BLOCK, currentlyRunningTest: null, expand: undefined, - hasFocusedTests: false, // whether .only has been used on any test/describe + hasFocusedTests: false, + hasStarted: false, includeTestLocationInResult: false, parentProcess: null, rootDescribeBlock: ROOT_DESCRIBE_BLOCK, diff --git a/packages/jest-types/src/Circus.ts b/packages/jest-types/src/Circus.ts index bd82d0e0082a..845529c85907 100644 --- a/packages/jest-types/src/Circus.ts +++ b/packages/jest-types/src/Circus.ts @@ -187,6 +187,7 @@ export type State = { currentlyRunningTest?: TestEntry | null; // including when hooks are being executed expand?: boolean; // expand error messages hasFocusedTests: boolean; // that are defined using test.only + hasStarted: boolean; // whether the rootDescribeBlock has started running // Store process error handlers. During the run we inject our own // handlers (so we could fail tests on unhandled errors) and later restore // the original ones. From 2e8f8d5d22fe70a11d5ce407f573078ebaca6b47 Mon Sep 17 00:00:00 2001 From: Yusuke Iinuma Date: Sun, 3 May 2020 17:49:46 +0900 Subject: [PATCH 057/106] fix: handle `null` being passed to `createTransformer` (#9955) --- CHANGELOG.md | 1 + .../__snapshots__/transform.test.ts.snap | 2 +- packages/babel-jest/src/__tests__/index.ts | 18 ++++++++++++++++++ packages/babel-jest/src/index.ts | 3 ++- 4 files changed, 22 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ac92ed7f0cd7..6bef176537ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ ### Fixes +- `[babel-jest]` Handle `null` being passed to `createTransformer` ([#9955](https://github.com/facebook/jest/pull/9955)) - `[jest-circus, jest-console, jest-jasmine2, jest-reporters, jest-util, pretty-format]` Fix time durating formatting and consolidate time formatting code ([#9765](https://github.com/facebook/jest/pull/9765)) - `[jest-circus]` [**BREAKING**] Fail tests if a test takes a done callback and have return values ([#9129](https://github.com/facebook/jest/pull/9129)) - `[jest-circus]` [**BREAKING**] Throw a proper error if a test / hook is defined asynchronously ([#8096](https://github.com/facebook/jest/pull/8096)) diff --git a/e2e/__tests__/__snapshots__/transform.test.ts.snap b/e2e/__tests__/__snapshots__/transform.test.ts.snap index 5ccf71e5a934..ee94c751c5ab 100644 --- a/e2e/__tests__/__snapshots__/transform.test.ts.snap +++ b/e2e/__tests__/__snapshots__/transform.test.ts.snap @@ -6,7 +6,7 @@ FAIL __tests__/ignoredFile.test.js babel-jest: Babel ignores __tests__/ignoredFile.test.js - make sure to include the file in Jest's transformIgnorePatterns as well. - at loadBabelConfig (../../../packages/babel-jest/build/index.js:178:13) + at loadBabelConfig (../../../packages/babel-jest/build/index.js:180:13) `; exports[`babel-jest instruments only specific files and collects coverage 1`] = ` diff --git a/packages/babel-jest/src/__tests__/index.ts b/packages/babel-jest/src/__tests__/index.ts index 7bbc4f7c84d1..df0387390ce6 100644 --- a/packages/babel-jest/src/__tests__/index.ts +++ b/packages/babel-jest/src/__tests__/index.ts @@ -97,3 +97,21 @@ describe('caller option correctly merges from defaults and options', () => { ); }); }); + +test('can pass null to createTransformer', () => { + const transformer = babelJest.createTransformer(null); + transformer.process(sourceString, 'dummy_path.js', makeProjectConfig(), { + instrument: false, + }); + + expect(loadPartialConfig).toHaveBeenCalledTimes(1); + expect(loadPartialConfig).toHaveBeenCalledWith( + expect.objectContaining({ + caller: { + name: 'babel-jest', + supportsDynamicImport: false, + supportsStaticESM: false, + }, + }), + ); +}); diff --git a/packages/babel-jest/src/index.ts b/packages/babel-jest/src/index.ts index 50259e0ec2cb..5a23c4fdb1d9 100644 --- a/packages/babel-jest/src/index.ts +++ b/packages/babel-jest/src/index.ts @@ -41,8 +41,9 @@ interface BabelJestTransformOptions extends TransformOptions { } const createTransformer = ( - inputOptions: TransformOptions = {}, + userOptions?: TransformOptions | null, ): BabelJestTransformer => { + const inputOptions: TransformOptions = userOptions ?? {}; const options: BabelJestTransformOptions = { ...inputOptions, caller: { From 4216b862c91ff80fc73805ae0f603db2c5c085fb Mon Sep 17 00:00:00 2001 From: sai umesh Date: Sun, 3 May 2020 16:42:07 +0530 Subject: [PATCH 058/106] updated docs regarding testSequencer (#9174) --- docs/Configuration.md | 9 +++++++++ website/versioned_docs/version-24.x/Configuration.md | 9 +++++++++ website/versioned_docs/version-25.5/Configuration.md | 9 +++++++++ 3 files changed, 27 insertions(+) diff --git a/docs/Configuration.md b/docs/Configuration.md index 2edb1f7132e9..bdfddc8c3bdd 100644 --- a/docs/Configuration.md +++ b/docs/Configuration.md @@ -1085,6 +1085,7 @@ Example: Sort test path alphabetically. ```js +// testSequencer.js const Sequencer = require('@jest/test-sequencer').default; class CustomSequencer extends Sequencer { @@ -1099,6 +1100,14 @@ class CustomSequencer extends Sequencer { module.exports = CustomSequencer; ``` +Use it in your Jest config file like this: + +```json +{ + "testSequencer": "path/to/testSequencer.js" +} +``` + ### `testTimeout` [number] Default: `5000` diff --git a/website/versioned_docs/version-24.x/Configuration.md b/website/versioned_docs/version-24.x/Configuration.md index 680a60f4977d..eeb92a5d36aa 100644 --- a/website/versioned_docs/version-24.x/Configuration.md +++ b/website/versioned_docs/version-24.x/Configuration.md @@ -1064,6 +1064,7 @@ Example: Sort test path alphabetically. ```js +// testSequencer.js const Sequencer = require('@jest/test-sequencer').default; class CustomSequencer extends Sequencer { @@ -1078,6 +1079,14 @@ class CustomSequencer extends Sequencer { module.exports = CustomSequencer; ``` +Use it in your Jest config file like this: + +```json +{ + "testSequencer": "path/to/testSequencer.js" +} +``` + ### `testURL` [string] Default: `http://localhost` diff --git a/website/versioned_docs/version-25.5/Configuration.md b/website/versioned_docs/version-25.5/Configuration.md index 0655b2d4b1eb..afb34e1c20bf 100644 --- a/website/versioned_docs/version-25.5/Configuration.md +++ b/website/versioned_docs/version-25.5/Configuration.md @@ -1086,6 +1086,7 @@ Example: Sort test path alphabetically. ```js +// testSequencer.js const Sequencer = require('@jest/test-sequencer').default; class CustomSequencer extends Sequencer { @@ -1100,6 +1101,14 @@ class CustomSequencer extends Sequencer { module.exports = CustomSequencer; ``` +Use it in your Jest config file like this: + +```json +{ + "testSequencer": "path/to/testSequencer.js" +} +``` + ### `testTimeout` [number] Default: `5000` From 5a16415ec46d2372504cc2951ed42811e3cb6630 Mon Sep 17 00:00:00 2001 From: Clark Date: Sun, 3 May 2020 19:52:26 +0800 Subject: [PATCH 059/106] docs: Updated Testing Frameworks guide with React; make it generic (#9106) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add Jest work with "testing-library/react" to Framework Guides * update frameworks guide to be generic * add changelog * use link to example docs Co-authored-by: Michał Pierzchała --- CHANGELOG.md | 1 + docs/TestingFrameworks.md | 6 +++++- website/versioned_docs/version-25.1/TestingFrameworks.md | 6 +++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6bef176537ff..2d7baa8b35cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ - `[jest-haste-map]` [**BREAKING**] removed `providesModuleNodeModules` ([#8535](https://github.com/facebook/jest/pull/8535)) - `[docs]` Fix example reference implementation to use Jest with Phabricator ([#8662](https://github.com/facebook/jest/pull/8662)) - `[docs]` Added default compiler to tranform ([#8583](https://github.com/facebook/jest/pull/8583)) +- `[docs]` Updated Testing Frameworks guide with React; make it generic ([#9106](https://github.com/facebook/jest/pull/9106)) ### Performance diff --git a/docs/TestingFrameworks.md b/docs/TestingFrameworks.md index 95a4dc0f0926..28c96f7127dd 100644 --- a/docs/TestingFrameworks.md +++ b/docs/TestingFrameworks.md @@ -3,7 +3,11 @@ id: testing-frameworks title: Testing Web Frameworks --- -Although Jest may be considered a React-specific test runner, in fact it is a universal testing platform, with the ability to adapt to any JavaScript library or framework. In this section we'd like to link to community posts and articles about integrating Jest into other popular JS libraries. +Jest is a universal testing platform, with the ability to adapt to any JavaScript library or framework. In this section we'd like to link to community posts and articles about integrating Jest into popular JS libraries. + +## React + +- [Testing ReactJS components with Jest](https://testing-library.com/docs/react-testing-library/example-intro) by Kent C. Dodds ([@kentcdodds](https://twitter.com/kentcdodds)) ## Vue.js diff --git a/website/versioned_docs/version-25.1/TestingFrameworks.md b/website/versioned_docs/version-25.1/TestingFrameworks.md index 3595fa090d8e..030b07fb927d 100644 --- a/website/versioned_docs/version-25.1/TestingFrameworks.md +++ b/website/versioned_docs/version-25.1/TestingFrameworks.md @@ -4,7 +4,11 @@ title: Testing Web Frameworks original_id: testing-frameworks --- -Although Jest may be considered a React-specific test runner, in fact it is a universal testing platform, with the ability to adapt to any JavaScript library or framework. In this section we'd like to link to community posts and articles about integrating Jest into other popular JS libraries. +Jest is a universal testing platform, with the ability to adapt to any JavaScript library or framework. In this section we'd like to link to community posts and articles about integrating Jest into popular JS libraries. + +## React + +- [Testing ReactJS components with Jest](https://testing-library.com/docs/react-testing-library/example-intro) by Kent C. Dodds ([@kentcdodds](https://twitter.com/kentcdodds)) ## Vue.js From 2c7682c27d9fe319bde13432b9ce1016c13d2786 Mon Sep 17 00:00:00 2001 From: Orta Date: Sun, 3 May 2020 10:30:02 -0400 Subject: [PATCH 060/106] Update index.js (#9095) --- website/pages/en/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/website/pages/en/index.js b/website/pages/en/index.js index 22a46f95a144..d8b4b9448521 100755 --- a/website/pages/en/index.js +++ b/website/pages/en/index.js @@ -45,6 +45,7 @@ const Sponsor = ({ className="sponsor-item" title={`$${totalDonations.value} by ${name || slug}`} target="_blank" + rel="nofollow noopener" href={website || `https://opencollective.com/${slug}`} > { From d7f3427f5caa366634575be4a7a885e7769d42a7 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Sun, 3 May 2020 17:23:44 +0200 Subject: [PATCH 061/106] chore: rename LolexFakeTimers to ModernFakeTimers (#9960) --- CHANGELOG.md | 7 ++++--- .../src/__tests__/jsdom_environment.test.ts | 4 ++-- packages/jest-environment-jsdom/src/index.ts | 15 ++++++--------- .../src/__tests__/node_environment.test.ts | 4 ++-- packages/jest-environment-node/src/index.ts | 15 ++++++--------- packages/jest-environment/src/index.ts | 7 ++----- packages/jest-fake-timers/package.json | 8 ++++---- ...t.ts.snap => legacyFakeTimers.test.ts.snap} | 0 ...t.ts.snap => modernFakeTimers.test.ts.snap} | 0 ...Timers.test.ts => legacyFakeTimers.test.ts} | 2 +- ...sLolex.test.ts => modernFakeTimers.test.ts} | 4 ++-- packages/jest-fake-timers/src/index.ts | 4 ++-- .../{jestFakeTimers.ts => legacyFakeTimers.ts} | 0 ...{FakeTimersLolex.ts => modernFakeTimers.ts} | 18 +++++++++--------- yarn.lock | 17 ++++++++++++----- 15 files changed, 52 insertions(+), 53 deletions(-) rename packages/jest-fake-timers/src/__tests__/__snapshots__/{jestFakeTimers.test.ts.snap => legacyFakeTimers.test.ts.snap} (100%) rename packages/jest-fake-timers/src/__tests__/__snapshots__/{fakeTimersLolex.test.ts.snap => modernFakeTimers.test.ts.snap} (100%) rename packages/jest-fake-timers/src/__tests__/{jestFakeTimers.test.ts => legacyFakeTimers.test.ts} (99%) rename packages/jest-fake-timers/src/__tests__/{fakeTimersLolex.test.ts => modernFakeTimers.test.ts} (99%) rename packages/jest-fake-timers/src/{jestFakeTimers.ts => legacyFakeTimers.ts} (100%) rename packages/jest-fake-timers/src/{FakeTimersLolex.ts => modernFakeTimers.ts} (89%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d7baa8b35cb..7ece9b02be96 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,12 +18,13 @@ - `[*]` [**BREAKING**] Drop support for Node 8 ([#9423](https://github.com/facebook/jest/pull/9423)) - `[*]` Upgrade to chalk@4 ([#9752](https://github.com/facebook/jest/pull/9752)) - `[*]` Remove usage of `realpath-native` ([#9952](https://github.com/facebook/jest/pull/9952)) -- `[jest-runtime]` [**BREAKING**] Remove long-deprecated `require.requireActual` and `require.requireMock` methods ([#9854](https://github.com/facebook/jest/pull/9854)) -- `[expect, jest-mock, pretty-format]` [**BREAKING**] Remove `build-es5` from package ([#9945](https://github.com/facebook/jest/pull/9945)) -- `[jest-haste-map]` [**BREAKING**] removed `providesModuleNodeModules` ([#8535](https://github.com/facebook/jest/pull/8535)) - `[docs]` Fix example reference implementation to use Jest with Phabricator ([#8662](https://github.com/facebook/jest/pull/8662)) - `[docs]` Added default compiler to tranform ([#8583](https://github.com/facebook/jest/pull/8583)) - `[docs]` Updated Testing Frameworks guide with React; make it generic ([#9106](https://github.com/facebook/jest/pull/9106)) +- `[expect, jest-mock, pretty-format]` [**BREAKING**] Remove `build-es5` from package ([#9945](https://github.com/facebook/jest/pull/9945)) +- `[@jest/fake-timers, @jest/environment]` [**BREAKING**] Rename `LolexFakeTimers` to `ModernFakeTimers` ([#9960](https://github.com/facebook/jest/pull/9960)) +- `[jest-haste-map]` [**BREAKING**] removed `providesModuleNodeModules` ([#8535](https://github.com/facebook/jest/pull/8535)) +- `[jest-runtime]` [**BREAKING**] Remove long-deprecated `require.requireActual` and `require.requireMock` methods ([#9854](https://github.com/facebook/jest/pull/9854)) ### Performance diff --git a/packages/jest-environment-jsdom/src/__tests__/jsdom_environment.test.ts b/packages/jest-environment-jsdom/src/__tests__/jsdom_environment.test.ts index d3b2439ec7a8..528ed5620cbc 100644 --- a/packages/jest-environment-jsdom/src/__tests__/jsdom_environment.test.ts +++ b/packages/jest-environment-jsdom/src/__tests__/jsdom_environment.test.ts @@ -22,9 +22,9 @@ describe('JSDomEnvironment', () => { }); }); - it('has Lolex fake timers implementation', () => { + it('has modern fake timers implementation', () => { const env = new JSDomEnvironment(makeProjectConfig()); - expect(env.fakeTimersLolex).toBeDefined(); + expect(env.fakeTimersModern).toBeDefined(); }); }); diff --git a/packages/jest-environment-jsdom/src/index.ts b/packages/jest-environment-jsdom/src/index.ts index 595ba752c56b..fc30e7e50833 100644 --- a/packages/jest-environment-jsdom/src/index.ts +++ b/packages/jest-environment-jsdom/src/index.ts @@ -9,10 +9,7 @@ import type {Context, Script} from 'vm'; import type {Config, Global} from '@jest/types'; import {installCommonGlobals} from 'jest-util'; import {ModuleMocker} from 'jest-mock'; -import { - JestFakeTimers as LegacyFakeTimers, - LolexFakeTimers, -} from '@jest/fake-timers'; +import {LegacyFakeTimers, ModernFakeTimers} from '@jest/fake-timers'; import type {EnvironmentContext, JestEnvironment} from '@jest/environment'; import {JSDOM, VirtualConsole} from 'jsdom'; @@ -28,7 +25,7 @@ type Win = Window & class JSDOMEnvironment implements JestEnvironment { dom: JSDOM | null; fakeTimers: LegacyFakeTimers | null; - fakeTimersLolex: LolexFakeTimers | null; + fakeTimersModern: ModernFakeTimers | null; global: Win; errorEventListener: ((event: Event & {error: Error}) => void) | null; moduleMocker: ModuleMocker | null; @@ -100,7 +97,7 @@ class JSDOMEnvironment implements JestEnvironment { timerConfig, }); - this.fakeTimersLolex = new LolexFakeTimers({config, global}); + this.fakeTimersModern = new ModernFakeTimers({config, global}); } async setup(): Promise {} @@ -109,8 +106,8 @@ class JSDOMEnvironment implements JestEnvironment { if (this.fakeTimers) { this.fakeTimers.dispose(); } - if (this.fakeTimersLolex) { - this.fakeTimersLolex.dispose(); + if (this.fakeTimersModern) { + this.fakeTimersModern.dispose(); } if (this.global) { if (this.errorEventListener) { @@ -125,7 +122,7 @@ class JSDOMEnvironment implements JestEnvironment { this.global = null; this.dom = null; this.fakeTimers = null; - this.fakeTimersLolex = null; + this.fakeTimersModern = null; } runScript(script: Script): T | null { diff --git a/packages/jest-environment-node/src/__tests__/node_environment.test.ts b/packages/jest-environment-node/src/__tests__/node_environment.test.ts index e43df37a1bf5..0e760db861e4 100644 --- a/packages/jest-environment-node/src/__tests__/node_environment.test.ts +++ b/packages/jest-environment-node/src/__tests__/node_environment.test.ts @@ -46,10 +46,10 @@ describe('NodeEnvironment', () => { }); }); - it('has Lolex fake timers implementation', () => { + it('has modern fake timers implementation', () => { const env = new NodeEnvironment(makeProjectConfig()); - expect(env.fakeTimersLolex).toBeDefined(); + expect(env.fakeTimersModern).toBeDefined(); }); if (isTextEncoderDefined) { diff --git a/packages/jest-environment-node/src/index.ts b/packages/jest-environment-node/src/index.ts index d5faba29e8f6..51a803cc5e9b 100644 --- a/packages/jest-environment-node/src/index.ts +++ b/packages/jest-environment-node/src/index.ts @@ -9,10 +9,7 @@ import {Context, Script, createContext, runInContext} from 'vm'; import type {Config, Global} from '@jest/types'; import {ModuleMocker} from 'jest-mock'; import {installCommonGlobals} from 'jest-util'; -import { - JestFakeTimers as LegacyFakeTimers, - LolexFakeTimers, -} from '@jest/fake-timers'; +import {LegacyFakeTimers, ModernFakeTimers} from '@jest/fake-timers'; import type {JestEnvironment} from '@jest/environment'; type Timer = { @@ -24,7 +21,7 @@ type Timer = { class NodeEnvironment implements JestEnvironment { context: Context | null; fakeTimers: LegacyFakeTimers | null; - fakeTimersLolex: LolexFakeTimers | null; + fakeTimersModern: ModernFakeTimers | null; global: Global.Global; moduleMocker: ModuleMocker | null; @@ -90,7 +87,7 @@ class NodeEnvironment implements JestEnvironment { timerConfig, }); - this.fakeTimersLolex = new LolexFakeTimers({config, global}); + this.fakeTimersModern = new ModernFakeTimers({config, global}); } async setup(): Promise {} @@ -99,12 +96,12 @@ class NodeEnvironment implements JestEnvironment { if (this.fakeTimers) { this.fakeTimers.dispose(); } - if (this.fakeTimersLolex) { - this.fakeTimersLolex.dispose(); + if (this.fakeTimersModern) { + this.fakeTimersModern.dispose(); } this.context = null; this.fakeTimers = null; - this.fakeTimersLolex = null; + this.fakeTimersModern = null; } // TS infers the return type to be `any`, since that's what `runInContext` diff --git a/packages/jest-environment/src/index.ts b/packages/jest-environment/src/index.ts index f48f1131ac39..df3e0f856bd6 100644 --- a/packages/jest-environment/src/index.ts +++ b/packages/jest-environment/src/index.ts @@ -8,10 +8,7 @@ import type {Context, Script} from 'vm'; import type {Circus, Config, Global} from '@jest/types'; import jestMock = require('jest-mock'); -import type { - JestFakeTimers as LegacyFakeTimers, - LolexFakeTimers, -} from '@jest/fake-timers'; +import type {LegacyFakeTimers, ModernFakeTimers} from '@jest/fake-timers'; type JestMockFn = typeof jestMock.fn; type JestMockSpyOn = typeof jestMock.spyOn; @@ -41,7 +38,7 @@ export declare class JestEnvironment { constructor(config: Config.ProjectConfig, context?: EnvironmentContext); global: Global.Global; fakeTimers: LegacyFakeTimers | null; - fakeTimersLolex: LolexFakeTimers | null; + fakeTimersModern: ModernFakeTimers | null; moduleMocker: jestMock.ModuleMocker | null; /** * @deprecated implement getVmContext instead diff --git a/packages/jest-fake-timers/package.json b/packages/jest-fake-timers/package.json index aeebf7229c23..6aeb4ef8dab4 100644 --- a/packages/jest-fake-timers/package.json +++ b/packages/jest-fake-timers/package.json @@ -11,14 +11,14 @@ "types": "build/index.d.ts", "dependencies": { "@jest/types": "^26.0.0-alpha.0", + "@sinonjs/fake-timers": "^6.0.1", "jest-message-util": "^26.0.0-alpha.0", "jest-mock": "^26.0.0-alpha.0", - "jest-util": "^26.0.0-alpha.0", - "lolex": "^5.0.0" + "jest-util": "^26.0.0-alpha.0" }, "devDependencies": { - "@types/lolex": "^5.1.0", - "@types/node": "*" + "@types/node": "*", + "@types/sinonjs__fake-timers": "^6.0.1" }, "engines": { "node": ">= 10.14.2" diff --git a/packages/jest-fake-timers/src/__tests__/__snapshots__/jestFakeTimers.test.ts.snap b/packages/jest-fake-timers/src/__tests__/__snapshots__/legacyFakeTimers.test.ts.snap similarity index 100% rename from packages/jest-fake-timers/src/__tests__/__snapshots__/jestFakeTimers.test.ts.snap rename to packages/jest-fake-timers/src/__tests__/__snapshots__/legacyFakeTimers.test.ts.snap diff --git a/packages/jest-fake-timers/src/__tests__/__snapshots__/fakeTimersLolex.test.ts.snap b/packages/jest-fake-timers/src/__tests__/__snapshots__/modernFakeTimers.test.ts.snap similarity index 100% rename from packages/jest-fake-timers/src/__tests__/__snapshots__/fakeTimersLolex.test.ts.snap rename to packages/jest-fake-timers/src/__tests__/__snapshots__/modernFakeTimers.test.ts.snap diff --git a/packages/jest-fake-timers/src/__tests__/jestFakeTimers.test.ts b/packages/jest-fake-timers/src/__tests__/legacyFakeTimers.test.ts similarity index 99% rename from packages/jest-fake-timers/src/__tests__/jestFakeTimers.test.ts rename to packages/jest-fake-timers/src/__tests__/legacyFakeTimers.test.ts index 453b28ae83fa..28a335152a11 100644 --- a/packages/jest-fake-timers/src/__tests__/jestFakeTimers.test.ts +++ b/packages/jest-fake-timers/src/__tests__/legacyFakeTimers.test.ts @@ -9,7 +9,7 @@ import * as util from 'util'; import {runInNewContext} from 'vm'; import wrap from 'jest-snapshot-serializer-raw'; import mock = require('jest-mock'); -import FakeTimers from '../jestFakeTimers'; +import FakeTimers from '../legacyFakeTimers'; const timerConfig = { idToRef: (id: number) => id, diff --git a/packages/jest-fake-timers/src/__tests__/fakeTimersLolex.test.ts b/packages/jest-fake-timers/src/__tests__/modernFakeTimers.test.ts similarity index 99% rename from packages/jest-fake-timers/src/__tests__/fakeTimersLolex.test.ts rename to packages/jest-fake-timers/src/__tests__/modernFakeTimers.test.ts index bba8df289496..a731c594104c 100644 --- a/packages/jest-fake-timers/src/__tests__/fakeTimersLolex.test.ts +++ b/packages/jest-fake-timers/src/__tests__/modernFakeTimers.test.ts @@ -6,7 +6,7 @@ * */ -import FakeTimers from '../FakeTimersLolex'; +import FakeTimers from '../modernFakeTimers'; describe('FakeTimers', () => { describe('construction', () => { @@ -288,7 +288,7 @@ describe('FakeTimers', () => { }; const timers = new FakeTimers({global}); - // Lolex uses `setTimeout` during init to figure out if it's in Node or + // @sinonjs/fake-timers uses `setTimeout` during init to figure out if it's in Node or // browser env. So clear its calls before we install them into the env nativeSetTimeout.mockClear(); timers.useFakeTimers(); diff --git a/packages/jest-fake-timers/src/index.ts b/packages/jest-fake-timers/src/index.ts index 295edc2bee29..8e4daf764dda 100644 --- a/packages/jest-fake-timers/src/index.ts +++ b/packages/jest-fake-timers/src/index.ts @@ -5,5 +5,5 @@ * LICENSE file in the root directory of this source tree. */ -export {default as JestFakeTimers} from './jestFakeTimers'; -export {default as LolexFakeTimers} from './FakeTimersLolex'; +export {default as LegacyFakeTimers} from './legacyFakeTimers'; +export {default as ModernFakeTimers} from './modernFakeTimers'; diff --git a/packages/jest-fake-timers/src/jestFakeTimers.ts b/packages/jest-fake-timers/src/legacyFakeTimers.ts similarity index 100% rename from packages/jest-fake-timers/src/jestFakeTimers.ts rename to packages/jest-fake-timers/src/legacyFakeTimers.ts diff --git a/packages/jest-fake-timers/src/FakeTimersLolex.ts b/packages/jest-fake-timers/src/modernFakeTimers.ts similarity index 89% rename from packages/jest-fake-timers/src/FakeTimersLolex.ts rename to packages/jest-fake-timers/src/modernFakeTimers.ts index 56a767f4cab5..b0cd8c479a65 100644 --- a/packages/jest-fake-timers/src/FakeTimersLolex.ts +++ b/packages/jest-fake-timers/src/modernFakeTimers.ts @@ -6,10 +6,10 @@ */ import { + FakeTimerWithContext, InstalledClock, - LolexWithContext, - withGlobal as lolexWithGlobal, -} from 'lolex'; + withGlobal, +} from '@sinonjs/fake-timers'; import {StackTraceConfig, formatStackTrace} from 'jest-message-util'; export default class FakeTimers { @@ -17,7 +17,7 @@ export default class FakeTimers { private _config: StackTraceConfig; private _fakingTime: boolean; private _global: NodeJS.Global; - private _lolex: LolexWithContext; + private _fakeTimers: FakeTimerWithContext; private _maxLoops: number; constructor({ @@ -34,7 +34,7 @@ export default class FakeTimers { this._maxLoops = maxLoops || 100000; this._fakingTime = false; - this._lolex = lolexWithGlobal(global); + this._fakeTimers = withGlobal(global); } clearAllTimers(): void { @@ -63,7 +63,7 @@ export default class FakeTimers { if (this._checkFakeTimers()) { for (let i = steps; i > 0; i--) { this._clock.next(); - // Fire all timers at this point: https://github.com/sinonjs/lolex/issues/250 + // Fire all timers at this point: https://github.com/sinonjs/fake-timers/issues/250 this._clock.tick(0); if (this._clock.countTimers() === 0) { @@ -95,11 +95,11 @@ export default class FakeTimers { useFakeTimers(): void { if (!this._fakingTime) { - const toFake = Object.keys(this._lolex.timers) as Array< - keyof LolexWithContext['timers'] + const toFake = Object.keys(this._fakeTimers.timers) as Array< + keyof FakeTimerWithContext['timers'] >; - this._clock = this._lolex.install({ + this._clock = this._fakeTimers.install({ loopLimit: this._maxLoops, now: Date.now(), target: this._global, diff --git a/yarn.lock b/yarn.lock index abaad9b68bd8..b01763533183 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2309,6 +2309,13 @@ dependencies: type-detect "4.0.8" +"@sinonjs/fake-timers@^6.0.1": + version "6.0.1" + resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-6.0.1.tgz#293674fccb3262ac782c7aadfdeca86b10c75c40" + integrity sha512-MZPUxrmFubI36XS1DI3qmI0YdN1gks62JtFZvxR67ljjSNCeK6U08Zx4msEWOXuofgqUt6zPHSi1H9fbjR/NRA== + dependencies: + "@sinonjs/commons" "^1.7.0" + "@testing-library/dom@^6.0.0": version "6.0.0" resolved "https://registry.yarnpkg.com/@testing-library/dom/-/dom-6.0.0.tgz#34e28e69e49bd6347fc64a5dde4c4f9aabbd17d3" @@ -2563,11 +2570,6 @@ resolved "https://registry.yarnpkg.com/@types/lockfile/-/lockfile-1.0.1.tgz#434a3455e89843312f01976e010c60f1bcbd56f7" integrity sha512-65WZedEm4AnOsBDdsapJJG42MhROu3n4aSSiu87JXF/pSdlubxZxp3S1yz3kTfkJ2KBPud4CpjoHVAptOm9Zmw== -"@types/lolex@^5.1.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@types/lolex/-/lolex-5.1.0.tgz#11b4c4756c007306d0feeaf2f08f88350c635d2b" - integrity sha512-hCQ2dOEQUw1LwofdIpMMGGqENd5p5ANzvcTe1nXTjcQL84r7tcLXFJlBgi0Ggz0f7BLmE2epf0C5Q07iq2gV0g== - "@types/md5-file@^4.0.1": version "4.0.1" resolved "https://registry.yarnpkg.com/@types/md5-file/-/md5-file-4.0.1.tgz#5e6cfb7949dc375049b8f6fd8f91adacfc176c63" @@ -2709,6 +2711,11 @@ dependencies: "@types/node" "*" +"@types/sinonjs__fake-timers@^6.0.1": + version "6.0.1" + resolved "https://registry.yarnpkg.com/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-6.0.1.tgz#681df970358c82836b42f989188d133e218c458e" + integrity sha512-yYezQwGWty8ziyYLdZjwxyMb0CZR49h8JALHGrxjQHWlqGgc8kLdHEgWrgL0uZ29DMvEVBDnHU2Wg36zKSIUtA== + "@types/source-map-support@^0.5.0": version "0.5.1" resolved "https://registry.yarnpkg.com/@types/source-map-support/-/source-map-support-0.5.1.tgz#b13e4de5bf2e5858e0dfe33fac90556b0f652dc3" From 71631f6bf9ccf8937f02a5ecfb64b62712b86c19 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Sun, 3 May 2020 20:07:43 +0200 Subject: [PATCH 062/106] feat: add new 'modern' implementation of Fake Timers (#7776) --- CHANGELOG.md | 1 + docs/Configuration.md | 4 +- docs/JestObjectAPI.md | 18 ++++- e2e/__tests__/modernFakeTimers.test.ts | 20 +++++ .../from-config/__tests__/test.js | 18 +++++ .../from-config/package.json | 6 ++ .../from-jest-object/__tests__/test.js | 20 +++++ .../from-jest-object/package.json | 5 ++ .../legacy-code-todo-rewrite/jestAdapter.ts | 4 +- packages/jest-environment/src/index.ts | 18 ++++- packages/jest-jasmine2/src/index.ts | 6 +- packages/jest-runtime/package.json | 1 + packages/jest-runtime/src/index.ts | 77 +++++++++++++++---- packages/jest-runtime/tsconfig.json | 1 + packages/jest-types/src/Config.ts | 2 +- 15 files changed, 179 insertions(+), 22 deletions(-) create mode 100644 e2e/__tests__/modernFakeTimers.test.ts create mode 100644 e2e/modern-fake-timers/from-config/__tests__/test.js create mode 100644 e2e/modern-fake-timers/from-config/package.json create mode 100644 e2e/modern-fake-timers/from-jest-object/__tests__/test.js create mode 100644 e2e/modern-fake-timers/from-jest-object/package.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ece9b02be96..59b49fdcf98c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ### Features - `[jest-environment-jsdom]` [**BREAKING**] Upgrade `jsdom` to v16 ([#9606](https://github.com/facebook/jest/pull/9606)) +- `[@jest/fake-timers]` Add possibility to use a modern implementation of fake timers, backed by `@sinonjs/fake-timers` ([#7776](https://github.com/facebook/jest/pull/7776)) ### Fixes diff --git a/docs/Configuration.md b/docs/Configuration.md index bdfddc8c3bdd..b429dc017d68 100644 --- a/docs/Configuration.md +++ b/docs/Configuration.md @@ -1124,7 +1124,9 @@ This option sets the URL for the jsdom environment. It is reflected in propertie Default: `real` -Setting this value to `fake` allows the use of fake timers for functions such as `setTimeout`. Fake timers are useful when a piece of code sets a long timeout that we don't want to wait for in a test. +Setting this value to `legacy` or `fake` allows the use of fake timers for functions such as `setTimeout`. Fake timers are useful when a piece of code sets a long timeout that we don't want to wait for in a test. + +If the value is `modern`, [`@sinonjs/fake-timers`](https://github.com/sinonjs/fake-timers) will be used as implementation instead of Jest's own legacy implementation. This will be the default fake implementation in Jest 27. ### `transform` [object\] diff --git a/docs/JestObjectAPI.md b/docs/JestObjectAPI.md index 784c5c3370f1..7a6a39a2e28c 100644 --- a/docs/JestObjectAPI.md +++ b/docs/JestObjectAPI.md @@ -577,10 +577,12 @@ Restores all mocks back to their original value. Equivalent to calling [`.mockRe ## Mock timers -### `jest.useFakeTimers()` +### `jest.useFakeTimers(implementation?: 'modern' | 'legacy')` Instructs Jest to use fake versions of the standard timer functions (`setTimeout`, `setInterval`, `clearTimeout`, `clearInterval`, `nextTick`, `setImmediate` and `clearImmediate`). +If you pass `'modern'` as argument, [`@sinonjs/fake-timers`](https://github.com/sinonjs/fake-timers) will be used as implementation instead of Jest's own fake timers. This also mocks additional timers like `Date`. `'modern'` will be the default behavior in Jest 27. + Returns the `jest` object for chaining. ### `jest.useRealTimers()` @@ -607,6 +609,8 @@ This is often useful for synchronously executing setTimeouts during a test in or Exhausts all tasks queued by `setImmediate()`. +> Note: This function is not available when using modern fake timers implementation + ### `jest.advanceTimersByTime(msToRun)` ##### renamed in Jest **22.0.0+** @@ -639,6 +643,18 @@ This means, if any timers have been scheduled (but have not yet executed), they Returns the number of fake timers still left to run. +### `.jest.setSystemTime()` + +Set the current system time used by fake timers. Simulates a user changing the system clock while your program is running. It affects the current time but it does not in itself cause e.g. timers to fire; they will fire exactly as they would have done without the call to `jest.setSystemTime()`. + +> Note: This function is only available when using modern fake timers implementation + +### `.jest.getRealSystemTime()` + +When mocking time, `Date.now()` will also be mocked. If you for some reason need access to the real current time, you can invoke this function. + +> Note: This function is only available when using modern fake timers implementation + ## Misc ### `jest.setTimeout(timeout)` diff --git a/e2e/__tests__/modernFakeTimers.test.ts b/e2e/__tests__/modernFakeTimers.test.ts new file mode 100644 index 000000000000..e004b3b19192 --- /dev/null +++ b/e2e/__tests__/modernFakeTimers.test.ts @@ -0,0 +1,20 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +import runJest from '../runJest'; + +describe('modern implementation of fake timers', () => { + it('should be possible to use modern implementation from config', () => { + const result = runJest('modern-fake-timers/from-config'); + expect(result.exitCode).toBe(0); + }); + + it('should be possible to use modern implementation from jest-object', () => { + const result = runJest('modern-fake-timers/from-jest-object'); + expect(result.exitCode).toBe(0); + }); +}); diff --git a/e2e/modern-fake-timers/from-config/__tests__/test.js b/e2e/modern-fake-timers/from-config/__tests__/test.js new file mode 100644 index 000000000000..a32e5a5bc8e4 --- /dev/null +++ b/e2e/modern-fake-timers/from-config/__tests__/test.js @@ -0,0 +1,18 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +'use strict'; + +test('fake timers', () => { + jest.setSystemTime(0); + + expect(Date.now()).toBe(0); + + jest.setSystemTime(1000); + + expect(Date.now()).toBe(1000); +}); diff --git a/e2e/modern-fake-timers/from-config/package.json b/e2e/modern-fake-timers/from-config/package.json new file mode 100644 index 000000000000..48517c65a548 --- /dev/null +++ b/e2e/modern-fake-timers/from-config/package.json @@ -0,0 +1,6 @@ +{ + "jest": { + "timers": "modern", + "testEnvironment": "node" + } +} diff --git a/e2e/modern-fake-timers/from-jest-object/__tests__/test.js b/e2e/modern-fake-timers/from-jest-object/__tests__/test.js new file mode 100644 index 000000000000..acf8f56889cd --- /dev/null +++ b/e2e/modern-fake-timers/from-jest-object/__tests__/test.js @@ -0,0 +1,20 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +'use strict'; + +test('fake timers', () => { + jest.useFakeTimers('modern'); + + jest.setSystemTime(0); + + expect(Date.now()).toBe(0); + + jest.setSystemTime(1000); + + expect(Date.now()).toBe(1000); +}); diff --git a/e2e/modern-fake-timers/from-jest-object/package.json b/e2e/modern-fake-timers/from-jest-object/package.json new file mode 100644 index 000000000000..148788b25446 --- /dev/null +++ b/e2e/modern-fake-timers/from-jest-object/package.json @@ -0,0 +1,5 @@ +{ + "jest": { + "testEnvironment": "node" + } +} diff --git a/packages/jest-circus/src/legacy-code-todo-rewrite/jestAdapter.ts b/packages/jest-circus/src/legacy-code-todo-rewrite/jestAdapter.ts index f5653ebf5927..ff59c04981ba 100644 --- a/packages/jest-circus/src/legacy-code-todo-rewrite/jestAdapter.ts +++ b/packages/jest-circus/src/legacy-code-todo-rewrite/jestAdapter.ts @@ -49,9 +49,11 @@ const jestAdapter = async ( testPath, }); - if (config.timers === 'fake') { + if (config.timers === 'fake' || config.timers === 'legacy') { // during setup, this cannot be null (and it's fine to explode if it is) environment.fakeTimers!.useFakeTimers(); + } else if (config.timers === 'modern') { + environment.fakeTimersModern!.useFakeTimers(); } globals.beforeEach(() => { diff --git a/packages/jest-environment/src/index.ts b/packages/jest-environment/src/index.ts index df3e0f856bd6..d886d7128535 100644 --- a/packages/jest-environment/src/index.ts +++ b/packages/jest-environment/src/index.ts @@ -199,6 +199,8 @@ export interface Jest { retryTimes(numRetries: number): Jest; /** * Exhausts tasks queued by setImmediate(). + * + * > Note: This function is not available when using Lolex as fake timers implementation */ runAllImmediates(): void; /** @@ -269,7 +271,7 @@ export interface Jest { /** * Instructs Jest to use fake versions of the standard timer functions. */ - useFakeTimers(): Jest; + useFakeTimers(implementation?: 'modern' | 'legacy'): Jest; /** * Instructs Jest to use the real versions of the standard timer functions. */ @@ -281,4 +283,18 @@ export interface Jest { * every test so that local module state doesn't conflict between tests. */ isolateModules(fn: () => void): Jest; + + /** + * When mocking time, `Date.now()` will also be mocked. If you for some reason need access to the real current time, you can invoke this function. + * + * > Note: This function is only available when using Lolex as fake timers implementation + */ + getRealSystemTime(): number; + + /** + * Set the current system time used by fake timers. Simulates a user changing the system clock while your program is running. It affects the current time but it does not in itself cause e.g. timers to fire; they will fire exactly as they would have done without the call to `jest.setSystemTime()`. + * + * > Note: This function is only available when using Lolex as fake timers implementation + */ + setSystemTime(now?: number): void; } diff --git a/packages/jest-jasmine2/src/index.ts b/packages/jest-jasmine2/src/index.ts index c37fe26f7dbc..8d77212ba5ba 100644 --- a/packages/jest-jasmine2/src/index.ts +++ b/packages/jest-jasmine2/src/index.ts @@ -93,8 +93,10 @@ async function jasmine2( environment.global.describe.skip = environment.global.xdescribe; environment.global.describe.only = environment.global.fdescribe; - if (config.timers === 'fake') { + if (config.timers === 'fake' || config.timers === 'legacy') { environment.fakeTimers!.useFakeTimers(); + } else if (config.timers === 'modern') { + environment.fakeTimersModern!.useFakeTimers(); } env.beforeEach(() => { @@ -109,7 +111,7 @@ async function jasmine2( if (config.resetMocks) { runtime.resetAllMocks(); - if (config.timers === 'fake') { + if (config.timers === 'fake' || config.timers === 'legacy') { environment.fakeTimers!.useFakeTimers(); } } diff --git a/packages/jest-runtime/package.json b/packages/jest-runtime/package.json index 9a934f038170..a242704311c8 100644 --- a/packages/jest-runtime/package.json +++ b/packages/jest-runtime/package.json @@ -13,6 +13,7 @@ "@jest/console": "^26.0.0-alpha.0", "@jest/environment": "^26.0.0-alpha.0", "@jest/globals": "^26.0.0-alpha.0", + "@jest/fake-timers": "^26.0.0-alpha.0", "@jest/source-map": "^26.0.0-alpha.0", "@jest/test-result": "^26.0.0-alpha.0", "@jest/transform": "^26.0.0-alpha.0", diff --git a/packages/jest-runtime/src/index.ts b/packages/jest-runtime/src/index.ts index da46c8fc5dab..1acaa3647d3e 100644 --- a/packages/jest-runtime/src/index.ts +++ b/packages/jest-runtime/src/index.ts @@ -28,6 +28,7 @@ import type { } from '@jest/environment'; import type * as JestGlobals from '@jest/globals'; import type {SourceMapRegistry} from '@jest/source-map'; +import {LegacyFakeTimers, ModernFakeTimers} from '@jest/fake-timers'; import {formatStackTrace, separateMessageFromStack} from 'jest-message-util'; import {createDirectory, deepCyclicCopy} from 'jest-util'; import {escapePathForRegex} from 'jest-regex-util'; @@ -134,6 +135,10 @@ class Runtime { private _currentlyExecutingModulePath: string; private _environment: JestEnvironment; private _explicitShouldMock: BooleanMap; + private _fakeTimersImplementation: + | LegacyFakeTimers + | ModernFakeTimers + | null; private _internalModuleRegistry: ModuleRegistry; private _isCurrentlyExecutingManualMock: string | null; private _mockFactories: Map unknown>; @@ -205,6 +210,11 @@ class Runtime { this._shouldUnmockTransitiveDependenciesCache = new Map(); this._transitiveShouldMock = new Map(); + this._fakeTimersImplementation = + config.timers === 'modern' + ? this._environment.fakeTimersModern + : this._environment.fakeTimers; + this._unmockList = unmockRegExpCache.get(config); if (!this._unmockList && config.unmockedModulePathPatterns) { this._unmockList = new RegExp( @@ -1410,8 +1420,25 @@ class Runtime { this.restoreAllMocks(); return jestObject; }; - const useFakeTimers = () => { - _getFakeTimers().useFakeTimers(); + const _getFakeTimers = () => { + if ( + !(this._environment.fakeTimers || this._environment.fakeTimersModern) + ) { + this._logFormattedReferenceError( + 'You are trying to access a property or method of the Jest environment after it has been torn down.', + ); + process.exitCode = 1; + } + + return this._fakeTimersImplementation!; + }; + const useFakeTimers = (type: string = 'legacy') => { + if (type === 'modern') { + this._fakeTimersImplementation = this._environment.fakeTimersModern; + } else { + this._fakeTimersImplementation = this._environment.fakeTimers; + } + this._fakeTimersImplementation!.useFakeTimers(); return jestObject; }; const useRealTimers = () => { @@ -1445,18 +1472,6 @@ class Runtime { return jestObject; }; - const _getFakeTimers = (): NonNullable => { - if (!this._environment.fakeTimers) { - this._logFormattedReferenceError( - 'You are trying to access a property or method of the Jest environment after it has been torn down.', - ); - process.exitCode = 1; - } - - // We've logged a user message above, so it doesn't matter if we return `null` here - return this._environment.fakeTimers!; - }; - const jestObject: Jest = { addMatchers: (matchers: Record) => this._environment.global.jasmine.addMatchers(matchers), @@ -1476,6 +1491,17 @@ class Runtime { fn, genMockFromModule: (moduleName: string) => this._generateMock(from, moduleName), + getRealSystemTime: () => { + const fakeTimers = _getFakeTimers(); + + if (fakeTimers instanceof ModernFakeTimers) { + return fakeTimers.getRealSystemTime(); + } else { + throw new TypeError( + 'getRealSystemTime is not available when not using modern timers', + ); + } + }, getTimerCount: () => _getFakeTimers().getTimerCount(), isMockFunction: this._moduleMocker.isMockFunction, isolateModules, @@ -1487,7 +1513,17 @@ class Runtime { resetModules, restoreAllMocks, retryTimes, - runAllImmediates: () => _getFakeTimers().runAllImmediates(), + runAllImmediates: () => { + const fakeTimers = _getFakeTimers(); + + if (fakeTimers instanceof LegacyFakeTimers) { + fakeTimers.runAllImmediates(); + } else { + throw new TypeError( + 'runAllImmediates is not available when using modern timers', + ); + } + }, runAllTicks: () => _getFakeTimers().runAllTicks(), runAllTimers: () => _getFakeTimers().runAllTimers(), runOnlyPendingTimers: () => _getFakeTimers().runOnlyPendingTimers(), @@ -1495,6 +1531,17 @@ class Runtime { _getFakeTimers().advanceTimersByTime(msToRun), setMock: (moduleName: string, mock: unknown) => setMockFactory(moduleName, () => mock), + setSystemTime: (now?: number) => { + const fakeTimers = _getFakeTimers(); + + if (fakeTimers instanceof ModernFakeTimers) { + fakeTimers.setSystemTime(now); + } else { + throw new TypeError( + 'setSystemTime is not available when not using modern timers', + ); + } + }, setTimeout, spyOn, unmock, diff --git a/packages/jest-runtime/tsconfig.json b/packages/jest-runtime/tsconfig.json index 2955d779d6b1..fb40160ffc2b 100644 --- a/packages/jest-runtime/tsconfig.json +++ b/packages/jest-runtime/tsconfig.json @@ -9,6 +9,7 @@ {"path": "../jest-console"}, {"path": "../jest-environment"}, {"path": "../jest-environment-node"}, + {"path": "../jest-fake-timers"}, {"path": "../jest-globals"}, {"path": "../jest-haste-map"}, {"path": "../jest-message-util"}, diff --git a/packages/jest-types/src/Config.ts b/packages/jest-types/src/Config.ts index fcdb4f570856..cf895c67c1a8 100644 --- a/packages/jest-types/src/Config.ts +++ b/packages/jest-types/src/Config.ts @@ -344,7 +344,7 @@ export type ProjectConfig = { testRegex: Array; testRunner: string; testURL: string; - timers: 'real' | 'fake'; + timers: 'real' | 'fake' | 'modern' | 'legacy'; transform: Array<[string, Path, Record]>; transformIgnorePatterns: Array; watchPathIgnorePatterns: Array; From 8147af1a898c8348d2985fff50f101aa8fca44e4 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Sun, 3 May 2020 20:12:38 +0200 Subject: [PATCH 063/106] chore: improve error on module not found (#9963) --- CHANGELOG.md | 1 + e2e/__tests__/stackTrace.test.ts | 2 +- e2e/resolve/__tests__/resolve.test.js | 2 +- packages/jest-resolve/src/index.ts | 4 ++-- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 59b49fdcf98c..15750ac69f9d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ - `[jest-circus]` [**BREAKING**] Fail tests if a test takes a done callback and have return values ([#9129](https://github.com/facebook/jest/pull/9129)) - `[jest-circus]` [**BREAKING**] Throw a proper error if a test / hook is defined asynchronously ([#8096](https://github.com/facebook/jest/pull/8096)) - `[jest-config, jest-resolve]` [**BREAKING**] Remove support for `browser` field ([#9943](https://github.com/facebook/jest/pull/9943)) +- `[jest-resolve]` Show relative path from root dir for `module not found` errors ([#9963](https://github.com/facebook/jest/pull/9963)) ### Chore & Maintenance diff --git a/e2e/__tests__/stackTrace.test.ts b/e2e/__tests__/stackTrace.test.ts index a9e571900cb2..48904bff60e5 100644 --- a/e2e/__tests__/stackTrace.test.ts +++ b/e2e/__tests__/stackTrace.test.ts @@ -78,7 +78,7 @@ describe('Stack Trace', () => { // Make sure we show Jest's jest-resolve as part of the stack trace expect(stderr).toMatch( - /Cannot find module 'this-module-does-not-exist' from 'testError.test\.js'/, + /Cannot find module 'this-module-does-not-exist' from '__tests__\/testError\.test\.js'/, ); expect(stderr).toMatch( diff --git a/e2e/resolve/__tests__/resolve.test.js b/e2e/resolve/__tests__/resolve.test.js index e3d3500d6b8c..a6c3b3e4af5c 100644 --- a/e2e/resolve/__tests__/resolve.test.js +++ b/e2e/resolve/__tests__/resolve.test.js @@ -121,7 +121,7 @@ test('should throw module not found error if the module cannot be found', () => expect(() => require('Test8')).toThrow( expect.objectContaining({ code: 'MODULE_NOT_FOUND', - message: "Cannot find module 'Test8' from 'resolve.test.js'", + message: "Cannot find module 'Test8' from '__tests__/resolve.test.js'", }), ); }); diff --git a/packages/jest-resolve/src/index.ts b/packages/jest-resolve/src/index.ts index 1efebd10b974..c253cfa8aa71 100644 --- a/packages/jest-resolve/src/index.ts +++ b/packages/jest-resolve/src/index.ts @@ -236,10 +236,10 @@ class Resolver { // 5. Throw an error if the module could not be found. `resolve.sync` only // produces an error based on the dirname but we have the actual current // module name available. - const relativePath = path.relative(dirname, from); + const relativePath = path.relative(this._options.rootDir, from) || '.'; throw new ModuleNotFoundError( - `Cannot find module '${moduleName}' from '${relativePath || '.'}'`, + `Cannot find module '${moduleName}' from '${relativePath}'`, moduleName, ); } From c665f229e7abbec25a6e35ecea4aaf5defa24ae3 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Sun, 3 May 2020 20:37:51 +0200 Subject: [PATCH 064/106] feat: add `createMockFromModule` to replace `genMockFromModule` (#9962) --- CHANGELOG.md | 1 + docs/JestObjectAPI.md | 16 +++++++++------ docs/ManualMocks.md | 4 ++-- .../__mocks__/fs.js | 2 +- ...e.test.js => createMockFromModule.test.js} | 4 ++-- examples/manual-mocks/__mocks__/fs.js | 2 +- examples/manual-mocks/__mocks__/lodash.js | 2 +- .../manual-mocks/models/__mocks__/user.js | 2 +- .../module-mock/__tests__/partial_mock.js | 2 +- packages/jest-config/src/__mocks__/fs.js | 2 +- packages/jest-config/src/__mocks__/os.js | 2 +- .../src/__mocks__/index.ts | 2 +- packages/jest-environment/src/index.ts | 10 ++++++++++ .../src/__tests__/worker.test.js | 2 +- .../lib/__tests__/dependencyExtractor.test.js | 20 +++++++++++++++++++ .../src/lib/dependencyExtractor.ts | 2 +- .../src/__tests__/index.test.ts | 10 ++++++++-- .../src/__tests__/coverage_reporter.test.js | 2 +- ...> runtime_create_mock_from_module.test.js} | 10 +++++----- ... => mapped_module_createMockFromModule.js} | 0 packages/jest-runtime/src/index.ts | 2 ++ .../src/__tests__/inline_snapshots.test.ts | 2 +- .../jest-snapshot/src/__tests__/utils.test.ts | 2 +- .../src/__tests__/getCallsite.test.ts | 2 +- .../src/__tests__/test_sequencer.test.js | 2 +- .../src/__tests__/script_transformer.test.js | 2 +- 26 files changed, 76 insertions(+), 33 deletions(-) rename examples/automatic-mocks/__tests__/{genMockFromModule.test.js => createMockFromModule.test.js} (76%) rename packages/jest-runtime/src/__tests__/{runtime_gen_mock_from_module.test.js => runtime_create_mock_from_module.test.js} (86%) rename packages/jest-runtime/src/__tests__/test_root/{mapped_module_genMockFromModule.js => mapped_module_createMockFromModule.js} (100%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 15750ac69f9d..0e0db1897e2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - `[jest-environment-jsdom]` [**BREAKING**] Upgrade `jsdom` to v16 ([#9606](https://github.com/facebook/jest/pull/9606)) - `[@jest/fake-timers]` Add possibility to use a modern implementation of fake timers, backed by `@sinonjs/fake-timers` ([#7776](https://github.com/facebook/jest/pull/7776)) +- `[jest-runtime]` Add `createMockFromModule` as an alias for `genMockFromModule` ([#9962](https://github.com/facebook/jest/pull/9962)) ### Fixes diff --git a/docs/JestObjectAPI.md b/docs/JestObjectAPI.md index 7a6a39a2e28c..2a30948e86e3 100644 --- a/docs/JestObjectAPI.md +++ b/docs/JestObjectAPI.md @@ -90,7 +90,11 @@ test('original implementation', () => { _Note: this method was previously called `autoMockOn`. When using `babel-jest`, calls to `enableAutomock` will automatically be hoisted to the top of the code block. Use `autoMockOn` if you want to explicitly avoid this behavior._ -### `jest.genMockFromModule(moduleName)` +### `jest.createMockFromModule(moduleName)` + +##### renamed in Jest **26.0.0+** + +Also under the alias: `.genMockFromModule(moduleName)` Given the name of a module, use the automatic mocking system to generate a mocked version of the module for you. @@ -109,17 +113,17 @@ export default { ``` ```js -// __tests__/genMockFromModule.test.js -const utils = jest.genMockFromModule('../utils').default; +// __tests__/createMockFromModule.test.js +const utils = jest.createMockFromModule('../utils').default; utils.isAuthorized = jest.fn(secret => secret === 'not wizard'); -test('implementation created by jest.genMockFromModule', () => { +test('implementation created by jest.createMockFromModule', () => { expect(utils.authorize.mock).toBeTruthy(); expect(utils.isAuthorized('not wizard')).toEqual(true); }); ``` -This is how `genMockFromModule` will mock the following data types: +This is how `createMockFromModule` will mock the following data types: #### `Function` @@ -176,7 +180,7 @@ module.exports = { ```js // __tests__/example.test.js -const example = jest.genMockFromModule('./example'); +const example = jest.createMockFromModule('./example'); test('should run example code', () => { // creates a new mocked function with no formal arguments. diff --git a/docs/ManualMocks.md b/docs/ManualMocks.md index e2ae28acf3ea..a64816d71664 100644 --- a/docs/ManualMocks.md +++ b/docs/ManualMocks.md @@ -64,7 +64,7 @@ Since we'd like our tests to avoid actually hitting the disk (that's pretty slow const path = require('path'); -const fs = jest.genMockFromModule('fs'); +const fs = jest.createMockFromModule('fs'); // This is a custom function that our tests can use during setup to specify // what the files on the "mock" filesystem should look like when any of the @@ -124,7 +124,7 @@ describe('listFilesInDirectorySync', () => { }); ``` -The example mock shown here uses [`jest.genMockFromModule`](JestObjectAPI.md#jestgenmockfrommodulemodulename) to generate an automatic mock, and overrides its default behavior. This is the recommended approach, but is completely optional. If you do not want to use the automatic mock at all, you can export your own functions from the mock file. One downside to fully manual mocks is that they're manual – meaning you have to manually update them any time the module they are mocking changes. Because of this, it's best to use or extend the automatic mock when it works for your needs. +The example mock shown here uses [`jest.createMockFromModule`](JestObjectAPI.md#jestcreatemockfrommodulemodulename) to generate an automatic mock, and overrides its default behavior. This is the recommended approach, but is completely optional. If you do not want to use the automatic mock at all, you can export your own functions from the mock file. One downside to fully manual mocks is that they're manual – meaning you have to manually update them any time the module they are mocking changes. Because of this, it's best to use or extend the automatic mock when it works for your needs. To ensure that a manual mock and its real implementation stay in sync, it might be useful to require the real module using [`jest.requireActual(moduleName)`](JestObjectAPI.md#jestrequireactualmodulename) in your manual mock and amending it with mock functions before exporting it. diff --git a/e2e/runtime-internal-module-registry/__mocks__/fs.js b/e2e/runtime-internal-module-registry/__mocks__/fs.js index 86e21919deab..38ea4f886dbd 100644 --- a/e2e/runtime-internal-module-registry/__mocks__/fs.js +++ b/e2e/runtime-internal-module-registry/__mocks__/fs.js @@ -7,7 +7,7 @@ 'use strict'; -const fs = jest.genMockFromModule('fs'); +const fs = jest.createMockFromModule('fs'); let mkdirWasCalled = false; diff --git a/examples/automatic-mocks/__tests__/genMockFromModule.test.js b/examples/automatic-mocks/__tests__/createMockFromModule.test.js similarity index 76% rename from examples/automatic-mocks/__tests__/genMockFromModule.test.js rename to examples/automatic-mocks/__tests__/createMockFromModule.test.js index 274e1b8d5ca8..79881c511189 100644 --- a/examples/automatic-mocks/__tests__/genMockFromModule.test.js +++ b/examples/automatic-mocks/__tests__/createMockFromModule.test.js @@ -7,8 +7,8 @@ test('implementation created by automock', () => { expect(utils.isAuthorized()).toBeUndefined(); }); -test('implementation created by jest.genMockFromModule', () => { - const utils = jest.genMockFromModule('../utils').default; +test('implementation created by jest.createMockFromModule', () => { + const utils = jest.createMockFromModule('../utils').default; utils.isAuthorized = jest.fn(secret => secret === 'not wizard'); expect(utils.authorize.mock).toBeTruthy(); diff --git a/examples/manual-mocks/__mocks__/fs.js b/examples/manual-mocks/__mocks__/fs.js index 64b2bb76c7e4..8e5cd3838217 100644 --- a/examples/manual-mocks/__mocks__/fs.js +++ b/examples/manual-mocks/__mocks__/fs.js @@ -4,7 +4,7 @@ const path = require('path'); -const fs = jest.genMockFromModule('fs'); +const fs = jest.createMockFromModule('fs'); // This is a custom function that our tests can use during setup to specify // what the files on the "mock" filesystem should look like when any of the diff --git a/examples/manual-mocks/__mocks__/lodash.js b/examples/manual-mocks/__mocks__/lodash.js index b726843310b5..2039270fc09b 100644 --- a/examples/manual-mocks/__mocks__/lodash.js +++ b/examples/manual-mocks/__mocks__/lodash.js @@ -1,6 +1,6 @@ // Copyright 2004-present Facebook. All Rights Reserved. -const lodash = jest.genMockFromModule('lodash'); +const lodash = jest.createMockFromModule('lodash'); lodash.head = arr => 5; diff --git a/examples/manual-mocks/models/__mocks__/user.js b/examples/manual-mocks/models/__mocks__/user.js index 56a0e0d68492..57a95c398434 100644 --- a/examples/manual-mocks/models/__mocks__/user.js +++ b/examples/manual-mocks/models/__mocks__/user.js @@ -1,6 +1,6 @@ // Copyright 2004-present Facebook. All Rights Reserved. -const user = jest.genMockFromModule('../user'); +const user = jest.createMockFromModule('../user'); user.getAuthenticated = () => ({ age: 622, diff --git a/examples/module-mock/__tests__/partial_mock.js b/examples/module-mock/__tests__/partial_mock.js index 7e2b92434e13..6d7e610677fc 100644 --- a/examples/module-mock/__tests__/partial_mock.js +++ b/examples/module-mock/__tests__/partial_mock.js @@ -9,7 +9,7 @@ import defaultExport, {apple, strawberry} from '../fruit'; jest.mock('../fruit', () => { const originalModule = jest.requireActual('../fruit'); - const mockedModule = jest.genMockFromModule('../fruit'); + const mockedModule = jest.createMockFromModule('../fruit'); //Mock the default export and named export 'apple'. return { diff --git a/packages/jest-config/src/__mocks__/fs.js b/packages/jest-config/src/__mocks__/fs.js index c754fb89e64c..c4324a7869df 100644 --- a/packages/jest-config/src/__mocks__/fs.js +++ b/packages/jest-config/src/__mocks__/fs.js @@ -7,7 +7,7 @@ 'use strict'; -const fs = jest.genMockFromModule('fs'); +const fs = jest.createMockFromModule('fs'); const mockFiles = new Map(); function __setMockFiles(newMockFiles) { diff --git a/packages/jest-config/src/__mocks__/os.js b/packages/jest-config/src/__mocks__/os.js index 3d2c361f318b..a17b60dc17e7 100644 --- a/packages/jest-config/src/__mocks__/os.js +++ b/packages/jest-config/src/__mocks__/os.js @@ -7,7 +7,7 @@ 'use strict'; -const os = jest.genMockFromModule('os'); +const os = jest.createMockFromModule('os'); let cpus; function __setCpus(newCpus) { diff --git a/packages/jest-environment-jsdom/src/__mocks__/index.ts b/packages/jest-environment-jsdom/src/__mocks__/index.ts index b6f34c08f441..c87188636ec8 100644 --- a/packages/jest-environment-jsdom/src/__mocks__/index.ts +++ b/packages/jest-environment-jsdom/src/__mocks__/index.ts @@ -8,7 +8,7 @@ const vm = jest.requireActual('vm'); -const JSDOMEnvironment = jest.genMockFromModule('../index') as jest.Mock; +const JSDOMEnvironment = jest.createMockFromModule('../index') as jest.Mock; JSDOMEnvironment.mockImplementation(function (config) { // @ts-ignore diff --git a/packages/jest-environment/src/index.ts b/packages/jest-environment/src/index.ts index d886d7128535..21970ecd1543 100644 --- a/packages/jest-environment/src/index.ts +++ b/packages/jest-environment/src/index.ts @@ -126,8 +126,18 @@ export interface Jest { * * This is useful when you want to create a manual mock that extends the * automatic mock's behavior. + * + * @deprecated Use `jest.createMockFromModule()` instead */ genMockFromModule(moduleName: string): unknown; + /** + * Given the name of a module, use the automatic mocking system to generate a + * mocked version of the module for you. + * + * This is useful when you want to create a manual mock that extends the + * automatic mock's behavior. + */ + createMockFromModule(moduleName: string): unknown; /** * Determines if the given function is a mocked function. */ diff --git a/packages/jest-haste-map/src/__tests__/worker.test.js b/packages/jest-haste-map/src/__tests__/worker.test.js index cf313fe2e042..35d049ef76fe 100644 --- a/packages/jest-haste-map/src/__tests__/worker.test.js +++ b/packages/jest-haste-map/src/__tests__/worker.test.js @@ -38,7 +38,7 @@ jest.mock('graceful-fs', () => { }; return { - ...jest.genMockFromModule('graceful-fs'), + ...jest.createMockFromModule('graceful-fs'), readFileSync: jest.fn((path, options) => { if (mockFs[path]) { return options === 'utf8' ? mockFs[path] : Buffer.from(mockFs[path]); diff --git a/packages/jest-haste-map/src/lib/__tests__/dependencyExtractor.test.js b/packages/jest-haste-map/src/lib/__tests__/dependencyExtractor.test.js index d4f8ab691942..f2196a19c4b5 100644 --- a/packages/jest-haste-map/src/lib/__tests__/dependencyExtractor.test.js +++ b/packages/jest-haste-map/src/lib/__tests__/dependencyExtractor.test.js @@ -243,4 +243,24 @@ describe('dependencyExtractor', () => { `; expect(extract(code)).toEqual(new Set(['dep1', 'dep2', 'dep3', 'dep4'])); }); + + it('should extract dependencies from `jest.createMockFromModule` calls', () => { + const code = ` + // Good + jest.createMockFromModule('dep1'); + const dep2 = jest.createMockFromModule( + "dep2", + ); + if (jest.createMockFromModule(\`dep3\`).cond) {} + jest + .requireMock('dep4'); + + // Bad + ${COMMENT_NO_NEG_LB} foo . jest.createMockFromModule('inv1') + xjest.createMockFromModule('inv2'); + jest.createMockFromModulex('inv3'); + jest.createMockFromModule('inv4', 'inv5'); + `; + expect(extract(code)).toEqual(new Set(['dep1', 'dep2', 'dep3', 'dep4'])); + }); }); diff --git a/packages/jest-haste-map/src/lib/dependencyExtractor.ts b/packages/jest-haste-map/src/lib/dependencyExtractor.ts index e99a513701ec..56dce5ebfd81 100644 --- a/packages/jest-haste-map/src/lib/dependencyExtractor.ts +++ b/packages/jest-haste-map/src/lib/dependencyExtractor.ts @@ -63,7 +63,7 @@ const IMPORT_OR_EXPORT_RE = createRegExp( const JEST_EXTENSIONS_RE = createRegExp( [ ...functionCallStart( - 'jest\\s*\\.\\s*(?:requireActual|requireMock|genMockFromModule)', + 'jest\\s*\\.\\s*(?:requireActual|requireMock|genMockFromModule|createMockFromModule)', ), CAPTURE_STRING_LITERAL(1), WHITESPACE, diff --git a/packages/jest-regex-util/src/__tests__/index.test.ts b/packages/jest-regex-util/src/__tests__/index.test.ts index ca3ed9d1001f..ecfa008fd662 100644 --- a/packages/jest-regex-util/src/__tests__/index.test.ts +++ b/packages/jest-regex-util/src/__tests__/index.test.ts @@ -10,7 +10,10 @@ describe('replacePathSepForRegex()', () => { describe('posix', () => { beforeAll(() => { - jest.mock('path', () => ({...jest.genMockFromModule('path'), sep: '/'})); + jest.mock('path', () => ({ + ...jest.createMockFromModule('path'), + sep: '/', + })); jest.isolateModules(() => { replacePathSepForRegex = require('../').replacePathSepForRegex; }); @@ -24,7 +27,10 @@ describe('replacePathSepForRegex()', () => { describe('win32', () => { beforeAll(() => { - jest.mock('path', () => ({...jest.genMockFromModule('path'), sep: '\\'})); + jest.mock('path', () => ({ + ...jest.createMockFromModule('path'), + sep: '\\', + })); jest.isolateModules(() => { replacePathSepForRegex = require('../').replacePathSepForRegex; }); diff --git a/packages/jest-reporters/src/__tests__/coverage_reporter.test.js b/packages/jest-reporters/src/__tests__/coverage_reporter.test.js index 7e1cf5c4ceb6..e15df8cbdd59 100644 --- a/packages/jest-reporters/src/__tests__/coverage_reporter.test.js +++ b/packages/jest-reporters/src/__tests__/coverage_reporter.test.js @@ -13,7 +13,7 @@ jest summarizers: {pkg: jest.fn(() => ({visit: jest.fn()}))}, })) .mock('istanbul-reports', () => ({ - ...jest.genMockFromModule('istanbul-reports'), + ...jest.createMockFromModule('istanbul-reports'), create: jest.fn(() => ({execute: jest.fn()})), })); diff --git a/packages/jest-runtime/src/__tests__/runtime_gen_mock_from_module.test.js b/packages/jest-runtime/src/__tests__/runtime_create_mock_from_module.test.js similarity index 86% rename from packages/jest-runtime/src/__tests__/runtime_gen_mock_from_module.test.js rename to packages/jest-runtime/src/__tests__/runtime_create_mock_from_module.test.js index 818b87eaec97..301c4e3910fa 100644 --- a/packages/jest-runtime/src/__tests__/runtime_gen_mock_from_module.test.js +++ b/packages/jest-runtime/src/__tests__/runtime_create_mock_from_module.test.js @@ -19,7 +19,7 @@ describe('Runtime', () => { createRuntime = require('createRuntime'); }); - describe('genMockFromModule', () => { + describe('createMockFromModule', () => { it('does not cause side effects in the rest of the module system when generating a mock', () => createRuntime(__filename).then(runtime => { const testRequire = runtime.requireModule.bind( @@ -33,7 +33,7 @@ describe('Runtime', () => { expect(origModuleStateValue).toBe('default'); // Generate a mock for a module with side effects - const mock = module.jest.genMockFromModule('ModuleWithSideEffects'); + const mock = module.jest.createMockFromModule('ModuleWithSideEffects'); // Make sure we get a mock. expect(mock.fn()).toBe(undefined); @@ -43,8 +43,8 @@ describe('Runtime', () => { it('resolves mapped modules correctly', () => createRuntime(__filename, {moduleNameMapper}).then(runtime => { const root = runtime.requireModule(runtime.__mockRootPath); - const mockModule = root.jest.genMockFromModule( - 'module/name/genMockFromModule', + const mockModule = root.jest.createMockFromModule( + 'module/name/createMockFromModule', ); expect(mockModule.test.mock).toBeTruthy(); @@ -59,7 +59,7 @@ describe('Runtime', () => { ); const module = testRequire('RegularModule'); - const mockModule = module.jest.genMockFromModule('RegularModule'); + const mockModule = module.jest.createMockFromModule('RegularModule'); const testObjectPrototype = Object.getPrototypeOf(module.object); const mockObjectPrototype = Object.getPrototypeOf(mockModule.object); expect(mockObjectPrototype).toBe(testObjectPrototype); diff --git a/packages/jest-runtime/src/__tests__/test_root/mapped_module_genMockFromModule.js b/packages/jest-runtime/src/__tests__/test_root/mapped_module_createMockFromModule.js similarity index 100% rename from packages/jest-runtime/src/__tests__/test_root/mapped_module_genMockFromModule.js rename to packages/jest-runtime/src/__tests__/test_root/mapped_module_createMockFromModule.js diff --git a/packages/jest-runtime/src/index.ts b/packages/jest-runtime/src/index.ts index 1acaa3647d3e..6c42dba9b8bc 100644 --- a/packages/jest-runtime/src/index.ts +++ b/packages/jest-runtime/src/index.ts @@ -1483,6 +1483,8 @@ class Runtime { autoMockOn: enableAutomock, clearAllMocks, clearAllTimers: () => _getFakeTimers().clearAllTimers(), + createMockFromModule: (moduleName: string) => + this._generateMock(from, moduleName), deepUnmock, disableAutomock, doMock: mock, diff --git a/packages/jest-snapshot/src/__tests__/inline_snapshots.test.ts b/packages/jest-snapshot/src/__tests__/inline_snapshots.test.ts index cf7cba34c07e..b605a863eff1 100644 --- a/packages/jest-snapshot/src/__tests__/inline_snapshots.test.ts +++ b/packages/jest-snapshot/src/__tests__/inline_snapshots.test.ts @@ -6,7 +6,7 @@ */ jest.mock('graceful-fs', () => ({ - ...jest.genMockFromModule('fs'), + ...jest.createMockFromModule('fs'), existsSync: jest.fn().mockReturnValue(true), readdirSync: jest.fn().mockReturnValue([]), statSync: jest.fn(filePath => ({ diff --git a/packages/jest-snapshot/src/__tests__/utils.test.ts b/packages/jest-snapshot/src/__tests__/utils.test.ts index 6f00aed6c0c4..d84e9358866b 100644 --- a/packages/jest-snapshot/src/__tests__/utils.test.ts +++ b/packages/jest-snapshot/src/__tests__/utils.test.ts @@ -6,7 +6,7 @@ */ jest.mock('graceful-fs', () => ({ - ...jest.genMockFromModule('fs'), + ...jest.createMockFromModule('fs'), existsSync: jest.fn().mockReturnValue(true), })); diff --git a/packages/jest-source-map/src/__tests__/getCallsite.test.ts b/packages/jest-source-map/src/__tests__/getCallsite.test.ts index c8bdf09eb76c..1eecf64fb65e 100644 --- a/packages/jest-source-map/src/__tests__/getCallsite.test.ts +++ b/packages/jest-source-map/src/__tests__/getCallsite.test.ts @@ -11,7 +11,7 @@ import getCallsite from '../getCallsite'; // Node 10.5.x compatibility jest.mock('graceful-fs', () => ({ - ...jest.genMockFromModule('fs'), + ...jest.createMockFromModule('fs'), ReadStream: jest.requireActual('fs').ReadStream, WriteStream: jest.requireActual('fs').WriteStream, })); diff --git a/packages/jest-test-sequencer/src/__tests__/test_sequencer.test.js b/packages/jest-test-sequencer/src/__tests__/test_sequencer.test.js index 4239f37bd8da..bebb86400145 100644 --- a/packages/jest-test-sequencer/src/__tests__/test_sequencer.test.js +++ b/packages/jest-test-sequencer/src/__tests__/test_sequencer.test.js @@ -10,7 +10,7 @@ import * as fs from 'graceful-fs'; import TestSequencer from '../index'; jest.mock('graceful-fs', () => ({ - ...jest.genMockFromModule('fs'), + ...jest.createMockFromModule('fs'), existsSync: jest.fn(() => true), readFileSync: jest.fn(() => '{}'), })); diff --git a/packages/jest-transform/src/__tests__/script_transformer.test.js b/packages/jest-transform/src/__tests__/script_transformer.test.js index 4d2796689fa6..d8d2281e5d78 100644 --- a/packages/jest-transform/src/__tests__/script_transformer.test.js +++ b/packages/jest-transform/src/__tests__/script_transformer.test.js @@ -13,7 +13,7 @@ jest .mock('graceful-fs', () => // Node 10.5.x compatibility ({ - ...jest.genMockFromModule('fs'), + ...jest.createMockFromModule('fs'), ReadStream: jest.requireActual('fs').ReadStream, WriteStream: jest.requireActual('fs').WriteStream, readFileSync: jest.fn((path, options) => { From 2bac04ffb8e533d12a072998da5c3751a41b796f Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Sun, 3 May 2020 20:47:47 +0200 Subject: [PATCH 065/106] v26.0.0-alpha.1 --- lerna.json | 2 +- packages/babel-jest/package.json | 6 +-- packages/expect/package.json | 12 +++--- packages/jest-changed-files/package.json | 4 +- packages/jest-circus/package.json | 26 ++++++------ packages/jest-cli/package.json | 16 ++++---- packages/jest-config/package.json | 24 +++++------ packages/jest-console/package.json | 8 ++-- packages/jest-core/package.json | 40 +++++++++---------- packages/jest-diff/package.json | 6 +-- packages/jest-each/package.json | 8 ++-- packages/jest-environment-jsdom/package.json | 12 +++--- packages/jest-environment-node/package.json | 12 +++--- packages/jest-environment/package.json | 8 ++-- packages/jest-fake-timers/package.json | 10 ++--- packages/jest-globals/package.json | 8 ++-- packages/jest-haste-map/package.json | 8 ++-- packages/jest-jasmine2/package.json | 26 ++++++------ packages/jest-leak-detector/package.json | 4 +- packages/jest-matcher-utils/package.json | 8 ++-- packages/jest-message-util/package.json | 4 +- packages/jest-mock/package.json | 4 +- packages/jest-phabricator/package.json | 4 +- packages/jest-regex-util/package.json | 2 +- packages/jest-repl/package.json | 14 +++---- packages/jest-reporters/package.json | 16 ++++---- .../jest-resolve-dependencies/package.json | 14 +++---- packages/jest-resolve/package.json | 8 ++-- packages/jest-runner/package.json | 28 ++++++------- packages/jest-runtime/package.json | 40 +++++++++---------- packages/jest-snapshot/package.json | 18 ++++----- packages/jest-source-map/package.json | 2 +- packages/jest-test-result/package.json | 6 +-- packages/jest-test-sequencer/package.json | 10 ++--- packages/jest-transform/package.json | 10 ++--- packages/jest-types/package.json | 2 +- packages/jest-util/package.json | 4 +- packages/jest-validate/package.json | 6 +-- packages/jest-watcher/package.json | 8 ++-- packages/jest/package.json | 6 +-- packages/pretty-format/package.json | 4 +- packages/test-utils/package.json | 2 +- 42 files changed, 230 insertions(+), 230 deletions(-) diff --git a/lerna.json b/lerna.json index d9c35ddc909e..0dde82b4d497 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "26.0.0-alpha.0", + "version": "26.0.0-alpha.1", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/babel-jest/package.json b/packages/babel-jest/package.json index 00fab713bb9a..10f3ec3e9dae 100644 --- a/packages/babel-jest/package.json +++ b/packages/babel-jest/package.json @@ -1,7 +1,7 @@ { "name": "babel-jest", "description": "Jest plugin to use babel for transformation.", - "version": "26.0.0-alpha.0", + "version": "26.0.0-alpha.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -11,8 +11,8 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/transform": "^26.0.0-alpha.0", - "@jest/types": "^26.0.0-alpha.0", + "@jest/transform": "^26.0.0-alpha.1", + "@jest/types": "^26.0.0-alpha.1", "@types/babel__core": "^7.1.7", "babel-plugin-istanbul": "^6.0.0", "babel-preset-jest": "^26.0.0-alpha.0", diff --git a/packages/expect/package.json b/packages/expect/package.json index 37f055c5f19d..380ec29d1485 100644 --- a/packages/expect/package.json +++ b/packages/expect/package.json @@ -1,6 +1,6 @@ { "name": "expect", - "version": "26.0.0-alpha.0", + "version": "26.0.0-alpha.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,15 +10,15 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/types": "^26.0.0-alpha.0", + "@jest/types": "^26.0.0-alpha.1", "ansi-styles": "^4.0.0", "jest-get-type": "^26.0.0-alpha.0", - "jest-matcher-utils": "^26.0.0-alpha.0", - "jest-message-util": "^26.0.0-alpha.0", - "jest-regex-util": "^26.0.0-alpha.0" + "jest-matcher-utils": "^26.0.0-alpha.1", + "jest-message-util": "^26.0.0-alpha.1", + "jest-regex-util": "^26.0.0-alpha.1" }, "devDependencies": { - "@jest/test-utils": "^26.0.0-alpha.0", + "@jest/test-utils": "^26.0.0-alpha.1", "chalk": "^4.0.0", "fast-check": "^1.13.0", "immutable": "^4.0.0-rc.12" diff --git a/packages/jest-changed-files/package.json b/packages/jest-changed-files/package.json index c4bff7797d67..39cfa7d0c26c 100644 --- a/packages/jest-changed-files/package.json +++ b/packages/jest-changed-files/package.json @@ -1,6 +1,6 @@ { "name": "jest-changed-files", - "version": "26.0.0-alpha.0", + "version": "26.0.0-alpha.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,7 +10,7 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/types": "^26.0.0-alpha.0", + "@jest/types": "^26.0.0-alpha.1", "execa": "^4.0.0", "throat": "^5.0.0" }, diff --git a/packages/jest-circus/package.json b/packages/jest-circus/package.json index 9bc84136a1fc..6f1d99d62c08 100644 --- a/packages/jest-circus/package.json +++ b/packages/jest-circus/package.json @@ -1,6 +1,6 @@ { "name": "jest-circus", - "version": "26.0.0-alpha.0", + "version": "26.0.0-alpha.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -11,28 +11,28 @@ "types": "build/index.d.ts", "dependencies": { "@babel/traverse": "^7.1.0", - "@jest/environment": "^26.0.0-alpha.0", - "@jest/test-result": "^26.0.0-alpha.0", - "@jest/types": "^26.0.0-alpha.0", + "@jest/environment": "^26.0.0-alpha.1", + "@jest/test-result": "^26.0.0-alpha.1", + "@jest/types": "^26.0.0-alpha.1", "chalk": "^4.0.0", "co": "^4.6.0", "dedent": "^0.7.0", - "expect": "^26.0.0-alpha.0", + "expect": "^26.0.0-alpha.1", "is-generator-fn": "^2.0.0", - "jest-each": "^26.0.0-alpha.0", - "jest-matcher-utils": "^26.0.0-alpha.0", - "jest-message-util": "^26.0.0-alpha.0", - "jest-runtime": "^26.0.0-alpha.0", - "jest-snapshot": "^26.0.0-alpha.0", - "jest-util": "^26.0.0-alpha.0", - "pretty-format": "^26.0.0-alpha.0", + "jest-each": "^26.0.0-alpha.1", + "jest-matcher-utils": "^26.0.0-alpha.1", + "jest-message-util": "^26.0.0-alpha.1", + "jest-runtime": "^26.0.0-alpha.1", + "jest-snapshot": "^26.0.0-alpha.1", + "jest-util": "^26.0.0-alpha.1", + "pretty-format": "^26.0.0-alpha.1", "stack-utils": "^2.0.2", "throat": "^5.0.0" }, "devDependencies": { "@babel/core": "^7.1.0", "@babel/register": "^7.0.0", - "@jest/test-utils": "^26.0.0-alpha.0", + "@jest/test-utils": "^26.0.0-alpha.1", "@types/babel__traverse": "^7.0.4", "@types/co": "^4.6.0", "@types/dedent": "^0.7.0", diff --git a/packages/jest-cli/package.json b/packages/jest-cli/package.json index eb3bfc715299..e97ac7a81992 100644 --- a/packages/jest-cli/package.json +++ b/packages/jest-cli/package.json @@ -1,26 +1,26 @@ { "name": "jest-cli", "description": "Delightful JavaScript Testing.", - "version": "26.0.0-alpha.0", + "version": "26.0.0-alpha.1", "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/core": "^26.0.0-alpha.0", - "@jest/test-result": "^26.0.0-alpha.0", - "@jest/types": "^26.0.0-alpha.0", + "@jest/core": "^26.0.0-alpha.1", + "@jest/test-result": "^26.0.0-alpha.1", + "@jest/types": "^26.0.0-alpha.1", "chalk": "^4.0.0", "exit": "^0.1.2", "graceful-fs": "^4.2.4", "import-local": "^3.0.2", "is-ci": "^2.0.0", - "jest-config": "^26.0.0-alpha.0", - "jest-util": "^26.0.0-alpha.0", - "jest-validate": "^26.0.0-alpha.0", + "jest-config": "^26.0.0-alpha.1", + "jest-util": "^26.0.0-alpha.1", + "jest-validate": "^26.0.0-alpha.1", "prompts": "^2.0.1", "yargs": "^15.3.1" }, "devDependencies": { - "@jest/test-utils": "^26.0.0-alpha.0", + "@jest/test-utils": "^26.0.0-alpha.1", "@types/exit": "^0.1.30", "@types/graceful-fs": "^4.1.3", "@types/is-ci": "^2.0.0", diff --git a/packages/jest-config/package.json b/packages/jest-config/package.json index a5f29e8168d2..056319b4345b 100644 --- a/packages/jest-config/package.json +++ b/packages/jest-config/package.json @@ -1,6 +1,6 @@ { "name": "jest-config", - "version": "26.0.0-alpha.0", + "version": "26.0.0-alpha.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -11,23 +11,23 @@ "types": "build/index.d.ts", "dependencies": { "@babel/core": "^7.1.0", - "@jest/test-sequencer": "^26.0.0-alpha.0", - "@jest/types": "^26.0.0-alpha.0", - "babel-jest": "^26.0.0-alpha.0", + "@jest/test-sequencer": "^26.0.0-alpha.1", + "@jest/types": "^26.0.0-alpha.1", + "babel-jest": "^26.0.0-alpha.1", "chalk": "^4.0.0", "deepmerge": "^4.2.2", "glob": "^7.1.1", "graceful-fs": "^4.2.4", - "jest-environment-jsdom": "^26.0.0-alpha.0", - "jest-environment-node": "^26.0.0-alpha.0", + "jest-environment-jsdom": "^26.0.0-alpha.1", + "jest-environment-node": "^26.0.0-alpha.1", "jest-get-type": "^26.0.0-alpha.0", - "jest-jasmine2": "^26.0.0-alpha.0", - "jest-regex-util": "^26.0.0-alpha.0", - "jest-resolve": "^26.0.0-alpha.0", - "jest-util": "^26.0.0-alpha.0", - "jest-validate": "^26.0.0-alpha.0", + "jest-jasmine2": "^26.0.0-alpha.1", + "jest-regex-util": "^26.0.0-alpha.1", + "jest-resolve": "^26.0.0-alpha.1", + "jest-util": "^26.0.0-alpha.1", + "jest-validate": "^26.0.0-alpha.1", "micromatch": "^4.0.2", - "pretty-format": "^26.0.0-alpha.0" + "pretty-format": "^26.0.0-alpha.1" }, "devDependencies": { "@types/babel__core": "^7.0.4", diff --git a/packages/jest-console/package.json b/packages/jest-console/package.json index d17ddb44b84b..0742af28a7f3 100644 --- a/packages/jest-console/package.json +++ b/packages/jest-console/package.json @@ -1,6 +1,6 @@ { "name": "@jest/console", - "version": "26.0.0-alpha.0", + "version": "26.0.0-alpha.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,10 +10,10 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/types": "^26.0.0-alpha.0", + "@jest/types": "^26.0.0-alpha.1", "chalk": "^4.0.0", - "jest-message-util": "^26.0.0-alpha.0", - "jest-util": "^26.0.0-alpha.0", + "jest-message-util": "^26.0.0-alpha.1", + "jest-util": "^26.0.0-alpha.1", "slash": "^3.0.0" }, "devDependencies": { diff --git a/packages/jest-core/package.json b/packages/jest-core/package.json index 831e401092e6..a9073fd2132e 100644 --- a/packages/jest-core/package.json +++ b/packages/jest-core/package.json @@ -1,32 +1,32 @@ { "name": "@jest/core", "description": "Delightful JavaScript Testing.", - "version": "26.0.0-alpha.0", + "version": "26.0.0-alpha.1", "main": "build/jest.js", "types": "build/jest.d.ts", "dependencies": { - "@jest/console": "^26.0.0-alpha.0", - "@jest/reporters": "^26.0.0-alpha.0", - "@jest/test-result": "^26.0.0-alpha.0", - "@jest/transform": "^26.0.0-alpha.0", - "@jest/types": "^26.0.0-alpha.0", + "@jest/console": "^26.0.0-alpha.1", + "@jest/reporters": "^26.0.0-alpha.1", + "@jest/test-result": "^26.0.0-alpha.1", + "@jest/transform": "^26.0.0-alpha.1", + "@jest/types": "^26.0.0-alpha.1", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", "exit": "^0.1.2", "graceful-fs": "^4.2.4", - "jest-changed-files": "^26.0.0-alpha.0", - "jest-config": "^26.0.0-alpha.0", - "jest-haste-map": "^26.0.0-alpha.0", - "jest-message-util": "^26.0.0-alpha.0", - "jest-regex-util": "^26.0.0-alpha.0", - "jest-resolve": "^26.0.0-alpha.0", - "jest-resolve-dependencies": "^26.0.0-alpha.0", - "jest-runner": "^26.0.0-alpha.0", - "jest-runtime": "^26.0.0-alpha.0", - "jest-snapshot": "^26.0.0-alpha.0", - "jest-util": "^26.0.0-alpha.0", - "jest-validate": "^26.0.0-alpha.0", - "jest-watcher": "^26.0.0-alpha.0", + "jest-changed-files": "^26.0.0-alpha.1", + "jest-config": "^26.0.0-alpha.1", + "jest-haste-map": "^26.0.0-alpha.1", + "jest-message-util": "^26.0.0-alpha.1", + "jest-regex-util": "^26.0.0-alpha.1", + "jest-resolve": "^26.0.0-alpha.1", + "jest-resolve-dependencies": "^26.0.0-alpha.1", + "jest-runner": "^26.0.0-alpha.1", + "jest-runtime": "^26.0.0-alpha.1", + "jest-snapshot": "^26.0.0-alpha.1", + "jest-util": "^26.0.0-alpha.1", + "jest-validate": "^26.0.0-alpha.1", + "jest-watcher": "^26.0.0-alpha.1", "micromatch": "^4.0.2", "p-each-series": "^2.1.0", "rimraf": "^3.0.0", @@ -34,7 +34,7 @@ "strip-ansi": "^6.0.0" }, "devDependencies": { - "@jest/test-sequencer": "^26.0.0-alpha.0", + "@jest/test-sequencer": "^26.0.0-alpha.1", "@types/exit": "^0.1.30", "@types/graceful-fs": "^4.1.2", "@types/micromatch": "^4.0.0", diff --git a/packages/jest-diff/package.json b/packages/jest-diff/package.json index 87bb316647d4..509a36ed5a70 100644 --- a/packages/jest-diff/package.json +++ b/packages/jest-diff/package.json @@ -1,6 +1,6 @@ { "name": "jest-diff", - "version": "26.0.0-alpha.0", + "version": "26.0.0-alpha.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -13,10 +13,10 @@ "chalk": "^4.0.0", "diff-sequences": "^26.0.0-alpha.0", "jest-get-type": "^26.0.0-alpha.0", - "pretty-format": "^26.0.0-alpha.0" + "pretty-format": "^26.0.0-alpha.1" }, "devDependencies": { - "@jest/test-utils": "^26.0.0-alpha.0", + "@jest/test-utils": "^26.0.0-alpha.1", "strip-ansi": "^6.0.0" }, "engines": { diff --git a/packages/jest-each/package.json b/packages/jest-each/package.json index e7e8eeaea1db..49cdcc13760a 100644 --- a/packages/jest-each/package.json +++ b/packages/jest-each/package.json @@ -1,6 +1,6 @@ { "name": "jest-each", - "version": "26.0.0-alpha.0", + "version": "26.0.0-alpha.1", "description": "Parameterised tests for Jest", "main": "build/index.js", "types": "build/index.d.ts", @@ -18,11 +18,11 @@ "author": "Matt Phillips (mattphillips)", "license": "MIT", "dependencies": { - "@jest/types": "^26.0.0-alpha.0", + "@jest/types": "^26.0.0-alpha.1", "chalk": "^4.0.0", "jest-get-type": "^26.0.0-alpha.0", - "jest-util": "^26.0.0-alpha.0", - "pretty-format": "^26.0.0-alpha.0" + "jest-util": "^26.0.0-alpha.1", + "pretty-format": "^26.0.0-alpha.1" }, "engines": { "node": ">= 10.14.2" diff --git a/packages/jest-environment-jsdom/package.json b/packages/jest-environment-jsdom/package.json index 81a0503d115c..2dfb6696c614 100644 --- a/packages/jest-environment-jsdom/package.json +++ b/packages/jest-environment-jsdom/package.json @@ -1,6 +1,6 @@ { "name": "jest-environment-jsdom", - "version": "26.0.0-alpha.0", + "version": "26.0.0-alpha.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,11 +10,11 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/environment": "^26.0.0-alpha.0", - "@jest/fake-timers": "^26.0.0-alpha.0", - "@jest/types": "^26.0.0-alpha.0", - "jest-mock": "^26.0.0-alpha.0", - "jest-util": "^26.0.0-alpha.0", + "@jest/environment": "^26.0.0-alpha.1", + "@jest/fake-timers": "^26.0.0-alpha.1", + "@jest/types": "^26.0.0-alpha.1", + "jest-mock": "^26.0.0-alpha.1", + "jest-util": "^26.0.0-alpha.1", "jsdom": "^16.2.2" }, "devDependencies": { diff --git a/packages/jest-environment-node/package.json b/packages/jest-environment-node/package.json index d0a026f3e8ed..cc763770dd86 100644 --- a/packages/jest-environment-node/package.json +++ b/packages/jest-environment-node/package.json @@ -1,6 +1,6 @@ { "name": "jest-environment-node", - "version": "26.0.0-alpha.0", + "version": "26.0.0-alpha.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,11 +10,11 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/environment": "^26.0.0-alpha.0", - "@jest/fake-timers": "^26.0.0-alpha.0", - "@jest/types": "^26.0.0-alpha.0", - "jest-mock": "^26.0.0-alpha.0", - "jest-util": "^26.0.0-alpha.0" + "@jest/environment": "^26.0.0-alpha.1", + "@jest/fake-timers": "^26.0.0-alpha.1", + "@jest/types": "^26.0.0-alpha.1", + "jest-mock": "^26.0.0-alpha.1", + "jest-util": "^26.0.0-alpha.1" }, "engines": { "node": ">= 10.14.2" diff --git a/packages/jest-environment/package.json b/packages/jest-environment/package.json index 37768c59827a..38ab97940389 100644 --- a/packages/jest-environment/package.json +++ b/packages/jest-environment/package.json @@ -1,6 +1,6 @@ { "name": "@jest/environment", - "version": "26.0.0-alpha.0", + "version": "26.0.0-alpha.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,9 +10,9 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/fake-timers": "^26.0.0-alpha.0", - "@jest/types": "^26.0.0-alpha.0", - "jest-mock": "^26.0.0-alpha.0" + "@jest/fake-timers": "^26.0.0-alpha.1", + "@jest/types": "^26.0.0-alpha.1", + "jest-mock": "^26.0.0-alpha.1" }, "devDependencies": { "@types/node": "*" diff --git a/packages/jest-fake-timers/package.json b/packages/jest-fake-timers/package.json index 6aeb4ef8dab4..4d37f8c61e26 100644 --- a/packages/jest-fake-timers/package.json +++ b/packages/jest-fake-timers/package.json @@ -1,6 +1,6 @@ { "name": "@jest/fake-timers", - "version": "26.0.0-alpha.0", + "version": "26.0.0-alpha.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,11 +10,11 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/types": "^26.0.0-alpha.0", + "@jest/types": "^26.0.0-alpha.1", "@sinonjs/fake-timers": "^6.0.1", - "jest-message-util": "^26.0.0-alpha.0", - "jest-mock": "^26.0.0-alpha.0", - "jest-util": "^26.0.0-alpha.0" + "jest-message-util": "^26.0.0-alpha.1", + "jest-mock": "^26.0.0-alpha.1", + "jest-util": "^26.0.0-alpha.1" }, "devDependencies": { "@types/node": "*", diff --git a/packages/jest-globals/package.json b/packages/jest-globals/package.json index e41c59da2d3a..b52eb97b8cda 100644 --- a/packages/jest-globals/package.json +++ b/packages/jest-globals/package.json @@ -1,6 +1,6 @@ { "name": "@jest/globals", - "version": "26.0.0-alpha.0", + "version": "26.0.0-alpha.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -13,9 +13,9 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/environment": "^26.0.0-alpha.0", - "@jest/types": "^26.0.0-alpha.0", - "expect": "^26.0.0-alpha.0" + "@jest/environment": "^26.0.0-alpha.1", + "@jest/types": "^26.0.0-alpha.1", + "expect": "^26.0.0-alpha.1" }, "publishConfig": { "access": "public" diff --git a/packages/jest-haste-map/package.json b/packages/jest-haste-map/package.json index c48ee0765c32..e5759aa9f6af 100644 --- a/packages/jest-haste-map/package.json +++ b/packages/jest-haste-map/package.json @@ -1,6 +1,6 @@ { "name": "jest-haste-map", - "version": "26.0.0-alpha.0", + "version": "26.0.0-alpha.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,13 +10,13 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/types": "^26.0.0-alpha.0", + "@jest/types": "^26.0.0-alpha.1", "@types/graceful-fs": "^4.1.2", "anymatch": "^3.0.3", "fb-watchman": "^2.0.0", "graceful-fs": "^4.2.4", "jest-serializer": "^26.0.0-alpha.0", - "jest-util": "^26.0.0-alpha.0", + "jest-util": "^26.0.0-alpha.1", "jest-worker": "^26.0.0-alpha.0", "micromatch": "^4.0.2", "sane": "^4.0.3", @@ -24,7 +24,7 @@ "which": "^2.0.2" }, "devDependencies": { - "@jest/test-utils": "^26.0.0-alpha.0", + "@jest/test-utils": "^26.0.0-alpha.1", "@types/anymatch": "^1.3.1", "@types/fb-watchman": "^2.0.0", "@types/micromatch": "^4.0.0", diff --git a/packages/jest-jasmine2/package.json b/packages/jest-jasmine2/package.json index 446484de783b..f83ab7b33344 100644 --- a/packages/jest-jasmine2/package.json +++ b/packages/jest-jasmine2/package.json @@ -1,6 +1,6 @@ { "name": "jest-jasmine2", - "version": "26.0.0-alpha.0", + "version": "26.0.0-alpha.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -11,21 +11,21 @@ "types": "build/index.d.ts", "dependencies": { "@babel/traverse": "^7.1.0", - "@jest/environment": "^26.0.0-alpha.0", - "@jest/source-map": "^26.0.0-alpha.0", - "@jest/test-result": "^26.0.0-alpha.0", - "@jest/types": "^26.0.0-alpha.0", + "@jest/environment": "^26.0.0-alpha.1", + "@jest/source-map": "^26.0.0-alpha.1", + "@jest/test-result": "^26.0.0-alpha.1", + "@jest/types": "^26.0.0-alpha.1", "chalk": "^4.0.0", "co": "^4.6.0", - "expect": "^26.0.0-alpha.0", + "expect": "^26.0.0-alpha.1", "is-generator-fn": "^2.0.0", - "jest-each": "^26.0.0-alpha.0", - "jest-matcher-utils": "^26.0.0-alpha.0", - "jest-message-util": "^26.0.0-alpha.0", - "jest-runtime": "^26.0.0-alpha.0", - "jest-snapshot": "^26.0.0-alpha.0", - "jest-util": "^26.0.0-alpha.0", - "pretty-format": "^26.0.0-alpha.0", + "jest-each": "^26.0.0-alpha.1", + "jest-matcher-utils": "^26.0.0-alpha.1", + "jest-message-util": "^26.0.0-alpha.1", + "jest-runtime": "^26.0.0-alpha.1", + "jest-snapshot": "^26.0.0-alpha.1", + "jest-util": "^26.0.0-alpha.1", + "pretty-format": "^26.0.0-alpha.1", "throat": "^5.0.0" }, "devDependencies": { diff --git a/packages/jest-leak-detector/package.json b/packages/jest-leak-detector/package.json index 8cf628e2e434..de6d1f8f90ce 100644 --- a/packages/jest-leak-detector/package.json +++ b/packages/jest-leak-detector/package.json @@ -1,6 +1,6 @@ { "name": "jest-leak-detector", - "version": "26.0.0-alpha.0", + "version": "26.0.0-alpha.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -11,7 +11,7 @@ "types": "build/index.d.ts", "dependencies": { "jest-get-type": "^26.0.0-alpha.0", - "pretty-format": "^26.0.0-alpha.0" + "pretty-format": "^26.0.0-alpha.1" }, "devDependencies": { "@types/weak-napi": "^1.0.0", diff --git a/packages/jest-matcher-utils/package.json b/packages/jest-matcher-utils/package.json index 361db470f8f4..f6bb49e8fdac 100644 --- a/packages/jest-matcher-utils/package.json +++ b/packages/jest-matcher-utils/package.json @@ -1,7 +1,7 @@ { "name": "jest-matcher-utils", "description": "A set of utility functions for expect and related packages", - "version": "26.0.0-alpha.0", + "version": "26.0.0-alpha.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -15,12 +15,12 @@ "types": "build/index.d.ts", "dependencies": { "chalk": "^4.0.0", - "jest-diff": "^26.0.0-alpha.0", + "jest-diff": "^26.0.0-alpha.1", "jest-get-type": "^26.0.0-alpha.0", - "pretty-format": "^26.0.0-alpha.0" + "pretty-format": "^26.0.0-alpha.1" }, "devDependencies": { - "@jest/test-utils": "^26.0.0-alpha.0", + "@jest/test-utils": "^26.0.0-alpha.1", "@types/node": "*" }, "publishConfig": { diff --git a/packages/jest-message-util/package.json b/packages/jest-message-util/package.json index 36c2e6f86f40..ed2bd0331cd3 100644 --- a/packages/jest-message-util/package.json +++ b/packages/jest-message-util/package.json @@ -1,6 +1,6 @@ { "name": "jest-message-util", - "version": "26.0.0-alpha.0", + "version": "26.0.0-alpha.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -14,7 +14,7 @@ "types": "build/index.d.ts", "dependencies": { "@babel/code-frame": "^7.0.0", - "@jest/types": "^26.0.0-alpha.0", + "@jest/types": "^26.0.0-alpha.1", "@types/stack-utils": "^1.0.1", "chalk": "^4.0.0", "graceful-fs": "^4.2.4", diff --git a/packages/jest-mock/package.json b/packages/jest-mock/package.json index 6a725554a805..fecdb1cab5ed 100644 --- a/packages/jest-mock/package.json +++ b/packages/jest-mock/package.json @@ -1,6 +1,6 @@ { "name": "jest-mock", - "version": "26.0.0-alpha.0", + "version": "26.0.0-alpha.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,7 +10,7 @@ "node": ">= 10.14.2" }, "dependencies": { - "@jest/types": "^26.0.0-alpha.0" + "@jest/types": "^26.0.0-alpha.1" }, "devDependencies": { "@types/node": "*" diff --git a/packages/jest-phabricator/package.json b/packages/jest-phabricator/package.json index f3bc9d88f5b9..9d179fa38db7 100644 --- a/packages/jest-phabricator/package.json +++ b/packages/jest-phabricator/package.json @@ -1,6 +1,6 @@ { "name": "jest-phabricator", - "version": "26.0.0-alpha.0", + "version": "26.0.0-alpha.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -8,7 +8,7 @@ }, "types": "build/index.d.ts", "dependencies": { - "@jest/test-result": "^26.0.0-alpha.0" + "@jest/test-result": "^26.0.0-alpha.1" }, "engines": { "node": ">= 10.14.2" diff --git a/packages/jest-regex-util/package.json b/packages/jest-regex-util/package.json index 15bd6aa55a59..eb8960795667 100644 --- a/packages/jest-regex-util/package.json +++ b/packages/jest-regex-util/package.json @@ -1,6 +1,6 @@ { "name": "jest-regex-util", - "version": "26.0.0-alpha.0", + "version": "26.0.0-alpha.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", diff --git a/packages/jest-repl/package.json b/packages/jest-repl/package.json index 792d7dbb8e69..b01ccbdbaadf 100644 --- a/packages/jest-repl/package.json +++ b/packages/jest-repl/package.json @@ -1,6 +1,6 @@ { "name": "jest-repl", - "version": "26.0.0-alpha.0", + "version": "26.0.0-alpha.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,16 +10,16 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/transform": "^26.0.0-alpha.0", - "@jest/types": "^26.0.0-alpha.0", - "jest-config": "^26.0.0-alpha.0", - "jest-runtime": "^26.0.0-alpha.0", - "jest-validate": "^26.0.0-alpha.0", + "@jest/transform": "^26.0.0-alpha.1", + "@jest/types": "^26.0.0-alpha.1", + "jest-config": "^26.0.0-alpha.1", + "jest-runtime": "^26.0.0-alpha.1", + "jest-validate": "^26.0.0-alpha.1", "repl": "^0.1.3", "yargs": "^15.3.1" }, "devDependencies": { - "@jest/test-utils": "^26.0.0-alpha.0", + "@jest/test-utils": "^26.0.0-alpha.1", "@types/yargs": "^15.0.0" }, "bin": "./bin/jest-repl.js", diff --git a/packages/jest-reporters/package.json b/packages/jest-reporters/package.json index 97119f652615..16d24fa167ef 100644 --- a/packages/jest-reporters/package.json +++ b/packages/jest-reporters/package.json @@ -1,15 +1,15 @@ { "name": "@jest/reporters", "description": "Jest's reporters", - "version": "26.0.0-alpha.0", + "version": "26.0.0-alpha.1", "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^26.0.0-alpha.0", - "@jest/test-result": "^26.0.0-alpha.0", - "@jest/transform": "^26.0.0-alpha.0", - "@jest/types": "^26.0.0-alpha.0", + "@jest/console": "^26.0.0-alpha.1", + "@jest/test-result": "^26.0.0-alpha.1", + "@jest/transform": "^26.0.0-alpha.1", + "@jest/types": "^26.0.0-alpha.1", "chalk": "^4.0.0", "collect-v8-coverage": "^1.0.0", "exit": "^0.1.2", @@ -20,9 +20,9 @@ "istanbul-lib-report": "^3.0.0", "istanbul-lib-source-maps": "^4.0.0", "istanbul-reports": "^3.0.2", - "jest-haste-map": "^26.0.0-alpha.0", - "jest-resolve": "^26.0.0-alpha.0", - "jest-util": "^26.0.0-alpha.0", + "jest-haste-map": "^26.0.0-alpha.1", + "jest-resolve": "^26.0.0-alpha.1", + "jest-util": "^26.0.0-alpha.1", "jest-worker": "^26.0.0-alpha.0", "slash": "^3.0.0", "source-map": "^0.6.0", diff --git a/packages/jest-resolve-dependencies/package.json b/packages/jest-resolve-dependencies/package.json index 2f7a9d112b95..16d816dc27c2 100644 --- a/packages/jest-resolve-dependencies/package.json +++ b/packages/jest-resolve-dependencies/package.json @@ -1,6 +1,6 @@ { "name": "jest-resolve-dependencies", - "version": "26.0.0-alpha.0", + "version": "26.0.0-alpha.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,14 +10,14 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/types": "^26.0.0-alpha.0", - "jest-regex-util": "^26.0.0-alpha.0", - "jest-snapshot": "^26.0.0-alpha.0" + "@jest/types": "^26.0.0-alpha.1", + "jest-regex-util": "^26.0.0-alpha.1", + "jest-snapshot": "^26.0.0-alpha.1" }, "devDependencies": { - "jest-haste-map": "^26.0.0-alpha.0", - "jest-resolve": "^26.0.0-alpha.0", - "jest-runtime": "^26.0.0-alpha.0" + "jest-haste-map": "^26.0.0-alpha.1", + "jest-resolve": "^26.0.0-alpha.1", + "jest-runtime": "^26.0.0-alpha.1" }, "engines": { "node": ">= 10.14.2" diff --git a/packages/jest-resolve/package.json b/packages/jest-resolve/package.json index 91936f09cf0f..58aaf35d89b6 100644 --- a/packages/jest-resolve/package.json +++ b/packages/jest-resolve/package.json @@ -1,6 +1,6 @@ { "name": "jest-resolve", - "version": "26.0.0-alpha.0", + "version": "26.0.0-alpha.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,11 +10,11 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/types": "^26.0.0-alpha.0", - "jest-util": "^26.0.0-alpha.0", + "@jest/types": "^26.0.0-alpha.1", "chalk": "^4.0.0", "graceful-fs": "^4.2.4", "jest-pnp-resolver": "^1.2.1", + "jest-util": "^26.0.0-alpha.1", "read-pkg-up": "^7.0.1", "resolve": "^1.17.0", "slash": "^3.0.0" @@ -22,7 +22,7 @@ "devDependencies": { "@types/graceful-fs": "^4.1.3", "@types/resolve": "^1.14.0", - "jest-haste-map": "^26.0.0-alpha.0" + "jest-haste-map": "^26.0.0-alpha.1" }, "engines": { "node": ">= 10.14.2" diff --git a/packages/jest-runner/package.json b/packages/jest-runner/package.json index 84cc374bc253..e6824e7a49cc 100644 --- a/packages/jest-runner/package.json +++ b/packages/jest-runner/package.json @@ -1,6 +1,6 @@ { "name": "jest-runner", - "version": "26.0.0-alpha.0", + "version": "26.0.0-alpha.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,22 +10,22 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/console": "^26.0.0-alpha.0", - "@jest/environment": "^26.0.0-alpha.0", - "@jest/test-result": "^26.0.0-alpha.0", - "@jest/types": "^26.0.0-alpha.0", + "@jest/console": "^26.0.0-alpha.1", + "@jest/environment": "^26.0.0-alpha.1", + "@jest/test-result": "^26.0.0-alpha.1", + "@jest/types": "^26.0.0-alpha.1", "chalk": "^4.0.0", "exit": "^0.1.2", "graceful-fs": "^4.2.4", - "jest-config": "^26.0.0-alpha.0", + "jest-config": "^26.0.0-alpha.1", "jest-docblock": "^26.0.0-alpha.0", - "jest-haste-map": "^26.0.0-alpha.0", - "jest-jasmine2": "^26.0.0-alpha.0", - "jest-leak-detector": "^26.0.0-alpha.0", - "jest-message-util": "^26.0.0-alpha.0", - "jest-resolve": "^26.0.0-alpha.0", - "jest-runtime": "^26.0.0-alpha.0", - "jest-util": "^26.0.0-alpha.0", + "jest-haste-map": "^26.0.0-alpha.1", + "jest-jasmine2": "^26.0.0-alpha.1", + "jest-leak-detector": "^26.0.0-alpha.1", + "jest-message-util": "^26.0.0-alpha.1", + "jest-resolve": "^26.0.0-alpha.1", + "jest-runtime": "^26.0.0-alpha.1", + "jest-util": "^26.0.0-alpha.1", "jest-worker": "^26.0.0-alpha.0", "source-map-support": "^0.5.6", "throat": "^5.0.0" @@ -35,7 +35,7 @@ "@types/graceful-fs": "^4.1.2", "@types/node": "*", "@types/source-map-support": "^0.5.0", - "jest-circus": "^26.0.0-alpha.0" + "jest-circus": "^26.0.0-alpha.1" }, "engines": { "node": ">= 10.14.2" diff --git a/packages/jest-runtime/package.json b/packages/jest-runtime/package.json index a242704311c8..a7d82c95801f 100644 --- a/packages/jest-runtime/package.json +++ b/packages/jest-runtime/package.json @@ -1,6 +1,6 @@ { "name": "jest-runtime", - "version": "26.0.0-alpha.0", + "version": "26.0.0-alpha.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,40 +10,40 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/console": "^26.0.0-alpha.0", - "@jest/environment": "^26.0.0-alpha.0", - "@jest/globals": "^26.0.0-alpha.0", - "@jest/fake-timers": "^26.0.0-alpha.0", - "@jest/source-map": "^26.0.0-alpha.0", - "@jest/test-result": "^26.0.0-alpha.0", - "@jest/transform": "^26.0.0-alpha.0", - "@jest/types": "^26.0.0-alpha.0", + "@jest/console": "^26.0.0-alpha.1", + "@jest/environment": "^26.0.0-alpha.1", + "@jest/fake-timers": "^26.0.0-alpha.1", + "@jest/globals": "^26.0.0-alpha.1", + "@jest/source-map": "^26.0.0-alpha.1", + "@jest/test-result": "^26.0.0-alpha.1", + "@jest/transform": "^26.0.0-alpha.1", + "@jest/types": "^26.0.0-alpha.1", "@types/yargs": "^15.0.0", "chalk": "^4.0.0", "collect-v8-coverage": "^1.0.0", "exit": "^0.1.2", "glob": "^7.1.3", "graceful-fs": "^4.2.4", - "jest-config": "^26.0.0-alpha.0", - "jest-haste-map": "^26.0.0-alpha.0", - "jest-message-util": "^26.0.0-alpha.0", - "jest-mock": "^26.0.0-alpha.0", - "jest-regex-util": "^26.0.0-alpha.0", - "jest-resolve": "^26.0.0-alpha.0", - "jest-snapshot": "^26.0.0-alpha.0", - "jest-util": "^26.0.0-alpha.0", - "jest-validate": "^26.0.0-alpha.0", + "jest-config": "^26.0.0-alpha.1", + "jest-haste-map": "^26.0.0-alpha.1", + "jest-message-util": "^26.0.0-alpha.1", + "jest-mock": "^26.0.0-alpha.1", + "jest-regex-util": "^26.0.0-alpha.1", + "jest-resolve": "^26.0.0-alpha.1", + "jest-snapshot": "^26.0.0-alpha.1", + "jest-util": "^26.0.0-alpha.1", + "jest-validate": "^26.0.0-alpha.1", "slash": "^3.0.0", "strip-bom": "^4.0.0", "yargs": "^15.3.1" }, "devDependencies": { - "@jest/test-utils": "^26.0.0-alpha.0", + "@jest/test-utils": "^26.0.0-alpha.1", "@types/exit": "^0.1.30", "@types/glob": "^7.1.1", "@types/graceful-fs": "^4.1.2", "execa": "^4.0.0", - "jest-environment-node": "^26.0.0-alpha.0", + "jest-environment-node": "^26.0.0-alpha.1", "jest-snapshot-serializer-raw": "^1.1.0" }, "bin": "./bin/jest-runtime.js", diff --git a/packages/jest-snapshot/package.json b/packages/jest-snapshot/package.json index c58c02161ba6..cf9fa8eccb4d 100644 --- a/packages/jest-snapshot/package.json +++ b/packages/jest-snapshot/package.json @@ -1,6 +1,6 @@ { "name": "jest-snapshot", - "version": "26.0.0-alpha.0", + "version": "26.0.0-alpha.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -11,19 +11,19 @@ "types": "build/index.d.ts", "dependencies": { "@babel/types": "^7.0.0", - "@jest/types": "^26.0.0-alpha.0", + "@jest/types": "^26.0.0-alpha.1", "@types/prettier": "^2.0.0", "chalk": "^4.0.0", - "expect": "^26.0.0-alpha.0", + "expect": "^26.0.0-alpha.1", "graceful-fs": "^4.2.4", - "jest-diff": "^26.0.0-alpha.0", + "jest-diff": "^26.0.0-alpha.1", "jest-get-type": "^26.0.0-alpha.0", - "jest-matcher-utils": "^26.0.0-alpha.0", - "jest-message-util": "^26.0.0-alpha.0", - "jest-resolve": "^26.0.0-alpha.0", + "jest-matcher-utils": "^26.0.0-alpha.1", + "jest-message-util": "^26.0.0-alpha.1", + "jest-resolve": "^26.0.0-alpha.1", "make-dir": "^3.0.0", "natural-compare": "^1.4.0", - "pretty-format": "^26.0.0-alpha.0", + "pretty-format": "^26.0.0-alpha.1", "semver": "^7.3.2" }, "devDependencies": { @@ -33,7 +33,7 @@ "@types/semver": "^7.1.0", "ansi-regex": "^5.0.0", "ansi-styles": "^4.2.0", - "jest-haste-map": "^26.0.0-alpha.0", + "jest-haste-map": "^26.0.0-alpha.1", "prettier": "^1.19.1" }, "engines": { diff --git a/packages/jest-source-map/package.json b/packages/jest-source-map/package.json index 87216beeb381..ebd167966993 100644 --- a/packages/jest-source-map/package.json +++ b/packages/jest-source-map/package.json @@ -1,6 +1,6 @@ { "name": "@jest/source-map", - "version": "26.0.0-alpha.0", + "version": "26.0.0-alpha.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", diff --git a/packages/jest-test-result/package.json b/packages/jest-test-result/package.json index 2b9e9b71423d..3653fcbacda3 100644 --- a/packages/jest-test-result/package.json +++ b/packages/jest-test-result/package.json @@ -1,6 +1,6 @@ { "name": "@jest/test-result", - "version": "26.0.0-alpha.0", + "version": "26.0.0-alpha.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,8 +10,8 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/console": "^26.0.0-alpha.0", - "@jest/types": "^26.0.0-alpha.0", + "@jest/console": "^26.0.0-alpha.1", + "@jest/types": "^26.0.0-alpha.1", "@types/istanbul-lib-coverage": "^2.0.0", "collect-v8-coverage": "^1.0.0" }, diff --git a/packages/jest-test-sequencer/package.json b/packages/jest-test-sequencer/package.json index 99d8a1fe5ea2..e2c9baed9063 100644 --- a/packages/jest-test-sequencer/package.json +++ b/packages/jest-test-sequencer/package.json @@ -1,6 +1,6 @@ { "name": "@jest/test-sequencer", - "version": "26.0.0-alpha.0", + "version": "26.0.0-alpha.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,11 +10,11 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/test-result": "^26.0.0-alpha.0", + "@jest/test-result": "^26.0.0-alpha.1", "graceful-fs": "^4.2.4", - "jest-haste-map": "^26.0.0-alpha.0", - "jest-runner": "^26.0.0-alpha.0", - "jest-runtime": "^26.0.0-alpha.0" + "jest-haste-map": "^26.0.0-alpha.1", + "jest-runner": "^26.0.0-alpha.1", + "jest-runtime": "^26.0.0-alpha.1" }, "devDependencies": { "@types/graceful-fs": "^4.1.3" diff --git a/packages/jest-transform/package.json b/packages/jest-transform/package.json index 68e6d8912662..4733a1d38a38 100644 --- a/packages/jest-transform/package.json +++ b/packages/jest-transform/package.json @@ -1,6 +1,6 @@ { "name": "@jest/transform", - "version": "26.0.0-alpha.0", + "version": "26.0.0-alpha.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -11,15 +11,15 @@ "types": "build/index.d.ts", "dependencies": { "@babel/core": "^7.1.0", - "@jest/types": "^26.0.0-alpha.0", + "@jest/types": "^26.0.0-alpha.1", "babel-plugin-istanbul": "^6.0.0", "chalk": "^4.0.0", "convert-source-map": "^1.4.0", "fast-json-stable-stringify": "^2.0.0", "graceful-fs": "^4.2.4", - "jest-haste-map": "^26.0.0-alpha.0", - "jest-regex-util": "^26.0.0-alpha.0", - "jest-util": "^26.0.0-alpha.0", + "jest-haste-map": "^26.0.0-alpha.1", + "jest-regex-util": "^26.0.0-alpha.1", + "jest-util": "^26.0.0-alpha.1", "micromatch": "^4.0.2", "pirates": "^4.0.1", "slash": "^3.0.0", diff --git a/packages/jest-types/package.json b/packages/jest-types/package.json index b7ad47fed30f..5889870c038c 100644 --- a/packages/jest-types/package.json +++ b/packages/jest-types/package.json @@ -1,6 +1,6 @@ { "name": "@jest/types", - "version": "26.0.0-alpha.0", + "version": "26.0.0-alpha.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", diff --git a/packages/jest-util/package.json b/packages/jest-util/package.json index d79db348a944..de209beec385 100644 --- a/packages/jest-util/package.json +++ b/packages/jest-util/package.json @@ -1,6 +1,6 @@ { "name": "jest-util", - "version": "26.0.0-alpha.0", + "version": "26.0.0-alpha.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,7 +10,7 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/types": "^26.0.0-alpha.0", + "@jest/types": "^26.0.0-alpha.1", "chalk": "^4.0.0", "graceful-fs": "^4.2.4", "is-ci": "^2.0.0", diff --git a/packages/jest-validate/package.json b/packages/jest-validate/package.json index bad5e1f76cd7..5b65cdda73bc 100644 --- a/packages/jest-validate/package.json +++ b/packages/jest-validate/package.json @@ -1,6 +1,6 @@ { "name": "jest-validate", - "version": "26.0.0-alpha.0", + "version": "26.0.0-alpha.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,12 +10,12 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/types": "^26.0.0-alpha.0", + "@jest/types": "^26.0.0-alpha.1", "camelcase": "^6.0.0", "chalk": "^4.0.0", "jest-get-type": "^26.0.0-alpha.0", "leven": "^3.1.0", - "pretty-format": "^26.0.0-alpha.0" + "pretty-format": "^26.0.0-alpha.1" }, "devDependencies": { "@types/yargs": "^15.0.3" diff --git a/packages/jest-watcher/package.json b/packages/jest-watcher/package.json index 098c6592ed58..882897c4f850 100644 --- a/packages/jest-watcher/package.json +++ b/packages/jest-watcher/package.json @@ -1,15 +1,15 @@ { "name": "jest-watcher", "description": "Delightful JavaScript Testing.", - "version": "26.0.0-alpha.0", + "version": "26.0.0-alpha.1", "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/test-result": "^26.0.0-alpha.0", - "@jest/types": "^26.0.0-alpha.0", + "@jest/test-result": "^26.0.0-alpha.1", + "@jest/types": "^26.0.0-alpha.1", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", - "jest-util": "^26.0.0-alpha.0", + "jest-util": "^26.0.0-alpha.1", "string-length": "^4.0.1" }, "devDependencies": { diff --git a/packages/jest/package.json b/packages/jest/package.json index de3d3a735646..88122e96726c 100644 --- a/packages/jest/package.json +++ b/packages/jest/package.json @@ -1,13 +1,13 @@ { "name": "jest", "description": "Delightful JavaScript Testing.", - "version": "26.0.0-alpha.0", + "version": "26.0.0-alpha.1", "main": "build/jest.js", "types": "build/jest.d.ts", "dependencies": { - "@jest/core": "^26.0.0-alpha.0", + "@jest/core": "^26.0.0-alpha.1", "import-local": "^3.0.2", - "jest-cli": "^26.0.0-alpha.0" + "jest-cli": "^26.0.0-alpha.1" }, "bin": "./bin/jest.js", "engines": { diff --git a/packages/pretty-format/package.json b/packages/pretty-format/package.json index 9ce32eb0cc0d..c904b401c97c 100644 --- a/packages/pretty-format/package.json +++ b/packages/pretty-format/package.json @@ -1,6 +1,6 @@ { "name": "pretty-format", - "version": "26.0.0-alpha.0", + "version": "26.0.0-alpha.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -12,7 +12,7 @@ "types": "build/index.d.ts", "author": "James Kyle ", "dependencies": { - "@jest/types": "^26.0.0-alpha.0", + "@jest/types": "^26.0.0-alpha.1", "ansi-regex": "^5.0.0", "ansi-styles": "^4.0.0", "react-is": "^16.12.0" diff --git a/packages/test-utils/package.json b/packages/test-utils/package.json index 48c04a41af0a..360fa02d06da 100644 --- a/packages/test-utils/package.json +++ b/packages/test-utils/package.json @@ -1,6 +1,6 @@ { "name": "@jest/test-utils", - "version": "26.0.0-alpha.0", + "version": "26.0.0-alpha.1", "private": true, "license": "MIT", "main": "build/index.js", From 5d1be035cc7b12a25010941953a88fe3c20d0984 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Sun, 3 May 2020 22:34:03 +0200 Subject: [PATCH 066/106] chore: fix windows CI (#9964) --- e2e/__tests__/__snapshots__/moduleNameMapper.test.ts.snap | 4 ++-- .../__snapshots__/resolveNoFileExtensions.test.ts.snap | 2 +- packages/jest-resolve/src/index.ts | 4 +++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/e2e/__tests__/__snapshots__/moduleNameMapper.test.ts.snap b/e2e/__tests__/__snapshots__/moduleNameMapper.test.ts.snap index d65a0391ff07..faac572b892d 100644 --- a/e2e/__tests__/__snapshots__/moduleNameMapper.test.ts.snap +++ b/e2e/__tests__/__snapshots__/moduleNameMapper.test.ts.snap @@ -36,7 +36,7 @@ FAIL __tests__/index.js 12 | module.exports = () => 'test'; 13 | - at createNoMappedModuleFoundError (../../packages/jest-resolve/build/index.js:541:17) + at createNoMappedModuleFoundError (../../packages/jest-resolve/build/index.js:553:17) at Object.require (index.js:10:1) `; @@ -65,6 +65,6 @@ FAIL __tests__/index.js 12 | module.exports = () => 'test'; 13 | - at createNoMappedModuleFoundError (../../packages/jest-resolve/build/index.js:541:17) + at createNoMappedModuleFoundError (../../packages/jest-resolve/build/index.js:553:17) at Object.require (index.js:10:1) `; diff --git a/e2e/__tests__/__snapshots__/resolveNoFileExtensions.test.ts.snap b/e2e/__tests__/__snapshots__/resolveNoFileExtensions.test.ts.snap index a62a66e69f80..5b14d65aaa83 100644 --- a/e2e/__tests__/__snapshots__/resolveNoFileExtensions.test.ts.snap +++ b/e2e/__tests__/__snapshots__/resolveNoFileExtensions.test.ts.snap @@ -37,6 +37,6 @@ FAIL __tests__/test.js | ^ 9 | - at Resolver.resolveModule (../../packages/jest-resolve/build/index.js:296:11) + at Resolver.resolveModule (../../packages/jest-resolve/build/index.js:308:11) at Object.require (index.js:8:18) `; diff --git a/packages/jest-resolve/src/index.ts b/packages/jest-resolve/src/index.ts index c253cfa8aa71..b678dabbe3dc 100644 --- a/packages/jest-resolve/src/index.ts +++ b/packages/jest-resolve/src/index.ts @@ -9,6 +9,7 @@ import * as path from 'path'; import type {Config} from '@jest/types'; import type {ModuleMap} from 'jest-haste-map'; import {tryRealpath} from 'jest-util'; +import slash = require('slash'); import nodeModulesPaths from './nodeModulesPaths'; import isBuiltinModule from './isBuiltinModule'; import defaultResolver, {clearDefaultResolverCache} from './defaultResolver'; @@ -236,7 +237,8 @@ class Resolver { // 5. Throw an error if the module could not be found. `resolve.sync` only // produces an error based on the dirname but we have the actual current // module name available. - const relativePath = path.relative(this._options.rootDir, from) || '.'; + const relativePath = + slash(path.relative(this._options.rootDir, from)) || '.'; throw new ModuleNotFoundError( `Cannot find module '${moduleName}' from '${relativePath}'`, From 968a301902796a5082b0119b82a6a996a20e1448 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Norte?= Date: Sun, 3 May 2020 23:01:26 +0100 Subject: [PATCH 067/106] Fix invalid re-run of tests in watch mode (#7347) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add failing e2e test * Stop re-running tests when mtime has not changed * fix test * fix copyright * adjust file accessed check * bring back reading fileMetadata from async callback Co-authored-by: Michał Pierzchała --- CHANGELOG.md | 1 + e2e/__tests__/watchModeNoAccess.test.ts | 76 +++++++++++++++++++++++++ packages/jest-haste-map/src/index.ts | 14 ++++- 3 files changed, 90 insertions(+), 1 deletion(-) create mode 100644 e2e/__tests__/watchModeNoAccess.test.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e0db1897e2c..ad6205cfa706 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ - `[jest-circus]` [**BREAKING**] Fail tests if a test takes a done callback and have return values ([#9129](https://github.com/facebook/jest/pull/9129)) - `[jest-circus]` [**BREAKING**] Throw a proper error if a test / hook is defined asynchronously ([#8096](https://github.com/facebook/jest/pull/8096)) - `[jest-config, jest-resolve]` [**BREAKING**] Remove support for `browser` field ([#9943](https://github.com/facebook/jest/pull/9943)) +- `[jest-haste-map]` Stop reporting files as changed when they are only accessed ([#7347](https://github.com/facebook/jest/pull/7347)) - `[jest-resolve]` Show relative path from root dir for `module not found` errors ([#9963](https://github.com/facebook/jest/pull/9963)) ### Chore & Maintenance diff --git a/e2e/__tests__/watchModeNoAccess.test.ts b/e2e/__tests__/watchModeNoAccess.test.ts new file mode 100644 index 000000000000..d7e4ef6e5a15 --- /dev/null +++ b/e2e/__tests__/watchModeNoAccess.test.ts @@ -0,0 +1,76 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + */ + +import * as os from 'os'; +import * as path from 'path'; +import * as fs from 'graceful-fs'; +import {cleanup, writeFiles} from '../Utils'; +import {runContinuous} from '../runJest'; + +const DIR = path.resolve(os.tmpdir(), 'watch_mode_no_access'); + +const sleep = (time: number) => + new Promise(resolve => setTimeout(resolve, time)); + +beforeEach(() => cleanup(DIR)); +afterAll(() => cleanup(DIR)); + +const setupFiles = () => { + writeFiles(DIR, { + '__tests__/foo.test.js': ` + const foo = require('../foo'); + test('foo', () => { expect(typeof foo).toBe('number'); }); + `, + 'foo.js': ` + module.exports = 0; + `, + 'package.json': JSON.stringify({ + jest: {}, + }), + }); +}; + +let testRun: ReturnType; + +afterEach(async () => { + if (testRun) { + await testRun.end(); + } +}); + +test('does not re-run tests when only access time is modified', async () => { + setupFiles(); + + testRun = runContinuous(DIR, ['--watchAll', '--no-watchman']); + + const testCompletedRE = /Ran all test suites./g; + const numberOfTestRuns = (stderr: string): number => { + const matches = stderr.match(testCompletedRE); + return matches ? matches.length : 0; + }; + + // First run + await testRun.waitUntil(({stderr}) => numberOfTestRuns(stderr) === 1); + + // Should re-run the test + const modulePath = path.join(DIR, 'foo.js'); + const stat = fs.lstatSync(modulePath); + fs.utimesSync(modulePath, stat.atime.getTime(), stat.mtime.getTime()); + + await testRun.waitUntil(({stderr}) => numberOfTestRuns(stderr) === 2); + + // Should NOT re-run the test + const fakeATime = 1541723621; + fs.utimesSync(modulePath, fakeATime, stat.mtime.getTime()); + await sleep(3000); + expect(numberOfTestRuns(testRun.getCurrentOutput().stderr)).toBe(2); + + // Should re-run the test + fs.writeFileSync(modulePath, 'module.exports = 1;', {encoding: 'utf-8'}); + await testRun.waitUntil(({stderr}) => numberOfTestRuns(stderr) === 3); +}); diff --git a/packages/jest-haste-map/src/index.ts b/packages/jest-haste-map/src/index.ts index 129858c1f40d..ef1e420400df 100644 --- a/packages/jest-haste-map/src/index.ts +++ b/packages/jest-haste-map/src/index.ts @@ -846,6 +846,19 @@ class HasteMap extends EventEmitter { return; } + const relativeFilePath = fastPath.relative(rootDir, filePath); + const fileMetadata = hasteMap.files.get(relativeFilePath); + + // The file has been accessed, not modified + if ( + type === 'change' && + fileMetadata && + stat && + fileMetadata[H.MTIME] === stat.mtime.getTime() + ) { + return; + } + changeQueue = changeQueue .then(() => { // If we get duplicate events for the same file, ignore them. @@ -879,7 +892,6 @@ class HasteMap extends EventEmitter { return null; }; - const relativeFilePath = fastPath.relative(rootDir, filePath); const fileMetadata = hasteMap.files.get(relativeFilePath); // If it's not an addition, delete the file and all its metadata From e8e8146ef6feacc56f9153a16c69f627cfa34d49 Mon Sep 17 00:00:00 2001 From: Tim Seckinger Date: Mon, 4 May 2020 09:45:25 +0200 Subject: [PATCH 068/106] align circus with jasmine's top-to-bottom execution order (#9965) --- CHANGELOG.md | 1 + .../__snapshots__/globals.test.ts.snap | 16 +++ e2e/__tests__/globals.test.ts | 52 +++++++- packages/jest-circus/src/eventHandler.ts | 26 ++-- packages/jest-circus/src/run.ts | 33 +++-- packages/jest-circus/src/utils.ts | 124 ++++++++++-------- packages/jest-types/src/Circus.ts | 5 +- 7 files changed, 167 insertions(+), 90 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ad6205cfa706..60976bb26f53 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ - `[jest-circus, jest-console, jest-jasmine2, jest-reporters, jest-util, pretty-format]` Fix time durating formatting and consolidate time formatting code ([#9765](https://github.com/facebook/jest/pull/9765)) - `[jest-circus]` [**BREAKING**] Fail tests if a test takes a done callback and have return values ([#9129](https://github.com/facebook/jest/pull/9129)) - `[jest-circus]` [**BREAKING**] Throw a proper error if a test / hook is defined asynchronously ([#8096](https://github.com/facebook/jest/pull/8096)) +- `[jest-circus]` [**BREAKING**] Align execution order of tests to match `jasmine`'s top to bottom order ([#9965](https://github.com/facebook/jest/pull/9965)) - `[jest-config, jest-resolve]` [**BREAKING**] Remove support for `browser` field ([#9943](https://github.com/facebook/jest/pull/9943)) - `[jest-haste-map]` Stop reporting files as changed when they are only accessed ([#7347](https://github.com/facebook/jest/pull/7347)) - `[jest-resolve]` Show relative path from root dir for `module not found` errors ([#9963](https://github.com/facebook/jest/pull/9963)) diff --git a/e2e/__tests__/__snapshots__/globals.test.ts.snap b/e2e/__tests__/__snapshots__/globals.test.ts.snap index 55a290d7b1c6..a3262e166ca1 100644 --- a/e2e/__tests__/__snapshots__/globals.test.ts.snap +++ b/e2e/__tests__/__snapshots__/globals.test.ts.snap @@ -95,6 +95,22 @@ Time: <> Ran all test suites. `; +exports[`interleaved describe and test children order 1`] = ` +PASS __tests__/interleaved.test.js + ✓ above + ✓ below + describe + ✓ inside +`; + +exports[`interleaved describe and test children order 2`] = ` +Test Suites: 1 passed, 1 total +Tests: 3 passed, 3 total +Snapshots: 0 total +Time: <> +Ran all test suites. +`; + exports[`only 1`] = ` PASS __tests__/onlyConstructs.test.js ✓ test.only diff --git a/e2e/__tests__/globals.test.ts b/e2e/__tests__/globals.test.ts index 3f561f8483aa..1007da3160ec 100644 --- a/e2e/__tests__/globals.test.ts +++ b/e2e/__tests__/globals.test.ts @@ -45,11 +45,49 @@ test('basic test constructs', () => { writeFiles(TEST_DIR, {[filename]: content}); const {stderr, exitCode} = runJest(DIR); + + const {summary, rest} = extractSummary(stderr); + expect(wrap(rest)).toMatchSnapshot(); + expect(wrap(summary)).toMatchSnapshot(); expect(exitCode).toBe(0); +}); + +test('interleaved describe and test children order', () => { + const filename = 'interleaved.test.js'; + const content = ` + let lastTest; + test('above', () => { + try { + expect(lastTest).toBe(undefined); + } finally { + lastTest = 'above'; + } + }); + describe('describe', () => { + test('inside', () => { + try { + expect(lastTest).toBe('above'); + } finally { + lastTest = 'inside'; + } + }); + }); + test('below', () => { + try { + expect(lastTest).toBe('inside'); + } finally { + lastTest = 'below'; + } + }); + `; + + writeFiles(TEST_DIR, {[filename]: content}); + const {stderr, exitCode} = runJest(DIR); const {summary, rest} = extractSummary(stderr); expect(wrap(rest)).toMatchSnapshot(); expect(wrap(summary)).toMatchSnapshot(); + expect(exitCode).toBe(0); }); test('skips', () => { @@ -106,11 +144,11 @@ test('only', () => { writeFiles(TEST_DIR, {[filename]: content}); const {stderr, exitCode} = runJest(DIR); - expect(exitCode).toBe(0); const {summary, rest} = extractSummary(stderr); expect(wrap(rest)).toMatchSnapshot(); expect(wrap(summary)).toMatchSnapshot(); + expect(exitCode).toBe(0); }); test('cannot have describe with no implementation', () => { @@ -121,13 +159,13 @@ test('cannot have describe with no implementation', () => { writeFiles(TEST_DIR, {[filename]: content}); const {stderr, exitCode} = runJest(DIR); - expect(exitCode).toBe(1); const rest = cleanStderr(stderr); const {summary} = extractSummary(stderr); expect(wrap(rest)).toMatchSnapshot(); expect(wrap(summary)).toMatchSnapshot(); + expect(exitCode).toBe(1); }); test('cannot test with no implementation', () => { @@ -140,11 +178,11 @@ test('cannot test with no implementation', () => { writeFiles(TEST_DIR, {[filename]: content}); const {stderr, exitCode} = runJest(DIR); - expect(exitCode).toBe(1); const {summary} = extractSummary(stderr); expect(wrap(cleanStderr(stderr))).toMatchSnapshot(); expect(wrap(summary)).toMatchSnapshot(); + expect(exitCode).toBe(1); }); test('skips with expand arg', () => { @@ -171,11 +209,11 @@ test('skips with expand arg', () => { writeFiles(TEST_DIR, {[filename]: content}); const {stderr, exitCode} = runJest(DIR, ['--expand']); - expect(exitCode).toBe(0); const {summary, rest} = extractSummary(stderr); expect(wrap(rest)).toMatchSnapshot(); expect(wrap(summary)).toMatchSnapshot(); + expect(exitCode).toBe(0); }); test('only with expand arg', () => { @@ -201,11 +239,11 @@ test('only with expand arg', () => { writeFiles(TEST_DIR, {[filename]: content}); const {stderr, exitCode} = runJest(DIR, ['--expand']); - expect(exitCode).toBe(0); const {summary, rest} = extractSummary(stderr); expect(wrap(rest)).toMatchSnapshot(); expect(wrap(summary)).toMatchSnapshot(); + expect(exitCode).toBe(0); }); test('cannot test with no implementation with expand arg', () => { @@ -218,11 +256,11 @@ test('cannot test with no implementation with expand arg', () => { writeFiles(TEST_DIR, {[filename]: content}); const {stderr, exitCode} = runJest(DIR, ['--expand']); - expect(exitCode).toBe(1); const {summary} = extractSummary(stderr); expect(wrap(cleanStderr(stderr))).toMatchSnapshot(); expect(wrap(summary)).toMatchSnapshot(); + expect(exitCode).toBe(1); }); test('function as descriptor', () => { @@ -236,9 +274,9 @@ test('function as descriptor', () => { writeFiles(TEST_DIR, {[filename]: content}); const {stderr, exitCode} = runJest(DIR); - expect(exitCode).toBe(0); const {summary, rest} = extractSummary(stderr); expect(wrap(rest)).toMatchSnapshot(); expect(wrap(summary)).toMatchSnapshot(); + expect(exitCode).toBe(0); }); diff --git a/packages/jest-circus/src/eventHandler.ts b/packages/jest-circus/src/eventHandler.ts index 87a2061a649f..6e825f128e13 100644 --- a/packages/jest-circus/src/eventHandler.ts +++ b/packages/jest-circus/src/eventHandler.ts @@ -60,24 +60,26 @@ const eventHandler: Circus.EventHandler = ( }); } - // inherit mode from its parent describe but - // do not inherit "only" mode when there is already tests with "only" mode - const shouldInheritMode = !( + // pass mode of currentDescribeBlock to tests + // but do not when there is already a single test with "only" mode + const shouldPassMode = !( currentDescribeBlock.mode === 'only' && - currentDescribeBlock.tests.find(test => test.mode === 'only') + currentDescribeBlock.children.some( + child => child.type === 'test' && child.mode === 'only', + ) ); - - if (shouldInheritMode) { - currentDescribeBlock.tests.forEach(test => { - if (!test.mode) { - test.mode = currentDescribeBlock.mode; + if (shouldPassMode) { + currentDescribeBlock.children.forEach(child => { + if (child.type === 'test' && !child.mode) { + child.mode = currentDescribeBlock.mode; } }); } - if ( !state.hasFocusedTests && - currentDescribeBlock.tests.some(test => test.mode === 'only') + currentDescribeBlock.children.some( + child => child.type === 'test' && child.mode === 'only', + ) ) { state.hasFocusedTests = true; } @@ -129,7 +131,7 @@ const eventHandler: Circus.EventHandler = ( if (test.mode === 'only') { state.hasFocusedTests = true; } - currentDescribeBlock.tests.push(test); + currentDescribeBlock.children.push(test); break; } case 'hook_failure': { diff --git a/packages/jest-circus/src/run.ts b/packages/jest-circus/src/run.ts index ae8e5392988a..f9a9969c7b3b 100644 --- a/packages/jest-circus/src/run.ts +++ b/packages/jest-circus/src/run.ts @@ -43,16 +43,25 @@ const _runTestsForDescribeBlock = async ( const retryTimes = parseInt(global[RETRY_TIMES], 10) || 0; const deferredRetryTests = []; - for (const test of describeBlock.tests) { - const hasErrorsBeforeTestRun = test.errors.length > 0; - await _runTest(test); - - if ( - hasErrorsBeforeTestRun === false && - retryTimes > 0 && - test.errors.length > 0 - ) { - deferredRetryTests.push(test); + for (const child of describeBlock.children) { + switch (child.type) { + case 'describeBlock': { + await _runTestsForDescribeBlock(child); + break; + } + case 'test': { + const hasErrorsBeforeTestRun = child.errors.length > 0; + await _runTest(child); + + if ( + hasErrorsBeforeTestRun === false && + retryTimes > 0 && + child.errors.length > 0 + ) { + deferredRetryTests.push(child); + } + break; + } } } @@ -69,10 +78,6 @@ const _runTestsForDescribeBlock = async ( } } - for (const child of describeBlock.children) { - await _runTestsForDescribeBlock(child); - } - for (const hook of afterAll) { await _callCircusHook({describeBlock, hook}); } diff --git a/packages/jest-circus/src/utils.ts b/packages/jest-circus/src/utils.ts index 29f7862a8c58..2a5322607d17 100644 --- a/packages/jest-circus/src/utils.ts +++ b/packages/jest-circus/src/utils.ts @@ -28,12 +28,12 @@ export const makeDescribe = ( } return { + type: 'describeBlock', // eslint-disable-next-line sort-keys children: [], hooks: [], mode: _mode, name: convertDescriptorToString(name), parent, - tests: [], }; }; @@ -45,6 +45,7 @@ export const makeTest = ( timeout: number | undefined, asyncError: Circus.Exception, ): Circus.TestEntry => ({ + type: 'test', // eslint-disable-next-line sort-keys asyncError, duration: null, errors: [], @@ -62,16 +63,15 @@ export const makeTest = ( // block has an enabled test. const hasEnabledTest = (describeBlock: Circus.DescribeBlock): boolean => { const {hasFocusedTests, testNamePattern} = getState(); - const hasOwnEnabledTests = describeBlock.tests.some( - test => - !( - test.mode === 'skip' || - (hasFocusedTests && test.mode !== 'only') || - (testNamePattern && !testNamePattern.test(getTestID(test))) - ), + return describeBlock.children.some(child => + child.type === 'describeBlock' + ? hasEnabledTest(child) + : !( + child.mode === 'skip' || + (hasFocusedTests && child.mode !== 'only') || + (testNamePattern && !testNamePattern.test(getTestID(child))) + ), ); - - return hasOwnEnabledTests || describeBlock.children.some(hasEnabledTest); }; type DescribeHooks = { @@ -136,7 +136,9 @@ export const getEachHooksForTest = (test: Circus.TestEntry): TestHooks => { export const describeBlockHasTests = ( describe: Circus.DescribeBlock, ): boolean => - describe.tests.length > 0 || describe.children.some(describeBlockHasTests); + describe.children.some( + child => child.type === 'test' || describeBlockHasTests(child), + ); const _makeTimeoutMessage = (timeout: number, isHook: boolean) => `Exceeded timeout of ${formatTime(timeout)} for a ${ @@ -283,48 +285,57 @@ const makeTestResults = ( describeBlock: Circus.DescribeBlock, ): Circus.TestResults => { const {includeTestLocationInResult} = getState(); - let testResults: Circus.TestResults = []; - for (const test of describeBlock.tests) { - const testPath = []; - let parent: Circus.TestEntry | Circus.DescribeBlock | undefined = test; - do { - testPath.unshift(parent.name); - } while ((parent = parent.parent)); - - const {status} = test; - - if (!status) { - throw new Error('Status should be present after tests are run.'); - } - - let location = null; - if (includeTestLocationInResult) { - const stackLine = test.asyncError.stack.split('\n')[1]; - const parsedLine = stackUtils.parseLine(stackLine); - if ( - parsedLine && - typeof parsedLine.column === 'number' && - typeof parsedLine.line === 'number' - ) { - location = { - column: parsedLine.column, - line: parsedLine.line, - }; + const testResults: Circus.TestResults = []; + for (const child of describeBlock.children) { + switch (child.type) { + case 'describeBlock': { + testResults.push(...makeTestResults(child)); + break; } - } + case 'test': + { + const testPath = []; + let parent: + | Circus.TestEntry + | Circus.DescribeBlock + | undefined = child; + do { + testPath.unshift(parent.name); + } while ((parent = parent.parent)); + + const {status} = child; + + if (!status) { + throw new Error('Status should be present after tests are run.'); + } - testResults.push({ - duration: test.duration, - errors: test.errors.map(_formatError), - invocations: test.invocations, - location, - status, - testPath, - }); - } + let location = null; + if (includeTestLocationInResult) { + const stackLine = child.asyncError.stack.split('\n')[1]; + const parsedLine = stackUtils.parseLine(stackLine); + if ( + parsedLine && + typeof parsedLine.column === 'number' && + typeof parsedLine.line === 'number' + ) { + location = { + column: parsedLine.column, + line: parsedLine.line, + }; + } + } - for (const child of describeBlock.children) { - testResults = testResults.concat(makeTestResults(child)); + testResults.push({ + duration: child.duration, + errors: child.errors.map(_formatError), + invocations: child.invocations, + location, + status, + testPath, + }); + } + break; + } } return testResults; @@ -376,12 +387,15 @@ export const addErrorToEachTestUnderDescribe = ( error: Circus.Exception, asyncError: Circus.Exception, ): void => { - for (const test of describeBlock.tests) { - test.errors.push([error, asyncError]); - } - for (const child of describeBlock.children) { - addErrorToEachTestUnderDescribe(child, error, asyncError); + switch (child.type) { + case 'describeBlock': + addErrorToEachTestUnderDescribe(child, error, asyncError); + break; + case 'test': + child.errors.push([error, asyncError]); + break; + } } }; diff --git a/packages/jest-types/src/Circus.ts b/packages/jest-types/src/Circus.ts index 845529c85907..e1291bfe1764 100644 --- a/packages/jest-types/src/Circus.ts +++ b/packages/jest-types/src/Circus.ts @@ -201,17 +201,18 @@ export type State = { }; export type DescribeBlock = { - children: Array; + type: 'describeBlock'; + children: Array; hooks: Array; mode: BlockMode; name: BlockName; parent?: DescribeBlock; - tests: Array; }; export type TestError = Exception | [Exception | undefined, Exception]; // the error from the test, as well as a backup error for async export type TestEntry = { + type: 'test'; asyncError: Exception; // Used if the test failure contains no usable stack trace errors: TestError; fn?: TestFn; From 68d12d59d37369ffd44169b15e09a090f9bbb635 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Mon, 4 May 2020 11:05:32 +0200 Subject: [PATCH 069/106] chore: skip broken test on windows (#9966) --- e2e/__tests__/watchModeNoAccess.test.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/e2e/__tests__/watchModeNoAccess.test.ts b/e2e/__tests__/watchModeNoAccess.test.ts index d7e4ef6e5a15..9a03c8c5410b 100644 --- a/e2e/__tests__/watchModeNoAccess.test.ts +++ b/e2e/__tests__/watchModeNoAccess.test.ts @@ -9,9 +9,13 @@ import * as os from 'os'; import * as path from 'path'; import * as fs from 'graceful-fs'; +import {skipSuiteOnWindows} from '@jest/test-utils'; import {cleanup, writeFiles} from '../Utils'; import {runContinuous} from '../runJest'; +// Until https://github.com/nodejs/node/issues/33227 is solved somehow +skipSuiteOnWindows(); + const DIR = path.resolve(os.tmpdir(), 'watch_mode_no_access'); const sleep = (time: number) => From 03dbb2fa82c45ae6ebc7da7189ef12b2ea596300 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Mon, 4 May 2020 14:15:13 +0200 Subject: [PATCH 070/106] chore: fix watch mode test with utimes (#9967) --- e2e/__tests__/watchModeNoAccess.test.ts | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/e2e/__tests__/watchModeNoAccess.test.ts b/e2e/__tests__/watchModeNoAccess.test.ts index 9a03c8c5410b..e372e0f12a97 100644 --- a/e2e/__tests__/watchModeNoAccess.test.ts +++ b/e2e/__tests__/watchModeNoAccess.test.ts @@ -9,13 +9,9 @@ import * as os from 'os'; import * as path from 'path'; import * as fs from 'graceful-fs'; -import {skipSuiteOnWindows} from '@jest/test-utils'; import {cleanup, writeFiles} from '../Utils'; import {runContinuous} from '../runJest'; -// Until https://github.com/nodejs/node/issues/33227 is solved somehow -skipSuiteOnWindows(); - const DIR = path.resolve(os.tmpdir(), 'watch_mode_no_access'); const sleep = (time: number) => @@ -47,6 +43,8 @@ afterEach(async () => { } }); +const getOneSecondAfterMs = (ms: number) => ms / 1000 + 1; + test('does not re-run tests when only access time is modified', async () => { setupFiles(); @@ -64,13 +62,21 @@ test('does not re-run tests when only access time is modified', async () => { // Should re-run the test const modulePath = path.join(DIR, 'foo.js'); const stat = fs.lstatSync(modulePath); - fs.utimesSync(modulePath, stat.atime.getTime(), stat.mtime.getTime()); + fs.utimesSync( + modulePath, + getOneSecondAfterMs(stat.atimeMs), + getOneSecondAfterMs(stat.mtimeMs), + ); await testRun.waitUntil(({stderr}) => numberOfTestRuns(stderr) === 2); // Should NOT re-run the test const fakeATime = 1541723621; - fs.utimesSync(modulePath, fakeATime, stat.mtime.getTime()); + fs.utimesSync( + modulePath, + getOneSecondAfterMs(fakeATime), + getOneSecondAfterMs(stat.mtimeMs), + ); await sleep(3000); expect(numberOfTestRuns(testRun.getCurrentOutput().stderr)).toBe(2); From 0a63d4099f98ee6eaa0a4821647aaa42782a92f7 Mon Sep 17 00:00:00 2001 From: chauchakching Date: Mon, 4 May 2020 20:44:14 +0800 Subject: [PATCH 071/106] fix: absolute path moduleNameMapper + jest.mock issue (#8727) --- CHANGELOG.md | 1 + .../__snapshots__/moduleNameMapper.test.ts.snap | 5 +++++ e2e/__tests__/moduleNameMapper.test.ts | 14 ++++++++++++++ .../__tests__/index.js | 16 ++++++++++++++++ .../index.js | 12 ++++++++++++ .../package.json | 7 +++++++ .../src/components/Button.js | 8 ++++++++ packages/jest-runtime/src/index.ts | 10 ++++------ 8 files changed, 67 insertions(+), 6 deletions(-) create mode 100644 e2e/module-name-mapper-correct-mock-absolute-path/__tests__/index.js create mode 100644 e2e/module-name-mapper-correct-mock-absolute-path/index.js create mode 100644 e2e/module-name-mapper-correct-mock-absolute-path/package.json create mode 100644 e2e/module-name-mapper-correct-mock-absolute-path/src/components/Button.js diff --git a/CHANGELOG.md b/CHANGELOG.md index 60976bb26f53..7e534df7aab1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ - `[jest-config, jest-resolve]` [**BREAKING**] Remove support for `browser` field ([#9943](https://github.com/facebook/jest/pull/9943)) - `[jest-haste-map]` Stop reporting files as changed when they are only accessed ([#7347](https://github.com/facebook/jest/pull/7347)) - `[jest-resolve]` Show relative path from root dir for `module not found` errors ([#9963](https://github.com/facebook/jest/pull/9963)) +- `[jest-runtime]` Fix absolute path moduleNameMapper + jest.mock bug ([#8727](https://github.com/facebook/jest/pull/8727)) ### Chore & Maintenance diff --git a/e2e/__tests__/__snapshots__/moduleNameMapper.test.ts.snap b/e2e/__tests__/__snapshots__/moduleNameMapper.test.ts.snap index faac572b892d..88a80f3a3e76 100644 --- a/e2e/__tests__/__snapshots__/moduleNameMapper.test.ts.snap +++ b/e2e/__tests__/__snapshots__/moduleNameMapper.test.ts.snap @@ -5,6 +5,11 @@ PASS __tests__/index.js ✓ moduleNameMapping correct configuration `; +exports[`moduleNameMapper correct configuration mocking module of absolute path 1`] = ` +PASS __tests__/index.js + ✓ moduleNameMapping correct configuration +`; + exports[`moduleNameMapper wrong array configuration 1`] = ` FAIL __tests__/index.js ● Test suite failed to run diff --git a/e2e/__tests__/moduleNameMapper.test.ts b/e2e/__tests__/moduleNameMapper.test.ts index c3faccac226e..9b0eb82075a9 100644 --- a/e2e/__tests__/moduleNameMapper.test.ts +++ b/e2e/__tests__/moduleNameMapper.test.ts @@ -35,6 +35,20 @@ test('moduleNameMapper correct configuration', () => { expect(wrap(rest)).toMatchSnapshot(); }); +test('moduleNameMapper correct configuration mocking module of absolute path', () => { + const {stderr, exitCode} = runJest( + 'module-name-mapper-correct-mock-absolute-path', + [], + { + stripAnsi: true, + }, + ); + const {rest} = extractSummary(stderr); + + expect(exitCode).toBe(0); + expect(wrap(rest)).toMatchSnapshot(); +}); + test('moduleNameMapper with mocking', () => { const {json} = runWithJson('module-name-mapper-mock'); expect(json.numTotalTests).toBe(2); diff --git a/e2e/module-name-mapper-correct-mock-absolute-path/__tests__/index.js b/e2e/module-name-mapper-correct-mock-absolute-path/__tests__/index.js new file mode 100644 index 000000000000..959e1bc9b32d --- /dev/null +++ b/e2e/module-name-mapper-correct-mock-absolute-path/__tests__/index.js @@ -0,0 +1,16 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +'use strict'; + +const importedFn = require('../'); + +jest.mock('/components/Button'); + +test('moduleNameMapping correct configuration', () => { + expect(importedFn).toBeDefined(); +}); diff --git a/e2e/module-name-mapper-correct-mock-absolute-path/index.js b/e2e/module-name-mapper-correct-mock-absolute-path/index.js new file mode 100644 index 000000000000..9552c0b25edd --- /dev/null +++ b/e2e/module-name-mapper-correct-mock-absolute-path/index.js @@ -0,0 +1,12 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +'use strict'; + +require('/components/Button'); + +module.exports = () => 'test'; diff --git a/e2e/module-name-mapper-correct-mock-absolute-path/package.json b/e2e/module-name-mapper-correct-mock-absolute-path/package.json new file mode 100644 index 000000000000..67f3c9a77889 --- /dev/null +++ b/e2e/module-name-mapper-correct-mock-absolute-path/package.json @@ -0,0 +1,7 @@ +{ + "jest": { + "moduleNameMapper": { + "^/(.*)$": "/src/$1" + } + } +} diff --git a/e2e/module-name-mapper-correct-mock-absolute-path/src/components/Button.js b/e2e/module-name-mapper-correct-mock-absolute-path/src/components/Button.js new file mode 100644 index 000000000000..ad032eb1bbfe --- /dev/null +++ b/e2e/module-name-mapper-correct-mock-absolute-path/src/components/Button.js @@ -0,0 +1,8 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +module.exports = () => 'Button'; diff --git a/packages/jest-runtime/src/index.ts b/packages/jest-runtime/src/index.ts index 6c42dba9b8bc..aaacea67f06f 100644 --- a/packages/jest-runtime/src/index.ts +++ b/packages/jest-runtime/src/index.ts @@ -584,12 +584,10 @@ class Runtime { } const manualMockOrStub = this._resolver.getMockModule(from, moduleName); - let modulePath; - if (manualMockOrStub) { - modulePath = this._resolveModule(from, manualMockOrStub); - } else { - modulePath = this._resolveModule(from, moduleName); - } + + let modulePath = + this._resolver.getMockModule(from, moduleName) || + this._resolveModule(from, moduleName); let isManualMock = manualMockOrStub && From 3375ac3b515e62ca1450e9a154ffdbdf7dc7e1f7 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Mon, 4 May 2020 14:47:22 +0200 Subject: [PATCH 072/106] chore: remove unused prettier uninstall step from CI --- .github/workflows/nodejs.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 733cd73f5ea0..2fef34f1beff 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -79,9 +79,6 @@ jobs: uses: actions/setup-node@v1 with: node-version: ${{ matrix.node-version }} - - name: remove prettier dep - run: yarn remove-prettier-dep - if: matrix.node-version == '8.17.0' - name: install run: yarn install-no-ts-build - name: run tests From d30a586b4baea82295aaabeb52d14e7488359363 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Mon, 4 May 2020 17:49:08 +0200 Subject: [PATCH 073/106] fix: disallow hook definitions in tests (#9957) --- CHANGELOG.md | 1 + .../circusDeclarationErrors.test.ts.snap | 4 ++ e2e/__tests__/nestedTestDefinitions.test.ts | 32 +++++++++---- .../__tests__/nestedHookInTest.js | 18 ++++++++ packages/jest-circus/src/eventHandler.ts | 46 +++++++++++++------ .../jest-circus/src/formatNodeAssertErrors.ts | 2 +- packages/jest-types/src/Circus.ts | 2 +- 7 files changed, 78 insertions(+), 27 deletions(-) create mode 100644 e2e/nested-test-definitions/__tests__/nestedHookInTest.js diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e534df7aab1..444fdcfdcaf6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ - `[jest-circus, jest-console, jest-jasmine2, jest-reporters, jest-util, pretty-format]` Fix time durating formatting and consolidate time formatting code ([#9765](https://github.com/facebook/jest/pull/9765)) - `[jest-circus]` [**BREAKING**] Fail tests if a test takes a done callback and have return values ([#9129](https://github.com/facebook/jest/pull/9129)) - `[jest-circus]` [**BREAKING**] Throw a proper error if a test / hook is defined asynchronously ([#8096](https://github.com/facebook/jest/pull/8096)) +- `[jest-circus]` Throw more descriptive error if hook is defined inside test ([#9957](https://github.com/facebook/jest/pull/9957)) - `[jest-circus]` [**BREAKING**] Align execution order of tests to match `jasmine`'s top to bottom order ([#9965](https://github.com/facebook/jest/pull/9965)) - `[jest-config, jest-resolve]` [**BREAKING**] Remove support for `browser` field ([#9943](https://github.com/facebook/jest/pull/9943)) - `[jest-haste-map]` Stop reporting files as changed when they are only accessed ([#7347](https://github.com/facebook/jest/pull/7347)) diff --git a/e2e/__tests__/__snapshots__/circusDeclarationErrors.test.ts.snap b/e2e/__tests__/__snapshots__/circusDeclarationErrors.test.ts.snap index 83a0e4eab83d..bbaca7ca6978 100644 --- a/e2e/__tests__/__snapshots__/circusDeclarationErrors.test.ts.snap +++ b/e2e/__tests__/__snapshots__/circusDeclarationErrors.test.ts.snap @@ -16,6 +16,7 @@ FAIL __tests__/asyncDefinition.test.js 14 | }); 15 | }); + at eventHandler (../../packages/jest-circus/build/eventHandler.js:143:11) at test (__tests__/asyncDefinition.test.js:12:5) ● Test suite failed to run @@ -30,6 +31,7 @@ FAIL __tests__/asyncDefinition.test.js 15 | }); 16 | + at eventHandler (../../packages/jest-circus/build/eventHandler.js:112:11) at afterAll (__tests__/asyncDefinition.test.js:13:5) ● Test suite failed to run @@ -44,6 +46,7 @@ FAIL __tests__/asyncDefinition.test.js 20 | }); 21 | + at eventHandler (../../packages/jest-circus/build/eventHandler.js:143:11) at test (__tests__/asyncDefinition.test.js:18:3) ● Test suite failed to run @@ -57,5 +60,6 @@ FAIL __tests__/asyncDefinition.test.js 20 | }); 21 | + at eventHandler (../../packages/jest-circus/build/eventHandler.js:112:11) at afterAll (__tests__/asyncDefinition.test.js:19:3) `; diff --git a/e2e/__tests__/nestedTestDefinitions.test.ts b/e2e/__tests__/nestedTestDefinitions.test.ts index 0a26d4fc14c5..ab000c325e19 100644 --- a/e2e/__tests__/nestedTestDefinitions.test.ts +++ b/e2e/__tests__/nestedTestDefinitions.test.ts @@ -42,16 +42,28 @@ test('print correct error message with nested test definitions inside describe', expect(cleanupRunnerStack(summary.rest)).toMatchSnapshot(); }); -test('print correct message when nesting describe inside it', () => { - if (!isJestCircusRun()) { - return; - } +(isJestCircusRun() ? test : test.skip)( + 'print correct message when nesting describe inside it', + () => { + const result = runJest('nested-test-definitions', ['nestedDescribeInTest']); - const result = runJest('nested-test-definitions', ['nestedDescribeInTest']); + expect(result.exitCode).toBe(1); - expect(result.exitCode).toBe(1); + expect(result.stderr).toContain( + 'Cannot nest a describe inside a test. Describe block "inner describe" cannot run because it is nested within "test".', + ); + }, +); - expect(result.stderr).toContain( - 'Cannot nest a describe inside a test. Describe block "inner describe" cannot run because it is nested within "test".', - ); -}); +(isJestCircusRun() ? test : test.skip)( + 'print correct message when nesting a hook inside it', + () => { + const result = runJest('nested-test-definitions', ['nestedHookInTest']); + + expect(result.exitCode).toBe(1); + + expect(result.stderr).toContain( + 'Hooks cannot be defined inside tests. Hook of type "beforeEach" is nested within "test".', + ); + }, +); diff --git a/e2e/nested-test-definitions/__tests__/nestedHookInTest.js b/e2e/nested-test-definitions/__tests__/nestedHookInTest.js new file mode 100644 index 000000000000..d7b403d9842c --- /dev/null +++ b/e2e/nested-test-definitions/__tests__/nestedHookInTest.js @@ -0,0 +1,18 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +'use strict'; + +const {getTruthy} = require('../index'); + +test('test', () => { + expect(getTruthy()).toBeTruthy(); + + beforeEach(() => { + // nothing to see here + }); +}); diff --git a/packages/jest-circus/src/eventHandler.ts b/packages/jest-circus/src/eventHandler.ts index 6e825f128e13..590e66ca3a13 100644 --- a/packages/jest-circus/src/eventHandler.ts +++ b/packages/jest-circus/src/eventHandler.ts @@ -39,9 +39,12 @@ const eventHandler: Circus.EventHandler = ( const {currentDescribeBlock, currentlyRunningTest} = state; if (currentlyRunningTest) { - throw new Error( - `Cannot nest a describe inside a test. Describe block "${blockName}" cannot run because it is nested within "${currentlyRunningTest.name}".`, + currentlyRunningTest.errors.push( + new Error( + `Cannot nest a describe inside a test. Describe block "${blockName}" cannot run because it is nested within "${currentlyRunningTest.name}".`, + ), ); + break; } const describeBlock = makeDescribe(blockName, currentDescribeBlock, mode); @@ -90,16 +93,25 @@ const eventHandler: Circus.EventHandler = ( break; } case 'add_hook': { - const {currentDescribeBlock, hasStarted} = state; + const {currentDescribeBlock, currentlyRunningTest, hasStarted} = state; const {asyncError, fn, hookType: type, timeout} = event; - const parent = currentDescribeBlock; - if (hasStarted) { - asyncError.message = - 'Cannot add a hook after tests have started running. Hooks must be defined synchronously.'; - state.unhandledErrors.push(asyncError); + if (currentlyRunningTest) { + currentlyRunningTest.errors.push( + new Error( + `Hooks cannot be defined inside tests. Hook of type "${type}" is nested within "${currentlyRunningTest.name}".`, + ), + ); + break; + } else if (hasStarted) { + state.unhandledErrors.push( + new Error( + 'Cannot add a hook after tests have started running. Hooks must be defined synchronously.', + ), + ); break; } + const parent = currentDescribeBlock; currentDescribeBlock.hooks.push({asyncError, fn, parent, timeout, type}); break; @@ -109,14 +121,18 @@ const eventHandler: Circus.EventHandler = ( const {asyncError, fn, mode, testName: name, timeout} = event; if (currentlyRunningTest) { - throw new Error( - `Tests cannot be nested. Test "${name}" cannot run because it is nested within "${currentlyRunningTest.name}".`, + currentlyRunningTest.errors.push( + new Error( + `Tests cannot be nested. Test "${name}" cannot run because it is nested within "${currentlyRunningTest.name}".`, + ), + ); + break; + } else if (hasStarted) { + state.unhandledErrors.push( + new Error( + 'Cannot add a test after tests have started running. Tests must be defined synchronously.', + ), ); - } - if (hasStarted) { - asyncError.message = - 'Cannot add a test after tests have started running. Tests must be defined synchronously.'; - state.unhandledErrors.push(asyncError); break; } diff --git a/packages/jest-circus/src/formatNodeAssertErrors.ts b/packages/jest-circus/src/formatNodeAssertErrors.ts index d9dbdee0bb8e..10ffc8d1e25f 100644 --- a/packages/jest-circus/src/formatNodeAssertErrors.ts +++ b/packages/jest-circus/src/formatNodeAssertErrors.ts @@ -43,7 +43,7 @@ const formatNodeAssertErrors = ( state: Circus.State, ): void => { if (event.name === 'test_done') { - event.test.errors = event.test.errors.map((errors: Circus.TestError) => { + event.test.errors = event.test.errors.map(errors => { let error; if (Array.isArray(errors)) { const [originalError, asyncError] = errors; diff --git a/packages/jest-types/src/Circus.ts b/packages/jest-types/src/Circus.ts index e1291bfe1764..963a6a61b537 100644 --- a/packages/jest-types/src/Circus.ts +++ b/packages/jest-types/src/Circus.ts @@ -214,7 +214,7 @@ export type TestError = Exception | [Exception | undefined, Exception]; // the e export type TestEntry = { type: 'test'; asyncError: Exception; // Used if the test failure contains no usable stack trace - errors: TestError; + errors: Array; fn?: TestFn; invocations: number; mode: TestMode; From 68b65afc97688bd5b0b433f8f585da57dcd1d418 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Mon, 4 May 2020 18:05:12 +0200 Subject: [PATCH 074/106] v26.0.0-alpha.2 --- lerna.json | 2 +- packages/babel-jest/package.json | 6 +-- packages/expect/package.json | 8 ++-- packages/jest-changed-files/package.json | 4 +- packages/jest-circus/package.json | 24 ++++++------ packages/jest-cli/package.json | 14 +++---- packages/jest-config/package.json | 22 +++++------ packages/jest-console/package.json | 8 ++-- packages/jest-core/package.json | 38 +++++++++---------- packages/jest-diff/package.json | 4 +- packages/jest-each/package.json | 8 ++-- packages/jest-environment-jsdom/package.json | 12 +++--- packages/jest-environment-node/package.json | 12 +++--- packages/jest-environment/package.json | 8 ++-- packages/jest-fake-timers/package.json | 10 ++--- packages/jest-globals/package.json | 8 ++-- packages/jest-haste-map/package.json | 6 +-- packages/jest-jasmine2/package.json | 24 ++++++------ packages/jest-leak-detector/package.json | 4 +- packages/jest-matcher-utils/package.json | 6 +-- packages/jest-message-util/package.json | 4 +- packages/jest-mock/package.json | 4 +- packages/jest-phabricator/package.json | 4 +- packages/jest-repl/package.json | 12 +++--- packages/jest-reporters/package.json | 16 ++++---- .../jest-resolve-dependencies/package.json | 12 +++--- packages/jest-resolve/package.json | 8 ++-- packages/jest-runner/package.json | 28 +++++++------- packages/jest-runtime/package.json | 34 ++++++++--------- packages/jest-snapshot/package.json | 18 ++++----- packages/jest-test-result/package.json | 6 +-- packages/jest-test-sequencer/package.json | 10 ++--- packages/jest-transform/package.json | 8 ++-- packages/jest-types/package.json | 2 +- packages/jest-util/package.json | 4 +- packages/jest-validate/package.json | 6 +-- packages/jest-watcher/package.json | 8 ++-- packages/jest/package.json | 6 +-- packages/pretty-format/package.json | 4 +- 39 files changed, 211 insertions(+), 211 deletions(-) diff --git a/lerna.json b/lerna.json index 0dde82b4d497..11d1f82275fa 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "26.0.0-alpha.1", + "version": "26.0.0-alpha.2", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/babel-jest/package.json b/packages/babel-jest/package.json index 10f3ec3e9dae..1d0a23791548 100644 --- a/packages/babel-jest/package.json +++ b/packages/babel-jest/package.json @@ -1,7 +1,7 @@ { "name": "babel-jest", "description": "Jest plugin to use babel for transformation.", - "version": "26.0.0-alpha.1", + "version": "26.0.0-alpha.2", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -11,8 +11,8 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/transform": "^26.0.0-alpha.1", - "@jest/types": "^26.0.0-alpha.1", + "@jest/transform": "^26.0.0-alpha.2", + "@jest/types": "^26.0.0-alpha.2", "@types/babel__core": "^7.1.7", "babel-plugin-istanbul": "^6.0.0", "babel-preset-jest": "^26.0.0-alpha.0", diff --git a/packages/expect/package.json b/packages/expect/package.json index 380ec29d1485..70dac1e52c0a 100644 --- a/packages/expect/package.json +++ b/packages/expect/package.json @@ -1,6 +1,6 @@ { "name": "expect", - "version": "26.0.0-alpha.1", + "version": "26.0.0-alpha.2", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,11 +10,11 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/types": "^26.0.0-alpha.1", + "@jest/types": "^26.0.0-alpha.2", "ansi-styles": "^4.0.0", "jest-get-type": "^26.0.0-alpha.0", - "jest-matcher-utils": "^26.0.0-alpha.1", - "jest-message-util": "^26.0.0-alpha.1", + "jest-matcher-utils": "^26.0.0-alpha.2", + "jest-message-util": "^26.0.0-alpha.2", "jest-regex-util": "^26.0.0-alpha.1" }, "devDependencies": { diff --git a/packages/jest-changed-files/package.json b/packages/jest-changed-files/package.json index 39cfa7d0c26c..10369ed9cf62 100644 --- a/packages/jest-changed-files/package.json +++ b/packages/jest-changed-files/package.json @@ -1,6 +1,6 @@ { "name": "jest-changed-files", - "version": "26.0.0-alpha.1", + "version": "26.0.0-alpha.2", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,7 +10,7 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/types": "^26.0.0-alpha.1", + "@jest/types": "^26.0.0-alpha.2", "execa": "^4.0.0", "throat": "^5.0.0" }, diff --git a/packages/jest-circus/package.json b/packages/jest-circus/package.json index 6f1d99d62c08..df0dbf246d21 100644 --- a/packages/jest-circus/package.json +++ b/packages/jest-circus/package.json @@ -1,6 +1,6 @@ { "name": "jest-circus", - "version": "26.0.0-alpha.1", + "version": "26.0.0-alpha.2", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -11,21 +11,21 @@ "types": "build/index.d.ts", "dependencies": { "@babel/traverse": "^7.1.0", - "@jest/environment": "^26.0.0-alpha.1", - "@jest/test-result": "^26.0.0-alpha.1", - "@jest/types": "^26.0.0-alpha.1", + "@jest/environment": "^26.0.0-alpha.2", + "@jest/test-result": "^26.0.0-alpha.2", + "@jest/types": "^26.0.0-alpha.2", "chalk": "^4.0.0", "co": "^4.6.0", "dedent": "^0.7.0", - "expect": "^26.0.0-alpha.1", + "expect": "^26.0.0-alpha.2", "is-generator-fn": "^2.0.0", - "jest-each": "^26.0.0-alpha.1", - "jest-matcher-utils": "^26.0.0-alpha.1", - "jest-message-util": "^26.0.0-alpha.1", - "jest-runtime": "^26.0.0-alpha.1", - "jest-snapshot": "^26.0.0-alpha.1", - "jest-util": "^26.0.0-alpha.1", - "pretty-format": "^26.0.0-alpha.1", + "jest-each": "^26.0.0-alpha.2", + "jest-matcher-utils": "^26.0.0-alpha.2", + "jest-message-util": "^26.0.0-alpha.2", + "jest-runtime": "^26.0.0-alpha.2", + "jest-snapshot": "^26.0.0-alpha.2", + "jest-util": "^26.0.0-alpha.2", + "pretty-format": "^26.0.0-alpha.2", "stack-utils": "^2.0.2", "throat": "^5.0.0" }, diff --git a/packages/jest-cli/package.json b/packages/jest-cli/package.json index e97ac7a81992..c77b62229427 100644 --- a/packages/jest-cli/package.json +++ b/packages/jest-cli/package.json @@ -1,21 +1,21 @@ { "name": "jest-cli", "description": "Delightful JavaScript Testing.", - "version": "26.0.0-alpha.1", + "version": "26.0.0-alpha.2", "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/core": "^26.0.0-alpha.1", - "@jest/test-result": "^26.0.0-alpha.1", - "@jest/types": "^26.0.0-alpha.1", + "@jest/core": "^26.0.0-alpha.2", + "@jest/test-result": "^26.0.0-alpha.2", + "@jest/types": "^26.0.0-alpha.2", "chalk": "^4.0.0", "exit": "^0.1.2", "graceful-fs": "^4.2.4", "import-local": "^3.0.2", "is-ci": "^2.0.0", - "jest-config": "^26.0.0-alpha.1", - "jest-util": "^26.0.0-alpha.1", - "jest-validate": "^26.0.0-alpha.1", + "jest-config": "^26.0.0-alpha.2", + "jest-util": "^26.0.0-alpha.2", + "jest-validate": "^26.0.0-alpha.2", "prompts": "^2.0.1", "yargs": "^15.3.1" }, diff --git a/packages/jest-config/package.json b/packages/jest-config/package.json index 056319b4345b..0e2227910c61 100644 --- a/packages/jest-config/package.json +++ b/packages/jest-config/package.json @@ -1,6 +1,6 @@ { "name": "jest-config", - "version": "26.0.0-alpha.1", + "version": "26.0.0-alpha.2", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -11,23 +11,23 @@ "types": "build/index.d.ts", "dependencies": { "@babel/core": "^7.1.0", - "@jest/test-sequencer": "^26.0.0-alpha.1", - "@jest/types": "^26.0.0-alpha.1", - "babel-jest": "^26.0.0-alpha.1", + "@jest/test-sequencer": "^26.0.0-alpha.2", + "@jest/types": "^26.0.0-alpha.2", + "babel-jest": "^26.0.0-alpha.2", "chalk": "^4.0.0", "deepmerge": "^4.2.2", "glob": "^7.1.1", "graceful-fs": "^4.2.4", - "jest-environment-jsdom": "^26.0.0-alpha.1", - "jest-environment-node": "^26.0.0-alpha.1", + "jest-environment-jsdom": "^26.0.0-alpha.2", + "jest-environment-node": "^26.0.0-alpha.2", "jest-get-type": "^26.0.0-alpha.0", - "jest-jasmine2": "^26.0.0-alpha.1", + "jest-jasmine2": "^26.0.0-alpha.2", "jest-regex-util": "^26.0.0-alpha.1", - "jest-resolve": "^26.0.0-alpha.1", - "jest-util": "^26.0.0-alpha.1", - "jest-validate": "^26.0.0-alpha.1", + "jest-resolve": "^26.0.0-alpha.2", + "jest-util": "^26.0.0-alpha.2", + "jest-validate": "^26.0.0-alpha.2", "micromatch": "^4.0.2", - "pretty-format": "^26.0.0-alpha.1" + "pretty-format": "^26.0.0-alpha.2" }, "devDependencies": { "@types/babel__core": "^7.0.4", diff --git a/packages/jest-console/package.json b/packages/jest-console/package.json index 0742af28a7f3..78f2305c53ea 100644 --- a/packages/jest-console/package.json +++ b/packages/jest-console/package.json @@ -1,6 +1,6 @@ { "name": "@jest/console", - "version": "26.0.0-alpha.1", + "version": "26.0.0-alpha.2", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,10 +10,10 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/types": "^26.0.0-alpha.1", + "@jest/types": "^26.0.0-alpha.2", "chalk": "^4.0.0", - "jest-message-util": "^26.0.0-alpha.1", - "jest-util": "^26.0.0-alpha.1", + "jest-message-util": "^26.0.0-alpha.2", + "jest-util": "^26.0.0-alpha.2", "slash": "^3.0.0" }, "devDependencies": { diff --git a/packages/jest-core/package.json b/packages/jest-core/package.json index a9073fd2132e..bce135c92439 100644 --- a/packages/jest-core/package.json +++ b/packages/jest-core/package.json @@ -1,32 +1,32 @@ { "name": "@jest/core", "description": "Delightful JavaScript Testing.", - "version": "26.0.0-alpha.1", + "version": "26.0.0-alpha.2", "main": "build/jest.js", "types": "build/jest.d.ts", "dependencies": { - "@jest/console": "^26.0.0-alpha.1", - "@jest/reporters": "^26.0.0-alpha.1", - "@jest/test-result": "^26.0.0-alpha.1", - "@jest/transform": "^26.0.0-alpha.1", - "@jest/types": "^26.0.0-alpha.1", + "@jest/console": "^26.0.0-alpha.2", + "@jest/reporters": "^26.0.0-alpha.2", + "@jest/test-result": "^26.0.0-alpha.2", + "@jest/transform": "^26.0.0-alpha.2", + "@jest/types": "^26.0.0-alpha.2", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", "exit": "^0.1.2", "graceful-fs": "^4.2.4", - "jest-changed-files": "^26.0.0-alpha.1", - "jest-config": "^26.0.0-alpha.1", - "jest-haste-map": "^26.0.0-alpha.1", - "jest-message-util": "^26.0.0-alpha.1", + "jest-changed-files": "^26.0.0-alpha.2", + "jest-config": "^26.0.0-alpha.2", + "jest-haste-map": "^26.0.0-alpha.2", + "jest-message-util": "^26.0.0-alpha.2", "jest-regex-util": "^26.0.0-alpha.1", - "jest-resolve": "^26.0.0-alpha.1", - "jest-resolve-dependencies": "^26.0.0-alpha.1", - "jest-runner": "^26.0.0-alpha.1", - "jest-runtime": "^26.0.0-alpha.1", - "jest-snapshot": "^26.0.0-alpha.1", - "jest-util": "^26.0.0-alpha.1", - "jest-validate": "^26.0.0-alpha.1", - "jest-watcher": "^26.0.0-alpha.1", + "jest-resolve": "^26.0.0-alpha.2", + "jest-resolve-dependencies": "^26.0.0-alpha.2", + "jest-runner": "^26.0.0-alpha.2", + "jest-runtime": "^26.0.0-alpha.2", + "jest-snapshot": "^26.0.0-alpha.2", + "jest-util": "^26.0.0-alpha.2", + "jest-validate": "^26.0.0-alpha.2", + "jest-watcher": "^26.0.0-alpha.2", "micromatch": "^4.0.2", "p-each-series": "^2.1.0", "rimraf": "^3.0.0", @@ -34,7 +34,7 @@ "strip-ansi": "^6.0.0" }, "devDependencies": { - "@jest/test-sequencer": "^26.0.0-alpha.1", + "@jest/test-sequencer": "^26.0.0-alpha.2", "@types/exit": "^0.1.30", "@types/graceful-fs": "^4.1.2", "@types/micromatch": "^4.0.0", diff --git a/packages/jest-diff/package.json b/packages/jest-diff/package.json index 509a36ed5a70..502c0015c06b 100644 --- a/packages/jest-diff/package.json +++ b/packages/jest-diff/package.json @@ -1,6 +1,6 @@ { "name": "jest-diff", - "version": "26.0.0-alpha.1", + "version": "26.0.0-alpha.2", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -13,7 +13,7 @@ "chalk": "^4.0.0", "diff-sequences": "^26.0.0-alpha.0", "jest-get-type": "^26.0.0-alpha.0", - "pretty-format": "^26.0.0-alpha.1" + "pretty-format": "^26.0.0-alpha.2" }, "devDependencies": { "@jest/test-utils": "^26.0.0-alpha.1", diff --git a/packages/jest-each/package.json b/packages/jest-each/package.json index 49cdcc13760a..0be5fa1fcbe1 100644 --- a/packages/jest-each/package.json +++ b/packages/jest-each/package.json @@ -1,6 +1,6 @@ { "name": "jest-each", - "version": "26.0.0-alpha.1", + "version": "26.0.0-alpha.2", "description": "Parameterised tests for Jest", "main": "build/index.js", "types": "build/index.d.ts", @@ -18,11 +18,11 @@ "author": "Matt Phillips (mattphillips)", "license": "MIT", "dependencies": { - "@jest/types": "^26.0.0-alpha.1", + "@jest/types": "^26.0.0-alpha.2", "chalk": "^4.0.0", "jest-get-type": "^26.0.0-alpha.0", - "jest-util": "^26.0.0-alpha.1", - "pretty-format": "^26.0.0-alpha.1" + "jest-util": "^26.0.0-alpha.2", + "pretty-format": "^26.0.0-alpha.2" }, "engines": { "node": ">= 10.14.2" diff --git a/packages/jest-environment-jsdom/package.json b/packages/jest-environment-jsdom/package.json index 2dfb6696c614..411bbfbdbe6f 100644 --- a/packages/jest-environment-jsdom/package.json +++ b/packages/jest-environment-jsdom/package.json @@ -1,6 +1,6 @@ { "name": "jest-environment-jsdom", - "version": "26.0.0-alpha.1", + "version": "26.0.0-alpha.2", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,11 +10,11 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/environment": "^26.0.0-alpha.1", - "@jest/fake-timers": "^26.0.0-alpha.1", - "@jest/types": "^26.0.0-alpha.1", - "jest-mock": "^26.0.0-alpha.1", - "jest-util": "^26.0.0-alpha.1", + "@jest/environment": "^26.0.0-alpha.2", + "@jest/fake-timers": "^26.0.0-alpha.2", + "@jest/types": "^26.0.0-alpha.2", + "jest-mock": "^26.0.0-alpha.2", + "jest-util": "^26.0.0-alpha.2", "jsdom": "^16.2.2" }, "devDependencies": { diff --git a/packages/jest-environment-node/package.json b/packages/jest-environment-node/package.json index cc763770dd86..1b4ba69c159d 100644 --- a/packages/jest-environment-node/package.json +++ b/packages/jest-environment-node/package.json @@ -1,6 +1,6 @@ { "name": "jest-environment-node", - "version": "26.0.0-alpha.1", + "version": "26.0.0-alpha.2", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,11 +10,11 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/environment": "^26.0.0-alpha.1", - "@jest/fake-timers": "^26.0.0-alpha.1", - "@jest/types": "^26.0.0-alpha.1", - "jest-mock": "^26.0.0-alpha.1", - "jest-util": "^26.0.0-alpha.1" + "@jest/environment": "^26.0.0-alpha.2", + "@jest/fake-timers": "^26.0.0-alpha.2", + "@jest/types": "^26.0.0-alpha.2", + "jest-mock": "^26.0.0-alpha.2", + "jest-util": "^26.0.0-alpha.2" }, "engines": { "node": ">= 10.14.2" diff --git a/packages/jest-environment/package.json b/packages/jest-environment/package.json index 38ab97940389..5ac8c7bcbdc8 100644 --- a/packages/jest-environment/package.json +++ b/packages/jest-environment/package.json @@ -1,6 +1,6 @@ { "name": "@jest/environment", - "version": "26.0.0-alpha.1", + "version": "26.0.0-alpha.2", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,9 +10,9 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/fake-timers": "^26.0.0-alpha.1", - "@jest/types": "^26.0.0-alpha.1", - "jest-mock": "^26.0.0-alpha.1" + "@jest/fake-timers": "^26.0.0-alpha.2", + "@jest/types": "^26.0.0-alpha.2", + "jest-mock": "^26.0.0-alpha.2" }, "devDependencies": { "@types/node": "*" diff --git a/packages/jest-fake-timers/package.json b/packages/jest-fake-timers/package.json index 4d37f8c61e26..4b44efb7bc69 100644 --- a/packages/jest-fake-timers/package.json +++ b/packages/jest-fake-timers/package.json @@ -1,6 +1,6 @@ { "name": "@jest/fake-timers", - "version": "26.0.0-alpha.1", + "version": "26.0.0-alpha.2", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,11 +10,11 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/types": "^26.0.0-alpha.1", + "@jest/types": "^26.0.0-alpha.2", "@sinonjs/fake-timers": "^6.0.1", - "jest-message-util": "^26.0.0-alpha.1", - "jest-mock": "^26.0.0-alpha.1", - "jest-util": "^26.0.0-alpha.1" + "jest-message-util": "^26.0.0-alpha.2", + "jest-mock": "^26.0.0-alpha.2", + "jest-util": "^26.0.0-alpha.2" }, "devDependencies": { "@types/node": "*", diff --git a/packages/jest-globals/package.json b/packages/jest-globals/package.json index b52eb97b8cda..ccd3b5ac355c 100644 --- a/packages/jest-globals/package.json +++ b/packages/jest-globals/package.json @@ -1,6 +1,6 @@ { "name": "@jest/globals", - "version": "26.0.0-alpha.1", + "version": "26.0.0-alpha.2", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -13,9 +13,9 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/environment": "^26.0.0-alpha.1", - "@jest/types": "^26.0.0-alpha.1", - "expect": "^26.0.0-alpha.1" + "@jest/environment": "^26.0.0-alpha.2", + "@jest/types": "^26.0.0-alpha.2", + "expect": "^26.0.0-alpha.2" }, "publishConfig": { "access": "public" diff --git a/packages/jest-haste-map/package.json b/packages/jest-haste-map/package.json index e5759aa9f6af..f71cb76c2025 100644 --- a/packages/jest-haste-map/package.json +++ b/packages/jest-haste-map/package.json @@ -1,6 +1,6 @@ { "name": "jest-haste-map", - "version": "26.0.0-alpha.1", + "version": "26.0.0-alpha.2", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,13 +10,13 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/types": "^26.0.0-alpha.1", + "@jest/types": "^26.0.0-alpha.2", "@types/graceful-fs": "^4.1.2", "anymatch": "^3.0.3", "fb-watchman": "^2.0.0", "graceful-fs": "^4.2.4", "jest-serializer": "^26.0.0-alpha.0", - "jest-util": "^26.0.0-alpha.1", + "jest-util": "^26.0.0-alpha.2", "jest-worker": "^26.0.0-alpha.0", "micromatch": "^4.0.2", "sane": "^4.0.3", diff --git a/packages/jest-jasmine2/package.json b/packages/jest-jasmine2/package.json index f83ab7b33344..bdd96b952c9c 100644 --- a/packages/jest-jasmine2/package.json +++ b/packages/jest-jasmine2/package.json @@ -1,6 +1,6 @@ { "name": "jest-jasmine2", - "version": "26.0.0-alpha.1", + "version": "26.0.0-alpha.2", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -11,21 +11,21 @@ "types": "build/index.d.ts", "dependencies": { "@babel/traverse": "^7.1.0", - "@jest/environment": "^26.0.0-alpha.1", + "@jest/environment": "^26.0.0-alpha.2", "@jest/source-map": "^26.0.0-alpha.1", - "@jest/test-result": "^26.0.0-alpha.1", - "@jest/types": "^26.0.0-alpha.1", + "@jest/test-result": "^26.0.0-alpha.2", + "@jest/types": "^26.0.0-alpha.2", "chalk": "^4.0.0", "co": "^4.6.0", - "expect": "^26.0.0-alpha.1", + "expect": "^26.0.0-alpha.2", "is-generator-fn": "^2.0.0", - "jest-each": "^26.0.0-alpha.1", - "jest-matcher-utils": "^26.0.0-alpha.1", - "jest-message-util": "^26.0.0-alpha.1", - "jest-runtime": "^26.0.0-alpha.1", - "jest-snapshot": "^26.0.0-alpha.1", - "jest-util": "^26.0.0-alpha.1", - "pretty-format": "^26.0.0-alpha.1", + "jest-each": "^26.0.0-alpha.2", + "jest-matcher-utils": "^26.0.0-alpha.2", + "jest-message-util": "^26.0.0-alpha.2", + "jest-runtime": "^26.0.0-alpha.2", + "jest-snapshot": "^26.0.0-alpha.2", + "jest-util": "^26.0.0-alpha.2", + "pretty-format": "^26.0.0-alpha.2", "throat": "^5.0.0" }, "devDependencies": { diff --git a/packages/jest-leak-detector/package.json b/packages/jest-leak-detector/package.json index de6d1f8f90ce..73ebdec92817 100644 --- a/packages/jest-leak-detector/package.json +++ b/packages/jest-leak-detector/package.json @@ -1,6 +1,6 @@ { "name": "jest-leak-detector", - "version": "26.0.0-alpha.1", + "version": "26.0.0-alpha.2", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -11,7 +11,7 @@ "types": "build/index.d.ts", "dependencies": { "jest-get-type": "^26.0.0-alpha.0", - "pretty-format": "^26.0.0-alpha.1" + "pretty-format": "^26.0.0-alpha.2" }, "devDependencies": { "@types/weak-napi": "^1.0.0", diff --git a/packages/jest-matcher-utils/package.json b/packages/jest-matcher-utils/package.json index f6bb49e8fdac..da577526507b 100644 --- a/packages/jest-matcher-utils/package.json +++ b/packages/jest-matcher-utils/package.json @@ -1,7 +1,7 @@ { "name": "jest-matcher-utils", "description": "A set of utility functions for expect and related packages", - "version": "26.0.0-alpha.1", + "version": "26.0.0-alpha.2", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -15,9 +15,9 @@ "types": "build/index.d.ts", "dependencies": { "chalk": "^4.0.0", - "jest-diff": "^26.0.0-alpha.1", + "jest-diff": "^26.0.0-alpha.2", "jest-get-type": "^26.0.0-alpha.0", - "pretty-format": "^26.0.0-alpha.1" + "pretty-format": "^26.0.0-alpha.2" }, "devDependencies": { "@jest/test-utils": "^26.0.0-alpha.1", diff --git a/packages/jest-message-util/package.json b/packages/jest-message-util/package.json index ed2bd0331cd3..fc396992b475 100644 --- a/packages/jest-message-util/package.json +++ b/packages/jest-message-util/package.json @@ -1,6 +1,6 @@ { "name": "jest-message-util", - "version": "26.0.0-alpha.1", + "version": "26.0.0-alpha.2", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -14,7 +14,7 @@ "types": "build/index.d.ts", "dependencies": { "@babel/code-frame": "^7.0.0", - "@jest/types": "^26.0.0-alpha.1", + "@jest/types": "^26.0.0-alpha.2", "@types/stack-utils": "^1.0.1", "chalk": "^4.0.0", "graceful-fs": "^4.2.4", diff --git a/packages/jest-mock/package.json b/packages/jest-mock/package.json index fecdb1cab5ed..c18f9a4db92c 100644 --- a/packages/jest-mock/package.json +++ b/packages/jest-mock/package.json @@ -1,6 +1,6 @@ { "name": "jest-mock", - "version": "26.0.0-alpha.1", + "version": "26.0.0-alpha.2", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,7 +10,7 @@ "node": ">= 10.14.2" }, "dependencies": { - "@jest/types": "^26.0.0-alpha.1" + "@jest/types": "^26.0.0-alpha.2" }, "devDependencies": { "@types/node": "*" diff --git a/packages/jest-phabricator/package.json b/packages/jest-phabricator/package.json index 9d179fa38db7..d94728f4b8d9 100644 --- a/packages/jest-phabricator/package.json +++ b/packages/jest-phabricator/package.json @@ -1,6 +1,6 @@ { "name": "jest-phabricator", - "version": "26.0.0-alpha.1", + "version": "26.0.0-alpha.2", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -8,7 +8,7 @@ }, "types": "build/index.d.ts", "dependencies": { - "@jest/test-result": "^26.0.0-alpha.1" + "@jest/test-result": "^26.0.0-alpha.2" }, "engines": { "node": ">= 10.14.2" diff --git a/packages/jest-repl/package.json b/packages/jest-repl/package.json index b01ccbdbaadf..95d566e241ae 100644 --- a/packages/jest-repl/package.json +++ b/packages/jest-repl/package.json @@ -1,6 +1,6 @@ { "name": "jest-repl", - "version": "26.0.0-alpha.1", + "version": "26.0.0-alpha.2", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,11 +10,11 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/transform": "^26.0.0-alpha.1", - "@jest/types": "^26.0.0-alpha.1", - "jest-config": "^26.0.0-alpha.1", - "jest-runtime": "^26.0.0-alpha.1", - "jest-validate": "^26.0.0-alpha.1", + "@jest/transform": "^26.0.0-alpha.2", + "@jest/types": "^26.0.0-alpha.2", + "jest-config": "^26.0.0-alpha.2", + "jest-runtime": "^26.0.0-alpha.2", + "jest-validate": "^26.0.0-alpha.2", "repl": "^0.1.3", "yargs": "^15.3.1" }, diff --git a/packages/jest-reporters/package.json b/packages/jest-reporters/package.json index 16d24fa167ef..62e84b8b2232 100644 --- a/packages/jest-reporters/package.json +++ b/packages/jest-reporters/package.json @@ -1,15 +1,15 @@ { "name": "@jest/reporters", "description": "Jest's reporters", - "version": "26.0.0-alpha.1", + "version": "26.0.0-alpha.2", "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^26.0.0-alpha.1", - "@jest/test-result": "^26.0.0-alpha.1", - "@jest/transform": "^26.0.0-alpha.1", - "@jest/types": "^26.0.0-alpha.1", + "@jest/console": "^26.0.0-alpha.2", + "@jest/test-result": "^26.0.0-alpha.2", + "@jest/transform": "^26.0.0-alpha.2", + "@jest/types": "^26.0.0-alpha.2", "chalk": "^4.0.0", "collect-v8-coverage": "^1.0.0", "exit": "^0.1.2", @@ -20,9 +20,9 @@ "istanbul-lib-report": "^3.0.0", "istanbul-lib-source-maps": "^4.0.0", "istanbul-reports": "^3.0.2", - "jest-haste-map": "^26.0.0-alpha.1", - "jest-resolve": "^26.0.0-alpha.1", - "jest-util": "^26.0.0-alpha.1", + "jest-haste-map": "^26.0.0-alpha.2", + "jest-resolve": "^26.0.0-alpha.2", + "jest-util": "^26.0.0-alpha.2", "jest-worker": "^26.0.0-alpha.0", "slash": "^3.0.0", "source-map": "^0.6.0", diff --git a/packages/jest-resolve-dependencies/package.json b/packages/jest-resolve-dependencies/package.json index 16d816dc27c2..adc8c0b660f9 100644 --- a/packages/jest-resolve-dependencies/package.json +++ b/packages/jest-resolve-dependencies/package.json @@ -1,6 +1,6 @@ { "name": "jest-resolve-dependencies", - "version": "26.0.0-alpha.1", + "version": "26.0.0-alpha.2", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,14 +10,14 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/types": "^26.0.0-alpha.1", + "@jest/types": "^26.0.0-alpha.2", "jest-regex-util": "^26.0.0-alpha.1", - "jest-snapshot": "^26.0.0-alpha.1" + "jest-snapshot": "^26.0.0-alpha.2" }, "devDependencies": { - "jest-haste-map": "^26.0.0-alpha.1", - "jest-resolve": "^26.0.0-alpha.1", - "jest-runtime": "^26.0.0-alpha.1" + "jest-haste-map": "^26.0.0-alpha.2", + "jest-resolve": "^26.0.0-alpha.2", + "jest-runtime": "^26.0.0-alpha.2" }, "engines": { "node": ">= 10.14.2" diff --git a/packages/jest-resolve/package.json b/packages/jest-resolve/package.json index 58aaf35d89b6..cc3565da1810 100644 --- a/packages/jest-resolve/package.json +++ b/packages/jest-resolve/package.json @@ -1,6 +1,6 @@ { "name": "jest-resolve", - "version": "26.0.0-alpha.1", + "version": "26.0.0-alpha.2", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,11 +10,11 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/types": "^26.0.0-alpha.1", + "@jest/types": "^26.0.0-alpha.2", "chalk": "^4.0.0", "graceful-fs": "^4.2.4", "jest-pnp-resolver": "^1.2.1", - "jest-util": "^26.0.0-alpha.1", + "jest-util": "^26.0.0-alpha.2", "read-pkg-up": "^7.0.1", "resolve": "^1.17.0", "slash": "^3.0.0" @@ -22,7 +22,7 @@ "devDependencies": { "@types/graceful-fs": "^4.1.3", "@types/resolve": "^1.14.0", - "jest-haste-map": "^26.0.0-alpha.1" + "jest-haste-map": "^26.0.0-alpha.2" }, "engines": { "node": ">= 10.14.2" diff --git a/packages/jest-runner/package.json b/packages/jest-runner/package.json index e6824e7a49cc..bd204c529ce1 100644 --- a/packages/jest-runner/package.json +++ b/packages/jest-runner/package.json @@ -1,6 +1,6 @@ { "name": "jest-runner", - "version": "26.0.0-alpha.1", + "version": "26.0.0-alpha.2", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,22 +10,22 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/console": "^26.0.0-alpha.1", - "@jest/environment": "^26.0.0-alpha.1", - "@jest/test-result": "^26.0.0-alpha.1", - "@jest/types": "^26.0.0-alpha.1", + "@jest/console": "^26.0.0-alpha.2", + "@jest/environment": "^26.0.0-alpha.2", + "@jest/test-result": "^26.0.0-alpha.2", + "@jest/types": "^26.0.0-alpha.2", "chalk": "^4.0.0", "exit": "^0.1.2", "graceful-fs": "^4.2.4", - "jest-config": "^26.0.0-alpha.1", + "jest-config": "^26.0.0-alpha.2", "jest-docblock": "^26.0.0-alpha.0", - "jest-haste-map": "^26.0.0-alpha.1", - "jest-jasmine2": "^26.0.0-alpha.1", - "jest-leak-detector": "^26.0.0-alpha.1", - "jest-message-util": "^26.0.0-alpha.1", - "jest-resolve": "^26.0.0-alpha.1", - "jest-runtime": "^26.0.0-alpha.1", - "jest-util": "^26.0.0-alpha.1", + "jest-haste-map": "^26.0.0-alpha.2", + "jest-jasmine2": "^26.0.0-alpha.2", + "jest-leak-detector": "^26.0.0-alpha.2", + "jest-message-util": "^26.0.0-alpha.2", + "jest-resolve": "^26.0.0-alpha.2", + "jest-runtime": "^26.0.0-alpha.2", + "jest-util": "^26.0.0-alpha.2", "jest-worker": "^26.0.0-alpha.0", "source-map-support": "^0.5.6", "throat": "^5.0.0" @@ -35,7 +35,7 @@ "@types/graceful-fs": "^4.1.2", "@types/node": "*", "@types/source-map-support": "^0.5.0", - "jest-circus": "^26.0.0-alpha.1" + "jest-circus": "^26.0.0-alpha.2" }, "engines": { "node": ">= 10.14.2" diff --git a/packages/jest-runtime/package.json b/packages/jest-runtime/package.json index a7d82c95801f..cf453823b761 100644 --- a/packages/jest-runtime/package.json +++ b/packages/jest-runtime/package.json @@ -1,6 +1,6 @@ { "name": "jest-runtime", - "version": "26.0.0-alpha.1", + "version": "26.0.0-alpha.2", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,29 +10,29 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/console": "^26.0.0-alpha.1", - "@jest/environment": "^26.0.0-alpha.1", - "@jest/fake-timers": "^26.0.0-alpha.1", - "@jest/globals": "^26.0.0-alpha.1", + "@jest/console": "^26.0.0-alpha.2", + "@jest/environment": "^26.0.0-alpha.2", + "@jest/fake-timers": "^26.0.0-alpha.2", + "@jest/globals": "^26.0.0-alpha.2", "@jest/source-map": "^26.0.0-alpha.1", - "@jest/test-result": "^26.0.0-alpha.1", - "@jest/transform": "^26.0.0-alpha.1", - "@jest/types": "^26.0.0-alpha.1", + "@jest/test-result": "^26.0.0-alpha.2", + "@jest/transform": "^26.0.0-alpha.2", + "@jest/types": "^26.0.0-alpha.2", "@types/yargs": "^15.0.0", "chalk": "^4.0.0", "collect-v8-coverage": "^1.0.0", "exit": "^0.1.2", "glob": "^7.1.3", "graceful-fs": "^4.2.4", - "jest-config": "^26.0.0-alpha.1", - "jest-haste-map": "^26.0.0-alpha.1", - "jest-message-util": "^26.0.0-alpha.1", - "jest-mock": "^26.0.0-alpha.1", + "jest-config": "^26.0.0-alpha.2", + "jest-haste-map": "^26.0.0-alpha.2", + "jest-message-util": "^26.0.0-alpha.2", + "jest-mock": "^26.0.0-alpha.2", "jest-regex-util": "^26.0.0-alpha.1", - "jest-resolve": "^26.0.0-alpha.1", - "jest-snapshot": "^26.0.0-alpha.1", - "jest-util": "^26.0.0-alpha.1", - "jest-validate": "^26.0.0-alpha.1", + "jest-resolve": "^26.0.0-alpha.2", + "jest-snapshot": "^26.0.0-alpha.2", + "jest-util": "^26.0.0-alpha.2", + "jest-validate": "^26.0.0-alpha.2", "slash": "^3.0.0", "strip-bom": "^4.0.0", "yargs": "^15.3.1" @@ -43,7 +43,7 @@ "@types/glob": "^7.1.1", "@types/graceful-fs": "^4.1.2", "execa": "^4.0.0", - "jest-environment-node": "^26.0.0-alpha.1", + "jest-environment-node": "^26.0.0-alpha.2", "jest-snapshot-serializer-raw": "^1.1.0" }, "bin": "./bin/jest-runtime.js", diff --git a/packages/jest-snapshot/package.json b/packages/jest-snapshot/package.json index cf9fa8eccb4d..88eac9d47f79 100644 --- a/packages/jest-snapshot/package.json +++ b/packages/jest-snapshot/package.json @@ -1,6 +1,6 @@ { "name": "jest-snapshot", - "version": "26.0.0-alpha.1", + "version": "26.0.0-alpha.2", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -11,19 +11,19 @@ "types": "build/index.d.ts", "dependencies": { "@babel/types": "^7.0.0", - "@jest/types": "^26.0.0-alpha.1", + "@jest/types": "^26.0.0-alpha.2", "@types/prettier": "^2.0.0", "chalk": "^4.0.0", - "expect": "^26.0.0-alpha.1", + "expect": "^26.0.0-alpha.2", "graceful-fs": "^4.2.4", - "jest-diff": "^26.0.0-alpha.1", + "jest-diff": "^26.0.0-alpha.2", "jest-get-type": "^26.0.0-alpha.0", - "jest-matcher-utils": "^26.0.0-alpha.1", - "jest-message-util": "^26.0.0-alpha.1", - "jest-resolve": "^26.0.0-alpha.1", + "jest-matcher-utils": "^26.0.0-alpha.2", + "jest-message-util": "^26.0.0-alpha.2", + "jest-resolve": "^26.0.0-alpha.2", "make-dir": "^3.0.0", "natural-compare": "^1.4.0", - "pretty-format": "^26.0.0-alpha.1", + "pretty-format": "^26.0.0-alpha.2", "semver": "^7.3.2" }, "devDependencies": { @@ -33,7 +33,7 @@ "@types/semver": "^7.1.0", "ansi-regex": "^5.0.0", "ansi-styles": "^4.2.0", - "jest-haste-map": "^26.0.0-alpha.1", + "jest-haste-map": "^26.0.0-alpha.2", "prettier": "^1.19.1" }, "engines": { diff --git a/packages/jest-test-result/package.json b/packages/jest-test-result/package.json index 3653fcbacda3..093da8add640 100644 --- a/packages/jest-test-result/package.json +++ b/packages/jest-test-result/package.json @@ -1,6 +1,6 @@ { "name": "@jest/test-result", - "version": "26.0.0-alpha.1", + "version": "26.0.0-alpha.2", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,8 +10,8 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/console": "^26.0.0-alpha.1", - "@jest/types": "^26.0.0-alpha.1", + "@jest/console": "^26.0.0-alpha.2", + "@jest/types": "^26.0.0-alpha.2", "@types/istanbul-lib-coverage": "^2.0.0", "collect-v8-coverage": "^1.0.0" }, diff --git a/packages/jest-test-sequencer/package.json b/packages/jest-test-sequencer/package.json index e2c9baed9063..c9b27c2fa5f0 100644 --- a/packages/jest-test-sequencer/package.json +++ b/packages/jest-test-sequencer/package.json @@ -1,6 +1,6 @@ { "name": "@jest/test-sequencer", - "version": "26.0.0-alpha.1", + "version": "26.0.0-alpha.2", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,11 +10,11 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/test-result": "^26.0.0-alpha.1", + "@jest/test-result": "^26.0.0-alpha.2", "graceful-fs": "^4.2.4", - "jest-haste-map": "^26.0.0-alpha.1", - "jest-runner": "^26.0.0-alpha.1", - "jest-runtime": "^26.0.0-alpha.1" + "jest-haste-map": "^26.0.0-alpha.2", + "jest-runner": "^26.0.0-alpha.2", + "jest-runtime": "^26.0.0-alpha.2" }, "devDependencies": { "@types/graceful-fs": "^4.1.3" diff --git a/packages/jest-transform/package.json b/packages/jest-transform/package.json index 4733a1d38a38..7f4fdfb354fd 100644 --- a/packages/jest-transform/package.json +++ b/packages/jest-transform/package.json @@ -1,6 +1,6 @@ { "name": "@jest/transform", - "version": "26.0.0-alpha.1", + "version": "26.0.0-alpha.2", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -11,15 +11,15 @@ "types": "build/index.d.ts", "dependencies": { "@babel/core": "^7.1.0", - "@jest/types": "^26.0.0-alpha.1", + "@jest/types": "^26.0.0-alpha.2", "babel-plugin-istanbul": "^6.0.0", "chalk": "^4.0.0", "convert-source-map": "^1.4.0", "fast-json-stable-stringify": "^2.0.0", "graceful-fs": "^4.2.4", - "jest-haste-map": "^26.0.0-alpha.1", + "jest-haste-map": "^26.0.0-alpha.2", "jest-regex-util": "^26.0.0-alpha.1", - "jest-util": "^26.0.0-alpha.1", + "jest-util": "^26.0.0-alpha.2", "micromatch": "^4.0.2", "pirates": "^4.0.1", "slash": "^3.0.0", diff --git a/packages/jest-types/package.json b/packages/jest-types/package.json index 5889870c038c..f55f677ae736 100644 --- a/packages/jest-types/package.json +++ b/packages/jest-types/package.json @@ -1,6 +1,6 @@ { "name": "@jest/types", - "version": "26.0.0-alpha.1", + "version": "26.0.0-alpha.2", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", diff --git a/packages/jest-util/package.json b/packages/jest-util/package.json index de209beec385..a0f8fb15a3a9 100644 --- a/packages/jest-util/package.json +++ b/packages/jest-util/package.json @@ -1,6 +1,6 @@ { "name": "jest-util", - "version": "26.0.0-alpha.1", + "version": "26.0.0-alpha.2", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,7 +10,7 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/types": "^26.0.0-alpha.1", + "@jest/types": "^26.0.0-alpha.2", "chalk": "^4.0.0", "graceful-fs": "^4.2.4", "is-ci": "^2.0.0", diff --git a/packages/jest-validate/package.json b/packages/jest-validate/package.json index 5b65cdda73bc..978b53bd2574 100644 --- a/packages/jest-validate/package.json +++ b/packages/jest-validate/package.json @@ -1,6 +1,6 @@ { "name": "jest-validate", - "version": "26.0.0-alpha.1", + "version": "26.0.0-alpha.2", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,12 +10,12 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/types": "^26.0.0-alpha.1", + "@jest/types": "^26.0.0-alpha.2", "camelcase": "^6.0.0", "chalk": "^4.0.0", "jest-get-type": "^26.0.0-alpha.0", "leven": "^3.1.0", - "pretty-format": "^26.0.0-alpha.1" + "pretty-format": "^26.0.0-alpha.2" }, "devDependencies": { "@types/yargs": "^15.0.3" diff --git a/packages/jest-watcher/package.json b/packages/jest-watcher/package.json index 882897c4f850..3147a547d153 100644 --- a/packages/jest-watcher/package.json +++ b/packages/jest-watcher/package.json @@ -1,15 +1,15 @@ { "name": "jest-watcher", "description": "Delightful JavaScript Testing.", - "version": "26.0.0-alpha.1", + "version": "26.0.0-alpha.2", "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/test-result": "^26.0.0-alpha.1", - "@jest/types": "^26.0.0-alpha.1", + "@jest/test-result": "^26.0.0-alpha.2", + "@jest/types": "^26.0.0-alpha.2", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", - "jest-util": "^26.0.0-alpha.1", + "jest-util": "^26.0.0-alpha.2", "string-length": "^4.0.1" }, "devDependencies": { diff --git a/packages/jest/package.json b/packages/jest/package.json index 88122e96726c..1db3b7d54cae 100644 --- a/packages/jest/package.json +++ b/packages/jest/package.json @@ -1,13 +1,13 @@ { "name": "jest", "description": "Delightful JavaScript Testing.", - "version": "26.0.0-alpha.1", + "version": "26.0.0-alpha.2", "main": "build/jest.js", "types": "build/jest.d.ts", "dependencies": { - "@jest/core": "^26.0.0-alpha.1", + "@jest/core": "^26.0.0-alpha.2", "import-local": "^3.0.2", - "jest-cli": "^26.0.0-alpha.1" + "jest-cli": "^26.0.0-alpha.2" }, "bin": "./bin/jest.js", "engines": { diff --git a/packages/pretty-format/package.json b/packages/pretty-format/package.json index c904b401c97c..d531959f2ff7 100644 --- a/packages/pretty-format/package.json +++ b/packages/pretty-format/package.json @@ -1,6 +1,6 @@ { "name": "pretty-format", - "version": "26.0.0-alpha.1", + "version": "26.0.0-alpha.2", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -12,7 +12,7 @@ "types": "build/index.d.ts", "author": "James Kyle ", "dependencies": { - "@jest/types": "^26.0.0-alpha.1", + "@jest/types": "^26.0.0-alpha.2", "ansi-regex": "^5.0.0", "ansi-styles": "^4.0.0", "react-is": "^16.12.0" From 075854a08360c40f32b1f1da8db4fa61eea7c045 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Mon, 4 May 2020 19:44:29 +0200 Subject: [PATCH 075/106] chore: update changelog for release --- CHANGELOG.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 444fdcfdcaf6..aae17a1fc652 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,16 @@ ### Features +### Fixes + +### Chore & Maintenance + +### Performance + +## 26.0.0 + +### Features + - `[jest-environment-jsdom]` [**BREAKING**] Upgrade `jsdom` to v16 ([#9606](https://github.com/facebook/jest/pull/9606)) - `[@jest/fake-timers]` Add possibility to use a modern implementation of fake timers, backed by `@sinonjs/fake-timers` ([#7776](https://github.com/facebook/jest/pull/7776)) - `[jest-runtime]` Add `createMockFromModule` as an alias for `genMockFromModule` ([#9962](https://github.com/facebook/jest/pull/9962)) @@ -33,8 +43,6 @@ - `[jest-haste-map]` [**BREAKING**] removed `providesModuleNodeModules` ([#8535](https://github.com/facebook/jest/pull/8535)) - `[jest-runtime]` [**BREAKING**] Remove long-deprecated `require.requireActual` and `require.requireMock` methods ([#9854](https://github.com/facebook/jest/pull/9854)) -### Performance - ## 25.5.4 ### Fixes From 343532a21f640ac2709c4076eef57e52279542e1 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Mon, 4 May 2020 19:52:47 +0200 Subject: [PATCH 076/106] v26.0.0 --- lerna.json | 2 +- packages/babel-jest/package.json | 8 ++-- packages/babel-plugin-jest-hoist/package.json | 2 +- packages/babel-preset-jest/package.json | 4 +- packages/diff-sequences/package.json | 2 +- packages/eslint-config-fb-strict/package.json | 2 +- packages/expect/package.json | 14 +++---- packages/jest-changed-files/package.json | 4 +- packages/jest-circus/package.json | 26 ++++++------ packages/jest-cli/package.json | 16 ++++---- packages/jest-config/package.json | 26 ++++++------ packages/jest-console/package.json | 8 ++-- packages/jest-core/package.json | 40 +++++++++---------- packages/jest-diff/package.json | 10 ++--- packages/jest-docblock/package.json | 2 +- packages/jest-each/package.json | 10 ++--- packages/jest-environment-jsdom/package.json | 12 +++--- packages/jest-environment-node/package.json | 12 +++--- packages/jest-environment/package.json | 8 ++-- packages/jest-fake-timers/package.json | 10 ++--- packages/jest-get-type/package.json | 2 +- packages/jest-globals/package.json | 8 ++-- packages/jest-haste-map/package.json | 12 +++--- packages/jest-jasmine2/package.json | 26 ++++++------ packages/jest-leak-detector/package.json | 6 +-- packages/jest-matcher-utils/package.json | 10 ++--- packages/jest-message-util/package.json | 4 +- packages/jest-mock/package.json | 4 +- packages/jest-phabricator/package.json | 4 +- packages/jest-regex-util/package.json | 2 +- packages/jest-repl/package.json | 14 +++---- packages/jest-reporters/package.json | 18 ++++----- .../jest-resolve-dependencies/package.json | 14 +++---- packages/jest-resolve/package.json | 8 ++-- packages/jest-runner/package.json | 32 +++++++-------- packages/jest-runtime/package.json | 40 +++++++++---------- packages/jest-serializer/package.json | 2 +- packages/jest-snapshot/package.json | 20 +++++----- packages/jest-source-map/package.json | 2 +- packages/jest-test-result/package.json | 6 +-- packages/jest-test-sequencer/package.json | 10 ++--- packages/jest-transform/package.json | 10 ++--- packages/jest-types/package.json | 2 +- packages/jest-util/package.json | 4 +- packages/jest-validate/package.json | 8 ++-- packages/jest-watcher/package.json | 8 ++-- packages/jest-worker/package.json | 2 +- packages/jest/package.json | 6 +-- packages/pretty-format/package.json | 4 +- packages/test-utils/package.json | 2 +- 50 files changed, 254 insertions(+), 254 deletions(-) diff --git a/lerna.json b/lerna.json index 11d1f82275fa..fd74432fb99d 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "26.0.0-alpha.2", + "version": "26.0.0", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/babel-jest/package.json b/packages/babel-jest/package.json index 1d0a23791548..d674e54b5bc6 100644 --- a/packages/babel-jest/package.json +++ b/packages/babel-jest/package.json @@ -1,7 +1,7 @@ { "name": "babel-jest", "description": "Jest plugin to use babel for transformation.", - "version": "26.0.0-alpha.2", + "version": "26.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -11,11 +11,11 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/transform": "^26.0.0-alpha.2", - "@jest/types": "^26.0.0-alpha.2", + "@jest/transform": "^26.0.0", + "@jest/types": "^26.0.0", "@types/babel__core": "^7.1.7", "babel-plugin-istanbul": "^6.0.0", - "babel-preset-jest": "^26.0.0-alpha.0", + "babel-preset-jest": "^26.0.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.4", "slash": "^3.0.0" diff --git a/packages/babel-plugin-jest-hoist/package.json b/packages/babel-plugin-jest-hoist/package.json index b4ed92dfc9f3..1ff249bfe8ec 100644 --- a/packages/babel-plugin-jest-hoist/package.json +++ b/packages/babel-plugin-jest-hoist/package.json @@ -1,6 +1,6 @@ { "name": "babel-plugin-jest-hoist", - "version": "26.0.0-alpha.0", + "version": "26.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", diff --git a/packages/babel-preset-jest/package.json b/packages/babel-preset-jest/package.json index cffdb9b65a96..c0ab101f6d72 100644 --- a/packages/babel-preset-jest/package.json +++ b/packages/babel-preset-jest/package.json @@ -1,6 +1,6 @@ { "name": "babel-preset-jest", - "version": "26.0.0-alpha.0", + "version": "26.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -9,7 +9,7 @@ "license": "MIT", "main": "index.js", "dependencies": { - "babel-plugin-jest-hoist": "^26.0.0-alpha.0", + "babel-plugin-jest-hoist": "^26.0.0", "babel-preset-current-node-syntax": "^0.1.2" }, "peerDependencies": { diff --git a/packages/diff-sequences/package.json b/packages/diff-sequences/package.json index 8404453610b6..26ca9704e9ec 100644 --- a/packages/diff-sequences/package.json +++ b/packages/diff-sequences/package.json @@ -1,6 +1,6 @@ { "name": "diff-sequences", - "version": "26.0.0-alpha.0", + "version": "26.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", diff --git a/packages/eslint-config-fb-strict/package.json b/packages/eslint-config-fb-strict/package.json index 6bba3cbe8e32..ced29f6867ef 100644 --- a/packages/eslint-config-fb-strict/package.json +++ b/packages/eslint-config-fb-strict/package.json @@ -1,6 +1,6 @@ { "name": "eslint-config-fb-strict", - "version": "26.0.0-alpha.0", + "version": "26.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", diff --git a/packages/expect/package.json b/packages/expect/package.json index 70dac1e52c0a..0962bcc4fddb 100644 --- a/packages/expect/package.json +++ b/packages/expect/package.json @@ -1,6 +1,6 @@ { "name": "expect", - "version": "26.0.0-alpha.2", + "version": "26.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,15 +10,15 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/types": "^26.0.0-alpha.2", + "@jest/types": "^26.0.0", "ansi-styles": "^4.0.0", - "jest-get-type": "^26.0.0-alpha.0", - "jest-matcher-utils": "^26.0.0-alpha.2", - "jest-message-util": "^26.0.0-alpha.2", - "jest-regex-util": "^26.0.0-alpha.1" + "jest-get-type": "^26.0.0", + "jest-matcher-utils": "^26.0.0", + "jest-message-util": "^26.0.0", + "jest-regex-util": "^26.0.0" }, "devDependencies": { - "@jest/test-utils": "^26.0.0-alpha.1", + "@jest/test-utils": "^26.0.0", "chalk": "^4.0.0", "fast-check": "^1.13.0", "immutable": "^4.0.0-rc.12" diff --git a/packages/jest-changed-files/package.json b/packages/jest-changed-files/package.json index 10369ed9cf62..d67a900fdb51 100644 --- a/packages/jest-changed-files/package.json +++ b/packages/jest-changed-files/package.json @@ -1,6 +1,6 @@ { "name": "jest-changed-files", - "version": "26.0.0-alpha.2", + "version": "26.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,7 +10,7 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/types": "^26.0.0-alpha.2", + "@jest/types": "^26.0.0", "execa": "^4.0.0", "throat": "^5.0.0" }, diff --git a/packages/jest-circus/package.json b/packages/jest-circus/package.json index df0dbf246d21..d80e1ab6951d 100644 --- a/packages/jest-circus/package.json +++ b/packages/jest-circus/package.json @@ -1,6 +1,6 @@ { "name": "jest-circus", - "version": "26.0.0-alpha.2", + "version": "26.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -11,28 +11,28 @@ "types": "build/index.d.ts", "dependencies": { "@babel/traverse": "^7.1.0", - "@jest/environment": "^26.0.0-alpha.2", - "@jest/test-result": "^26.0.0-alpha.2", - "@jest/types": "^26.0.0-alpha.2", + "@jest/environment": "^26.0.0", + "@jest/test-result": "^26.0.0", + "@jest/types": "^26.0.0", "chalk": "^4.0.0", "co": "^4.6.0", "dedent": "^0.7.0", - "expect": "^26.0.0-alpha.2", + "expect": "^26.0.0", "is-generator-fn": "^2.0.0", - "jest-each": "^26.0.0-alpha.2", - "jest-matcher-utils": "^26.0.0-alpha.2", - "jest-message-util": "^26.0.0-alpha.2", - "jest-runtime": "^26.0.0-alpha.2", - "jest-snapshot": "^26.0.0-alpha.2", - "jest-util": "^26.0.0-alpha.2", - "pretty-format": "^26.0.0-alpha.2", + "jest-each": "^26.0.0", + "jest-matcher-utils": "^26.0.0", + "jest-message-util": "^26.0.0", + "jest-runtime": "^26.0.0", + "jest-snapshot": "^26.0.0", + "jest-util": "^26.0.0", + "pretty-format": "^26.0.0", "stack-utils": "^2.0.2", "throat": "^5.0.0" }, "devDependencies": { "@babel/core": "^7.1.0", "@babel/register": "^7.0.0", - "@jest/test-utils": "^26.0.0-alpha.1", + "@jest/test-utils": "^26.0.0", "@types/babel__traverse": "^7.0.4", "@types/co": "^4.6.0", "@types/dedent": "^0.7.0", diff --git a/packages/jest-cli/package.json b/packages/jest-cli/package.json index c77b62229427..a36003ceb06c 100644 --- a/packages/jest-cli/package.json +++ b/packages/jest-cli/package.json @@ -1,26 +1,26 @@ { "name": "jest-cli", "description": "Delightful JavaScript Testing.", - "version": "26.0.0-alpha.2", + "version": "26.0.0", "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/core": "^26.0.0-alpha.2", - "@jest/test-result": "^26.0.0-alpha.2", - "@jest/types": "^26.0.0-alpha.2", + "@jest/core": "^26.0.0", + "@jest/test-result": "^26.0.0", + "@jest/types": "^26.0.0", "chalk": "^4.0.0", "exit": "^0.1.2", "graceful-fs": "^4.2.4", "import-local": "^3.0.2", "is-ci": "^2.0.0", - "jest-config": "^26.0.0-alpha.2", - "jest-util": "^26.0.0-alpha.2", - "jest-validate": "^26.0.0-alpha.2", + "jest-config": "^26.0.0", + "jest-util": "^26.0.0", + "jest-validate": "^26.0.0", "prompts": "^2.0.1", "yargs": "^15.3.1" }, "devDependencies": { - "@jest/test-utils": "^26.0.0-alpha.1", + "@jest/test-utils": "^26.0.0", "@types/exit": "^0.1.30", "@types/graceful-fs": "^4.1.3", "@types/is-ci": "^2.0.0", diff --git a/packages/jest-config/package.json b/packages/jest-config/package.json index 0e2227910c61..75a00739678a 100644 --- a/packages/jest-config/package.json +++ b/packages/jest-config/package.json @@ -1,6 +1,6 @@ { "name": "jest-config", - "version": "26.0.0-alpha.2", + "version": "26.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -11,23 +11,23 @@ "types": "build/index.d.ts", "dependencies": { "@babel/core": "^7.1.0", - "@jest/test-sequencer": "^26.0.0-alpha.2", - "@jest/types": "^26.0.0-alpha.2", - "babel-jest": "^26.0.0-alpha.2", + "@jest/test-sequencer": "^26.0.0", + "@jest/types": "^26.0.0", + "babel-jest": "^26.0.0", "chalk": "^4.0.0", "deepmerge": "^4.2.2", "glob": "^7.1.1", "graceful-fs": "^4.2.4", - "jest-environment-jsdom": "^26.0.0-alpha.2", - "jest-environment-node": "^26.0.0-alpha.2", - "jest-get-type": "^26.0.0-alpha.0", - "jest-jasmine2": "^26.0.0-alpha.2", - "jest-regex-util": "^26.0.0-alpha.1", - "jest-resolve": "^26.0.0-alpha.2", - "jest-util": "^26.0.0-alpha.2", - "jest-validate": "^26.0.0-alpha.2", + "jest-environment-jsdom": "^26.0.0", + "jest-environment-node": "^26.0.0", + "jest-get-type": "^26.0.0", + "jest-jasmine2": "^26.0.0", + "jest-regex-util": "^26.0.0", + "jest-resolve": "^26.0.0", + "jest-util": "^26.0.0", + "jest-validate": "^26.0.0", "micromatch": "^4.0.2", - "pretty-format": "^26.0.0-alpha.2" + "pretty-format": "^26.0.0" }, "devDependencies": { "@types/babel__core": "^7.0.4", diff --git a/packages/jest-console/package.json b/packages/jest-console/package.json index 78f2305c53ea..13ef31ab900a 100644 --- a/packages/jest-console/package.json +++ b/packages/jest-console/package.json @@ -1,6 +1,6 @@ { "name": "@jest/console", - "version": "26.0.0-alpha.2", + "version": "26.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,10 +10,10 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/types": "^26.0.0-alpha.2", + "@jest/types": "^26.0.0", "chalk": "^4.0.0", - "jest-message-util": "^26.0.0-alpha.2", - "jest-util": "^26.0.0-alpha.2", + "jest-message-util": "^26.0.0", + "jest-util": "^26.0.0", "slash": "^3.0.0" }, "devDependencies": { diff --git a/packages/jest-core/package.json b/packages/jest-core/package.json index bce135c92439..f0973a45cbaf 100644 --- a/packages/jest-core/package.json +++ b/packages/jest-core/package.json @@ -1,32 +1,32 @@ { "name": "@jest/core", "description": "Delightful JavaScript Testing.", - "version": "26.0.0-alpha.2", + "version": "26.0.0", "main": "build/jest.js", "types": "build/jest.d.ts", "dependencies": { - "@jest/console": "^26.0.0-alpha.2", - "@jest/reporters": "^26.0.0-alpha.2", - "@jest/test-result": "^26.0.0-alpha.2", - "@jest/transform": "^26.0.0-alpha.2", - "@jest/types": "^26.0.0-alpha.2", + "@jest/console": "^26.0.0", + "@jest/reporters": "^26.0.0", + "@jest/test-result": "^26.0.0", + "@jest/transform": "^26.0.0", + "@jest/types": "^26.0.0", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", "exit": "^0.1.2", "graceful-fs": "^4.2.4", - "jest-changed-files": "^26.0.0-alpha.2", - "jest-config": "^26.0.0-alpha.2", - "jest-haste-map": "^26.0.0-alpha.2", - "jest-message-util": "^26.0.0-alpha.2", - "jest-regex-util": "^26.0.0-alpha.1", - "jest-resolve": "^26.0.0-alpha.2", - "jest-resolve-dependencies": "^26.0.0-alpha.2", - "jest-runner": "^26.0.0-alpha.2", - "jest-runtime": "^26.0.0-alpha.2", - "jest-snapshot": "^26.0.0-alpha.2", - "jest-util": "^26.0.0-alpha.2", - "jest-validate": "^26.0.0-alpha.2", - "jest-watcher": "^26.0.0-alpha.2", + "jest-changed-files": "^26.0.0", + "jest-config": "^26.0.0", + "jest-haste-map": "^26.0.0", + "jest-message-util": "^26.0.0", + "jest-regex-util": "^26.0.0", + "jest-resolve": "^26.0.0", + "jest-resolve-dependencies": "^26.0.0", + "jest-runner": "^26.0.0", + "jest-runtime": "^26.0.0", + "jest-snapshot": "^26.0.0", + "jest-util": "^26.0.0", + "jest-validate": "^26.0.0", + "jest-watcher": "^26.0.0", "micromatch": "^4.0.2", "p-each-series": "^2.1.0", "rimraf": "^3.0.0", @@ -34,7 +34,7 @@ "strip-ansi": "^6.0.0" }, "devDependencies": { - "@jest/test-sequencer": "^26.0.0-alpha.2", + "@jest/test-sequencer": "^26.0.0", "@types/exit": "^0.1.30", "@types/graceful-fs": "^4.1.2", "@types/micromatch": "^4.0.0", diff --git a/packages/jest-diff/package.json b/packages/jest-diff/package.json index 502c0015c06b..fa0b79a76ec8 100644 --- a/packages/jest-diff/package.json +++ b/packages/jest-diff/package.json @@ -1,6 +1,6 @@ { "name": "jest-diff", - "version": "26.0.0-alpha.2", + "version": "26.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -11,12 +11,12 @@ "types": "build/index.d.ts", "dependencies": { "chalk": "^4.0.0", - "diff-sequences": "^26.0.0-alpha.0", - "jest-get-type": "^26.0.0-alpha.0", - "pretty-format": "^26.0.0-alpha.2" + "diff-sequences": "^26.0.0", + "jest-get-type": "^26.0.0", + "pretty-format": "^26.0.0" }, "devDependencies": { - "@jest/test-utils": "^26.0.0-alpha.1", + "@jest/test-utils": "^26.0.0", "strip-ansi": "^6.0.0" }, "engines": { diff --git a/packages/jest-docblock/package.json b/packages/jest-docblock/package.json index 06bea1a2cf1d..49bb6d46c723 100644 --- a/packages/jest-docblock/package.json +++ b/packages/jest-docblock/package.json @@ -1,6 +1,6 @@ { "name": "jest-docblock", - "version": "26.0.0-alpha.0", + "version": "26.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", diff --git a/packages/jest-each/package.json b/packages/jest-each/package.json index 0be5fa1fcbe1..40d936e3e29c 100644 --- a/packages/jest-each/package.json +++ b/packages/jest-each/package.json @@ -1,6 +1,6 @@ { "name": "jest-each", - "version": "26.0.0-alpha.2", + "version": "26.0.0", "description": "Parameterised tests for Jest", "main": "build/index.js", "types": "build/index.d.ts", @@ -18,11 +18,11 @@ "author": "Matt Phillips (mattphillips)", "license": "MIT", "dependencies": { - "@jest/types": "^26.0.0-alpha.2", + "@jest/types": "^26.0.0", "chalk": "^4.0.0", - "jest-get-type": "^26.0.0-alpha.0", - "jest-util": "^26.0.0-alpha.2", - "pretty-format": "^26.0.0-alpha.2" + "jest-get-type": "^26.0.0", + "jest-util": "^26.0.0", + "pretty-format": "^26.0.0" }, "engines": { "node": ">= 10.14.2" diff --git a/packages/jest-environment-jsdom/package.json b/packages/jest-environment-jsdom/package.json index 411bbfbdbe6f..ab98679c8e2a 100644 --- a/packages/jest-environment-jsdom/package.json +++ b/packages/jest-environment-jsdom/package.json @@ -1,6 +1,6 @@ { "name": "jest-environment-jsdom", - "version": "26.0.0-alpha.2", + "version": "26.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,11 +10,11 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/environment": "^26.0.0-alpha.2", - "@jest/fake-timers": "^26.0.0-alpha.2", - "@jest/types": "^26.0.0-alpha.2", - "jest-mock": "^26.0.0-alpha.2", - "jest-util": "^26.0.0-alpha.2", + "@jest/environment": "^26.0.0", + "@jest/fake-timers": "^26.0.0", + "@jest/types": "^26.0.0", + "jest-mock": "^26.0.0", + "jest-util": "^26.0.0", "jsdom": "^16.2.2" }, "devDependencies": { diff --git a/packages/jest-environment-node/package.json b/packages/jest-environment-node/package.json index 1b4ba69c159d..364dc20f81ab 100644 --- a/packages/jest-environment-node/package.json +++ b/packages/jest-environment-node/package.json @@ -1,6 +1,6 @@ { "name": "jest-environment-node", - "version": "26.0.0-alpha.2", + "version": "26.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,11 +10,11 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/environment": "^26.0.0-alpha.2", - "@jest/fake-timers": "^26.0.0-alpha.2", - "@jest/types": "^26.0.0-alpha.2", - "jest-mock": "^26.0.0-alpha.2", - "jest-util": "^26.0.0-alpha.2" + "@jest/environment": "^26.0.0", + "@jest/fake-timers": "^26.0.0", + "@jest/types": "^26.0.0", + "jest-mock": "^26.0.0", + "jest-util": "^26.0.0" }, "engines": { "node": ">= 10.14.2" diff --git a/packages/jest-environment/package.json b/packages/jest-environment/package.json index 5ac8c7bcbdc8..a0bf45d5c13d 100644 --- a/packages/jest-environment/package.json +++ b/packages/jest-environment/package.json @@ -1,6 +1,6 @@ { "name": "@jest/environment", - "version": "26.0.0-alpha.2", + "version": "26.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,9 +10,9 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/fake-timers": "^26.0.0-alpha.2", - "@jest/types": "^26.0.0-alpha.2", - "jest-mock": "^26.0.0-alpha.2" + "@jest/fake-timers": "^26.0.0", + "@jest/types": "^26.0.0", + "jest-mock": "^26.0.0" }, "devDependencies": { "@types/node": "*" diff --git a/packages/jest-fake-timers/package.json b/packages/jest-fake-timers/package.json index 4b44efb7bc69..1f4d96161c4f 100644 --- a/packages/jest-fake-timers/package.json +++ b/packages/jest-fake-timers/package.json @@ -1,6 +1,6 @@ { "name": "@jest/fake-timers", - "version": "26.0.0-alpha.2", + "version": "26.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,11 +10,11 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/types": "^26.0.0-alpha.2", + "@jest/types": "^26.0.0", "@sinonjs/fake-timers": "^6.0.1", - "jest-message-util": "^26.0.0-alpha.2", - "jest-mock": "^26.0.0-alpha.2", - "jest-util": "^26.0.0-alpha.2" + "jest-message-util": "^26.0.0", + "jest-mock": "^26.0.0", + "jest-util": "^26.0.0" }, "devDependencies": { "@types/node": "*", diff --git a/packages/jest-get-type/package.json b/packages/jest-get-type/package.json index d5174f8d465b..85e5a4b7ee2b 100644 --- a/packages/jest-get-type/package.json +++ b/packages/jest-get-type/package.json @@ -1,7 +1,7 @@ { "name": "jest-get-type", "description": "A utility function to get the type of a value", - "version": "26.0.0-alpha.0", + "version": "26.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", diff --git a/packages/jest-globals/package.json b/packages/jest-globals/package.json index ccd3b5ac355c..2c1b1626f7ab 100644 --- a/packages/jest-globals/package.json +++ b/packages/jest-globals/package.json @@ -1,6 +1,6 @@ { "name": "@jest/globals", - "version": "26.0.0-alpha.2", + "version": "26.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -13,9 +13,9 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/environment": "^26.0.0-alpha.2", - "@jest/types": "^26.0.0-alpha.2", - "expect": "^26.0.0-alpha.2" + "@jest/environment": "^26.0.0", + "@jest/types": "^26.0.0", + "expect": "^26.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-haste-map/package.json b/packages/jest-haste-map/package.json index f71cb76c2025..47167632ce8a 100644 --- a/packages/jest-haste-map/package.json +++ b/packages/jest-haste-map/package.json @@ -1,6 +1,6 @@ { "name": "jest-haste-map", - "version": "26.0.0-alpha.2", + "version": "26.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,21 +10,21 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/types": "^26.0.0-alpha.2", + "@jest/types": "^26.0.0", "@types/graceful-fs": "^4.1.2", "anymatch": "^3.0.3", "fb-watchman": "^2.0.0", "graceful-fs": "^4.2.4", - "jest-serializer": "^26.0.0-alpha.0", - "jest-util": "^26.0.0-alpha.2", - "jest-worker": "^26.0.0-alpha.0", + "jest-serializer": "^26.0.0", + "jest-util": "^26.0.0", + "jest-worker": "^26.0.0", "micromatch": "^4.0.2", "sane": "^4.0.3", "walker": "^1.0.7", "which": "^2.0.2" }, "devDependencies": { - "@jest/test-utils": "^26.0.0-alpha.1", + "@jest/test-utils": "^26.0.0", "@types/anymatch": "^1.3.1", "@types/fb-watchman": "^2.0.0", "@types/micromatch": "^4.0.0", diff --git a/packages/jest-jasmine2/package.json b/packages/jest-jasmine2/package.json index bdd96b952c9c..59b7e8580508 100644 --- a/packages/jest-jasmine2/package.json +++ b/packages/jest-jasmine2/package.json @@ -1,6 +1,6 @@ { "name": "jest-jasmine2", - "version": "26.0.0-alpha.2", + "version": "26.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -11,21 +11,21 @@ "types": "build/index.d.ts", "dependencies": { "@babel/traverse": "^7.1.0", - "@jest/environment": "^26.0.0-alpha.2", - "@jest/source-map": "^26.0.0-alpha.1", - "@jest/test-result": "^26.0.0-alpha.2", - "@jest/types": "^26.0.0-alpha.2", + "@jest/environment": "^26.0.0", + "@jest/source-map": "^26.0.0", + "@jest/test-result": "^26.0.0", + "@jest/types": "^26.0.0", "chalk": "^4.0.0", "co": "^4.6.0", - "expect": "^26.0.0-alpha.2", + "expect": "^26.0.0", "is-generator-fn": "^2.0.0", - "jest-each": "^26.0.0-alpha.2", - "jest-matcher-utils": "^26.0.0-alpha.2", - "jest-message-util": "^26.0.0-alpha.2", - "jest-runtime": "^26.0.0-alpha.2", - "jest-snapshot": "^26.0.0-alpha.2", - "jest-util": "^26.0.0-alpha.2", - "pretty-format": "^26.0.0-alpha.2", + "jest-each": "^26.0.0", + "jest-matcher-utils": "^26.0.0", + "jest-message-util": "^26.0.0", + "jest-runtime": "^26.0.0", + "jest-snapshot": "^26.0.0", + "jest-util": "^26.0.0", + "pretty-format": "^26.0.0", "throat": "^5.0.0" }, "devDependencies": { diff --git a/packages/jest-leak-detector/package.json b/packages/jest-leak-detector/package.json index 73ebdec92817..ce5e7f25be0e 100644 --- a/packages/jest-leak-detector/package.json +++ b/packages/jest-leak-detector/package.json @@ -1,6 +1,6 @@ { "name": "jest-leak-detector", - "version": "26.0.0-alpha.2", + "version": "26.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,8 +10,8 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "jest-get-type": "^26.0.0-alpha.0", - "pretty-format": "^26.0.0-alpha.2" + "jest-get-type": "^26.0.0", + "pretty-format": "^26.0.0" }, "devDependencies": { "@types/weak-napi": "^1.0.0", diff --git a/packages/jest-matcher-utils/package.json b/packages/jest-matcher-utils/package.json index da577526507b..cc0fd8c74f46 100644 --- a/packages/jest-matcher-utils/package.json +++ b/packages/jest-matcher-utils/package.json @@ -1,7 +1,7 @@ { "name": "jest-matcher-utils", "description": "A set of utility functions for expect and related packages", - "version": "26.0.0-alpha.2", + "version": "26.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -15,12 +15,12 @@ "types": "build/index.d.ts", "dependencies": { "chalk": "^4.0.0", - "jest-diff": "^26.0.0-alpha.2", - "jest-get-type": "^26.0.0-alpha.0", - "pretty-format": "^26.0.0-alpha.2" + "jest-diff": "^26.0.0", + "jest-get-type": "^26.0.0", + "pretty-format": "^26.0.0" }, "devDependencies": { - "@jest/test-utils": "^26.0.0-alpha.1", + "@jest/test-utils": "^26.0.0", "@types/node": "*" }, "publishConfig": { diff --git a/packages/jest-message-util/package.json b/packages/jest-message-util/package.json index fc396992b475..d89978b73e67 100644 --- a/packages/jest-message-util/package.json +++ b/packages/jest-message-util/package.json @@ -1,6 +1,6 @@ { "name": "jest-message-util", - "version": "26.0.0-alpha.2", + "version": "26.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -14,7 +14,7 @@ "types": "build/index.d.ts", "dependencies": { "@babel/code-frame": "^7.0.0", - "@jest/types": "^26.0.0-alpha.2", + "@jest/types": "^26.0.0", "@types/stack-utils": "^1.0.1", "chalk": "^4.0.0", "graceful-fs": "^4.2.4", diff --git a/packages/jest-mock/package.json b/packages/jest-mock/package.json index c18f9a4db92c..2e8799b4b6c0 100644 --- a/packages/jest-mock/package.json +++ b/packages/jest-mock/package.json @@ -1,6 +1,6 @@ { "name": "jest-mock", - "version": "26.0.0-alpha.2", + "version": "26.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,7 +10,7 @@ "node": ">= 10.14.2" }, "dependencies": { - "@jest/types": "^26.0.0-alpha.2" + "@jest/types": "^26.0.0" }, "devDependencies": { "@types/node": "*" diff --git a/packages/jest-phabricator/package.json b/packages/jest-phabricator/package.json index d94728f4b8d9..6464af49d12b 100644 --- a/packages/jest-phabricator/package.json +++ b/packages/jest-phabricator/package.json @@ -1,6 +1,6 @@ { "name": "jest-phabricator", - "version": "26.0.0-alpha.2", + "version": "26.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -8,7 +8,7 @@ }, "types": "build/index.d.ts", "dependencies": { - "@jest/test-result": "^26.0.0-alpha.2" + "@jest/test-result": "^26.0.0" }, "engines": { "node": ">= 10.14.2" diff --git a/packages/jest-regex-util/package.json b/packages/jest-regex-util/package.json index eb8960795667..0886157f4865 100644 --- a/packages/jest-regex-util/package.json +++ b/packages/jest-regex-util/package.json @@ -1,6 +1,6 @@ { "name": "jest-regex-util", - "version": "26.0.0-alpha.1", + "version": "26.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", diff --git a/packages/jest-repl/package.json b/packages/jest-repl/package.json index 95d566e241ae..cffc73a0675f 100644 --- a/packages/jest-repl/package.json +++ b/packages/jest-repl/package.json @@ -1,6 +1,6 @@ { "name": "jest-repl", - "version": "26.0.0-alpha.2", + "version": "26.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,16 +10,16 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/transform": "^26.0.0-alpha.2", - "@jest/types": "^26.0.0-alpha.2", - "jest-config": "^26.0.0-alpha.2", - "jest-runtime": "^26.0.0-alpha.2", - "jest-validate": "^26.0.0-alpha.2", + "@jest/transform": "^26.0.0", + "@jest/types": "^26.0.0", + "jest-config": "^26.0.0", + "jest-runtime": "^26.0.0", + "jest-validate": "^26.0.0", "repl": "^0.1.3", "yargs": "^15.3.1" }, "devDependencies": { - "@jest/test-utils": "^26.0.0-alpha.1", + "@jest/test-utils": "^26.0.0", "@types/yargs": "^15.0.0" }, "bin": "./bin/jest-repl.js", diff --git a/packages/jest-reporters/package.json b/packages/jest-reporters/package.json index 62e84b8b2232..415e7a0b4ce9 100644 --- a/packages/jest-reporters/package.json +++ b/packages/jest-reporters/package.json @@ -1,15 +1,15 @@ { "name": "@jest/reporters", "description": "Jest's reporters", - "version": "26.0.0-alpha.2", + "version": "26.0.0", "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^26.0.0-alpha.2", - "@jest/test-result": "^26.0.0-alpha.2", - "@jest/transform": "^26.0.0-alpha.2", - "@jest/types": "^26.0.0-alpha.2", + "@jest/console": "^26.0.0", + "@jest/test-result": "^26.0.0", + "@jest/transform": "^26.0.0", + "@jest/types": "^26.0.0", "chalk": "^4.0.0", "collect-v8-coverage": "^1.0.0", "exit": "^0.1.2", @@ -20,10 +20,10 @@ "istanbul-lib-report": "^3.0.0", "istanbul-lib-source-maps": "^4.0.0", "istanbul-reports": "^3.0.2", - "jest-haste-map": "^26.0.0-alpha.2", - "jest-resolve": "^26.0.0-alpha.2", - "jest-util": "^26.0.0-alpha.2", - "jest-worker": "^26.0.0-alpha.0", + "jest-haste-map": "^26.0.0", + "jest-resolve": "^26.0.0", + "jest-util": "^26.0.0", + "jest-worker": "^26.0.0", "slash": "^3.0.0", "source-map": "^0.6.0", "string-length": "^4.0.1", diff --git a/packages/jest-resolve-dependencies/package.json b/packages/jest-resolve-dependencies/package.json index adc8c0b660f9..9a1fb4620032 100644 --- a/packages/jest-resolve-dependencies/package.json +++ b/packages/jest-resolve-dependencies/package.json @@ -1,6 +1,6 @@ { "name": "jest-resolve-dependencies", - "version": "26.0.0-alpha.2", + "version": "26.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,14 +10,14 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/types": "^26.0.0-alpha.2", - "jest-regex-util": "^26.0.0-alpha.1", - "jest-snapshot": "^26.0.0-alpha.2" + "@jest/types": "^26.0.0", + "jest-regex-util": "^26.0.0", + "jest-snapshot": "^26.0.0" }, "devDependencies": { - "jest-haste-map": "^26.0.0-alpha.2", - "jest-resolve": "^26.0.0-alpha.2", - "jest-runtime": "^26.0.0-alpha.2" + "jest-haste-map": "^26.0.0", + "jest-resolve": "^26.0.0", + "jest-runtime": "^26.0.0" }, "engines": { "node": ">= 10.14.2" diff --git a/packages/jest-resolve/package.json b/packages/jest-resolve/package.json index cc3565da1810..6bb27dfc6b8e 100644 --- a/packages/jest-resolve/package.json +++ b/packages/jest-resolve/package.json @@ -1,6 +1,6 @@ { "name": "jest-resolve", - "version": "26.0.0-alpha.2", + "version": "26.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,11 +10,11 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/types": "^26.0.0-alpha.2", + "@jest/types": "^26.0.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.4", "jest-pnp-resolver": "^1.2.1", - "jest-util": "^26.0.0-alpha.2", + "jest-util": "^26.0.0", "read-pkg-up": "^7.0.1", "resolve": "^1.17.0", "slash": "^3.0.0" @@ -22,7 +22,7 @@ "devDependencies": { "@types/graceful-fs": "^4.1.3", "@types/resolve": "^1.14.0", - "jest-haste-map": "^26.0.0-alpha.2" + "jest-haste-map": "^26.0.0" }, "engines": { "node": ">= 10.14.2" diff --git a/packages/jest-runner/package.json b/packages/jest-runner/package.json index bd204c529ce1..d075ff3d9d69 100644 --- a/packages/jest-runner/package.json +++ b/packages/jest-runner/package.json @@ -1,6 +1,6 @@ { "name": "jest-runner", - "version": "26.0.0-alpha.2", + "version": "26.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,23 +10,23 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/console": "^26.0.0-alpha.2", - "@jest/environment": "^26.0.0-alpha.2", - "@jest/test-result": "^26.0.0-alpha.2", - "@jest/types": "^26.0.0-alpha.2", + "@jest/console": "^26.0.0", + "@jest/environment": "^26.0.0", + "@jest/test-result": "^26.0.0", + "@jest/types": "^26.0.0", "chalk": "^4.0.0", "exit": "^0.1.2", "graceful-fs": "^4.2.4", - "jest-config": "^26.0.0-alpha.2", - "jest-docblock": "^26.0.0-alpha.0", - "jest-haste-map": "^26.0.0-alpha.2", - "jest-jasmine2": "^26.0.0-alpha.2", - "jest-leak-detector": "^26.0.0-alpha.2", - "jest-message-util": "^26.0.0-alpha.2", - "jest-resolve": "^26.0.0-alpha.2", - "jest-runtime": "^26.0.0-alpha.2", - "jest-util": "^26.0.0-alpha.2", - "jest-worker": "^26.0.0-alpha.0", + "jest-config": "^26.0.0", + "jest-docblock": "^26.0.0", + "jest-haste-map": "^26.0.0", + "jest-jasmine2": "^26.0.0", + "jest-leak-detector": "^26.0.0", + "jest-message-util": "^26.0.0", + "jest-resolve": "^26.0.0", + "jest-runtime": "^26.0.0", + "jest-util": "^26.0.0", + "jest-worker": "^26.0.0", "source-map-support": "^0.5.6", "throat": "^5.0.0" }, @@ -35,7 +35,7 @@ "@types/graceful-fs": "^4.1.2", "@types/node": "*", "@types/source-map-support": "^0.5.0", - "jest-circus": "^26.0.0-alpha.2" + "jest-circus": "^26.0.0" }, "engines": { "node": ">= 10.14.2" diff --git a/packages/jest-runtime/package.json b/packages/jest-runtime/package.json index cf453823b761..950b45f39105 100644 --- a/packages/jest-runtime/package.json +++ b/packages/jest-runtime/package.json @@ -1,6 +1,6 @@ { "name": "jest-runtime", - "version": "26.0.0-alpha.2", + "version": "26.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,40 +10,40 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/console": "^26.0.0-alpha.2", - "@jest/environment": "^26.0.0-alpha.2", - "@jest/fake-timers": "^26.0.0-alpha.2", - "@jest/globals": "^26.0.0-alpha.2", - "@jest/source-map": "^26.0.0-alpha.1", - "@jest/test-result": "^26.0.0-alpha.2", - "@jest/transform": "^26.0.0-alpha.2", - "@jest/types": "^26.0.0-alpha.2", + "@jest/console": "^26.0.0", + "@jest/environment": "^26.0.0", + "@jest/fake-timers": "^26.0.0", + "@jest/globals": "^26.0.0", + "@jest/source-map": "^26.0.0", + "@jest/test-result": "^26.0.0", + "@jest/transform": "^26.0.0", + "@jest/types": "^26.0.0", "@types/yargs": "^15.0.0", "chalk": "^4.0.0", "collect-v8-coverage": "^1.0.0", "exit": "^0.1.2", "glob": "^7.1.3", "graceful-fs": "^4.2.4", - "jest-config": "^26.0.0-alpha.2", - "jest-haste-map": "^26.0.0-alpha.2", - "jest-message-util": "^26.0.0-alpha.2", - "jest-mock": "^26.0.0-alpha.2", - "jest-regex-util": "^26.0.0-alpha.1", - "jest-resolve": "^26.0.0-alpha.2", - "jest-snapshot": "^26.0.0-alpha.2", - "jest-util": "^26.0.0-alpha.2", - "jest-validate": "^26.0.0-alpha.2", + "jest-config": "^26.0.0", + "jest-haste-map": "^26.0.0", + "jest-message-util": "^26.0.0", + "jest-mock": "^26.0.0", + "jest-regex-util": "^26.0.0", + "jest-resolve": "^26.0.0", + "jest-snapshot": "^26.0.0", + "jest-util": "^26.0.0", + "jest-validate": "^26.0.0", "slash": "^3.0.0", "strip-bom": "^4.0.0", "yargs": "^15.3.1" }, "devDependencies": { - "@jest/test-utils": "^26.0.0-alpha.1", + "@jest/test-utils": "^26.0.0", "@types/exit": "^0.1.30", "@types/glob": "^7.1.1", "@types/graceful-fs": "^4.1.2", "execa": "^4.0.0", - "jest-environment-node": "^26.0.0-alpha.2", + "jest-environment-node": "^26.0.0", "jest-snapshot-serializer-raw": "^1.1.0" }, "bin": "./bin/jest-runtime.js", diff --git a/packages/jest-serializer/package.json b/packages/jest-serializer/package.json index 335ba8ffa151..908d4913ebc9 100644 --- a/packages/jest-serializer/package.json +++ b/packages/jest-serializer/package.json @@ -1,6 +1,6 @@ { "name": "jest-serializer", - "version": "26.0.0-alpha.0", + "version": "26.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", diff --git a/packages/jest-snapshot/package.json b/packages/jest-snapshot/package.json index 88eac9d47f79..6d090520113a 100644 --- a/packages/jest-snapshot/package.json +++ b/packages/jest-snapshot/package.json @@ -1,6 +1,6 @@ { "name": "jest-snapshot", - "version": "26.0.0-alpha.2", + "version": "26.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -11,19 +11,19 @@ "types": "build/index.d.ts", "dependencies": { "@babel/types": "^7.0.0", - "@jest/types": "^26.0.0-alpha.2", + "@jest/types": "^26.0.0", "@types/prettier": "^2.0.0", "chalk": "^4.0.0", - "expect": "^26.0.0-alpha.2", + "expect": "^26.0.0", "graceful-fs": "^4.2.4", - "jest-diff": "^26.0.0-alpha.2", - "jest-get-type": "^26.0.0-alpha.0", - "jest-matcher-utils": "^26.0.0-alpha.2", - "jest-message-util": "^26.0.0-alpha.2", - "jest-resolve": "^26.0.0-alpha.2", + "jest-diff": "^26.0.0", + "jest-get-type": "^26.0.0", + "jest-matcher-utils": "^26.0.0", + "jest-message-util": "^26.0.0", + "jest-resolve": "^26.0.0", "make-dir": "^3.0.0", "natural-compare": "^1.4.0", - "pretty-format": "^26.0.0-alpha.2", + "pretty-format": "^26.0.0", "semver": "^7.3.2" }, "devDependencies": { @@ -33,7 +33,7 @@ "@types/semver": "^7.1.0", "ansi-regex": "^5.0.0", "ansi-styles": "^4.2.0", - "jest-haste-map": "^26.0.0-alpha.2", + "jest-haste-map": "^26.0.0", "prettier": "^1.19.1" }, "engines": { diff --git a/packages/jest-source-map/package.json b/packages/jest-source-map/package.json index ebd167966993..75d347cdb343 100644 --- a/packages/jest-source-map/package.json +++ b/packages/jest-source-map/package.json @@ -1,6 +1,6 @@ { "name": "@jest/source-map", - "version": "26.0.0-alpha.1", + "version": "26.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", diff --git a/packages/jest-test-result/package.json b/packages/jest-test-result/package.json index 093da8add640..50cb32a6f57d 100644 --- a/packages/jest-test-result/package.json +++ b/packages/jest-test-result/package.json @@ -1,6 +1,6 @@ { "name": "@jest/test-result", - "version": "26.0.0-alpha.2", + "version": "26.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,8 +10,8 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/console": "^26.0.0-alpha.2", - "@jest/types": "^26.0.0-alpha.2", + "@jest/console": "^26.0.0", + "@jest/types": "^26.0.0", "@types/istanbul-lib-coverage": "^2.0.0", "collect-v8-coverage": "^1.0.0" }, diff --git a/packages/jest-test-sequencer/package.json b/packages/jest-test-sequencer/package.json index c9b27c2fa5f0..a70542f4e387 100644 --- a/packages/jest-test-sequencer/package.json +++ b/packages/jest-test-sequencer/package.json @@ -1,6 +1,6 @@ { "name": "@jest/test-sequencer", - "version": "26.0.0-alpha.2", + "version": "26.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,11 +10,11 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/test-result": "^26.0.0-alpha.2", + "@jest/test-result": "^26.0.0", "graceful-fs": "^4.2.4", - "jest-haste-map": "^26.0.0-alpha.2", - "jest-runner": "^26.0.0-alpha.2", - "jest-runtime": "^26.0.0-alpha.2" + "jest-haste-map": "^26.0.0", + "jest-runner": "^26.0.0", + "jest-runtime": "^26.0.0" }, "devDependencies": { "@types/graceful-fs": "^4.1.3" diff --git a/packages/jest-transform/package.json b/packages/jest-transform/package.json index 7f4fdfb354fd..832b7b894c14 100644 --- a/packages/jest-transform/package.json +++ b/packages/jest-transform/package.json @@ -1,6 +1,6 @@ { "name": "@jest/transform", - "version": "26.0.0-alpha.2", + "version": "26.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -11,15 +11,15 @@ "types": "build/index.d.ts", "dependencies": { "@babel/core": "^7.1.0", - "@jest/types": "^26.0.0-alpha.2", + "@jest/types": "^26.0.0", "babel-plugin-istanbul": "^6.0.0", "chalk": "^4.0.0", "convert-source-map": "^1.4.0", "fast-json-stable-stringify": "^2.0.0", "graceful-fs": "^4.2.4", - "jest-haste-map": "^26.0.0-alpha.2", - "jest-regex-util": "^26.0.0-alpha.1", - "jest-util": "^26.0.0-alpha.2", + "jest-haste-map": "^26.0.0", + "jest-regex-util": "^26.0.0", + "jest-util": "^26.0.0", "micromatch": "^4.0.2", "pirates": "^4.0.1", "slash": "^3.0.0", diff --git a/packages/jest-types/package.json b/packages/jest-types/package.json index f55f677ae736..a686a7c1d995 100644 --- a/packages/jest-types/package.json +++ b/packages/jest-types/package.json @@ -1,6 +1,6 @@ { "name": "@jest/types", - "version": "26.0.0-alpha.2", + "version": "26.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", diff --git a/packages/jest-util/package.json b/packages/jest-util/package.json index a0f8fb15a3a9..7bbb03486d30 100644 --- a/packages/jest-util/package.json +++ b/packages/jest-util/package.json @@ -1,6 +1,6 @@ { "name": "jest-util", - "version": "26.0.0-alpha.2", + "version": "26.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,7 +10,7 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/types": "^26.0.0-alpha.2", + "@jest/types": "^26.0.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.4", "is-ci": "^2.0.0", diff --git a/packages/jest-validate/package.json b/packages/jest-validate/package.json index 978b53bd2574..a70953e0d0e7 100644 --- a/packages/jest-validate/package.json +++ b/packages/jest-validate/package.json @@ -1,6 +1,6 @@ { "name": "jest-validate", - "version": "26.0.0-alpha.2", + "version": "26.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,12 +10,12 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/types": "^26.0.0-alpha.2", + "@jest/types": "^26.0.0", "camelcase": "^6.0.0", "chalk": "^4.0.0", - "jest-get-type": "^26.0.0-alpha.0", + "jest-get-type": "^26.0.0", "leven": "^3.1.0", - "pretty-format": "^26.0.0-alpha.2" + "pretty-format": "^26.0.0" }, "devDependencies": { "@types/yargs": "^15.0.3" diff --git a/packages/jest-watcher/package.json b/packages/jest-watcher/package.json index 3147a547d153..fa0acb3d6d78 100644 --- a/packages/jest-watcher/package.json +++ b/packages/jest-watcher/package.json @@ -1,15 +1,15 @@ { "name": "jest-watcher", "description": "Delightful JavaScript Testing.", - "version": "26.0.0-alpha.2", + "version": "26.0.0", "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/test-result": "^26.0.0-alpha.2", - "@jest/types": "^26.0.0-alpha.2", + "@jest/test-result": "^26.0.0", + "@jest/types": "^26.0.0", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", - "jest-util": "^26.0.0-alpha.2", + "jest-util": "^26.0.0", "string-length": "^4.0.1" }, "devDependencies": { diff --git a/packages/jest-worker/package.json b/packages/jest-worker/package.json index 1edf8ade1ceb..3ae7e37c53ef 100644 --- a/packages/jest-worker/package.json +++ b/packages/jest-worker/package.json @@ -1,6 +1,6 @@ { "name": "jest-worker", - "version": "26.0.0-alpha.0", + "version": "26.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", diff --git a/packages/jest/package.json b/packages/jest/package.json index 1db3b7d54cae..aa30737001b3 100644 --- a/packages/jest/package.json +++ b/packages/jest/package.json @@ -1,13 +1,13 @@ { "name": "jest", "description": "Delightful JavaScript Testing.", - "version": "26.0.0-alpha.2", + "version": "26.0.0", "main": "build/jest.js", "types": "build/jest.d.ts", "dependencies": { - "@jest/core": "^26.0.0-alpha.2", + "@jest/core": "^26.0.0", "import-local": "^3.0.2", - "jest-cli": "^26.0.0-alpha.2" + "jest-cli": "^26.0.0" }, "bin": "./bin/jest.js", "engines": { diff --git a/packages/pretty-format/package.json b/packages/pretty-format/package.json index d531959f2ff7..68581c67d4b1 100644 --- a/packages/pretty-format/package.json +++ b/packages/pretty-format/package.json @@ -1,6 +1,6 @@ { "name": "pretty-format", - "version": "26.0.0-alpha.2", + "version": "26.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -12,7 +12,7 @@ "types": "build/index.d.ts", "author": "James Kyle ", "dependencies": { - "@jest/types": "^26.0.0-alpha.2", + "@jest/types": "^26.0.0", "ansi-regex": "^5.0.0", "ansi-styles": "^4.0.0", "react-is": "^16.12.0" diff --git a/packages/test-utils/package.json b/packages/test-utils/package.json index 360fa02d06da..441a8f813e2e 100644 --- a/packages/test-utils/package.json +++ b/packages/test-utils/package.json @@ -1,6 +1,6 @@ { "name": "@jest/test-utils", - "version": "26.0.0-alpha.1", + "version": "26.0.0", "private": true, "license": "MIT", "main": "build/index.js", From ef8605faa44a0177f32c8d64fd95e34bf2dab640 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Mon, 4 May 2020 19:57:21 +0200 Subject: [PATCH 077/106] chore: run yarn now that we've published as latest --- package.json | 2 +- yarn.lock | 697 ++------------------------------------------------- 2 files changed, 16 insertions(+), 683 deletions(-) diff --git a/package.json b/package.json index 0f268394eaa3..2d0915ab87c4 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "@babel/preset-react": "^7.0.0", "@babel/preset-typescript": "^7.0.0", "@babel/register": "^7.0.0", - "@jest/test-utils": "^26.0.0-alpha.0", + "@jest/test-utils": "^26.0.0", "@types/babel__core": "^7.0.0", "@types/babel__generator": "^7.0.0", "@types/babel__template": "^7.0.0", diff --git a/yarn.lock b/yarn.lock index b01763533183..d1b01b670423 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1181,49 +1181,6 @@ jest-util "^25.5.0" slash "^3.0.0" -"@jest/core@^25.5.4": - version "25.5.4" - resolved "https://registry.yarnpkg.com/@jest/core/-/core-25.5.4.tgz#3ef7412f7339210f003cdf36646bbca786efe7b4" - integrity sha512-3uSo7laYxF00Dg/DMgbn4xMJKmDdWvZnf89n8Xj/5/AeQ2dOQmn6b6Hkj/MleyzZWXpwv+WSdYWl4cLsy2JsoA== - dependencies: - "@jest/console" "^25.5.0" - "@jest/reporters" "^25.5.1" - "@jest/test-result" "^25.5.0" - "@jest/transform" "^25.5.1" - "@jest/types" "^25.5.0" - ansi-escapes "^4.2.1" - chalk "^3.0.0" - exit "^0.1.2" - graceful-fs "^4.2.4" - jest-changed-files "^25.5.0" - jest-config "^25.5.4" - jest-haste-map "^25.5.1" - jest-message-util "^25.5.0" - jest-regex-util "^25.2.6" - jest-resolve "^25.5.1" - jest-resolve-dependencies "^25.5.4" - jest-runner "^25.5.4" - jest-runtime "^25.5.4" - jest-snapshot "^25.5.1" - jest-util "^25.5.0" - jest-validate "^25.5.0" - jest-watcher "^25.5.0" - micromatch "^4.0.2" - p-each-series "^2.1.0" - realpath-native "^2.0.0" - rimraf "^3.0.0" - slash "^3.0.0" - strip-ansi "^6.0.0" - -"@jest/environment@^25.5.0": - version "25.5.0" - resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-25.5.0.tgz#aa33b0c21a716c65686638e7ef816c0e3a0c7b37" - integrity sha512-U2VXPEqL07E/V7pSZMSQCvV5Ea4lqOlT+0ZFijl/i316cRMHvZ4qC+jBdryd+lmRetjQo0YIQr6cVPNxxK87mA== - dependencies: - "@jest/fake-timers" "^25.5.0" - "@jest/types" "^25.5.0" - jest-mock "^25.5.0" - "@jest/fake-timers@^24.9.0": version "24.9.0" resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-24.9.0.tgz#ba3e6bf0eecd09a636049896434d306636540c93" @@ -1233,58 +1190,6 @@ jest-message-util "^24.9.0" jest-mock "^24.9.0" -"@jest/fake-timers@^25.5.0": - version "25.5.0" - resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-25.5.0.tgz#46352e00533c024c90c2bc2ad9f2959f7f114185" - integrity sha512-9y2+uGnESw/oyOI3eww9yaxdZyHq7XvprfP/eeoCsjqKYts2yRlsHS/SgjPDV8FyMfn2nbMy8YzUk6nyvdLOpQ== - dependencies: - "@jest/types" "^25.5.0" - jest-message-util "^25.5.0" - jest-mock "^25.5.0" - jest-util "^25.5.0" - lolex "^5.0.0" - -"@jest/globals@^25.5.2": - version "25.5.2" - resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-25.5.2.tgz#5e45e9de8d228716af3257eeb3991cc2e162ca88" - integrity sha512-AgAS/Ny7Q2RCIj5kZ+0MuKM1wbF0WMLxbCVl/GOMoCNbODRdJ541IxJ98xnZdVSZXivKpJlNPIWa3QmY0l4CXA== - dependencies: - "@jest/environment" "^25.5.0" - "@jest/types" "^25.5.0" - expect "^25.5.0" - -"@jest/reporters@^25.5.1": - version "25.5.1" - resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-25.5.1.tgz#cb686bcc680f664c2dbaf7ed873e93aa6811538b" - integrity sha512-3jbd8pPDTuhYJ7vqiHXbSwTJQNavczPs+f1kRprRDxETeE3u6srJ+f0NPuwvOmk+lmunZzPkYWIFZDLHQPkviw== - dependencies: - "@bcoe/v8-coverage" "^0.2.3" - "@jest/console" "^25.5.0" - "@jest/test-result" "^25.5.0" - "@jest/transform" "^25.5.1" - "@jest/types" "^25.5.0" - chalk "^3.0.0" - collect-v8-coverage "^1.0.0" - exit "^0.1.2" - glob "^7.1.2" - graceful-fs "^4.2.4" - istanbul-lib-coverage "^3.0.0" - istanbul-lib-instrument "^4.0.0" - istanbul-lib-report "^3.0.0" - istanbul-lib-source-maps "^4.0.0" - istanbul-reports "^3.0.2" - jest-haste-map "^25.5.1" - jest-resolve "^25.5.1" - jest-util "^25.5.0" - jest-worker "^25.5.0" - slash "^3.0.0" - source-map "^0.6.0" - string-length "^3.1.0" - terminal-link "^2.0.0" - v8-to-istanbul "^4.1.3" - optionalDependencies: - node-notifier "^6.0.0" - "@jest/source-map@^24.9.0": version "24.9.0" resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-24.9.0.tgz#0e263a94430be4b41da683ccc1e6bffe2a191714" @@ -1294,15 +1199,6 @@ graceful-fs "^4.1.15" source-map "^0.6.0" -"@jest/source-map@^25.5.0": - version "25.5.0" - resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-25.5.0.tgz#df5c20d6050aa292c2c6d3f0d2c7606af315bd1b" - integrity sha512-eIGx0xN12yVpMcPaVpjXPnn3N30QGJCJQSkEDUt9x1fI1Gdvb07Ml6K5iN2hG7NmMP6FDmtPEssE3z6doOYUwQ== - dependencies: - callsites "^3.0.0" - graceful-fs "^4.2.4" - source-map "^0.6.0" - "@jest/test-result@^24.9.0": version "24.9.0" resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-24.9.0.tgz#11796e8aa9dbf88ea025757b3152595ad06ba0ca" @@ -1322,39 +1218,6 @@ "@types/istanbul-lib-coverage" "^2.0.0" collect-v8-coverage "^1.0.0" -"@jest/test-sequencer@^25.5.4": - version "25.5.4" - resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-25.5.4.tgz#9b4e685b36954c38d0f052e596d28161bdc8b737" - integrity sha512-pTJGEkSeg1EkCO2YWq6hbFvKNXk8ejqlxiOg1jBNLnWrgXOkdY6UmqZpwGFXNnRt9B8nO1uWMzLLZ4eCmhkPNA== - dependencies: - "@jest/test-result" "^25.5.0" - graceful-fs "^4.2.4" - jest-haste-map "^25.5.1" - jest-runner "^25.5.4" - jest-runtime "^25.5.4" - -"@jest/transform@^25.5.1": - version "25.5.1" - resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-25.5.1.tgz#0469ddc17699dd2bf985db55fa0fb9309f5c2db3" - integrity sha512-Y8CEoVwXb4QwA6Y/9uDkn0Xfz0finGkieuV0xkdF9UtZGJeLukD5nLkaVrVsODB1ojRWlaoD0AJZpVHCSnJEvg== - dependencies: - "@babel/core" "^7.1.0" - "@jest/types" "^25.5.0" - babel-plugin-istanbul "^6.0.0" - chalk "^3.0.0" - convert-source-map "^1.4.0" - fast-json-stable-stringify "^2.0.0" - graceful-fs "^4.2.4" - jest-haste-map "^25.5.1" - jest-regex-util "^25.2.6" - jest-util "^25.5.0" - micromatch "^4.0.2" - pirates "^4.0.1" - realpath-native "^2.0.0" - slash "^3.0.0" - source-map "^0.6.1" - write-file-atomic "^3.0.0" - "@jest/types@^24.9.0": version "24.9.0" resolved "https://registry.yarnpkg.com/@jest/types/-/types-24.9.0.tgz#63cb26cb7500d069e5a389441a7c6ab5e909fc59" @@ -2628,11 +2491,6 @@ resolved "https://registry.yarnpkg.com/@types/parse5/-/parse5-5.0.2.tgz#a877a4658f8238c8266faef300ae41c84d72ec8a" integrity sha512-BOl+6KDs4ItndUWUFchy3aEqGdHhw0BC4Uu+qoDonN/f0rbUnJbm71Ulj8Tt9jLFRaAxPLKvdS1bBLfx1qXR9g== -"@types/prettier@^1.19.0": - version "1.19.1" - resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-1.19.1.tgz#33509849f8e679e4add158959fdb086440e9553f" - integrity sha512-5qOlnZscTn4xxM5MeGXAMOsIOIKIbh9e85zJWfBRVPlRMEVawzoPhINYbRGkBZCI8LxvBe7tJCdWiarA99OZfQ== - "@types/prettier@^2.0.0": version "2.0.0" resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.0.0.tgz#dc85454b953178cc6043df5208b9e949b54a3bc4" @@ -2846,7 +2704,7 @@ JSONStream@^1.0.4, JSONStream@^1.3.4: jsonparse "^1.2.0" through ">=2.2.7 <3" -abab@^2.0.0, abab@^2.0.3: +abab@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.3.tgz#623e2075e02eb2d3f2475e49f99c91846467907a" integrity sha512-tsFzPpcttalNjFBCFMqsKYQcWxxen1pgJR56by//QwvJc4/OUS3kPOOttx2tSIfjsylB0pYu7f5D3K1RCxUnUg== @@ -2876,14 +2734,6 @@ accepts@~1.3.5, accepts@~1.3.7: mime-types "~2.1.24" negotiator "0.6.2" -acorn-globals@^4.3.2: - version "4.3.4" - resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-4.3.4.tgz#9fa1926addc11c97308c4e66d7add0d40c3272e7" - integrity sha512-clfQEh21R+D0leSbUdWf3OcfqyaCSAQ8Ryq00bofSekfr9W8u1jyYZo6ir0xu9Gtcf7BjcHJpnbZH7JOCpP60A== - dependencies: - acorn "^6.0.1" - acorn-walk "^6.0.1" - acorn-globals@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-6.0.0.tgz#46cdd39f0f8ff08a876619b55f5ac8a6dc770b45" @@ -2897,22 +2747,12 @@ acorn-jsx@^5.2.0: resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.2.0.tgz#4c66069173d6fdd68ed85239fc256226182b2ebe" integrity sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ== -acorn-walk@^6.0.1: - version "6.2.0" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-6.2.0.tgz#123cb8f3b84c2171f1f7fb252615b1c78a6b1a8c" - integrity sha512-7evsyfH1cLOCdAzZAd43Cic04yKydNx0cF+7tiA19p1XnLLPU4dpCQOqpjqwokFe//vS0QqfqqjCS2JkiIs0cA== - acorn-walk@^7.1.1: version "7.1.1" resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-7.1.1.tgz#345f0dffad5c735e7373d2fec9a1023e6a44b83e" integrity sha512-wdlPY2tm/9XBr7QkKlq0WQVgiuGTX6YWPyRyBviSoScBuLfTVQhvwg6wJ369GJ/1nPfTLMfnrFIfjqVg6d+jQQ== -acorn@^6.0.1: - version "6.4.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.1.tgz#531e58ba3f51b9dacb9a6646ca4debf5b14ca474" - integrity sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA== - -acorn@^7.1.0, acorn@^7.1.1: +acorn@^7.1.1: version "7.1.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.1.1.tgz#e35668de0b402f359de515c5482a1ab9f89a69bf" integrity sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg== @@ -3194,11 +3034,6 @@ array-differ@^2.0.3: resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-2.1.0.tgz#4b9c1c3f14b906757082925769e8ab904f4801b1" integrity sha512-KbUpJgx909ZscOc/7CLATBFam7P1Z1QRQInvgT0UztM9Q72aGKCunKASAl7WNW0tnPmPyEMeMhdsfWhfmW037w== -array-equal@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93" - integrity sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM= - array-filter@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/array-filter/-/array-filter-1.0.0.tgz#baf79e62e6ef4c2a4c0b831232daffec251f9d83" @@ -3413,20 +3248,6 @@ babel-eslint@^10.0.3: eslint-visitor-keys "^1.0.0" resolve "^1.12.0" -babel-jest@*, babel-jest@^25.5.1: - version "25.5.1" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-25.5.1.tgz#bc2e6101f849d6f6aec09720ffc7bc5332e62853" - integrity sha512-9dA9+GmMjIzgPnYtkhBg73gOo/RHqPmLruP3BaGL4KEX3Dwz6pI8auSN8G8+iuEG90+GSswyKvslN+JYSaacaQ== - dependencies: - "@jest/transform" "^25.5.1" - "@jest/types" "^25.5.0" - "@types/babel__core" "^7.1.7" - babel-plugin-istanbul "^6.0.0" - babel-preset-jest "^25.5.0" - chalk "^3.0.0" - graceful-fs "^4.2.4" - slash "^3.0.0" - babel-plugin-dynamic-import-node@^2.3.3: version "2.3.3" resolved "https://registry.yarnpkg.com/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz#84fda19c976ec5c6defef57f9427b3def66e17a3" @@ -3445,15 +3266,6 @@ babel-plugin-istanbul@^6.0.0: istanbul-lib-instrument "^4.0.0" test-exclude "^6.0.0" -babel-plugin-jest-hoist@^25.5.0: - version "25.5.0" - resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-25.5.0.tgz#129c80ba5c7fc75baf3a45b93e2e372d57ca2677" - integrity sha512-u+/W+WAjMlvoocYGTwthAiQSxDcJAyHpQ6oWlHdFZaaN+Rlk8Q7iiwDPg2lN/FyJtAYnKjFxbn7xus4HCFkg5g== - dependencies: - "@babel/template" "^7.3.3" - "@babel/types" "^7.3.3" - "@types/babel__traverse" "^7.0.6" - babel-plugin-replace-ts-export-assignment@^0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/babel-plugin-replace-ts-export-assignment/-/babel-plugin-replace-ts-export-assignment-0.0.2.tgz#927a30ba303fcf271108980a8d4f80a693e1d53f" @@ -3534,14 +3346,6 @@ babel-preset-fbjs@^3.2.0, babel-preset-fbjs@^3.3.0: "@babel/plugin-transform-template-literals" "^7.0.0" babel-plugin-syntax-trailing-function-commas "^7.0.0-beta.0" -babel-preset-jest@^25.5.0: - version "25.5.0" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-25.5.0.tgz#c1d7f191829487a907764c65307faa0e66590b49" - integrity sha512-8ZczygctQkBU+63DtSOKGh7tFL0CeCuz+1ieud9lJ1WPQ9O6A1a/r+LGn6Y705PA6whHQ3T1XuB/PmpfNYf8Fw== - dependencies: - babel-plugin-jest-hoist "^25.5.0" - babel-preset-current-node-syntax "^0.1.2" - babel-runtime@^6.22.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" @@ -3789,13 +3593,6 @@ browser-process-hrtime@^1.0.0: resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz#3c9b4b7d782c8121e56f10106d84c0d0ffc94626" integrity sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow== -browser-resolve@^1.11.3: - version "1.11.3" - resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.3.tgz#9b7cbb3d0f510e4cb86bdbd796124d28b5890af6" - integrity sha512-exDi1BYWB/6raKHmDTCicQfTkqwN5fioMFV4j8BsfMU4R2DK/QfZfK7kOVkmWCNANf0snkBzqGqAJBao9gZMdQ== - dependencies: - resolve "1.1.7" - browserslist@4.7.0: version "4.7.0" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.7.0.tgz#9ee89225ffc07db03409f2fee524dc8227458a17" @@ -4924,7 +4721,7 @@ csso@^4.0.2: dependencies: css-tree "1.0.0-alpha.39" -cssom@^0.4.1, cssom@^0.4.4: +cssom@^0.4.4: version "0.4.4" resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.4.4.tgz#5a66cf93d2d0b661d80bf6a44fb65f5c2e4e0a10" integrity sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw== @@ -4934,7 +4731,7 @@ cssom@~0.3.6: resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.8.tgz#9f1276f5b2b463f2114d3f2c75250af8c1a36f4a" integrity sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg== -cssstyle@^2.0.0, cssstyle@^2.2.0: +cssstyle@^2.2.0: version "2.3.0" resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-2.3.0.tgz#ff665a0ddbdc31864b09647f34163443d90b0852" integrity sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A== @@ -4977,15 +4774,6 @@ dashdash@^1.12.0: dependencies: assert-plus "^1.0.0" -data-urls@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-1.1.0.tgz#15ee0582baa5e22bb59c77140da8f9c76963bbfe" - integrity sha512-YTWYI9se1P55u58gL5GkQHW4P6VJBJ5iBT+B5a7i2Tjadhv52paJG0qHX4A0OR6/t52odI64KP2YvFpkDOi3eQ== - dependencies: - abab "^2.0.0" - whatwg-mimetype "^2.2.0" - whatwg-url "^7.0.0" - data-urls@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-2.0.0.tgz#156485a72963a970f5d5821aaf642bef2bf2db9b" @@ -5255,11 +5043,6 @@ diacritics-map@^0.1.0: resolved "https://registry.yarnpkg.com/diacritics-map/-/diacritics-map-0.1.0.tgz#6dfc0ff9d01000a2edf2865371cac316e94977af" integrity sha1-bfwP+dAQAKLt8oZTccrDFulJd68= -diff-sequences@^25.2.6: - version "25.2.6" - resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-25.2.6.tgz#5f467c00edd35352b7bca46d7927d60e687a76dd" - integrity sha512-Hq8o7+6GaZeoFjtpgvRBUknSXNeJiCx7V9Fr94ZMljNiCr9n9L8H8aJqgWOQiDDGdyn29fRNcDdRVJ5fdyihfg== - diff@^4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" @@ -5392,13 +5175,6 @@ domelementtype@^2.0.1: resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.0.1.tgz#1f8bdfe91f5a78063274e803b4bdcedf6e94f94d" integrity sha512-5HOHUDsYZWV8FGWN0Njbr/Rn7f/eWSQi1v7+HsUVwXgn8nWWlL64zKDkS0n8ZmQ3mlWOMuXOnR+7Nx/5tMO5AQ== -domexception@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/domexception/-/domexception-1.0.1.tgz#937442644ca6a31261ef36e3ec677fe805582c90" - integrity sha512-raigMkn7CJNNo6Ihro1fzG7wr3fHuYVytzquZKX5n0yizGsTcYgzdIUwj1X9pK0VvjeihV+XiclP+DjwbsSKug== - dependencies: - webidl-conversions "^4.0.2" - domexception@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/domexception/-/domexception-2.0.1.tgz#fb44aefba793e1574b0af6aed2801d057529f304" @@ -5732,7 +5508,7 @@ escape-string-regexp@^2.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== -escodegen@^1.11.1, escodegen@^1.14.1: +escodegen@^1.14.1: version "1.14.1" resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.14.1.tgz#ba01d0c8278b5e95a9a45350142026659027a457" integrity sha512-Bmt7NcRySdIfNPfU2ZoXDrrXsG9ZjvDxcAlMfDUgRBjLOWTuIACXPBFJH7Z+cLb40JeQco5toikyc9t9P8E9SQ== @@ -6057,22 +5833,6 @@ execa@^1.0.0: signal-exit "^3.0.0" strip-eof "^1.0.0" -execa@^3.2.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-3.4.0.tgz#c08ed4550ef65d858fac269ffc8572446f37eb89" - integrity sha512-r9vdGQk4bmCuK1yKQu1KTwcT2zwfWdbdaXfCtAh+5nU/4fSX+JAb7vZGvI5naJrQlvONrEB20jeruESI69530g== - dependencies: - cross-spawn "^7.0.0" - get-stream "^5.0.0" - human-signals "^1.1.1" - is-stream "^2.0.0" - merge-stream "^2.0.0" - npm-run-path "^4.0.0" - onetime "^5.1.0" - p-finally "^2.0.0" - signal-exit "^3.0.2" - strip-final-newline "^2.0.0" - execa@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/execa/-/execa-4.0.0.tgz#7f37d6ec17f09e6b8fc53288611695b6d12b9daf" @@ -6120,18 +5880,6 @@ expand-range@^1.8.1: dependencies: fill-range "^2.1.0" -expect@^25.5.0: - version "25.5.0" - resolved "https://registry.yarnpkg.com/expect/-/expect-25.5.0.tgz#f07f848712a2813bb59167da3fb828ca21f58bba" - integrity sha512-w7KAXo0+6qqZZhovCaBVPSIqQp7/UTcx4M9uKt2m6pd2VB1voyC8JizLRqeEqud3AAVP02g+hbErDu5gu64tlA== - dependencies: - "@jest/types" "^25.5.0" - ansi-styles "^4.0.0" - jest-get-type "^25.2.6" - jest-matcher-utils "^25.5.0" - jest-message-util "^25.5.0" - jest-regex-util "^25.2.6" - express@^4.17.1: version "4.17.1" resolved "https://registry.yarnpkg.com/express/-/express-4.17.1.tgz#4491fc38605cf51f8629d39c2b5d026f98a4c134" @@ -7319,13 +7067,6 @@ html-element-map@^1.2.0: dependencies: array-filter "^1.0.0" -html-encoding-sniffer@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-1.0.2.tgz#e70d84b94da53aa375e11fe3a351be6642ca46f8" - integrity sha512-71lZziiDnsuabfdYiUeWdCVyKuqwWi23L8YeIgV9jSSZHCtb6wB1BKWooH7L3tn4/FuZJMVWyNaIDr4RGmaSYw== - dependencies: - whatwg-encoding "^1.0.1" - html-encoding-sniffer@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz#42a6dc4fd33f00281176e8b23759ca4e4fa185f3" @@ -8314,122 +8055,11 @@ iterall@^1.2.2: resolved "https://registry.yarnpkg.com/iterall/-/iterall-1.3.0.tgz#afcb08492e2915cbd8a0884eb93a8c94d0d72fea" integrity sha512-QZ9qOMdF+QLHxy1QIpUHUU1D5pS2CG2P69LF6L6CPjPYA/XMOmKV3PZpawHoAjHNyB0swdVTRxdYT4tbBbxqwg== -jest-changed-files@^25.5.0: - version "25.5.0" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-25.5.0.tgz#141cc23567ceb3f534526f8614ba39421383634c" - integrity sha512-EOw9QEqapsDT7mKF162m8HFzRPbmP8qJQny6ldVOdOVBz3ACgPm/1nAn5fPQ/NDaYhX/AHkrGwwkCncpAVSXcw== - dependencies: - "@jest/types" "^25.5.0" - execa "^3.2.0" - throat "^5.0.0" - -jest-cli@^25.5.4: - version "25.5.4" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-25.5.4.tgz#b9f1a84d1301a92c5c217684cb79840831db9f0d" - integrity sha512-rG8uJkIiOUpnREh1768/N3n27Cm+xPFkSNFO91tgg+8o2rXeVLStz+vkXkGr4UtzH6t1SNbjwoiswd7p4AhHTw== - dependencies: - "@jest/core" "^25.5.4" - "@jest/test-result" "^25.5.0" - "@jest/types" "^25.5.0" - chalk "^3.0.0" - exit "^0.1.2" - graceful-fs "^4.2.4" - import-local "^3.0.2" - is-ci "^2.0.0" - jest-config "^25.5.4" - jest-util "^25.5.0" - jest-validate "^25.5.0" - prompts "^2.0.1" - realpath-native "^2.0.0" - yargs "^15.3.1" - -jest-config@^25.5.4: - version "25.5.4" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-25.5.4.tgz#38e2057b3f976ef7309b2b2c8dcd2a708a67f02c" - integrity sha512-SZwR91SwcdK6bz7Gco8qL7YY2sx8tFJYzvg216DLihTWf+LKY/DoJXpM9nTzYakSyfblbqeU48p/p7Jzy05Atg== - dependencies: - "@babel/core" "^7.1.0" - "@jest/test-sequencer" "^25.5.4" - "@jest/types" "^25.5.0" - babel-jest "^25.5.1" - chalk "^3.0.0" - deepmerge "^4.2.2" - glob "^7.1.1" - graceful-fs "^4.2.4" - jest-environment-jsdom "^25.5.0" - jest-environment-node "^25.5.0" - jest-get-type "^25.2.6" - jest-jasmine2 "^25.5.4" - jest-regex-util "^25.2.6" - jest-resolve "^25.5.1" - jest-util "^25.5.0" - jest-validate "^25.5.0" - micromatch "^4.0.2" - pretty-format "^25.5.0" - realpath-native "^2.0.0" - -jest-diff@^25.5.0: - version "25.5.0" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-25.5.0.tgz#1dd26ed64f96667c068cef026b677dfa01afcfa9" - integrity sha512-z1kygetuPiREYdNIumRpAHY6RXiGmp70YHptjdaxTWGmA085W3iCnXNx0DhflK3vwrKmrRWyY1wUpkPMVxMK7A== - dependencies: - chalk "^3.0.0" - diff-sequences "^25.2.6" - jest-get-type "^25.2.6" - pretty-format "^25.5.0" - -jest-docblock@^25.3.0: - version "25.3.0" - resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-25.3.0.tgz#8b777a27e3477cd77a168c05290c471a575623ef" - integrity sha512-aktF0kCar8+zxRHxQZwxMy70stc9R1mOmrLsT5VO3pIT0uzGRSDAXxSlz4NqQWpuLjPpuMhPRl7H+5FRsvIQAg== - dependencies: - detect-newline "^3.0.0" - -jest-each@^25.5.0: - version "25.5.0" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-25.5.0.tgz#0c3c2797e8225cb7bec7e4d249dcd96b934be516" - integrity sha512-QBogUxna3D8vtiItvn54xXde7+vuzqRrEeaw8r1s+1TG9eZLVJE5ZkKoSUlqFwRjnlaA4hyKGiu9OlkFIuKnjA== - dependencies: - "@jest/types" "^25.5.0" - chalk "^3.0.0" - jest-get-type "^25.2.6" - jest-util "^25.5.0" - pretty-format "^25.5.0" - -jest-environment-jsdom@^25.5.0: - version "25.5.0" - resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-25.5.0.tgz#dcbe4da2ea997707997040ecf6e2560aec4e9834" - integrity sha512-7Jr02ydaq4jaWMZLY+Skn8wL5nVIYpWvmeatOHL3tOcV3Zw8sjnPpx+ZdeBfc457p8jCR9J6YCc+Lga0oIy62A== - dependencies: - "@jest/environment" "^25.5.0" - "@jest/fake-timers" "^25.5.0" - "@jest/types" "^25.5.0" - jest-mock "^25.5.0" - jest-util "^25.5.0" - jsdom "^15.2.1" - -jest-environment-node@*, jest-environment-node@^25.5.0: - version "25.5.0" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-25.5.0.tgz#0f55270d94804902988e64adca37c6ce0f7d07a1" - integrity sha512-iuxK6rQR2En9EID+2k+IBs5fCFd919gVVK5BeND82fYeLWPqvRcFNPKu9+gxTwfB5XwBGBvZ0HFQa+cHtIoslA== - dependencies: - "@jest/environment" "^25.5.0" - "@jest/fake-timers" "^25.5.0" - "@jest/types" "^25.5.0" - jest-mock "^25.5.0" - jest-util "^25.5.0" - semver "^6.3.0" - jest-get-type@^24.9.0: version "24.9.0" resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-24.9.0.tgz#1684a0c8a50f2e4901b6644ae861f579eed2ef0e" integrity sha512-lUseMzAley4LhIcpSP9Jf+fTrQ4a1yHQwLNeeVa2cEmbCGeoZAtYPOIv8JaxLD/sUpKxetKGP+gsHl8f8TSj8Q== -jest-get-type@^25.2.6: - version "25.2.6" - resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-25.2.6.tgz#0b0a32fab8908b44d508be81681487dbabb8d877" - integrity sha512-DxjtyzOHjObRM+sM1knti6or+eOgcGU4xVSb2HNP1TqO4ahsT+rqZg+nyqHWJSvWgKC5cG3QjGFBqxLghiF/Ig== - jest-haste-map@^24.7.1: version "24.9.0" resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-24.9.0.tgz#b38a5d64274934e21fa417ae9a9fbeb77ceaac7d" @@ -8449,49 +8079,6 @@ jest-haste-map@^24.7.1: optionalDependencies: fsevents "^1.2.7" -jest-haste-map@^25.5.1: - version "25.5.1" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-25.5.1.tgz#1df10f716c1d94e60a1ebf7798c9fb3da2620943" - integrity sha512-dddgh9UZjV7SCDQUrQ+5t9yy8iEgKc1AKqZR9YDww8xsVOtzPQSMVLDChc21+g29oTRexb9/B0bIlZL+sWmvAQ== - dependencies: - "@jest/types" "^25.5.0" - "@types/graceful-fs" "^4.1.2" - anymatch "^3.0.3" - fb-watchman "^2.0.0" - graceful-fs "^4.2.4" - jest-serializer "^25.5.0" - jest-util "^25.5.0" - jest-worker "^25.5.0" - micromatch "^4.0.2" - sane "^4.0.3" - walker "^1.0.7" - which "^2.0.2" - optionalDependencies: - fsevents "^2.1.2" - -jest-jasmine2@^25.5.4: - version "25.5.4" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-25.5.4.tgz#66ca8b328fb1a3c5364816f8958f6970a8526968" - integrity sha512-9acbWEfbmS8UpdcfqnDO+uBUgKa/9hcRh983IHdM+pKmJPL77G0sWAAK0V0kr5LK3a8cSBfkFSoncXwQlRZfkQ== - dependencies: - "@babel/traverse" "^7.1.0" - "@jest/environment" "^25.5.0" - "@jest/source-map" "^25.5.0" - "@jest/test-result" "^25.5.0" - "@jest/types" "^25.5.0" - chalk "^3.0.0" - co "^4.6.0" - expect "^25.5.0" - is-generator-fn "^2.0.0" - jest-each "^25.5.0" - jest-matcher-utils "^25.5.0" - jest-message-util "^25.5.0" - jest-runtime "^25.5.4" - jest-snapshot "^25.5.1" - jest-util "^25.5.0" - pretty-format "^25.5.0" - throat "^5.0.0" - jest-junit@^10.0.0: version "10.0.0" resolved "https://registry.yarnpkg.com/jest-junit/-/jest-junit-10.0.0.tgz#c94b91c24920a327c9d2a075e897b2dba4af494b" @@ -8503,24 +8090,6 @@ jest-junit@^10.0.0: uuid "^3.3.3" xml "^1.0.1" -jest-leak-detector@^25.5.0: - version "25.5.0" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-25.5.0.tgz#2291c6294b0ce404241bb56fe60e2d0c3e34f0bb" - integrity sha512-rV7JdLsanS8OkdDpZtgBf61L5xZ4NnYLBq72r6ldxahJWWczZjXawRsoHyXzibM5ed7C2QRjpp6ypgwGdKyoVA== - dependencies: - jest-get-type "^25.2.6" - pretty-format "^25.5.0" - -jest-matcher-utils@^25.5.0: - version "25.5.0" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-25.5.0.tgz#fbc98a12d730e5d2453d7f1ed4a4d948e34b7867" - integrity sha512-VWI269+9JS5cpndnpCwm7dy7JtGQT30UHfrnM3mXl22gHGt/b7NkjBqXfbhZ8V4B7ANUsjK18PlSBmG0YH7gjw== - dependencies: - chalk "^3.0.0" - jest-diff "^25.5.0" - jest-get-type "^25.2.6" - pretty-format "^25.5.0" - jest-message-util@^24.9.0: version "24.9.0" resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-24.9.0.tgz#527f54a1e380f5e202a8d1149b0ec872f43119e3" @@ -8556,116 +8125,21 @@ jest-mock@^24.9.0: dependencies: "@jest/types" "^24.9.0" -jest-mock@^25.5.0: - version "25.5.0" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-25.5.0.tgz#a91a54dabd14e37ecd61665d6b6e06360a55387a" - integrity sha512-eXWuTV8mKzp/ovHc5+3USJMYsTBhyQ+5A1Mak35dey/RG8GlM4YWVylZuGgVXinaW6tpvk/RSecmF37FKUlpXA== - dependencies: - "@jest/types" "^25.5.0" - jest-pnp-resolver@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.1.tgz#ecdae604c077a7fbc70defb6d517c3c1c898923a" integrity sha512-pgFw2tm54fzgYvc/OHrnysABEObZCUNFnhjoRjaVOCN8NYc032/gVjPaHD4Aq6ApkSieWtfKAFQtmDKAmhupnQ== -jest-regex-util@^25.2.1, jest-regex-util@^25.2.6: +jest-regex-util@^25.2.1: version "25.2.6" resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-25.2.6.tgz#d847d38ba15d2118d3b06390056028d0f2fd3964" integrity sha512-KQqf7a0NrtCkYmZZzodPftn7fL1cq3GQAFVMn5Hg8uKx/fIenLEobNanUxb7abQ1sjADHBseG/2FGpsv/wr+Qw== -jest-resolve-dependencies@^25.5.4: - version "25.5.4" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-25.5.4.tgz#85501f53957c8e3be446e863a74777b5a17397a7" - integrity sha512-yFmbPd+DAQjJQg88HveObcGBA32nqNZ02fjYmtL16t1xw9bAttSn5UGRRhzMHIQbsep7znWvAvnD4kDqOFM0Uw== - dependencies: - "@jest/types" "^25.5.0" - jest-regex-util "^25.2.6" - jest-snapshot "^25.5.1" - -jest-resolve@^25.5.1: - version "25.5.1" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-25.5.1.tgz#0e6fbcfa7c26d2a5fe8f456088dc332a79266829" - integrity sha512-Hc09hYch5aWdtejsUZhA+vSzcotf7fajSlPA6EZPE1RmPBAD39XtJhvHWFStid58iit4IPDLI/Da4cwdDmAHiQ== - dependencies: - "@jest/types" "^25.5.0" - browser-resolve "^1.11.3" - chalk "^3.0.0" - graceful-fs "^4.2.4" - jest-pnp-resolver "^1.2.1" - read-pkg-up "^7.0.1" - realpath-native "^2.0.0" - resolve "^1.17.0" - slash "^3.0.0" - -jest-runner@^25.5.4: - version "25.5.4" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-25.5.4.tgz#ffec5df3875da5f5c878ae6d0a17b8e4ecd7c71d" - integrity sha512-V/2R7fKZo6blP8E9BL9vJ8aTU4TH2beuqGNxHbxi6t14XzTb+x90B3FRgdvuHm41GY8ch4xxvf0ATH4hdpjTqg== - dependencies: - "@jest/console" "^25.5.0" - "@jest/environment" "^25.5.0" - "@jest/test-result" "^25.5.0" - "@jest/types" "^25.5.0" - chalk "^3.0.0" - exit "^0.1.2" - graceful-fs "^4.2.4" - jest-config "^25.5.4" - jest-docblock "^25.3.0" - jest-haste-map "^25.5.1" - jest-jasmine2 "^25.5.4" - jest-leak-detector "^25.5.0" - jest-message-util "^25.5.0" - jest-resolve "^25.5.1" - jest-runtime "^25.5.4" - jest-util "^25.5.0" - jest-worker "^25.5.0" - source-map-support "^0.5.6" - throat "^5.0.0" - -jest-runtime@^25.5.4: - version "25.5.4" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-25.5.4.tgz#dc981fe2cb2137abcd319e74ccae7f7eeffbfaab" - integrity sha512-RWTt8LeWh3GvjYtASH2eezkc8AehVoWKK20udV6n3/gC87wlTbE1kIA+opCvNWyyPeBs6ptYsc6nyHUb1GlUVQ== - dependencies: - "@jest/console" "^25.5.0" - "@jest/environment" "^25.5.0" - "@jest/globals" "^25.5.2" - "@jest/source-map" "^25.5.0" - "@jest/test-result" "^25.5.0" - "@jest/transform" "^25.5.1" - "@jest/types" "^25.5.0" - "@types/yargs" "^15.0.0" - chalk "^3.0.0" - collect-v8-coverage "^1.0.0" - exit "^0.1.2" - glob "^7.1.3" - graceful-fs "^4.2.4" - jest-config "^25.5.4" - jest-haste-map "^25.5.1" - jest-message-util "^25.5.0" - jest-mock "^25.5.0" - jest-regex-util "^25.2.6" - jest-resolve "^25.5.1" - jest-snapshot "^25.5.1" - jest-util "^25.5.0" - jest-validate "^25.5.0" - realpath-native "^2.0.0" - slash "^3.0.0" - strip-bom "^4.0.0" - yargs "^15.3.1" - jest-serializer@^24.4.0, jest-serializer@^24.9.0: version "24.9.0" resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-24.9.0.tgz#e6d7d7ef96d31e8b9079a714754c5d5c58288e73" integrity sha512-DxYipDr8OvfrKH3Kel6NdED3OXxjvxXZ1uIY2I9OFbGg+vUkkg7AGvi65qbhbWNPvDckXmzMPbK3u3HaDO49bQ== -jest-serializer@^25.5.0: - version "25.5.0" - resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-25.5.0.tgz#a993f484e769b4ed54e70e0efdb74007f503072b" - integrity sha512-LxD8fY1lByomEPflwur9o4e2a5twSQ7TaVNLlFUuToIdoJuBt8tzHfCsZ42Ok6LkKXWzFWf3AGmheuLAA7LcCA== - dependencies: - graceful-fs "^4.2.4" - jest-silent-reporter@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/jest-silent-reporter/-/jest-silent-reporter-0.2.1.tgz#554dd62b800989cdbcfba22bf30a1c0db6ad289c" @@ -8679,27 +8153,6 @@ jest-snapshot-serializer-raw@^1.1.0: resolved "https://registry.yarnpkg.com/jest-snapshot-serializer-raw/-/jest-snapshot-serializer-raw-1.1.0.tgz#1d7f09c02f3dbbc3ae70b5b7598fb2f45e37d6c8" integrity sha512-OL3bXRCnSn7Kur3YTGYj+A3Hwh2eyb5QL5VLQ9OSsPBOva7r3sCB0Jf1rOT/KN3ypzH42hrkDz96lpbiMo+AlQ== -jest-snapshot@^25.5.1: - version "25.5.1" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-25.5.1.tgz#1a2a576491f9961eb8d00c2e5fd479bc28e5ff7f" - integrity sha512-C02JE1TUe64p2v1auUJ2ze5vcuv32tkv9PyhEb318e8XOKF7MOyXdJ7kdjbvrp3ChPLU2usI7Rjxs97Dj5P0uQ== - dependencies: - "@babel/types" "^7.0.0" - "@jest/types" "^25.5.0" - "@types/prettier" "^1.19.0" - chalk "^3.0.0" - expect "^25.5.0" - graceful-fs "^4.2.4" - jest-diff "^25.5.0" - jest-get-type "^25.2.6" - jest-matcher-utils "^25.5.0" - jest-message-util "^25.5.0" - jest-resolve "^25.5.1" - make-dir "^3.0.0" - natural-compare "^1.4.0" - pretty-format "^25.5.0" - semver "^6.3.0" - jest-util@^24.0.0, jest-util@^24.9.0: version "24.9.0" resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-24.9.0.tgz#7396814e48536d2e85a37de3e4c431d7cb140162" @@ -8741,18 +8194,6 @@ jest-validate@^24.7.0, jest-validate@^24.9.0: leven "^3.1.0" pretty-format "^24.9.0" -jest-validate@^25.5.0: - version "25.5.0" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-25.5.0.tgz#fb4c93f332c2e4cf70151a628e58a35e459a413a" - integrity sha512-okUFKqhZIpo3jDdtUXUZ2LxGUZJIlfdYBvZb1aczzxrlyMlqdnnws9MOxezoLGhSaFc2XYaHNReNQfj5zPIWyQ== - dependencies: - "@jest/types" "^25.5.0" - camelcase "^5.3.1" - chalk "^3.0.0" - jest-get-type "^25.2.6" - leven "^3.1.0" - pretty-format "^25.5.0" - jest-watch-typeahead@^0.5.0: version "0.5.0" resolved "https://registry.yarnpkg.com/jest-watch-typeahead/-/jest-watch-typeahead-0.5.0.tgz#903dba6112f22daae7e90b0a271853f7ff182008" @@ -8766,7 +8207,7 @@ jest-watch-typeahead@^0.5.0: string-length "^3.1.0" strip-ansi "^6.0.0" -jest-watcher@^25.2.4, jest-watcher@^25.5.0: +jest-watcher@^25.2.4: version "25.5.0" resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-25.5.0.tgz#d6110d101df98badebe435003956fd4a465e8456" integrity sha512-XrSfJnVASEl+5+bb51V0Q7WQx65dTSk7NL4yDdVjPnRNpM0hG+ncFmDYJo9O8jaSRcAitVbuVawyXCRoxGrT5Q== @@ -8786,28 +8227,11 @@ jest-worker@^24.6.0, jest-worker@^24.9.0: merge-stream "^2.0.0" supports-color "^6.1.0" -jest-worker@^25.5.0: - version "25.5.0" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-25.5.0.tgz#2611d071b79cea0f43ee57a3d118593ac1547db1" - integrity sha512-/dsSmUkIy5EBGfv/IjjqmFxrNAUpBERfGs1oHROyD7yxjG/w+t0GOJDX8O1k32ySmd7+a5IhnJU2qQFcJ4n1vw== - dependencies: - merge-stream "^2.0.0" - supports-color "^7.0.0" - jest-zone-patch@*: version "0.0.10" resolved "https://registry.yarnpkg.com/jest-zone-patch/-/jest-zone-patch-0.0.10.tgz#58252f44ab4aad45aaed62a705819577b9709b82" integrity sha512-K5uHLHgMgi2Eyj74gbY+xSeGGekb5U48bXsgDwgipRbFdaekyZK+TAcp8auamqU4UjrAt5S4sIUZz/2bBNyTTA== -jest@*: - version "25.5.4" - resolved "https://registry.yarnpkg.com/jest/-/jest-25.5.4.tgz#f21107b6489cfe32b076ce2adcadee3587acb9db" - integrity sha512-hHFJROBTqZahnO+X+PMtT6G2/ztqAZJveGqz//FnWWHurizkD05PQGzRZOhF3XP6z7SJmL+5tCfW8qV06JypwQ== - dependencies: - "@jest/core" "^25.5.4" - import-local "^3.0.2" - jest-cli "^25.5.4" - jetifier@^1.6.2: version "1.6.5" resolved "https://registry.yarnpkg.com/jetifier/-/jetifier-1.6.5.tgz#ea87324a4230bef20a9651178ecab978ee54a8cb" @@ -8855,38 +8279,6 @@ jsc-android@^245459.0.0: resolved "https://registry.yarnpkg.com/jsc-android/-/jsc-android-245459.0.0.tgz#e584258dd0b04c9159a27fb104cd5d491fd202c9" integrity sha512-wkjURqwaB1daNkDi2OYYbsLnIdC/lUM2nPXQKRs5pqEU9chDg435bjvo+LSaHotDENygHQDHe+ntUkkw2gwMtg== -jsdom@^15.2.1: - version "15.2.1" - resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-15.2.1.tgz#d2feb1aef7183f86be521b8c6833ff5296d07ec5" - integrity sha512-fAl1W0/7T2G5vURSyxBzrJ1LSdQn6Tr5UX/xD4PXDx/PDgwygedfW6El/KIj3xJ7FU61TTYnc/l/B7P49Eqt6g== - dependencies: - abab "^2.0.0" - acorn "^7.1.0" - acorn-globals "^4.3.2" - array-equal "^1.0.0" - cssom "^0.4.1" - cssstyle "^2.0.0" - data-urls "^1.1.0" - domexception "^1.0.1" - escodegen "^1.11.1" - html-encoding-sniffer "^1.0.2" - nwsapi "^2.2.0" - parse5 "5.1.0" - pn "^1.1.0" - request "^2.88.0" - request-promise-native "^1.0.7" - saxes "^3.1.9" - symbol-tree "^3.2.2" - tough-cookie "^3.0.1" - w3c-hr-time "^1.0.1" - w3c-xmlserializer "^1.1.2" - webidl-conversions "^4.0.2" - whatwg-encoding "^1.0.5" - whatwg-mimetype "^2.3.0" - whatwg-url "^7.0.0" - ws "^7.0.0" - xml-name-validator "^3.0.0" - jsdom@^16.2.2: version "16.2.2" resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-16.2.2.tgz#76f2f7541646beb46a938f5dc476b88705bedf2b" @@ -9408,13 +8800,6 @@ logkitty@^0.6.0: dayjs "^1.8.15" yargs "^12.0.5" -lolex@^5.0.0: - version "5.1.2" - resolved "https://registry.yarnpkg.com/lolex/-/lolex-5.1.2.tgz#953694d098ce7c07bc5ed6d0e42bc6c0c6d5a367" - integrity sha512-h4hmjAvHTmd+25JSwrtTIuwbKdwg5NzZVRMLn9saij4SZaepCrTCxPr35H/3bjwfMJtN+t3CX8672UIkglz28A== - dependencies: - "@sinonjs/commons" "^1.7.0" - longest@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" @@ -10320,17 +9705,6 @@ node-modules-regexp@^1.0.0: resolved "https://registry.yarnpkg.com/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz#8d9dbe28964a4ac5712e9131642107c71e90ec40" integrity sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA= -node-notifier@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-6.0.0.tgz#cea319e06baa16deec8ce5cd7f133c4a46b68e12" - integrity sha512-SVfQ/wMw+DesunOm5cKqr6yDcvUTDl/yc97ybGHMrteNEY6oekXpNpS3lZwgLlwz0FLgHoiW28ZpmBHUDg37cw== - dependencies: - growly "^1.3.0" - is-wsl "^2.1.1" - semver "^6.3.0" - shellwords "^0.1.1" - which "^1.3.1" - node-notifier@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-7.0.0.tgz#513bc42f2aa3a49fce1980a7ff375957c71f718a" @@ -10810,11 +10184,6 @@ p-finally@^1.0.0: resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= -p-finally@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-2.0.1.tgz#bd6fcaa9c559a096b680806f4d657b3f0f240561" - integrity sha512-vpm09aKwq6H9phqRQzecoDpD8TmVyGw70qmWlyq5onxY7tqyTTFVvxMykxQSQKILBSFlbXpypIw2T1Ml7+DDtw== - p-is-promise@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-1.1.0.tgz#9c9456989e9f6588017b0434d56097675c3da05e" @@ -11001,11 +10370,6 @@ parse-url@^5.0.0: parse-path "^4.0.0" protocols "^1.4.0" -parse5@5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/parse5/-/parse5-5.1.0.tgz#c59341c9723f414c452975564c7c00a68d58acd2" - integrity sha512-fxNG2sQjHvlVAYmzBZS9YlDp6PTSSDwa98vkD4QgVDDCAo84z5X1t5XyJQ62ImdLXx5NdIIfihey6xpum9/gRQ== - parse5@5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/parse5/-/parse5-5.1.1.tgz#f68e4e5ba1852ac2cadc00f4555fff6c2abb6178" @@ -11205,11 +10569,6 @@ plugin-error@^0.1.2: arr-union "^2.0.1" extend-shallow "^1.1.2" -pn@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/pn/-/pn-1.1.0.tgz#e2f4cef0e219f463c179ab37463e4e1ecdccbafb" - integrity sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA== - portfinder@^1.0.25: version "1.0.26" resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.26.tgz#475658d56ca30bed72ac7f1378ed350bd1b64e70" @@ -11550,7 +10909,7 @@ pretty-format@^24.7.0, pretty-format@^24.8.0, pretty-format@^24.9.0: ansi-styles "^3.2.0" react-is "^16.8.4" -pretty-format@^25.2.0, pretty-format@^25.5.0: +pretty-format@^25.2.0: version "25.5.0" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-25.5.0.tgz#7873c1d774f682c34b8d48b6743a2bf2ac55791a" integrity sha512-kbo/kq2LQ/A/is0PQwsEHM7Ca6//bGPPvU6UnsdDRSKTWxT/ru/xb88v4BJf6a69H+uTytOEsTusT9ksd/1iWQ== @@ -12100,11 +11459,6 @@ readdirp@~3.4.0: dependencies: picomatch "^2.2.1" -realpath-native@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/realpath-native/-/realpath-native-2.0.0.tgz#7377ac429b6e1fd599dc38d08ed942d0d7beb866" - integrity sha512-v1SEYUOXXdbBZK8ZuNgO4TBjamPsiSgcFr0aP+tEKpQZK8vooEUqV6nm6Cv502mX4NF2EfsnVqtNAHG+/6Ur1Q== - rechoir@^0.6.2: version "0.6.2" resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" @@ -12301,7 +11655,7 @@ request-promise-core@1.1.3: dependencies: lodash "^4.17.15" -request-promise-native@^1.0.7, request-promise-native@^1.0.8: +request-promise-native@^1.0.8: version "1.0.8" resolved "https://registry.yarnpkg.com/request-promise-native/-/request-promise-native-1.0.8.tgz#a455b960b826e44e2bf8999af64dff2bfe58cb36" integrity sha512-dapwLGqkHtwL5AEbfenuzjTYg35Jd6KPytsC2/TLkVMz8rm+tNt72MGUWT1RP/aYawMpN6HqbNGBQaRcBtjQMQ== @@ -12403,11 +11757,6 @@ resolve-url@^0.2.1: resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= -resolve@1.1.7: - version "1.1.7" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" - integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs= - resolve@^1.1.6, resolve@^1.10.0, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.15.0, resolve@^1.15.1, resolve@^1.17.0, resolve@^1.3.2, resolve@^1.5.0, resolve@^1.8.1: version "1.17.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" @@ -12604,13 +11953,6 @@ sax@^1.2.1, sax@^1.2.4, sax@~1.2.4: resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== -saxes@^3.1.9: - version "3.1.11" - resolved "https://registry.yarnpkg.com/saxes/-/saxes-3.1.11.tgz#d59d1fd332ec92ad98a2e0b2ee644702384b1c5b" - integrity sha512-Ydydq3zC+WYDJK1+gRxRapLIED9PWeSuuS41wqyoRmzvhhh9nc+QQrVMKJYzJFULazeGhzSV0QleN2wD3boh2g== - dependencies: - xmlchars "^2.1.1" - saxes@^5.0.0: version "5.0.1" resolved "https://registry.yarnpkg.com/saxes/-/saxes-5.0.1.tgz#eebab953fa3b7608dbe94e5dadb15c888fa6696d" @@ -13490,7 +12832,7 @@ symbol-observable@1.0.1: resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.1.tgz#8340fc4702c3122df5d22288f88283f513d3fdd4" integrity sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ= -symbol-tree@^3.2.2, symbol-tree@^3.2.4: +symbol-tree@^3.2.4: version "3.2.4" resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== @@ -14330,22 +13672,13 @@ vlq@^1.0.0: resolved "https://registry.yarnpkg.com/vlq/-/vlq-1.0.1.tgz#c003f6e7c0b4c1edd623fd6ee50bbc0d6a1de468" integrity sha512-gQpnTgkubC6hQgdIcRdYGDSDc+SaujOdyesZQMv6JlfQee/9Mp0Qhnys6WxDWvQnL5WZdT7o2Ul187aSt0Rq+w== -w3c-hr-time@^1.0.1, w3c-hr-time@^1.0.2: +w3c-hr-time@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz#0a89cdf5cc15822df9c360543676963e0cc308cd" integrity sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ== dependencies: browser-process-hrtime "^1.0.0" -w3c-xmlserializer@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/w3c-xmlserializer/-/w3c-xmlserializer-1.1.2.tgz#30485ca7d70a6fd052420a3d12fd90e6339ce794" - integrity sha512-p10l/ayESzrBMYWRID6xbuCKh2Fp77+sA0doRuGn4tTIMrrZVeqfpKjXHY+oDh3K4nLdPgNwMTVP6Vp4pvqbNg== - dependencies: - domexception "^1.0.1" - webidl-conversions "^4.0.2" - xml-name-validator "^3.0.0" - w3c-xmlserializer@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/w3c-xmlserializer/-/w3c-xmlserializer-2.0.0.tgz#3e7104a05b75146cc60f564380b7f683acf1020a" @@ -14410,7 +13743,7 @@ websocket-extensions@>=0.1.1: resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.3.tgz#5d2ff22977003ec687a4b87073dfbbac146ccf29" integrity sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg== -whatwg-encoding@^1.0.1, whatwg-encoding@^1.0.5: +whatwg-encoding@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz#5abacf777c32166a51d085d6b4f3e7d27113ddb0" integrity sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw== @@ -14427,7 +13760,7 @@ whatwg-fetch@>=0.10.0, whatwg-fetch@^3.0.0: resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-3.0.0.tgz#fc804e458cc460009b1a2b966bc8817d2578aefb" integrity sha512-9GSJUgz1D4MfyKU7KRqwOjXCXTqWdFNvEr7eUBYchQiVc744mqK/MzXPNR2WsPkmkOa4ywfg8C2n8h+13Bey1Q== -whatwg-mimetype@^2.2.0, whatwg-mimetype@^2.3.0: +whatwg-mimetype@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz#3d4b1e0312d2079879f826aff18dbeeca5960fbf" integrity sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g== @@ -14618,7 +13951,7 @@ ws@^1.1.0, ws@^1.1.5: options ">=0.0.5" ultron "1.0.x" -ws@^7, ws@^7.0.0, ws@^7.2.3: +ws@^7, ws@^7.2.3: version "7.2.5" resolved "https://registry.yarnpkg.com/ws/-/ws-7.2.5.tgz#abb1370d4626a5a9cd79d8de404aa18b3465d10d" integrity sha512-C34cIU4+DB2vMyAbmEKossWq2ZQDr6QEyuuCzWrM9zfw1sGc0mYiJ0UnG9zzNykt49C2Fi34hvr2vssFQRS6EA== @@ -14663,7 +13996,7 @@ xmlbuilder@^9.0.7: resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-9.0.7.tgz#132ee63d2ec5565c557e20f4c22df9aca686b10d" integrity sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0= -xmlchars@^2.1.1, xmlchars@^2.2.0: +xmlchars@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb" integrity sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw== From 3669a86e2cf4fcee1c62fced76bcde51527e4924 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Mon, 4 May 2020 20:01:32 +0200 Subject: [PATCH 078/106] docs: create v26, fold v25.x into a single version (#9956) --- .../version-25.1/Configuration.md | 1197 ----------------- .../version-25.1/TutorialReact.md | 341 ----- .../version-25.3/JestObjectAPI.md | 672 --------- .../{version-25.3 => version-25.x}/CLI.md | 2 +- .../Configuration.md | 2 +- .../Es6ClassMocks.md | 2 +- .../ExpectAPI.md | 2 +- .../GlobalAPI.md | 2 +- .../JestObjectAPI.md | 2 +- .../JestPlatform.md | 6 +- .../MockFunctions.md | 2 +- .../TestingAsyncCode.md | 2 +- .../TestingFrameworks.md | 2 +- .../Troubleshooting.md | 2 +- .../TutorialAsync.md | 2 +- .../TutorialReact.md | 2 +- .../TutorialReactNative.md | 2 +- .../{version-25.1 => version-26.0}/CLI.md | 10 +- .../Configuration.md | 30 +- .../JestPlatform.md | 2 +- website/versions.json | 5 +- 21 files changed, 36 insertions(+), 2253 deletions(-) delete mode 100644 website/versioned_docs/version-25.1/Configuration.md delete mode 100644 website/versioned_docs/version-25.1/TutorialReact.md delete mode 100644 website/versioned_docs/version-25.3/JestObjectAPI.md rename website/versioned_docs/{version-25.3 => version-25.x}/CLI.md (99%) rename website/versioned_docs/{version-25.5 => version-25.x}/Configuration.md (99%) rename website/versioned_docs/{version-25.5 => version-25.x}/Es6ClassMocks.md (99%) rename website/versioned_docs/{version-25.1 => version-25.x}/ExpectAPI.md (99%) rename website/versioned_docs/{version-25.5 => version-25.x}/GlobalAPI.md (99%) rename website/versioned_docs/{version-25.5 => version-25.x}/JestObjectAPI.md (99%) rename website/versioned_docs/{version-25.1 => version-25.x}/JestPlatform.md (93%) rename website/versioned_docs/{version-25.1 => version-25.x}/MockFunctions.md (99%) rename website/versioned_docs/{version-25.3 => version-25.x}/TestingAsyncCode.md (99%) rename website/versioned_docs/{version-25.1 => version-25.x}/TestingFrameworks.md (98%) rename website/versioned_docs/{version-25.1 => version-25.x}/Troubleshooting.md (99%) rename website/versioned_docs/{version-25.1 => version-25.x}/TutorialAsync.md (99%) rename website/versioned_docs/{version-25.3 => version-25.x}/TutorialReact.md (99%) rename website/versioned_docs/{version-25.3 => version-25.x}/TutorialReactNative.md (99%) rename website/versioned_docs/{version-25.1 => version-26.0}/CLI.md (93%) rename website/versioned_docs/{version-25.3 => version-26.0}/Configuration.md (97%) rename website/versioned_docs/{version-25.5 => version-26.0}/JestPlatform.md (99%) diff --git a/website/versioned_docs/version-25.1/Configuration.md b/website/versioned_docs/version-25.1/Configuration.md deleted file mode 100644 index 41af1a1b9b47..000000000000 --- a/website/versioned_docs/version-25.1/Configuration.md +++ /dev/null @@ -1,1197 +0,0 @@ ---- -id: version-25.1-configuration -title: Configuring Jest -original_id: configuration ---- - -Jest's configuration can be defined in the `package.json` file of your project, or through a `jest.config.js` file or through the `--config ` option. If you'd like to use your `package.json` to store Jest's config, the `"jest"` key should be used on the top level so Jest will know how to find your settings: - -```json -{ - "name": "my-project", - "jest": { - "verbose": true - } -} -``` - -Or through JavaScript: - -```js -// jest.config.js -module.exports = { - verbose: true, -}; -``` - -Please keep in mind that the resulting configuration must be JSON-serializable. - -When using the `--config` option, the JSON file must not contain a "jest" key: - -```json -{ - "bail": 1, - "verbose": true -} -``` - -## Options - -These options let you control Jest's behavior in your `package.json` file. The Jest philosophy is to work great by default, but sometimes you just need more configuration power. - -### Defaults - -You can retrieve Jest's default options to expand them if needed: - -```js -// jest.config.js -const {defaults} = require('jest-config'); -module.exports = { - // ... - moduleFileExtensions: [...defaults.moduleFileExtensions, 'ts', 'tsx'], - // ... -}; -``` - - - ---- - -## Reference - -### `automock` [boolean] - -Default: `false` - -This option tells Jest that all imported modules in your tests should be mocked automatically. All modules used in your tests will have a replacement implementation, keeping the API surface. - -Example: - -```js -// utils.js -export default { - authorize: () => { - return 'token'; - }, - isAuthorized: secret => secret === 'wizard', -}; -``` - -```js -//__tests__/automocking.test.js -import utils from '../utils'; - -test('if utils mocked automatically', () => { - // Public methods of `utils` are now mock functions - expect(utils.authorize.mock).toBeTruthy(); - expect(utils.isAuthorized.mock).toBeTruthy(); - - // You can provide them with your own implementation - // or pass the expected return value - utils.authorize.mockReturnValue('mocked_token'); - utils.isAuthorized.mockReturnValue(true); - - expect(utils.authorize()).toBe('mocked_token'); - expect(utils.isAuthorized('not_wizard')).toBeTruthy(); -}); -``` - -_Note: Node modules are automatically mocked when you have a manual mock in place (e.g.: `__mocks__/lodash.js`). More info [here](manual-mocks.html#mocking-node-modules)._ - -_Note: Core modules, like `fs`, are not mocked by default. They can be mocked explicitly, like `jest.mock('fs')`._ - -### `bail` [number | boolean] - -Default: `0` - -By default, Jest runs all tests and produces all errors into the console upon completion. The bail config option can be used here to have Jest stop running tests after `n` failures. Setting bail to `true` is the same as setting bail to `1`. - -### `browser` [boolean] - -Default: `false` - -Respect Browserify's [`"browser"` field](https://github.com/substack/browserify-handbook#browser-field) in `package.json` when resolving modules. Some modules export different versions based on whether they are operating in Node or a browser. - -### `cacheDirectory` [string] - -Default: `"/tmp/"` - -The directory where Jest should store its cached dependency information. - -Jest attempts to scan your dependency tree once (up-front) and cache it in order to ease some of the filesystem raking that needs to happen while running tests. This config option lets you customize where Jest stores that cache data on disk. - -### `clearMocks` [boolean] - -Default: `false` - -Automatically clear mock calls and instances before every test. Equivalent to calling `jest.clearAllMocks()` before each test. This does not remove any mock implementation that may have been provided. - -### `collectCoverage` [boolean] - -Default: `false` - -Indicates whether the coverage information should be collected while executing the test. Because this retrofits all executed files with coverage collection statements, it may significantly slow down your tests. - -### `collectCoverageFrom` [array] - -Default: `undefined` - -An array of [glob patterns](https://github.com/jonschlinkert/micromatch) indicating a set of files for which coverage information should be collected. If a file matches the specified glob pattern, coverage information will be collected for it even if no tests exist for this file and it's never required in the test suite. - -Example: - -```json -{ - "collectCoverageFrom": [ - "**/*.{js,jsx}", - "!**/node_modules/**", - "!**/vendor/**" - ] -} -``` - -This will collect coverage information for all the files inside the project's `rootDir`, except the ones that match `**/node_modules/**` or `**/vendor/**`. - -_Note: This option requires `collectCoverage` to be set to true or Jest to be invoked with `--coverage`._ - -
- Help: - If you are seeing coverage output such as... - -``` -=============================== Coverage summary =============================== -Statements : Unknown% ( 0/0 ) -Branches : Unknown% ( 0/0 ) -Functions : Unknown% ( 0/0 ) -Lines : Unknown% ( 0/0 ) -================================================================================ -Jest: Coverage data for global was not found. -``` - -Most likely your glob patterns are not matching any files. Refer to the [micromatch](https://github.com/jonschlinkert/micromatch) documentation to ensure your globs are compatible. - -
- -### `coverageDirectory` [string] - -Default: `undefined` - -The directory where Jest should output its coverage files. - -### `coveragePathIgnorePatterns` [array\] - -Default: `["/node_modules/"]` - -An array of regexp pattern strings that are matched against all file paths before executing the test. If the file path matches any of the patterns, coverage information will be skipped. - -These pattern strings match against the full path. Use the `` string token to include the path to your project's root directory to prevent it from accidentally ignoring all of your files in different environments that may have different root directories. Example: `["/build/", "/node_modules/"]`. - -### `coverageProvider` [string] - -Indicates which provider should be used to instrument code for coverage. Allowed values are `babel` (default) or `v8`. - -Note that using `v8` is considered experimental. This uses V8's builtin code coverage rather than one based on Babel and comes with a few caveats - -1. Your node version must include `vm.compileFunction`, which was introduced in [node 10.10](https://nodejs.org/dist/latest-v12.x/docs/api/vm.html#vm_vm_compilefunction_code_params_options) -1. Tests needs to run in Node test environment (support for `jsdom` requires [`jest-environment-jsdom-sixteen`](https://www.npmjs.com/package/jest-environment-jsdom-sixteen)) -1. V8 has way better data in the later versions, so using the latest versions of node (v13 at the time of this writing) will yield better results - -### `coverageReporters` [array\] - -Default: `["json", "lcov", "text", "clover"]` - -A list of reporter names that Jest uses when writing coverage reports. Any [istanbul reporter](https://github.com/istanbuljs/istanbuljs/tree/master/packages/istanbul-reports/lib) can be used. - -_Note: Setting this option overwrites the default values. Add `"text"` or `"text-summary"` to see a coverage summary in the console output._ - -### `coverageThreshold` [object] - -Default: `undefined` - -This will be used to configure minimum threshold enforcement for coverage results. Thresholds can be specified as `global`, as a [glob](https://github.com/isaacs/node-glob#glob-primer), and as a directory or file path. If thresholds aren't met, jest will fail. Thresholds specified as a positive number are taken to be the minimum percentage required. Thresholds specified as a negative number represent the maximum number of uncovered entities allowed. - -For example, with the following configuration jest will fail if there is less than 80% branch, line, and function coverage, or if there are more than 10 uncovered statements: - -```json -{ - ... - "jest": { - "coverageThreshold": { - "global": { - "branches": 80, - "functions": 80, - "lines": 80, - "statements": -10 - } - } - } -} -``` - -If globs or paths are specified alongside `global`, coverage data for matching paths will be subtracted from overall coverage and thresholds will be applied independently. Thresholds for globs are applied to all files matching the glob. If the file specified by path is not found, error is returned. - -For example, with the following configuration: - -```json -{ - ... - "jest": { - "coverageThreshold": { - "global": { - "branches": 50, - "functions": 50, - "lines": 50, - "statements": 50 - }, - "./src/components/": { - "branches": 40, - "statements": 40 - }, - "./src/reducers/**/*.js": { - "statements": 90 - }, - "./src/api/very-important-module.js": { - "branches": 100, - "functions": 100, - "lines": 100, - "statements": 100 - } - } - } -} -``` - -Jest will fail if: - -- The `./src/components` directory has less than 40% branch or statement coverage. -- One of the files matching the `./src/reducers/**/*.js` glob has less than 90% statement coverage. -- The `./src/api/very-important-module.js` file has less than 100% coverage. -- Every remaining file combined has less than 50% coverage (`global`). - -### `dependencyExtractor` [string] - -Default: `undefined` - -This option allows the use of a custom dependency extractor. It must be a node module that exports an object with an `extract` function. E.g.: - -```javascript -const fs = require('fs'); -const crypto = require('crypto'); - -module.exports = { - extract(code, filePath, defaultExtract) { - const deps = defaultExtract(code, filePath); - // Scan the file and add dependencies in `deps` (which is a `Set`) - return deps; - }, - getCacheKey() { - return crypto - .createHash('md5') - .update(fs.readFileSync(__filename)) - .digest('hex'); - }, -}; -``` - -The `extract` function should return an iterable (`Array`, `Set`, etc.) with the dependencies found in the code. - -That module can also contain a `getCacheKey` function to generate a cache key to determine if the logic has changed and any cached artifacts relying on it should be discarded. - -### `displayName` [string, object] - -default: `undefined` - -Allows for a label to be printed along side a test while it is running. This becomes more useful in multiproject repositories where there can be many jest configuration files. This visually tells which project a test belongs to. Here are sample valid values. - -```js -module.exports = { - displayName: 'CLIENT', -}; -``` - -or - -```js -module.exports = { - displayName: { - name: 'CLIENT', - color: 'blue', - }, -}; -``` - -As a secondary option, an object with the properties `name` and `color` can be passed. This allows for a custom configuration of the background color of the displayName. `displayName` defaults to white when its value is a string. Jest uses [chalk](https://github.com/chalk/chalk) to provide the color. As such, all of the valid options for colors supported by chalk are also supported by jest. - -### `errorOnDeprecated` [boolean] - -Default: `false` - -Make calling deprecated APIs throw helpful error messages. Useful for easing the upgrade process. - -### `extraGlobals` [array\] - -Default: `undefined` - -Test files run inside a [vm](https://nodejs.org/api/vm.html), which slows calls to global context properties (e.g. `Math`). With this option you can specify extra properties to be defined inside the vm for faster lookups. - -For example, if your tests call `Math` often, you can pass it by setting `extraGlobals`. - -```json -{ - ... - "jest": { - "extraGlobals": ["Math"] - } -} -``` - -### `forceCoverageMatch` [array\] - -Default: `['']` - -Test files are normally ignored from collecting code coverage. With this option, you can overwrite this behavior and include otherwise ignored files in code coverage. - -For example, if you have tests in source files named with `.t.js` extension as following: - -```javascript -// sum.t.js - -export function sum(a, b) { - return a + b; -} - -if (process.env.NODE_ENV === 'test') { - test('sum', () => { - expect(sum(1, 2)).toBe(3); - }); -} -``` - -You can collect coverage from those files with setting `forceCoverageMatch`. - -```json -{ - ... - "jest": { - "forceCoverageMatch": ["**/*.t.js"] - } -} -``` - -### `globals` [object] - -Default: `{}` - -A set of global variables that need to be available in all test environments. - -For example, the following would create a global `__DEV__` variable set to `true` in all test environments: - -```json -{ - ... - "jest": { - "globals": { - "__DEV__": true - } - } -} -``` - -Note that, if you specify a global reference value (like an object or array) here, and some code mutates that value in the midst of running a test, that mutation will _not_ be persisted across test runs for other test files. In addition the `globals` object must be json-serializable, so it can't be used to specify global functions. For that you should use `setupFiles`. - -### `globalSetup` [string] - -Default: `undefined` - -This option allows the use of a custom global setup module which exports an async function that is triggered once before all test suites. This function gets Jest's `globalConfig` object as a parameter. - -_Note: A global setup module configured in a project (using multi-project runner) will be triggered only when you run at least one test from this project._ - -_Note: Any global variables that are defined through `globalSetup` can only be read in `globalTeardown`. You cannot retrieve globals defined here in your test suites._ - -_Note: While code transformation is applied to the linked setup-file, Jest will **not** transform any code in `node_modules`. This is due to the need to load the actual transformers (e.g. `babel` or `typescript`) to perform transformation._ - -Example: - -```js -// setup.js -module.exports = async () => { - // ... - // Set reference to mongod in order to close the server during teardown. - global.__MONGOD__ = mongod; -}; -``` - -```js -// teardown.js -module.exports = async function () { - await global.__MONGOD__.stop(); -}; -``` - -### `globalTeardown` [string] - -Default: `undefined` - -This option allows the use of a custom global teardown module which exports an async function that is triggered once after all test suites. This function gets Jest's `globalConfig` object as a parameter. - -_Note: A global teardown module configured in a project (using multi-project runner) will be triggered only when you run at least one test from this project._ - -_Note: The same caveat concerning transformation of `node_modules` as for `globalSetup` applies to `globalTeardown`._ - -### `maxConcurrency` [number] - -Default: `5` - -A number limiting the number of tests that are allowed to run at the same time when using `test.concurrent`. Any test above this limit will be queued and executed once a slot is released. - -### `moduleDirectories` [array\] - -Default: `["node_modules"]` - -An array of directory names to be searched recursively up from the requiring module's location. Setting this option will _override_ the default, if you wish to still search `node_modules` for packages include it along with any other options: `["node_modules", "bower_components"]` - -### `moduleFileExtensions` [array\] - -Default: `["js", "json", "jsx", "ts", "tsx", "node"]` - -An array of file extensions your modules use. If you require modules without specifying a file extension, these are the extensions Jest will look for, in left-to-right order. - -We recommend placing the extensions most commonly used in your project on the left, so if you are using TypeScript, you may want to consider moving "ts" and/or "tsx" to the beginning of the array. - -### `moduleNameMapper` [object\] - -Default: `null` - -A map from regular expressions to module names that allow to stub out resources, like images or styles with a single module. - -Modules that are mapped to an alias are unmocked by default, regardless of whether automocking is enabled or not. - -Use `` string token to refer to [`rootDir`](#rootdir-string) value if you want to use file paths. - -Additionally, you can substitute captured regex groups using numbered backreferences. - -Example: - -```json -{ - "moduleNameMapper": { - "^image![a-zA-Z0-9$_-]+$": "GlobalImageStub", - "^[./a-zA-Z0-9$_-]+\\.png$": "/RelativeImageStub.js", - "module_name_(.*)": "/substituted_module_$1.js" - } -} -``` - -The order in which the mappings are defined matters. Patterns are checked one by one until one fits. The most specific rule should be listed first. - -_Note: If you provide module name without boundaries `^$` it may cause hard to spot errors. E.g. `relay` will replace all modules which contain `relay` as a substring in its name: `relay`, `react-relay` and `graphql-relay` will all be pointed to your stub._ - -### `modulePathIgnorePatterns` [array\] - -Default: `[]` - -An array of regexp pattern strings that are matched against all module paths before those paths are to be considered 'visible' to the module loader. If a given module's path matches any of the patterns, it will not be `require()`-able in the test environment. - -These pattern strings match against the full path. Use the `` string token to include the path to your project's root directory to prevent it from accidentally ignoring all of your files in different environments that may have different root directories. Example: `["/build/"]`. - -### `modulePaths` [array\] - -Default: `[]` - -An alternative API to setting the `NODE_PATH` env variable, `modulePaths` is an array of absolute paths to additional locations to search when resolving modules. Use the `` string token to include the path to your project's root directory. Example: `["/app/"]`. - -### `notify` [boolean] - -Default: `false` - -Activates notifications for test results. - -### `notifyMode` [string] - -Default: `failure-change` - -Specifies notification mode. Requires `notify: true`. - -#### Modes - -- `always`: always send a notification. -- `failure`: send a notification when tests fail. -- `success`: send a notification when tests pass. -- `change`: send a notification when the status changed. -- `success-change`: send a notification when tests pass or once when it fails. -- `failure-change`: send a notification when tests fail or once when it passes. - -### `preset` [string] - -Default: `undefined` - -A preset that is used as a base for Jest's configuration. A preset should point to an npm module that has a `jest-preset.json` or `jest-preset.js` file at the root. - -For example, this preset `foo-bar/jest-preset.js` will be configured as follows: - -```json -{ - "preset": "foo-bar" -} -``` - -Presets may also be relative filesystem paths. - -```json -{ - "preset": "./node_modules/foo-bar/jest-preset.js" -} -``` - -### `prettierPath` [string] - -Default: `'prettier'` - -Sets the path to the [`prettier`](https://prettier.io/) node module used to update inline snapshots. - -### `projects` [array\] - -Default: `undefined` - -When the `projects` configuration is provided with an array of paths or glob patterns, Jest will run tests in all of the specified projects at the same time. This is great for monorepos or when working on multiple projects at the same time. - -```json -{ - "projects": ["", "/examples/*"] -} -``` - -This example configuration will run Jest in the root directory as well as in every folder in the examples directory. You can have an unlimited amount of projects running in the same Jest instance. - -The projects feature can also be used to run multiple configurations or multiple [runners](#runner-string). For this purpose you can pass an array of configuration objects. For example, to run both tests and ESLint (via [jest-runner-eslint](https://github.com/jest-community/jest-runner-eslint)) in the same invocation of Jest: - -```json -{ - "projects": [ - { - "displayName": "test" - }, - { - "displayName": "lint", - "runner": "jest-runner-eslint", - "testMatch": ["/**/*.js"] - } - ] -} -``` - -_Note: When using multi project runner, it's recommended to add a `displayName` for each project. This will show the `displayName` of a project next to its tests._ - -### `reporters` [array\] - -Default: `undefined` - -Use this configuration option to add custom reporters to Jest. A custom reporter is a class that implements `onRunStart`, `onTestStart`, `onTestResult`, `onRunComplete` methods that will be called when any of those events occurs. - -If custom reporters are specified, the default Jest reporters will be overridden. To keep default reporters, `default` can be passed as a module name. - -This will override default reporters: - -```json -{ - "reporters": ["/my-custom-reporter.js"] -} -``` - -This will use custom reporter in addition to default reporters that Jest provides: - -```json -{ - "reporters": ["default", "/my-custom-reporter.js"] -} -``` - -Additionally, custom reporters can be configured by passing an `options` object as a second argument: - -```json -{ - "reporters": [ - "default", - ["/my-custom-reporter.js", {"banana": "yes", "pineapple": "no"}] - ] -} -``` - -Custom reporter modules must define a class that takes a `GlobalConfig` and reporter options as constructor arguments: - -Example reporter: - -```js -// my-custom-reporter.js -class MyCustomReporter { - constructor(globalConfig, options) { - this._globalConfig = globalConfig; - this._options = options; - } - - onRunComplete(contexts, results) { - console.log('Custom reporter output:'); - console.log('GlobalConfig: ', this._globalConfig); - console.log('Options: ', this._options); - } -} - -module.exports = MyCustomReporter; -// or export default MyCustomReporter; -``` - -Custom reporters can also force Jest to exit with non-0 code by returning an Error from `getLastError()` methods - -```js -class MyCustomReporter { - // ... - getLastError() { - if (this._shouldFail) { - return new Error('my-custom-reporter.js reported an error'); - } - } -} -``` - -For the full list of methods and argument types see `Reporter` interface in [packages/jest-reporters/src/types.ts](https://github.com/facebook/jest/blob/master/packages/jest-reporters/src/types.ts) - -### `resetMocks` [boolean] - -Default: `false` - -Automatically reset mock state before every test. Equivalent to calling `jest.resetAllMocks()` before each test. This will lead to any mocks having their fake implementations removed but does not restore their initial implementation. - -### `resetModules` [boolean] - -Default: `false` - -By default, each test file gets its own independent module registry. Enabling `resetModules` goes a step further and resets the module registry before running each individual test. This is useful to isolate modules for every test so that local module state doesn't conflict between tests. This can be done programmatically using [`jest.resetModules()`](JestObjectAPI.md#jestresetmodules). - -### `resolver` [string] - -Default: `undefined` - -This option allows the use of a custom resolver. This resolver must be a node module that exports a function expecting a string as the first argument for the path to resolve and an object with the following structure as the second argument: - -```json -{ - "basedir": string, - "browser": bool, - "defaultResolver": "function(request, options)", - "extensions": [string], - "moduleDirectory": [string], - "paths": [string], - "rootDir": [string] -} -``` - -The function should either return a path to the module that should be resolved or throw an error if the module can't be found. - -Note: the defaultResolver passed as options is the jest default resolver which might be useful when you write your custom one. It takes the same arguments as your custom one, e.g. (request, options). - -### `restoreMocks` [boolean] - -Default: `false` - -Automatically restore mock state before every test. Equivalent to calling `jest.restoreAllMocks()` before each test. This will lead to any mocks having their fake implementations removed and restores their initial implementation. - -### `rootDir` [string] - -Default: The root of the directory containing your Jest [config file](#) _or_ the `package.json` _or_ the [`pwd`](http://en.wikipedia.org/wiki/Pwd) if no `package.json` is found - -The root directory that Jest should scan for tests and modules within. If you put your Jest config inside your `package.json` and want the root directory to be the root of your repo, the value for this config param will default to the directory of the `package.json`. - -Oftentimes, you'll want to set this to `'src'` or `'lib'`, corresponding to where in your repository the code is stored. - -_Note that using `''` as a string token in any other path-based config settings will refer back to this value. So, for example, if you want your [`setupFiles`](#setupfiles-array) config entry to point at the `env-setup.js` file at the root of your project, you could set its value to `["/env-setup.js"]`._ - -### `roots` [array\] - -Default: `[""]` - -A list of paths to directories that Jest should use to search for files in. - -There are times where you only want Jest to search in a single sub-directory (such as cases where you have a `src/` directory in your repo), but prevent it from accessing the rest of the repo. - -_Note: While `rootDir` is mostly used as a token to be re-used in other configuration options, `roots` is used by the internals of Jest to locate **test files and source files**. This applies also when searching for manual mocks for modules from `node_modules` (`__mocks__` will need to live in one of the `roots`)._ - -_Note: By default, `roots` has a single entry `` but there are cases where you may want to have multiple roots within one project, for example `roots: ["/src/", "/tests/"]`._ - -### `runner` [string] - -Default: `"jest-runner"` - -This option allows you to use a custom runner instead of Jest's default test runner. Examples of runners include: - -- [`jest-runner-eslint`](https://github.com/jest-community/jest-runner-eslint) -- [`jest-runner-mocha`](https://github.com/rogeliog/jest-runner-mocha) -- [`jest-runner-tsc`](https://github.com/azz/jest-runner-tsc) -- [`jest-runner-prettier`](https://github.com/keplersj/jest-runner-prettier) - -_Note: The `runner` property value can omit the `jest-runner-` prefix of the package name._ - -To write a test-runner, export a class with which accepts `globalConfig` in the constructor, and has a `runTests` method with the signature: - -```ts -async runTests( - tests: Array, - watcher: TestWatcher, - onStart: OnTestStart, - onResult: OnTestSuccess, - onFailure: OnTestFailure, - options: TestRunnerOptions, -): Promise -``` - -If you need to restrict your test-runner to only run in serial rather then being executed in parallel your class should have the property `isSerial` to be set as `true`. - -### `setupFiles` [array] - -Default: `[]` - -A list of paths to modules that run some code to configure or set up the testing environment. Each setupFile will be run once per test file. Since every test runs in its own environment, these scripts will be executed in the testing environment immediately before executing the test code itself. - -It's also worth noting that `setupFiles` will execute _before_ [`setupFilesAfterEnv`](#setupfilesafterenv-array). - -### `setupFilesAfterEnv` [array] - -Default: `[]` - -A list of paths to modules that run some code to configure or set up the testing framework before each test file in the suite is executed. Since [`setupFiles`](#setupfiles-array) executes before the test framework is installed in the environment, this script file presents you the opportunity of running some code immediately after the test framework has been installed in the environment. - -If you want a path to be [relative to the root directory of your project](#rootdir-string), please include `` inside a path's string, like `"/a-configs-folder"`. - -For example, Jest ships with several plug-ins to `jasmine` that work by monkey-patching the jasmine API. If you wanted to add even more jasmine plugins to the mix (or if you wanted some custom, project-wide matchers for example), you could do so in these modules. - -_Note: `setupTestFrameworkScriptFile` is deprecated in favor of `setupFilesAfterEnv`._ - -Example `setupFilesAfterEnv` array in a jest.config.js: - -```js -module.exports = { - setupFilesAfterEnv: ['./jest.setup.js'], -}; -``` - -Example `jest.setup.js` file - -```js -jest.setTimeout(10000); // in milliseconds -``` - -### `snapshotResolver` [string] - -Default: `undefined` - -The path to a module that can resolve test<->snapshot path. This config option lets you customize where Jest stores snapshot files on disk. - -Example snapshot resolver module: - -```js -module.exports = { - // resolves from test to snapshot path - resolveSnapshotPath: (testPath, snapshotExtension) => - testPath.replace('__tests__', '__snapshots__') + snapshotExtension, - - // resolves from snapshot to test path - resolveTestPath: (snapshotFilePath, snapshotExtension) => - snapshotFilePath - .replace('__snapshots__', '__tests__') - .slice(0, -snapshotExtension.length), - - // Example test path, used for preflight consistency check of the implementation above - testPathForConsistencyCheck: 'some/__tests__/example.test.js', -}; -``` - -### `snapshotSerializers` [array\] - -Default: `[]` - -A list of paths to snapshot serializer modules Jest should use for snapshot testing. - -Jest has default serializers for built-in JavaScript types, HTML elements (Jest 20.0.0+), ImmutableJS (Jest 20.0.0+) and for React elements. See [snapshot test tutorial](TutorialReactNative.md#snapshot-test) for more information. - -Example serializer module: - -```js -// my-serializer-module -module.exports = { - serialize(val, config, indentation, depth, refs, printer) { - return 'Pretty foo: ' + printer(val.foo); - }, - - test(val) { - return val && val.hasOwnProperty('foo'); - }, -}; -``` - -`printer` is a function that serializes a value using existing plugins. - -To use `my-serializer-module` as a serializer, configuration would be as follows: - -```json -{ - ... - "jest": { - "snapshotSerializers": ["my-serializer-module"] - } -} -``` - -Finally tests would look as follows: - -```js -test(() => { - const bar = { - foo: { - x: 1, - y: 2, - }, - }; - - expect(bar).toMatchSnapshot(); -}); -``` - -Rendered snapshot: - -```json -Pretty foo: Object { - "x": 1, - "y": 2, -} -``` - -To make a dependency explicit instead of implicit, you can call [`expect.addSnapshotSerializer`](ExpectAPI.md#expectaddsnapshotserializerserializer) to add a module for an individual test file instead of adding its path to `snapshotSerializers` in Jest configuration. - -More about serializers API can be found [here](https://github.com/facebook/jest/tree/master/packages/pretty-format#serialize). - -### `testEnvironment` [string] - -Default: `"jsdom"` - -The test environment that will be used for testing. The default environment in Jest is a browser-like environment through [jsdom](https://github.com/tmpvar/jsdom). If you are building a node service, you can use the `node` option to use a node-like environment instead. - -By adding a `@jest-environment` docblock at the top of the file, you can specify another environment to be used for all tests in that file: - -```js -/** - * @jest-environment jsdom - */ - -test('use jsdom in this test file', () => { - const element = document.createElement('div'); - expect(element).not.toBeNull(); -}); -``` - -You can create your own module that will be used for setting up the test environment. The module must export a class with `setup`, `teardown` and `runScript` methods. You can also pass variables from this module to your test suites by assigning them to `this.global` object – this will make them available in your test suites as global variables. - -The class may optionally expose a `handleTestEvent` method to bind to events fired by [`jest-circus`](https://github.com/facebook/jest/tree/master/packages/jest-circus). - -Any docblock pragmas in test files will be passed to the environment constructor and can be used for per-test configuration. If the pragma does not have a value, it will be present in the object with it's value set to an empty string. If the pragma is not present, it will not be present in the object. - -_Note: TestEnvironment is sandboxed. Each test suite will trigger setup/teardown in their own TestEnvironment._ - -Example: - -```js -// my-custom-environment -const NodeEnvironment = require('jest-environment-node'); - -class CustomEnvironment extends NodeEnvironment { - constructor(config, context) { - super(config, context); - this.testPath = context.testPath; - this.docblockPragmas = context.docblockPragmas; - } - - async setup() { - await super.setup(); - await someSetupTasks(this.testPath); - this.global.someGlobalObject = createGlobalObject(); - - // Will trigger if docblock contains @my-custom-pragma my-pragma-value - if (this.docblockPragmas['my-custom-pragma'] === 'my-pragma-value') { - // ... - } - } - - async teardown() { - this.global.someGlobalObject = destroyGlobalObject(); - await someTeardownTasks(); - await super.teardown(); - } - - runScript(script) { - return super.runScript(script); - } - - handleTestEvent(event, state) { - if (event.name === 'test_start') { - // ... - } - } -} - -module.exports = CustomEnvironment; -``` - -```js -// my-test-suite -let someGlobalObject; - -beforeAll(() => { - someGlobalObject = global.someGlobalObject; -}); -``` - -### `testEnvironmentOptions` [Object] - -Default: `{}` - -Test environment options that will be passed to the `testEnvironment`. The relevant options depend on the environment. For example you can override options given to [jsdom](https://github.com/tmpvar/jsdom) such as `{userAgent: "Agent/007"}`. - -### `testMatch` [array\] - -(default: `[ "**/__tests__/**/*.[jt]s?(x)", "**/?(*.)+(spec|test).[jt]s?(x)" ]`) - -The glob patterns Jest uses to detect test files. By default it looks for `.js`, `.jsx`, `.ts` and `.tsx` files inside of `__tests__` folders, as well as any files with a suffix of `.test` or `.spec` (e.g. `Component.test.js` or `Component.spec.js`). It will also find files called `test.js` or `spec.js`. - -See the [micromatch](https://github.com/jonschlinkert/micromatch) package for details of the patterns you can specify. - -See also [`testRegex` [string | array\]](#testregex-string--arraystring), but note that you cannot specify both options. - -### `testPathIgnorePatterns` [array\] - -Default: `["/node_modules/"]` - -An array of regexp pattern strings that are matched against all test paths before executing the test. If the test path matches any of the patterns, it will be skipped. - -These pattern strings match against the full path. Use the `` string token to include the path to your project's root directory to prevent it from accidentally ignoring all of your files in different environments that may have different root directories. Example: `["/build/", "/node_modules/"]`. - -### `testRegex` [string | array\] - -Default: `(/__tests__/.*|(\\.|/)(test|spec))\\.[jt]sx?$` - -The pattern or patterns Jest uses to detect test files. By default it looks for `.js`, `.jsx`, `.ts` and `.tsx` files inside of `__tests__` folders, as well as any files with a suffix of `.test` or `.spec` (e.g. `Component.test.js` or `Component.spec.js`). It will also find files called `test.js` or `spec.js`. See also [`testMatch` [array\]](#testmatch-arraystring), but note that you cannot specify both options. - -The following is a visualization of the default regex: - -```bash -├── __tests__ -│ └── component.spec.js # test -│ └── anything # test -├── package.json # not test -├── foo.test.js # test -├── bar.spec.jsx # test -└── component.js # not test -``` - -_Note: `testRegex` will try to detect test files using the **absolute file path** therefore having a folder with name that match it will run all the files as tests_ - -### `testResultsProcessor` [string] - -Default: `undefined` - -This option allows the use of a custom results processor. This processor must be a node module that exports a function expecting an object with the following structure as the first argument and return it: - -```json -{ - "success": bool, - "startTime": epoch, - "numTotalTestSuites": number, - "numPassedTestSuites": number, - "numFailedTestSuites": number, - "numRuntimeErrorTestSuites": number, - "numTotalTests": number, - "numPassedTests": number, - "numFailedTests": number, - "numPendingTests": number, - "numTodoTests": number, - "openHandles": Array, - "testResults": [{ - "numFailingTests": number, - "numPassingTests": number, - "numPendingTests": number, - "testResults": [{ - "title": string (message in it block), - "status": "failed" | "pending" | "passed", - "ancestorTitles": [string (message in describe blocks)], - "failureMessages": [string], - "numPassingAsserts": number, - "location": { - "column": number, - "line": number - } - }, - ... - ], - "perfStats": { - "start": epoch, - "end": epoch - }, - "testFilePath": absolute path to test file, - "coverage": {} - }, - ... - ] -} -``` - -### `testRunner` [string] - -Default: `jasmine2` - -This option allows use of a custom test runner. The default is jasmine2. A custom test runner can be provided by specifying a path to a test runner implementation. - -The test runner module must export a function with the following signature: - -```ts -function testRunner( - globalConfig: GlobalConfig, - config: ProjectConfig, - environment: Environment, - runtime: Runtime, - testPath: string, -): Promise; -``` - -An example of such function can be found in our default [jasmine2 test runner package](https://github.com/facebook/jest/blob/master/packages/jest-jasmine2/src/index.ts). - -### `testSequencer` [string] - -Default: `@jest/test-sequencer` - -This option allows you to use a custom sequencer instead of Jest's default. `sort` may optionally return a Promise. - -Example: - -Sort test path alphabetically. - -```js -const Sequencer = require('@jest/test-sequencer').default; - -class CustomSequencer extends Sequencer { - sort(tests) { - // Test structure information - // https://github.com/facebook/jest/blob/6b8b1404a1d9254e7d5d90a8934087a9c9899dab/packages/jest-runner/src/types.ts#L17-L21 - const copyTests = Array.from(tests); - return copyTests.sort((testA, testB) => (testA.path > testB.path ? 1 : -1)); - } -} - -module.exports = CustomSequencer; -``` - -### `testTimeout` [number] - -Default: `5000` - -Default timeout of a test in milliseconds. - -### `testURL` [string] - -Default: `http://localhost` - -This option sets the URL for the jsdom environment. It is reflected in properties such as `location.href`. - -### `timers` [string] - -Default: `real` - -Setting this value to `fake` allows the use of fake timers for functions such as `setTimeout`. Fake timers are useful when a piece of code sets a long timeout that we don't want to wait for in a test. - -### `transform` [object\] - -Default: `{"^.+\\.[jt]sx?$": "babel-jest"}` - -A map from regular expressions to paths to transformers. A transformer is a module that provides a synchronous function for transforming source files. For example, if you wanted to be able to use a new language feature in your modules or tests that isn't yet supported by node, you might plug in one of many compilers that compile a future version of JavaScript to a current one. Example: see the [examples/typescript](https://github.com/facebook/jest/blob/master/examples/typescript/package.json#L16) example or the [webpack tutorial](Webpack.md). - -Examples of such compilers include: - -- [Babel](https://babeljs.io/) -- [TypeScript](http://www.typescriptlang.org/) -- [async-to-gen](http://github.com/leebyron/async-to-gen#jest) -- To build your own please visit the [Custom Transformer](TutorialReact.md#custom-transformers) section - -You can pass configuration to a transformer like `{filePattern: ['path-to-transformer', {options}]}` For example, to configure babel-jest for non-default behavior, `{"\\.js$": ['babel-jest', {rootMode: "upward"}]}` - -_Note: a transformer is only run once per file unless the file has changed. During development of a transformer it can be useful to run Jest with `--no-cache` to frequently [delete Jest's cache](Troubleshooting.md#caching-issues)._ - -_Note: when adding additional code transformers, this will overwrite the default config and `babel-jest` is no longer automatically loaded. If you want to use it to compile JavaScript or Typescript, it has to be explicitly defined by adding `{"^.+\\.[jt]sx?$": "babel-jest"}` to the transform property. See [babel-jest plugin](https://github.com/facebook/jest/tree/master/packages/babel-jest#setup)_ - -### `transformIgnorePatterns` [array\] - -Default: `["/node_modules/"]` - -An array of regexp pattern strings that are matched against all source file paths before transformation. If the test path matches any of the patterns, it will not be transformed. - -These pattern strings match against the full path. Use the `` string token to include the path to your project's root directory to prevent it from accidentally ignoring all of your files in different environments that may have different root directories. - -Example: `["/bower_components/", "/node_modules/"]`. - -Sometimes it happens (especially in React Native or TypeScript projects) that 3rd party modules are published as untranspiled. Since all files inside `node_modules` are not transformed by default, Jest will not understand the code in these modules, resulting in syntax errors. To overcome this, you may use `transformIgnorePatterns` to whitelist such modules. You'll find a good example of this use case in [React Native Guide](https://jestjs.io/docs/en/tutorial-react-native#transformignorepatterns-customization). - -### `unmockedModulePathPatterns` [array\] - -Default: `[]` - -An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them. If a module's path matches any of the patterns in this list, it will not be automatically mocked by the module loader. - -This is useful for some commonly used 'utility' modules that are almost always used as implementation details almost all the time (like underscore/lo-dash, etc). It's generally a best practice to keep this list as small as possible and always use explicit `jest.mock()`/`jest.unmock()` calls in individual tests. Explicit per-test setup is far easier for other readers of the test to reason about the environment the test will run in. - -It is possible to override this setting in individual tests by explicitly calling `jest.mock()` at the top of the test file. - -### `verbose` [boolean] - -Default: `false` - -Indicates whether each individual test should be reported during the run. All errors will also still be shown on the bottom after execution. Note that if there is only one test file being run it will default to `true`. - -### `watchPathIgnorePatterns` [array\] - -Default: `[]` - -An array of RegExp patterns that are matched against all source file paths before re-running tests in watch mode. If the file path matches any of the patterns, when it is updated, it will not trigger a re-run of tests. - -These patterns match against the full path. Use the `` string token to include the path to your project's root directory to prevent it from accidentally ignoring all of your files in different environments that may have different root directories. Example: `["/node_modules/"]`. - -Even if nothing is specified here, the watcher will ignore changes to any hidden files and directories, i.e. files and folders that begins with a dot (`.`). - -### `watchPlugins` [array\] - -Default: `[]` - -This option allows you to use a custom watch plugins. Read more about watch plugins [here](watch-plugins). - -Examples of watch plugins include: - -- [`jest-watch-master`](https://github.com/rickhanlonii/jest-watch-master) -- [`jest-watch-select-projects`](https://github.com/rogeliog/jest-watch-select-projects) -- [`jest-watch-suspend`](https://github.com/unional/jest-watch-suspend) -- [`jest-watch-typeahead`](https://github.com/jest-community/jest-watch-typeahead) -- [`jest-watch-yarn-workspaces`](https://github.com/cameronhunter/jest-watch-directories/tree/master/packages/jest-watch-yarn-workspaces) - -_Note: The values in the `watchPlugins` property value can omit the `jest-watch-` prefix of the package name._ - -### `//` [string] - -No default - -This option allow comments in `package.json`. Include the comment text as the value of this key anywhere in `package.json`. - -Example: - -```json -{ - "name": "my-project", - "jest": { - "//": "Comment goes here", - "verbose": true - } -} -``` diff --git a/website/versioned_docs/version-25.1/TutorialReact.md b/website/versioned_docs/version-25.1/TutorialReact.md deleted file mode 100644 index 6caa36a09575..000000000000 --- a/website/versioned_docs/version-25.1/TutorialReact.md +++ /dev/null @@ -1,341 +0,0 @@ ---- -id: version-25.1-tutorial-react -title: Testing React Apps -original_id: tutorial-react ---- - -At Facebook, we use Jest to test [React](http://facebook.github.io/react/) applications. - -## Setup - -### Setup with Create React App - -If you are new to React, we recommend using [Create React App](https://github.com/facebookincubator/create-react-app). It is ready to use and [ships with Jest](https://facebook.github.io/create-react-app/docs/running-tests#docsNav)! You will only need to add `react-test-renderer` for rendering snapshots. - -Run - -```bash -yarn add --dev react-test-renderer -``` - -### Setup without Create React App - -If you have an existing application you'll need to install a few packages to make everything work well together. We are using the `babel-jest` package and the `react` babel preset to transform our code inside of the test environment. Also see [using babel](GettingStarted.md#using-babel). - -Run - -```bash -yarn add --dev jest babel-jest @babel/preset-env @babel/preset-react react-test-renderer -``` - -Your `package.json` should look something like this (where `` is the actual latest version number for the package). Please add the scripts and jest configuration entries: - -```json -// package.json - "dependencies": { - "react": "", - "react-dom": "" - }, - "devDependencies": { - "@babel/preset-env": "", - "@babel/preset-react": "", - "babel-jest": "", - "jest": "", - "react-test-renderer": "" - }, - "scripts": { - "test": "jest" - } -``` - -```js -// babel.config.js -module.exports = { - presets: ['@babel/preset-env', '@babel/preset-react'], -}; -``` - -**And you're good to go!** - -### Snapshot Testing - -Let's create a [snapshot test](SnapshotTesting.md) for a Link component that renders hyperlinks: - -```javascript -// Link.react.js -import React from 'react'; - -const STATUS = { - HOVERED: 'hovered', - NORMAL: 'normal', -}; - -export default class Link extends React.Component { - constructor(props) { - super(props); - - this._onMouseEnter = this._onMouseEnter.bind(this); - this._onMouseLeave = this._onMouseLeave.bind(this); - - this.state = { - class: STATUS.NORMAL, - }; - } - - _onMouseEnter() { - this.setState({class: STATUS.HOVERED}); - } - - _onMouseLeave() { - this.setState({class: STATUS.NORMAL}); - } - - render() { - return ( - - {this.props.children} - - ); - } -} -``` - -Now let's use React's test renderer and Jest's snapshot feature to interact with the component and capture the rendered output and create a snapshot file: - -```javascript -// Link.react.test.js -import React from 'react'; -import Link from '../Link.react'; -import renderer from 'react-test-renderer'; - -test('Link changes the class when hovered', () => { - const component = renderer.create( - Facebook, - ); - let tree = component.toJSON(); - expect(tree).toMatchSnapshot(); - - // manually trigger the callback - tree.props.onMouseEnter(); - // re-rendering - tree = component.toJSON(); - expect(tree).toMatchSnapshot(); - - // manually trigger the callback - tree.props.onMouseLeave(); - // re-rendering - tree = component.toJSON(); - expect(tree).toMatchSnapshot(); -}); -``` - -When you run `yarn test` or `jest`, this will produce an output file like this: - -```javascript -// __tests__/__snapshots__/Link.react.test.js.snap -exports[`Link changes the class when hovered 1`] = ` - - Facebook - -`; - -exports[`Link changes the class when hovered 2`] = ` - - Facebook - -`; - -exports[`Link changes the class when hovered 3`] = ` - - Facebook - -`; -``` - -The next time you run the tests, the rendered output will be compared to the previously created snapshot. The snapshot should be committed along code changes. When a snapshot test fails, you need to inspect whether it is an intended or unintended change. If the change is expected you can invoke Jest with `jest -u` to overwrite the existing snapshot. - -The code for this example is available at [examples/snapshot](https://github.com/facebook/jest/tree/master/examples/snapshot). - -#### Snapshot Testing with Mocks, Enzyme and React 16 - -There's a caveat around snapshot testing when using Enzyme and React 16+. If you mock out a module using the following style: - -```js -jest.mock('../SomeDirectory/SomeComponent', () => 'SomeComponent'); -``` - -Then you will see warnings in the console: - -```bash -Warning: is using uppercase HTML. Always use lowercase HTML tags in React. - -# Or: -Warning: The tag is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter. -``` - -React 16 triggers these warnings due to how it checks element types, and the mocked module fails these checks. Your options are: - -1. Render as text. This way you won't see the props passed to the mock component in the snapshot, but it's straightforward: - ```js - jest.mock('./SomeComponent', () => () => 'SomeComponent'); - ``` -2. Render as a custom element. DOM "custom elements" aren't checked for anything and shouldn't fire warnings. They are lowercase and have a dash in the name. - ```js - jest.mock('./Widget', () => () => ); - ``` -3. Use `react-test-renderer`. The test renderer doesn't care about element types and will happily accept e.g. `SomeComponent`. You could check snapshots using the test renderer, and check component behavior separately using Enzyme. -4. Disable warnings all together (should be done in your jest setup file): - ```js - jest.mock('fbjs/lib/warning', () => require('fbjs/lib/emptyFunction')); - ``` - This shouldn't normally be your option of choice as useful warnings could be lost. However, in some cases, for example when testing react-native's components we are rendering react-native tags into the DOM and many warnings are irrelevant. Another option is to swizzle the console.warn and suppress specific warnings. - -### DOM Testing - -If you'd like to assert, and manipulate your rendered components you can use [react-testing-library](https://github.com/kentcdodds/react-testing-library), [Enzyme](http://airbnb.io/enzyme/), or React's [TestUtils](http://facebook.github.io/react/docs/test-utils.html). The following two examples use react-testing-library and Enzyme. - -#### react-testing-library - -You have to run `yarn add --dev @testing-library/react` to use react-testing-library. - -Let's implement a checkbox which swaps between two labels: - -```javascript -// CheckboxWithLabel.js - -import React from 'react'; - -export default class CheckboxWithLabel extends React.Component { - constructor(props) { - super(props); - this.state = {isChecked: false}; - - // bind manually because React class components don't auto-bind - // http://facebook.github.io/react/blog/2015/01/27/react-v0.13.0-beta-1.html#autobinding - this.onChange = this.onChange.bind(this); - } - - onChange() { - this.setState({isChecked: !this.state.isChecked}); - } - - render() { - return ( - - ); - } -} -``` - -```javascript -// __tests__/CheckboxWithLabel-test.js -import React from 'react'; -import {cleanup, fireEvent, render} from '@testing-library/react'; -import CheckboxWithLabel from '../CheckboxWithLabel'; - -// Note: running cleanup afterEach is done automatically for you in @testing-library/react@9.0.0 or higher -// unmount and cleanup DOM after the test is finished. -afterEach(cleanup); - -it('CheckboxWithLabel changes the text after click', () => { - const {queryByLabelText, getByLabelText} = render( - , - ); - - expect(queryByLabelText(/off/i)).toBeTruthy(); - - fireEvent.click(getByLabelText(/off/i)); - - expect(queryByLabelText(/on/i)).toBeTruthy(); -}); -``` - -The code for this example is available at [examples/react-testing-library](https://github.com/facebook/jest/tree/master/examples/react-testing-library). - -#### Enzyme - -You have to run `yarn add --dev enzyme` to use Enzyme. If you are using a React version below 15.5.0, you will also need to install `react-addons-test-utils`. - -Let's rewrite the test from above using Enzyme instead of react-testing-library. We use Enzyme's [shallow renderer](http://airbnb.io/enzyme/docs/api/shallow.html) in this example. - -```javascript -// __tests__/CheckboxWithLabel-test.js - -import React from 'react'; -import {shallow} from 'enzyme'; -import CheckboxWithLabel from '../CheckboxWithLabel'; - -test('CheckboxWithLabel changes the text after click', () => { - // Render a checkbox with label in the document - const checkbox = shallow(); - - expect(checkbox.text()).toEqual('Off'); - - checkbox.find('input').simulate('change'); - - expect(checkbox.text()).toEqual('On'); -}); -``` - -The code for this example is available at [examples/enzyme](https://github.com/facebook/jest/tree/master/examples/enzyme). - -### Custom transformers - -If you need more advanced functionality, you can also build your own transformer. Instead of using babel-jest, here is an example of using babel: - -```javascript -// custom-transformer.js -'use strict'; - -const {transform} = require('@babel/core'); -const jestPreset = require('babel-preset-jest'); - -module.exports = { - process(src, filename) { - const result = transform(src, { - filename, - presets: [jestPreset], - }); - - return result ? result.code : src; - }, -}; -``` - -Don't forget to install the `@babel/core` and `babel-preset-jest` packages for this example to work. - -To make this work with Jest you need to update your Jest configuration with this: `"transform": {"\\.js$": "path/to/custom-transformer.js"}`. - -If you'd like to build a transformer with babel support, you can also use babel-jest to compose one and pass in your custom configuration options: - -```javascript -const babelJest = require('babel-jest'); - -module.exports = babelJest.createTransformer({ - presets: ['my-custom-preset'], -}); -``` diff --git a/website/versioned_docs/version-25.3/JestObjectAPI.md b/website/versioned_docs/version-25.3/JestObjectAPI.md deleted file mode 100644 index 849304a96b75..000000000000 --- a/website/versioned_docs/version-25.3/JestObjectAPI.md +++ /dev/null @@ -1,672 +0,0 @@ ---- -id: version-25.3-jest-object -title: The Jest Object -original_id: jest-object ---- - -The `jest` object is automatically in scope within every test file. The methods in the `jest` object help create mocks and let you control Jest's overall behavior. - -## Mock Modules - -### `jest.disableAutomock()` - -Disables automatic mocking in the module loader. - -> See `automock` section of [configuration](Configuration.md#automock-boolean) for more information - -After this method is called, all `require()`s will return the real versions of each module (rather than a mocked version). - -Jest configuration: - -```json -{ - "automock": true -} -``` - -Example: - -```js -// utils.js -export default { - authorize: () => { - return 'token'; - }, -}; -``` - -```js -// __tests__/disableAutomocking.js -import utils from '../utils'; - -jest.disableAutomock(); - -test('original implementation', () => { - // now we have the original implementation, - // even if we set the automocking in a jest configuration - expect(utils.authorize()).toBe('token'); -}); -``` - -This is usually useful when you have a scenario where the number of dependencies you want to mock is far less than the number of dependencies that you don't. For example, if you're writing a test for a module that uses a large number of dependencies that can be reasonably classified as "implementation details" of the module, then you likely do not want to mock them. - -Examples of dependencies that might be considered "implementation details" are things ranging from language built-ins (e.g. Array.prototype methods) to highly common utility methods (e.g. underscore/lo-dash, array utilities etc) and entire libraries like React.js. - -Returns the `jest` object for chaining. - -_Note: this method was previously called `autoMockOff`. When using `babel-jest`, calls to `disableAutomock` will automatically be hoisted to the top of the code block. Use `autoMockOff` if you want to explicitly avoid this behavior._ - -### `jest.enableAutomock()` - -Enables automatic mocking in the module loader. - -Returns the `jest` object for chaining. - -> See `automock` section of [configuration](Configuration.md#automock-boolean) for more information - -Example: - -```js -// utils.js -export default { - authorize: () => { - return 'token'; - }, - isAuthorized: secret => secret === 'wizard', -}; -``` - -```js -// __tests__/disableAutomocking.js -jest.enableAutomock(); - -import utils from '../utils'; - -test('original implementation', () => { - // now we have the mocked implementation, - expect(utils.authorize._isMockFunction).toBeTruthy(); - expect(utils.isAuthorized._isMockFunction).toBeTruthy(); -}); -``` - -_Note: this method was previously called `autoMockOn`. When using `babel-jest`, calls to `enableAutomock` will automatically be hoisted to the top of the code block. Use `autoMockOn` if you want to explicitly avoid this behavior._ - -### `jest.genMockFromModule(moduleName)` - -Given the name of a module, use the automatic mocking system to generate a mocked version of the module for you. - -This is useful when you want to create a [manual mock](ManualMocks.md) that extends the automatic mock's behavior. - -Example: - -```js -// utils.js -export default { - authorize: () => { - return 'token'; - }, - isAuthorized: secret => secret === 'wizard', -}; -``` - -```js -// __tests__/genMockFromModule.test.js -const utils = jest.genMockFromModule('../utils').default; -utils.isAuthorized = jest.fn(secret => secret === 'not wizard'); - -test('implementation created by jest.genMockFromModule', () => { - expect(utils.authorize.mock).toBeTruthy(); - expect(utils.isAuthorized('not wizard')).toEqual(true); -}); -``` - -This is how `genMockFromModule` will mock the following data types: - -#### `Function` - -Creates a new [mock function](https://jestjs.io/docs/en/mock-functions.html). The new function has no formal parameters and when called will return `undefined`. This functionality also applies to `async` functions. - -#### `Class` - -Creates new class. The interface of the original class is maintained, all of the class member functions and properties will be mocked. - -#### `Object` - -Creates a new deeply cloned object. The object keys are maintained and their values are mocked. - -#### `Array` - -Creates a new empty array, ignoring the original. - -#### `Primitives` - -Creates a new property with the same primitive value as the original property. - -Example: - -``` -// example.js -module.exports = { - function: function square(a, b) { - return a * b; - }, - asyncFunction: async function asyncSquare(a, b) { - const result = await a * b; - return result; - }, - class: new class Bar { - constructor() { - this.array = [1, 2, 3]; - } - foo() {} - }, - object: { - baz: 'foo', - bar: { - fiz: 1, - buzz: [1, 2, 3], - }, - }, - array: [1, 2, 3], - number: 123, - string: 'baz', - boolean: true, - symbol: Symbol.for('a.b.c'), -}; -``` - -```js -// __tests__/example.test.js -const example = jest.genMockFromModule('./example'); - -test('should run example code', () => { - // creates a new mocked function with no formal arguments. - expect(example.function.name).toEqual('square'); - expect(example.function.length).toEqual(0); - - // async functions get the same treatment as standard synchronous functions. - expect(example.asyncFunction.name).toEqual('asyncSquare'); - expect(example.asyncFunction.length).toEqual(0); - - // creates a new class with the same interface, member functions and properties are mocked. - expect(example.class.constructor.name).toEqual('Bar'); - expect(example.class.foo.name).toEqual('foo'); - expect(example.class.array.length).toEqual(0); - - // creates a deeply cloned version of the original object. - expect(example.object).toEqual({ - baz: 'foo', - bar: { - fiz: 1, - buzz: [], - }, - }); - - // creates a new empty array, ignoring the original array. - expect(example.array.length).toEqual(0); - - // creates a new property with the same primitive value as the original property. - expect(example.number).toEqual(123); - expect(example.string).toEqual('baz'); - expect(example.boolean).toEqual(true); - expect(example.symbol).toEqual(Symbol.for('a.b.c')); -}); -``` - -### `jest.mock(moduleName, factory, options)` - -Mocks a module with an auto-mocked version when it is being required. `factory` and `options` are optional. For example: - -```js -// banana.js -module.exports = () => 'banana'; - -// __tests__/test.js -jest.mock('../banana'); - -const banana = require('../banana'); // banana will be explicitly mocked. - -banana(); // will return 'undefined' because the function is auto-mocked. -``` - -The second argument can be used to specify an explicit module factory that is being run instead of using Jest's automocking feature: - -```js -jest.mock('../moduleName', () => { - return jest.fn(() => 42); -}); - -// This runs the function specified as second argument to `jest.mock`. -const moduleName = require('../moduleName'); -moduleName(); // Will return '42'; -``` - -When using the `factory` parameter for an ES6 module with a default export, the `__esModule: true` property needs to be specified. This property is normally generated by Babel / TypeScript, but here it needs to be set manually. When importing a default export, it's an instruction to import the property named `default` from the export object: - -```js -import moduleName, {foo} from '../moduleName'; - -jest.mock('../moduleName', () => { - return { - __esModule: true, - default: jest.fn(() => 42), - foo: jest.fn(() => 43), - }; -}); - -moduleName(); // Will return 42 -foo(); // Will return 43 -``` - -The third argument can be used to create virtual mocks – mocks of modules that don't exist anywhere in the system: - -```js -jest.mock( - '../moduleName', - () => { - /* - * Custom implementation of a module that doesn't exist in JS, - * like a generated module or a native module in react-native. - */ - }, - {virtual: true}, -); -``` - -> **Warning:** Importing a module in a setup file (as specified by `setupTestFrameworkScriptFile`) will prevent mocking for the module in question, as well as all the modules that it imports. - -Modules that are mocked with `jest.mock` are mocked only for the file that calls `jest.mock`. Another file that imports the module will get the original implementation even if it runs after the test file that mocks the module. - -Returns the `jest` object for chaining. - -### `jest.unmock(moduleName)` - -Indicates that the module system should never return a mocked version of the specified module from `require()` (e.g. that it should always return the real module). - -The most common use of this API is for specifying the module a given test intends to be testing (and thus doesn't want automatically mocked). - -Returns the `jest` object for chaining. - -### `jest.doMock(moduleName, factory, options)` - -When using `babel-jest`, calls to `mock` will automatically be hoisted to the top of the code block. Use this method if you want to explicitly avoid this behavior. - -One example when this is useful is when you want to mock a module differently within the same file: - -```js -beforeEach(() => { - jest.resetModules(); -}); - -test('moduleName 1', () => { - jest.doMock('../moduleName', () => { - return jest.fn(() => 1); - }); - const moduleName = require('../moduleName'); - expect(moduleName()).toEqual(1); -}); - -test('moduleName 2', () => { - jest.doMock('../moduleName', () => { - return jest.fn(() => 2); - }); - const moduleName = require('../moduleName'); - expect(moduleName()).toEqual(2); -}); -``` - -Using `jest.doMock()` with ES6 imports requires additional steps. Follow these if you don't want to use `require` in your tests: - -- We have to specify the `__esModule: true` property (see the [`jest.mock()`](#jestmockmodulename-factory-options) API for more information). -- Static ES6 module imports are hoisted to the top of the file, so instead we have to import them dynamically using `import()`. -- Finally, we need an environment which supports dynamic importing. Please see [Using Babel](GettingStarted.md#using-babel) for the initial setup. Then add the plugin [babel-plugin-dynamic-import-node](https://www.npmjs.com/package/babel-plugin-dynamic-import-node), or an equivalent, to your Babel config to enable dynamic importing in Node. - -```js -beforeEach(() => { - jest.resetModules(); -}); - -test('moduleName 1', () => { - jest.doMock('../moduleName', () => { - return { - __esModule: true, - default: 'default1', - foo: 'foo1', - }; - }); - return import('../moduleName').then(moduleName => { - expect(moduleName.default).toEqual('default1'); - expect(moduleName.foo).toEqual('foo1'); - }); -}); - -test('moduleName 2', () => { - jest.doMock('../moduleName', () => { - return { - __esModule: true, - default: 'default2', - foo: 'foo2', - }; - }); - return import('../moduleName').then(moduleName => { - expect(moduleName.default).toEqual('default2'); - expect(moduleName.foo).toEqual('foo2'); - }); -}); -``` - -Returns the `jest` object for chaining. - -### `jest.dontMock(moduleName)` - -When using `babel-jest`, calls to `unmock` will automatically be hoisted to the top of the code block. Use this method if you want to explicitly avoid this behavior. - -Returns the `jest` object for chaining. - -### `jest.setMock(moduleName, moduleExports)` - -Explicitly supplies the mock object that the module system should return for the specified module. - -On occasion there are times where the automatically generated mock the module system would normally provide you isn't adequate enough for your testing needs. Normally under those circumstances you should write a [manual mock](ManualMocks.md) that is more adequate for the module in question. However, on extremely rare occasions, even a manual mock isn't suitable for your purposes and you need to build the mock yourself inside your test. - -In these rare scenarios you can use this API to manually fill the slot in the module system's mock-module registry. - -Returns the `jest` object for chaining. - -_Note It is recommended to use [`jest.mock()`](#jestmockmodulename-factory-options) instead. The `jest.mock` API's second argument is a module factory instead of the expected exported module object._ - -### `jest.requireActual(moduleName)` - -Returns the actual module instead of a mock, bypassing all checks on whether the module should receive a mock implementation or not. - -Example: - -```js -jest.mock('../myModule', () => { - // Require the original module to not be mocked... - const originalModule = jest.requireActual(moduleName); - - return { - __esModule: true, // Use it when dealing with esModules - ...originalModule, - getRandom: jest.fn().mockReturnValue(10), - }; -}); - -const getRandom = require('../myModule').getRandom; - -getRandom(); // Always returns 10 -``` - -### `jest.requireMock(moduleName)` - -Returns a mock module instead of the actual module, bypassing all checks on whether the module should be required normally or not. - -### `jest.resetModules()` - -Resets the module registry - the cache of all required modules. This is useful to isolate modules where local state might conflict between tests. - -Example: - -```js -const sum1 = require('../sum'); -jest.resetModules(); -const sum2 = require('../sum'); -sum1 === sum2; -// > false (Both sum modules are separate "instances" of the sum module.) -``` - -Example in a test: - -```js -beforeEach(() => { - jest.resetModules(); -}); - -test('works', () => { - const sum = require('../sum'); -}); - -test('works too', () => { - const sum = require('../sum'); - // sum is a different copy of the sum module from the previous test. -}); -``` - -Returns the `jest` object for chaining. - -### `jest.isolateModules(fn)` - -`jest.isolateModules(fn)` goes a step further than `jest.resetModules()` and creates a sandbox registry for the modules that are loaded inside the callback function. This is useful to isolate specific modules for every test so that local module state doesn't conflict between tests. - -```js -let myModule; -jest.isolateModules(() => { - myModule = require('myModule'); -}); - -const otherCopyOfMyModule = require('myModule'); -``` - -## Mock functions - -### `jest.fn(implementation)` - -Returns a new, unused [mock function](MockFunctionAPI.md). Optionally takes a mock implementation. - -```js -const mockFn = jest.fn(); -mockFn(); -expect(mockFn).toHaveBeenCalled(); - -// With a mock implementation: -const returnsTrue = jest.fn(() => true); -console.log(returnsTrue()); // true; -``` - -### `jest.isMockFunction(fn)` - -Determines if the given function is a mocked function. - -### `jest.spyOn(object, methodName)` - -Creates a mock function similar to `jest.fn` but also tracks calls to `object[methodName]`. Returns a Jest [mock function](MockFunctionAPI.md). - -_Note: By default, `jest.spyOn` also calls the **spied** method. This is different behavior from most other test libraries. If you want to overwrite the original function, you can use `jest.spyOn(object, methodName).mockImplementation(() => customImplementation)` or `object[methodName] = jest.fn(() => customImplementation);`_ - -Example: - -```js -const video = { - play() { - return true; - }, -}; - -module.exports = video; -``` - -Example test: - -```js -const video = require('./video'); - -test('plays video', () => { - const spy = jest.spyOn(video, 'play'); - const isPlaying = video.play(); - - expect(spy).toHaveBeenCalled(); - expect(isPlaying).toBe(true); - - spy.mockRestore(); -}); -``` - -### `jest.spyOn(object, methodName, accessType?)` - -Since Jest 22.1.0+, the `jest.spyOn` method takes an optional third argument of `accessType` that can be either `'get'` or `'set'`, which proves to be useful when you want to spy on a getter or a setter, respectively. - -Example: - -```js -const video = { - // it's a getter! - get play() { - return true; - }, -}; - -module.exports = video; - -const audio = { - _volume: false, - // it's a setter! - set volume(value) { - this._volume = value; - }, - get volume() { - return this._volume; - }, -}; - -module.exports = audio; -``` - -Example test: - -```js -const video = require('./video'); - -test('plays video', () => { - const spy = jest.spyOn(video, 'play', 'get'); // we pass 'get' - const isPlaying = video.play; - - expect(spy).toHaveBeenCalled(); - expect(isPlaying).toBe(true); - - spy.mockRestore(); -}); - -const audio = require('./audio'); - -test('plays audio', () => { - const spy = jest.spyOn(audio, 'volume', 'set'); // we pass 'set' - audio.volume = 100; - - expect(spy).toHaveBeenCalled(); - expect(audio.volume).toBe(100); - - spy.mockRestore(); -}); -``` - -### `jest.clearAllMocks()` - -Clears the `mock.calls` and `mock.instances` properties of all mocks. Equivalent to calling [`.mockClear()`](MockFunctionAPI.md#mockfnmockclear) on every mocked function. - -Returns the `jest` object for chaining. - -### `jest.resetAllMocks()` - -Resets the state of all mocks. Equivalent to calling [`.mockReset()`](MockFunctionAPI.md#mockfnmockreset) on every mocked function. - -Returns the `jest` object for chaining. - -### `jest.restoreAllMocks()` - -Restores all mocks back to their original value. Equivalent to calling [`.mockRestore()`](MockFunctionAPI.md#mockfnmockrestore) on every mocked function. Beware that `jest.restoreAllMocks()` only works when the mock was created with `jest.spyOn`; other mocks will require you to manually restore them. - -## Mock timers - -### `jest.useFakeTimers()` - -Instructs Jest to use fake versions of the standard timer functions (`setTimeout`, `setInterval`, `clearTimeout`, `clearInterval`, `nextTick`, `setImmediate` and `clearImmediate`). - -Returns the `jest` object for chaining. - -### `jest.useRealTimers()` - -Instructs Jest to use the real versions of the standard timer functions. - -Returns the `jest` object for chaining. - -### `jest.runAllTicks()` - -Exhausts the **micro**-task queue (usually interfaced in node via `process.nextTick`). - -When this API is called, all pending micro-tasks that have been queued via `process.nextTick` will be executed. Additionally, if those micro-tasks themselves schedule new micro-tasks, those will be continually exhausted until there are no more micro-tasks remaining in the queue. - -### `jest.runAllTimers()` - -Exhausts both the **macro**-task queue (i.e., all tasks queued by `setTimeout()`, `setInterval()`, and `setImmediate()`) and the **micro**-task queue (usually interfaced in node via `process.nextTick`). - -When this API is called, all pending macro-tasks and micro-tasks will be executed. If those tasks themselves schedule new tasks, those will be continually exhausted until there are no more tasks remaining in the queue. - -This is often useful for synchronously executing setTimeouts during a test in order to synchronously assert about some behavior that would only happen after the `setTimeout()` or `setInterval()` callbacks executed. See the [Timer mocks](TimerMocks.md) doc for more information. - -### `jest.runAllImmediates()` - -Exhausts all tasks queued by `setImmediate()`. - -### `jest.advanceTimersByTime(msToRun)` - -##### renamed in Jest **22.0.0+** - -Also under the alias: `.runTimersToTime()` - -Executes only the macro task queue (i.e. all tasks queued by `setTimeout()` or `setInterval()` and `setImmediate()`). - -When this API is called, all timers are advanced by `msToRun` milliseconds. All pending "macro-tasks" that have been queued via `setTimeout()` or `setInterval()`, and would be executed within this time frame will be executed. Additionally if those macro-tasks schedule new macro-tasks that would be executed within the same time frame, those will be executed until there are no more macro-tasks remaining in the queue, that should be run within `msToRun` milliseconds. - -### `jest.runOnlyPendingTimers()` - -Executes only the macro-tasks that are currently pending (i.e., only the tasks that have been queued by `setTimeout()` or `setInterval()` up to this point). If any of the currently pending macro-tasks schedule new macro-tasks, those new tasks will not be executed by this call. - -This is useful for scenarios such as one where the module being tested schedules a `setTimeout()` whose callback schedules another `setTimeout()` recursively (meaning the scheduling never stops). In these scenarios, it's useful to be able to run forward in time by a single step at a time. - -### `jest.advanceTimersToNextTimer(steps)` - -Advances all timers by the needed milliseconds so that only the next timeouts/intervals will run. - -Optionally, you can provide `steps`, so it will run `steps` amount of next timeouts/intervals. - -### `jest.clearAllTimers()` - -Removes any pending timers from the timer system. - -This means, if any timers have been scheduled (but have not yet executed), they will be cleared and will never have the opportunity to execute in the future. - -### `jest.getTimerCount()` - -Returns the number of fake timers still left to run. - -## Misc - -### `jest.setTimeout(timeout)` - -Set the default timeout interval for tests and before/after hooks in milliseconds. This only affects the test file from which this function is called. - -_Note: The default timeout interval is 5 seconds if this method is not called._ - -_Note: If you want to set the timeout for all test files, a good place to do this is in `setupFilesAfterEnv`._ - -Example: - -```js -jest.setTimeout(1000); // 1 second -``` - -### `jest.retryTimes()` - -Runs failed tests n-times until they pass or until the max number of retries is exhausted. This only works with [jest-circus](https://github.com/facebook/jest/tree/master/packages/jest-circus)! - -Example in a test: - -```js -jest.retryTimes(3); -test('will fail', () => { - expect(true).toBe(false); -}); -``` - -Returns the `jest` object for chaining. diff --git a/website/versioned_docs/version-25.3/CLI.md b/website/versioned_docs/version-25.x/CLI.md similarity index 99% rename from website/versioned_docs/version-25.3/CLI.md rename to website/versioned_docs/version-25.x/CLI.md index a28fafb6d30f..3194db9e7236 100644 --- a/website/versioned_docs/version-25.3/CLI.md +++ b/website/versioned_docs/version-25.x/CLI.md @@ -1,5 +1,5 @@ --- -id: version-25.3-cli +id: version-25.x-cli title: Jest CLI Options original_id: cli --- diff --git a/website/versioned_docs/version-25.5/Configuration.md b/website/versioned_docs/version-25.x/Configuration.md similarity index 99% rename from website/versioned_docs/version-25.5/Configuration.md rename to website/versioned_docs/version-25.x/Configuration.md index afb34e1c20bf..f1282e6fa45f 100644 --- a/website/versioned_docs/version-25.5/Configuration.md +++ b/website/versioned_docs/version-25.x/Configuration.md @@ -1,5 +1,5 @@ --- -id: version-25.5-configuration +id: version-25.x-configuration title: Configuring Jest original_id: configuration --- diff --git a/website/versioned_docs/version-25.5/Es6ClassMocks.md b/website/versioned_docs/version-25.x/Es6ClassMocks.md similarity index 99% rename from website/versioned_docs/version-25.5/Es6ClassMocks.md rename to website/versioned_docs/version-25.x/Es6ClassMocks.md index f84c438025f4..a6bf0a09f9b2 100644 --- a/website/versioned_docs/version-25.5/Es6ClassMocks.md +++ b/website/versioned_docs/version-25.x/Es6ClassMocks.md @@ -1,5 +1,5 @@ --- -id: version-25.5-es6-class-mocks +id: version-25.x-es6-class-mocks title: ES6 Class Mocks original_id: es6-class-mocks --- diff --git a/website/versioned_docs/version-25.1/ExpectAPI.md b/website/versioned_docs/version-25.x/ExpectAPI.md similarity index 99% rename from website/versioned_docs/version-25.1/ExpectAPI.md rename to website/versioned_docs/version-25.x/ExpectAPI.md index 4c30f69ac38b..f3163da25bc0 100644 --- a/website/versioned_docs/version-25.1/ExpectAPI.md +++ b/website/versioned_docs/version-25.x/ExpectAPI.md @@ -1,5 +1,5 @@ --- -id: version-25.1-expect +id: version-25.x-expect title: Expect original_id: expect --- diff --git a/website/versioned_docs/version-25.5/GlobalAPI.md b/website/versioned_docs/version-25.x/GlobalAPI.md similarity index 99% rename from website/versioned_docs/version-25.5/GlobalAPI.md rename to website/versioned_docs/version-25.x/GlobalAPI.md index 872aa7c6fa5d..a19799f80898 100644 --- a/website/versioned_docs/version-25.5/GlobalAPI.md +++ b/website/versioned_docs/version-25.x/GlobalAPI.md @@ -1,5 +1,5 @@ --- -id: version-25.5-api +id: version-25.x-api title: Globals original_id: api --- diff --git a/website/versioned_docs/version-25.5/JestObjectAPI.md b/website/versioned_docs/version-25.x/JestObjectAPI.md similarity index 99% rename from website/versioned_docs/version-25.5/JestObjectAPI.md rename to website/versioned_docs/version-25.x/JestObjectAPI.md index 04f2414db41a..a4a19efdc61a 100644 --- a/website/versioned_docs/version-25.5/JestObjectAPI.md +++ b/website/versioned_docs/version-25.x/JestObjectAPI.md @@ -1,5 +1,5 @@ --- -id: version-25.5-jest-object +id: version-25.x-jest-object title: The Jest Object original_id: jest-object --- diff --git a/website/versioned_docs/version-25.1/JestPlatform.md b/website/versioned_docs/version-25.x/JestPlatform.md similarity index 93% rename from website/versioned_docs/version-25.1/JestPlatform.md rename to website/versioned_docs/version-25.x/JestPlatform.md index 4c71970c982f..178945aeffeb 100644 --- a/website/versioned_docs/version-25.1/JestPlatform.md +++ b/website/versioned_docs/version-25.x/JestPlatform.md @@ -1,5 +1,5 @@ --- -id: version-25.1-jest-platform +id: version-25.x-jest-platform title: Jest Platform original_id: jest-platform --- @@ -59,7 +59,7 @@ const code = ` * * @flow */ - + console.log('Hello World!'); `; @@ -120,7 +120,7 @@ You can read more about `jest-validate` in the [readme file](https://github.com/ ## jest-worker -Module used for parallelization of tasks. Exports a class `Worker` that takes the path of Node.js module and lets you call the module's exported methods as if they were class methods, returning a promise that resolves when the specified method finishes its execution in a forked process. +Module used for parallelization of tasks. Exports a class `JestWorker` that takes the path of Node.js module and lets you call the module's exported methods as if they were class methods, returning a promise that resolves when the specified method finishes its execution in a forked process. ### Example diff --git a/website/versioned_docs/version-25.1/MockFunctions.md b/website/versioned_docs/version-25.x/MockFunctions.md similarity index 99% rename from website/versioned_docs/version-25.1/MockFunctions.md rename to website/versioned_docs/version-25.x/MockFunctions.md index f9ada1561dba..39d2282142e1 100644 --- a/website/versioned_docs/version-25.1/MockFunctions.md +++ b/website/versioned_docs/version-25.x/MockFunctions.md @@ -1,5 +1,5 @@ --- -id: version-25.1-mock-functions +id: version-25.x-mock-functions title: Mock Functions original_id: mock-functions --- diff --git a/website/versioned_docs/version-25.3/TestingAsyncCode.md b/website/versioned_docs/version-25.x/TestingAsyncCode.md similarity index 99% rename from website/versioned_docs/version-25.3/TestingAsyncCode.md rename to website/versioned_docs/version-25.x/TestingAsyncCode.md index 5d1048c83ccd..3d8487c805d4 100644 --- a/website/versioned_docs/version-25.3/TestingAsyncCode.md +++ b/website/versioned_docs/version-25.x/TestingAsyncCode.md @@ -1,5 +1,5 @@ --- -id: version-25.3-asynchronous +id: version-25.x-asynchronous title: Testing Asynchronous Code original_id: asynchronous --- diff --git a/website/versioned_docs/version-25.1/TestingFrameworks.md b/website/versioned_docs/version-25.x/TestingFrameworks.md similarity index 98% rename from website/versioned_docs/version-25.1/TestingFrameworks.md rename to website/versioned_docs/version-25.x/TestingFrameworks.md index 030b07fb927d..65a0b6c20be0 100644 --- a/website/versioned_docs/version-25.1/TestingFrameworks.md +++ b/website/versioned_docs/version-25.x/TestingFrameworks.md @@ -1,5 +1,5 @@ --- -id: version-25.1-testing-frameworks +id: version-25.x-testing-frameworks title: Testing Web Frameworks original_id: testing-frameworks --- diff --git a/website/versioned_docs/version-25.1/Troubleshooting.md b/website/versioned_docs/version-25.x/Troubleshooting.md similarity index 99% rename from website/versioned_docs/version-25.1/Troubleshooting.md rename to website/versioned_docs/version-25.x/Troubleshooting.md index 1e9aa2cdf87c..1fe2499394b4 100644 --- a/website/versioned_docs/version-25.1/Troubleshooting.md +++ b/website/versioned_docs/version-25.x/Troubleshooting.md @@ -1,5 +1,5 @@ --- -id: version-25.1-troubleshooting +id: version-25.x-troubleshooting title: Troubleshooting original_id: troubleshooting --- diff --git a/website/versioned_docs/version-25.1/TutorialAsync.md b/website/versioned_docs/version-25.x/TutorialAsync.md similarity index 99% rename from website/versioned_docs/version-25.1/TutorialAsync.md rename to website/versioned_docs/version-25.x/TutorialAsync.md index 07937b7b5281..887e8423e118 100644 --- a/website/versioned_docs/version-25.1/TutorialAsync.md +++ b/website/versioned_docs/version-25.x/TutorialAsync.md @@ -1,5 +1,5 @@ --- -id: version-25.1-tutorial-async +id: version-25.x-tutorial-async title: An Async Example original_id: tutorial-async --- diff --git a/website/versioned_docs/version-25.3/TutorialReact.md b/website/versioned_docs/version-25.x/TutorialReact.md similarity index 99% rename from website/versioned_docs/version-25.3/TutorialReact.md rename to website/versioned_docs/version-25.x/TutorialReact.md index 3534b51d5a03..e671f8e21bb3 100644 --- a/website/versioned_docs/version-25.3/TutorialReact.md +++ b/website/versioned_docs/version-25.x/TutorialReact.md @@ -1,5 +1,5 @@ --- -id: version-25.3-tutorial-react +id: version-25.x-tutorial-react title: Testing React Apps original_id: tutorial-react --- diff --git a/website/versioned_docs/version-25.3/TutorialReactNative.md b/website/versioned_docs/version-25.x/TutorialReactNative.md similarity index 99% rename from website/versioned_docs/version-25.3/TutorialReactNative.md rename to website/versioned_docs/version-25.x/TutorialReactNative.md index 0d2597d8c35a..4641502e339e 100644 --- a/website/versioned_docs/version-25.3/TutorialReactNative.md +++ b/website/versioned_docs/version-25.x/TutorialReactNative.md @@ -1,5 +1,5 @@ --- -id: version-25.3-tutorial-react-native +id: version-25.x-tutorial-react-native title: Testing React Native Apps original_id: tutorial-react-native --- diff --git a/website/versioned_docs/version-25.1/CLI.md b/website/versioned_docs/version-26.0/CLI.md similarity index 93% rename from website/versioned_docs/version-25.1/CLI.md rename to website/versioned_docs/version-26.0/CLI.md index 731f4b81b1f2..ce5c4fcaac88 100644 --- a/website/versioned_docs/version-25.1/CLI.md +++ b/website/versioned_docs/version-26.0/CLI.md @@ -1,5 +1,5 @@ --- -id: version-25.1-cli +id: version-26.0-cli title: Jest CLI Options original_id: cli --- @@ -157,11 +157,7 @@ Alias: `--collectCoverage`. Indicates that test coverage information should be c Indicates which provider should be used to instrument code for coverage. Allowed values are `babel` (default) or `v8`. -Note that using `v8` is considered experimental. This uses V8's builtin code coverage rather than one based on Babel and comes with a few caveats - -1. Your node version must include `vm.compileFunction`, which was introduced in [node 10.10](https://nodejs.org/dist/latest-v12.x/docs/api/vm.html#vm_vm_compilefunction_code_params_options) -1. Tests needs to run in Node test environment (support for `jsdom` requires [`jest-environment-jsdom-sixteen`](https://www.npmjs.com/package/jest-environment-jsdom-sixteen)) -1. V8 has way better data in the later versions, so using the latest versions of node (v13 at the time of this writing) will yield better results +Note that using `v8` is considered experimental. This uses V8's builtin code coverage rather than one based on Babel. It is not as well tested, and it has also improved in the last few releases of Node. Using the latest versions of node (v14 at the time of this writing) will yield better results. ### `--debug` @@ -237,8 +233,6 @@ Disables stack trace in test results output. Activates notifications for test results. Good for when you don't want your consciousness to be able to focus on anything except JavaScript testing. -**Beware:** Jest uses [node-notifier](https://github.com/mikaelbr/node-notifier) to display desktop notifications. On Windows, it creates a new start menu entry on the first use and not display the notification. Notifications will be properly displayed on subsequent runs - ### `--onlyChanged` Alias: `-o`. Attempts to identify which tests to run based on which files have changed in the current repository. Only works if you're running tests in a git/hg repository at the moment and requires a static dependency graph (ie. no dynamic requires). diff --git a/website/versioned_docs/version-25.3/Configuration.md b/website/versioned_docs/version-26.0/Configuration.md similarity index 97% rename from website/versioned_docs/version-25.3/Configuration.md rename to website/versioned_docs/version-26.0/Configuration.md index 3c2a23692126..23d6da577d3d 100644 --- a/website/versioned_docs/version-25.3/Configuration.md +++ b/website/versioned_docs/version-26.0/Configuration.md @@ -1,5 +1,5 @@ --- -id: version-25.3-configuration +id: version-26.0-configuration title: Configuring Jest original_id: configuration --- @@ -106,12 +106,6 @@ Default: `0` By default, Jest runs all tests and produces all errors into the console upon completion. The bail config option can be used here to have Jest stop running tests after `n` failures. Setting bail to `true` is the same as setting bail to `1`. -### `browser` [boolean] - -Default: `false` - -Respect Browserify's [`"browser"` field](https://github.com/substack/browserify-handbook#browser-field) in `package.json` when resolving modules. Some modules export different versions based on whether they are operating in Node or a browser. - ### `cacheDirectory` [string] Default: `"/tmp/"` @@ -190,11 +184,7 @@ These pattern strings match against the full path. Use the `` string to Indicates which provider should be used to instrument code for coverage. Allowed values are `babel` (default) or `v8`. -Note that using `v8` is considered experimental. This uses V8's builtin code coverage rather than one based on Babel and comes with a few caveats - -1. Your node version must include `vm.compileFunction`, which was introduced in [node 10.10](https://nodejs.org/dist/latest-v12.x/docs/api/vm.html#vm_vm_compilefunction_code_params_options) -1. Tests needs to run in Node test environment (support for `jsdom` requires [`jest-environment-jsdom-sixteen`](https://www.npmjs.com/package/jest-environment-jsdom-sixteen)) -1. V8 has way better data in the later versions, so using the latest versions of node (v13 at the time of this writing) will yield better results +Note that using `v8` is considered experimental. This uses V8's builtin code coverage rather than one based on Babel. It is not as well tested, and it has also improved in the last few releases of Node. Using the latest versions of node (v14 at the time of this writing) will yield better results. ### `coverageReporters` [array\] @@ -690,7 +680,6 @@ This option allows the use of a custom resolver. This resolver must be a node mo ```json { "basedir": string, - "browser": bool, "defaultResolver": "function(request, options)", "extensions": [string], "moduleDirectory": [string], @@ -701,7 +690,18 @@ This option allows the use of a custom resolver. This resolver must be a node mo The function should either return a path to the module that should be resolved or throw an error if the module can't be found. -Note: the defaultResolver passed as options is the jest default resolver which might be useful when you write your custom one. It takes the same arguments as your custom one, e.g. (request, options). +Note: the defaultResolver passed as options is the Jest default resolver which might be useful when you write your custom one. It takes the same arguments as your custom one, e.g. `(request, options)`. + +For example, if you want to respect Browserify's [`"browser"` field](https://github.com/browserify/browserify-handbook/blob/master/readme.markdown#browser-field), you can use the following configuration: + +```json +{ + ... + "jest": { + "resolver": "browser-resolve" + } +} +``` ### `restoreMocks` [boolean] @@ -880,7 +880,7 @@ Pretty foo: Object { To make a dependency explicit instead of implicit, you can call [`expect.addSnapshotSerializer`](ExpectAPI.md#expectaddsnapshotserializerserializer) to add a module for an individual test file instead of adding its path to `snapshotSerializers` in Jest configuration. -More about serializers API can be found [here](https://github.com/facebook/jest/tree/master/packages/pretty-format#serialize). +More about serializers API can be found [here](https://github.com/facebook/jest/tree/master/packages/pretty-format/README.md#serialize). ### `testEnvironment` [string] diff --git a/website/versioned_docs/version-25.5/JestPlatform.md b/website/versioned_docs/version-26.0/JestPlatform.md similarity index 99% rename from website/versioned_docs/version-25.5/JestPlatform.md rename to website/versioned_docs/version-26.0/JestPlatform.md index 1b2ddf710cd2..a35a2a4b6dcc 100644 --- a/website/versioned_docs/version-25.5/JestPlatform.md +++ b/website/versioned_docs/version-26.0/JestPlatform.md @@ -1,5 +1,5 @@ --- -id: version-25.5-jest-platform +id: version-26.0-jest-platform title: Jest Platform original_id: jest-platform --- diff --git a/website/versions.json b/website/versions.json index 359fa3ec8a76..1b6301798894 100644 --- a/website/versions.json +++ b/website/versions.json @@ -1,7 +1,6 @@ [ - "25.5", - "25.3", - "25.1", + "26.0", + "25.x", "24.x", "23.x", "22.x" From a8052935cd4d767ee2f47abea434db393207885b Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Tue, 5 May 2020 00:14:28 +0200 Subject: [PATCH 079/106] chore: re-add deleted tests property to circus events --- packages/jest-circus/src/eventHandler.ts | 1 + packages/jest-circus/src/utils.ts | 1 + packages/jest-types/src/Circus.ts | 2 ++ 3 files changed, 4 insertions(+) diff --git a/packages/jest-circus/src/eventHandler.ts b/packages/jest-circus/src/eventHandler.ts index 590e66ca3a13..dfe916a629a1 100644 --- a/packages/jest-circus/src/eventHandler.ts +++ b/packages/jest-circus/src/eventHandler.ts @@ -148,6 +148,7 @@ const eventHandler: Circus.EventHandler = ( state.hasFocusedTests = true; } currentDescribeBlock.children.push(test); + currentDescribeBlock.tests.push(test); break; } case 'hook_failure': { diff --git a/packages/jest-circus/src/utils.ts b/packages/jest-circus/src/utils.ts index 2a5322607d17..ca9bebeef466 100644 --- a/packages/jest-circus/src/utils.ts +++ b/packages/jest-circus/src/utils.ts @@ -34,6 +34,7 @@ export const makeDescribe = ( mode: _mode, name: convertDescriptorToString(name), parent, + tests: [], }; }; diff --git a/packages/jest-types/src/Circus.ts b/packages/jest-types/src/Circus.ts index 963a6a61b537..c1ef85c79892 100644 --- a/packages/jest-types/src/Circus.ts +++ b/packages/jest-types/src/Circus.ts @@ -207,6 +207,8 @@ export type DescribeBlock = { mode: BlockMode; name: BlockName; parent?: DescribeBlock; + /** @deprecated Please get from `children` array instead */ + tests: Array; }; export type TestError = Exception | [Exception | undefined, Exception]; // the error from the test, as well as a backup error for async From fb04716adb223ce2da1e6bb2b4ce7c011bad1807 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Tue, 5 May 2020 00:15:49 +0200 Subject: [PATCH 080/106] v26.0.1-alpha.0 --- lerna.json | 2 +- packages/babel-jest/package.json | 6 +-- packages/expect/package.json | 8 ++-- packages/jest-changed-files/package.json | 4 +- packages/jest-circus/package.json | 24 ++++++------ packages/jest-cli/package.json | 14 +++---- packages/jest-config/package.json | 22 +++++------ packages/jest-console/package.json | 8 ++-- packages/jest-core/package.json | 38 +++++++++---------- packages/jest-diff/package.json | 4 +- packages/jest-each/package.json | 8 ++-- packages/jest-environment-jsdom/package.json | 12 +++--- packages/jest-environment-node/package.json | 12 +++--- packages/jest-environment/package.json | 8 ++-- packages/jest-fake-timers/package.json | 10 ++--- packages/jest-globals/package.json | 8 ++-- packages/jest-haste-map/package.json | 6 +-- packages/jest-jasmine2/package.json | 24 ++++++------ packages/jest-leak-detector/package.json | 4 +- packages/jest-matcher-utils/package.json | 6 +-- packages/jest-message-util/package.json | 4 +- packages/jest-mock/package.json | 4 +- packages/jest-phabricator/package.json | 4 +- packages/jest-repl/package.json | 12 +++--- packages/jest-reporters/package.json | 16 ++++---- .../jest-resolve-dependencies/package.json | 12 +++--- packages/jest-resolve/package.json | 8 ++-- packages/jest-runner/package.json | 28 +++++++------- packages/jest-runtime/package.json | 34 ++++++++--------- packages/jest-snapshot/package.json | 18 ++++----- packages/jest-test-result/package.json | 6 +-- packages/jest-test-sequencer/package.json | 10 ++--- packages/jest-transform/package.json | 8 ++-- packages/jest-types/package.json | 2 +- packages/jest-util/package.json | 4 +- packages/jest-validate/package.json | 6 +-- packages/jest-watcher/package.json | 8 ++-- packages/jest/package.json | 6 +-- packages/pretty-format/package.json | 4 +- 39 files changed, 211 insertions(+), 211 deletions(-) diff --git a/lerna.json b/lerna.json index fd74432fb99d..8e42132e0225 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "26.0.0", + "version": "26.0.1-alpha.0", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/babel-jest/package.json b/packages/babel-jest/package.json index d674e54b5bc6..20fe844b50dc 100644 --- a/packages/babel-jest/package.json +++ b/packages/babel-jest/package.json @@ -1,7 +1,7 @@ { "name": "babel-jest", "description": "Jest plugin to use babel for transformation.", - "version": "26.0.0", + "version": "26.0.1-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -11,8 +11,8 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/transform": "^26.0.0", - "@jest/types": "^26.0.0", + "@jest/transform": "^26.0.1-alpha.0", + "@jest/types": "^26.0.1-alpha.0", "@types/babel__core": "^7.1.7", "babel-plugin-istanbul": "^6.0.0", "babel-preset-jest": "^26.0.0", diff --git a/packages/expect/package.json b/packages/expect/package.json index 0962bcc4fddb..9eb195bf9e4c 100644 --- a/packages/expect/package.json +++ b/packages/expect/package.json @@ -1,6 +1,6 @@ { "name": "expect", - "version": "26.0.0", + "version": "26.0.1-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,11 +10,11 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/types": "^26.0.0", + "@jest/types": "^26.0.1-alpha.0", "ansi-styles": "^4.0.0", "jest-get-type": "^26.0.0", - "jest-matcher-utils": "^26.0.0", - "jest-message-util": "^26.0.0", + "jest-matcher-utils": "^26.0.1-alpha.0", + "jest-message-util": "^26.0.1-alpha.0", "jest-regex-util": "^26.0.0" }, "devDependencies": { diff --git a/packages/jest-changed-files/package.json b/packages/jest-changed-files/package.json index d67a900fdb51..57ab6b980e19 100644 --- a/packages/jest-changed-files/package.json +++ b/packages/jest-changed-files/package.json @@ -1,6 +1,6 @@ { "name": "jest-changed-files", - "version": "26.0.0", + "version": "26.0.1-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,7 +10,7 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/types": "^26.0.0", + "@jest/types": "^26.0.1-alpha.0", "execa": "^4.0.0", "throat": "^5.0.0" }, diff --git a/packages/jest-circus/package.json b/packages/jest-circus/package.json index d80e1ab6951d..cdfd9c4739a9 100644 --- a/packages/jest-circus/package.json +++ b/packages/jest-circus/package.json @@ -1,6 +1,6 @@ { "name": "jest-circus", - "version": "26.0.0", + "version": "26.0.1-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -11,21 +11,21 @@ "types": "build/index.d.ts", "dependencies": { "@babel/traverse": "^7.1.0", - "@jest/environment": "^26.0.0", - "@jest/test-result": "^26.0.0", - "@jest/types": "^26.0.0", + "@jest/environment": "^26.0.1-alpha.0", + "@jest/test-result": "^26.0.1-alpha.0", + "@jest/types": "^26.0.1-alpha.0", "chalk": "^4.0.0", "co": "^4.6.0", "dedent": "^0.7.0", - "expect": "^26.0.0", + "expect": "^26.0.1-alpha.0", "is-generator-fn": "^2.0.0", - "jest-each": "^26.0.0", - "jest-matcher-utils": "^26.0.0", - "jest-message-util": "^26.0.0", - "jest-runtime": "^26.0.0", - "jest-snapshot": "^26.0.0", - "jest-util": "^26.0.0", - "pretty-format": "^26.0.0", + "jest-each": "^26.0.1-alpha.0", + "jest-matcher-utils": "^26.0.1-alpha.0", + "jest-message-util": "^26.0.1-alpha.0", + "jest-runtime": "^26.0.1-alpha.0", + "jest-snapshot": "^26.0.1-alpha.0", + "jest-util": "^26.0.1-alpha.0", + "pretty-format": "^26.0.1-alpha.0", "stack-utils": "^2.0.2", "throat": "^5.0.0" }, diff --git a/packages/jest-cli/package.json b/packages/jest-cli/package.json index a36003ceb06c..7bea15a370cc 100644 --- a/packages/jest-cli/package.json +++ b/packages/jest-cli/package.json @@ -1,21 +1,21 @@ { "name": "jest-cli", "description": "Delightful JavaScript Testing.", - "version": "26.0.0", + "version": "26.0.1-alpha.0", "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/core": "^26.0.0", - "@jest/test-result": "^26.0.0", - "@jest/types": "^26.0.0", + "@jest/core": "^26.0.1-alpha.0", + "@jest/test-result": "^26.0.1-alpha.0", + "@jest/types": "^26.0.1-alpha.0", "chalk": "^4.0.0", "exit": "^0.1.2", "graceful-fs": "^4.2.4", "import-local": "^3.0.2", "is-ci": "^2.0.0", - "jest-config": "^26.0.0", - "jest-util": "^26.0.0", - "jest-validate": "^26.0.0", + "jest-config": "^26.0.1-alpha.0", + "jest-util": "^26.0.1-alpha.0", + "jest-validate": "^26.0.1-alpha.0", "prompts": "^2.0.1", "yargs": "^15.3.1" }, diff --git a/packages/jest-config/package.json b/packages/jest-config/package.json index 75a00739678a..8c0037c9ae05 100644 --- a/packages/jest-config/package.json +++ b/packages/jest-config/package.json @@ -1,6 +1,6 @@ { "name": "jest-config", - "version": "26.0.0", + "version": "26.0.1-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -11,23 +11,23 @@ "types": "build/index.d.ts", "dependencies": { "@babel/core": "^7.1.0", - "@jest/test-sequencer": "^26.0.0", - "@jest/types": "^26.0.0", - "babel-jest": "^26.0.0", + "@jest/test-sequencer": "^26.0.1-alpha.0", + "@jest/types": "^26.0.1-alpha.0", + "babel-jest": "^26.0.1-alpha.0", "chalk": "^4.0.0", "deepmerge": "^4.2.2", "glob": "^7.1.1", "graceful-fs": "^4.2.4", - "jest-environment-jsdom": "^26.0.0", - "jest-environment-node": "^26.0.0", + "jest-environment-jsdom": "^26.0.1-alpha.0", + "jest-environment-node": "^26.0.1-alpha.0", "jest-get-type": "^26.0.0", - "jest-jasmine2": "^26.0.0", + "jest-jasmine2": "^26.0.1-alpha.0", "jest-regex-util": "^26.0.0", - "jest-resolve": "^26.0.0", - "jest-util": "^26.0.0", - "jest-validate": "^26.0.0", + "jest-resolve": "^26.0.1-alpha.0", + "jest-util": "^26.0.1-alpha.0", + "jest-validate": "^26.0.1-alpha.0", "micromatch": "^4.0.2", - "pretty-format": "^26.0.0" + "pretty-format": "^26.0.1-alpha.0" }, "devDependencies": { "@types/babel__core": "^7.0.4", diff --git a/packages/jest-console/package.json b/packages/jest-console/package.json index 13ef31ab900a..cc10cd99003f 100644 --- a/packages/jest-console/package.json +++ b/packages/jest-console/package.json @@ -1,6 +1,6 @@ { "name": "@jest/console", - "version": "26.0.0", + "version": "26.0.1-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,10 +10,10 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/types": "^26.0.0", + "@jest/types": "^26.0.1-alpha.0", "chalk": "^4.0.0", - "jest-message-util": "^26.0.0", - "jest-util": "^26.0.0", + "jest-message-util": "^26.0.1-alpha.0", + "jest-util": "^26.0.1-alpha.0", "slash": "^3.0.0" }, "devDependencies": { diff --git a/packages/jest-core/package.json b/packages/jest-core/package.json index f0973a45cbaf..af97c4543ce5 100644 --- a/packages/jest-core/package.json +++ b/packages/jest-core/package.json @@ -1,32 +1,32 @@ { "name": "@jest/core", "description": "Delightful JavaScript Testing.", - "version": "26.0.0", + "version": "26.0.1-alpha.0", "main": "build/jest.js", "types": "build/jest.d.ts", "dependencies": { - "@jest/console": "^26.0.0", - "@jest/reporters": "^26.0.0", - "@jest/test-result": "^26.0.0", - "@jest/transform": "^26.0.0", - "@jest/types": "^26.0.0", + "@jest/console": "^26.0.1-alpha.0", + "@jest/reporters": "^26.0.1-alpha.0", + "@jest/test-result": "^26.0.1-alpha.0", + "@jest/transform": "^26.0.1-alpha.0", + "@jest/types": "^26.0.1-alpha.0", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", "exit": "^0.1.2", "graceful-fs": "^4.2.4", - "jest-changed-files": "^26.0.0", - "jest-config": "^26.0.0", - "jest-haste-map": "^26.0.0", - "jest-message-util": "^26.0.0", + "jest-changed-files": "^26.0.1-alpha.0", + "jest-config": "^26.0.1-alpha.0", + "jest-haste-map": "^26.0.1-alpha.0", + "jest-message-util": "^26.0.1-alpha.0", "jest-regex-util": "^26.0.0", - "jest-resolve": "^26.0.0", - "jest-resolve-dependencies": "^26.0.0", - "jest-runner": "^26.0.0", - "jest-runtime": "^26.0.0", - "jest-snapshot": "^26.0.0", - "jest-util": "^26.0.0", - "jest-validate": "^26.0.0", - "jest-watcher": "^26.0.0", + "jest-resolve": "^26.0.1-alpha.0", + "jest-resolve-dependencies": "^26.0.1-alpha.0", + "jest-runner": "^26.0.1-alpha.0", + "jest-runtime": "^26.0.1-alpha.0", + "jest-snapshot": "^26.0.1-alpha.0", + "jest-util": "^26.0.1-alpha.0", + "jest-validate": "^26.0.1-alpha.0", + "jest-watcher": "^26.0.1-alpha.0", "micromatch": "^4.0.2", "p-each-series": "^2.1.0", "rimraf": "^3.0.0", @@ -34,7 +34,7 @@ "strip-ansi": "^6.0.0" }, "devDependencies": { - "@jest/test-sequencer": "^26.0.0", + "@jest/test-sequencer": "^26.0.1-alpha.0", "@types/exit": "^0.1.30", "@types/graceful-fs": "^4.1.2", "@types/micromatch": "^4.0.0", diff --git a/packages/jest-diff/package.json b/packages/jest-diff/package.json index fa0b79a76ec8..349c7b512904 100644 --- a/packages/jest-diff/package.json +++ b/packages/jest-diff/package.json @@ -1,6 +1,6 @@ { "name": "jest-diff", - "version": "26.0.0", + "version": "26.0.1-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -13,7 +13,7 @@ "chalk": "^4.0.0", "diff-sequences": "^26.0.0", "jest-get-type": "^26.0.0", - "pretty-format": "^26.0.0" + "pretty-format": "^26.0.1-alpha.0" }, "devDependencies": { "@jest/test-utils": "^26.0.0", diff --git a/packages/jest-each/package.json b/packages/jest-each/package.json index 40d936e3e29c..8545c858b123 100644 --- a/packages/jest-each/package.json +++ b/packages/jest-each/package.json @@ -1,6 +1,6 @@ { "name": "jest-each", - "version": "26.0.0", + "version": "26.0.1-alpha.0", "description": "Parameterised tests for Jest", "main": "build/index.js", "types": "build/index.d.ts", @@ -18,11 +18,11 @@ "author": "Matt Phillips (mattphillips)", "license": "MIT", "dependencies": { - "@jest/types": "^26.0.0", + "@jest/types": "^26.0.1-alpha.0", "chalk": "^4.0.0", "jest-get-type": "^26.0.0", - "jest-util": "^26.0.0", - "pretty-format": "^26.0.0" + "jest-util": "^26.0.1-alpha.0", + "pretty-format": "^26.0.1-alpha.0" }, "engines": { "node": ">= 10.14.2" diff --git a/packages/jest-environment-jsdom/package.json b/packages/jest-environment-jsdom/package.json index ab98679c8e2a..497dfc446ad1 100644 --- a/packages/jest-environment-jsdom/package.json +++ b/packages/jest-environment-jsdom/package.json @@ -1,6 +1,6 @@ { "name": "jest-environment-jsdom", - "version": "26.0.0", + "version": "26.0.1-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,11 +10,11 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/environment": "^26.0.0", - "@jest/fake-timers": "^26.0.0", - "@jest/types": "^26.0.0", - "jest-mock": "^26.0.0", - "jest-util": "^26.0.0", + "@jest/environment": "^26.0.1-alpha.0", + "@jest/fake-timers": "^26.0.1-alpha.0", + "@jest/types": "^26.0.1-alpha.0", + "jest-mock": "^26.0.1-alpha.0", + "jest-util": "^26.0.1-alpha.0", "jsdom": "^16.2.2" }, "devDependencies": { diff --git a/packages/jest-environment-node/package.json b/packages/jest-environment-node/package.json index 364dc20f81ab..432addada7b9 100644 --- a/packages/jest-environment-node/package.json +++ b/packages/jest-environment-node/package.json @@ -1,6 +1,6 @@ { "name": "jest-environment-node", - "version": "26.0.0", + "version": "26.0.1-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,11 +10,11 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/environment": "^26.0.0", - "@jest/fake-timers": "^26.0.0", - "@jest/types": "^26.0.0", - "jest-mock": "^26.0.0", - "jest-util": "^26.0.0" + "@jest/environment": "^26.0.1-alpha.0", + "@jest/fake-timers": "^26.0.1-alpha.0", + "@jest/types": "^26.0.1-alpha.0", + "jest-mock": "^26.0.1-alpha.0", + "jest-util": "^26.0.1-alpha.0" }, "engines": { "node": ">= 10.14.2" diff --git a/packages/jest-environment/package.json b/packages/jest-environment/package.json index a0bf45d5c13d..8fd03f1f29ef 100644 --- a/packages/jest-environment/package.json +++ b/packages/jest-environment/package.json @@ -1,6 +1,6 @@ { "name": "@jest/environment", - "version": "26.0.0", + "version": "26.0.1-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,9 +10,9 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/fake-timers": "^26.0.0", - "@jest/types": "^26.0.0", - "jest-mock": "^26.0.0" + "@jest/fake-timers": "^26.0.1-alpha.0", + "@jest/types": "^26.0.1-alpha.0", + "jest-mock": "^26.0.1-alpha.0" }, "devDependencies": { "@types/node": "*" diff --git a/packages/jest-fake-timers/package.json b/packages/jest-fake-timers/package.json index 1f4d96161c4f..63dfa579aa2a 100644 --- a/packages/jest-fake-timers/package.json +++ b/packages/jest-fake-timers/package.json @@ -1,6 +1,6 @@ { "name": "@jest/fake-timers", - "version": "26.0.0", + "version": "26.0.1-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,11 +10,11 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/types": "^26.0.0", + "@jest/types": "^26.0.1-alpha.0", "@sinonjs/fake-timers": "^6.0.1", - "jest-message-util": "^26.0.0", - "jest-mock": "^26.0.0", - "jest-util": "^26.0.0" + "jest-message-util": "^26.0.1-alpha.0", + "jest-mock": "^26.0.1-alpha.0", + "jest-util": "^26.0.1-alpha.0" }, "devDependencies": { "@types/node": "*", diff --git a/packages/jest-globals/package.json b/packages/jest-globals/package.json index 2c1b1626f7ab..507fd9170970 100644 --- a/packages/jest-globals/package.json +++ b/packages/jest-globals/package.json @@ -1,6 +1,6 @@ { "name": "@jest/globals", - "version": "26.0.0", + "version": "26.0.1-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -13,9 +13,9 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/environment": "^26.0.0", - "@jest/types": "^26.0.0", - "expect": "^26.0.0" + "@jest/environment": "^26.0.1-alpha.0", + "@jest/types": "^26.0.1-alpha.0", + "expect": "^26.0.1-alpha.0" }, "publishConfig": { "access": "public" diff --git a/packages/jest-haste-map/package.json b/packages/jest-haste-map/package.json index 47167632ce8a..d761ab6b8cf3 100644 --- a/packages/jest-haste-map/package.json +++ b/packages/jest-haste-map/package.json @@ -1,6 +1,6 @@ { "name": "jest-haste-map", - "version": "26.0.0", + "version": "26.0.1-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,13 +10,13 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/types": "^26.0.0", + "@jest/types": "^26.0.1-alpha.0", "@types/graceful-fs": "^4.1.2", "anymatch": "^3.0.3", "fb-watchman": "^2.0.0", "graceful-fs": "^4.2.4", "jest-serializer": "^26.0.0", - "jest-util": "^26.0.0", + "jest-util": "^26.0.1-alpha.0", "jest-worker": "^26.0.0", "micromatch": "^4.0.2", "sane": "^4.0.3", diff --git a/packages/jest-jasmine2/package.json b/packages/jest-jasmine2/package.json index 59b7e8580508..8f3fe550ecab 100644 --- a/packages/jest-jasmine2/package.json +++ b/packages/jest-jasmine2/package.json @@ -1,6 +1,6 @@ { "name": "jest-jasmine2", - "version": "26.0.0", + "version": "26.0.1-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -11,21 +11,21 @@ "types": "build/index.d.ts", "dependencies": { "@babel/traverse": "^7.1.0", - "@jest/environment": "^26.0.0", + "@jest/environment": "^26.0.1-alpha.0", "@jest/source-map": "^26.0.0", - "@jest/test-result": "^26.0.0", - "@jest/types": "^26.0.0", + "@jest/test-result": "^26.0.1-alpha.0", + "@jest/types": "^26.0.1-alpha.0", "chalk": "^4.0.0", "co": "^4.6.0", - "expect": "^26.0.0", + "expect": "^26.0.1-alpha.0", "is-generator-fn": "^2.0.0", - "jest-each": "^26.0.0", - "jest-matcher-utils": "^26.0.0", - "jest-message-util": "^26.0.0", - "jest-runtime": "^26.0.0", - "jest-snapshot": "^26.0.0", - "jest-util": "^26.0.0", - "pretty-format": "^26.0.0", + "jest-each": "^26.0.1-alpha.0", + "jest-matcher-utils": "^26.0.1-alpha.0", + "jest-message-util": "^26.0.1-alpha.0", + "jest-runtime": "^26.0.1-alpha.0", + "jest-snapshot": "^26.0.1-alpha.0", + "jest-util": "^26.0.1-alpha.0", + "pretty-format": "^26.0.1-alpha.0", "throat": "^5.0.0" }, "devDependencies": { diff --git a/packages/jest-leak-detector/package.json b/packages/jest-leak-detector/package.json index ce5e7f25be0e..d2d347412655 100644 --- a/packages/jest-leak-detector/package.json +++ b/packages/jest-leak-detector/package.json @@ -1,6 +1,6 @@ { "name": "jest-leak-detector", - "version": "26.0.0", + "version": "26.0.1-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -11,7 +11,7 @@ "types": "build/index.d.ts", "dependencies": { "jest-get-type": "^26.0.0", - "pretty-format": "^26.0.0" + "pretty-format": "^26.0.1-alpha.0" }, "devDependencies": { "@types/weak-napi": "^1.0.0", diff --git a/packages/jest-matcher-utils/package.json b/packages/jest-matcher-utils/package.json index cc0fd8c74f46..e4aaac38f5c4 100644 --- a/packages/jest-matcher-utils/package.json +++ b/packages/jest-matcher-utils/package.json @@ -1,7 +1,7 @@ { "name": "jest-matcher-utils", "description": "A set of utility functions for expect and related packages", - "version": "26.0.0", + "version": "26.0.1-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -15,9 +15,9 @@ "types": "build/index.d.ts", "dependencies": { "chalk": "^4.0.0", - "jest-diff": "^26.0.0", + "jest-diff": "^26.0.1-alpha.0", "jest-get-type": "^26.0.0", - "pretty-format": "^26.0.0" + "pretty-format": "^26.0.1-alpha.0" }, "devDependencies": { "@jest/test-utils": "^26.0.0", diff --git a/packages/jest-message-util/package.json b/packages/jest-message-util/package.json index d89978b73e67..7d20ba2161e9 100644 --- a/packages/jest-message-util/package.json +++ b/packages/jest-message-util/package.json @@ -1,6 +1,6 @@ { "name": "jest-message-util", - "version": "26.0.0", + "version": "26.0.1-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -14,7 +14,7 @@ "types": "build/index.d.ts", "dependencies": { "@babel/code-frame": "^7.0.0", - "@jest/types": "^26.0.0", + "@jest/types": "^26.0.1-alpha.0", "@types/stack-utils": "^1.0.1", "chalk": "^4.0.0", "graceful-fs": "^4.2.4", diff --git a/packages/jest-mock/package.json b/packages/jest-mock/package.json index 2e8799b4b6c0..e1c1dc38ccda 100644 --- a/packages/jest-mock/package.json +++ b/packages/jest-mock/package.json @@ -1,6 +1,6 @@ { "name": "jest-mock", - "version": "26.0.0", + "version": "26.0.1-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,7 +10,7 @@ "node": ">= 10.14.2" }, "dependencies": { - "@jest/types": "^26.0.0" + "@jest/types": "^26.0.1-alpha.0" }, "devDependencies": { "@types/node": "*" diff --git a/packages/jest-phabricator/package.json b/packages/jest-phabricator/package.json index 6464af49d12b..caadbe388d66 100644 --- a/packages/jest-phabricator/package.json +++ b/packages/jest-phabricator/package.json @@ -1,6 +1,6 @@ { "name": "jest-phabricator", - "version": "26.0.0", + "version": "26.0.1-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -8,7 +8,7 @@ }, "types": "build/index.d.ts", "dependencies": { - "@jest/test-result": "^26.0.0" + "@jest/test-result": "^26.0.1-alpha.0" }, "engines": { "node": ">= 10.14.2" diff --git a/packages/jest-repl/package.json b/packages/jest-repl/package.json index cffc73a0675f..6b6049151419 100644 --- a/packages/jest-repl/package.json +++ b/packages/jest-repl/package.json @@ -1,6 +1,6 @@ { "name": "jest-repl", - "version": "26.0.0", + "version": "26.0.1-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,11 +10,11 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/transform": "^26.0.0", - "@jest/types": "^26.0.0", - "jest-config": "^26.0.0", - "jest-runtime": "^26.0.0", - "jest-validate": "^26.0.0", + "@jest/transform": "^26.0.1-alpha.0", + "@jest/types": "^26.0.1-alpha.0", + "jest-config": "^26.0.1-alpha.0", + "jest-runtime": "^26.0.1-alpha.0", + "jest-validate": "^26.0.1-alpha.0", "repl": "^0.1.3", "yargs": "^15.3.1" }, diff --git a/packages/jest-reporters/package.json b/packages/jest-reporters/package.json index 415e7a0b4ce9..4667c64034f8 100644 --- a/packages/jest-reporters/package.json +++ b/packages/jest-reporters/package.json @@ -1,15 +1,15 @@ { "name": "@jest/reporters", "description": "Jest's reporters", - "version": "26.0.0", + "version": "26.0.1-alpha.0", "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^26.0.0", - "@jest/test-result": "^26.0.0", - "@jest/transform": "^26.0.0", - "@jest/types": "^26.0.0", + "@jest/console": "^26.0.1-alpha.0", + "@jest/test-result": "^26.0.1-alpha.0", + "@jest/transform": "^26.0.1-alpha.0", + "@jest/types": "^26.0.1-alpha.0", "chalk": "^4.0.0", "collect-v8-coverage": "^1.0.0", "exit": "^0.1.2", @@ -20,9 +20,9 @@ "istanbul-lib-report": "^3.0.0", "istanbul-lib-source-maps": "^4.0.0", "istanbul-reports": "^3.0.2", - "jest-haste-map": "^26.0.0", - "jest-resolve": "^26.0.0", - "jest-util": "^26.0.0", + "jest-haste-map": "^26.0.1-alpha.0", + "jest-resolve": "^26.0.1-alpha.0", + "jest-util": "^26.0.1-alpha.0", "jest-worker": "^26.0.0", "slash": "^3.0.0", "source-map": "^0.6.0", diff --git a/packages/jest-resolve-dependencies/package.json b/packages/jest-resolve-dependencies/package.json index 9a1fb4620032..0e2f5db8a358 100644 --- a/packages/jest-resolve-dependencies/package.json +++ b/packages/jest-resolve-dependencies/package.json @@ -1,6 +1,6 @@ { "name": "jest-resolve-dependencies", - "version": "26.0.0", + "version": "26.0.1-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,14 +10,14 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/types": "^26.0.0", + "@jest/types": "^26.0.1-alpha.0", "jest-regex-util": "^26.0.0", - "jest-snapshot": "^26.0.0" + "jest-snapshot": "^26.0.1-alpha.0" }, "devDependencies": { - "jest-haste-map": "^26.0.0", - "jest-resolve": "^26.0.0", - "jest-runtime": "^26.0.0" + "jest-haste-map": "^26.0.1-alpha.0", + "jest-resolve": "^26.0.1-alpha.0", + "jest-runtime": "^26.0.1-alpha.0" }, "engines": { "node": ">= 10.14.2" diff --git a/packages/jest-resolve/package.json b/packages/jest-resolve/package.json index 6bb27dfc6b8e..ba32e8039d79 100644 --- a/packages/jest-resolve/package.json +++ b/packages/jest-resolve/package.json @@ -1,6 +1,6 @@ { "name": "jest-resolve", - "version": "26.0.0", + "version": "26.0.1-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,11 +10,11 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/types": "^26.0.0", + "@jest/types": "^26.0.1-alpha.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.4", "jest-pnp-resolver": "^1.2.1", - "jest-util": "^26.0.0", + "jest-util": "^26.0.1-alpha.0", "read-pkg-up": "^7.0.1", "resolve": "^1.17.0", "slash": "^3.0.0" @@ -22,7 +22,7 @@ "devDependencies": { "@types/graceful-fs": "^4.1.3", "@types/resolve": "^1.14.0", - "jest-haste-map": "^26.0.0" + "jest-haste-map": "^26.0.1-alpha.0" }, "engines": { "node": ">= 10.14.2" diff --git a/packages/jest-runner/package.json b/packages/jest-runner/package.json index d075ff3d9d69..d3f0961029a6 100644 --- a/packages/jest-runner/package.json +++ b/packages/jest-runner/package.json @@ -1,6 +1,6 @@ { "name": "jest-runner", - "version": "26.0.0", + "version": "26.0.1-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,22 +10,22 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/console": "^26.0.0", - "@jest/environment": "^26.0.0", - "@jest/test-result": "^26.0.0", - "@jest/types": "^26.0.0", + "@jest/console": "^26.0.1-alpha.0", + "@jest/environment": "^26.0.1-alpha.0", + "@jest/test-result": "^26.0.1-alpha.0", + "@jest/types": "^26.0.1-alpha.0", "chalk": "^4.0.0", "exit": "^0.1.2", "graceful-fs": "^4.2.4", - "jest-config": "^26.0.0", + "jest-config": "^26.0.1-alpha.0", "jest-docblock": "^26.0.0", - "jest-haste-map": "^26.0.0", - "jest-jasmine2": "^26.0.0", - "jest-leak-detector": "^26.0.0", - "jest-message-util": "^26.0.0", - "jest-resolve": "^26.0.0", - "jest-runtime": "^26.0.0", - "jest-util": "^26.0.0", + "jest-haste-map": "^26.0.1-alpha.0", + "jest-jasmine2": "^26.0.1-alpha.0", + "jest-leak-detector": "^26.0.1-alpha.0", + "jest-message-util": "^26.0.1-alpha.0", + "jest-resolve": "^26.0.1-alpha.0", + "jest-runtime": "^26.0.1-alpha.0", + "jest-util": "^26.0.1-alpha.0", "jest-worker": "^26.0.0", "source-map-support": "^0.5.6", "throat": "^5.0.0" @@ -35,7 +35,7 @@ "@types/graceful-fs": "^4.1.2", "@types/node": "*", "@types/source-map-support": "^0.5.0", - "jest-circus": "^26.0.0" + "jest-circus": "^26.0.1-alpha.0" }, "engines": { "node": ">= 10.14.2" diff --git a/packages/jest-runtime/package.json b/packages/jest-runtime/package.json index 950b45f39105..0e9e73812836 100644 --- a/packages/jest-runtime/package.json +++ b/packages/jest-runtime/package.json @@ -1,6 +1,6 @@ { "name": "jest-runtime", - "version": "26.0.0", + "version": "26.0.1-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,29 +10,29 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/console": "^26.0.0", - "@jest/environment": "^26.0.0", - "@jest/fake-timers": "^26.0.0", - "@jest/globals": "^26.0.0", + "@jest/console": "^26.0.1-alpha.0", + "@jest/environment": "^26.0.1-alpha.0", + "@jest/fake-timers": "^26.0.1-alpha.0", + "@jest/globals": "^26.0.1-alpha.0", "@jest/source-map": "^26.0.0", - "@jest/test-result": "^26.0.0", - "@jest/transform": "^26.0.0", - "@jest/types": "^26.0.0", + "@jest/test-result": "^26.0.1-alpha.0", + "@jest/transform": "^26.0.1-alpha.0", + "@jest/types": "^26.0.1-alpha.0", "@types/yargs": "^15.0.0", "chalk": "^4.0.0", "collect-v8-coverage": "^1.0.0", "exit": "^0.1.2", "glob": "^7.1.3", "graceful-fs": "^4.2.4", - "jest-config": "^26.0.0", - "jest-haste-map": "^26.0.0", - "jest-message-util": "^26.0.0", - "jest-mock": "^26.0.0", + "jest-config": "^26.0.1-alpha.0", + "jest-haste-map": "^26.0.1-alpha.0", + "jest-message-util": "^26.0.1-alpha.0", + "jest-mock": "^26.0.1-alpha.0", "jest-regex-util": "^26.0.0", - "jest-resolve": "^26.0.0", - "jest-snapshot": "^26.0.0", - "jest-util": "^26.0.0", - "jest-validate": "^26.0.0", + "jest-resolve": "^26.0.1-alpha.0", + "jest-snapshot": "^26.0.1-alpha.0", + "jest-util": "^26.0.1-alpha.0", + "jest-validate": "^26.0.1-alpha.0", "slash": "^3.0.0", "strip-bom": "^4.0.0", "yargs": "^15.3.1" @@ -43,7 +43,7 @@ "@types/glob": "^7.1.1", "@types/graceful-fs": "^4.1.2", "execa": "^4.0.0", - "jest-environment-node": "^26.0.0", + "jest-environment-node": "^26.0.1-alpha.0", "jest-snapshot-serializer-raw": "^1.1.0" }, "bin": "./bin/jest-runtime.js", diff --git a/packages/jest-snapshot/package.json b/packages/jest-snapshot/package.json index 6d090520113a..a54ae5c8efcd 100644 --- a/packages/jest-snapshot/package.json +++ b/packages/jest-snapshot/package.json @@ -1,6 +1,6 @@ { "name": "jest-snapshot", - "version": "26.0.0", + "version": "26.0.1-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -11,19 +11,19 @@ "types": "build/index.d.ts", "dependencies": { "@babel/types": "^7.0.0", - "@jest/types": "^26.0.0", + "@jest/types": "^26.0.1-alpha.0", "@types/prettier": "^2.0.0", "chalk": "^4.0.0", - "expect": "^26.0.0", + "expect": "^26.0.1-alpha.0", "graceful-fs": "^4.2.4", - "jest-diff": "^26.0.0", + "jest-diff": "^26.0.1-alpha.0", "jest-get-type": "^26.0.0", - "jest-matcher-utils": "^26.0.0", - "jest-message-util": "^26.0.0", - "jest-resolve": "^26.0.0", + "jest-matcher-utils": "^26.0.1-alpha.0", + "jest-message-util": "^26.0.1-alpha.0", + "jest-resolve": "^26.0.1-alpha.0", "make-dir": "^3.0.0", "natural-compare": "^1.4.0", - "pretty-format": "^26.0.0", + "pretty-format": "^26.0.1-alpha.0", "semver": "^7.3.2" }, "devDependencies": { @@ -33,7 +33,7 @@ "@types/semver": "^7.1.0", "ansi-regex": "^5.0.0", "ansi-styles": "^4.2.0", - "jest-haste-map": "^26.0.0", + "jest-haste-map": "^26.0.1-alpha.0", "prettier": "^1.19.1" }, "engines": { diff --git a/packages/jest-test-result/package.json b/packages/jest-test-result/package.json index 50cb32a6f57d..aa606c567fb8 100644 --- a/packages/jest-test-result/package.json +++ b/packages/jest-test-result/package.json @@ -1,6 +1,6 @@ { "name": "@jest/test-result", - "version": "26.0.0", + "version": "26.0.1-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,8 +10,8 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/console": "^26.0.0", - "@jest/types": "^26.0.0", + "@jest/console": "^26.0.1-alpha.0", + "@jest/types": "^26.0.1-alpha.0", "@types/istanbul-lib-coverage": "^2.0.0", "collect-v8-coverage": "^1.0.0" }, diff --git a/packages/jest-test-sequencer/package.json b/packages/jest-test-sequencer/package.json index a70542f4e387..2453df102fe5 100644 --- a/packages/jest-test-sequencer/package.json +++ b/packages/jest-test-sequencer/package.json @@ -1,6 +1,6 @@ { "name": "@jest/test-sequencer", - "version": "26.0.0", + "version": "26.0.1-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,11 +10,11 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/test-result": "^26.0.0", + "@jest/test-result": "^26.0.1-alpha.0", "graceful-fs": "^4.2.4", - "jest-haste-map": "^26.0.0", - "jest-runner": "^26.0.0", - "jest-runtime": "^26.0.0" + "jest-haste-map": "^26.0.1-alpha.0", + "jest-runner": "^26.0.1-alpha.0", + "jest-runtime": "^26.0.1-alpha.0" }, "devDependencies": { "@types/graceful-fs": "^4.1.3" diff --git a/packages/jest-transform/package.json b/packages/jest-transform/package.json index 832b7b894c14..d7f46ce14f74 100644 --- a/packages/jest-transform/package.json +++ b/packages/jest-transform/package.json @@ -1,6 +1,6 @@ { "name": "@jest/transform", - "version": "26.0.0", + "version": "26.0.1-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -11,15 +11,15 @@ "types": "build/index.d.ts", "dependencies": { "@babel/core": "^7.1.0", - "@jest/types": "^26.0.0", + "@jest/types": "^26.0.1-alpha.0", "babel-plugin-istanbul": "^6.0.0", "chalk": "^4.0.0", "convert-source-map": "^1.4.0", "fast-json-stable-stringify": "^2.0.0", "graceful-fs": "^4.2.4", - "jest-haste-map": "^26.0.0", + "jest-haste-map": "^26.0.1-alpha.0", "jest-regex-util": "^26.0.0", - "jest-util": "^26.0.0", + "jest-util": "^26.0.1-alpha.0", "micromatch": "^4.0.2", "pirates": "^4.0.1", "slash": "^3.0.0", diff --git a/packages/jest-types/package.json b/packages/jest-types/package.json index a686a7c1d995..741227c145ff 100644 --- a/packages/jest-types/package.json +++ b/packages/jest-types/package.json @@ -1,6 +1,6 @@ { "name": "@jest/types", - "version": "26.0.0", + "version": "26.0.1-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", diff --git a/packages/jest-util/package.json b/packages/jest-util/package.json index 7bbb03486d30..123392990010 100644 --- a/packages/jest-util/package.json +++ b/packages/jest-util/package.json @@ -1,6 +1,6 @@ { "name": "jest-util", - "version": "26.0.0", + "version": "26.0.1-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,7 +10,7 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/types": "^26.0.0", + "@jest/types": "^26.0.1-alpha.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.4", "is-ci": "^2.0.0", diff --git a/packages/jest-validate/package.json b/packages/jest-validate/package.json index a70953e0d0e7..597f8e2f335a 100644 --- a/packages/jest-validate/package.json +++ b/packages/jest-validate/package.json @@ -1,6 +1,6 @@ { "name": "jest-validate", - "version": "26.0.0", + "version": "26.0.1-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,12 +10,12 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/types": "^26.0.0", + "@jest/types": "^26.0.1-alpha.0", "camelcase": "^6.0.0", "chalk": "^4.0.0", "jest-get-type": "^26.0.0", "leven": "^3.1.0", - "pretty-format": "^26.0.0" + "pretty-format": "^26.0.1-alpha.0" }, "devDependencies": { "@types/yargs": "^15.0.3" diff --git a/packages/jest-watcher/package.json b/packages/jest-watcher/package.json index fa0acb3d6d78..7c2ad7788b16 100644 --- a/packages/jest-watcher/package.json +++ b/packages/jest-watcher/package.json @@ -1,15 +1,15 @@ { "name": "jest-watcher", "description": "Delightful JavaScript Testing.", - "version": "26.0.0", + "version": "26.0.1-alpha.0", "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/test-result": "^26.0.0", - "@jest/types": "^26.0.0", + "@jest/test-result": "^26.0.1-alpha.0", + "@jest/types": "^26.0.1-alpha.0", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", - "jest-util": "^26.0.0", + "jest-util": "^26.0.1-alpha.0", "string-length": "^4.0.1" }, "devDependencies": { diff --git a/packages/jest/package.json b/packages/jest/package.json index aa30737001b3..64073c1166cd 100644 --- a/packages/jest/package.json +++ b/packages/jest/package.json @@ -1,13 +1,13 @@ { "name": "jest", "description": "Delightful JavaScript Testing.", - "version": "26.0.0", + "version": "26.0.1-alpha.0", "main": "build/jest.js", "types": "build/jest.d.ts", "dependencies": { - "@jest/core": "^26.0.0", + "@jest/core": "^26.0.1-alpha.0", "import-local": "^3.0.2", - "jest-cli": "^26.0.0" + "jest-cli": "^26.0.1-alpha.0" }, "bin": "./bin/jest.js", "engines": { diff --git a/packages/pretty-format/package.json b/packages/pretty-format/package.json index 68581c67d4b1..97294edbfc9d 100644 --- a/packages/pretty-format/package.json +++ b/packages/pretty-format/package.json @@ -1,6 +1,6 @@ { "name": "pretty-format", - "version": "26.0.0", + "version": "26.0.1-alpha.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -12,7 +12,7 @@ "types": "build/index.d.ts", "author": "James Kyle ", "dependencies": { - "@jest/types": "^26.0.0", + "@jest/types": "^26.0.1-alpha.0", "ansi-regex": "^5.0.0", "ansi-styles": "^4.0.0", "react-is": "^16.12.0" From a04d28df5fc4a5edc127aa16b1d14d317aab07f7 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Tue, 5 May 2020 12:35:03 +0200 Subject: [PATCH 081/106] chore: update changelog for release --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index aae17a1fc652..4ebd9b960661 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,12 @@ ### Performance +## 26.0.1 + +### Fixes + +- `[jest-circus]` Populate `DescribeBlock.tests` to not break Detox reporter + ## 26.0.0 ### Features From 40b8e1e157c9981dda5a68d73fff647e80fc9f5c Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Tue, 5 May 2020 12:40:33 +0200 Subject: [PATCH 082/106] v26.0.1 --- lerna.json | 2 +- packages/babel-jest/package.json | 6 +-- packages/expect/package.json | 8 ++-- packages/jest-changed-files/package.json | 4 +- packages/jest-circus/package.json | 24 ++++++------ packages/jest-cli/package.json | 14 +++---- packages/jest-config/package.json | 22 +++++------ packages/jest-console/package.json | 8 ++-- packages/jest-core/package.json | 38 +++++++++---------- packages/jest-diff/package.json | 4 +- packages/jest-each/package.json | 8 ++-- packages/jest-environment-jsdom/package.json | 12 +++--- packages/jest-environment-node/package.json | 12 +++--- packages/jest-environment/package.json | 8 ++-- packages/jest-fake-timers/package.json | 10 ++--- packages/jest-globals/package.json | 8 ++-- packages/jest-haste-map/package.json | 6 +-- packages/jest-jasmine2/package.json | 24 ++++++------ packages/jest-leak-detector/package.json | 4 +- packages/jest-matcher-utils/package.json | 6 +-- packages/jest-message-util/package.json | 4 +- packages/jest-mock/package.json | 4 +- packages/jest-phabricator/package.json | 4 +- packages/jest-repl/package.json | 12 +++--- packages/jest-reporters/package.json | 16 ++++---- .../jest-resolve-dependencies/package.json | 12 +++--- packages/jest-resolve/package.json | 8 ++-- packages/jest-runner/package.json | 28 +++++++------- packages/jest-runtime/package.json | 34 ++++++++--------- packages/jest-snapshot/package.json | 18 ++++----- packages/jest-test-result/package.json | 6 +-- packages/jest-test-sequencer/package.json | 10 ++--- packages/jest-transform/package.json | 8 ++-- packages/jest-types/package.json | 2 +- packages/jest-util/package.json | 4 +- packages/jest-validate/package.json | 6 +-- packages/jest-watcher/package.json | 8 ++-- packages/jest/package.json | 6 +-- packages/pretty-format/package.json | 4 +- 39 files changed, 211 insertions(+), 211 deletions(-) diff --git a/lerna.json b/lerna.json index 8e42132e0225..ece5879dd999 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "26.0.1-alpha.0", + "version": "26.0.1", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/babel-jest/package.json b/packages/babel-jest/package.json index 20fe844b50dc..744ff284a94f 100644 --- a/packages/babel-jest/package.json +++ b/packages/babel-jest/package.json @@ -1,7 +1,7 @@ { "name": "babel-jest", "description": "Jest plugin to use babel for transformation.", - "version": "26.0.1-alpha.0", + "version": "26.0.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -11,8 +11,8 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/transform": "^26.0.1-alpha.0", - "@jest/types": "^26.0.1-alpha.0", + "@jest/transform": "^26.0.1", + "@jest/types": "^26.0.1", "@types/babel__core": "^7.1.7", "babel-plugin-istanbul": "^6.0.0", "babel-preset-jest": "^26.0.0", diff --git a/packages/expect/package.json b/packages/expect/package.json index 9eb195bf9e4c..3df291ab87ef 100644 --- a/packages/expect/package.json +++ b/packages/expect/package.json @@ -1,6 +1,6 @@ { "name": "expect", - "version": "26.0.1-alpha.0", + "version": "26.0.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,11 +10,11 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/types": "^26.0.1-alpha.0", + "@jest/types": "^26.0.1", "ansi-styles": "^4.0.0", "jest-get-type": "^26.0.0", - "jest-matcher-utils": "^26.0.1-alpha.0", - "jest-message-util": "^26.0.1-alpha.0", + "jest-matcher-utils": "^26.0.1", + "jest-message-util": "^26.0.1", "jest-regex-util": "^26.0.0" }, "devDependencies": { diff --git a/packages/jest-changed-files/package.json b/packages/jest-changed-files/package.json index 57ab6b980e19..174c99939b02 100644 --- a/packages/jest-changed-files/package.json +++ b/packages/jest-changed-files/package.json @@ -1,6 +1,6 @@ { "name": "jest-changed-files", - "version": "26.0.1-alpha.0", + "version": "26.0.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,7 +10,7 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/types": "^26.0.1-alpha.0", + "@jest/types": "^26.0.1", "execa": "^4.0.0", "throat": "^5.0.0" }, diff --git a/packages/jest-circus/package.json b/packages/jest-circus/package.json index cdfd9c4739a9..36061ed5f9e4 100644 --- a/packages/jest-circus/package.json +++ b/packages/jest-circus/package.json @@ -1,6 +1,6 @@ { "name": "jest-circus", - "version": "26.0.1-alpha.0", + "version": "26.0.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -11,21 +11,21 @@ "types": "build/index.d.ts", "dependencies": { "@babel/traverse": "^7.1.0", - "@jest/environment": "^26.0.1-alpha.0", - "@jest/test-result": "^26.0.1-alpha.0", - "@jest/types": "^26.0.1-alpha.0", + "@jest/environment": "^26.0.1", + "@jest/test-result": "^26.0.1", + "@jest/types": "^26.0.1", "chalk": "^4.0.0", "co": "^4.6.0", "dedent": "^0.7.0", - "expect": "^26.0.1-alpha.0", + "expect": "^26.0.1", "is-generator-fn": "^2.0.0", - "jest-each": "^26.0.1-alpha.0", - "jest-matcher-utils": "^26.0.1-alpha.0", - "jest-message-util": "^26.0.1-alpha.0", - "jest-runtime": "^26.0.1-alpha.0", - "jest-snapshot": "^26.0.1-alpha.0", - "jest-util": "^26.0.1-alpha.0", - "pretty-format": "^26.0.1-alpha.0", + "jest-each": "^26.0.1", + "jest-matcher-utils": "^26.0.1", + "jest-message-util": "^26.0.1", + "jest-runtime": "^26.0.1", + "jest-snapshot": "^26.0.1", + "jest-util": "^26.0.1", + "pretty-format": "^26.0.1", "stack-utils": "^2.0.2", "throat": "^5.0.0" }, diff --git a/packages/jest-cli/package.json b/packages/jest-cli/package.json index 7bea15a370cc..e66d72814cab 100644 --- a/packages/jest-cli/package.json +++ b/packages/jest-cli/package.json @@ -1,21 +1,21 @@ { "name": "jest-cli", "description": "Delightful JavaScript Testing.", - "version": "26.0.1-alpha.0", + "version": "26.0.1", "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/core": "^26.0.1-alpha.0", - "@jest/test-result": "^26.0.1-alpha.0", - "@jest/types": "^26.0.1-alpha.0", + "@jest/core": "^26.0.1", + "@jest/test-result": "^26.0.1", + "@jest/types": "^26.0.1", "chalk": "^4.0.0", "exit": "^0.1.2", "graceful-fs": "^4.2.4", "import-local": "^3.0.2", "is-ci": "^2.0.0", - "jest-config": "^26.0.1-alpha.0", - "jest-util": "^26.0.1-alpha.0", - "jest-validate": "^26.0.1-alpha.0", + "jest-config": "^26.0.1", + "jest-util": "^26.0.1", + "jest-validate": "^26.0.1", "prompts": "^2.0.1", "yargs": "^15.3.1" }, diff --git a/packages/jest-config/package.json b/packages/jest-config/package.json index 8c0037c9ae05..93bf49c11e86 100644 --- a/packages/jest-config/package.json +++ b/packages/jest-config/package.json @@ -1,6 +1,6 @@ { "name": "jest-config", - "version": "26.0.1-alpha.0", + "version": "26.0.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -11,23 +11,23 @@ "types": "build/index.d.ts", "dependencies": { "@babel/core": "^7.1.0", - "@jest/test-sequencer": "^26.0.1-alpha.0", - "@jest/types": "^26.0.1-alpha.0", - "babel-jest": "^26.0.1-alpha.0", + "@jest/test-sequencer": "^26.0.1", + "@jest/types": "^26.0.1", + "babel-jest": "^26.0.1", "chalk": "^4.0.0", "deepmerge": "^4.2.2", "glob": "^7.1.1", "graceful-fs": "^4.2.4", - "jest-environment-jsdom": "^26.0.1-alpha.0", - "jest-environment-node": "^26.0.1-alpha.0", + "jest-environment-jsdom": "^26.0.1", + "jest-environment-node": "^26.0.1", "jest-get-type": "^26.0.0", - "jest-jasmine2": "^26.0.1-alpha.0", + "jest-jasmine2": "^26.0.1", "jest-regex-util": "^26.0.0", - "jest-resolve": "^26.0.1-alpha.0", - "jest-util": "^26.0.1-alpha.0", - "jest-validate": "^26.0.1-alpha.0", + "jest-resolve": "^26.0.1", + "jest-util": "^26.0.1", + "jest-validate": "^26.0.1", "micromatch": "^4.0.2", - "pretty-format": "^26.0.1-alpha.0" + "pretty-format": "^26.0.1" }, "devDependencies": { "@types/babel__core": "^7.0.4", diff --git a/packages/jest-console/package.json b/packages/jest-console/package.json index cc10cd99003f..2b216fdeeb36 100644 --- a/packages/jest-console/package.json +++ b/packages/jest-console/package.json @@ -1,6 +1,6 @@ { "name": "@jest/console", - "version": "26.0.1-alpha.0", + "version": "26.0.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,10 +10,10 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/types": "^26.0.1-alpha.0", + "@jest/types": "^26.0.1", "chalk": "^4.0.0", - "jest-message-util": "^26.0.1-alpha.0", - "jest-util": "^26.0.1-alpha.0", + "jest-message-util": "^26.0.1", + "jest-util": "^26.0.1", "slash": "^3.0.0" }, "devDependencies": { diff --git a/packages/jest-core/package.json b/packages/jest-core/package.json index af97c4543ce5..1b0e15b4b1ac 100644 --- a/packages/jest-core/package.json +++ b/packages/jest-core/package.json @@ -1,32 +1,32 @@ { "name": "@jest/core", "description": "Delightful JavaScript Testing.", - "version": "26.0.1-alpha.0", + "version": "26.0.1", "main": "build/jest.js", "types": "build/jest.d.ts", "dependencies": { - "@jest/console": "^26.0.1-alpha.0", - "@jest/reporters": "^26.0.1-alpha.0", - "@jest/test-result": "^26.0.1-alpha.0", - "@jest/transform": "^26.0.1-alpha.0", - "@jest/types": "^26.0.1-alpha.0", + "@jest/console": "^26.0.1", + "@jest/reporters": "^26.0.1", + "@jest/test-result": "^26.0.1", + "@jest/transform": "^26.0.1", + "@jest/types": "^26.0.1", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", "exit": "^0.1.2", "graceful-fs": "^4.2.4", - "jest-changed-files": "^26.0.1-alpha.0", - "jest-config": "^26.0.1-alpha.0", - "jest-haste-map": "^26.0.1-alpha.0", - "jest-message-util": "^26.0.1-alpha.0", + "jest-changed-files": "^26.0.1", + "jest-config": "^26.0.1", + "jest-haste-map": "^26.0.1", + "jest-message-util": "^26.0.1", "jest-regex-util": "^26.0.0", - "jest-resolve": "^26.0.1-alpha.0", - "jest-resolve-dependencies": "^26.0.1-alpha.0", - "jest-runner": "^26.0.1-alpha.0", - "jest-runtime": "^26.0.1-alpha.0", - "jest-snapshot": "^26.0.1-alpha.0", - "jest-util": "^26.0.1-alpha.0", - "jest-validate": "^26.0.1-alpha.0", - "jest-watcher": "^26.0.1-alpha.0", + "jest-resolve": "^26.0.1", + "jest-resolve-dependencies": "^26.0.1", + "jest-runner": "^26.0.1", + "jest-runtime": "^26.0.1", + "jest-snapshot": "^26.0.1", + "jest-util": "^26.0.1", + "jest-validate": "^26.0.1", + "jest-watcher": "^26.0.1", "micromatch": "^4.0.2", "p-each-series": "^2.1.0", "rimraf": "^3.0.0", @@ -34,7 +34,7 @@ "strip-ansi": "^6.0.0" }, "devDependencies": { - "@jest/test-sequencer": "^26.0.1-alpha.0", + "@jest/test-sequencer": "^26.0.1", "@types/exit": "^0.1.30", "@types/graceful-fs": "^4.1.2", "@types/micromatch": "^4.0.0", diff --git a/packages/jest-diff/package.json b/packages/jest-diff/package.json index 349c7b512904..18a3323d020c 100644 --- a/packages/jest-diff/package.json +++ b/packages/jest-diff/package.json @@ -1,6 +1,6 @@ { "name": "jest-diff", - "version": "26.0.1-alpha.0", + "version": "26.0.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -13,7 +13,7 @@ "chalk": "^4.0.0", "diff-sequences": "^26.0.0", "jest-get-type": "^26.0.0", - "pretty-format": "^26.0.1-alpha.0" + "pretty-format": "^26.0.1" }, "devDependencies": { "@jest/test-utils": "^26.0.0", diff --git a/packages/jest-each/package.json b/packages/jest-each/package.json index 8545c858b123..2612d2da714d 100644 --- a/packages/jest-each/package.json +++ b/packages/jest-each/package.json @@ -1,6 +1,6 @@ { "name": "jest-each", - "version": "26.0.1-alpha.0", + "version": "26.0.1", "description": "Parameterised tests for Jest", "main": "build/index.js", "types": "build/index.d.ts", @@ -18,11 +18,11 @@ "author": "Matt Phillips (mattphillips)", "license": "MIT", "dependencies": { - "@jest/types": "^26.0.1-alpha.0", + "@jest/types": "^26.0.1", "chalk": "^4.0.0", "jest-get-type": "^26.0.0", - "jest-util": "^26.0.1-alpha.0", - "pretty-format": "^26.0.1-alpha.0" + "jest-util": "^26.0.1", + "pretty-format": "^26.0.1" }, "engines": { "node": ">= 10.14.2" diff --git a/packages/jest-environment-jsdom/package.json b/packages/jest-environment-jsdom/package.json index 497dfc446ad1..bea48a8e67fe 100644 --- a/packages/jest-environment-jsdom/package.json +++ b/packages/jest-environment-jsdom/package.json @@ -1,6 +1,6 @@ { "name": "jest-environment-jsdom", - "version": "26.0.1-alpha.0", + "version": "26.0.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,11 +10,11 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/environment": "^26.0.1-alpha.0", - "@jest/fake-timers": "^26.0.1-alpha.0", - "@jest/types": "^26.0.1-alpha.0", - "jest-mock": "^26.0.1-alpha.0", - "jest-util": "^26.0.1-alpha.0", + "@jest/environment": "^26.0.1", + "@jest/fake-timers": "^26.0.1", + "@jest/types": "^26.0.1", + "jest-mock": "^26.0.1", + "jest-util": "^26.0.1", "jsdom": "^16.2.2" }, "devDependencies": { diff --git a/packages/jest-environment-node/package.json b/packages/jest-environment-node/package.json index 432addada7b9..4b5c5bac86ff 100644 --- a/packages/jest-environment-node/package.json +++ b/packages/jest-environment-node/package.json @@ -1,6 +1,6 @@ { "name": "jest-environment-node", - "version": "26.0.1-alpha.0", + "version": "26.0.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,11 +10,11 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/environment": "^26.0.1-alpha.0", - "@jest/fake-timers": "^26.0.1-alpha.0", - "@jest/types": "^26.0.1-alpha.0", - "jest-mock": "^26.0.1-alpha.0", - "jest-util": "^26.0.1-alpha.0" + "@jest/environment": "^26.0.1", + "@jest/fake-timers": "^26.0.1", + "@jest/types": "^26.0.1", + "jest-mock": "^26.0.1", + "jest-util": "^26.0.1" }, "engines": { "node": ">= 10.14.2" diff --git a/packages/jest-environment/package.json b/packages/jest-environment/package.json index 8fd03f1f29ef..2e20a43d3929 100644 --- a/packages/jest-environment/package.json +++ b/packages/jest-environment/package.json @@ -1,6 +1,6 @@ { "name": "@jest/environment", - "version": "26.0.1-alpha.0", + "version": "26.0.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,9 +10,9 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/fake-timers": "^26.0.1-alpha.0", - "@jest/types": "^26.0.1-alpha.0", - "jest-mock": "^26.0.1-alpha.0" + "@jest/fake-timers": "^26.0.1", + "@jest/types": "^26.0.1", + "jest-mock": "^26.0.1" }, "devDependencies": { "@types/node": "*" diff --git a/packages/jest-fake-timers/package.json b/packages/jest-fake-timers/package.json index 63dfa579aa2a..38bf54d895fe 100644 --- a/packages/jest-fake-timers/package.json +++ b/packages/jest-fake-timers/package.json @@ -1,6 +1,6 @@ { "name": "@jest/fake-timers", - "version": "26.0.1-alpha.0", + "version": "26.0.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,11 +10,11 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/types": "^26.0.1-alpha.0", + "@jest/types": "^26.0.1", "@sinonjs/fake-timers": "^6.0.1", - "jest-message-util": "^26.0.1-alpha.0", - "jest-mock": "^26.0.1-alpha.0", - "jest-util": "^26.0.1-alpha.0" + "jest-message-util": "^26.0.1", + "jest-mock": "^26.0.1", + "jest-util": "^26.0.1" }, "devDependencies": { "@types/node": "*", diff --git a/packages/jest-globals/package.json b/packages/jest-globals/package.json index 507fd9170970..0e72b005f5c2 100644 --- a/packages/jest-globals/package.json +++ b/packages/jest-globals/package.json @@ -1,6 +1,6 @@ { "name": "@jest/globals", - "version": "26.0.1-alpha.0", + "version": "26.0.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -13,9 +13,9 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/environment": "^26.0.1-alpha.0", - "@jest/types": "^26.0.1-alpha.0", - "expect": "^26.0.1-alpha.0" + "@jest/environment": "^26.0.1", + "@jest/types": "^26.0.1", + "expect": "^26.0.1" }, "publishConfig": { "access": "public" diff --git a/packages/jest-haste-map/package.json b/packages/jest-haste-map/package.json index d761ab6b8cf3..27c83cc27d59 100644 --- a/packages/jest-haste-map/package.json +++ b/packages/jest-haste-map/package.json @@ -1,6 +1,6 @@ { "name": "jest-haste-map", - "version": "26.0.1-alpha.0", + "version": "26.0.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,13 +10,13 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/types": "^26.0.1-alpha.0", + "@jest/types": "^26.0.1", "@types/graceful-fs": "^4.1.2", "anymatch": "^3.0.3", "fb-watchman": "^2.0.0", "graceful-fs": "^4.2.4", "jest-serializer": "^26.0.0", - "jest-util": "^26.0.1-alpha.0", + "jest-util": "^26.0.1", "jest-worker": "^26.0.0", "micromatch": "^4.0.2", "sane": "^4.0.3", diff --git a/packages/jest-jasmine2/package.json b/packages/jest-jasmine2/package.json index 8f3fe550ecab..4ecf77950a42 100644 --- a/packages/jest-jasmine2/package.json +++ b/packages/jest-jasmine2/package.json @@ -1,6 +1,6 @@ { "name": "jest-jasmine2", - "version": "26.0.1-alpha.0", + "version": "26.0.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -11,21 +11,21 @@ "types": "build/index.d.ts", "dependencies": { "@babel/traverse": "^7.1.0", - "@jest/environment": "^26.0.1-alpha.0", + "@jest/environment": "^26.0.1", "@jest/source-map": "^26.0.0", - "@jest/test-result": "^26.0.1-alpha.0", - "@jest/types": "^26.0.1-alpha.0", + "@jest/test-result": "^26.0.1", + "@jest/types": "^26.0.1", "chalk": "^4.0.0", "co": "^4.6.0", - "expect": "^26.0.1-alpha.0", + "expect": "^26.0.1", "is-generator-fn": "^2.0.0", - "jest-each": "^26.0.1-alpha.0", - "jest-matcher-utils": "^26.0.1-alpha.0", - "jest-message-util": "^26.0.1-alpha.0", - "jest-runtime": "^26.0.1-alpha.0", - "jest-snapshot": "^26.0.1-alpha.0", - "jest-util": "^26.0.1-alpha.0", - "pretty-format": "^26.0.1-alpha.0", + "jest-each": "^26.0.1", + "jest-matcher-utils": "^26.0.1", + "jest-message-util": "^26.0.1", + "jest-runtime": "^26.0.1", + "jest-snapshot": "^26.0.1", + "jest-util": "^26.0.1", + "pretty-format": "^26.0.1", "throat": "^5.0.0" }, "devDependencies": { diff --git a/packages/jest-leak-detector/package.json b/packages/jest-leak-detector/package.json index d2d347412655..40223621394b 100644 --- a/packages/jest-leak-detector/package.json +++ b/packages/jest-leak-detector/package.json @@ -1,6 +1,6 @@ { "name": "jest-leak-detector", - "version": "26.0.1-alpha.0", + "version": "26.0.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -11,7 +11,7 @@ "types": "build/index.d.ts", "dependencies": { "jest-get-type": "^26.0.0", - "pretty-format": "^26.0.1-alpha.0" + "pretty-format": "^26.0.1" }, "devDependencies": { "@types/weak-napi": "^1.0.0", diff --git a/packages/jest-matcher-utils/package.json b/packages/jest-matcher-utils/package.json index e4aaac38f5c4..1ef5f889f1cf 100644 --- a/packages/jest-matcher-utils/package.json +++ b/packages/jest-matcher-utils/package.json @@ -1,7 +1,7 @@ { "name": "jest-matcher-utils", "description": "A set of utility functions for expect and related packages", - "version": "26.0.1-alpha.0", + "version": "26.0.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -15,9 +15,9 @@ "types": "build/index.d.ts", "dependencies": { "chalk": "^4.0.0", - "jest-diff": "^26.0.1-alpha.0", + "jest-diff": "^26.0.1", "jest-get-type": "^26.0.0", - "pretty-format": "^26.0.1-alpha.0" + "pretty-format": "^26.0.1" }, "devDependencies": { "@jest/test-utils": "^26.0.0", diff --git a/packages/jest-message-util/package.json b/packages/jest-message-util/package.json index 7d20ba2161e9..a05bf137adde 100644 --- a/packages/jest-message-util/package.json +++ b/packages/jest-message-util/package.json @@ -1,6 +1,6 @@ { "name": "jest-message-util", - "version": "26.0.1-alpha.0", + "version": "26.0.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -14,7 +14,7 @@ "types": "build/index.d.ts", "dependencies": { "@babel/code-frame": "^7.0.0", - "@jest/types": "^26.0.1-alpha.0", + "@jest/types": "^26.0.1", "@types/stack-utils": "^1.0.1", "chalk": "^4.0.0", "graceful-fs": "^4.2.4", diff --git a/packages/jest-mock/package.json b/packages/jest-mock/package.json index e1c1dc38ccda..b883b188f2c4 100644 --- a/packages/jest-mock/package.json +++ b/packages/jest-mock/package.json @@ -1,6 +1,6 @@ { "name": "jest-mock", - "version": "26.0.1-alpha.0", + "version": "26.0.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,7 +10,7 @@ "node": ">= 10.14.2" }, "dependencies": { - "@jest/types": "^26.0.1-alpha.0" + "@jest/types": "^26.0.1" }, "devDependencies": { "@types/node": "*" diff --git a/packages/jest-phabricator/package.json b/packages/jest-phabricator/package.json index caadbe388d66..927731a07662 100644 --- a/packages/jest-phabricator/package.json +++ b/packages/jest-phabricator/package.json @@ -1,6 +1,6 @@ { "name": "jest-phabricator", - "version": "26.0.1-alpha.0", + "version": "26.0.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -8,7 +8,7 @@ }, "types": "build/index.d.ts", "dependencies": { - "@jest/test-result": "^26.0.1-alpha.0" + "@jest/test-result": "^26.0.1" }, "engines": { "node": ">= 10.14.2" diff --git a/packages/jest-repl/package.json b/packages/jest-repl/package.json index 6b6049151419..fd1b1d69f98e 100644 --- a/packages/jest-repl/package.json +++ b/packages/jest-repl/package.json @@ -1,6 +1,6 @@ { "name": "jest-repl", - "version": "26.0.1-alpha.0", + "version": "26.0.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,11 +10,11 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/transform": "^26.0.1-alpha.0", - "@jest/types": "^26.0.1-alpha.0", - "jest-config": "^26.0.1-alpha.0", - "jest-runtime": "^26.0.1-alpha.0", - "jest-validate": "^26.0.1-alpha.0", + "@jest/transform": "^26.0.1", + "@jest/types": "^26.0.1", + "jest-config": "^26.0.1", + "jest-runtime": "^26.0.1", + "jest-validate": "^26.0.1", "repl": "^0.1.3", "yargs": "^15.3.1" }, diff --git a/packages/jest-reporters/package.json b/packages/jest-reporters/package.json index 4667c64034f8..a56037794bf7 100644 --- a/packages/jest-reporters/package.json +++ b/packages/jest-reporters/package.json @@ -1,15 +1,15 @@ { "name": "@jest/reporters", "description": "Jest's reporters", - "version": "26.0.1-alpha.0", + "version": "26.0.1", "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^26.0.1-alpha.0", - "@jest/test-result": "^26.0.1-alpha.0", - "@jest/transform": "^26.0.1-alpha.0", - "@jest/types": "^26.0.1-alpha.0", + "@jest/console": "^26.0.1", + "@jest/test-result": "^26.0.1", + "@jest/transform": "^26.0.1", + "@jest/types": "^26.0.1", "chalk": "^4.0.0", "collect-v8-coverage": "^1.0.0", "exit": "^0.1.2", @@ -20,9 +20,9 @@ "istanbul-lib-report": "^3.0.0", "istanbul-lib-source-maps": "^4.0.0", "istanbul-reports": "^3.0.2", - "jest-haste-map": "^26.0.1-alpha.0", - "jest-resolve": "^26.0.1-alpha.0", - "jest-util": "^26.0.1-alpha.0", + "jest-haste-map": "^26.0.1", + "jest-resolve": "^26.0.1", + "jest-util": "^26.0.1", "jest-worker": "^26.0.0", "slash": "^3.0.0", "source-map": "^0.6.0", diff --git a/packages/jest-resolve-dependencies/package.json b/packages/jest-resolve-dependencies/package.json index 0e2f5db8a358..f669ee56e6d3 100644 --- a/packages/jest-resolve-dependencies/package.json +++ b/packages/jest-resolve-dependencies/package.json @@ -1,6 +1,6 @@ { "name": "jest-resolve-dependencies", - "version": "26.0.1-alpha.0", + "version": "26.0.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,14 +10,14 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/types": "^26.0.1-alpha.0", + "@jest/types": "^26.0.1", "jest-regex-util": "^26.0.0", - "jest-snapshot": "^26.0.1-alpha.0" + "jest-snapshot": "^26.0.1" }, "devDependencies": { - "jest-haste-map": "^26.0.1-alpha.0", - "jest-resolve": "^26.0.1-alpha.0", - "jest-runtime": "^26.0.1-alpha.0" + "jest-haste-map": "^26.0.1", + "jest-resolve": "^26.0.1", + "jest-runtime": "^26.0.1" }, "engines": { "node": ">= 10.14.2" diff --git a/packages/jest-resolve/package.json b/packages/jest-resolve/package.json index ba32e8039d79..abf215ec52fc 100644 --- a/packages/jest-resolve/package.json +++ b/packages/jest-resolve/package.json @@ -1,6 +1,6 @@ { "name": "jest-resolve", - "version": "26.0.1-alpha.0", + "version": "26.0.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,11 +10,11 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/types": "^26.0.1-alpha.0", + "@jest/types": "^26.0.1", "chalk": "^4.0.0", "graceful-fs": "^4.2.4", "jest-pnp-resolver": "^1.2.1", - "jest-util": "^26.0.1-alpha.0", + "jest-util": "^26.0.1", "read-pkg-up": "^7.0.1", "resolve": "^1.17.0", "slash": "^3.0.0" @@ -22,7 +22,7 @@ "devDependencies": { "@types/graceful-fs": "^4.1.3", "@types/resolve": "^1.14.0", - "jest-haste-map": "^26.0.1-alpha.0" + "jest-haste-map": "^26.0.1" }, "engines": { "node": ">= 10.14.2" diff --git a/packages/jest-runner/package.json b/packages/jest-runner/package.json index d3f0961029a6..9aa6d4dd1685 100644 --- a/packages/jest-runner/package.json +++ b/packages/jest-runner/package.json @@ -1,6 +1,6 @@ { "name": "jest-runner", - "version": "26.0.1-alpha.0", + "version": "26.0.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,22 +10,22 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/console": "^26.0.1-alpha.0", - "@jest/environment": "^26.0.1-alpha.0", - "@jest/test-result": "^26.0.1-alpha.0", - "@jest/types": "^26.0.1-alpha.0", + "@jest/console": "^26.0.1", + "@jest/environment": "^26.0.1", + "@jest/test-result": "^26.0.1", + "@jest/types": "^26.0.1", "chalk": "^4.0.0", "exit": "^0.1.2", "graceful-fs": "^4.2.4", - "jest-config": "^26.0.1-alpha.0", + "jest-config": "^26.0.1", "jest-docblock": "^26.0.0", - "jest-haste-map": "^26.0.1-alpha.0", - "jest-jasmine2": "^26.0.1-alpha.0", - "jest-leak-detector": "^26.0.1-alpha.0", - "jest-message-util": "^26.0.1-alpha.0", - "jest-resolve": "^26.0.1-alpha.0", - "jest-runtime": "^26.0.1-alpha.0", - "jest-util": "^26.0.1-alpha.0", + "jest-haste-map": "^26.0.1", + "jest-jasmine2": "^26.0.1", + "jest-leak-detector": "^26.0.1", + "jest-message-util": "^26.0.1", + "jest-resolve": "^26.0.1", + "jest-runtime": "^26.0.1", + "jest-util": "^26.0.1", "jest-worker": "^26.0.0", "source-map-support": "^0.5.6", "throat": "^5.0.0" @@ -35,7 +35,7 @@ "@types/graceful-fs": "^4.1.2", "@types/node": "*", "@types/source-map-support": "^0.5.0", - "jest-circus": "^26.0.1-alpha.0" + "jest-circus": "^26.0.1" }, "engines": { "node": ">= 10.14.2" diff --git a/packages/jest-runtime/package.json b/packages/jest-runtime/package.json index 0e9e73812836..e8c0ea9c80aa 100644 --- a/packages/jest-runtime/package.json +++ b/packages/jest-runtime/package.json @@ -1,6 +1,6 @@ { "name": "jest-runtime", - "version": "26.0.1-alpha.0", + "version": "26.0.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,29 +10,29 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/console": "^26.0.1-alpha.0", - "@jest/environment": "^26.0.1-alpha.0", - "@jest/fake-timers": "^26.0.1-alpha.0", - "@jest/globals": "^26.0.1-alpha.0", + "@jest/console": "^26.0.1", + "@jest/environment": "^26.0.1", + "@jest/fake-timers": "^26.0.1", + "@jest/globals": "^26.0.1", "@jest/source-map": "^26.0.0", - "@jest/test-result": "^26.0.1-alpha.0", - "@jest/transform": "^26.0.1-alpha.0", - "@jest/types": "^26.0.1-alpha.0", + "@jest/test-result": "^26.0.1", + "@jest/transform": "^26.0.1", + "@jest/types": "^26.0.1", "@types/yargs": "^15.0.0", "chalk": "^4.0.0", "collect-v8-coverage": "^1.0.0", "exit": "^0.1.2", "glob": "^7.1.3", "graceful-fs": "^4.2.4", - "jest-config": "^26.0.1-alpha.0", - "jest-haste-map": "^26.0.1-alpha.0", - "jest-message-util": "^26.0.1-alpha.0", - "jest-mock": "^26.0.1-alpha.0", + "jest-config": "^26.0.1", + "jest-haste-map": "^26.0.1", + "jest-message-util": "^26.0.1", + "jest-mock": "^26.0.1", "jest-regex-util": "^26.0.0", - "jest-resolve": "^26.0.1-alpha.0", - "jest-snapshot": "^26.0.1-alpha.0", - "jest-util": "^26.0.1-alpha.0", - "jest-validate": "^26.0.1-alpha.0", + "jest-resolve": "^26.0.1", + "jest-snapshot": "^26.0.1", + "jest-util": "^26.0.1", + "jest-validate": "^26.0.1", "slash": "^3.0.0", "strip-bom": "^4.0.0", "yargs": "^15.3.1" @@ -43,7 +43,7 @@ "@types/glob": "^7.1.1", "@types/graceful-fs": "^4.1.2", "execa": "^4.0.0", - "jest-environment-node": "^26.0.1-alpha.0", + "jest-environment-node": "^26.0.1", "jest-snapshot-serializer-raw": "^1.1.0" }, "bin": "./bin/jest-runtime.js", diff --git a/packages/jest-snapshot/package.json b/packages/jest-snapshot/package.json index a54ae5c8efcd..a5c0dd142f4f 100644 --- a/packages/jest-snapshot/package.json +++ b/packages/jest-snapshot/package.json @@ -1,6 +1,6 @@ { "name": "jest-snapshot", - "version": "26.0.1-alpha.0", + "version": "26.0.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -11,19 +11,19 @@ "types": "build/index.d.ts", "dependencies": { "@babel/types": "^7.0.0", - "@jest/types": "^26.0.1-alpha.0", + "@jest/types": "^26.0.1", "@types/prettier": "^2.0.0", "chalk": "^4.0.0", - "expect": "^26.0.1-alpha.0", + "expect": "^26.0.1", "graceful-fs": "^4.2.4", - "jest-diff": "^26.0.1-alpha.0", + "jest-diff": "^26.0.1", "jest-get-type": "^26.0.0", - "jest-matcher-utils": "^26.0.1-alpha.0", - "jest-message-util": "^26.0.1-alpha.0", - "jest-resolve": "^26.0.1-alpha.0", + "jest-matcher-utils": "^26.0.1", + "jest-message-util": "^26.0.1", + "jest-resolve": "^26.0.1", "make-dir": "^3.0.0", "natural-compare": "^1.4.0", - "pretty-format": "^26.0.1-alpha.0", + "pretty-format": "^26.0.1", "semver": "^7.3.2" }, "devDependencies": { @@ -33,7 +33,7 @@ "@types/semver": "^7.1.0", "ansi-regex": "^5.0.0", "ansi-styles": "^4.2.0", - "jest-haste-map": "^26.0.1-alpha.0", + "jest-haste-map": "^26.0.1", "prettier": "^1.19.1" }, "engines": { diff --git a/packages/jest-test-result/package.json b/packages/jest-test-result/package.json index aa606c567fb8..16d101b0d721 100644 --- a/packages/jest-test-result/package.json +++ b/packages/jest-test-result/package.json @@ -1,6 +1,6 @@ { "name": "@jest/test-result", - "version": "26.0.1-alpha.0", + "version": "26.0.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,8 +10,8 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/console": "^26.0.1-alpha.0", - "@jest/types": "^26.0.1-alpha.0", + "@jest/console": "^26.0.1", + "@jest/types": "^26.0.1", "@types/istanbul-lib-coverage": "^2.0.0", "collect-v8-coverage": "^1.0.0" }, diff --git a/packages/jest-test-sequencer/package.json b/packages/jest-test-sequencer/package.json index 2453df102fe5..e770122a4b8f 100644 --- a/packages/jest-test-sequencer/package.json +++ b/packages/jest-test-sequencer/package.json @@ -1,6 +1,6 @@ { "name": "@jest/test-sequencer", - "version": "26.0.1-alpha.0", + "version": "26.0.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,11 +10,11 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/test-result": "^26.0.1-alpha.0", + "@jest/test-result": "^26.0.1", "graceful-fs": "^4.2.4", - "jest-haste-map": "^26.0.1-alpha.0", - "jest-runner": "^26.0.1-alpha.0", - "jest-runtime": "^26.0.1-alpha.0" + "jest-haste-map": "^26.0.1", + "jest-runner": "^26.0.1", + "jest-runtime": "^26.0.1" }, "devDependencies": { "@types/graceful-fs": "^4.1.3" diff --git a/packages/jest-transform/package.json b/packages/jest-transform/package.json index d7f46ce14f74..03ebfa288e7d 100644 --- a/packages/jest-transform/package.json +++ b/packages/jest-transform/package.json @@ -1,6 +1,6 @@ { "name": "@jest/transform", - "version": "26.0.1-alpha.0", + "version": "26.0.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -11,15 +11,15 @@ "types": "build/index.d.ts", "dependencies": { "@babel/core": "^7.1.0", - "@jest/types": "^26.0.1-alpha.0", + "@jest/types": "^26.0.1", "babel-plugin-istanbul": "^6.0.0", "chalk": "^4.0.0", "convert-source-map": "^1.4.0", "fast-json-stable-stringify": "^2.0.0", "graceful-fs": "^4.2.4", - "jest-haste-map": "^26.0.1-alpha.0", + "jest-haste-map": "^26.0.1", "jest-regex-util": "^26.0.0", - "jest-util": "^26.0.1-alpha.0", + "jest-util": "^26.0.1", "micromatch": "^4.0.2", "pirates": "^4.0.1", "slash": "^3.0.0", diff --git a/packages/jest-types/package.json b/packages/jest-types/package.json index 741227c145ff..37ac76583ff3 100644 --- a/packages/jest-types/package.json +++ b/packages/jest-types/package.json @@ -1,6 +1,6 @@ { "name": "@jest/types", - "version": "26.0.1-alpha.0", + "version": "26.0.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", diff --git a/packages/jest-util/package.json b/packages/jest-util/package.json index 123392990010..10cfaa9030df 100644 --- a/packages/jest-util/package.json +++ b/packages/jest-util/package.json @@ -1,6 +1,6 @@ { "name": "jest-util", - "version": "26.0.1-alpha.0", + "version": "26.0.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,7 +10,7 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/types": "^26.0.1-alpha.0", + "@jest/types": "^26.0.1", "chalk": "^4.0.0", "graceful-fs": "^4.2.4", "is-ci": "^2.0.0", diff --git a/packages/jest-validate/package.json b/packages/jest-validate/package.json index 597f8e2f335a..10b4657088da 100644 --- a/packages/jest-validate/package.json +++ b/packages/jest-validate/package.json @@ -1,6 +1,6 @@ { "name": "jest-validate", - "version": "26.0.1-alpha.0", + "version": "26.0.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -10,12 +10,12 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/types": "^26.0.1-alpha.0", + "@jest/types": "^26.0.1", "camelcase": "^6.0.0", "chalk": "^4.0.0", "jest-get-type": "^26.0.0", "leven": "^3.1.0", - "pretty-format": "^26.0.1-alpha.0" + "pretty-format": "^26.0.1" }, "devDependencies": { "@types/yargs": "^15.0.3" diff --git a/packages/jest-watcher/package.json b/packages/jest-watcher/package.json index 7c2ad7788b16..d07444b635d1 100644 --- a/packages/jest-watcher/package.json +++ b/packages/jest-watcher/package.json @@ -1,15 +1,15 @@ { "name": "jest-watcher", "description": "Delightful JavaScript Testing.", - "version": "26.0.1-alpha.0", + "version": "26.0.1", "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { - "@jest/test-result": "^26.0.1-alpha.0", - "@jest/types": "^26.0.1-alpha.0", + "@jest/test-result": "^26.0.1", + "@jest/types": "^26.0.1", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", - "jest-util": "^26.0.1-alpha.0", + "jest-util": "^26.0.1", "string-length": "^4.0.1" }, "devDependencies": { diff --git a/packages/jest/package.json b/packages/jest/package.json index 64073c1166cd..2fa45c69e1be 100644 --- a/packages/jest/package.json +++ b/packages/jest/package.json @@ -1,13 +1,13 @@ { "name": "jest", "description": "Delightful JavaScript Testing.", - "version": "26.0.1-alpha.0", + "version": "26.0.1", "main": "build/jest.js", "types": "build/jest.d.ts", "dependencies": { - "@jest/core": "^26.0.1-alpha.0", + "@jest/core": "^26.0.1", "import-local": "^3.0.2", - "jest-cli": "^26.0.1-alpha.0" + "jest-cli": "^26.0.1" }, "bin": "./bin/jest.js", "engines": { diff --git a/packages/pretty-format/package.json b/packages/pretty-format/package.json index 97294edbfc9d..15419caa53da 100644 --- a/packages/pretty-format/package.json +++ b/packages/pretty-format/package.json @@ -1,6 +1,6 @@ { "name": "pretty-format", - "version": "26.0.1-alpha.0", + "version": "26.0.1", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git", @@ -12,7 +12,7 @@ "types": "build/index.d.ts", "author": "James Kyle ", "dependencies": { - "@jest/types": "^26.0.1-alpha.0", + "@jest/types": "^26.0.1", "ansi-regex": "^5.0.0", "ansi-styles": "^4.0.0", "react-is": "^16.12.0" From f263bf5e5c2b1a8b096639a882c6811454bb303e Mon Sep 17 00:00:00 2001 From: Tim Seckinger Date: Tue, 5 May 2020 13:27:50 +0200 Subject: [PATCH 083/106] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ebd9b960661..244c1fa51cec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,7 @@ ### Fixes -- `[jest-circus]` Populate `DescribeBlock.tests` to not break Detox reporter +- `[jest-circus]` Backward compatibility for deprecated `DescribeBlock.tests` to not break e.g. Detox reporter ## 26.0.0 From b1565a416fe68ef975816ff027ae36ec3326f656 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Tue, 5 May 2020 15:13:24 +0200 Subject: [PATCH 084/106] chore: update @types/resolve and remove ts-ignore --- packages/jest-resolve/package.json | 2 +- packages/jest-resolve/src/defaultResolver.ts | 1 - yarn.lock | 8 ++++---- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/jest-resolve/package.json b/packages/jest-resolve/package.json index abf215ec52fc..2a5702e0ef43 100644 --- a/packages/jest-resolve/package.json +++ b/packages/jest-resolve/package.json @@ -21,7 +21,7 @@ }, "devDependencies": { "@types/graceful-fs": "^4.1.3", - "@types/resolve": "^1.14.0", + "@types/resolve": "^1.17.0", "jest-haste-map": "^26.0.1" }, "engines": { diff --git a/packages/jest-resolve/src/defaultResolver.ts b/packages/jest-resolve/src/defaultResolver.ts index 77e4c6981546..be1e6cabb1a7 100644 --- a/packages/jest-resolve/src/defaultResolver.ts +++ b/packages/jest-resolve/src/defaultResolver.ts @@ -38,7 +38,6 @@ export default function defaultResolver( moduleDirectory: options.moduleDirectory, paths: options.paths, preserveSymlinks: false, - // @ts-ignore: https://github.com/DefinitelyTyped/DefinitelyTyped/pull/44137 realpathSync, }); diff --git a/yarn.lock b/yarn.lock index d1b01b670423..78b19a24d742 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2540,10 +2540,10 @@ "@types/prop-types" "*" csstype "^2.2.0" -"@types/resolve@^1.14.0": - version "1.14.0" - resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-1.14.0.tgz#c95d696264f8e53e764a7c0b83e9317b458b76c3" - integrity sha512-bmjNBW6tok+67iOsASeYSJxSgY++BIR35nGyGLORTDirhra9reJ0shgGL3U7KPDUbOBCx8JrlCjd4d/y5uiMRQ== +"@types/resolve@^1.17.0": + version "1.17.0" + resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-1.17.0.tgz#eb25b38e2682f641d33841df162e052d7364eaa8" + integrity sha512-CKOBcXAHvoGEjYsg6Bkc/kLPqTmtnUEGrWnJJC6LNnk+D36uc1GAHcNnwK2g58x/JWjGlqGfIao9rsJk7LePWw== dependencies: "@types/node" "*" From 1add1600674aa2b19887a43f8647e140b8e99468 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Tue, 5 May 2020 16:24:33 +0200 Subject: [PATCH 085/106] chore: update to weak-napi@2 (#9975) --- packages/jest-leak-detector/package.json | 2 +- yarn.lock | 27 ++++++++++++++---------- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/packages/jest-leak-detector/package.json b/packages/jest-leak-detector/package.json index 40223621394b..c453f56aaae8 100644 --- a/packages/jest-leak-detector/package.json +++ b/packages/jest-leak-detector/package.json @@ -15,7 +15,7 @@ }, "devDependencies": { "@types/weak-napi": "^1.0.0", - "weak-napi": "^1.0.3" + "weak-napi": "^2.0.1" }, "engines": { "node": ">= 10.14.2" diff --git a/yarn.lock b/yarn.lock index 78b19a24d742..c40a326f6a5f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3475,7 +3475,7 @@ binary-extensions@^2.0.0: resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.0.0.tgz#23c0df14f6a88077f5f986c0d167ec03c3d5537c" integrity sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow== -bindings@^1.3.0, bindings@^1.5.0: +bindings@^1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== @@ -9638,10 +9638,10 @@ nice-try@^1.0.4: resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== -node-addon-api@^1.1.0: - version "1.7.1" - resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-1.7.1.tgz#cf813cd69bb8d9100f6bdca6755fc268f54ac492" - integrity sha512-2+DuKodWvwRTrCfKOeR24KIc5unKjOh8mz17NCzVnHWfjAdDqbfbjqh7gUT+BkXBRQM52+xCHciKWonJ3CbJMQ== +node-addon-api@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-3.0.0.tgz#812446a1001a54f71663bed188314bba07e09247" + integrity sha512-sSHCgWfJ+Lui/u+0msF3oyCgvdkhxDbkCS6Q8uiJquzOimkJBvX6hl5aSSA7DR1XbMpdM8r7phjcF63sF4rkKg== node-fetch-npm@^2.0.2: version "2.0.4" @@ -9678,6 +9678,11 @@ node-fetch@^2.2.0, node-fetch@^2.3.0, node-fetch@^2.5.0, node-fetch@^2.6.0: resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.0.tgz#e633456386d4aa55863f676a7ab0daa8fdecb0fd" integrity sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA== +node-gyp-build@^4.2.1: + version "4.2.2" + resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.2.2.tgz#3f44b65adaafd42fb6c3d81afd630e45c847eb66" + integrity sha512-Lqh7mrByWCM8Cf9UPqpeoVBBo5Ugx+RKu885GAzmLBVYjeywScxHXPGLa4JfYNZmcNGwzR0Glu5/9GaQZMFqyA== + node-gyp@^5.0.2: version "5.1.0" resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-5.1.0.tgz#8e31260a7af4a2e2f994b0673d4e0b3866156332" @@ -13705,13 +13710,13 @@ wcwidth@^1.0.0, wcwidth@^1.0.1: dependencies: defaults "^1.0.3" -weak-napi@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/weak-napi/-/weak-napi-1.0.3.tgz#ff4dfa818db1c509ba4166530b42414ef74cbba6" - integrity sha512-cyqeMaYA5qI7RoZKAKvIHwEROEKDNxK7jXj3u56nF2rGBh+HFyhYmBb1/wAN4RqzRmkYKVVKQyqHpBoJjqtGUA== +weak-napi@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/weak-napi/-/weak-napi-2.0.1.tgz#406c69e4b6924b1b336e6c93e150334bd6e6e43e" + integrity sha512-5K6swEmuZrS8jjtXon9w0Q8qWUSxQYGSp5G4NUjDerNSPSmwBsb9+DXUbr6hAbrDUGFmjeLDRqxv/ma2OfZ1Xw== dependencies: - bindings "^1.3.0" - node-addon-api "^1.1.0" + node-addon-api "^3.0.0" + node-gyp-build "^4.2.1" setimmediate-napi "^1.0.3" webidl-conversions@^4.0.2: From 9c832f11c8721abd7f14ee0bd77fa2586f5659b7 Mon Sep 17 00:00:00 2001 From: Christoph Nakazawa Date: Tue, 5 May 2020 18:34:58 +0100 Subject: [PATCH 086/106] Add Jest 26 blog post (#9950) --- website/blog/2020-05-06-jest-26.md | 79 ++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 website/blog/2020-05-06-jest-26.md diff --git a/website/blog/2020-05-06-jest-26.md b/website/blog/2020-05-06-jest-26.md new file mode 100644 index 000000000000..6a692c2ad202 --- /dev/null +++ b/website/blog/2020-05-06-jest-26.md @@ -0,0 +1,79 @@ +--- +title: Jest 26: Tick Tock +author: Christoph Nakazawa +authorURL: http://twitter.com/cpojer +authorFBID: 100000023028168 +--- + +# Jest 26: Tick Tock + +When we started rebuilding Jest five years ago our goal was to provide a batteries-included zero-configuration test runner that is approachable for beginners, extensible for almost all testing use cases and scalable to large projects. One of the instrumental releases was [Jest 15](https://jestjs.io/blog/2016/09/01/jest-15) which tied everything together and provided good defaults that allowed people to run Jest often without any setup. However, this approach has a big downside as Jest installs a lot of dependencies into your projects that you may not need. + +We are now beginning to address this shortcoming and are working on reducing Jest’s install size while keeping it approachable and extensible. We have made the following breaking changes in Jest 26: + + + +- `[expect, jest-mock, pretty-format]` Remove `ES5` build files with a new minimum of support of ES2015 (Node 8) which were only used for browser builds ([#9945](https://github.com/facebook/jest/pull/9945)) +- `[jest-config, jest-resolve]` Remove support for `browser` field ([#9943](https://github.com/facebook/jest/pull/9943)) +- TypeScript definitions requires a minimum of TypeScript v3.8 ([#9823](https://github.com/facebook/jest/pull/9823)) + +With the above changes Jest 26 is now 4 MiB smaller than Jest 25.5.4 (53 → 49 MiB). Please keep in mind that many dependencies like Babel are likely already part of your project. Jest's own size was reduced by 1.2 MiB (4.3 -> 3.1 MiB). + +While this is a good start, it isn’t enough to make Jest meaningfully leaner. We are planning on gradually reducing Jest's and its dependency tree size by up to 70%. Most of the changes to reduce Jest’s default setup will be small breaking changes and we want to bring the community with us as much as possible. Therefore we will make the following changes in Jest 27 and Jest 28 using a [“Tick-Tock" release process](https://en.wikipedia.org/wiki/Tick%E2%80%93tock_model): + +- Jest 27 will ship with a new test runner "`jest-circus`" and the Node.js environment by default. `jest-jasmine2` and `jest-environment-jsdom` will still be bundled so users can keep using them by changing one-line each in the configuration. +- Jest 28 will remove `jest-jasmine2` and `jest-environment-jsdom` from the default distribution of Jest. The packages will still be actively maintained as part of the Jest project and be published separately. Users will need to install these packages to use them. + +Upon upgrading to these major releases, Jest will guide you through the necessary changes. If you’d like to get ahead and migrate to the new defaults now, and your project does not require a DOM environment, you can upgrade to Jest 26 and add the following configuration options: + +```json +{ + "jest": { + "testEnvironment": "node", + "testRunner": "jest-circus/runner" + } +} +``` + +Jest will continue to ship with `babel-jest` enabled by default. It currently powers a few Jest features beyond compiling modern JavaScript syntax to something understood by current versions of Node.js and browsers: It also powers Jest's code coverage and mocking of ES modules. Jest currently ships with experimental support for [V8 coverage](/blog/2020/01/21/jest-25#v8-code-coverage) and native support for ES Modules (more on that below!). It is not possible to mock static ES Modules per the specification without transforming the code first, so we will be encouraging patterns that work without the transformation we use Babel for today. Once V8 coverage and native ESM support stabilizes in Jest, we will also be able remove `babel-jest` as a default but we will keep maintaining it. + +## New fake timers + +With Jest 26 we are shipping a new implementation of fake timers based on `@sinonjs/fake-timers`. We've wanted to do this for years and are happy this has finally progressed far enough to support all of Jest's existing fake timer use cases. + +The new implementation comes with extra features such as mocking `Date`, `queueMicrotask` and more, see [this README](https://github.com/sinonjs/fake-timers/blob/master/README.md). It works transparently using the existing timer APIs like `jest.runAllTimers()` – check out the documentation [on our website](https://jestjs.io/docs/en/timer-mocks). + +We are confident this implementation is ready for prime time, however we don't want to force people to rewrite their tests if they depend on subtle differences between the old and new implementation. In Jest 26, this new implementation will remain _opt-in_ and can be activated by calling `jest.useFakeTimers('modern')` or by passing `modern` to the `timers` option in your config if you opted all tests into fake timers previously. + +In Jest 27 we will swap the default to the new "modern" implementation but we will keep supporting and maintaining the legacy implementation which can be used by calling `jest.useFakeTimers('legacy')`. If you are unsure whether you'll be able to upgrade all your tests by the time Jest 27 rolls out, you can add this to your tests now to keep the old behavior. + +We'd like to thank [Carl-Erik Kopseng](https://github.com/fatso83), [Benjamin Gruenbaum](https://github.com/benjamingr) and other maintainers of `@sinonjs/fake-timers` for their help and patience when working with us to make this happen! _Exciting_. + +## A new way to consume Jest - `@jest/globals` + +Jest has relied on globals popularized by the Jasmine testing framework and others such as `describe`, `it`, `test` and `expect`. While this is a widely used pattern, many people have expressed their preference for importing testing related functions instead. To support this use case, we added a new package `@jest/globals` that can be used to import testing functions: `import {expect, jest, test} from '@jest/globals';`. + +Caveats: + +- Currently the globals still exist in the environment but we will introduce a mode to disable globals in the future. Similarly, you cannot use `const jest = require('@jest/globals')` as you'll get declaration orders because the `jest` variable is still a global for now. +- There is currently no way to add custom matchers to the TypeScript definitions when using globals like this. +- While this allows running tests without globals, it does not allow running tests without Jest's test runner at this time. + +## Native ESM support + +As mentioned in the [Jest 25 blog post](/blog/2020/01/21/jest-25#ecmascript-modules-support) we have been working on native support for ECMAScript Modules. It is not stable yet but it is ready to be tested. We'd love to hear your feedback and bug reports! For an overview of the current state you can check out [this issue](https://github.com/facebook/jest/issues/9430), or browse all issues with that label [ES Modules](https://github.com/facebook/jest/labels/ES%20Modules). + +## Other Breaking Changes in Jest 26 + +- Dropped support for Node 8 ([#9423](https://github.com/facebook/jest/pull/9423)) +- `[jest-environment-jsdom]` Upgrade `jsdom` to v16 ([#9606](https://github.com/facebook/jest/pull/9606)) +- `[jest-runtime]` Remove long-deprecated `require.requireActual` and `require.requireMock` methods ([#9854](https://github.com/facebook/jest/pull/9854)) +- `[jest-haste-map]` Removed `providesModuleNodeModules` ([#8535](https://github.com/facebook/jest/pull/8535)) +- `[jest-circus]` Fail tests if a test takes a done callback and have return values ([#9129](https://github.com/facebook/jest/pull/9129)) +- `[jest-circus]` Throw a proper error if a test / hooks is defined asynchronously ([#8096](https://github.com/facebook/jest/pull/8096)) + +## Stay Safe + +We are all currently experiencing an unprecedented time of uncertainty. If you are struggling financially, we would like to use [Jest’s Open Collective fund](https://opencollective.com/jest) to help new and existing contributors. We place [bounties on some issues](https://github.com/facebook/jest/issues?q=is%3Aissue+is%3Aopen+bounty+label%3A%22Has+Bounty%22) and are open to offering a bounty on any of our current open issues - you can mention that an issue should have a bounty in the issue or contact [@cpojer via private message on Twitter](https://twitter.com/cpojer). + +Please stay safe. From 8cc7492c269561fb8bddbb6d50ca55821391cf19 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Tue, 5 May 2020 19:42:34 +0200 Subject: [PATCH 087/106] chore: fix date and heading in blog post (#9977) --- website/blog/{2020-05-06-jest-26.md => 2020-05-05-jest-26.md} | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) rename website/blog/{2020-05-06-jest-26.md => 2020-05-05-jest-26.md} (98%) diff --git a/website/blog/2020-05-06-jest-26.md b/website/blog/2020-05-05-jest-26.md similarity index 98% rename from website/blog/2020-05-06-jest-26.md rename to website/blog/2020-05-05-jest-26.md index 6a692c2ad202..e1fa707e1c41 100644 --- a/website/blog/2020-05-06-jest-26.md +++ b/website/blog/2020-05-05-jest-26.md @@ -5,8 +5,6 @@ authorURL: http://twitter.com/cpojer authorFBID: 100000023028168 --- -# Jest 26: Tick Tock - When we started rebuilding Jest five years ago our goal was to provide a batteries-included zero-configuration test runner that is approachable for beginners, extensible for almost all testing use cases and scalable to large projects. One of the instrumental releases was [Jest 15](https://jestjs.io/blog/2016/09/01/jest-15) which tied everything together and provided good defaults that allowed people to run Jest often without any setup. However, this approach has a big downside as Jest installs a lot of dependencies into your projects that you may not need. We are now beginning to address this shortcoming and are working on reducing Jest’s install size while keeping it approachable and extensible. We have made the following breaking changes in Jest 26: @@ -41,7 +39,7 @@ Jest will continue to ship with `babel-jest` enabled by default. It currently po With Jest 26 we are shipping a new implementation of fake timers based on `@sinonjs/fake-timers`. We've wanted to do this for years and are happy this has finally progressed far enough to support all of Jest's existing fake timer use cases. -The new implementation comes with extra features such as mocking `Date`, `queueMicrotask` and more, see [this README](https://github.com/sinonjs/fake-timers/blob/master/README.md). It works transparently using the existing timer APIs like `jest.runAllTimers()` – check out the documentation [on our website](https://jestjs.io/docs/en/timer-mocks). +The new implementation comes with extra features such as mocking `Date`, `queueMicrotask` and more, see [this README](https://github.com/sinonjs/fake-timers/blob/master/README.md). It works transparently using the existing timer APIs like `jest.runAllTimers()` – check out the documentation [on our website](/docs/en/timer-mocks). We are confident this implementation is ready for prime time, however we don't want to force people to rewrite their tests if they depend on subtle differences between the old and new implementation. In Jest 26, this new implementation will remain _opt-in_ and can be activated by calling `jest.useFakeTimers('modern')` or by passing `modern` to the `timers` option in your config if you opted all tests into fake timers previously. From ab6967bbb62926805ee9d9f8b6e731a4c9963ece Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Tue, 5 May 2020 20:29:05 +0200 Subject: [PATCH 088/106] Add migration notes for breaking changes (#9978) --- website/blog/2020-05-05-jest-26.md | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/website/blog/2020-05-05-jest-26.md b/website/blog/2020-05-05-jest-26.md index e1fa707e1c41..7a4b7e268d0a 100644 --- a/website/blog/2020-05-05-jest-26.md +++ b/website/blog/2020-05-05-jest-26.md @@ -7,12 +7,26 @@ authorFBID: 100000023028168 When we started rebuilding Jest five years ago our goal was to provide a batteries-included zero-configuration test runner that is approachable for beginners, extensible for almost all testing use cases and scalable to large projects. One of the instrumental releases was [Jest 15](https://jestjs.io/blog/2016/09/01/jest-15) which tied everything together and provided good defaults that allowed people to run Jest often without any setup. However, this approach has a big downside as Jest installs a lot of dependencies into your projects that you may not need. -We are now beginning to address this shortcoming and are working on reducing Jest’s install size while keeping it approachable and extensible. We have made the following breaking changes in Jest 26: +We are now beginning to address this shortcoming and are working on reducing Jest’s install size while keeping it approachable and extensible. We have made the following **breaking changes** in Jest 26: - `[expect, jest-mock, pretty-format]` Remove `ES5` build files with a new minimum of support of ES2015 (Node 8) which were only used for browser builds ([#9945](https://github.com/facebook/jest/pull/9945)) + + > **Migration**: With this change, we are pushing the responsibility to bundle the affected packages to the users, rather than Jest providing them out of the box, since they know their target environments best. If you want it back, we're open to shipping these as separate packages. PRs welcome! + - `[jest-config, jest-resolve]` Remove support for `browser` field ([#9943](https://github.com/facebook/jest/pull/9943)) + + > **Migration**: Install `browser-resolve` module and use the following configuration: + + ```json + { + "jest": { + "resolver": "browser-resolve" + } + } + ``` + - TypeScript definitions requires a minimum of TypeScript v3.8 ([#9823](https://github.com/facebook/jest/pull/9823)) With the above changes Jest 26 is now 4 MiB smaller than Jest 25.5.4 (53 → 49 MiB). Please keep in mind that many dependencies like Babel are likely already part of your project. Jest's own size was reduced by 1.2 MiB (4.3 -> 3.1 MiB). @@ -53,7 +67,7 @@ Jest has relied on globals popularized by the Jasmine testing framework and othe Caveats: -- Currently the globals still exist in the environment but we will introduce a mode to disable globals in the future. Similarly, you cannot use `const jest = require('@jest/globals')` as you'll get declaration orders because the `jest` variable is still a global for now. +- Currently the globals still exist in the environment but we will introduce a mode to disable globals in the future. Similarly, you cannot use `const jest = require('@jest/globals')` as you'll get declaration errors because the `jest` variable is still a global for now. - There is currently no way to add custom matchers to the TypeScript definitions when using globals like this. - While this allows running tests without globals, it does not allow running tests without Jest's test runner at this time. From 8c4e9cc6ce18a8e698a16bef4156552d1dd94c89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Wed, 6 May 2020 18:40:23 +0200 Subject: [PATCH 089/106] docs: fix Configuration, JestPlatform and JestObjectAPI docs for 26 (#9985) --- .../version-26.0/Configuration.md | 13 +- .../version-26.0/JestObjectAPI.md | 691 ++++++++++++++++++ .../version-26.0/JestPlatform.md | 2 +- 3 files changed, 704 insertions(+), 2 deletions(-) create mode 100644 website/versioned_docs/version-26.0/JestObjectAPI.md diff --git a/website/versioned_docs/version-26.0/Configuration.md b/website/versioned_docs/version-26.0/Configuration.md index 23d6da577d3d..b131bb69c112 100644 --- a/website/versioned_docs/version-26.0/Configuration.md +++ b/website/versioned_docs/version-26.0/Configuration.md @@ -1086,6 +1086,7 @@ Example: Sort test path alphabetically. ```js +// testSequencer.js const Sequencer = require('@jest/test-sequencer').default; class CustomSequencer extends Sequencer { @@ -1100,6 +1101,14 @@ class CustomSequencer extends Sequencer { module.exports = CustomSequencer; ``` +Use it in your Jest config file like this: + +```json +{ + "testSequencer": "path/to/testSequencer.js" +} +``` + ### `testTimeout` [number] Default: `5000` @@ -1116,7 +1125,9 @@ This option sets the URL for the jsdom environment. It is reflected in propertie Default: `real` -Setting this value to `fake` allows the use of fake timers for functions such as `setTimeout`. Fake timers are useful when a piece of code sets a long timeout that we don't want to wait for in a test. +Setting this value to `legacy` or `fake` allows the use of fake timers for functions such as `setTimeout`. Fake timers are useful when a piece of code sets a long timeout that we don't want to wait for in a test. + +If the value is `modern`, [`@sinonjs/fake-timers`](https://github.com/sinonjs/fake-timers) will be used as implementation instead of Jest's own legacy implementation. This will be the default fake implementation in Jest 27. ### `transform` [object\] diff --git a/website/versioned_docs/version-26.0/JestObjectAPI.md b/website/versioned_docs/version-26.0/JestObjectAPI.md new file mode 100644 index 000000000000..2a30948e86e3 --- /dev/null +++ b/website/versioned_docs/version-26.0/JestObjectAPI.md @@ -0,0 +1,691 @@ +--- +id: jest-object +title: The Jest Object +--- + +The `jest` object is automatically in scope within every test file. The methods in the `jest` object help create mocks and let you control Jest's overall behavior. It can also be imported explicitly by via `import {jest} from '@jest/globals'`. + +## Mock Modules + +### `jest.disableAutomock()` + +Disables automatic mocking in the module loader. + +> See `automock` section of [configuration](Configuration.md#automock-boolean) for more information + +After this method is called, all `require()`s will return the real versions of each module (rather than a mocked version). + +Jest configuration: + +```json +{ + "automock": true +} +``` + +Example: + +```js +// utils.js +export default { + authorize: () => { + return 'token'; + }, +}; +``` + +```js +// __tests__/disableAutomocking.js +import utils from '../utils'; + +jest.disableAutomock(); + +test('original implementation', () => { + // now we have the original implementation, + // even if we set the automocking in a jest configuration + expect(utils.authorize()).toBe('token'); +}); +``` + +This is usually useful when you have a scenario where the number of dependencies you want to mock is far less than the number of dependencies that you don't. For example, if you're writing a test for a module that uses a large number of dependencies that can be reasonably classified as "implementation details" of the module, then you likely do not want to mock them. + +Examples of dependencies that might be considered "implementation details" are things ranging from language built-ins (e.g. Array.prototype methods) to highly common utility methods (e.g. underscore/lo-dash, array utilities etc) and entire libraries like React.js. + +Returns the `jest` object for chaining. + +_Note: this method was previously called `autoMockOff`. When using `babel-jest`, calls to `disableAutomock` will automatically be hoisted to the top of the code block. Use `autoMockOff` if you want to explicitly avoid this behavior._ + +### `jest.enableAutomock()` + +Enables automatic mocking in the module loader. + +Returns the `jest` object for chaining. + +> See `automock` section of [configuration](Configuration.md#automock-boolean) for more information + +Example: + +```js +// utils.js +export default { + authorize: () => { + return 'token'; + }, + isAuthorized: secret => secret === 'wizard', +}; +``` + +```js +// __tests__/disableAutomocking.js +jest.enableAutomock(); + +import utils from '../utils'; + +test('original implementation', () => { + // now we have the mocked implementation, + expect(utils.authorize._isMockFunction).toBeTruthy(); + expect(utils.isAuthorized._isMockFunction).toBeTruthy(); +}); +``` + +_Note: this method was previously called `autoMockOn`. When using `babel-jest`, calls to `enableAutomock` will automatically be hoisted to the top of the code block. Use `autoMockOn` if you want to explicitly avoid this behavior._ + +### `jest.createMockFromModule(moduleName)` + +##### renamed in Jest **26.0.0+** + +Also under the alias: `.genMockFromModule(moduleName)` + +Given the name of a module, use the automatic mocking system to generate a mocked version of the module for you. + +This is useful when you want to create a [manual mock](ManualMocks.md) that extends the automatic mock's behavior. + +Example: + +```js +// utils.js +export default { + authorize: () => { + return 'token'; + }, + isAuthorized: secret => secret === 'wizard', +}; +``` + +```js +// __tests__/createMockFromModule.test.js +const utils = jest.createMockFromModule('../utils').default; +utils.isAuthorized = jest.fn(secret => secret === 'not wizard'); + +test('implementation created by jest.createMockFromModule', () => { + expect(utils.authorize.mock).toBeTruthy(); + expect(utils.isAuthorized('not wizard')).toEqual(true); +}); +``` + +This is how `createMockFromModule` will mock the following data types: + +#### `Function` + +Creates a new [mock function](https://jestjs.io/docs/en/mock-functions.html). The new function has no formal parameters and when called will return `undefined`. This functionality also applies to `async` functions. + +#### `Class` + +Creates new class. The interface of the original class is maintained, all of the class member functions and properties will be mocked. + +#### `Object` + +Creates a new deeply cloned object. The object keys are maintained and their values are mocked. + +#### `Array` + +Creates a new empty array, ignoring the original. + +#### `Primitives` + +Creates a new property with the same primitive value as the original property. + +Example: + +``` +// example.js +module.exports = { + function: function square(a, b) { + return a * b; + }, + asyncFunction: async function asyncSquare(a, b) { + const result = await a * b; + return result; + }, + class: new class Bar { + constructor() { + this.array = [1, 2, 3]; + } + foo() {} + }, + object: { + baz: 'foo', + bar: { + fiz: 1, + buzz: [1, 2, 3], + }, + }, + array: [1, 2, 3], + number: 123, + string: 'baz', + boolean: true, + symbol: Symbol.for('a.b.c'), +}; +``` + +```js +// __tests__/example.test.js +const example = jest.createMockFromModule('./example'); + +test('should run example code', () => { + // creates a new mocked function with no formal arguments. + expect(example.function.name).toEqual('square'); + expect(example.function.length).toEqual(0); + + // async functions get the same treatment as standard synchronous functions. + expect(example.asyncFunction.name).toEqual('asyncSquare'); + expect(example.asyncFunction.length).toEqual(0); + + // creates a new class with the same interface, member functions and properties are mocked. + expect(example.class.constructor.name).toEqual('Bar'); + expect(example.class.foo.name).toEqual('foo'); + expect(example.class.array.length).toEqual(0); + + // creates a deeply cloned version of the original object. + expect(example.object).toEqual({ + baz: 'foo', + bar: { + fiz: 1, + buzz: [], + }, + }); + + // creates a new empty array, ignoring the original array. + expect(example.array.length).toEqual(0); + + // creates a new property with the same primitive value as the original property. + expect(example.number).toEqual(123); + expect(example.string).toEqual('baz'); + expect(example.boolean).toEqual(true); + expect(example.symbol).toEqual(Symbol.for('a.b.c')); +}); +``` + +### `jest.mock(moduleName, factory, options)` + +Mocks a module with an auto-mocked version when it is being required. `factory` and `options` are optional. For example: + +```js +// banana.js +module.exports = () => 'banana'; + +// __tests__/test.js +jest.mock('../banana'); + +const banana = require('../banana'); // banana will be explicitly mocked. + +banana(); // will return 'undefined' because the function is auto-mocked. +``` + +The second argument can be used to specify an explicit module factory that is being run instead of using Jest's automocking feature: + +```js +jest.mock('../moduleName', () => { + return jest.fn(() => 42); +}); + +// This runs the function specified as second argument to `jest.mock`. +const moduleName = require('../moduleName'); +moduleName(); // Will return '42'; +``` + +When using the `factory` parameter for an ES6 module with a default export, the `__esModule: true` property needs to be specified. This property is normally generated by Babel / TypeScript, but here it needs to be set manually. When importing a default export, it's an instruction to import the property named `default` from the export object: + +```js +import moduleName, {foo} from '../moduleName'; + +jest.mock('../moduleName', () => { + return { + __esModule: true, + default: jest.fn(() => 42), + foo: jest.fn(() => 43), + }; +}); + +moduleName(); // Will return 42 +foo(); // Will return 43 +``` + +The third argument can be used to create virtual mocks – mocks of modules that don't exist anywhere in the system: + +```js +jest.mock( + '../moduleName', + () => { + /* + * Custom implementation of a module that doesn't exist in JS, + * like a generated module or a native module in react-native. + */ + }, + {virtual: true}, +); +``` + +> **Warning:** Importing a module in a setup file (as specified by `setupTestFrameworkScriptFile`) will prevent mocking for the module in question, as well as all the modules that it imports. + +Modules that are mocked with `jest.mock` are mocked only for the file that calls `jest.mock`. Another file that imports the module will get the original implementation even if it runs after the test file that mocks the module. + +Returns the `jest` object for chaining. + +### `jest.unmock(moduleName)` + +Indicates that the module system should never return a mocked version of the specified module from `require()` (e.g. that it should always return the real module). + +The most common use of this API is for specifying the module a given test intends to be testing (and thus doesn't want automatically mocked). + +Returns the `jest` object for chaining. + +### `jest.doMock(moduleName, factory, options)` + +When using `babel-jest`, calls to `mock` will automatically be hoisted to the top of the code block. Use this method if you want to explicitly avoid this behavior. + +One example when this is useful is when you want to mock a module differently within the same file: + +```js +beforeEach(() => { + jest.resetModules(); +}); + +test('moduleName 1', () => { + jest.doMock('../moduleName', () => { + return jest.fn(() => 1); + }); + const moduleName = require('../moduleName'); + expect(moduleName()).toEqual(1); +}); + +test('moduleName 2', () => { + jest.doMock('../moduleName', () => { + return jest.fn(() => 2); + }); + const moduleName = require('../moduleName'); + expect(moduleName()).toEqual(2); +}); +``` + +Using `jest.doMock()` with ES6 imports requires additional steps. Follow these if you don't want to use `require` in your tests: + +- We have to specify the `__esModule: true` property (see the [`jest.mock()`](#jestmockmodulename-factory-options) API for more information). +- Static ES6 module imports are hoisted to the top of the file, so instead we have to import them dynamically using `import()`. +- Finally, we need an environment which supports dynamic importing. Please see [Using Babel](GettingStarted.md#using-babel) for the initial setup. Then add the plugin [babel-plugin-dynamic-import-node](https://www.npmjs.com/package/babel-plugin-dynamic-import-node), or an equivalent, to your Babel config to enable dynamic importing in Node. + +```js +beforeEach(() => { + jest.resetModules(); +}); + +test('moduleName 1', () => { + jest.doMock('../moduleName', () => { + return { + __esModule: true, + default: 'default1', + foo: 'foo1', + }; + }); + return import('../moduleName').then(moduleName => { + expect(moduleName.default).toEqual('default1'); + expect(moduleName.foo).toEqual('foo1'); + }); +}); + +test('moduleName 2', () => { + jest.doMock('../moduleName', () => { + return { + __esModule: true, + default: 'default2', + foo: 'foo2', + }; + }); + return import('../moduleName').then(moduleName => { + expect(moduleName.default).toEqual('default2'); + expect(moduleName.foo).toEqual('foo2'); + }); +}); +``` + +Returns the `jest` object for chaining. + +### `jest.dontMock(moduleName)` + +When using `babel-jest`, calls to `unmock` will automatically be hoisted to the top of the code block. Use this method if you want to explicitly avoid this behavior. + +Returns the `jest` object for chaining. + +### `jest.setMock(moduleName, moduleExports)` + +Explicitly supplies the mock object that the module system should return for the specified module. + +On occasion there are times where the automatically generated mock the module system would normally provide you isn't adequate enough for your testing needs. Normally under those circumstances you should write a [manual mock](ManualMocks.md) that is more adequate for the module in question. However, on extremely rare occasions, even a manual mock isn't suitable for your purposes and you need to build the mock yourself inside your test. + +In these rare scenarios you can use this API to manually fill the slot in the module system's mock-module registry. + +Returns the `jest` object for chaining. + +_Note It is recommended to use [`jest.mock()`](#jestmockmodulename-factory-options) instead. The `jest.mock` API's second argument is a module factory instead of the expected exported module object._ + +### `jest.requireActual(moduleName)` + +Returns the actual module instead of a mock, bypassing all checks on whether the module should receive a mock implementation or not. + +Example: + +```js +jest.mock('../myModule', () => { + // Require the original module to not be mocked... + const originalModule = jest.requireActual(moduleName); + + return { + __esModule: true, // Use it when dealing with esModules + ...originalModule, + getRandom: jest.fn().mockReturnValue(10), + }; +}); + +const getRandom = require('../myModule').getRandom; + +getRandom(); // Always returns 10 +``` + +### `jest.requireMock(moduleName)` + +Returns a mock module instead of the actual module, bypassing all checks on whether the module should be required normally or not. + +### `jest.resetModules()` + +Resets the module registry - the cache of all required modules. This is useful to isolate modules where local state might conflict between tests. + +Example: + +```js +const sum1 = require('../sum'); +jest.resetModules(); +const sum2 = require('../sum'); +sum1 === sum2; +// > false (Both sum modules are separate "instances" of the sum module.) +``` + +Example in a test: + +```js +beforeEach(() => { + jest.resetModules(); +}); + +test('works', () => { + const sum = require('../sum'); +}); + +test('works too', () => { + const sum = require('../sum'); + // sum is a different copy of the sum module from the previous test. +}); +``` + +Returns the `jest` object for chaining. + +### `jest.isolateModules(fn)` + +`jest.isolateModules(fn)` goes a step further than `jest.resetModules()` and creates a sandbox registry for the modules that are loaded inside the callback function. This is useful to isolate specific modules for every test so that local module state doesn't conflict between tests. + +```js +let myModule; +jest.isolateModules(() => { + myModule = require('myModule'); +}); + +const otherCopyOfMyModule = require('myModule'); +``` + +## Mock functions + +### `jest.fn(implementation)` + +Returns a new, unused [mock function](MockFunctionAPI.md). Optionally takes a mock implementation. + +```js +const mockFn = jest.fn(); +mockFn(); +expect(mockFn).toHaveBeenCalled(); + +// With a mock implementation: +const returnsTrue = jest.fn(() => true); +console.log(returnsTrue()); // true; +``` + +### `jest.isMockFunction(fn)` + +Determines if the given function is a mocked function. + +### `jest.spyOn(object, methodName)` + +Creates a mock function similar to `jest.fn` but also tracks calls to `object[methodName]`. Returns a Jest [mock function](MockFunctionAPI.md). + +_Note: By default, `jest.spyOn` also calls the **spied** method. This is different behavior from most other test libraries. If you want to overwrite the original function, you can use `jest.spyOn(object, methodName).mockImplementation(() => customImplementation)` or `object[methodName] = jest.fn(() => customImplementation);`_ + +Example: + +```js +const video = { + play() { + return true; + }, +}; + +module.exports = video; +``` + +Example test: + +```js +const video = require('./video'); + +test('plays video', () => { + const spy = jest.spyOn(video, 'play'); + const isPlaying = video.play(); + + expect(spy).toHaveBeenCalled(); + expect(isPlaying).toBe(true); + + spy.mockRestore(); +}); +``` + +### `jest.spyOn(object, methodName, accessType?)` + +Since Jest 22.1.0+, the `jest.spyOn` method takes an optional third argument of `accessType` that can be either `'get'` or `'set'`, which proves to be useful when you want to spy on a getter or a setter, respectively. + +Example: + +```js +const video = { + // it's a getter! + get play() { + return true; + }, +}; + +module.exports = video; + +const audio = { + _volume: false, + // it's a setter! + set volume(value) { + this._volume = value; + }, + get volume() { + return this._volume; + }, +}; + +module.exports = audio; +``` + +Example test: + +```js +const video = require('./video'); + +test('plays video', () => { + const spy = jest.spyOn(video, 'play', 'get'); // we pass 'get' + const isPlaying = video.play; + + expect(spy).toHaveBeenCalled(); + expect(isPlaying).toBe(true); + + spy.mockRestore(); +}); + +const audio = require('./audio'); + +test('plays audio', () => { + const spy = jest.spyOn(audio, 'volume', 'set'); // we pass 'set' + audio.volume = 100; + + expect(spy).toHaveBeenCalled(); + expect(audio.volume).toBe(100); + + spy.mockRestore(); +}); +``` + +### `jest.clearAllMocks()` + +Clears the `mock.calls` and `mock.instances` properties of all mocks. Equivalent to calling [`.mockClear()`](MockFunctionAPI.md#mockfnmockclear) on every mocked function. + +Returns the `jest` object for chaining. + +### `jest.resetAllMocks()` + +Resets the state of all mocks. Equivalent to calling [`.mockReset()`](MockFunctionAPI.md#mockfnmockreset) on every mocked function. + +Returns the `jest` object for chaining. + +### `jest.restoreAllMocks()` + +Restores all mocks back to their original value. Equivalent to calling [`.mockRestore()`](MockFunctionAPI.md#mockfnmockrestore) on every mocked function. Beware that `jest.restoreAllMocks()` only works when the mock was created with `jest.spyOn`; other mocks will require you to manually restore them. + +## Mock timers + +### `jest.useFakeTimers(implementation?: 'modern' | 'legacy')` + +Instructs Jest to use fake versions of the standard timer functions (`setTimeout`, `setInterval`, `clearTimeout`, `clearInterval`, `nextTick`, `setImmediate` and `clearImmediate`). + +If you pass `'modern'` as argument, [`@sinonjs/fake-timers`](https://github.com/sinonjs/fake-timers) will be used as implementation instead of Jest's own fake timers. This also mocks additional timers like `Date`. `'modern'` will be the default behavior in Jest 27. + +Returns the `jest` object for chaining. + +### `jest.useRealTimers()` + +Instructs Jest to use the real versions of the standard timer functions. + +Returns the `jest` object for chaining. + +### `jest.runAllTicks()` + +Exhausts the **micro**-task queue (usually interfaced in node via `process.nextTick`). + +When this API is called, all pending micro-tasks that have been queued via `process.nextTick` will be executed. Additionally, if those micro-tasks themselves schedule new micro-tasks, those will be continually exhausted until there are no more micro-tasks remaining in the queue. + +### `jest.runAllTimers()` + +Exhausts both the **macro**-task queue (i.e., all tasks queued by `setTimeout()`, `setInterval()`, and `setImmediate()`) and the **micro**-task queue (usually interfaced in node via `process.nextTick`). + +When this API is called, all pending macro-tasks and micro-tasks will be executed. If those tasks themselves schedule new tasks, those will be continually exhausted until there are no more tasks remaining in the queue. + +This is often useful for synchronously executing setTimeouts during a test in order to synchronously assert about some behavior that would only happen after the `setTimeout()` or `setInterval()` callbacks executed. See the [Timer mocks](TimerMocks.md) doc for more information. + +### `jest.runAllImmediates()` + +Exhausts all tasks queued by `setImmediate()`. + +> Note: This function is not available when using modern fake timers implementation + +### `jest.advanceTimersByTime(msToRun)` + +##### renamed in Jest **22.0.0+** + +Also under the alias: `.runTimersToTime()` + +Executes only the macro task queue (i.e. all tasks queued by `setTimeout()` or `setInterval()` and `setImmediate()`). + +When this API is called, all timers are advanced by `msToRun` milliseconds. All pending "macro-tasks" that have been queued via `setTimeout()` or `setInterval()`, and would be executed within this time frame will be executed. Additionally if those macro-tasks schedule new macro-tasks that would be executed within the same time frame, those will be executed until there are no more macro-tasks remaining in the queue, that should be run within `msToRun` milliseconds. + +### `jest.runOnlyPendingTimers()` + +Executes only the macro-tasks that are currently pending (i.e., only the tasks that have been queued by `setTimeout()` or `setInterval()` up to this point). If any of the currently pending macro-tasks schedule new macro-tasks, those new tasks will not be executed by this call. + +This is useful for scenarios such as one where the module being tested schedules a `setTimeout()` whose callback schedules another `setTimeout()` recursively (meaning the scheduling never stops). In these scenarios, it's useful to be able to run forward in time by a single step at a time. + +### `jest.advanceTimersToNextTimer(steps)` + +Advances all timers by the needed milliseconds so that only the next timeouts/intervals will run. + +Optionally, you can provide `steps`, so it will run `steps` amount of next timeouts/intervals. + +### `jest.clearAllTimers()` + +Removes any pending timers from the timer system. + +This means, if any timers have been scheduled (but have not yet executed), they will be cleared and will never have the opportunity to execute in the future. + +### `jest.getTimerCount()` + +Returns the number of fake timers still left to run. + +### `.jest.setSystemTime()` + +Set the current system time used by fake timers. Simulates a user changing the system clock while your program is running. It affects the current time but it does not in itself cause e.g. timers to fire; they will fire exactly as they would have done without the call to `jest.setSystemTime()`. + +> Note: This function is only available when using modern fake timers implementation + +### `.jest.getRealSystemTime()` + +When mocking time, `Date.now()` will also be mocked. If you for some reason need access to the real current time, you can invoke this function. + +> Note: This function is only available when using modern fake timers implementation + +## Misc + +### `jest.setTimeout(timeout)` + +Set the default timeout interval for tests and before/after hooks in milliseconds. This only affects the test file from which this function is called. + +_Note: The default timeout interval is 5 seconds if this method is not called._ + +_Note: If you want to set the timeout for all test files, a good place to do this is in `setupFilesAfterEnv`._ + +Example: + +```js +jest.setTimeout(1000); // 1 second +``` + +### `jest.retryTimes()` + +Runs failed tests n-times until they pass or until the max number of retries is exhausted. This only works with [jest-circus](https://github.com/facebook/jest/tree/master/packages/jest-circus)! + +Example in a test: + +```js +jest.retryTimes(3); +test('will fail', () => { + expect(true).toBe(false); +}); +``` + +Returns the `jest` object for chaining. diff --git a/website/versioned_docs/version-26.0/JestPlatform.md b/website/versioned_docs/version-26.0/JestPlatform.md index a35a2a4b6dcc..31c04bb38430 100644 --- a/website/versioned_docs/version-26.0/JestPlatform.md +++ b/website/versioned_docs/version-26.0/JestPlatform.md @@ -59,7 +59,7 @@ const code = ` * * @flow */ - + console.log('Hello World!'); `; From b172247443a25e753fc404152c09097098f3c2fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Thu, 7 May 2020 10:51:06 +0200 Subject: [PATCH 090/106] docs: fix jest-object ids for docusaurs (#9994) --- website/versioned_docs/version-26.0/JestObjectAPI.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/website/versioned_docs/version-26.0/JestObjectAPI.md b/website/versioned_docs/version-26.0/JestObjectAPI.md index 2a30948e86e3..0e20759bb7be 100644 --- a/website/versioned_docs/version-26.0/JestObjectAPI.md +++ b/website/versioned_docs/version-26.0/JestObjectAPI.md @@ -1,6 +1,7 @@ --- -id: jest-object +id: version-26.0-jest-object title: The Jest Object +original_id: jest-object --- The `jest` object is automatically in scope within every test file. The methods in the `jest` object help create mocks and let you control Jest's overall behavior. It can also be imported explicitly by via `import {jest} from '@jest/globals'`. From 4bd3d4a05999170f423f7050d4e0537648499e88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Berthommier?= Date: Thu, 7 May 2020 14:47:27 +0200 Subject: [PATCH 091/106] fix(jest-jasmine2): fix Error message (#9990) --- CHANGELOG.md | 2 ++ .../src/__tests__/expectationResultFactory.test.ts | 12 ++++++++++++ .../jest-jasmine2/src/expectationResultFactory.ts | 3 +++ 3 files changed, 17 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 244c1fa51cec..f95d8290a652 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ ### Fixes +- `[jest-jasmine2]` Stop adding `:` after an error that has no message ([#9990](https://github.com/facebook/jest/pull/9990)) + ### Chore & Maintenance ### Performance diff --git a/packages/jest-jasmine2/src/__tests__/expectationResultFactory.test.ts b/packages/jest-jasmine2/src/__tests__/expectationResultFactory.test.ts index fdf940eab04c..59cebccb4cd9 100644 --- a/packages/jest-jasmine2/src/__tests__/expectationResultFactory.test.ts +++ b/packages/jest-jasmine2/src/__tests__/expectationResultFactory.test.ts @@ -55,6 +55,18 @@ describe('expectationResultFactory', () => { expect(result.message).toEqual('Error: Expected `Pass`, received `Fail`.'); }); + it('returns the error name if the error message is empty', () => { + const options = { + actual: 'Fail', + error: new Error(), + expected: 'Pass', + matcherName: 'testMatcher', + passed: false, + }; + const result = expectationResultFactory(options); + expect(result.message).toEqual('Error'); + }); + it('returns the result if failed (with `error` as a string).', () => { const options = { actual: 'Fail', diff --git a/packages/jest-jasmine2/src/expectationResultFactory.ts b/packages/jest-jasmine2/src/expectationResultFactory.ts index d7c8e6221520..d4533fdf3dcc 100644 --- a/packages/jest-jasmine2/src/expectationResultFactory.ts +++ b/packages/jest-jasmine2/src/expectationResultFactory.ts @@ -25,6 +25,9 @@ function messageFormatter({error, message, passed}: Options) { typeof error.message === 'string' && typeof error.name === 'string' ) { + if (error.message === '') { + return error.name; + } return `${error.name}: ${error.message}`; } return `thrown: ${prettyFormat(error, {maxDepth: 3})}`; From 6b24ff177b6cd8abb63f519151163db2b0a6652e Mon Sep 17 00:00:00 2001 From: Alistair Brown Date: Thu, 7 May 2020 18:33:15 +0100 Subject: [PATCH 092/106] fix: Control no diff message color with diff options (#9997) --- CHANGELOG.md | 1 + .../__tests__/__snapshots__/diff.test.ts.snap | 4 +++- packages/jest-diff/src/__tests__/diff.test.ts | 14 +++++++++--- packages/jest-diff/src/constants.ts | 11 +++------- packages/jest-diff/src/index.ts | 22 +++++++++++++------ 5 files changed, 33 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f95d8290a652..a2471a370e38 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ### Fixes - `[jest-jasmine2]` Stop adding `:` after an error that has no message ([#9990](https://github.com/facebook/jest/pull/9990)) +- `[jest-diff]` Control no diff message color with `commonColor` in diff options ([#9997](https://github.com/facebook/jest/pull/9997)) ### Chore & Maintenance diff --git a/packages/jest-diff/src/__tests__/__snapshots__/diff.test.ts.snap b/packages/jest-diff/src/__tests__/__snapshots__/diff.test.ts.snap index 6ed36e34275c..962c937514f7 100644 --- a/packages/jest-diff/src/__tests__/__snapshots__/diff.test.ts.snap +++ b/packages/jest-diff/src/__tests__/__snapshots__/diff.test.ts.snap @@ -249,9 +249,11 @@ exports[`options change color diffStringsUnified 1`] = ` - changed from + changed to + insert - common + common `; +exports[`options change color no diff 1`] = `Compared values have no visual difference.`; + exports[`options change indicators diff 1`] = ` < Expected > Received diff --git a/packages/jest-diff/src/__tests__/diff.test.ts b/packages/jest-diff/src/__tests__/diff.test.ts index 3367839b8cfe..e63d9b999b70 100644 --- a/packages/jest-diff/src/__tests__/diff.test.ts +++ b/packages/jest-diff/src/__tests__/diff.test.ts @@ -14,13 +14,12 @@ import {diffLinesUnified, diffLinesUnified2} from '../diffLines'; import {noColor} from '../normalizeDiffOptions'; import {diffStringsUnified} from '../printDiffs'; import {DiffOptions} from '../types'; +import {NO_DIFF_MESSAGE} from '../constants'; const optionsCounts: DiffOptions = { includeChangeCounts: true, }; -const NO_DIFF_MESSAGE = 'Compared values have no visual difference.'; - // Use only in toBe assertions for edge case messages. const stripped = (a: unknown, b: unknown) => stripAnsi(diff(a, b) || ''); @@ -975,6 +974,7 @@ describe('options', () => { describe('change color', () => { const options = { changeColor: chalk.bold, + commonColor: chalk.yellow, }; test('diffStringsUnified', () => { @@ -982,17 +982,25 @@ describe('options', () => { const bChanged = b.join('\n').replace('change', 'changed'); expect(diffStringsUnified(aChanged, bChanged, options)).toMatchSnapshot(); }); + + test('no diff', () => { + expect(diff(a, a, options)).toMatchSnapshot(); + }); }); describe('common', () => { const options = { - commonColor: line => line, + commonColor: noColor, commonIndicator: '=', }; test('diff', () => { expect(diff(a, b, options)).toMatchSnapshot(); }); + + test('no diff', () => { + expect(diff(a, a, options)).toBe(NO_DIFF_MESSAGE); + }); }); describe('includeChangeCounts false', () => { diff --git a/packages/jest-diff/src/constants.ts b/packages/jest-diff/src/constants.ts index c8cb4b4bc7f8..b031eacbb578 100644 --- a/packages/jest-diff/src/constants.ts +++ b/packages/jest-diff/src/constants.ts @@ -5,13 +5,8 @@ * LICENSE file in the root directory of this source tree. */ -import chalk = require('chalk'); +export const NO_DIFF_MESSAGE = 'Compared values have no visual difference.'; -export const NO_DIFF_MESSAGE = chalk.dim( - 'Compared values have no visual difference.', -); - -export const SIMILAR_MESSAGE = chalk.dim( +export const SIMILAR_MESSAGE = 'Compared values serialize to the same structure.\n' + - 'Printing internal object structure without calling `toJSON` instead.', -); + 'Printing internal object structure without calling `toJSON` instead.'; diff --git a/packages/jest-diff/src/index.ts b/packages/jest-diff/src/index.ts index 75957a113d88..d8d3bb0d1dea 100644 --- a/packages/jest-diff/src/index.ts +++ b/packages/jest-diff/src/index.ts @@ -9,6 +9,7 @@ import prettyFormat = require('pretty-format'); import chalk = require('chalk'); import getType = require('jest-get-type'); import {DIFF_DELETE, DIFF_EQUAL, DIFF_INSERT, Diff} from './cleanupSemantic'; +import {normalizeDiffOptions} from './normalizeDiffOptions'; import {diffLinesRaw, diffLinesUnified, diffLinesUnified2} from './diffLines'; import {diffStringsRaw, diffStringsUnified} from './printDiffs'; import {NO_DIFF_MESSAGE, SIMILAR_MESSAGE} from './constants'; @@ -20,6 +21,11 @@ export {diffLinesRaw, diffLinesUnified, diffLinesUnified2}; export {diffStringsRaw, diffStringsUnified}; export {DIFF_DELETE, DIFF_EQUAL, DIFF_INSERT, Diff}; +const getCommonMessage = (message: string, options?: DiffOptions) => { + const {commonColor} = normalizeDiffOptions(options); + return commonColor(message); +}; + const { AsymmetricMatcher, DOMCollection, @@ -53,7 +59,7 @@ const FALLBACK_FORMAT_OPTIONS_0 = {...FALLBACK_FORMAT_OPTIONS, indent: 0}; // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types function diff(a: any, b: any, options?: DiffOptions): string | null { if (Object.is(a, b)) { - return NO_DIFF_MESSAGE; + return getCommonMessage(NO_DIFF_MESSAGE, options); } const aType = getType(a); @@ -109,7 +115,7 @@ function comparePrimitive( const aFormat = prettyFormat(a, FORMAT_OPTIONS); const bFormat = prettyFormat(b, FORMAT_OPTIONS); return aFormat === bFormat - ? NO_DIFF_MESSAGE + ? getCommonMessage(NO_DIFF_MESSAGE, options) : diffLinesUnified(aFormat.split('\n'), bFormat.split('\n'), options); } @@ -128,13 +134,14 @@ function compareObjects( ) { let difference; let hasThrown = false; + const noDiffMessage = getCommonMessage(NO_DIFF_MESSAGE, options); try { const aCompare = prettyFormat(a, FORMAT_OPTIONS_0); const bCompare = prettyFormat(b, FORMAT_OPTIONS_0); if (aCompare === bCompare) { - difference = NO_DIFF_MESSAGE; + difference = noDiffMessage; } else { const aDisplay = prettyFormat(a, FORMAT_OPTIONS); const bDisplay = prettyFormat(b, FORMAT_OPTIONS); @@ -153,12 +160,12 @@ function compareObjects( // If the comparison yields no results, compare again but this time // without calling `toJSON`. It's also possible that toJSON might throw. - if (difference === undefined || difference === NO_DIFF_MESSAGE) { + if (difference === undefined || difference === noDiffMessage) { const aCompare = prettyFormat(a, FALLBACK_FORMAT_OPTIONS_0); const bCompare = prettyFormat(b, FALLBACK_FORMAT_OPTIONS_0); if (aCompare === bCompare) { - difference = NO_DIFF_MESSAGE; + difference = noDiffMessage; } else { const aDisplay = prettyFormat(a, FALLBACK_FORMAT_OPTIONS); const bDisplay = prettyFormat(b, FALLBACK_FORMAT_OPTIONS); @@ -172,8 +179,9 @@ function compareObjects( ); } - if (difference !== NO_DIFF_MESSAGE && !hasThrown) { - difference = SIMILAR_MESSAGE + '\n\n' + difference; + if (difference !== noDiffMessage && !hasThrown) { + difference = + getCommonMessage(SIMILAR_MESSAGE, options) + '\n\n' + difference; } } From 0a4e4a1657b42b21ebf3a969fbf3bbdd28ca930f Mon Sep 17 00:00:00 2001 From: Dominik Broj <19861998+thetric@users.noreply.github.com> Date: Thu, 7 May 2020 21:00:29 +0200 Subject: [PATCH 093/106] chore: add missing comma (#9999) --- website/pages/en/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/en/index.js b/website/pages/en/index.js index d8b4b9448521..cbb880a7e3b9 100755 --- a/website/pages/en/index.js +++ b/website/pages/en/index.js @@ -400,7 +400,7 @@ class Index extends React.Component { { content: ( - Jest uses a custom resolver for imports in your tests + Jest uses a custom resolver for imports in your tests, making it simple to mock any object outside of your test’s scope. You can use mocked imports with the rich [Mock Functions](https://jestjs.io/docs/en/mock-functions.html) From 4fee82cf9ded9a4d763d822342aa86e34a302c14 Mon Sep 17 00:00:00 2001 From: Erik Engervall Date: Fri, 8 May 2020 18:05:59 +0200 Subject: [PATCH 094/106] Fix typo in dependency warning (#10006) Fix type for `resolver` config prop in dependency warning --- packages/jest-config/src/Deprecated.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/jest-config/src/Deprecated.ts b/packages/jest-config/src/Deprecated.ts index 82ffb98f6a06..388602284c8d 100644 --- a/packages/jest-config/src/Deprecated.ts +++ b/packages/jest-config/src/Deprecated.ts @@ -15,7 +15,7 @@ export default { '"browser"', )} has been deprecated. Please install "browser-resolve" and use the "resolver" option in Jest configuration as follows: { - ${chalk.bold('"resolve"')}: ${chalk.bold('"browser-resolve"')} + ${chalk.bold('"resolver"')}: ${chalk.bold('"browser-resolve"')} } `, From c776f876c807b3d524c20e16d1223467bdd9ed4c Mon Sep 17 00:00:00 2001 From: Tim Seckinger Date: Fri, 8 May 2020 18:58:20 +0200 Subject: [PATCH 095/106] =?UTF-8?q?=F0=9F=8E=89=F0=9F=8E=89=F0=9F=8E=89?= =?UTF-8?q?=F0=9F=8E=89=F0=9F=8E=89=F0=9F=8E=89=F0=9F=8E=89=F0=9F=8E=89?= =?UTF-8?q?=F0=9F=8E=89=F0=9F=8E=89=F0=9F=8E=89=F0=9F=8E=89=F0=9F=8E=89?= =?UTF-8?q?=F0=9F=8E=89=F0=9F=8E=89=F0=9F=8E=89=F0=9F=8E=89=F0=9F=8E=89?= =?UTF-8?q?=F0=9F=8E=89=F0=9F=8E=89=F0=9F=8E=89=F0=9F=8E=89=F0=9F=8E=89?= =?UTF-8?q?=F0=9F=8E=89=F0=9F=8E=89=20(#10000)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 2 ++ packages/jest-core/src/cli/index.ts | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a2471a370e38..840e4f93b811 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ ### Chore & Maintenance +- `[jest-core]` 🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉 ([#10000](https://github.com/facebook/jest/pull/10000)) + ### Performance ## 26.0.1 diff --git a/packages/jest-core/src/cli/index.ts b/packages/jest-core/src/cli/index.ts index dd8b469e7624..a9c2946711b9 100644 --- a/packages/jest-core/src/cli/index.ts +++ b/packages/jest-core/src/cli/index.ts @@ -68,7 +68,7 @@ export async function runCLI( exit(0); } - await _run( + await _run10000( globalConfig, configs, hasDeprecationWarnings, @@ -134,7 +134,7 @@ const buildContextsAndHasteMaps = async ( return {contexts, hasteMapInstances}; }; -const _run = async ( +const _run10000 = async ( globalConfig: Config.GlobalConfig, configs: Array, hasDeprecationWarnings: boolean, From 41e285665563294dca099dafc046abb76d6cb819 Mon Sep 17 00:00:00 2001 From: Tane Morgan <464864+tanem@users.noreply.github.com> Date: Sat, 9 May 2020 15:21:19 +1200 Subject: [PATCH 096/106] fix: add missing haste-map dep to jest-snapshot (#10008) --- CHANGELOG.md | 1 + packages/jest-snapshot/package.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 840e4f93b811..59609112b0a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - `[jest-jasmine2]` Stop adding `:` after an error that has no message ([#9990](https://github.com/facebook/jest/pull/9990)) - `[jest-diff]` Control no diff message color with `commonColor` in diff options ([#9997](https://github.com/facebook/jest/pull/9997)) +- `[jest-snapshot]` Fix TypeScript compilation ([#10008](https://github.com/facebook/jest/pull/10008)) ### Chore & Maintenance diff --git a/packages/jest-snapshot/package.json b/packages/jest-snapshot/package.json index a5c0dd142f4f..88b963e754ef 100644 --- a/packages/jest-snapshot/package.json +++ b/packages/jest-snapshot/package.json @@ -18,6 +18,7 @@ "graceful-fs": "^4.2.4", "jest-diff": "^26.0.1", "jest-get-type": "^26.0.0", + "jest-haste-map": "^26.0.1", "jest-matcher-utils": "^26.0.1", "jest-message-util": "^26.0.1", "jest-resolve": "^26.0.1", @@ -33,7 +34,6 @@ "@types/semver": "^7.1.0", "ansi-regex": "^5.0.0", "ansi-styles": "^4.2.0", - "jest-haste-map": "^26.0.1", "prettier": "^1.19.1" }, "engines": { From 8294bab1ebbf9bac7d2aa01abd256bbca4952eb7 Mon Sep 17 00:00:00 2001 From: hisco <39222286+hisco@users.noreply.github.com> Date: Sat, 9 May 2020 12:10:12 +0300 Subject: [PATCH 097/106] feat: support config files exporting (`async`) `function`s (#10001) --- CHANGELOG.md | 2 + docs/Configuration.md | 8 ++++ .../src/__tests__/readConfigs.test.ts | 40 ++++++++++++++++++- packages/jest-config/src/index.ts | 8 +++- 4 files changed, 56 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 59609112b0a5..cca2602e30cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ### Features +- `[jest-config]` Support config files exporting (`async`) `function`s ([#10001](https://github.com/facebook/jest/pull/10001)) + ### Fixes - `[jest-jasmine2]` Stop adding `:` after an error that has no message ([#9990](https://github.com/facebook/jest/pull/9990)) diff --git a/docs/Configuration.md b/docs/Configuration.md index b429dc017d68..2020673b064b 100644 --- a/docs/Configuration.md +++ b/docs/Configuration.md @@ -18,9 +18,17 @@ Or through JavaScript: ```js // jest.config.js +//Sync object module.exports = { verbose: true, }; + +//Or async function +module.exports = async () => { + return { + verbose: true, + }; +}; ``` Please keep in mind that the resulting configuration must be JSON-serializable. diff --git a/packages/jest-config/src/__tests__/readConfigs.test.ts b/packages/jest-config/src/__tests__/readConfigs.test.ts index be939256c090..97fa1b351bf9 100644 --- a/packages/jest-config/src/__tests__/readConfigs.test.ts +++ b/packages/jest-config/src/__tests__/readConfigs.test.ts @@ -4,12 +4,50 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ - +import {Config} from '@jest/types'; import {readConfigs} from '../index'; +let mockResult; +jest.mock('graceful-fs', () => ({ + ...jest.requireActual('fs'), + existsSync: jest.fn(() => true), + lstatSync: jest.fn(() => ({ + isDirectory: () => false, + })), +})); +jest.mock('../readConfigFileAndSetRootDir', () => jest.fn(() => mockResult)); + test('readConfigs() throws when called without project paths', async () => { await expect( // @ts-ignore readConfigs(null /* argv */, [] /* projectPaths */), ).rejects.toThrowError('jest: No configuration found for any project.'); }); + +test('readConfigs() loads async config file', async () => { + mockResult = jest.fn(async () => ({ + rootDir: './', + })); + await expect( + // @ts-ignore + readConfigs( + {} /* argv */, + ['./some-jest-config-file.js'] /* projectPaths */, + ), + ).resolves.toHaveProperty('configs'); + expect(mockResult).toHaveBeenCalled(); +}); + +test('readConfigs() reject if async was rejected', async () => { + mockResult = jest.fn(async () => { + throw new Error('Some error'); + }); + await expect( + // @ts-ignore + readConfigs( + {} /* argv */, + ['./some-jest-config-file.js'] /* projectPaths */, + ), + ).rejects.toBeTruthy(); + expect(mockResult).toHaveBeenCalled(); +}); diff --git a/packages/jest-config/src/index.ts b/packages/jest-config/src/index.ts index 68d6b5ddf55c..de88d4423cf8 100644 --- a/packages/jest-config/src/index.ts +++ b/packages/jest-config/src/index.ts @@ -41,7 +41,9 @@ export async function readConfig( parentConfigPath?: Config.Path | null, projectIndex: number = Infinity, ): Promise { - let rawOptions; + let rawOptions: + | Config.InitialOptions + | (() => Config.InitialOptions | Promise); let configPath = null; if (typeof packageRootOrConfig !== 'string') { @@ -82,6 +84,10 @@ export async function readConfig( rawOptions = await readConfigFileAndSetRootDir(configPath); } + if (typeof rawOptions === 'function') { + rawOptions = await rawOptions(); + } + const {options, hasDeprecationWarnings} = normalize( rawOptions, argv, From c6e63f331b491082075aef4c48ced355ae72add5 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Sat, 9 May 2020 19:50:14 +0200 Subject: [PATCH 098/106] chore: bump `istanbul-lib-instrument` (#10009) --- packages/jest-reporters/package.json | 2 +- .../script_transformer.test.js.snap | 26 ++++++++++--------- .../src/__tests__/script_transformer.test.js | 5 ++-- yarn.lock | 15 +++++------ 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/packages/jest-reporters/package.json b/packages/jest-reporters/package.json index a56037794bf7..02c2d0eff3ce 100644 --- a/packages/jest-reporters/package.json +++ b/packages/jest-reporters/package.json @@ -16,7 +16,7 @@ "glob": "^7.1.2", "graceful-fs": "^4.2.4", "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^4.0.0", + "istanbul-lib-instrument": "^4.0.3", "istanbul-lib-report": "^3.0.0", "istanbul-lib-source-maps": "^4.0.0", "istanbul-reports": "^3.0.2", diff --git a/packages/jest-transform/src/__tests__/__snapshots__/script_transformer.test.js.snap b/packages/jest-transform/src/__tests__/__snapshots__/script_transformer.test.js.snap index f2e35813f3b9..8cc51acac4fa 100644 --- a/packages/jest-transform/src/__tests__/__snapshots__/script_transformer.test.js.snap +++ b/packages/jest-transform/src/__tests__/__snapshots__/script_transformer.test.js.snap @@ -112,18 +112,19 @@ function cov_25u22311x4() { } var actualCoverage = coverage[path]; - - cov_25u22311x4 = function () { - return actualCoverage; - }; - + { + // @ts-ignore + cov_25u22311x4 = function () { + return actualCoverage; + }; + } return actualCoverage; } cov_25u22311x4(); cov_25u22311x4().s[0]++; module.exports = "banana"; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImJhbmFuYS5qcyJdLCJuYW1lcyI6WyJtb2R1bGUiLCJleHBvcnRzIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQUEsTUFBTSxDQUFDQyxPQUFQLEdBQWlCLFFBQWpCIiwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSBcImJhbmFuYVwiOyJdfQ== +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImJhbmFuYS5qcyJdLCJuYW1lcyI6WyJtb2R1bGUiLCJleHBvcnRzIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFlWTs7Ozs7Ozs7OztBQWZaQSxNQUFNLENBQUNDLE9BQVAsR0FBaUIsUUFBakIiLCJzb3VyY2VzQ29udGVudCI6WyJtb2R1bGUuZXhwb3J0cyA9IFwiYmFuYW5hXCI7Il19 `; exports[`ScriptTransformer transforms a file properly 2`] = ` @@ -203,11 +204,12 @@ function cov_23yvu8etmu() { } var actualCoverage = coverage[path]; - - cov_23yvu8etmu = function () { - return actualCoverage; - }; - + { + // @ts-ignore + cov_23yvu8etmu = function () { + return actualCoverage; + }; + } return actualCoverage; } @@ -220,7 +222,7 @@ module.exports = () => { cov_23yvu8etmu().s[1]++; return "kiwi"; }; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImtpd2kuanMiXSwibmFtZXMiOlsibW9kdWxlIiwiZXhwb3J0cyJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQUFBLE1BQU0sQ0FBQ0MsT0FBUCxHQUFpQixNQUFNO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBTSxDQUE3QiIsInNvdXJjZXNDb250ZW50IjpbIm1vZHVsZS5leHBvcnRzID0gKCkgPT4gXCJraXdpXCI7Il19 +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImtpd2kuanMiXSwibmFtZXMiOlsibW9kdWxlIiwiZXhwb3J0cyJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFlWTs7Ozs7Ozs7Ozs7QUFmWkEsTUFBTSxDQUFDQyxPQUFQLEdBQWlCLE1BQU07QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFNLENBQTdCIiwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSAoKSA9PiBcImtpd2lcIjsiXX0= `; exports[`ScriptTransformer uses multiple preprocessors 1`] = ` diff --git a/packages/jest-transform/src/__tests__/script_transformer.test.js b/packages/jest-transform/src/__tests__/script_transformer.test.js index d8d2281e5d78..fd8c31d2b007 100644 --- a/packages/jest-transform/src/__tests__/script_transformer.test.js +++ b/packages/jest-transform/src/__tests__/script_transformer.test.js @@ -558,7 +558,8 @@ describe('ScriptTransformer', () => { version: 3, sources: ['banana.js'], names: ['content'], - mappings: ';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAAA,OAAO', + mappings: + ';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeY;;;;;;;;;;AAfZA,OAAO', sourcesContent: ['content'], }; /* eslint-enable */ @@ -596,7 +597,7 @@ describe('ScriptTransformer', () => { sources: ['banana.js'], names: ['module', 'exports'], mappings: - ';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAAA,MAAM,CAACC,OAAP,GAAiB,QAAjB', + ';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeY;;;;;;;;;;AAfZA,MAAM,CAACC,OAAP,GAAiB,QAAjB', sourcesContent: ['module.exports = "banana";'], }; /* eslint-enable */ diff --git a/yarn.lock b/yarn.lock index c40a326f6a5f..624b75f1a1eb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -306,7 +306,7 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.0.0", "@babel/parser@^7.1.0", "@babel/parser@^7.7.0", "@babel/parser@^7.7.5", "@babel/parser@^7.8.6", "@babel/parser@^7.9.6": +"@babel/parser@^7.0.0", "@babel/parser@^7.1.0", "@babel/parser@^7.7.0", "@babel/parser@^7.8.6", "@babel/parser@^7.9.6": version "7.9.6" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.9.6.tgz#3b1bbb30dabe600cd72db58720998376ff653bc7" integrity sha512-AoeIEJn8vt+d/6+PXDRPaksYhnlbMIiejioBZvvMQsOjW/JYK6k/0dKnvvP3EhK5GfMBWDPtrxRtegWdAcdq9Q== @@ -994,7 +994,7 @@ dependencies: regenerator-runtime "^0.13.4" -"@babel/template@^7.0.0", "@babel/template@^7.3.3", "@babel/template@^7.7.4", "@babel/template@^7.8.3", "@babel/template@^7.8.6": +"@babel/template@^7.0.0", "@babel/template@^7.3.3", "@babel/template@^7.8.3", "@babel/template@^7.8.6": version "7.8.6" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.8.6.tgz#86b22af15f828dfb086474f964dcc3e39c43ce2b" integrity sha512-zbMsPMy/v0PWFZEhQJ66bqjhH+z0JgMoBWuikXybgG3Gkd/3t5oQ1Rw2WQhnSrsOmsKXnZOx15tkC4qON/+JPg== @@ -8003,15 +8003,12 @@ istanbul-lib-coverage@^3.0.0: resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz#f5944a37c70b550b02a78a5c3b2055b280cec8ec" integrity sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg== -istanbul-lib-instrument@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.1.tgz#61f13ac2c96cfefb076fe7131156cc05907874e6" - integrity sha512-imIchxnodll7pvQBYOqUu88EufLCU56LMeFPZZM/fJZ1irYcYdqroaV+ACK1Ila8ls09iEYArp+nqyC6lW1Vfg== +istanbul-lib-instrument@^4.0.0, istanbul-lib-instrument@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz#873c6fff897450118222774696a3f28902d77c1d" + integrity sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ== dependencies: "@babel/core" "^7.7.5" - "@babel/parser" "^7.7.5" - "@babel/template" "^7.7.4" - "@babel/traverse" "^7.7.4" "@istanbuljs/schema" "^0.1.2" istanbul-lib-coverage "^3.0.0" semver "^6.3.0" From 0e0eeed9d794fe0d6d7e84f555d9684f9e944221 Mon Sep 17 00:00:00 2001 From: Yacine Hmito Date: Sun, 10 May 2020 09:33:43 +0200 Subject: [PATCH 099/106] feat: CLI argument to filter tests by projects (#8612) --- CHANGELOG.md | 1 + docs/CLI.md | 4 + e2e/__tests__/selectProjects.test.ts | 189 ++++++++++++++++++ e2e/runJest.ts | 2 +- .../__tests__/first-project.test.js | 10 + .../__tests__/second-project.test.js | 10 + e2e/select-projects-missing-name/package.json | 20 ++ .../__tests__/first-project.test.js | 10 + .../__tests__/second-project.test.js | 10 + e2e/select-projects/package.json | 24 +++ .../jest-cli/src/__tests__/cli/args.test.ts | 7 + packages/jest-cli/src/cli/args.ts | 14 ++ packages/jest-core/src/cli/index.ts | 18 +- .../src/getConfigsOfProjectsToRun.ts | 20 ++ .../jest-core/src/getProjectDisplayName.ts | 24 +++ .../src/getProjectNamesMissingWarning.ts | 29 +++ .../jest-core/src/getSelectProjectsMessage.ts | 47 +++++ packages/jest-types/src/Config.ts | 1 + 18 files changed, 438 insertions(+), 2 deletions(-) create mode 100644 e2e/__tests__/selectProjects.test.ts create mode 100644 e2e/select-projects-missing-name/__tests__/first-project.test.js create mode 100644 e2e/select-projects-missing-name/__tests__/second-project.test.js create mode 100644 e2e/select-projects-missing-name/package.json create mode 100644 e2e/select-projects/__tests__/first-project.test.js create mode 100644 e2e/select-projects/__tests__/second-project.test.js create mode 100644 e2e/select-projects/package.json create mode 100644 packages/jest-core/src/getConfigsOfProjectsToRun.ts create mode 100644 packages/jest-core/src/getProjectDisplayName.ts create mode 100644 packages/jest-core/src/getProjectNamesMissingWarning.ts create mode 100644 packages/jest-core/src/getSelectProjectsMessage.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index cca2602e30cd..5495a62f3f76 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ### Features - `[jest-config]` Support config files exporting (`async`) `function`s ([#10001](https://github.com/facebook/jest/pull/10001)) +- `[jest-cli, jest-core]` Add `--selectProjects` CLI argument to filter test suites by project name ([#8612](https://github.com/facebook/jest/pull/8612)) ### Fixes diff --git a/docs/CLI.md b/docs/CLI.md index a6ed467c95d0..b0c989dfba67 100644 --- a/docs/CLI.md +++ b/docs/CLI.md @@ -254,6 +254,10 @@ Run tests with specified reporters. [Reporter options](configuration#reporters-a Alias: `-i`. Run all tests serially in the current process, rather than creating a worker pool of child processes that run tests. This can be useful for debugging. +### `--selectProjects ... ` + +Run only the tests of the specified projects. Jest uses the attribute `displayName` in the configuration to identify each project. If you use this option, you should provide a `displayName` to all your projects. + ### `--runTestsByPath` Run only the tests that were specified with their exact paths. diff --git a/e2e/__tests__/selectProjects.test.ts b/e2e/__tests__/selectProjects.test.ts new file mode 100644 index 000000000000..472221575cc7 --- /dev/null +++ b/e2e/__tests__/selectProjects.test.ts @@ -0,0 +1,189 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +import {resolve} from 'path'; + +import run, { + RunJestJsonResult, + RunJestResult, + json as runWithJson, +} from '../runJest'; + +describe('Given a config with two named projects, first-project and second-project', () => { + const dir = resolve(__dirname, '..', 'select-projects'); + + describe('when Jest is started with `--selectProjects first-project`', () => { + let result: RunJestJsonResult; + beforeAll(() => { + result = runWithJson('select-projects', [ + '--selectProjects', + 'first-project', + ]); + }); + it('runs the tests in the first project only', () => { + expect(result.json).toHaveProperty('success', true); + expect(result.json).toHaveProperty('numTotalTests', 1); + expect(result.json.testResults.map(({name}) => name)).toEqual([ + resolve(dir, '__tests__/first-project.test.js'), + ]); + }); + it('prints that only first-project will run', () => { + expect(result.stderr).toMatch(/^Running one project: first-project/); + }); + }); + + describe('when Jest is started with `--selectProjects second-project`', () => { + let result: RunJestJsonResult; + beforeAll(() => { + result = runWithJson('select-projects', [ + '--selectProjects', + 'second-project', + ]); + }); + it('runs the tests in the second project only', () => { + expect(result.json).toHaveProperty('success', true); + expect(result.json).toHaveProperty('numTotalTests', 1); + expect(result.json.testResults.map(({name}) => name)).toEqual([ + resolve(dir, '__tests__/second-project.test.js'), + ]); + }); + it('prints that only second-project will run', () => { + expect(result.stderr).toMatch(/^Running one project: second-project/); + }); + }); + + describe('when Jest is started with `--selectProjects first-project second-project`', () => { + let result: RunJestJsonResult; + beforeAll(() => { + result = runWithJson('select-projects', [ + '--selectProjects', + 'first-project', + 'second-project', + ]); + }); + it('runs the tests in the first and second projects', () => { + expect(result.json).toHaveProperty('success', true); + expect(result.json).toHaveProperty('numTotalTests', 2); + expect(result.json.testResults.map(({name}) => name).sort()).toEqual([ + resolve(dir, '__tests__/first-project.test.js'), + resolve(dir, '__tests__/second-project.test.js'), + ]); + }); + it('prints that both first-project and second-project will run', () => { + expect(result.stderr).toMatch( + /^Running 2 projects:\n- first-project\n- second-project/, + ); + }); + }); + + describe('when Jest is started without providing `--selectProjects`', () => { + let result: RunJestJsonResult; + beforeAll(() => { + result = runWithJson('select-projects', []); + }); + it('runs the tests in the first and second projects', () => { + expect(result.json).toHaveProperty('success', true); + expect(result.json).toHaveProperty('numTotalTests', 2); + expect(result.json.testResults.map(({name}) => name).sort()).toEqual([ + resolve(dir, '__tests__/first-project.test.js'), + resolve(dir, '__tests__/second-project.test.js'), + ]); + }); + it('does not print which projects are run', () => { + expect(result.stderr).not.toMatch(/^Running/); + }); + }); + + describe('when Jest is started with `--selectProjects third-project`', () => { + let result: RunJestResult; + beforeAll(() => { + result = run('select-projects', ['--selectProjects', 'third-project']); + }); + it('fails', () => { + expect(result).toHaveProperty('failed', true); + }); + it('prints that no project was found', () => { + expect(result.stdout).toMatch( + /^You provided values for --selectProjects but no projects were found matching the selection/, + ); + }); + }); +}); + +describe('Given a config with two projects, first-project and an unnamed project', () => { + const dir = resolve(__dirname, '..', 'select-projects-missing-name'); + + describe('when Jest is started with `--selectProjects first-project`', () => { + let result: RunJestJsonResult; + beforeAll(() => { + result = runWithJson('select-projects-missing-name', [ + '--selectProjects', + 'first-project', + ]); + }); + it('runs the tests in the first project only', () => { + expect(result.json.success).toBe(true); + expect(result.json.numTotalTests).toBe(1); + expect(result.json.testResults.map(({name}) => name)).toEqual([ + resolve(dir, '__tests__/first-project.test.js'), + ]); + }); + it('prints that a project does not have a name', () => { + expect(result.stderr).toMatch( + /^You provided values for --selectProjects but a project does not have a name/, + ); + }); + it('prints that only first-project will run', () => { + const stderrThirdLine = result.stderr.split('\n')[2]; + expect(stderrThirdLine).toMatch(/^Running one project: first-project/); + }); + }); + + describe('when Jest is started without providing `--selectProjects`', () => { + let result: RunJestJsonResult; + beforeAll(() => { + result = runWithJson('select-projects-missing-name', []); + }); + it('runs the tests in the first and second projects', () => { + expect(result.json.success).toBe(true); + expect(result.json.numTotalTests).toBe(2); + expect(result.json.testResults.map(({name}) => name).sort()).toEqual([ + resolve(dir, '__tests__/first-project.test.js'), + resolve(dir, '__tests__/second-project.test.js'), + ]); + }); + it('does not print that a project has no name', () => { + expect(result.stderr).not.toMatch( + /^You provided values for --selectProjects but a project does not have a name/, + ); + }); + }); + + describe('when Jest is started with `--selectProjects third-project`', () => { + let result: RunJestResult; + beforeAll(() => { + result = run('select-projects-missing-name', [ + '--selectProjects', + 'third-project', + ]); + }); + it('fails', () => { + expect(result).toHaveProperty('failed', true); + }); + it('prints that a project does not have a name', () => { + expect(result.stdout).toMatch( + /^You provided values for --selectProjects but a project does not have a name/, + ); + }); + it('prints that no project was found', () => { + const stdoutThirdLine = result.stdout.split('\n')[2]; + expect(stdoutThirdLine).toMatch( + /^You provided values for --selectProjects but no projects were found matching the selection/, + ); + }); + }); +}); diff --git a/e2e/runJest.ts b/e2e/runJest.ts index 28eda5785672..44e5e5217894 100644 --- a/e2e/runJest.ts +++ b/e2e/runJest.ts @@ -95,7 +95,7 @@ function spawnJest( export type RunJestResult = execa.ExecaReturnValue; -interface RunJestJsonResult extends RunJestResult { +export interface RunJestJsonResult extends RunJestResult { json: FormattedTestResults; } diff --git a/e2e/select-projects-missing-name/__tests__/first-project.test.js b/e2e/select-projects-missing-name/__tests__/first-project.test.js new file mode 100644 index 000000000000..f440fcd752c5 --- /dev/null +++ b/e2e/select-projects-missing-name/__tests__/first-project.test.js @@ -0,0 +1,10 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +it('should run when first-project appears in selectProjects', () => { + expect(true).toBe(true); +}); diff --git a/e2e/select-projects-missing-name/__tests__/second-project.test.js b/e2e/select-projects-missing-name/__tests__/second-project.test.js new file mode 100644 index 000000000000..c3db24a8b9a6 --- /dev/null +++ b/e2e/select-projects-missing-name/__tests__/second-project.test.js @@ -0,0 +1,10 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +it('should run when second-project appears in selectProjects', () => { + expect(true).toBe(true); +}); diff --git a/e2e/select-projects-missing-name/package.json b/e2e/select-projects-missing-name/package.json new file mode 100644 index 000000000000..a9743659e309 --- /dev/null +++ b/e2e/select-projects-missing-name/package.json @@ -0,0 +1,20 @@ +{ + "description": "Testing the behaviour of --selectProjects when a project does not have a name", + "jest": { + "projects": [ + { + "displayName": "first-project", + "testMatch": [ + "/__tests__/first-project.test.js" + ], + "testEnvironment": "node" + }, + { + "testMatch": [ + "/__tests__/second-project.test.js" + ], + "testEnvironment": "node" + } + ] + } +} diff --git a/e2e/select-projects/__tests__/first-project.test.js b/e2e/select-projects/__tests__/first-project.test.js new file mode 100644 index 000000000000..f440fcd752c5 --- /dev/null +++ b/e2e/select-projects/__tests__/first-project.test.js @@ -0,0 +1,10 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +it('should run when first-project appears in selectProjects', () => { + expect(true).toBe(true); +}); diff --git a/e2e/select-projects/__tests__/second-project.test.js b/e2e/select-projects/__tests__/second-project.test.js new file mode 100644 index 000000000000..c3db24a8b9a6 --- /dev/null +++ b/e2e/select-projects/__tests__/second-project.test.js @@ -0,0 +1,10 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +it('should run when second-project appears in selectProjects', () => { + expect(true).toBe(true); +}); diff --git a/e2e/select-projects/package.json b/e2e/select-projects/package.json new file mode 100644 index 000000000000..28e0bcc45e07 --- /dev/null +++ b/e2e/select-projects/package.json @@ -0,0 +1,24 @@ +{ + "description": "Testing the behaviour of --selectProjects", + "jest": { + "projects": [ + { + "displayName": "first-project", + "testMatch": [ + "/__tests__/first-project.test.js" + ], + "testEnvironment": "node" + }, + { + "displayName": { + "name": "second-project", + "color": "blue" + }, + "testMatch": [ + "/__tests__/second-project.test.js" + ], + "testEnvironment": "node" + } + ] + } +} diff --git a/packages/jest-cli/src/__tests__/cli/args.test.ts b/packages/jest-cli/src/__tests__/cli/args.test.ts index 8e732954b771..46ff7a7e4aed 100644 --- a/packages/jest-cli/src/__tests__/cli/args.test.ts +++ b/packages/jest-cli/src/__tests__/cli/args.test.ts @@ -72,6 +72,13 @@ describe('check', () => { }, ); + it('raises an exception if selectProjects is not provided any project names', () => { + const argv: Config.Argv = {selectProjects: []} as Config.Argv; + expect(() => check(argv)).toThrow( + 'The --selectProjects option requires the name of at least one project to be specified.\n', + ); + }); + it('raises an exception if config is not a valid JSON string', () => { const argv = {config: 'x:1'} as Config.Argv; expect(() => check(argv)).toThrow( diff --git a/packages/jest-cli/src/cli/args.ts b/packages/jest-cli/src/cli/args.ts index b368e8a5830d..f7018d51ab10 100644 --- a/packages/jest-cli/src/cli/args.ts +++ b/packages/jest-cli/src/cli/args.ts @@ -49,6 +49,13 @@ export function check(argv: Config.Argv): true { ); } + if (argv.selectProjects && argv.selectProjects.length === 0) { + throw new Error( + 'The --selectProjects option requires the name of at least one project to be specified.\n' + + 'Example usage: jest --selectProjects my-first-project my-second-project', + ); + } + if ( argv.config && !isJSONString(argv.config) && @@ -528,6 +535,13 @@ export const options = { "Allows to use a custom runner instead of Jest's default test runner.", type: 'string', }, + selectProjects: { + description: + 'Run only the tests of the specified projects.' + + 'Jest uses the attribute `displayName` in the configuration to identify each project.', + string: true, + type: 'array', + }, setupFiles: { description: 'A list of paths to modules that run some code to configure or ' + diff --git a/packages/jest-core/src/cli/index.ts b/packages/jest-core/src/cli/index.ts index a9c2946711b9..a1082d079f1c 100644 --- a/packages/jest-core/src/cli/index.ts +++ b/packages/jest-core/src/cli/index.ts @@ -26,6 +26,9 @@ import TestWatcher from '../TestWatcher'; import watch from '../watch'; import pluralize from '../pluralize'; import logDebugMessages from '../lib/log_debug_messages'; +import getConfigsOfProjectsToRun from '../getConfigsOfProjectsToRun'; +import getProjectNamesMissingWarning from '../getProjectNamesMissingWarning'; +import getSelectProjectsMessage from '../getSelectProjectsMessage'; const {print: preRunMessagePrint} = preRunMessage; @@ -68,9 +71,22 @@ export async function runCLI( exit(0); } + let configsOfProjectsToRun = configs; + if (argv.selectProjects) { + const namesMissingWarning = getProjectNamesMissingWarning(configs); + if (namesMissingWarning) { + outputStream.write(namesMissingWarning); + } + configsOfProjectsToRun = getConfigsOfProjectsToRun( + argv.selectProjects, + configs, + ); + outputStream.write(getSelectProjectsMessage(configsOfProjectsToRun)); + } + await _run10000( globalConfig, - configs, + configsOfProjectsToRun, hasDeprecationWarnings, outputStream, r => (results = r), diff --git a/packages/jest-core/src/getConfigsOfProjectsToRun.ts b/packages/jest-core/src/getConfigsOfProjectsToRun.ts new file mode 100644 index 000000000000..b8b8288ccc68 --- /dev/null +++ b/packages/jest-core/src/getConfigsOfProjectsToRun.ts @@ -0,0 +1,20 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +import type {Config} from '@jest/types'; +import getProjectDisplayName from './getProjectDisplayName'; + +export default function getConfigsOfProjectsToRun( + namesOfProjectsToRun: Array, + projectConfigs: Array, +): Array { + const setOfProjectsToRun = new Set(namesOfProjectsToRun); + return projectConfigs.filter(config => { + const name = getProjectDisplayName(config); + return name && setOfProjectsToRun.has(name); + }); +} diff --git a/packages/jest-core/src/getProjectDisplayName.ts b/packages/jest-core/src/getProjectDisplayName.ts new file mode 100644 index 000000000000..24f55d6746ea --- /dev/null +++ b/packages/jest-core/src/getProjectDisplayName.ts @@ -0,0 +1,24 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +import type {Config} from '@jest/types'; + +export default function getProjectDisplayName( + projectConfig: Config.ProjectConfig, +): string | undefined { + const {displayName} = projectConfig; + if (!displayName) { + return undefined; + } + if (typeof displayName === 'string') { + return displayName; + } + if (typeof displayName === 'object') { + return displayName.name; + } + return undefined; +} diff --git a/packages/jest-core/src/getProjectNamesMissingWarning.ts b/packages/jest-core/src/getProjectNamesMissingWarning.ts new file mode 100644 index 000000000000..53f0543d1cc8 --- /dev/null +++ b/packages/jest-core/src/getProjectNamesMissingWarning.ts @@ -0,0 +1,29 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +import chalk = require('chalk'); +import type {Config} from '@jest/types'; +import getProjectDisplayName from './getProjectDisplayName'; + +export default function getProjectNamesMissingWarning( + projectConfigs: Array, +): string | undefined { + const numberOfProjectsWithoutAName = projectConfigs.filter( + config => !getProjectDisplayName(config), + ).length; + if (numberOfProjectsWithoutAName === 0) { + return undefined; + } + return chalk.yellow( + `You provided values for --selectProjects but ${ + numberOfProjectsWithoutAName === 1 + ? 'a project does not have a name' + : `${numberOfProjectsWithoutAName} projects do not have a name` + }.\n` + + 'Set displayName in the config of all projects in order to disable this warning.\n', + ); +} diff --git a/packages/jest-core/src/getSelectProjectsMessage.ts b/packages/jest-core/src/getSelectProjectsMessage.ts new file mode 100644 index 000000000000..5d3fff3577b4 --- /dev/null +++ b/packages/jest-core/src/getSelectProjectsMessage.ts @@ -0,0 +1,47 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +import chalk = require('chalk'); +import type {Config} from '@jest/types'; +import getProjectDisplayName from './getProjectDisplayName'; + +export default function getSelectProjectsMessage( + projectConfigs: Array, +): string { + if (projectConfigs.length === 0) { + return getNoSelectionWarning(); + } + return getProjectsRunningMessage(projectConfigs); +} + +function getNoSelectionWarning(): string { + return chalk.yellow( + 'You provided values for --selectProjects but no projects were found matching the selection.\n', + ); +} + +function getProjectsRunningMessage( + projectConfigs: Array, +): string { + if (projectConfigs.length === 1) { + const name = getProjectDisplayName(projectConfigs[0]); + return `Running one project: ${chalk.bold(name)}\n`; + } + const projectsList = projectConfigs + .map(getProjectNameListElement) + .sort() + .join('\n'); + return `Running ${projectConfigs.length} projects:\n${projectsList}\n`; +} + +function getProjectNameListElement( + projectConfig: Config.ProjectConfig, +): string { + const name = getProjectDisplayName(projectConfig); + const elementContent = name ? chalk.bold(name) : ''; + return `- ${elementContent}`; +} diff --git a/packages/jest-types/src/Config.ts b/packages/jest-types/src/Config.ts index cf895c67c1a8..8bfc411710f7 100644 --- a/packages/jest-types/src/Config.ts +++ b/packages/jest-types/src/Config.ts @@ -408,6 +408,7 @@ export type Argv = Arguments< rootDir: string; roots: Array; runInBand: boolean; + selectProjects: Array; setupFiles: Array; setupFilesAfterEnv: Array; showConfig: boolean; From 9ffd368330a3aa05a7db9836be44891419b0b97d Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Wed, 13 May 2020 13:01:02 +0200 Subject: [PATCH 100/106] chore: upgrade to typescript 3.9 (#10031) --- .eslintrc.js | 1 + package.json | 2 +- packages/babel-plugin-jest-hoist/src/index.ts | 2 +- .../src/__tests__/circusItTestError.test.ts | 12 +++--- .../__tests__/circusItTodoTestError.test.ts | 4 +- .../jest-cli/src/__tests__/cli/args.test.ts | 4 +- packages/jest-cli/src/init/index.ts | 2 +- .../src/__tests__/getMaxWorkers.test.ts | 6 +-- .../src/__tests__/readConfig.test.ts | 2 +- .../src/__tests__/readConfigs.test.ts | 6 +-- packages/jest-config/src/normalize.ts | 4 +- .../src/readConfigFileAndSetRootDir.ts | 2 +- packages/jest-core/src/watch.ts | 2 +- .../src/__mocks__/index.ts | 6 +-- packages/jest-environment-jsdom/src/index.ts | 5 ++- .../src/__tests__/node_environment.test.ts | 2 +- .../jest-fake-timers/src/legacyFakeTimers.ts | 6 ++- .../jest-fake-timers/src/modernFakeTimers.ts | 2 +- packages/jest-haste-map/src/index.ts | 13 +++---- .../jest-haste-map/src/lib/FSEventsWatcher.ts | 3 +- .../jest-jasmine2/src/__tests__/Suite.test.ts | 2 +- .../src/__tests__/itTestError.test.ts | 8 ++-- .../src/__tests__/queueRunner.test.ts | 12 +++--- .../src/__tests__/reporter.test.ts | 6 +-- .../src/__tests__/todoError.test.ts | 4 +- packages/jest-jasmine2/src/errorOnPrivate.ts | 2 +- packages/jest-jasmine2/src/index.ts | 6 +-- packages/jest-jasmine2/src/jasmine/Env.ts | 4 +- .../src/jasmine/ReportDispatcher.ts | 14 +++---- packages/jest-jasmine2/src/jasmine/Spec.ts | 4 +- packages/jest-jasmine2/src/jestExpect.ts | 4 +- packages/jest-jasmine2/src/queueRunner.ts | 2 +- .../src/__tests__/index.test.ts | 2 +- .../src/__tests__/index.test.ts | 22 +++++------ packages/jest-mock/src/index.ts | 31 ++++++++------- packages/jest-repl/src/cli/index.ts | 1 - .../jest-reporters/src/coverage_reporter.ts | 22 ++++------- .../jest-reporters/src/notify_reporter.ts | 2 - .../src/__tests__/resolve.test.ts | 2 +- packages/jest-resolve/src/defaultResolver.ts | 2 +- packages/jest-resolve/src/index.ts | 2 +- packages/jest-resolve/src/isBuiltinModule.ts | 2 +- packages/jest-resolve/src/shouldLoadAsEsm.ts | 2 +- packages/jest-runner/src/runTest.ts | 2 +- packages/jest-runtime/src/index.ts | 26 ++++++------- .../src/__tests__/index.test.ts | 2 +- packages/jest-snapshot/src/State.ts | 2 +- .../jest-snapshot/src/__tests__/utils.test.ts | 2 +- .../src/__tests__/getCallsite.test.ts | 2 +- packages/jest-source-map/src/getCallsite.ts | 2 +- .../src/__tests__/formatTestResults.test.ts | 2 +- .../jest-transform/src/ScriptTransformer.ts | 4 +- .../src/__tests__/createProcessObject.test.ts | 6 +-- .../src/__tests__/deepCyclicCopy.test.ts | 38 +++++++++---------- .../__tests__/installCommonGlobals.test.ts | 2 +- .../src/convertDescriptorToString.ts | 2 +- .../jest-util/src/installCommonGlobals.ts | 4 +- packages/jest-util/src/setGlobal.ts | 2 +- packages/jest-validate/src/condition.ts | 4 +- packages/jest-worker/src/index.ts | 6 +-- .../src/workers/ChildProcessWorker.ts | 6 +-- .../src/workers/NodeThreadsWorker.ts | 6 +-- .../src/__tests__/prettyFormat.test.ts | 8 ++-- .../src/__tests__/react.test.tsx | 4 +- scripts/verifyOldTs.js | 11 +++++- yarn.lock | 8 ++-- 66 files changed, 198 insertions(+), 197 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index b72d563d7295..e326c04673cc 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -26,6 +26,7 @@ module.exports = { 'error', {argsIgnorePattern: '^_'}, ], + '@typescript-eslint/prefer-ts-expect-error': 'error', // Since we do `export =`. Remove for Jest 25 'import/default': 'off', 'import/order': 'error', diff --git a/package.json b/package.json index 2d0915ab87c4..5b759bf35f89 100644 --- a/package.json +++ b/package.json @@ -73,7 +73,7 @@ "strip-ansi": "^6.0.0", "tempy": "^0.5.0", "throat": "^5.0.0", - "typescript": "^3.8.2", + "typescript": "^3.9.2", "which": "^2.0.1" }, "scripts": { diff --git a/packages/babel-plugin-jest-hoist/src/index.ts b/packages/babel-plugin-jest-hoist/src/index.ts index 714154256109..a9cbe1a0f65e 100644 --- a/packages/babel-plugin-jest-hoist/src/index.ts +++ b/packages/babel-plugin-jest-hoist/src/index.ts @@ -113,7 +113,7 @@ FUNCTIONS.mock = args => { const ids: Set> = new Set(); const parentScope = moduleFactory.parentPath.scope; - // @ts-ignore: ReferencedIdentifier is not known on visitors + // @ts-expect-error: ReferencedIdentifier is not known on visitors moduleFactory.traverse(IDVisitor, {ids}); for (const id of ids) { const {name} = id.node; diff --git a/packages/jest-circus/src/__tests__/circusItTestError.test.ts b/packages/jest-circus/src/__tests__/circusItTestError.test.ts index 56e7b8fae366..d2dc7e5de6cf 100644 --- a/packages/jest-circus/src/__tests__/circusItTestError.test.ts +++ b/packages/jest-circus/src/__tests__/circusItTestError.test.ts @@ -29,7 +29,7 @@ describe('test/it error throwing', () => { }); it(`it throws error with missing callback function`, () => { expect(() => { - // @ts-ignore: Easy, we're testing runtime errors here + // @ts-expect-error: Easy, we're testing runtime errors here circusIt('test2'); }).toThrowError( 'Missing second argument. It must be a callback function. Perhaps you want to use `test.todo` for a test placeholder.', @@ -37,13 +37,13 @@ describe('test/it error throwing', () => { }); it(`it throws an error when first argument isn't a string`, () => { expect(() => { - // @ts-ignore: Easy, we're testing runtime errors here + // @ts-expect-error: Easy, we're testing runtime errors here circusIt(() => {}); }).toThrowError('Invalid first argument, () => {}. It must be a string.'); }); it('it throws an error when callback function is not a function', () => { expect(() => { - // @ts-ignore: Easy, we're testing runtime errors here + // @ts-expect-error: Easy, we're testing runtime errors here circusIt('test4', 'test4b'); }).toThrowError( 'Invalid second argument, test4b. It must be a callback function.', @@ -56,7 +56,7 @@ describe('test/it error throwing', () => { }); it(`test throws error with missing callback function`, () => { expect(() => { - // @ts-ignore: Easy, we're testing runtime errors here + // @ts-expect-error: Easy, we're testing runtime errors here circusTest('test6'); }).toThrowError( 'Missing second argument. It must be a callback function. Perhaps you want to use `test.todo` for a test placeholder.', @@ -64,13 +64,13 @@ describe('test/it error throwing', () => { }); it(`test throws an error when first argument isn't a string`, () => { expect(() => { - // @ts-ignore: Easy, we're testing runtime errors here + // @ts-expect-error: Easy, we're testing runtime errors here circusTest(() => {}); }).toThrowError('Invalid first argument, () => {}. It must be a string.'); }); it('test throws an error when callback function is not a function', () => { expect(() => { - // @ts-ignore: Easy, we're testing runtime errors here + // @ts-expect-error: Easy, we're testing runtime errors here circusTest('test8', 'test8b'); }).toThrowError( 'Invalid second argument, test8b. It must be a callback function.', diff --git a/packages/jest-circus/src/__tests__/circusItTodoTestError.test.ts b/packages/jest-circus/src/__tests__/circusItTodoTestError.test.ts index 1eb655de77dd..b783b7b3069a 100644 --- a/packages/jest-circus/src/__tests__/circusItTodoTestError.test.ts +++ b/packages/jest-circus/src/__tests__/circusItTodoTestError.test.ts @@ -22,7 +22,7 @@ aliasCircusIt(); describe('test/it.todo error throwing', () => { it('todo throws error when given no arguments', () => { expect(() => { - // @ts-ignore: Testing runtime errors here + // @ts-expect-error: Testing runtime errors here circusIt.todo(); }).toThrowError('Todo must be called with only a description.'); }); @@ -33,7 +33,7 @@ describe('test/it.todo error throwing', () => { }); it('todo throws error when given none string description', () => { expect(() => { - // @ts-ignore: Testing runtime errors here + // @ts-expect-error: Testing runtime errors here circusIt.todo(() => {}); }).toThrowError('Todo must be called with only a description.'); }); diff --git a/packages/jest-cli/src/__tests__/cli/args.test.ts b/packages/jest-cli/src/__tests__/cli/args.test.ts index 46ff7a7e4aed..6a3808f704c0 100644 --- a/packages/jest-cli/src/__tests__/cli/args.test.ts +++ b/packages/jest-cli/src/__tests__/cli/args.test.ts @@ -101,11 +101,11 @@ describe('check', () => { describe('buildArgv', () => { it('should return only camelcased args ', () => { - // @ts-ignore + // @ts-expect-error const mockProcessArgv = jest .spyOn(process.argv, 'slice') .mockImplementation(() => ['--clear-mocks']); - // @ts-ignore + // @ts-expect-error const actual = buildArgv(null); expect(actual).not.toHaveProperty('clear-mocks'); expect(actual).toHaveProperty('clearMocks', true); diff --git a/packages/jest-cli/src/init/index.ts b/packages/jest-cli/src/init/index.ts index bd7c030b09e3..7a92a29ec0d7 100644 --- a/packages/jest-cli/src/init/index.ts +++ b/packages/jest-cli/src/init/index.ts @@ -108,7 +108,7 @@ export default async ( let promptAborted: boolean = false; - // @ts-ignore: Return type cannot be object - faulty typings + // @ts-expect-error: Return type cannot be object - faulty typings const results: PromptsResults = await prompts(questions, { onCancel: () => { promptAborted = true; diff --git a/packages/jest-config/src/__tests__/getMaxWorkers.test.ts b/packages/jest-config/src/__tests__/getMaxWorkers.test.ts index 443db5ec141b..9710ad4e87ae 100644 --- a/packages/jest-config/src/__tests__/getMaxWorkers.test.ts +++ b/packages/jest-config/src/__tests__/getMaxWorkers.test.ts @@ -39,19 +39,19 @@ describe('getMaxWorkers', () => { describe('% based', () => { it('50% = 2 workers', () => { const argv = {maxWorkers: '50%'}; - // @ts-ignore: need to fix the typing + // @ts-expect-error: need to fix the typing expect(getMaxWorkers(argv)).toBe(2); }); it('< 0 workers should become 1', () => { const argv = {maxWorkers: '1%'}; - // @ts-ignore: need to fix the typing + // @ts-expect-error: need to fix the typing expect(getMaxWorkers(argv)).toBe(1); }); it("0% shouldn't break", () => { const argv = {maxWorkers: '0%'}; - // @ts-ignore: need to fix the typing + // @ts-expect-error: need to fix the typing expect(getMaxWorkers(argv)).toBe(1); }); }); diff --git a/packages/jest-config/src/__tests__/readConfig.test.ts b/packages/jest-config/src/__tests__/readConfig.test.ts index 8566c78423e2..1452e8355171 100644 --- a/packages/jest-config/src/__tests__/readConfig.test.ts +++ b/packages/jest-config/src/__tests__/readConfig.test.ts @@ -10,7 +10,7 @@ import {readConfig} from '../index'; test('readConfig() throws when an object is passed without a file path', async () => { await expect( readConfig( - // @ts-ignore + // @ts-expect-error null /* argv */, {} /* packageRootOrConfig */, false /* skipArgvConfigOption */, diff --git a/packages/jest-config/src/__tests__/readConfigs.test.ts b/packages/jest-config/src/__tests__/readConfigs.test.ts index 97fa1b351bf9..25fc0e33c5a8 100644 --- a/packages/jest-config/src/__tests__/readConfigs.test.ts +++ b/packages/jest-config/src/__tests__/readConfigs.test.ts @@ -19,7 +19,7 @@ jest.mock('../readConfigFileAndSetRootDir', () => jest.fn(() => mockResult)); test('readConfigs() throws when called without project paths', async () => { await expect( - // @ts-ignore + // @ts-expect-error readConfigs(null /* argv */, [] /* projectPaths */), ).rejects.toThrowError('jest: No configuration found for any project.'); }); @@ -29,7 +29,7 @@ test('readConfigs() loads async config file', async () => { rootDir: './', })); await expect( - // @ts-ignore + // @ts-expect-error readConfigs( {} /* argv */, ['./some-jest-config-file.js'] /* projectPaths */, @@ -43,7 +43,7 @@ test('readConfigs() reject if async was rejected', async () => { throw new Error('Some error'); }); await expect( - // @ts-ignore + // @ts-expect-error readConfigs( {} /* argv */, ['./some-jest-config-file.js'] /* projectPaths */, diff --git a/packages/jest-config/src/normalize.ts b/packages/jest-config/src/normalize.ts index 8ec7da7f35a2..9f6f35062759 100644 --- a/packages/jest-config/src/normalize.ts +++ b/packages/jest-config/src/normalize.ts @@ -140,7 +140,7 @@ const setupPreset = ( } } catch (e) {} - // @ts-ignore: `presetModule` can be null? + // @ts-expect-error: `presetModule` can be null? preset = require(presetModule); } catch (error) { if (error instanceof SyntaxError || error instanceof TypeError) { @@ -943,7 +943,7 @@ export default function normalize( }); break; } - // @ts-ignore: automock is missing in GlobalConfig, so what + // @ts-expect-error: automock is missing in GlobalConfig, so what newOptions[key] = value; return newOptions; }, newOptions); diff --git a/packages/jest-config/src/readConfigFileAndSetRootDir.ts b/packages/jest-config/src/readConfigFileAndSetRootDir.ts index 0a4628092eb0..06cbaecc10d6 100644 --- a/packages/jest-config/src/readConfigFileAndSetRootDir.ts +++ b/packages/jest-config/src/readConfigFileAndSetRootDir.ts @@ -9,7 +9,7 @@ import * as path from 'path'; import {pathToFileURL} from 'url'; import * as fs from 'graceful-fs'; import type {Config} from '@jest/types'; -// @ts-ignore: vendored +// @ts-expect-error: vendored import jsonlint from './vendor/jsonlint'; import {JEST_CONFIG_EXT_JSON, PACKAGE_JSON} from './constants'; diff --git a/packages/jest-core/src/watch.ts b/packages/jest-core/src/watch.ts index b1f60c3878b4..77fb88417783 100644 --- a/packages/jest-core/src/watch.ts +++ b/packages/jest-core/src/watch.ts @@ -504,7 +504,7 @@ const getPluginIdentifier = (plugin: WatchPlugin) => // WatchPlugin is an interface, and it is my understanding interface // static fields are not definable anymore, no idea how to circumvent // this :-( - // @ts-ignore: leave `displayName` be. + // @ts-expect-error: leave `displayName` be. plugin.constructor.displayName || plugin.constructor.name; const getPluginKey = ( diff --git a/packages/jest-environment-jsdom/src/__mocks__/index.ts b/packages/jest-environment-jsdom/src/__mocks__/index.ts index c87188636ec8..6f2641dfb719 100644 --- a/packages/jest-environment-jsdom/src/__mocks__/index.ts +++ b/packages/jest-environment-jsdom/src/__mocks__/index.ts @@ -11,7 +11,7 @@ const vm = jest.requireActual('vm'); const JSDOMEnvironment = jest.createMockFromModule('../index') as jest.Mock; JSDOMEnvironment.mockImplementation(function (config) { - // @ts-ignore + // @ts-expect-error this.global = { JSON, console: {}, @@ -19,7 +19,7 @@ JSDOMEnvironment.mockImplementation(function (config) { const globalValues = {...config.globals}; for (const customGlobalKey in globalValues) { - // @ts-ignore + // @ts-expect-error this.global[customGlobalKey] = globalValues[customGlobalKey]; } }); @@ -28,7 +28,7 @@ JSDOMEnvironment.prototype.runSourceText.mockImplementation(function ( sourceText: string, filename: string, ) { - // @ts-ignore + // @ts-expect-error return vm.runInNewContext(sourceText, this.global, { displayErrors: false, filename, diff --git a/packages/jest-environment-jsdom/src/index.ts b/packages/jest-environment-jsdom/src/index.ts index fc30e7e50833..bdd5eec27734 100644 --- a/packages/jest-environment-jsdom/src/index.ts +++ b/packages/jest-environment-jsdom/src/index.ts @@ -38,7 +38,8 @@ class JSDOMEnvironment implements JestEnvironment { virtualConsole: new VirtualConsole().sendTo(options.console || console), ...config.testEnvironmentOptions, }); - const global = (this.global = this.dom.window.document.defaultView as Win); + const global = (this.global = (this.dom.window.document + .defaultView as unknown) as Win); if (!global) { throw new Error('JSDOM did not return a Window object'); @@ -118,7 +119,7 @@ class JSDOMEnvironment implements JestEnvironment { this.global.close(); } this.errorEventListener = null; - // @ts-ignore + // @ts-expect-error this.global = null; this.dom = null; this.fakeTimers = null; diff --git a/packages/jest-environment-node/src/__tests__/node_environment.test.ts b/packages/jest-environment-node/src/__tests__/node_environment.test.ts index 0e760db861e4..3cfb43c6d103 100644 --- a/packages/jest-environment-node/src/__tests__/node_environment.test.ts +++ b/packages/jest-environment-node/src/__tests__/node_environment.test.ts @@ -39,7 +39,7 @@ describe('NodeEnvironment', () => { const timer2 = env1.global.setInterval(() => {}, 0); [timer1, timer2].forEach(timer => { - // @ts-ignore + // @ts-expect-error expect(timer.id).not.toBeUndefined(); expect(typeof timer.ref).toBe('function'); expect(typeof timer.unref).toBe('function'); diff --git a/packages/jest-fake-timers/src/legacyFakeTimers.ts b/packages/jest-fake-timers/src/legacyFakeTimers.ts index f425d4ed1607..6185f77f0c27 100644 --- a/packages/jest-fake-timers/src/legacyFakeTimers.ts +++ b/packages/jest-fake-timers/src/legacyFakeTimers.ts @@ -366,10 +366,11 @@ export default class FakeTimers { private _createMocks() { const fn = (impl: Function) => - // @ts-ignore TODO: figure out better typings here + // @ts-expect-error TODO: figure out better typings here this._moduleMocker.fn().mockImplementation(impl); const promisifiableFakeSetTimeout = fn(this._fakeSetTimeout.bind(this)); + // @ts-expect-error TODO: figure out better typings here promisifiableFakeSetTimeout[util.promisify.custom] = ( delay?: number, arg?: unknown, @@ -382,8 +383,11 @@ export default class FakeTimers { clearInterval: fn(this._fakeClearTimer.bind(this)), clearTimeout: fn(this._fakeClearTimer.bind(this)), nextTick: fn(this._fakeNextTick.bind(this)), + // @ts-expect-error TODO: figure out better typings here setImmediate: fn(this._fakeSetImmediate.bind(this)), + // @ts-expect-error TODO: figure out better typings here setInterval: fn(this._fakeSetInterval.bind(this)), + // @ts-expect-error TODO: figure out better typings here setTimeout: promisifiableFakeSetTimeout, }; } diff --git a/packages/jest-fake-timers/src/modernFakeTimers.ts b/packages/jest-fake-timers/src/modernFakeTimers.ts index b0cd8c479a65..03ca30807a89 100644 --- a/packages/jest-fake-timers/src/modernFakeTimers.ts +++ b/packages/jest-fake-timers/src/modernFakeTimers.ts @@ -81,7 +81,7 @@ export default class FakeTimers { runAllTicks(): void { if (this._checkFakeTimers()) { - // @ts-ignore + // @ts-expect-error this._clock.runMicrotasks(); } } diff --git a/packages/jest-haste-map/src/index.ts b/packages/jest-haste-map/src/index.ts index ef1e420400df..572164a4bbf2 100644 --- a/packages/jest-haste-map/src/index.ts +++ b/packages/jest-haste-map/src/index.ts @@ -26,7 +26,7 @@ import HasteModuleMap, { import nodeCrawl = require('./crawlers/node'); import normalizePathSep from './lib/normalizePathSep'; import watchmanCrawl = require('./crawlers/watchman'); -// @ts-ignore: not converted to TypeScript - it's a fork: https://github.com/facebook/jest/pull/5387 +// @ts-expect-error: not converted to TypeScript - it's a fork: https://github.com/facebook/jest/pull/5387 import WatchmanWatcher from './lib/WatchmanWatcher'; import FSEventsWatcher = require('./lib/FSEventsWatcher'); import * as fastPath from './lib/fast_path'; @@ -513,7 +513,6 @@ class HasteMap extends EventEmitter { error.stack = ''; // Remove stack for stack-less errors. } - // @ts-ignore: checking error code is OK if error comes from "fs". if (!['ENOENT', 'EACCES'].includes(error.code)) { throw error; } @@ -677,9 +676,9 @@ class HasteMap extends EventEmitter { private _cleanup() { const worker = this._worker; - // @ts-ignore + // @ts-expect-error if (worker && typeof worker.end === 'function') { - // @ts-ignore + // @ts-expect-error worker.end(); } @@ -701,7 +700,7 @@ class HasteMap extends EventEmitter { if ((options && options.forceInBand) || this._options.maxWorkers <= 1) { this._worker = {getSha1, worker}; } else { - // @ts-ignore: assignment of a worker with custom properties. + // @ts-expect-error: assignment of a worker with custom properties. this._worker = new Worker(require.resolve('./worker'), { exposedMethods: ['getSha1', 'worker'], maxRetries: 3, @@ -789,7 +788,7 @@ class HasteMap extends EventEmitter { let mustCopy = true; const createWatcher = (root: Config.Path): Promise => { - // @ts-ignore: TODO how? "Cannot use 'new' with an expression whose type lacks a call or construct signature." + // @ts-expect-error: TODO how? "Cannot use 'new' with an expression whose type lacks a call or construct signature." const watcher = new Watcher(root, { dot: false, glob: extensions.map(extension => '**/*.' + extension), @@ -1035,7 +1034,7 @@ class HasteMap extends EventEmitter { } end(): Promise { - // @ts-ignore: TODO TS cannot decide if `setInterval` and `clearInterval` comes from NodeJS or the DOM + // @ts-expect-error: TODO TS cannot decide if `setInterval` and `clearInterval` comes from NodeJS or the DOM clearInterval(this._changeInterval); if (!this._watchers.length) { return Promise.resolve(); diff --git a/packages/jest-haste-map/src/lib/FSEventsWatcher.ts b/packages/jest-haste-map/src/lib/FSEventsWatcher.ts index 5cac36f02133..2cf05da9655b 100644 --- a/packages/jest-haste-map/src/lib/FSEventsWatcher.ts +++ b/packages/jest-haste-map/src/lib/FSEventsWatcher.ts @@ -11,9 +11,10 @@ import {EventEmitter} from 'events'; import * as fs from 'graceful-fs'; import anymatch, {Matcher} from 'anymatch'; import micromatch = require('micromatch'); -// @ts-ignore no types +// @ts-expect-error no types import walker from 'walker'; +// eslint-disable-next-line @typescript-eslint/prefer-ts-expect-error // @ts-ignore: this is for CI which runs linux and might not have this let fsevents: typeof import('fsevents') | null = null; try { diff --git a/packages/jest-jasmine2/src/__tests__/Suite.test.ts b/packages/jest-jasmine2/src/__tests__/Suite.test.ts index e8323ea2e589..caf44ac93ffa 100644 --- a/packages/jest-jasmine2/src/__tests__/Suite.test.ts +++ b/packages/jest-jasmine2/src/__tests__/Suite.test.ts @@ -19,7 +19,7 @@ describe('Suite', () => { it("doesn't throw on addExpectationResult when there are no children", () => { expect(() => { - // @ts-ignore + // @ts-expect-error suite.addExpectationResult(); }).not.toThrow(); }); diff --git a/packages/jest-jasmine2/src/__tests__/itTestError.test.ts b/packages/jest-jasmine2/src/__tests__/itTestError.test.ts index e230949e8f28..2c37efeab2c8 100644 --- a/packages/jest-jasmine2/src/__tests__/itTestError.test.ts +++ b/packages/jest-jasmine2/src/__tests__/itTestError.test.ts @@ -16,13 +16,13 @@ describe('test/it error throwing', () => { }); it(`it throws an error when first argument isn't a string`, () => { expect(() => { - // @ts-ignore + // @ts-expect-error it(() => {}); }).toThrowError(`Invalid first argument, () => {}. It must be a string.`); }); it('it throws an error when callback function is not a function', () => { expect(() => { - // @ts-ignore + // @ts-expect-error it('test3', 'test3b'); }).toThrowError( 'Invalid second argument, test3b. It must be a callback function.', @@ -37,13 +37,13 @@ describe('test/it error throwing', () => { }); test(`test throws an error when first argument isn't a string`, () => { expect(() => { - // @ts-ignore + // @ts-expect-error test(() => {}); }).toThrowError(`Invalid first argument, () => {}. It must be a string.`); }); test('test throws an error when callback function is not a function', () => { expect(() => { - // @ts-ignore + // @ts-expect-error test('test6', 'test6b'); }).toThrowError( 'Invalid second argument, test6b. It must be a callback function.', diff --git a/packages/jest-jasmine2/src/__tests__/queueRunner.test.ts b/packages/jest-jasmine2/src/__tests__/queueRunner.test.ts index 325c41042e0e..9cbf1570dac4 100644 --- a/packages/jest-jasmine2/src/__tests__/queueRunner.test.ts +++ b/packages/jest-jasmine2/src/__tests__/queueRunner.test.ts @@ -26,7 +26,7 @@ describe('queueRunner', () => { ], setTimeout, }; - // @ts-ignore + // @ts-expect-error await queueRunner(options); expect(fnOne).toHaveBeenCalled(); expect(fnTwo).toHaveBeenCalled(); @@ -50,7 +50,7 @@ describe('queueRunner', () => { ], setTimeout, }; - // @ts-ignore + // @ts-expect-error await queueRunner(options); expect(fnOne).toHaveBeenCalled(); expect(fail).toHaveBeenCalled(); @@ -79,7 +79,7 @@ describe('queueRunner', () => { ], setTimeout, }; - // @ts-ignore + // @ts-expect-error await queueRunner(options); expect(fnOne).toHaveBeenCalled(); expect(onException).toHaveBeenCalledWith(error); @@ -107,7 +107,7 @@ describe('queueRunner', () => { ], setTimeout, }; - // @ts-ignore + // @ts-expect-error await queueRunner(options); expect(fnOne).toHaveBeenCalled(); expect(onException).toHaveBeenCalled(); @@ -127,7 +127,7 @@ describe('queueRunner', () => { queueableFns: [{fn: failFn}], setTimeout, }; - // @ts-ignore + // @ts-expect-error await queueRunner(options); expect(options.fail).toHaveBeenCalledWith('miserably', 'failed'); @@ -152,7 +152,7 @@ describe('queueRunner', () => { ], setTimeout, }; - // @ts-ignore + // @ts-expect-error await queueRunner(options); expect(fnOne).toHaveBeenCalled(); expect(fail).toHaveBeenCalledWith(error); diff --git a/packages/jest-jasmine2/src/__tests__/reporter.test.ts b/packages/jest-jasmine2/src/__tests__/reporter.test.ts index 4e92f9b9cf4a..4bd50777fcc1 100644 --- a/packages/jest-jasmine2/src/__tests__/reporter.test.ts +++ b/packages/jest-jasmine2/src/__tests__/reporter.test.ts @@ -14,7 +14,7 @@ describe('Jasmine2Reporter', () => { let reporter: JasmineReporter; beforeEach(() => { - // @ts-ignore + // @ts-expect-error reporter = new JasmineReporter({}); }); @@ -28,11 +28,11 @@ describe('Jasmine2Reporter', () => { reporter.suiteStarted({description: 'parent'} as SuiteResult); reporter.suiteStarted({description: 'child'} as SuiteResult); reporter.specDone(makeSpec('spec 1')); - // @ts-ignore + // @ts-expect-error reporter.suiteDone(); reporter.suiteStarted({description: 'child 2'} as SuiteResult); reporter.specDone(makeSpec('spec 2')); - // @ts-ignore + // @ts-expect-error reporter.jasmineDone(); return reporter.getResults().then(runResults => { diff --git a/packages/jest-jasmine2/src/__tests__/todoError.test.ts b/packages/jest-jasmine2/src/__tests__/todoError.test.ts index 758cfda9140e..aab30f522aca 100644 --- a/packages/jest-jasmine2/src/__tests__/todoError.test.ts +++ b/packages/jest-jasmine2/src/__tests__/todoError.test.ts @@ -9,7 +9,7 @@ describe('test/it.todo error throwing', () => { it('it throws error when given no arguments', () => { expect(() => { - // @ts-ignore + // @ts-expect-error it.todo(); }).toThrowError('Todo must be called with only a description.'); }); @@ -20,7 +20,7 @@ describe('test/it.todo error throwing', () => { }); it('it throws error when given none string description', () => { expect(() => { - // @ts-ignore + // @ts-expect-error it.todo(() => {}); }).toThrowError('Todo must be called with only a description.'); }); diff --git a/packages/jest-jasmine2/src/errorOnPrivate.ts b/packages/jest-jasmine2/src/errorOnPrivate.ts index b619dba153f9..0df3568af49a 100644 --- a/packages/jest-jasmine2/src/errorOnPrivate.ts +++ b/packages/jest-jasmine2/src/errorOnPrivate.ts @@ -53,7 +53,7 @@ export function installErrorOnPrivate(global: Global.Global): void { (Object.keys(disabledJasmineMethods) as Array< DisabledJasmineMethodsKeys >).forEach(methodName => { - // @ts-ignore + // @ts-expect-error jasmine[methodName] = () => { throwAtFunction(disabledJasmineMethods[methodName], jasmine[methodName]); }; diff --git a/packages/jest-jasmine2/src/index.ts b/packages/jest-jasmine2/src/index.ts index 8d77212ba5ba..7c081b7846b1 100644 --- a/packages/jest-jasmine2/src/index.ts +++ b/packages/jest-jasmine2/src/index.ts @@ -52,7 +52,7 @@ async function jasmine2( const stack = getCallsite(1, runtime.getSourceMaps()); const it = originalIt(...args); - // @ts-ignore + // @ts-expect-error it.result.__callsite = stack; return it; @@ -63,7 +63,7 @@ async function jasmine2( const stack = getCallsite(1, runtime.getSourceMaps()); const xit = originalXit(...args); - // @ts-ignore + // @ts-expect-error xit.result.__callsite = stack; return xit; @@ -74,7 +74,7 @@ async function jasmine2( const stack = getCallsite(1, runtime.getSourceMaps()); const fit = originalFit(...args); - // @ts-ignore + // @ts-expect-error fit.result.__callsite = stack; return fit; diff --git a/packages/jest-jasmine2/src/jasmine/Env.ts b/packages/jest-jasmine2/src/jasmine/Env.ts index a94173a7321f..cc2acc3eee6a 100644 --- a/packages/jest-jasmine2/src/jasmine/Env.ts +++ b/packages/jest-jasmine2/src/jasmine/Env.ts @@ -384,7 +384,7 @@ export default function (j$: Jasmine) { suite.pend(); } if (currentDeclarationSuite.markedTodo) { - // @ts-ignore TODO Possible error: Suite does not have todo method + // @ts-expect-error TODO Possible error: Suite does not have todo method suite.todo(); } addSpecsToSuite(suite, specDefinitions); @@ -664,7 +664,7 @@ export default function (j$: Jasmine) { (error && error.name === AssertionError.name) ) { checkIsError = false; - // @ts-ignore TODO Possible error: j$.Spec does not have expand property + // @ts-expect-error TODO Possible error: j$.Spec does not have expand property message = assertionErrorMessage(error, {expand: j$.Spec.expand}); } else { const check = isError(error); diff --git a/packages/jest-jasmine2/src/jasmine/ReportDispatcher.ts b/packages/jest-jasmine2/src/jasmine/ReportDispatcher.ts index a4548b69b212..7995d25424d5 100644 --- a/packages/jest-jasmine2/src/jasmine/ReportDispatcher.ts +++ b/packages/jest-jasmine2/src/jasmine/ReportDispatcher.ts @@ -37,17 +37,17 @@ export default class ReportDispatcher implements Reporter { provideFallbackReporter: (reporter: Reporter) => void; clearReporters: () => void; - // @ts-ignore + // @ts-expect-error jasmineDone: (runDetails: RunDetails) => void; - // @ts-ignore + // @ts-expect-error jasmineStarted: (runDetails: RunDetails) => void; - // @ts-ignore + // @ts-expect-error specDone: (result: SpecResult) => void; - // @ts-ignore + // @ts-expect-error specStarted: (spec: SpecResult) => void; - // @ts-ignore + // @ts-expect-error suiteDone: (result: SuiteResult) => void; - // @ts-ignore + // @ts-expect-error suiteStarted: (result: SuiteResult) => void; constructor(methods: Array) { @@ -86,7 +86,7 @@ export default class ReportDispatcher implements Reporter { for (let i = 0; i < reporters.length; i++) { const reporter = reporters[i]; if (reporter[method]) { - // @ts-ignore + // @ts-expect-error reporter[method].apply(reporter, args); } } diff --git a/packages/jest-jasmine2/src/jasmine/Spec.ts b/packages/jest-jasmine2/src/jasmine/Spec.ts index a8d4e53a5685..8f0bcdfe5db4 100644 --- a/packages/jest-jasmine2/src/jasmine/Spec.ts +++ b/packages/jest-jasmine2/src/jasmine/Spec.ts @@ -142,7 +142,7 @@ export default class Spec { this.queueableFn.initError = this.initError; - // @ts-ignore + // @ts-expect-error this.result = { id: this.id, description: this.description, @@ -192,7 +192,7 @@ export default class Spec { this.currentRun = this.queueRunnerFactory({ queueableFns: allFns, onException() { - // @ts-ignore + // @ts-expect-error self.onException.apply(self, arguments); }, userContext: this.userContext(), diff --git a/packages/jest-jasmine2/src/jestExpect.ts b/packages/jest-jasmine2/src/jestExpect.ts index 6d8cf5a9cb63..e0495cb9f0b7 100644 --- a/packages/jest-jasmine2/src/jestExpect.ts +++ b/packages/jest-jasmine2/src/jestExpect.ts @@ -59,12 +59,12 @@ export default (config: {expand: boolean}): void => { return this.isNot ? negativeCompare.apply( null, - // @ts-ignore + // @ts-expect-error args, ) : result.compare.apply( null, - // @ts-ignore + // @ts-expect-error args, ); }; diff --git a/packages/jest-jasmine2/src/queueRunner.ts b/packages/jest-jasmine2/src/queueRunner.ts index c57130a201cb..21af10a51de6 100644 --- a/packages/jest-jasmine2/src/queueRunner.ts +++ b/packages/jest-jasmine2/src/queueRunner.ts @@ -6,7 +6,7 @@ */ import {formatTime} from 'jest-util'; -// @ts-ignore ignore vendor file +// @ts-expect-error ignore vendor file import PCancelable from './PCancelable'; import pTimeout from './pTimeout'; diff --git a/packages/jest-leak-detector/src/__tests__/index.test.ts b/packages/jest-leak-detector/src/__tests__/index.test.ts index 1d8f0c6f0896..e5833ccf3acd 100644 --- a/packages/jest-leak-detector/src/__tests__/index.test.ts +++ b/packages/jest-leak-detector/src/__tests__/index.test.ts @@ -31,7 +31,7 @@ it('complains if the value is a primitive', () => { it('does not show the GC if hidden', async () => { const detector = new LeakDetector({}); - // @ts-ignore: purposefully removed + // @ts-expect-error: purposefully removed global.gc = undefined; await detector.isLeaking(); expect(global.gc).not.toBeDefined(); diff --git a/packages/jest-matcher-utils/src/__tests__/index.test.ts b/packages/jest-matcher-utils/src/__tests__/index.test.ts index 2afa9f79de62..96412e07d461 100644 --- a/packages/jest-matcher-utils/src/__tests__/index.test.ts +++ b/packages/jest-matcher-utils/src/__tests__/index.test.ts @@ -105,12 +105,12 @@ describe('stringify()', () => { describe('ensureNumbers()', () => { test('dont throw error when variables are numbers', () => { expect(() => { - // @ts-ignore + // @ts-expect-error ensureNumbers(1, 2); }).not.toThrow(); if (isBigIntDefined) { expect(() => { - // @ts-ignore + // @ts-expect-error ensureNumbers(BigInt(1), BigInt(2)); }).not.toThrow(); } @@ -118,14 +118,14 @@ describe('ensureNumbers()', () => { test('throws error when expected is not a number (backward compatibility)', () => { expect(() => { - // @ts-ignore + // @ts-expect-error ensureNumbers(1, 'not_a_number', '.toBeCloseTo'); }).toThrowErrorMatchingSnapshot(); }); test('throws error when received is not a number (backward compatibility)', () => { expect(() => { - // @ts-ignore + // @ts-expect-error ensureNumbers('not_a_number', 3, '.toBeCloseTo'); }).toThrowErrorMatchingSnapshot(); }); @@ -140,7 +140,7 @@ describe('ensureNumbers()', () => { secondArgument: 'precision', }; expect(() => { - // @ts-ignore + // @ts-expect-error ensureNumbers('', 0, matcherName, options); }).toThrowErrorMatchingSnapshot(); }); @@ -151,7 +151,7 @@ describe('ensureNumbers()', () => { // promise undefined is equivalent to empty string }; expect(() => { - // @ts-ignore + // @ts-expect-error ensureNumbers(0.1, undefined, matcherName, options); }).toThrowErrorMatchingSnapshot(); }); @@ -162,7 +162,7 @@ describe('ensureNumbers()', () => { promise: 'rejects', }; expect(() => { - // @ts-ignore + // @ts-expect-error ensureNumbers(0.01, '0', matcherName, options); }).toThrowErrorMatchingSnapshot(); }); @@ -173,7 +173,7 @@ describe('ensureNumbers()', () => { promise: 'rejects', }; expect(() => { - // @ts-ignore + // @ts-expect-error ensureNumbers(Symbol('0.1'), 0, matcherName, options); }).toThrowErrorMatchingSnapshot(); }); @@ -184,7 +184,7 @@ describe('ensureNumbers()', () => { promise: 'resolves', }; expect(() => { - // @ts-ignore + // @ts-expect-error ensureNumbers(false, 0, matcherName, options); }).toThrowErrorMatchingSnapshot(); }); @@ -195,7 +195,7 @@ describe('ensureNumbers()', () => { promise: 'resolves', }; expect(() => { - // @ts-ignore + // @ts-expect-error ensureNumbers(0.1, null, matcherName, options); }).toThrowErrorMatchingSnapshot(); }); @@ -205,7 +205,7 @@ describe('ensureNumbers()', () => { describe('ensureNoExpected()', () => { test('dont throw error when undefined', () => { expect(() => { - // @ts-ignore + // @ts-expect-error ensureNoExpected(undefined); }).not.toThrow(); }); diff --git a/packages/jest-mock/src/index.ts b/packages/jest-mock/src/index.ts index a72847029b0d..7251b0a9ec02 100644 --- a/packages/jest-mock/src/index.ts +++ b/packages/jest-mock/src/index.ts @@ -417,7 +417,6 @@ class ModuleMockerClass { if (!isReadonlyProp(object, prop)) { const propDesc = Object.getOwnPropertyDescriptor(object, prop); - // @ts-ignore Object.__esModule if ((propDesc !== undefined && !propDesc.get) || object.__esModule) { slots.add(prop); } @@ -566,11 +565,11 @@ class ModuleMockerClass { // it easier to interact with mock instance call and // return values if (prototype[slot].type === 'function') { - // @ts-ignore no index signature + // @ts-expect-error no index signature const protoImpl = this[slot]; - // @ts-ignore no index signature + // @ts-expect-error no index signature this[slot] = mocker.generateFromMetadata(prototype[slot]); - // @ts-ignore no index signature + // @ts-expect-error no index signature this[slot]._protoImpl = protoImpl; } }); @@ -795,7 +794,7 @@ class ModuleMockerClass { ): Mock { // metadata not compatible but it's the same type, maybe problem with // overloading of _makeComponent and not _generateMock? - // @ts-ignore + // @ts-expect-error const mock = this._makeComponent(metadata); if (metadata.refID != null) { refs[metadata.refID] = mock; @@ -823,7 +822,7 @@ class ModuleMockerClass { mock.prototype.constructor = mock; } - return mock; + return mock as Mock; } /** @@ -870,11 +869,11 @@ class ModuleMockerClass { metadata.value = component; return metadata; } else if (type === 'function') { - // @ts-ignore this is a function so it has a name + // @ts-expect-error this is a function so it has a name metadata.name = component.name; - // @ts-ignore may be a mock + // @ts-expect-error may be a mock if (component._isMockFunction === true) { - // @ts-ignore may be a mock + // @ts-expect-error may be a mock metadata.mockImpl = component.getMockImplementation(); } } @@ -890,13 +889,13 @@ class ModuleMockerClass { this._getSlots(component).forEach(slot => { if ( type === 'function' && - // @ts-ignore may be a mock + // @ts-expect-error may be a mock component._isMockFunction === true && slot.match(/^mock/) ) { return; } - // @ts-ignore no index signature + // @ts-expect-error no index signature const slotMetadata = this.getMetadata(component[slot], refs); if (slotMetadata) { if (!members) { @@ -978,7 +977,7 @@ class ModuleMockerClass { const isMethodOwner = object.hasOwnProperty(methodName); - // @ts-ignore overriding original method with a Mock + // @ts-expect-error overriding original method with a Mock object[methodName] = this._makeComponent({type: 'function'}, () => { if (isMethodOwner) { object[methodName] = original; @@ -987,7 +986,7 @@ class ModuleMockerClass { } }); - // @ts-ignore original method is now a Mock + // @ts-expect-error original method is now a Mock object[methodName].mockImplementation(function (this: unknown) { return original.apply(this, arguments); }); @@ -1052,9 +1051,9 @@ class ModuleMockerClass { ); } - // @ts-ignore: mock is assignable + // @ts-expect-error: mock is assignable descriptor[accessType] = this._makeComponent({type: 'function'}, () => { - // @ts-ignore: mock is assignable + // @ts-expect-error: mock is assignable descriptor![accessType] = original; Object.defineProperty(obj, propertyName, descriptor!); }); @@ -1062,7 +1061,7 @@ class ModuleMockerClass { (descriptor[accessType] as Mock).mockImplementation(function ( this: unknown, ) { - // @ts-ignore + // @ts-expect-error return original.apply(this, arguments); }); } diff --git a/packages/jest-repl/src/cli/index.ts b/packages/jest-repl/src/cli/index.ts index 94728bc9d1b1..9d027435023c 100644 --- a/packages/jest-repl/src/cli/index.ts +++ b/packages/jest-repl/src/cli/index.ts @@ -21,7 +21,6 @@ const REPL_SCRIPT = require.resolve('./repl.js'); export = function (): void { const argv = yargs.usage(args.usage).options(args.options).argv; - // @ts-ignore: fix this at some point validateCLIOptions(argv, {...args.options, deprecationEntries}); argv._ = [REPL_SCRIPT]; diff --git a/packages/jest-reporters/src/coverage_reporter.ts b/packages/jest-reporters/src/coverage_reporter.ts index 5966bdde9600..7b4ded54abe5 100644 --- a/packages/jest-reporters/src/coverage_reporter.ts +++ b/packages/jest-reporters/src/coverage_reporter.ts @@ -96,10 +96,9 @@ export default class CoverageReporter extends BaseReporter { maxCols: process.stdout.columns || Infinity, ...additionalOptions, }) - // @ts-ignore + // @ts-expect-error .execute(reportContext); }); - // @ts-ignore aggregatedResults.coverageMap = map; } catch (e) { console.error( @@ -111,7 +110,6 @@ export default class CoverageReporter extends BaseReporter { ); } - // @ts-ignore this._checkThreshold(map); } @@ -487,19 +485,13 @@ export default class CoverageReporter extends BaseReporter { } const map = await this._sourceMapStore.transformCoverage(this._coverageMap); - const reportContext = istanbulReport.createContext( - // @ts-ignore - { - // @ts-ignore - coverageMap: map, - dir: this._globalConfig.coverageDirectory, - // @ts-ignore - sourceFinder: this._sourceMapStore.sourceFinder, - watermarks: getWatermarks(this._globalConfig), - }, - ); + const reportContext = istanbulReport.createContext({ + coverageMap: map, + dir: this._globalConfig.coverageDirectory, + sourceFinder: this._sourceMapStore.sourceFinder, + watermarks: getWatermarks(this._globalConfig), + }); - // @ts-ignore return {map, reportContext}; } } diff --git a/packages/jest-reporters/src/notify_reporter.ts b/packages/jest-reporters/src/notify_reporter.ts index 2fda318987d3..f6186f078ca9 100644 --- a/packages/jest-reporters/src/notify_reporter.ts +++ b/packages/jest-reporters/src/notify_reporter.ts @@ -79,7 +79,6 @@ export default class NotifyReporter extends BaseReporter { result.numPassedTests, )} passed`; - // @ts-ignore: https://github.com/DefinitelyTyped/DefinitelyTyped/pull/42303 this._notifier.notify({icon, message, timeout: false, title}); } else if ( testsHaveRun && @@ -108,7 +107,6 @@ export default class NotifyReporter extends BaseReporter { const quitAnswer = 'Exit tests'; if (!watchMode) { - // @ts-ignore: https://github.com/DefinitelyTyped/DefinitelyTyped/pull/42303 this._notifier.notify({icon, message, timeout: false, title}); } else { this._notifier.notify( diff --git a/packages/jest-resolve/src/__tests__/resolve.test.ts b/packages/jest-resolve/src/__tests__/resolve.test.ts index 6ecefafd513d..c7d985a0b523 100644 --- a/packages/jest-resolve/src/__tests__/resolve.test.ts +++ b/packages/jest-resolve/src/__tests__/resolve.test.ts @@ -10,7 +10,7 @@ import * as path from 'path'; import * as fs from 'graceful-fs'; import {ModuleMap} from 'jest-haste-map'; import Resolver = require('../'); -// @ts-ignore: js file +// @ts-expect-error: js file import userResolver from '../__mocks__/userResolver'; import nodeModulesPaths from '../nodeModulesPaths'; import defaultResolver from '../defaultResolver'; diff --git a/packages/jest-resolve/src/defaultResolver.ts b/packages/jest-resolve/src/defaultResolver.ts index be1e6cabb1a7..b62270dab5c3 100644 --- a/packages/jest-resolve/src/defaultResolver.ts +++ b/packages/jest-resolve/src/defaultResolver.ts @@ -25,7 +25,7 @@ export default function defaultResolver( path: Config.Path, options: ResolverOptions, ): Config.Path { - // @ts-ignore: the "pnp" version named isn't in DefinitelyTyped + // @ts-expect-error: the "pnp" version named isn't in DefinitelyTyped if (process.versions.pnp) { return pnpResolver(path, options); } diff --git a/packages/jest-resolve/src/index.ts b/packages/jest-resolve/src/index.ts index b678dabbe3dc..42d4bf44afca 100644 --- a/packages/jest-resolve/src/index.ts +++ b/packages/jest-resolve/src/index.ts @@ -192,7 +192,7 @@ class Resolver { }); if (!skipResolution) { - // @ts-ignore: the "pnp" version named isn't in DefinitelyTyped + // @ts-expect-error: the "pnp" version named isn't in DefinitelyTyped module = resolveNodeModule(moduleName, Boolean(process.versions.pnp)); if (module) { diff --git a/packages/jest-resolve/src/isBuiltinModule.ts b/packages/jest-resolve/src/isBuiltinModule.ts index 4df97846acab..63e16aeb59a1 100644 --- a/packages/jest-resolve/src/isBuiltinModule.ts +++ b/packages/jest-resolve/src/isBuiltinModule.ts @@ -7,7 +7,7 @@ import module = require('module'); -// @ts-ignore: "private" api +// "private" api declare const process: { binding(type: string): {}; }; diff --git a/packages/jest-resolve/src/shouldLoadAsEsm.ts b/packages/jest-resolve/src/shouldLoadAsEsm.ts index a1938e70d5e6..cab7b850eae6 100644 --- a/packages/jest-resolve/src/shouldLoadAsEsm.ts +++ b/packages/jest-resolve/src/shouldLoadAsEsm.ts @@ -6,7 +6,7 @@ */ import {dirname, extname} from 'path'; -// @ts-ignore: experimental, not added to the types +// @ts-expect-error: experimental, not added to the types import {SyntheticModule} from 'vm'; import type {Config} from '@jest/types'; import readPkgUp = require('read-pkg-up'); diff --git a/packages/jest-runner/src/runTest.ts b/packages/jest-runner/src/runTest.ts index 7abfdf81729c..deb20ff7d7ec 100644 --- a/packages/jest-runner/src/runTest.ts +++ b/packages/jest-runner/src/runTest.ts @@ -38,7 +38,7 @@ function freezeConsole( testConsole: BufferedConsole | CustomConsole | NullConsole, config: Config.ProjectConfig, ) { - // @ts-ignore: `_log` is `private` - we should figure out some proper API here + // @ts-expect-error: `_log` is `private` - we should figure out some proper API here testConsole._log = function fakeConsolePush( _type: LogType, message: LogMessage, diff --git a/packages/jest-runtime/src/index.ts b/packages/jest-runtime/src/index.ts index aaacea67f06f..47d66dbae539 100644 --- a/packages/jest-runtime/src/index.ts +++ b/packages/jest-runtime/src/index.ts @@ -9,12 +9,12 @@ import {URL, fileURLToPath, pathToFileURL} from 'url'; import * as path from 'path'; import { Script, - // @ts-ignore: experimental, not added to the types + // @ts-expect-error: experimental, not added to the types SourceTextModule, - // @ts-ignore: experimental, not added to the types + // @ts-expect-error: experimental, not added to the types SyntheticModule, Context as VMContext, - // @ts-ignore: experimental, not added to the types + // @ts-expect-error: experimental, not added to the types Module as VMModule, compileFunction, } from 'vm'; @@ -450,7 +450,7 @@ class Runtime { const module = new SyntheticModule( ['default'], function () { - // @ts-ignore: TS doesn't know what `this` is + // @ts-expect-error: TS doesn't know what `this` is this.setExport('default', cjs); }, {context, identifier: modulePath}, @@ -686,7 +686,7 @@ class Runtime { requireModuleOrMock(from: Config.Path, moduleName: string): T { // this module is unmockable if (moduleName === '@jest/globals') { - // @ts-ignore: we don't care that it's not assignable to T + // @ts-expect-error: we don't care that it's not assignable to T return this.getGlobalsForCjs(from); } @@ -1112,10 +1112,10 @@ class Runtime { return new SyntheticModule( ['default', ...Object.keys(required)], function () { - // @ts-ignore: TS doesn't know what `this` is + // @ts-expect-error: TS doesn't know what `this` is this.setExport('default', required); Object.entries(required).forEach(([key, value]) => { - // @ts-ignore: TS doesn't know what `this` is + // @ts-expect-error: TS doesn't know what `this` is this.setExport(key, value); }); }, @@ -1141,7 +1141,7 @@ class Runtime { const error = new TypeError( `The argument 'filename' must be a file URL object, file URL string, or absolute path string. Received '${filename}'`, ); - // @ts-ignore + // @ts-expect-error error.code = 'ERR_INVALID_ARG_TYPE'; throw error; } @@ -1159,7 +1159,7 @@ class Runtime { class Module extends nativeModule.Module {} Object.entries(nativeModule.Module).forEach(([key, value]) => { - // @ts-ignore + // @ts-expect-error Module[key] = value; }); @@ -1180,7 +1180,7 @@ class Runtime { : '' }`, ); - // @ts-ignore + // @ts-expect-error error.code = 'ERR_INVALID_ARG_TYPE'; throw error; } @@ -1458,14 +1458,14 @@ class Runtime { if (this._environment.global.jasmine) { this._environment.global.jasmine._DEFAULT_TIMEOUT_INTERVAL = timeout; } else { - // @ts-ignore: https://github.com/Microsoft/TypeScript/issues/24587 + // @ts-expect-error: https://github.com/Microsoft/TypeScript/issues/24587 this._environment.global[testTimeoutSymbol] = timeout; } return jestObject; }; const retryTimes = (numTestRetries: number) => { - // @ts-ignore: https://github.com/Microsoft/TypeScript/issues/24587 + // @ts-expect-error: https://github.com/Microsoft/TypeScript/issues/24587 this._environment.global[retryTimesSymbol] = numTestRetries; return jestObject; }; @@ -1638,7 +1638,7 @@ class Runtime { Object.keys(globals), function () { Object.entries(globals).forEach(([key, value]) => { - // @ts-ignore: TS doesn't know what `this` is + // @ts-expect-error: TS doesn't know what `this` is this.setExport(key, value); }); }, diff --git a/packages/jest-serializer/src/__tests__/index.test.ts b/packages/jest-serializer/src/__tests__/index.test.ts index 45a6951315a8..174e3de5067c 100644 --- a/packages/jest-serializer/src/__tests__/index.test.ts +++ b/packages/jest-serializer/src/__tests__/index.test.ts @@ -19,7 +19,7 @@ const objs = [ {key1: 'foo', key2: 'bar', key3: {array: [null, {}]}}, {minusInf: -Infinity, nan: NaN, plusInf: +Infinity}, {date: new Date(1234567890), re: /foo/gi}, - // @ts-ignore - testing NaN + // @ts-expect-error - testing NaN { map: new Map([ [NaN, 4], diff --git a/packages/jest-snapshot/src/State.ts b/packages/jest-snapshot/src/State.ts index 8cdfd52b817b..24fbbee262f5 100644 --- a/packages/jest-snapshot/src/State.ts +++ b/packages/jest-snapshot/src/State.ts @@ -54,7 +54,7 @@ type SaveStatus = { export default class SnapshotState { private _counters: Map; private _dirty: boolean; - // @ts-ignore + // @ts-expect-error private _index: number; private _updateSnapshot: Config.SnapshotUpdateState; private _snapshotData: SnapshotData; diff --git a/packages/jest-snapshot/src/__tests__/utils.test.ts b/packages/jest-snapshot/src/__tests__/utils.test.ts index d84e9358866b..4e7816161d23 100644 --- a/packages/jest-snapshot/src/__tests__/utils.test.ts +++ b/packages/jest-snapshot/src/__tests__/utils.test.ts @@ -179,7 +179,7 @@ test('escaping', () => { 'exports[`key`] = `"\'\\\\`;\n', ); - // @ts-ignore + // @ts-expect-error const exports = {}; // eslint-disable-line @typescript-eslint/no-unused-vars // eslint-disable-next-line no-eval const readData = eval('var exports = {}; ' + writtenData + ' exports'); diff --git a/packages/jest-source-map/src/__tests__/getCallsite.test.ts b/packages/jest-source-map/src/__tests__/getCallsite.test.ts index 1eecf64fb65e..7ddf40b4a51b 100644 --- a/packages/jest-source-map/src/__tests__/getCallsite.test.ts +++ b/packages/jest-source-map/src/__tests__/getCallsite.test.ts @@ -44,7 +44,7 @@ describe('getCallsite', () => { const sourceMapColumn = 1; const sourceMapLine = 2; - // @ts-ignore + // @ts-expect-error SourceMap.SourceMapConsumer = class { originalPositionFor(params: Record) { expect(params).toMatchObject({ diff --git a/packages/jest-source-map/src/getCallsite.ts b/packages/jest-source-map/src/getCallsite.ts index ecb903d7729e..863ce4327f94 100644 --- a/packages/jest-source-map/src/getCallsite.ts +++ b/packages/jest-source-map/src/getCallsite.ts @@ -57,7 +57,7 @@ export default ( if (sourceMapFileName) { try { const sourceMap = readFileSync(sourceMapFileName, 'utf8'); - // @ts-ignore: Not allowed to pass string + // @ts-expect-error: Not allowed to pass string addSourceMapConsumer(stack, new SourceMapConsumer(sourceMap)); } catch (e) { // ignore diff --git a/packages/jest-test-result/src/__tests__/formatTestResults.test.ts b/packages/jest-test-result/src/__tests__/formatTestResults.test.ts index 523d79b34d7c..3b448597d90c 100644 --- a/packages/jest-test-result/src/__tests__/formatTestResults.test.ts +++ b/packages/jest-test-result/src/__tests__/formatTestResults.test.ts @@ -20,7 +20,7 @@ describe('formatTestResults', () => { { numFailingTests: 0, perfStats: {end: 2, start: 1}, - // @ts-ignore + // @ts-expect-error testResults: [assertion], }, ], diff --git a/packages/jest-transform/src/ScriptTransformer.ts b/packages/jest-transform/src/ScriptTransformer.ts index 0cf17915da3c..7e12631195ab 100644 --- a/packages/jest-transform/src/ScriptTransformer.ts +++ b/packages/jest-transform/src/ScriptTransformer.ts @@ -16,7 +16,7 @@ import { } from 'jest-util'; import * as fs from 'graceful-fs'; import {transformSync as babelTransform} from '@babel/core'; -// @ts-ignore: should just be `require.resolve`, but the tests mess that up +// @ts-expect-error: should just be `require.resolve`, but the tests mess that up import babelPluginIstanbul from 'babel-plugin-istanbul'; import {fromSource as sourcemapFromSource} from 'convert-source-map'; import HasteMap = require('jest-haste-map'); @@ -563,7 +563,7 @@ export default class ScriptTransformer { /** * @deprecated use `this.shouldTransform` instead */ - // @ts-ignore: Unused and private - remove in Jest 25 + // @ts-expect-error: Unused and private - remove in Jest 25 private _shouldTransform(filename: Config.Path): boolean { return this.shouldTransform(filename); } diff --git a/packages/jest-util/src/__tests__/createProcessObject.test.ts b/packages/jest-util/src/__tests__/createProcessObject.test.ts index c1658f793983..670e4f66b386 100644 --- a/packages/jest-util/src/__tests__/createProcessObject.test.ts +++ b/packages/jest-util/src/__tests__/createProcessObject.test.ts @@ -26,9 +26,9 @@ it('creates a process object that looks like the original one', () => { // "_events" property is checked to ensure event emitter properties are // properly copied. ['argv', 'env', '_events'].forEach(key => { - // @ts-ignore + // @ts-expect-error expect(fakeProcess[key]).toEqual(process[key]); - // @ts-ignore + // @ts-expect-error expect(fakeProcess[key]).not.toBe(process[key]); }); @@ -47,7 +47,7 @@ it('checks that process.env works as expected on Linux platforms', () => { // Existing properties inside process.env are copied to the fake environment. process.env.PROP_STRING = 'foo'; - // @ts-ignore + // @ts-expect-error process.env.PROP_NUMBER = 3; process.env.PROP_UNDEFINED = undefined; diff --git a/packages/jest-util/src/__tests__/deepCyclicCopy.test.ts b/packages/jest-util/src/__tests__/deepCyclicCopy.test.ts index 926bbd540da3..71ac408dec55 100644 --- a/packages/jest-util/src/__tests__/deepCyclicCopy.test.ts +++ b/packages/jest-util/src/__tests__/deepCyclicCopy.test.ts @@ -23,7 +23,7 @@ it('returns the same value for primitive or function values', () => { it('does not execute getters/setters, but copies them', () => { const fn = jest.fn(); const obj = { - // @ts-ignore + // @ts-expect-error get foo() { fn(); }, @@ -84,13 +84,13 @@ it('uses the blacklist to avoid copying properties on the first level', () => { }); it('does not keep the prototype by default when top level is object', () => { - // @ts-ignore + // @ts-expect-error const sourceObject = new (function () {})(); - // @ts-ignore + // @ts-expect-error sourceObject.nestedObject = new (function () {})(); - // @ts-ignore + // @ts-expect-error sourceObject.nestedArray = new (function () { - // @ts-ignore + // @ts-expect-error this.length = 0; })(); @@ -124,9 +124,9 @@ it('does not keep the prototype by default when top level is object', () => { it('does not keep the prototype by default when top level is array', () => { const spy = jest.spyOn(Array, 'isArray').mockImplementation(() => true); - // @ts-ignore + // @ts-expect-error const sourceArray = new (function () { - // @ts-ignore + // @ts-expect-error this.length = 0; })(); @@ -142,9 +142,9 @@ it('does not keep the prototype by default when top level is array', () => { it('does not keep the prototype of arrays when keepPrototype = false', () => { const spy = jest.spyOn(Array, 'isArray').mockImplementation(() => true); - // @ts-ignore + // @ts-expect-error const sourceArray = new (function () { - // @ts-ignore + // @ts-expect-error this.length = 0; })(); @@ -160,9 +160,9 @@ it('does not keep the prototype of arrays when keepPrototype = false', () => { it('keeps the prototype of arrays when keepPrototype = true', () => { const spy = jest.spyOn(Array, 'isArray').mockImplementation(() => true); - // @ts-ignore + // @ts-expect-error const sourceArray = new (function () { - // @ts-ignore + // @ts-expect-error this.length = 0; })(); @@ -173,13 +173,13 @@ it('keeps the prototype of arrays when keepPrototype = true', () => { }); it('does not keep the prototype for objects when keepPrototype = false', () => { - // @ts-ignore + // @ts-expect-error const sourceobject = new (function () {})(); - // @ts-ignore + // @ts-expect-error sourceobject.nestedObject = new (function () {})(); - // @ts-ignore + // @ts-expect-error sourceobject.nestedArray = new (function () { - // @ts-ignore + // @ts-expect-error this.length = 0; })(); @@ -210,13 +210,13 @@ it('does not keep the prototype for objects when keepPrototype = false', () => { }); it('keeps the prototype for objects when keepPrototype = true', () => { - // @ts-ignore + // @ts-expect-error const sourceObject = new (function () {})(); - // @ts-ignore + // @ts-expect-error sourceObject.nestedObject = new (function () {})(); - // @ts-ignore + // @ts-expect-error sourceObject.nestedArray = new (function () { - // @ts-ignore + // @ts-expect-error this.length = 0; })(); diff --git a/packages/jest-util/src/__tests__/installCommonGlobals.test.ts b/packages/jest-util/src/__tests__/installCommonGlobals.test.ts index d61cd59389f8..d3f57912a483 100644 --- a/packages/jest-util/src/__tests__/installCommonGlobals.test.ts +++ b/packages/jest-util/src/__tests__/installCommonGlobals.test.ts @@ -16,7 +16,7 @@ function getGlobal(): NodeJS.Global { beforeEach(() => { fake = jest.fn(); - // @ts-ignore + // @ts-expect-error global.DTRACE_NET_SERVER_CONNECTION = fake; installCommonGlobals = require('../installCommonGlobals').default; diff --git a/packages/jest-util/src/convertDescriptorToString.ts b/packages/jest-util/src/convertDescriptorToString.ts index 50324d218204..c10ea8bf7f83 100644 --- a/packages/jest-util/src/convertDescriptorToString.ts +++ b/packages/jest-util/src/convertDescriptorToString.ts @@ -29,7 +29,7 @@ export default function convertDescriptorToString< const stringified = descriptor.toString(); const typeDescriptorMatch = stringified.match(/class|function/); const indexOfNameSpace = - // @ts-ignore: typeDescriptorMatch exists + // @ts-expect-error: typeDescriptorMatch exists typeDescriptorMatch.index + typeDescriptorMatch[0].length; const indexOfNameAfterSpace = stringified.search(/\(|\{/); const name = stringified.substring(indexOfNameSpace, indexOfNameAfterSpace); diff --git a/packages/jest-util/src/installCommonGlobals.ts b/packages/jest-util/src/installCommonGlobals.ts index e711df3ae2c4..ece4a40649d0 100644 --- a/packages/jest-util/src/installCommonGlobals.ts +++ b/packages/jest-util/src/installCommonGlobals.ts @@ -55,9 +55,9 @@ export default function ( // Forward some APIs. DTRACE.forEach(dtrace => { - // @ts-ignore: no index + // @ts-expect-error: no index globalObject[dtrace] = function (...args: Array) { - // @ts-ignore: no index + // @ts-expect-error: no index return global[dtrace].apply(this, args); }; }); diff --git a/packages/jest-util/src/setGlobal.ts b/packages/jest-util/src/setGlobal.ts index 012b3bd721ae..f840a7f4bae4 100644 --- a/packages/jest-util/src/setGlobal.ts +++ b/packages/jest-util/src/setGlobal.ts @@ -10,6 +10,6 @@ export default ( key: string, value: unknown, ): void => { - // @ts-ignore: no index + // @ts-expect-error: no index globalToMutate[key] = value; }; diff --git a/packages/jest-validate/src/condition.ts b/packages/jest-validate/src/condition.ts index b8bb69c763b6..9ae9be24416c 100644 --- a/packages/jest-validate/src/condition.ts +++ b/packages/jest-validate/src/condition.ts @@ -24,7 +24,7 @@ function validationConditionSingle( export function getValues(validOption: T): Array { if ( Array.isArray(validOption) && - // @ts-ignore + // @ts-expect-error validOption[MULTIPLE_VALID_OPTIONS_SYMBOL] ) { return validOption; @@ -43,7 +43,7 @@ export function multipleValidOptions>( ...args: T ): T[number] { const options = [...args]; - // @ts-ignore + // @ts-expect-error options[MULTIPLE_VALID_OPTIONS_SYMBOL] = true; return options; diff --git a/packages/jest-worker/src/index.ts b/packages/jest-worker/src/index.ts index 4107f6c4657a..5858f6c7f90e 100644 --- a/packages/jest-worker/src/index.ts +++ b/packages/jest-worker/src/index.ts @@ -26,7 +26,7 @@ function getExposedMethods( const module: Function | Record = require(workerPath); exposedMethods = Object.keys(module).filter( - // @ts-ignore: no index + // @ts-expect-error: no index name => typeof module[name] === 'function', ); @@ -82,7 +82,7 @@ export default class JestWorker { }; if (this._options.WorkerPool) { - // @ts-ignore: constructor target any? + // @ts-expect-error: constructor target any? this._workerPool = new this._options.WorkerPool( workerPath, workerPoolOptions, @@ -113,7 +113,7 @@ export default class JestWorker { throw new TypeError('Cannot define a method called ' + name); } - // @ts-ignore: dynamic extension of the class instance is expected. + // @ts-expect-error: dynamic extension of the class instance is expected. this[name] = this._callFunctionWithArgs.bind(this, name); }); } diff --git a/packages/jest-worker/src/workers/ChildProcessWorker.ts b/packages/jest-worker/src/workers/ChildProcessWorker.ts index 8410fdbf0cf7..375b2788b3e8 100644 --- a/packages/jest-worker/src/workers/ChildProcessWorker.ts +++ b/packages/jest-worker/src/workers/ChildProcessWorker.ts @@ -167,7 +167,7 @@ export default class ChildProcessWorker implements WorkerInterface { if (error != null && typeof error === 'object') { const extra = error; - // @ts-ignore: no index + // @ts-expect-error: no index const NativeCtor = global[response[1]]; const Ctor = typeof NativeCtor === 'function' ? NativeCtor : Error; @@ -176,7 +176,7 @@ export default class ChildProcessWorker implements WorkerInterface { error.stack = response[3]; for (const key in extra) { - // @ts-ignore: adding custom properties to errors. + // @ts-expect-error: adding custom properties to errors. error[key] = extra[key]; } } @@ -187,7 +187,7 @@ export default class ChildProcessWorker implements WorkerInterface { case PARENT_MESSAGE_SETUP_ERROR: error = new Error('Error when calling setup: ' + response[2]); - // @ts-ignore: adding custom properties to errors. + // @ts-expect-error: adding custom properties to errors. error.type = response[1]; error.stack = response[3]; diff --git a/packages/jest-worker/src/workers/NodeThreadsWorker.ts b/packages/jest-worker/src/workers/NodeThreadsWorker.ts index 64837106eda2..49f98be9d696 100644 --- a/packages/jest-worker/src/workers/NodeThreadsWorker.ts +++ b/packages/jest-worker/src/workers/NodeThreadsWorker.ts @@ -145,7 +145,7 @@ export default class ExperimentalWorker implements WorkerInterface { if (error != null && typeof error === 'object') { const extra = error; - // @ts-ignore: no index + // @ts-expect-error: no index const NativeCtor = global[response[1]]; const Ctor = typeof NativeCtor === 'function' ? NativeCtor : Error; @@ -154,7 +154,7 @@ export default class ExperimentalWorker implements WorkerInterface { error.stack = response[3]; for (const key in extra) { - // @ts-ignore: no index + // @ts-expect-error: no index error[key] = extra[key]; } } @@ -164,7 +164,7 @@ export default class ExperimentalWorker implements WorkerInterface { case PARENT_MESSAGE_SETUP_ERROR: error = new Error('Error when calling setup: ' + response[2]); - // @ts-ignore: adding custom properties to errors. + // @ts-expect-error: adding custom properties to errors. error.type = response[1]; error.stack = response[3]; diff --git a/packages/pretty-format/src/__tests__/prettyFormat.test.ts b/packages/pretty-format/src/__tests__/prettyFormat.test.ts index ddd99fc0ec7b..b217830a1c5f 100644 --- a/packages/pretty-format/src/__tests__/prettyFormat.test.ts +++ b/packages/pretty-format/src/__tests__/prettyFormat.test.ts @@ -14,7 +14,7 @@ function returnArguments(..._args: Array) { class MyArray extends Array {} function MyObject(value: unknown) { - // @ts-ignore + // @ts-expect-error this.name = value; } @@ -508,7 +508,7 @@ describe('prettyFormat()', () => { 'map non-empty': new Map([['name', 'value']]), 'object literal empty': {}, 'object literal non-empty': {name: 'value'}, - // @ts-ignore + // @ts-expect-error 'object with constructor': new MyObject('value'), 'object without constructor': Object.create(null), 'set empty': new Set(), @@ -540,7 +540,7 @@ describe('prettyFormat()', () => { it('throws on invalid options', () => { expect(() => { - // @ts-ignore + // @ts-expect-error prettyFormat({}, {invalidOption: true}); }).toThrow(); }); @@ -811,7 +811,7 @@ describe('prettyFormat()', () => { 'map non-empty': new Map([['name', 'value']]), 'object literal empty': {}, 'object literal non-empty': {name: 'value'}, - // @ts-ignore + // @ts-expect-error 'object with constructor': new MyObject('value'), 'object without constructor': Object.create(null), 'set empty': new Set(), diff --git a/packages/pretty-format/src/__tests__/react.test.tsx b/packages/pretty-format/src/__tests__/react.test.tsx index 88a64c3f3eee..e2cdad9c9a10 100644 --- a/packages/pretty-format/src/__tests__/react.test.tsx +++ b/packages/pretty-format/src/__tests__/react.test.tsx @@ -634,7 +634,7 @@ test('throws if theme option is null', () => { 'Hello, Mouse!', ); expect(() => { - // @ts-ignore + // @ts-expect-error formatElement(jsx, { highlight: true, theme: null, @@ -649,7 +649,7 @@ test('throws if theme option is not of type "object"', () => { {style: 'color:red'}, 'Hello, Mouse!', ); - // @ts-ignore + // @ts-expect-error formatElement(jsx, { highlight: true, theme: 'beautiful', diff --git a/scripts/verifyOldTs.js b/scripts/verifyOldTs.js index 47c93fbc8ab4..cfa8b8c3ddd8 100644 --- a/scripts/verifyOldTs.js +++ b/scripts/verifyOldTs.js @@ -30,9 +30,14 @@ const tsConfig = { }; const cwd = tempy.directory(); +const tsVersion = '3.8'; + try { execa.sync('yarn', ['init', '--yes'], {cwd, stdio: 'inherit'}); - execa.sync('yarn', ['add', 'typescript@~3.8'], {cwd, stdio: 'inherit'}); + execa.sync('yarn', ['add', `typescript@~${tsVersion}`], { + cwd, + stdio: 'inherit', + }); fs.writeFileSync( path.join(cwd, 'tsconfig.json'), JSON.stringify(tsConfig, null, 2), @@ -44,7 +49,9 @@ try { execa.sync('yarn', ['tsc', '--project', '.'], {cwd, stdio: 'inherit'}); console.log( - chalk.inverse.green(' Successfully compiled Jest with TypeScript 3.4 '), + chalk.inverse.green( + ` Successfully compiled Jest with TypeScript ${tsVersion} `, + ), ); } finally { rimraf.sync(cwd); diff --git a/yarn.lock b/yarn.lock index 624b75f1a1eb..8e3a6ddb5df3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -13301,10 +13301,10 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@*, typescript@^3.8.2: - version "3.8.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.8.3.tgz#409eb8544ea0335711205869ec458ab109ee1061" - integrity sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w== +typescript@*, typescript@^3.9.2: + version "3.9.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.2.tgz#64e9c8e9be6ea583c54607677dd4680a1cf35db9" + integrity sha512-q2ktq4n/uLuNNShyayit+DTobV2ApPEo/6so68JaD5ojvc/6GClBipedB9zNWYxRSAlZXAe405Rlijzl6qDiSw== ua-parser-js@^0.7.18: version "0.7.21" From 984273578af8f60f656723fec311d01339f9a25c Mon Sep 17 00:00:00 2001 From: Pedro Vieira Date: Wed, 13 May 2020 15:58:49 +0200 Subject: [PATCH 101/106] Minor test name typo fix (#10033) --- e2e/__tests__/filter.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e/__tests__/filter.test.ts b/e2e/__tests__/filter.test.ts index 4b1edce2cd01..356e0f9c3b0a 100644 --- a/e2e/__tests__/filter.test.ts +++ b/e2e/__tests__/filter.test.ts @@ -24,7 +24,7 @@ describe('Dynamic test filtering', () => { expect(result.stderr).toContain('1 total'); }); - it('ingores the filter if requested to do so', () => { + it('ignores the filter if requested to do so', () => { const result = runJest('filter', [ '--filter=/my-secondary-filter.js', '--skipFilter', From 56079a5aceacf32333089cea50c64385885fee26 Mon Sep 17 00:00:00 2001 From: Vincent Ricard Date: Thu, 14 May 2020 14:41:41 +0200 Subject: [PATCH 102/106] chore: fix TestUtils.ts to match the types (#10034) --- TestUtils.ts | 30 +++++++++---------- .../log_debug_messages.test.ts.snap | 15 ---------- .../script_transformer.test.js.snap | 16 +++++----- 3 files changed, 23 insertions(+), 38 deletions(-) diff --git a/TestUtils.ts b/TestUtils.ts index 031f9de0916a..0de81a811a81 100644 --- a/TestUtils.ts +++ b/TestUtils.ts @@ -13,38 +13,38 @@ const DEFAULT_GLOBAL_CONFIG: Config.GlobalConfig = { changedSince: '', collectCoverage: false, collectCoverageFrom: [], - collectCoverageOnlyFrom: null, + collectCoverageOnlyFrom: undefined, coverageDirectory: 'coverage', coverageProvider: 'babel', coverageReporters: [], coverageThreshold: {global: {}}, detectLeaks: false, detectOpenHandles: false, - enabledTestsMap: null, + enabledTestsMap: undefined, errorOnDeprecated: false, expand: false, - filter: null, + filter: undefined, findRelatedTests: false, forceExit: false, - globalSetup: null, - globalTeardown: null, + globalSetup: undefined, + globalTeardown: undefined, json: false, lastCommit: false, listTests: false, logHeapUsage: false, maxConcurrency: 5, maxWorkers: 2, - noSCM: null, + noSCM: undefined, noStackTrace: false, nonFlagArgs: [], notify: false, notifyMode: 'failure-change', onlyChanged: false, onlyFailures: false, - outputFile: null, + outputFile: undefined, passWithNoTests: false, projects: [], - replname: null, + replname: undefined, reporters: [], rootDir: '/test_root_dir/', runTestsByPath: false, @@ -53,7 +53,7 @@ const DEFAULT_GLOBAL_CONFIG: Config.GlobalConfig = { testFailureExitCode: 1, testNamePattern: '', testPathPattern: '', - testResultsProcessor: null, + testResultsProcessor: undefined, testSequencer: '@jest/test-sequencer', testTimeout: 5000, updateSnapshot: 'none', @@ -77,10 +77,10 @@ const DEFAULT_PROJECT_CONFIG: Config.ProjectConfig = { displayName: undefined, errorOnDeprecated: false, extraGlobals: [], - filter: null, + filter: undefined, forceCoverageMatch: [], - globalSetup: null, - globalTeardown: null, + globalSetup: undefined, + globalTeardown: undefined, globals: {}, haste: {}, moduleDirectories: [], @@ -93,7 +93,7 @@ const DEFAULT_PROJECT_CONFIG: Config.ProjectConfig = { prettierPath: 'prettier', resetMocks: false, resetModules: false, - resolver: null, + resolver: undefined, restoreMocks: false, rootDir: '/test_root_dir/', roots: [], @@ -102,7 +102,7 @@ const DEFAULT_PROJECT_CONFIG: Config.ProjectConfig = { setupFilesAfterEnv: [], skipFilter: false, skipNodeResolution: false, - snapshotResolver: null, + snapshotResolver: undefined, snapshotSerializers: [], testEnvironment: 'node', testEnvironmentOptions: {}, @@ -115,7 +115,7 @@ const DEFAULT_PROJECT_CONFIG: Config.ProjectConfig = { timers: 'real', transform: [], transformIgnorePatterns: [], - unmockedModulePathPatterns: null, + unmockedModulePathPatterns: undefined, watchPathIgnorePatterns: [], }; diff --git a/packages/jest-core/src/lib/__tests__/__snapshots__/log_debug_messages.test.ts.snap b/packages/jest-core/src/lib/__tests__/__snapshots__/log_debug_messages.test.ts.snap index 6cb0bf755035..0d7a420000ea 100644 --- a/packages/jest-core/src/lib/__tests__/__snapshots__/log_debug_messages.test.ts.snap +++ b/packages/jest-core/src/lib/__tests__/__snapshots__/log_debug_messages.test.ts.snap @@ -13,10 +13,7 @@ exports[`prints the config object 1`] = ` "detectOpenHandles": false, "errorOnDeprecated": false, "extraGlobals": [], - "filter": null, "forceCoverageMatch": [], - "globalSetup": null, - "globalTeardown": null, "globals": {}, "haste": {}, "moduleDirectories": [], @@ -31,7 +28,6 @@ exports[`prints the config object 1`] = ` "prettierPath": "prettier", "resetMocks": false, "resetModules": false, - "resolver": null, "restoreMocks": false, "rootDir": "/path/to/dir", "roots": [ @@ -42,7 +38,6 @@ exports[`prints the config object 1`] = ` "setupFilesAfterEnv": [], "skipFilter": false, "skipNodeResolution": false, - "snapshotResolver": null, "snapshotSerializers": [], "testEnvironment": "node", "testEnvironmentOptions": {}, @@ -57,7 +52,6 @@ exports[`prints the config object 1`] = ` "timers": "real", "transform": [], "transformIgnorePatterns": [], - "unmockedModulePathPatterns": null, "watchPathIgnorePatterns": [] }, "globalConfig": { @@ -66,7 +60,6 @@ exports[`prints the config object 1`] = ` "changedSince": "", "collectCoverage": false, "collectCoverageFrom": [], - "collectCoverageOnlyFrom": null, "coverageDirectory": "coverage", "coverageProvider": "babel", "coverageReporters": [], @@ -75,31 +68,24 @@ exports[`prints the config object 1`] = ` }, "detectLeaks": false, "detectOpenHandles": false, - "enabledTestsMap": null, "errorOnDeprecated": false, "expand": false, - "filter": null, "findRelatedTests": false, "forceExit": false, - "globalSetup": null, - "globalTeardown": null, "json": false, "lastCommit": false, "listTests": false, "logHeapUsage": false, "maxConcurrency": 5, "maxWorkers": 2, - "noSCM": null, "noStackTrace": false, "nonFlagArgs": [], "notify": false, "notifyMode": "failure-change", "onlyChanged": false, "onlyFailures": false, - "outputFile": null, "passWithNoTests": false, "projects": [], - "replname": null, "reporters": [], "rootDir": "/test_root_dir/", "runTestsByPath": false, @@ -108,7 +94,6 @@ exports[`prints the config object 1`] = ` "testFailureExitCode": 1, "testNamePattern": "", "testPathPattern": "", - "testResultsProcessor": null, "testSequencer": "@jest/test-sequencer", "testTimeout": 5000, "updateSnapshot": "none", diff --git a/packages/jest-transform/src/__tests__/__snapshots__/script_transformer.test.js.snap b/packages/jest-transform/src/__tests__/__snapshots__/script_transformer.test.js.snap index 8cc51acac4fa..6114987506eb 100644 --- a/packages/jest-transform/src/__tests__/__snapshots__/script_transformer.test.js.snap +++ b/packages/jest-transform/src/__tests__/__snapshots__/script_transformer.test.js.snap @@ -14,10 +14,10 @@ Object { "displayName": undefined, "errorOnDeprecated": false, "extraGlobals": Array [], - "filter": null, + "filter": undefined, "forceCoverageMatch": Array [], - "globalSetup": null, - "globalTeardown": null, + "globalSetup": undefined, + "globalTeardown": undefined, "globals": Object {}, "haste": Object {}, "moduleDirectories": Array [], @@ -32,7 +32,7 @@ Object { "prettierPath": "prettier", "resetMocks": false, "resetModules": false, - "resolver": null, + "resolver": undefined, "restoreMocks": false, "rootDir": "/", "roots": Array [], @@ -41,7 +41,7 @@ Object { "setupFilesAfterEnv": Array [], "skipFilter": false, "skipNodeResolution": false, - "snapshotResolver": null, + "snapshotResolver": undefined, "snapshotSerializers": Array [], "testEnvironment": "node", "testEnvironmentOptions": Object {}, @@ -63,7 +63,7 @@ Object { "transformIgnorePatterns": Array [ "/node_modules/", ], - "unmockedModulePathPatterns": null, + "unmockedModulePathPatterns": undefined, "watchPathIgnorePatterns": Array [], }, "instrument": true, @@ -229,7 +229,7 @@ exports[`ScriptTransformer uses multiple preprocessors 1`] = ` const TRANSFORMED = { filename: '/fruits/banana.js', script: 'module.exports = "banana";', - config: '{"automock":false,"cache":true,"cacheDirectory":"/cache/","clearMocks":false,"coveragePathIgnorePatterns":[],"cwd":"/test_root_dir/","detectLeaks":false,"detectOpenHandles":false,"errorOnDeprecated":false,"extraGlobals":[],"filter":null,"forceCoverageMatch":[],"globalSetup":null,"globalTeardown":null,"globals":{},"haste":{},"moduleDirectories":[],"moduleFileExtensions":["js"],"moduleLoader":"/test_module_loader_path","moduleNameMapper":[],"modulePathIgnorePatterns":[],"modulePaths":[],"name":"test","prettierPath":"prettier","resetMocks":false,"resetModules":false,"resolver":null,"restoreMocks":false,"rootDir":"/","roots":[],"runner":"jest-runner","setupFiles":[],"setupFilesAfterEnv":[],"skipFilter":false,"skipNodeResolution":false,"snapshotResolver":null,"snapshotSerializers":[],"testEnvironment":"node","testEnvironmentOptions":{},"testLocationInResults":false,"testMatch":[],"testPathIgnorePatterns":[],"testRegex":["\\\\.test\\\\.js$"],"testRunner":"jest-jasmine2","testURL":"http://localhost","timers":"real","transform":[["^.+\\\\.js$","test_preprocessor"],["^.+\\\\.css$","css-preprocessor"]],"transformIgnorePatterns":["/node_modules/"],"unmockedModulePathPatterns":null,"watchPathIgnorePatterns":[]}', + config: '{"automock":false,"cache":true,"cacheDirectory":"/cache/","clearMocks":false,"coveragePathIgnorePatterns":[],"cwd":"/test_root_dir/","detectLeaks":false,"detectOpenHandles":false,"errorOnDeprecated":false,"extraGlobals":[],"forceCoverageMatch":[],"globals":{},"haste":{},"moduleDirectories":[],"moduleFileExtensions":["js"],"moduleLoader":"/test_module_loader_path","moduleNameMapper":[],"modulePathIgnorePatterns":[],"modulePaths":[],"name":"test","prettierPath":"prettier","resetMocks":false,"resetModules":false,"restoreMocks":false,"rootDir":"/","roots":[],"runner":"jest-runner","setupFiles":[],"setupFilesAfterEnv":[],"skipFilter":false,"skipNodeResolution":false,"snapshotSerializers":[],"testEnvironment":"node","testEnvironmentOptions":{},"testLocationInResults":false,"testMatch":[],"testPathIgnorePatterns":[],"testRegex":["\\\\.test\\\\.js$"],"testRunner":"jest-jasmine2","testURL":"http://localhost","timers":"real","transform":[["^.+\\\\.js$","test_preprocessor"],["^.+\\\\.css$","css-preprocessor"]],"transformIgnorePatterns":["/node_modules/"],"watchPathIgnorePatterns":[]}', }; `; @@ -246,7 +246,7 @@ exports[`ScriptTransformer uses the supplied preprocessor 1`] = ` const TRANSFORMED = { filename: '/fruits/banana.js', script: 'module.exports = "banana";', - config: '{"automock":false,"cache":true,"cacheDirectory":"/cache/","clearMocks":false,"coveragePathIgnorePatterns":[],"cwd":"/test_root_dir/","detectLeaks":false,"detectOpenHandles":false,"errorOnDeprecated":false,"extraGlobals":[],"filter":null,"forceCoverageMatch":[],"globalSetup":null,"globalTeardown":null,"globals":{},"haste":{},"moduleDirectories":[],"moduleFileExtensions":["js"],"moduleLoader":"/test_module_loader_path","moduleNameMapper":[],"modulePathIgnorePatterns":[],"modulePaths":[],"name":"test","prettierPath":"prettier","resetMocks":false,"resetModules":false,"resolver":null,"restoreMocks":false,"rootDir":"/","roots":[],"runner":"jest-runner","setupFiles":[],"setupFilesAfterEnv":[],"skipFilter":false,"skipNodeResolution":false,"snapshotResolver":null,"snapshotSerializers":[],"testEnvironment":"node","testEnvironmentOptions":{},"testLocationInResults":false,"testMatch":[],"testPathIgnorePatterns":[],"testRegex":["\\\\.test\\\\.js$"],"testRunner":"jest-jasmine2","testURL":"http://localhost","timers":"real","transform":[["^.+\\\\.js$","test_preprocessor"]],"transformIgnorePatterns":["/node_modules/"],"unmockedModulePathPatterns":null,"watchPathIgnorePatterns":[]}', + config: '{"automock":false,"cache":true,"cacheDirectory":"/cache/","clearMocks":false,"coveragePathIgnorePatterns":[],"cwd":"/test_root_dir/","detectLeaks":false,"detectOpenHandles":false,"errorOnDeprecated":false,"extraGlobals":[],"forceCoverageMatch":[],"globals":{},"haste":{},"moduleDirectories":[],"moduleFileExtensions":["js"],"moduleLoader":"/test_module_loader_path","moduleNameMapper":[],"modulePathIgnorePatterns":[],"modulePaths":[],"name":"test","prettierPath":"prettier","resetMocks":false,"resetModules":false,"restoreMocks":false,"rootDir":"/","roots":[],"runner":"jest-runner","setupFiles":[],"setupFilesAfterEnv":[],"skipFilter":false,"skipNodeResolution":false,"snapshotSerializers":[],"testEnvironment":"node","testEnvironmentOptions":{},"testLocationInResults":false,"testMatch":[],"testPathIgnorePatterns":[],"testRegex":["\\\\.test\\\\.js$"],"testRunner":"jest-jasmine2","testURL":"http://localhost","timers":"real","transform":[["^.+\\\\.js$","test_preprocessor"]],"transformIgnorePatterns":["/node_modules/"],"watchPathIgnorePatterns":[]}', }; `; From 3bddaf84da445b1f4bab91d16c9fd2f4abba233c Mon Sep 17 00:00:00 2001 From: Mikhail Bodrov Date: Sat, 16 May 2020 10:56:38 +0300 Subject: [PATCH 103/106] chore: minor optimize getTransformer (#10050) --- .../jest-transform/src/ScriptTransformer.ts | 43 ++++++++++--------- 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/packages/jest-transform/src/ScriptTransformer.ts b/packages/jest-transform/src/ScriptTransformer.ts index 7e12631195ab..fc4373c5fc48 100644 --- a/packages/jest-transform/src/ScriptTransformer.ts +++ b/packages/jest-transform/src/ScriptTransformer.ts @@ -176,34 +176,37 @@ export default class ScriptTransformer { } private _getTransformer(filename: Config.Path) { - let transform: Transformer | null = null; if (!this._config.transform || !this._config.transform.length) { return null; } const transformPath = this._getTransformPath(filename); - if (transformPath) { - const transformer = this._transformCache.get(transformPath); - if (transformer != null) { - return transformer; - } - transform = require(transformPath); + if (!transformPath) { + return null; + } - if (!transform) { - throw new TypeError('Jest: a transform must export something.'); - } - const transformerConfig = this._transformConfigCache.get(transformPath); - if (typeof transform.createTransformer === 'function') { - transform = transform.createTransformer(transformerConfig); - } - if (typeof transform.process !== 'function') { - throw new TypeError( - 'Jest: a transform must export a `process` function.', - ); - } - this._transformCache.set(transformPath, transform); + const transformer = this._transformCache.get(transformPath); + if (transformer) { + return transformer; } + + let transform: Transformer = require(transformPath); + + if (!transform) { + throw new TypeError('Jest: a transform must export something.'); + } + const transformerConfig = this._transformConfigCache.get(transformPath); + if (typeof transform.createTransformer === 'function') { + transform = transform.createTransformer(transformerConfig); + } + if (typeof transform.process !== 'function') { + throw new TypeError( + 'Jest: a transform must export a `process` function.', + ); + } + this._transformCache.set(transformPath, transform); + return transform; } From 6cef23b50c9a021db147b584ea741fbe65416cef Mon Sep 17 00:00:00 2001 From: David Hernando Sancha Date: Mon, 18 May 2020 11:11:56 +0200 Subject: [PATCH 104/106] docs: correct confusing filename in `enableAutomock` example (#10055) --- CHANGELOG.md | 1 + docs/JestObjectAPI.md | 2 +- website/versioned_docs/version-26.0/JestObjectAPI.md | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5495a62f3f76..7b9ce319eda7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ ### Chore & Maintenance +- `[docs]` Correct confusing filename in `enableAutomock` example ([#10055](https://github.com/facebook/jest/pull/10055)) - `[jest-core]` 🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉 ([#10000](https://github.com/facebook/jest/pull/10000)) ### Performance diff --git a/docs/JestObjectAPI.md b/docs/JestObjectAPI.md index 2a30948e86e3..be28b93e4d21 100644 --- a/docs/JestObjectAPI.md +++ b/docs/JestObjectAPI.md @@ -76,7 +76,7 @@ export default { ``` ```js -// __tests__/disableAutomocking.js +// __tests__/enableAutomocking.js jest.enableAutomock(); import utils from '../utils'; diff --git a/website/versioned_docs/version-26.0/JestObjectAPI.md b/website/versioned_docs/version-26.0/JestObjectAPI.md index 0e20759bb7be..eb6c6ebac297 100644 --- a/website/versioned_docs/version-26.0/JestObjectAPI.md +++ b/website/versioned_docs/version-26.0/JestObjectAPI.md @@ -77,7 +77,7 @@ export default { ``` ```js -// __tests__/disableAutomocking.js +// __tests__/enableAutomocking.js jest.enableAutomock(); import utils from '../utils'; From 2460c059ad1dbf124466ac25c8d5ccfd74ae9f25 Mon Sep 17 00:00:00 2001 From: Kenrick Date: Wed, 20 May 2020 05:13:54 +0800 Subject: [PATCH 105/106] Cleanup `displayName` type (#10049) --- CHANGELOG.md | 1 + packages/jest-core/src/getProjectDisplayName.ts | 8 +------- packages/jest-reporters/src/__tests__/utils.test.ts | 5 ++++- packages/jest-reporters/src/utils.ts | 4 ---- packages/jest-test-result/src/helpers.ts | 2 +- packages/jest-types/src/Config.ts | 12 +++++------- 6 files changed, 12 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b9ce319eda7..e061d9be64c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ - `[docs]` Correct confusing filename in `enableAutomock` example ([#10055](https://github.com/facebook/jest/pull/10055)) - `[jest-core]` 🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉 ([#10000](https://github.com/facebook/jest/pull/10000)) +- `[jest-core, jest-reporters, jest-test-result, jest-types]` Cleanup `displayName` type ([#10049](https://github.com/facebook/jest/pull/10049)) ### Performance diff --git a/packages/jest-core/src/getProjectDisplayName.ts b/packages/jest-core/src/getProjectDisplayName.ts index 24f55d6746ea..d9e8271c622a 100644 --- a/packages/jest-core/src/getProjectDisplayName.ts +++ b/packages/jest-core/src/getProjectDisplayName.ts @@ -14,11 +14,5 @@ export default function getProjectDisplayName( if (!displayName) { return undefined; } - if (typeof displayName === 'string') { - return displayName; - } - if (typeof displayName === 'object') { - return displayName.name; - } - return undefined; + return displayName.name; } diff --git a/packages/jest-reporters/src/__tests__/utils.test.ts b/packages/jest-reporters/src/__tests__/utils.test.ts index b23fcc2e63b9..8e1887daf7f5 100644 --- a/packages/jest-reporters/src/__tests__/utils.test.ts +++ b/packages/jest-reporters/src/__tests__/utils.test.ts @@ -118,7 +118,10 @@ describe('printDisplayName', () => { expect( printDisplayName( makeProjectConfig({ - displayName: 'hello', + displayName: { + color: 'white', + name: 'hello', + }, }), ), ).toMatchSnapshot(); diff --git a/packages/jest-reporters/src/utils.ts b/packages/jest-reporters/src/utils.ts index fdeb1814e3fc..752e7c9f60f2 100644 --- a/packages/jest-reporters/src/utils.ts +++ b/packages/jest-reporters/src/utils.ts @@ -22,10 +22,6 @@ export const printDisplayName = (config: Config.ProjectConfig): string => { return ''; } - if (typeof displayName === 'string') { - return chalk.supportsColor ? white(` ${displayName} `) : displayName; - } - const {name, color} = displayName; const chosenColor = chalk.reset.inverse[color] ? chalk.reset.inverse[color] diff --git a/packages/jest-test-result/src/helpers.ts b/packages/jest-test-result/src/helpers.ts index 9076b2127fae..1e56aecebb23 100644 --- a/packages/jest-test-result/src/helpers.ts +++ b/packages/jest-test-result/src/helpers.ts @@ -48,7 +48,7 @@ export const buildFailureTestResult = ( err: SerializableError, ): TestResult => ({ console: undefined, - displayName: '', + displayName: undefined, failureMessage: null, leaks: false, numFailingTests: 0, diff --git a/packages/jest-types/src/Config.ts b/packages/jest-types/src/Config.ts index 8bfc411710f7..76a7b33a8f77 100644 --- a/packages/jest-types/src/Config.ts +++ b/packages/jest-types/src/Config.ts @@ -84,12 +84,10 @@ export type DefaultOptions = { watchman: boolean; }; -export type DisplayName = - | string - | { - name: string; - color: typeof chalk.Color; - }; +export type DisplayName = { + name: string; + color: typeof chalk.Color; +}; export type InitialOptionsWithRootDir = InitialOptions & Required>; @@ -119,7 +117,7 @@ export type InitialOptions = Partial<{ dependencyExtractor: string; detectLeaks: boolean; detectOpenHandles: boolean; - displayName: DisplayName; + displayName: string | DisplayName; expand: boolean; extraGlobals: Array; filter: Path; From 81712ba847c7a886d58d890e181b4036b2a9d398 Mon Sep 17 00:00:00 2001 From: Tunde Thomas <4913483+tundethomas@users.noreply.github.com> Date: Thu, 21 May 2020 08:10:00 -0400 Subject: [PATCH 106/106] docs: fix jest-diff example (#10067) --- docs/JestPlatform.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/JestPlatform.md b/docs/JestPlatform.md index 47b7140a732e..648acb758943 100644 --- a/docs/JestPlatform.md +++ b/docs/JestPlatform.md @@ -32,7 +32,7 @@ Tool for visualizing changes in data. Exports a function that compares two value ### Example ```javascript -const diff = require('jest-diff'); +const diff = require('jest-diff').default; const a = {a: {b: {c: 5}}}; const b = {a: {b: {c: 6}}}; @@ -58,7 +58,7 @@ const code = ` * * @flow */ - + console.log('Hello World!'); `;