diff --git a/CHANGELOG.md b/CHANGELOG.md index 58a1855968f3..f3f7f0fe829c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ - `[jest-haste-map]` [**BREAKING**] Remove name from hash in `HasteMap.getCacheFilePath` ([#7218](https://github.com/facebook/jest/pull/7218)) - `[babel-preset-jest]` [**BREAKING**] Export a function instead of an object for Babel 7 compatibility ([#7203](https://github.com/facebook/jest/pull/7203)) - `[jest-haste-map]` [**BREAKING**] Expose relative paths when getting the file iterator ([#7321](https://github.com/facebook/jest/pull/7321)) +- `[jest-cli]` [**BREAKING**] Run code transforms over `global{Setup,Teardown}` ([#7562](https://github.com/facebook/jest/pull/7562)) - `[jest-haste-map]` Add `hasteFS.getSize(path)` ([#7580](https://github.com/facebook/jest/pull/7580)) - `[jest-cli]` Print version ending in `-dev` when running a local Jest clone ([#7582](https://github.com/facebook/jest/pull/7582)) - `[jest-cli]` Add Support for `globalSetup` and `globalTeardown` in projects ([#6865](https://github.com/facebook/jest/pull/6865)) @@ -52,6 +53,7 @@ ### Fixes +- `[jest-config]` Ensure `existsSync` is only called with a string parameter ([#7607](https://github.com/facebook/jest/pull/7607)) - `[expect]` `toStrictEqual` considers sparseness of arrays. ([#7591](https://github.com/facebook/jest/pull/7591)) - `[jest-cli]` Fix empty coverage data for untested files ([#7388](https://github.com/facebook/jest/pull/7388)) - `[jest-cli]` [**BREAKING**] Do not use `text-summary` coverage reporter by default if other reporters are configured ([#7058](https://github.com/facebook/jest/pull/7058)) @@ -113,11 +115,13 @@ - `[jest-snapshot]` Write and read snapshots from disk even if `fs` is mocked ([#7080](https://github.com/facebook/jest/pull/7080)) - `[jest-config]` Normalize `config.cwd` and `config.rootDir` using `realpath ([#7598](https://github.com/facebook/jest/pull/7598)) - `[jest-environment-node]` Fix buffer property is not ArrayBuffer issue. ([#7626](https://github.com/facebook/jest/pull/7626)) +- `[babel-plugin-jest-hoist]` Ignore TS type annotations when looking for out-of-scope references ([#7641](https://github.com/facebook/jest/pull/7641)) ### Chore & Maintenance - `[*]` [**BREAKING**] Require Node.js 6+ for all packages ([#7258](https://github.com/facebook/jest/pull/7258)) - `[jest-util]` [**BREAKING**] Remove long-deprecated globals for fake timers ([#7285](https://github.com/facebook/jest/pull/7285)) +- `[*]` [**BREAKING**] Upgrade to Micromatch 3 ([#6650](https://github.com/facebook/jest/pull/6650)) - `[*]` [**BREAKING**] Remove regenerator-runtime injection ([#7595](https://github.com/facebook/jest/pull/7595)) - `[docs]` Fix message property in custom matcher example to return a function instead of a constant. ([#7426](https://github.com/facebook/jest/pull/7426)) - `[jest-circus]` Standardize file naming in `jest-circus` ([#7301](https://github.com/facebook/jest/pull/7301)) diff --git a/docs/JestPlatform.md b/docs/JestPlatform.md index 62339b274bb3..bc13e98e542b 100644 --- a/docs/JestPlatform.md +++ b/docs/JestPlatform.md @@ -45,7 +45,7 @@ console.log(result); ## jest-docblock -Tool for extracting and parsing the comments at the top of a JavaScript file. Exports various function to manipulate the data inside the comment block. +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 diff --git a/e2e/Utils.js b/e2e/Utils.js index 5588bb9d235e..afc4d872c889 100644 --- a/e2e/Utils.js +++ b/e2e/Utils.js @@ -14,7 +14,7 @@ import type {Path} from 'types/Config'; import {sync as spawnSync} from 'execa'; import fs from 'fs'; import path from 'path'; -import mkdirp from 'mkdirp'; +import {createDirectory} from 'jest-util'; import rimraf from 'rimraf'; export const run = (cmd: string, cwd?: Path) => { @@ -43,7 +43,7 @@ export const linkJestPackage = (packageName: string, cwd: Path) => { const packagesDir = path.resolve(__dirname, '../packages'); const packagePath = path.resolve(packagesDir, packageName); const destination = path.resolve(cwd, 'node_modules/', packageName); - mkdirp.sync(destination); + createDirectory(destination); rimraf.sync(destination); fs.symlinkSync(packagePath, destination, 'dir'); }; @@ -74,13 +74,13 @@ export const writeFiles = ( directory: string, files: {[filename: string]: string}, ) => { - mkdirp.sync(directory); + createDirectory(directory); Object.keys(files).forEach(fileOrPath => { const filePath = fileOrPath.split('/'); // ['tmp', 'a.js'] const filename = filePath.pop(); // filepath becomes dirPath (no filename) if (filePath.length) { - mkdirp.sync(path.join.apply(path, [directory].concat(filePath))); + createDirectory(path.join.apply(path, [directory].concat(filePath))); } fs.writeFileSync( path.resolve.apply(path, [directory].concat(filePath, [filename])), @@ -128,7 +128,7 @@ export const createEmptyPackage = ( }, }; - mkdirp.sync(directory); + createDirectory(directory); packageJson || (packageJson = DEFAULT_PACKAGE_JSON); fs.writeFileSync( path.resolve(directory, 'package.json'), diff --git a/e2e/__tests__/__snapshots__/failures.test.js.snap b/e2e/__tests__/__snapshots__/failures.test.js.snap index a63133b9c045..4955ba573aae 100644 --- a/e2e/__tests__/__snapshots__/failures.test.js.snap +++ b/e2e/__tests__/__snapshots__/failures.test.js.snap @@ -187,9 +187,9 @@ exports[`not throwing Error objects 5`] = ` 22 | > 23 | test('Object thrown during test', () => { | ^ - 24 | // eslint-disable-next-line no-throw-literal - 25 | throw deepObject; - 26 | }); + 24 | throw deepObject; + 25 | }); + 26 | at Object.test (__tests__/duringTests.test.js:23:1) @@ -197,29 +197,29 @@ exports[`not throwing Error objects 5`] = ` ReferenceError: doesNotExist is not defined - 28 | test('Error during test', () => { - 29 | // eslint-disable-next-line no-undef - > 30 | doesNotExist.alsoThisNot; + 27 | test('Error during test', () => { + 28 | // eslint-disable-next-line no-undef + > 29 | doesNotExist.alsoThisNot; | ^ - 31 | }); - 32 | - 33 | test('done(Error)', done => { + 30 | }); + 31 | + 32 | test('done(Error)', done => { - at Object.doesNotExist (__tests__/duringTests.test.js:30:3) + at Object.doesNotExist (__tests__/duringTests.test.js:29:3) ● done(Error) this is an error - 32 | - 33 | test('done(Error)', done => { - > 34 | done(new Error('this is an error')); + 31 | + 32 | test('done(Error)', done => { + > 33 | done(new Error('this is an error')); | ^ - 35 | }); - 36 | - 37 | test('done(non-error)', done => { + 34 | }); + 35 | + 36 | test('done(non-error)', done => { - at Object..done (__tests__/duringTests.test.js:34:8) + at Object..done (__tests__/duringTests.test.js:33:8) ● done(non-error) @@ -232,15 +232,15 @@ exports[`not throwing Error objects 5`] = ` ], } - 36 | - 37 | test('done(non-error)', done => { - > 38 | done(deepObject); + 35 | + 36 | test('done(non-error)', done => { + > 37 | done(deepObject); | ^ - 39 | }); - 40 | - 41 | test('returned promise rejection', () => Promise.reject(deepObject)); + 38 | }); + 39 | + 40 | test('returned promise rejection', () => Promise.reject(deepObject)); - at Object.done (__tests__/duringTests.test.js:38:3) + at Object.done (__tests__/duringTests.test.js:37:3) ● returned promise rejection @@ -253,13 +253,13 @@ exports[`not throwing Error objects 5`] = ` ], } - 39 | }); - 40 | - > 41 | test('returned promise rejection', () => Promise.reject(deepObject)); + 38 | }); + 39 | + > 40 | test('returned promise rejection', () => Promise.reject(deepObject)); | ^ - 42 | + 41 | - at Object.test (__tests__/duringTests.test.js:41:1) + at Object.test (__tests__/duringTests.test.js:40:1) " `; diff --git a/e2e/__tests__/babelPluginJestHoist.test.js b/e2e/__tests__/babelPluginJestHoist.test.js index a08db1459812..70062d2eb6c5 100644 --- a/e2e/__tests__/babelPluginJestHoist.test.js +++ b/e2e/__tests__/babelPluginJestHoist.test.js @@ -21,5 +21,5 @@ beforeEach(() => { it('sucessfully runs the tests inside `babel-plugin-jest-hoist/`', () => { const {json} = runWithJson(DIR, ['--no-cache', '--coverage']); expect(json.success).toBe(true); - expect(json.numTotalTestSuites).toBe(2); + expect(json.numTotalTestSuites).toBe(3); }); diff --git a/e2e/__tests__/globalTeardown.test.js b/e2e/__tests__/globalTeardown.test.js index 8f776ae30e8e..0f83b55c8e65 100644 --- a/e2e/__tests__/globalTeardown.test.js +++ b/e2e/__tests__/globalTeardown.test.js @@ -8,7 +8,7 @@ 'use strict'; import fs from 'fs'; -import mkdirp from 'mkdirp'; +import {createDirectory} from 'jest-util'; import os from 'os'; import path from 'path'; import runJest, {json as runWithJson} from '../runJest'; @@ -30,7 +30,7 @@ afterAll(() => { }); test('globalTeardown is triggered once after all test suites', () => { - mkdirp.sync(DIR); + createDirectory(DIR); const teardownPath = path.resolve( __dirname, '../global-teardown/teardown.js', diff --git a/e2e/babel-plugin-jest-hoist/__tests__/typescript.test.ts b/e2e/babel-plugin-jest-hoist/__tests__/typescript.test.ts new file mode 100644 index 000000000000..e92369af9684 --- /dev/null +++ b/e2e/babel-plugin-jest-hoist/__tests__/typescript.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. + * + * @emails oncall+jsinfra + */ + +/* eslint-disable import/no-unresolved */ + +import {Color} from '../types'; +import {color} from '../entry'; + +jest.mock('../entry', () => { + const color: Color = 'blue'; + return {color}; +}); + +describe('babel-plugin-jest-hoist', () => { + it('works even with type imports', () => { + expect(color).toBe('blue'); + }); +}); diff --git a/e2e/babel-plugin-jest-hoist/babel.config.js b/e2e/babel-plugin-jest-hoist/babel.config.js index a6015cf03494..5650b39d7303 100644 --- a/e2e/babel-plugin-jest-hoist/babel.config.js +++ b/e2e/babel-plugin-jest-hoist/babel.config.js @@ -1,6 +1,16 @@ // Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. module.exports = { + overrides: [ + { + presets: ['@babel/preset-flow'], + test: '**/*.js', + }, + { + presets: ['@babel/preset-typescript'], + test: '**/*.ts', + }, + ], plugins: ['jest-hoist'], - presets: ['@babel/preset-env', '@babel/preset-flow'], + presets: ['@babel/preset-env'], }; diff --git a/e2e/babel-plugin-jest-hoist/entry.ts b/e2e/babel-plugin-jest-hoist/entry.ts new file mode 100644 index 000000000000..00ed0fce24fa --- /dev/null +++ b/e2e/babel-plugin-jest-hoist/entry.ts @@ -0,0 +1,11 @@ +/** + * 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-next-line import/no-unresolved +import {Color} from './types'; + +export const color: Color = 'red'; diff --git a/e2e/babel-plugin-jest-hoist/package.json b/e2e/babel-plugin-jest-hoist/package.json index bab411de7d8b..ab80492fd75d 100644 --- a/e2e/babel-plugin-jest-hoist/package.json +++ b/e2e/babel-plugin-jest-hoist/package.json @@ -1,7 +1,8 @@ { "dependencies": { - "@babel/preset-env": "7.0.0", - "@babel/preset-flow": "7.0.0", + "@babel/preset-env": "^7.0.0", + "@babel/preset-flow": "^7.0.0", + "@babel/preset-typescript": "^7.0.0", "react": "*" }, "jest": { diff --git a/e2e/babel-plugin-jest-hoist/types.ts b/e2e/babel-plugin-jest-hoist/types.ts new file mode 100644 index 000000000000..3b5511784336 --- /dev/null +++ b/e2e/babel-plugin-jest-hoist/types.ts @@ -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. + */ + +export type Color = 'red' | 'blue'; diff --git a/e2e/babel-plugin-jest-hoist/yarn.lock b/e2e/babel-plugin-jest-hoist/yarn.lock index 1a4773eabbd3..4c826f992d5c 100644 --- a/e2e/babel-plugin-jest-hoist/yarn.lock +++ b/e2e/babel-plugin-jest-hoist/yarn.lock @@ -189,52 +189,52 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.1.3.tgz#2c92469bac2b7fbff810b67fca07bd138b48af77" integrity sha512-gqmspPZOMW3MIRb9HlrnbZHXI1/KHTOroBwN1NcLL6pWxzqzEKGvRTq0W/PxS45OtQGbaFikSQpkS5zbnsQm2w== -"@babel/plugin-proposal-async-generator-functions@^7.0.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.1.0.tgz#41c1a702e10081456e23a7b74d891922dd1bb6ce" - integrity sha512-Fq803F3Jcxo20MXUSDdmZZXrPe6BWyGcWBPPNB/M7WaUYESKDeKMOGIxEzQOjGSmW/NWb6UaPZrtTB2ekhB/ew== +"@babel/plugin-proposal-async-generator-functions@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.2.0.tgz#b289b306669dce4ad20b0252889a15768c9d417e" + integrity sha512-+Dfo/SCQqrwx48ptLVGLdE39YtWRuKc/Y9I5Fy0P1DDBB9lsAHpjcEJQt+4IifuSOSTLBKJObJqMvaO1pIE8LQ== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-remap-async-to-generator" "^7.1.0" - "@babel/plugin-syntax-async-generators" "^7.0.0" + "@babel/plugin-syntax-async-generators" "^7.2.0" -"@babel/plugin-proposal-json-strings@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.0.0.tgz#3b4d7b5cf51e1f2e70f52351d28d44fc2970d01e" - integrity sha512-kfVdUkIAGJIVmHmtS/40i/fg/AGnw/rsZBCaapY5yjeO5RA9m165Xbw9KMOu2nqXP5dTFjEjHdfNdoVcHv133Q== +"@babel/plugin-proposal-json-strings@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.2.0.tgz#568ecc446c6148ae6b267f02551130891e29f317" + integrity sha512-MAFV1CA/YVmYwZG0fBQyXhmj0BHCB5egZHCKWIFVv/XCxAeVGIHfos3SwDck4LvCllENIAg7xMKOG5kH0dzyUg== dependencies: "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-json-strings" "^7.0.0" + "@babel/plugin-syntax-json-strings" "^7.2.0" -"@babel/plugin-proposal-object-rest-spread@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.0.0.tgz#9a17b547f64d0676b6c9cecd4edf74a82ab85e7e" - integrity sha512-14fhfoPcNu7itSen7Py1iGN0gEm87hX/B+8nZPqkdmANyyYWYMY2pjA3r8WXbWVKMzfnSNS0xY8GVS0IjXi/iw== +"@babel/plugin-proposal-object-rest-spread@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.2.0.tgz#88f5fec3e7ad019014c97f7ee3c992f0adbf7fb8" + integrity sha512-1L5mWLSvR76XYUQJXkd/EEQgjq8HHRP6lQuZTTg0VA4tTGPpGemmCdAfQIz1rzEuWAm+ecP8PyyEm30jC1eQCg== dependencies: "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-object-rest-spread" "^7.0.0" + "@babel/plugin-syntax-object-rest-spread" "^7.2.0" -"@babel/plugin-proposal-optional-catch-binding@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.0.0.tgz#b610d928fe551ff7117d42c8bb410eec312a6425" - integrity sha512-JPqAvLG1s13B/AuoBjdBYvn38RqW6n1TzrQO839/sIpqLpbnXKacsAgpZHzLD83Sm8SDXMkkrAvEnJ25+0yIpw== +"@babel/plugin-proposal-optional-catch-binding@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.2.0.tgz#135d81edb68a081e55e56ec48541ece8065c38f5" + integrity sha512-mgYj3jCcxug6KUcX4OBoOJz3CMrwRfQELPQ5560F70YQUBZB7uac9fqaWamKR1iWUzGiK2t0ygzjTScZnVz75g== dependencies: "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-optional-catch-binding" "^7.0.0" + "@babel/plugin-syntax-optional-catch-binding" "^7.2.0" -"@babel/plugin-proposal-unicode-property-regex@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.0.0.tgz#498b39cd72536cd7c4b26177d030226eba08cd33" - integrity sha512-tM3icA6GhC3ch2SkmSxv7J/hCWKISzwycub6eGsDrFDgukD4dZ/I+x81XgW0YslS6mzNuQ1Cbzh5osjIMgepPQ== +"@babel/plugin-proposal-unicode-property-regex@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.2.0.tgz#abe7281fe46c95ddc143a65e5358647792039520" + integrity sha512-LvRVYb7kikuOtIoUeWTkOxQEV1kYvL5B6U3iWEGCzPNRus1MzJweFqORTj+0jkxozkTSYNJozPOddxmqdqsRpw== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-regex" "^7.0.0" regexpu-core "^4.2.0" -"@babel/plugin-syntax-async-generators@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.0.0.tgz#bf0891dcdbf59558359d0c626fdc9490e20bc13c" - integrity sha512-im7ged00ddGKAjcZgewXmp1vxSZQQywuQXe2B1A7kajjZmDeY/ekMPmWr9zJgveSaQH0k7BcGrojQhcK06l0zA== +"@babel/plugin-syntax-async-generators@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.2.0.tgz#69e1f0db34c6f5a0cf7e2b3323bf159a76c8cb7f" + integrity sha512-1ZrIRBv2t0GSlcwVoQ6VgSLpLgiN/FVQUzt9znxo7v2Ov4jJrs8RY8tv0wvDmFN3qIdMKWrmMMW6yZ0G19MfGg== dependencies: "@babel/helper-plugin-utils" "^7.0.0" @@ -245,62 +245,69 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-syntax-json-strings@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.0.0.tgz#0d259a68090e15b383ce3710e01d5b23f3770cbd" - integrity sha512-UlSfNydC+XLj4bw7ijpldc1uZ/HB84vw+U6BTuqMdIEmz/LDe63w/GHtpQMdXWdqQZFeAI9PjnHe/vDhwirhKA== +"@babel/plugin-syntax-json-strings@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.2.0.tgz#72bd13f6ffe1d25938129d2a186b11fd62951470" + integrity sha512-5UGYnMSLRE1dqqZwug+1LISpA403HzlSfsg6P9VXU6TBjcSHeNlw4DxDx7LgpF+iKZoOG/+uzqoRHTdcUpiZNg== dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-syntax-object-rest-spread@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.0.0.tgz#37d8fbcaf216bd658ea1aebbeb8b75e88ebc549b" - integrity sha512-5A0n4p6bIiVe5OvQPxBnesezsgFJdHhSs3uFSvaPdMqtsovajLZ+G2vZyvNe10EzJBWWo3AcHGKhAFUxqwp2dw== +"@babel/plugin-syntax-object-rest-spread@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.2.0.tgz#3b7a3e733510c57e820b9142a6579ac8b0dfad2e" + integrity sha512-t0JKGgqk2We+9may3t0xDdmneaXmyxq0xieYcKHxIsrJO64n1OiMWNUtc5gQK1PA0NpdCRrtZp4z+IUaKugrSA== dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-syntax-optional-catch-binding@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.0.0.tgz#886f72008b3a8b185977f7cb70713b45e51ee475" - integrity sha512-Wc+HVvwjcq5qBg1w5RG9o9RVzmCaAg/Vp0erHCKpAYV8La6I94o4GQAmFYNmkzoMO6gzoOSulpKeSSz6mPEoZw== +"@babel/plugin-syntax-optional-catch-binding@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.2.0.tgz#a94013d6eda8908dfe6a477e7f9eda85656ecf5c" + integrity sha512-bDe4xKNhb0LI7IvZHiA13kff0KEfaGX/Hv4lMA9+7TEc63hMNvfKo6ZFpXhKuEp+II/q35Gc4NoMeDZyaUbj9w== dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-arrow-functions@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.0.0.tgz#a6c14875848c68a3b4b3163a486535ef25c7e749" - integrity sha512-2EZDBl1WIO/q4DIkIp4s86sdp4ZifL51MoIviLY/gG/mLSuOIEg7J8o6mhbxOTvUJkaN50n+8u41FVsr5KLy/w== +"@babel/plugin-syntax-typescript@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.2.0.tgz#55d240536bd314dcbbec70fd949c5cabaed1de29" + integrity sha512-WhKr6yu6yGpGcNMVgIBuI9MkredpVc7Y3YR4UzEZmDztHoL6wV56YBHLhWnjO1EvId1B32HrD3DRFc+zSoKI1g== dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-async-to-generator@^7.0.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.1.0.tgz#109e036496c51dd65857e16acab3bafdf3c57811" - integrity sha512-rNmcmoQ78IrvNCIt/R9U+cixUHeYAzgusTFgIAv+wQb9HJU4szhpDD6e5GCACmj/JP5KxuCwM96bX3L9v4ZN/g== +"@babel/plugin-transform-arrow-functions@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.2.0.tgz#9aeafbe4d6ffc6563bf8f8372091628f00779550" + integrity sha512-ER77Cax1+8/8jCB9fo4Ud161OZzWN5qawi4GusDuRLcDbDG+bIGYY20zb2dfAFdTRGzrfq2xZPvF0R64EHnimg== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-async-to-generator@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.2.0.tgz#68b8a438663e88519e65b776f8938f3445b1a2ff" + integrity sha512-CEHzg4g5UraReozI9D4fblBYABs7IM6UerAVG7EJVrTLC5keh00aEuLUT+O40+mJCEzaXkYfTCUKIyeDfMOFFQ== dependencies: "@babel/helper-module-imports" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-remap-async-to-generator" "^7.1.0" -"@babel/plugin-transform-block-scoped-functions@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.0.0.tgz#482b3f75103927e37288b3b67b65f848e2aa0d07" - integrity sha512-AOBiyUp7vYTqz2Jibe1UaAWL0Hl9JUXEgjFvvvcSc9MVDItv46ViXFw2F7SVt1B5k+KWjl44eeXOAk3UDEaJjQ== +"@babel/plugin-transform-block-scoped-functions@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.2.0.tgz#5d3cc11e8d5ddd752aa64c9148d0db6cb79fd190" + integrity sha512-ntQPR6q1/NKuphly49+QiQiTN0O63uOwjdD6dhIjSWBI5xlrbUFh720TIpzBhpnrLfv2tNH/BXvLIab1+BAI0w== dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-block-scoping@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.0.0.tgz#1745075edffd7cdaf69fab2fb6f9694424b7e9bc" - integrity sha512-GWEMCrmHQcYWISilUrk9GDqH4enf3UmhOEbNbNrlNAX1ssH3MsS1xLOS6rdjRVPgA7XXVPn87tRkdTEoA/dxEg== +"@babel/plugin-transform-block-scoping@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.2.0.tgz#f17c49d91eedbcdf5dd50597d16f5f2f770132d4" + integrity sha512-vDTgf19ZEV6mx35yiPJe4fS02mPQUUcBNwWQSZFXSzTSbsJFQvHt7DqyS3LK8oOWALFOsJ+8bbqBgkirZteD5Q== dependencies: "@babel/helper-plugin-utils" "^7.0.0" lodash "^4.17.10" -"@babel/plugin-transform-classes@^7.0.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.1.0.tgz#ab3f8a564361800cbc8ab1ca6f21108038432249" - integrity sha512-rNaqoD+4OCBZjM7VaskladgqnZ1LO6o2UxuWSDzljzW21pN1KXkB7BstAVweZdxQkHAujps5QMNOTWesBciKFg== +"@babel/plugin-transform-classes@^7.2.0": + version "7.2.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.2.2.tgz#6c90542f210ee975aa2aa8c8b5af7fa73a126953" + integrity sha512-gEZvgTy1VtcDOaQty1l10T3jQmJKlNVxLDCs+3rCVPr6nMkODLELxViq5X9l+rfxbie3XrfrMCYYY6eX3aOcOQ== dependencies: "@babel/helper-annotate-as-pure" "^7.0.0" "@babel/helper-define-map" "^7.1.0" @@ -311,40 +318,40 @@ "@babel/helper-split-export-declaration" "^7.0.0" globals "^11.1.0" -"@babel/plugin-transform-computed-properties@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.0.0.tgz#2fbb8900cd3e8258f2a2ede909b90e7556185e31" - integrity sha512-ubouZdChNAv4AAWAgU7QKbB93NU5sHwInEWfp+/OzJKA02E6Woh9RVoX4sZrbRwtybky/d7baTUqwFx+HgbvMA== +"@babel/plugin-transform-computed-properties@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.2.0.tgz#83a7df6a658865b1c8f641d510c6f3af220216da" + integrity sha512-kP/drqTxY6Xt3NNpKiMomfgkNn4o7+vKxK2DDKcBG9sHj51vHqMBGy8wbDS/J4lMxnqs153/T3+DmCEAkC5cpA== dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-destructuring@^7.0.0": - version "7.1.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.1.3.tgz#e69ff50ca01fac6cb72863c544e516c2b193012f" - integrity sha512-Mb9M4DGIOspH1ExHOUnn2UUXFOyVTiX84fXCd+6B5iWrQg/QMeeRmSwpZ9lnjYLSXtZwiw80ytVMr3zue0ucYw== +"@babel/plugin-transform-destructuring@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.2.0.tgz#e75269b4b7889ec3a332cd0d0c8cff8fed0dc6f3" + integrity sha512-coVO2Ayv7g0qdDbrNiadE4bU7lvCd9H539m2gMknyVjjMdwF/iCOM7R+E8PkntoqLkltO0rk+3axhpp/0v68VQ== dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-dotall-regex@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.0.0.tgz#73a24da69bc3c370251f43a3d048198546115e58" - integrity sha512-00THs8eJxOJUFVx1w8i1MBF4XH4PsAjKjQ1eqN/uCH3YKwP21GCKfrn6YZFZswbOk9+0cw1zGQPHVc1KBlSxig== +"@babel/plugin-transform-dotall-regex@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.2.0.tgz#f0aabb93d120a8ac61e925ea0ba440812dbe0e49" + integrity sha512-sKxnyHfizweTgKZf7XsXu/CNupKhzijptfTM+bozonIuyVrLWVUvYjE2bhuSBML8VQeMxq4Mm63Q9qvcvUcciQ== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-regex" "^7.0.0" regexpu-core "^4.1.3" -"@babel/plugin-transform-duplicate-keys@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.0.0.tgz#a0601e580991e7cace080e4cf919cfd58da74e86" - integrity sha512-w2vfPkMqRkdxx+C71ATLJG30PpwtTpW7DDdLqYt2acXU7YjztzeWW2Jk1T6hKqCLYCcEA5UQM/+xTAm+QCSnuQ== +"@babel/plugin-transform-duplicate-keys@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.2.0.tgz#d952c4930f312a4dbfff18f0b2914e60c35530b3" + integrity sha512-q+yuxW4DsTjNceUiTzK0L+AfQ0zD9rWaTLiUqHA8p0gxx7lu1EylenfzjeIWNkPy6e/0VG/Wjw9uf9LueQwLOw== dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-exponentiation-operator@^7.0.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.1.0.tgz#9c34c2ee7fd77e02779cfa37e403a2e1003ccc73" - integrity sha512-uZt9kD1Pp/JubkukOGQml9tqAeI8NkE98oZnHZ2qHRElmeKCodbTZgOEUtujSCSLhHSBWbzNiFSDIMC4/RBTLQ== +"@babel/plugin-transform-exponentiation-operator@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.2.0.tgz#a63868289e5b4007f7054d46491af51435766008" + integrity sha512-umh4hR6N7mu4Elq9GG8TOu9M0bakvlsREEC+ialrQN6ABS4oDQ69qJv1VtR3uxlKMCQMCvzk7vr17RHKcjx68A== dependencies: "@babel/helper-builder-binary-assignment-operator-visitor" "^7.1.0" "@babel/helper-plugin-utils" "^7.0.0" @@ -357,57 +364,57 @@ "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-flow" "^7.0.0" -"@babel/plugin-transform-for-of@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.0.0.tgz#f2ba4eadb83bd17dc3c7e9b30f4707365e1c3e39" - integrity sha512-TlxKecN20X2tt2UEr2LNE6aqA0oPeMT1Y3cgz8k4Dn1j5ObT8M3nl9aA37LLklx0PBZKETC9ZAf9n/6SujTuXA== +"@babel/plugin-transform-for-of@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.2.0.tgz#ab7468befa80f764bb03d3cb5eef8cc998e1cad9" + integrity sha512-Kz7Mt0SsV2tQk6jG5bBv5phVbkd0gd27SgYD4hH1aLMJRchM0dzHaXvrWhVZ+WxAlDoAKZ7Uy3jVTW2mKXQ1WQ== dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-function-name@^7.0.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.1.0.tgz#29c5550d5c46208e7f730516d41eeddd4affadbb" - integrity sha512-VxOa1TMlFMtqPW2IDYZQaHsFrq/dDoIjgN098NowhexhZcz3UGlvPgZXuE1jEvNygyWyxRacqDpCZt+par1FNg== +"@babel/plugin-transform-function-name@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.2.0.tgz#f7930362829ff99a3174c39f0afcc024ef59731a" + integrity sha512-kWgksow9lHdvBC2Z4mxTsvc7YdY7w/V6B2vy9cTIPtLEE9NhwoWivaxdNM/S37elu5bqlLP/qOY906LukO9lkQ== dependencies: "@babel/helper-function-name" "^7.1.0" "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-literals@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.0.0.tgz#2aec1d29cdd24c407359c930cdd89e914ee8ff86" - integrity sha512-1NTDBWkeNXgpUcyoVFxbr9hS57EpZYXpje92zv0SUzjdu3enaRwF/l3cmyRnXLtIdyJASyiS6PtybK+CgKf7jA== +"@babel/plugin-transform-literals@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.2.0.tgz#690353e81f9267dad4fd8cfd77eafa86aba53ea1" + integrity sha512-2ThDhm4lI4oV7fVQ6pNNK+sx+c/GM5/SaML0w/r4ZB7sAneD/piDJtwdKlNckXeyGK7wlwg2E2w33C/Hh+VFCg== dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-modules-amd@^7.0.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.1.0.tgz#f9e0a7072c12e296079b5a59f408ff5b97bf86a8" - integrity sha512-wt8P+xQ85rrnGNr2x1iV3DW32W8zrB6ctuBkYBbf5/ZzJY99Ob4MFgsZDFgczNU76iy9PWsy4EuxOliDjdKw6A== +"@babel/plugin-transform-modules-amd@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.2.0.tgz#82a9bce45b95441f617a24011dc89d12da7f4ee6" + integrity sha512-mK2A8ucqz1qhrdqjS9VMIDfIvvT2thrEsIQzbaTdc5QFzhDjQv2CkJJ5f6BXIkgbmaoax3zBr2RyvV/8zeoUZw== dependencies: "@babel/helper-module-transforms" "^7.1.0" "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-modules-commonjs@^7.0.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.1.0.tgz#0a9d86451cbbfb29bd15186306897c67f6f9a05c" - integrity sha512-wtNwtMjn1XGwM0AXPspQgvmE6msSJP15CX2RVfpTSTNPLhKhaOjaIfBaVfj4iUZ/VrFSodcFedwtPg/NxwQlPA== +"@babel/plugin-transform-modules-commonjs@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.2.0.tgz#c4f1933f5991d5145e9cfad1dfd848ea1727f404" + integrity sha512-V6y0uaUQrQPXUrmj+hgnks8va2L0zcZymeU7TtWEgdRLNkceafKXEduv7QzgQAE4lT+suwooG9dC7LFhdRAbVQ== dependencies: "@babel/helper-module-transforms" "^7.1.0" "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-simple-access" "^7.1.0" -"@babel/plugin-transform-modules-systemjs@^7.0.0": - version "7.1.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.1.3.tgz#2119a3e3db612fd74a19d88652efbfe9613a5db0" - integrity sha512-PvTxgjxQAq4pvVUZF3mD5gEtVDuId8NtWkJsZLEJZMZAW3TvgQl1pmydLLN1bM8huHFVVU43lf0uvjQj9FRkKw== +"@babel/plugin-transform-modules-systemjs@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.2.0.tgz#912bfe9e5ff982924c81d0937c92d24994bb9068" + integrity sha512-aYJwpAhoK9a+1+O625WIjvMY11wkB/ok0WClVwmeo3mCjcNRjt+/8gHWrB5i+00mUju0gWsBkQnPpdvQ7PImmQ== dependencies: "@babel/helper-hoist-variables" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-modules-umd@^7.0.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.1.0.tgz#a29a7d85d6f28c3561c33964442257cc6a21f2a8" - integrity sha512-enrRtn5TfRhMmbRwm7F8qOj0qEYByqUvTttPEGimcBH4CJHphjyK1Vg7sdU7JjeEmgSpM890IT/efS2nMHwYig== +"@babel/plugin-transform-modules-umd@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.2.0.tgz#7678ce75169f0877b8eb2235538c074268dd01ae" + integrity sha512-BV3bw6MyUH1iIsGhXlOK6sXhmSarZjtJ/vMiD9dNmpY8QXFFQTj+6v92pcfy1iqa8DeAfJFwoxcrS/TUZda6sw== dependencies: "@babel/helper-module-transforms" "^7.1.0" "@babel/helper-plugin-utils" "^7.0.0" @@ -419,18 +426,18 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-object-super@^7.0.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.1.0.tgz#b1ae194a054b826d8d4ba7ca91486d4ada0f91bb" - integrity sha512-/O02Je1CRTSk2SSJaq0xjwQ8hG4zhZGNjE8psTsSNPXyLRCODv7/PBozqT5AmQMzp7MI3ndvMhGdqp9c96tTEw== +"@babel/plugin-transform-object-super@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.2.0.tgz#b35d4c10f56bab5d650047dad0f1d8e8814b6598" + integrity sha512-VMyhPYZISFZAqAPVkiYb7dUe2AsVi2/wCT5+wZdsNO31FojQJa9ns40hzZ6U9f50Jlq4w6qwzdBB2uwqZ00ebg== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-replace-supers" "^7.1.0" -"@babel/plugin-transform-parameters@^7.0.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.1.0.tgz#44f492f9d618c9124026e62301c296bf606a7aed" - integrity sha512-vHV7oxkEJ8IHxTfRr3hNGzV446GAb+0hgbA7o/0Jd76s+YzccdWuTU296FOCOl/xweU4t/Ya4g41yWz80RFCRw== +"@babel/plugin-transform-parameters@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.2.0.tgz#0d5ad15dc805e2ea866df4dd6682bfe76d1408c2" + integrity sha512-kB9+hhUidIgUoBQ0MsxMewhzr8i60nMa2KgeJKQWYrqQpqcBYtnpR+JgkadZVZoaEZ/eKu9mclFaVwhRpLNSzA== dependencies: "@babel/helper-call-delegate" "^7.1.0" "@babel/helper-get-function-arity" "^7.0.0" @@ -443,100 +450,108 @@ dependencies: regenerator-transform "^0.13.3" -"@babel/plugin-transform-shorthand-properties@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.0.0.tgz#85f8af592dcc07647541a0350e8c95c7bf419d15" - integrity sha512-g/99LI4vm5iOf5r1Gdxq5Xmu91zvjhEG5+yZDJW268AZELAu4J1EiFLnkSG3yuUsZyOipVOVUKoGPYwfsTymhw== +"@babel/plugin-transform-shorthand-properties@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.2.0.tgz#6333aee2f8d6ee7e28615457298934a3b46198f0" + integrity sha512-QP4eUM83ha9zmYtpbnyjTLAGKQritA5XW/iG9cjtuOI8s1RuL/3V6a3DeSHfKutJQ+ayUfeZJPcnCYEQzaPQqg== dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-spread@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.0.0.tgz#93583ce48dd8c85e53f3a46056c856e4af30b49b" - integrity sha512-L702YFy2EvirrR4shTj0g2xQp7aNwZoWNCkNu2mcoU0uyzMl0XRwDSwzB/xp6DSUFiBmEXuyAyEN16LsgVqGGQ== +"@babel/plugin-transform-spread@^7.2.0": + version "7.2.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.2.2.tgz#3103a9abe22f742b6d406ecd3cd49b774919b406" + integrity sha512-KWfky/58vubwtS0hLqEnrWJjsMGaOeSBn90Ezn5Jeg9Z8KKHmELbP1yGylMlm5N6TPKeY9A2+UaSYLdxahg01w== dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-sticky-regex@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.0.0.tgz#30a9d64ac2ab46eec087b8530535becd90e73366" - integrity sha512-LFUToxiyS/WD+XEWpkx/XJBrUXKewSZpzX68s+yEOtIbdnsRjpryDw9U06gYc6klYEij/+KQVRnD3nz3AoKmjw== +"@babel/plugin-transform-sticky-regex@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.2.0.tgz#a1e454b5995560a9c1e0d537dfc15061fd2687e1" + integrity sha512-KKYCoGaRAf+ckH8gEL3JHUaFVyNHKe3ASNsZ+AlktgHevvxGigoIttrEJb8iKN03Q7Eazlv1s6cx2B2cQ3Jabw== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-regex" "^7.0.0" -"@babel/plugin-transform-template-literals@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.0.0.tgz#084f1952efe5b153ddae69eb8945f882c7a97c65" - integrity sha512-vA6rkTCabRZu7Nbl9DfLZE1imj4tzdWcg5vtdQGvj+OH9itNNB6hxuRMHuIY8SGnEt1T9g5foqs9LnrHzsqEFg== +"@babel/plugin-transform-template-literals@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.2.0.tgz#d87ed01b8eaac7a92473f608c97c089de2ba1e5b" + integrity sha512-FkPix00J9A/XWXv4VoKJBMeSkyY9x/TqIh76wzcdfl57RJJcf8CehQ08uwfhCDNtRQYtHQKBTwKZDEyjE13Lwg== dependencies: "@babel/helper-annotate-as-pure" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-typeof-symbol@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.0.0.tgz#4dcf1e52e943e5267b7313bff347fdbe0f81cec9" - integrity sha512-1r1X5DO78WnaAIvs5uC48t41LLckxsYklJrZjNKcevyz83sF2l4RHbw29qrCPr/6ksFsdfRpT/ZgxNWHXRnffg== +"@babel/plugin-transform-typeof-symbol@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.2.0.tgz#117d2bcec2fbf64b4b59d1f9819894682d29f2b2" + integrity sha512-2LNhETWYxiYysBtrBTqL8+La0jIoQQnIScUJc74OYvUGRmkskNY4EzLCnjHBzdmb38wqtTaixpo1NctEcvMDZw== dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-unicode-regex@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.0.0.tgz#c6780e5b1863a76fe792d90eded9fcd5b51d68fc" - integrity sha512-uJBrJhBOEa3D033P95nPHu3nbFwFE9ZgXsfEitzoIXIwqAZWk7uXcg06yFKXz9FSxBH5ucgU/cYdX0IV8ldHKw== +"@babel/plugin-transform-typescript@^7.1.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.2.0.tgz#bce7c06300434de6a860ae8acf6a442ef74a99d1" + integrity sha512-EnI7i2/gJ7ZNr2MuyvN2Hu+BHJENlxWte5XygPvfj/MbvtOkWor9zcnHpMMQL2YYaaCcqtIvJUyJ7QVfoGs7ew== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-syntax-typescript" "^7.2.0" + +"@babel/plugin-transform-unicode-regex@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.2.0.tgz#4eb8db16f972f8abb5062c161b8b115546ade08b" + integrity sha512-m48Y0lMhrbXEJnVUaYly29jRXbQ3ksxPrS1Tg8t+MHqzXhtBYAvI51euOBaoAlZLPHsieY9XPVMf80a5x0cPcA== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-regex" "^7.0.0" regexpu-core "^4.1.3" -"@babel/preset-env@7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.0.0.tgz#f450f200c14e713f98cb14d113bf0c2cfbb89ca9" - integrity sha512-Fnx1wWaWv2w2rl+VHxA9si//Da40941IQ29fKiRejVR7oN1FxSEL8+SyAX/2oKIye2gPvY/GBbJVEKQ/oi43zQ== +"@babel/preset-env@^7.0.0": + version "7.2.3" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.2.3.tgz#948c8df4d4609c99c7e0130169f052ea6a7a8933" + integrity sha512-AuHzW7a9rbv5WXmvGaPX7wADxFkZIqKlbBh1dmZUQp4iwiPpkE/Qnrji6SC4UQCQzvWY/cpHET29eUhXS9cLPw== dependencies: "@babel/helper-module-imports" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-proposal-async-generator-functions" "^7.0.0" - "@babel/plugin-proposal-json-strings" "^7.0.0" - "@babel/plugin-proposal-object-rest-spread" "^7.0.0" - "@babel/plugin-proposal-optional-catch-binding" "^7.0.0" - "@babel/plugin-proposal-unicode-property-regex" "^7.0.0" - "@babel/plugin-syntax-async-generators" "^7.0.0" - "@babel/plugin-syntax-object-rest-spread" "^7.0.0" - "@babel/plugin-syntax-optional-catch-binding" "^7.0.0" - "@babel/plugin-transform-arrow-functions" "^7.0.0" - "@babel/plugin-transform-async-to-generator" "^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-dotall-regex" "^7.0.0" - "@babel/plugin-transform-duplicate-keys" "^7.0.0" - "@babel/plugin-transform-exponentiation-operator" "^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-modules-amd" "^7.0.0" - "@babel/plugin-transform-modules-commonjs" "^7.0.0" - "@babel/plugin-transform-modules-systemjs" "^7.0.0" - "@babel/plugin-transform-modules-umd" "^7.0.0" + "@babel/plugin-proposal-async-generator-functions" "^7.2.0" + "@babel/plugin-proposal-json-strings" "^7.2.0" + "@babel/plugin-proposal-object-rest-spread" "^7.2.0" + "@babel/plugin-proposal-optional-catch-binding" "^7.2.0" + "@babel/plugin-proposal-unicode-property-regex" "^7.2.0" + "@babel/plugin-syntax-async-generators" "^7.2.0" + "@babel/plugin-syntax-object-rest-spread" "^7.2.0" + "@babel/plugin-syntax-optional-catch-binding" "^7.2.0" + "@babel/plugin-transform-arrow-functions" "^7.2.0" + "@babel/plugin-transform-async-to-generator" "^7.2.0" + "@babel/plugin-transform-block-scoped-functions" "^7.2.0" + "@babel/plugin-transform-block-scoping" "^7.2.0" + "@babel/plugin-transform-classes" "^7.2.0" + "@babel/plugin-transform-computed-properties" "^7.2.0" + "@babel/plugin-transform-destructuring" "^7.2.0" + "@babel/plugin-transform-dotall-regex" "^7.2.0" + "@babel/plugin-transform-duplicate-keys" "^7.2.0" + "@babel/plugin-transform-exponentiation-operator" "^7.2.0" + "@babel/plugin-transform-for-of" "^7.2.0" + "@babel/plugin-transform-function-name" "^7.2.0" + "@babel/plugin-transform-literals" "^7.2.0" + "@babel/plugin-transform-modules-amd" "^7.2.0" + "@babel/plugin-transform-modules-commonjs" "^7.2.0" + "@babel/plugin-transform-modules-systemjs" "^7.2.0" + "@babel/plugin-transform-modules-umd" "^7.2.0" "@babel/plugin-transform-new-target" "^7.0.0" - "@babel/plugin-transform-object-super" "^7.0.0" - "@babel/plugin-transform-parameters" "^7.0.0" + "@babel/plugin-transform-object-super" "^7.2.0" + "@babel/plugin-transform-parameters" "^7.2.0" "@babel/plugin-transform-regenerator" "^7.0.0" - "@babel/plugin-transform-shorthand-properties" "^7.0.0" - "@babel/plugin-transform-spread" "^7.0.0" - "@babel/plugin-transform-sticky-regex" "^7.0.0" - "@babel/plugin-transform-template-literals" "^7.0.0" - "@babel/plugin-transform-typeof-symbol" "^7.0.0" - "@babel/plugin-transform-unicode-regex" "^7.0.0" - browserslist "^4.1.0" + "@babel/plugin-transform-shorthand-properties" "^7.2.0" + "@babel/plugin-transform-spread" "^7.2.0" + "@babel/plugin-transform-sticky-regex" "^7.2.0" + "@babel/plugin-transform-template-literals" "^7.2.0" + "@babel/plugin-transform-typeof-symbol" "^7.2.0" + "@babel/plugin-transform-unicode-regex" "^7.2.0" + browserslist "^4.3.4" invariant "^2.2.2" js-levenshtein "^1.1.3" semver "^5.3.0" -"@babel/preset-flow@7.0.0": +"@babel/preset-flow@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/preset-flow/-/preset-flow-7.0.0.tgz#afd764835d9535ec63d8c7d4caf1c06457263da2" integrity sha512-bJOHrYOPqJZCkPVbG1Lot2r5OSsB+iUOaxiHdlOeB1yPWS6evswVHwvkDLZ54WTaTRIk89ds0iHmGZSnxlPejQ== @@ -544,6 +559,14 @@ "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-flow-strip-types" "^7.0.0" +"@babel/preset-typescript@^7.0.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.1.0.tgz#49ad6e2084ff0bfb5f1f7fb3b5e76c434d442c7f" + integrity sha512-LYveByuF9AOM8WrsNne5+N79k1YxjNB6gmpCQsnuSBAcV8QUeB+ZUxQzL7Rz7HksPbahymKkq2qBR+o36ggFZA== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-transform-typescript" "^7.1.0" + "@babel/template@^7.1.0": version "7.1.2" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.1.2.tgz#090484a574fef5a2d2d7726a674eceda5c5b5644" @@ -584,19 +607,19 @@ ansi-styles@^3.2.1: dependencies: color-convert "^1.9.0" -browserslist@^4.1.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.2.1.tgz#257a24c879d1cd4016348eee5c25de683260b21d" - integrity sha512-1oO0c7Zhejwd+LXihS89WqtKionSbz298rJZKJgfrHIZhrV8AC15gw553VcB0lcEugja7IhWD7iAlrsamfYVPA== +browserslist@^4.3.4: + version "4.4.0" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.4.0.tgz#7050d1412cbfc5274aba609ed5e50359ca1a5fdf" + integrity sha512-tQkHS8VVxWbrjnNDXgt7/+SuPJ7qDvD0Y2e6bLtoQluR2SPvlmPUcfcU75L1KAalhqULlIFJlJ6BDfnYyJxJsw== dependencies: - caniuse-lite "^1.0.30000890" - electron-to-chromium "^1.3.79" - node-releases "^1.0.0-alpha.14" + caniuse-lite "^1.0.30000928" + electron-to-chromium "^1.3.100" + node-releases "^1.1.3" -caniuse-lite@^1.0.30000890: - version "1.0.30000892" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000892.tgz#344d2b51ee3ff5977537da4aa449c90eec40b759" - integrity sha512-X9rxMaWZNbJB5qjkDqPtNv/yfViTeUL6ILk0QJNxLV3OhKC5Acn5vxsuUvllR6B48mog8lmS+whwHq/QIYSL9w== +caniuse-lite@^1.0.30000928: + version "1.0.30000928" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000928.tgz#805e828dc72b06498e3683a32e61c7507fd67b88" + integrity sha512-aSpMWRXL6ZXNnzm8hgE4QDLibG5pVJ2Ujzsuj3icazlIkxXkPXtL+BWnMx6FBkWmkZgBHGUxPZQvrbRw2ZTxhg== chalk@^2.0.0: version "2.4.1" @@ -626,10 +649,10 @@ debug@^3.1.0: dependencies: ms "^2.1.1" -electron-to-chromium@^1.3.79: - version "1.3.79" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.79.tgz#774718f06284a4bf8f578ac67e74508fe659f13a" - integrity sha512-LQdY3j4PxuUl6xfxiFruTSlCniTrTrzAd8/HfsLEMi0PUpaQ0Iy+Pr4N4VllDYjs0Hyu2lkTbvzqlG+PX9NsNw== +electron-to-chromium@^1.3.100: + version "1.3.103" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.103.tgz#a695777efdbc419cad6cbb0e58458251302cd52f" + integrity sha512-tObPqGmY9X8MUM8i3MEimYmbnLLf05/QV5gPlkR8MQ3Uj8G8B2govE1U4cQcBYtv3ymck9Y8cIOu4waoiykMZQ== escape-string-regexp@^1.0.5: version "1.0.5" @@ -695,10 +718,10 @@ ms@^2.1.1: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== -node-releases@^1.0.0-alpha.14: - version "1.0.0-alpha.14" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.0.0-alpha.14.tgz#da9e2780add4bbb59ad890af9e2018a1d9c0034b" - integrity sha512-G8nnF9cP9QPP/jUmYWw/uUUhumHmkm+X/EarCugYFjYm2uXRMFeOD6CVT3RLdoyCvDUNy51nirGfUItKWs/S1g== +node-releases@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.3.tgz#aad9ce0dcb98129c753f772c0aa01360fb90fbd2" + integrity sha512-6VrvH7z6jqqNFY200kdB6HdzkgM96Oaj9v3dqGfgp6mF+cHmU4wyQKZ2/WPDRVoR0Jz9KqbamaBN0ZhdUaysUQ== dependencies: semver "^5.3.0" diff --git a/e2e/custom-resolver/package.json b/e2e/custom-resolver/package.json index dd319619f468..30c098aeff67 100644 --- a/e2e/custom-resolver/package.json +++ b/e2e/custom-resolver/package.json @@ -2,6 +2,10 @@ "name": "custom-resolver", "jest": { "globalSetup": "foo", - "resolver": "./resolver.js" + "resolver": "./resolver.js", + "transformIgnorePatterns": [ + "/node_modules/", + "/packages/" + ] } } diff --git a/e2e/failures/__tests__/duringTests.test.js b/e2e/failures/__tests__/duringTests.test.js index 60ba1c3f05b7..c315f5aa7cdc 100644 --- a/e2e/failures/__tests__/duringTests.test.js +++ b/e2e/failures/__tests__/duringTests.test.js @@ -21,7 +21,6 @@ test('undefined thrown during test', () => { }); test('Object thrown during test', () => { - // eslint-disable-next-line no-throw-literal throw deepObject; }); diff --git a/e2e/global-setup/babel.config.js b/e2e/global-setup/babel.config.js new file mode 100644 index 000000000000..245aa3fd79db --- /dev/null +++ b/e2e/global-setup/babel.config.js @@ -0,0 +1,5 @@ +// Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + +module.exports = { + presets: ['@babel/preset-flow'], +}; diff --git a/e2e/global-setup/package.json b/e2e/global-setup/package.json index 148788b25446..3dc54e8651bf 100644 --- a/e2e/global-setup/package.json +++ b/e2e/global-setup/package.json @@ -1,5 +1,9 @@ { "jest": { - "testEnvironment": "node" + "testEnvironment": "node", + "transformIgnorePatterns": [ + "/node_modules/", + "/packages/" + ] } } diff --git a/e2e/global-setup/project-1/setup.js b/e2e/global-setup/project-1/setup.js index 51e0ce22576f..f5374c480b30 100644 --- a/e2e/global-setup/project-1/setup.js +++ b/e2e/global-setup/project-1/setup.js @@ -6,7 +6,7 @@ */ const crypto = require('crypto'); const fs = require('fs'); -const mkdirp = require('mkdirp'); +const {createDirectory} = require('jest-util'); const os = require('os'); const path = require('path'); @@ -14,7 +14,7 @@ const DIR = path.join(os.tmpdir(), 'jest-global-setup-project-1'); module.exports = function() { return new Promise((resolve, reject) => { - mkdirp.sync(DIR); + createDirectory(DIR); const fileId = crypto.randomBytes(20).toString('hex'); fs.writeFileSync(path.join(DIR, fileId), 'setup'); resolve(); diff --git a/e2e/global-setup/project-2/setup.js b/e2e/global-setup/project-2/setup.js index 3f57e1cec83b..383f473c424e 100644 --- a/e2e/global-setup/project-2/setup.js +++ b/e2e/global-setup/project-2/setup.js @@ -6,7 +6,7 @@ */ const crypto = require('crypto'); const fs = require('fs'); -const mkdirp = require('mkdirp'); +const {createDirectory} = require('jest-util'); const os = require('os'); const path = require('path'); @@ -14,7 +14,7 @@ const DIR = path.join(os.tmpdir(), 'jest-global-setup-project-2'); module.exports = function() { return new Promise((resolve, reject) => { - mkdirp.sync(DIR); + createDirectory(DIR); const fileId = crypto.randomBytes(20).toString('hex'); fs.writeFileSync(path.join(DIR, fileId), 'setup'); resolve(); diff --git a/e2e/global-setup/projects.jest.config.js b/e2e/global-setup/projects.jest.config.js index 46ecc5a58c22..9d008ac5cd06 100644 --- a/e2e/global-setup/projects.jest.config.js +++ b/e2e/global-setup/projects.jest.config.js @@ -15,12 +15,14 @@ module.exports = { globalSetup: '/setup.js', rootDir: path.resolve(__dirname, './project-1'), testMatch: ['/**/*.test.js'], + transformIgnorePatterns: ['/node_modules/', '/packages/'], }, { displayName: 'project-2', globalSetup: '/setup.js', rootDir: path.resolve(__dirname, './project-2'), testMatch: ['/**/*.test.js'], + transformIgnorePatterns: ['/node_modules/', '/packages/'], }, ], }; diff --git a/e2e/global-setup/setup.js b/e2e/global-setup/setup.js index 79a7ed3c2c24..39e924c39daf 100644 --- a/e2e/global-setup/setup.js +++ b/e2e/global-setup/setup.js @@ -6,15 +6,16 @@ */ const crypto = require('crypto'); const fs = require('fs'); -const mkdirp = require('mkdirp'); +const {createDirectory} = require('jest-util'); const os = require('os'); const path = require('path'); const DIR = path.join(os.tmpdir(), 'jest-global-setup'); module.exports = function() { - return new Promise((resolve, reject) => { - mkdirp.sync(DIR); + // This uses a flow annotation to show it can be transpiled + return new Promise((resolve, reject: any) => { + createDirectory(DIR); const fileId = crypto.randomBytes(20).toString('hex'); fs.writeFileSync(path.join(DIR, fileId), 'setup'); resolve(); diff --git a/e2e/global-teardown/package.json b/e2e/global-teardown/package.json index 148788b25446..3dc54e8651bf 100644 --- a/e2e/global-teardown/package.json +++ b/e2e/global-teardown/package.json @@ -1,5 +1,9 @@ { "jest": { - "testEnvironment": "node" + "testEnvironment": "node", + "transformIgnorePatterns": [ + "/node_modules/", + "/packages/" + ] } } diff --git a/e2e/global-teardown/project-1/teardown.js b/e2e/global-teardown/project-1/teardown.js index 13f842d15c14..d153236c1e7c 100644 --- a/e2e/global-teardown/project-1/teardown.js +++ b/e2e/global-teardown/project-1/teardown.js @@ -6,7 +6,7 @@ */ const crypto = require('crypto'); const fs = require('fs'); -const mkdirp = require('mkdirp'); +const {createDirectory} = require('jest-util'); const os = require('os'); const path = require('path'); @@ -14,7 +14,7 @@ const DIR = path.join(os.tmpdir(), 'jest-global-teardown-project-1'); module.exports = function() { return new Promise((resolve, reject) => { - mkdirp.sync(DIR); + createDirectory(DIR); const fileId = crypto.randomBytes(20).toString('hex'); fs.writeFileSync(path.join(DIR, fileId), 'teardown'); resolve(); diff --git a/e2e/global-teardown/project-2/teardown.js b/e2e/global-teardown/project-2/teardown.js index 97aeedc4e592..95eb1b32a6b0 100644 --- a/e2e/global-teardown/project-2/teardown.js +++ b/e2e/global-teardown/project-2/teardown.js @@ -6,7 +6,7 @@ */ const crypto = require('crypto'); const fs = require('fs'); -const mkdirp = require('mkdirp'); +const {createDirectory} = require('jest-util'); const os = require('os'); const path = require('path'); @@ -14,7 +14,7 @@ const DIR = path.join(os.tmpdir(), 'jest-global-teardown-project-2'); module.exports = function() { return new Promise((resolve, reject) => { - mkdirp.sync(DIR); + createDirectory(DIR); const fileId = crypto.randomBytes(20).toString('hex'); fs.writeFileSync(path.join(DIR, fileId), 'teardown'); resolve(); diff --git a/e2e/global-teardown/projects.jest.config.js b/e2e/global-teardown/projects.jest.config.js index 9f2c416027ab..55baa56ebe15 100644 --- a/e2e/global-teardown/projects.jest.config.js +++ b/e2e/global-teardown/projects.jest.config.js @@ -15,12 +15,14 @@ module.exports = { globalTeardown: '/teardown.js', rootDir: path.resolve(__dirname, './project-1'), testMatch: ['/**/*.test.js'], + transformIgnorePatterns: ['/node_modules/', '/packages/'], }, { displayName: 'project-2', globalTeardown: '/teardown.js', rootDir: path.resolve(__dirname, './project-2'), testMatch: ['/**/*.test.js'], + transformIgnorePatterns: ['/node_modules/', '/packages/'], }, ], }; diff --git a/e2e/global-teardown/teardown.js b/e2e/global-teardown/teardown.js index c318daacf16b..e5c4d27a9b62 100644 --- a/e2e/global-teardown/teardown.js +++ b/e2e/global-teardown/teardown.js @@ -6,7 +6,7 @@ */ const crypto = require('crypto'); const fs = require('fs'); -const mkdirp = require('mkdirp'); +const {createDirectory} = require('jest-util'); const os = require('os'); const path = require('path'); @@ -14,7 +14,7 @@ const DIR = path.join(os.tmpdir(), 'jest-global-teardown'); module.exports = function() { return new Promise((resolve, reject) => { - mkdirp.sync(DIR); + createDirectory(DIR); const fileId = crypto.randomBytes(20).toString('hex'); fs.writeFileSync(path.join(DIR, fileId), 'teardown'); resolve(); diff --git a/e2e/runJest.js b/e2e/runJest.js index 3c49bfc8b383..d1765d1b140d 100644 --- a/e2e/runJest.js +++ b/e2e/runJest.js @@ -12,7 +12,7 @@ import path from 'path'; import fs from 'fs'; import execa, {sync as spawnSync} from 'execa'; import {Writable} from 'readable-stream'; -const stripAnsi = require('strip-ansi'); +import stripAnsi from 'strip-ansi'; import {normalizeIcons} from './Utils'; const JEST_PATH = path.resolve(__dirname, '../packages/jest-cli/bin/jest.js'); diff --git a/e2e/test-environment-async/TestEnvironment.js b/e2e/test-environment-async/TestEnvironment.js index 88182fb04b4f..c33865fe673d 100644 --- a/e2e/test-environment-async/TestEnvironment.js +++ b/e2e/test-environment-async/TestEnvironment.js @@ -4,7 +4,7 @@ const fs = require('fs'); const os = require('os'); -const mkdirp = require('mkdirp'); +const {createDirectory} = require('jest-util'); const JSDOMEnvironment = require('jest-environment-jsdom'); const DIR = os.tmpdir() + '/jest-test-environment'; @@ -24,7 +24,7 @@ class TestEnvironment extends JSDOMEnvironment { teardown() { return super.teardown().then(() => { - mkdirp.sync(DIR); + createDirectory(DIR); fs.writeFileSync(DIR + '/teardown', 'teardown'); }); } diff --git a/examples/enzyme/__tests__/CheckboxWithLabel-test.js b/examples/enzyme/__tests__/CheckboxWithLabel-test.js index a8e08b42b10a..be7aabef2437 100644 --- a/examples/enzyme/__tests__/CheckboxWithLabel-test.js +++ b/examples/enzyme/__tests__/CheckboxWithLabel-test.js @@ -1,7 +1,5 @@ // Copyright 2004-present Facebook. All Rights Reserved. -/* eslint-disable no-unused-vars */ - import React from 'react'; import Enzyme, {shallow} from 'enzyme'; import Adapter from 'enzyme-adapter-react-16'; diff --git a/examples/react/__tests__/CheckboxWithLabel-test.js b/examples/react/__tests__/CheckboxWithLabel-test.js index fab2050fd26b..e563307dab59 100644 --- a/examples/react/__tests__/CheckboxWithLabel-test.js +++ b/examples/react/__tests__/CheckboxWithLabel-test.js @@ -1,7 +1,5 @@ // Copyright 2004-present Facebook. All Rights Reserved. -/* eslint-disable no-unused-vars */ - import React from 'react'; import ReactDOM from 'react-dom'; import * as TestUtils from 'react-dom/test-utils'; diff --git a/examples/snapshot/__tests__/clock.react.test.js b/examples/snapshot/__tests__/clock.react.test.js index d37ec7ac3fd4..a001ce248355 100644 --- a/examples/snapshot/__tests__/clock.react.test.js +++ b/examples/snapshot/__tests__/clock.react.test.js @@ -1,5 +1,4 @@ // Copyright 2004-present Facebook. All Rights Reserved. -/* eslint-disable no-unused-vars */ 'use strict'; diff --git a/examples/snapshot/__tests__/link.react.test.js b/examples/snapshot/__tests__/link.react.test.js index 6b594f244220..fd9b87115c42 100644 --- a/examples/snapshot/__tests__/link.react.test.js +++ b/examples/snapshot/__tests__/link.react.test.js @@ -1,5 +1,4 @@ // Copyright 2004-present Facebook. All Rights Reserved. -/* eslint-disable no-unused-vars */ 'use strict'; diff --git a/package.json b/package.json index 14d7b88f5e01..f2e720baeffa 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "karma-mocha": "^1.3.0", "left-pad": "^1.1.1", "lerna": "3.10.5", - "micromatch": "^2.3.11", + "micromatch": "^3.1.10", "mkdirp": "^0.5.1", "mocha": "^5.0.1", "mock-fs": "^4.4.1", @@ -59,7 +59,6 @@ "rollup-plugin-flow": "^1.1.1", "rollup-plugin-json": "^3.1.0", "rollup-plugin-node-builtins": "^2.1.1", - "rollup-plugin-node-globals": "^1.4.0", "rollup-plugin-node-resolve": "^4.0.0", "slash": "^2.0.0", "string-length": "^2.0.0", @@ -75,7 +74,7 @@ "clean-e2e": "find ./e2e -not \\( -path ./e2e/presets/js -prune \\) -not \\( -path ./e2e/presets/json -prune \\) -mindepth 2 -type d \\( -name node_modules -prune \\) -exec rm -r '{}' +", "jest": "node ./packages/jest-cli/bin/jest.js", "jest-coverage": "yarn jest --coverage", - "lint": "eslint . --cache --ext js,md", + "lint": "eslint . --cache --report-unused-disable-directives --ext js,md", "lint-es5-build": "eslint --no-eslintrc --no-ignore --env=browser packages/*/build-es5", "lint:md": "yarn --silent lint:md:ci --fix", "lint:md:ci": "prettylint '**/*.md' --ignore-path .gitignore", diff --git a/packages/babel-jest/package.json b/packages/babel-jest/package.json index 6cc0a5134faf..ee318925880d 100644 --- a/packages/babel-jest/package.json +++ b/packages/babel-jest/package.json @@ -4,7 +4,8 @@ "version": "23.6.0", "repository": { "type": "git", - "url": "https://github.com/facebook/jest.git" + "url": "https://github.com/facebook/jest.git", + "directory": "packages/babel-jest" }, "license": "MIT", "main": "build/index.js", diff --git a/packages/babel-plugin-jest-hoist/package.json b/packages/babel-plugin-jest-hoist/package.json index 22ddd76455b4..f8c86ecae89a 100644 --- a/packages/babel-plugin-jest-hoist/package.json +++ b/packages/babel-plugin-jest-hoist/package.json @@ -3,7 +3,8 @@ "version": "23.2.0", "repository": { "type": "git", - "url": "https://github.com/facebook/jest.git" + "url": "https://github.com/facebook/jest.git", + "directory": "packages/babel-plugin-jest-hoist" }, "engines": { "node": ">= 6" diff --git a/packages/babel-plugin-jest-hoist/src/index.js b/packages/babel-plugin-jest-hoist/src/index.js index d48bc1bf4bd2..13f9c2bdcc00 100644 --- a/packages/babel-plugin-jest-hoist/src/index.js +++ b/packages/babel-plugin-jest-hoist/src/index.js @@ -76,7 +76,7 @@ const IDVisitor = { ReferencedIdentifier(path) { this.ids.add(path); }, - blacklist: ['TypeAnnotation'], + blacklist: ['TypeAnnotation', 'TSTypeAnnotation'], }; const FUNCTIONS: Object = Object.create(null); diff --git a/packages/babel-preset-jest/package.json b/packages/babel-preset-jest/package.json index 357ddc7029a4..bdc616baa29c 100644 --- a/packages/babel-preset-jest/package.json +++ b/packages/babel-preset-jest/package.json @@ -3,7 +3,8 @@ "version": "23.2.0", "repository": { "type": "git", - "url": "https://github.com/facebook/jest.git" + "url": "https://github.com/facebook/jest.git", + "directory": "packages/babel-preset-jest" }, "license": "MIT", "main": "index.js", diff --git a/packages/diff-sequences/package.json b/packages/diff-sequences/package.json index 1428313d9399..d499f0de5684 100644 --- a/packages/diff-sequences/package.json +++ b/packages/diff-sequences/package.json @@ -3,7 +3,8 @@ "version": "23.6.0", "repository": { "type": "git", - "url": "https://github.com/facebook/jest.git" + "url": "https://github.com/facebook/jest.git", + "directory": "packages/diff-sequences" }, "license": "MIT", "description": "Compare items in two sequences to find a longest common subsequence", diff --git a/packages/eslint-config-fb-strict/package.json b/packages/eslint-config-fb-strict/package.json index 6bdf4d6ef5df..f205d1564ec7 100644 --- a/packages/eslint-config-fb-strict/package.json +++ b/packages/eslint-config-fb-strict/package.json @@ -3,7 +3,8 @@ "version": "23.2.0", "repository": { "type": "git", - "url": "https://github.com/facebook/jest.git" + "url": "https://github.com/facebook/jest.git", + "directory": "packages/eslint-config-fb-strict" }, "license": "MIT", "dependencies": { diff --git a/packages/expect/package.json b/packages/expect/package.json index 313df003904d..0a6b1c3c28c3 100644 --- a/packages/expect/package.json +++ b/packages/expect/package.json @@ -3,7 +3,8 @@ "version": "23.6.0", "repository": { "type": "git", - "url": "https://github.com/facebook/jest.git" + "url": "https://github.com/facebook/jest.git", + "directory": "packages/expect" }, "license": "MIT", "main": "build/index.js", diff --git a/packages/jest-changed-files/package.json b/packages/jest-changed-files/package.json index b94dae7dcfa4..b8a4d9e3cb10 100644 --- a/packages/jest-changed-files/package.json +++ b/packages/jest-changed-files/package.json @@ -3,7 +3,8 @@ "version": "23.4.2", "repository": { "type": "git", - "url": "https://github.com/facebook/jest.git" + "url": "https://github.com/facebook/jest.git", + "directory": "packages/jest-changed-files" }, "license": "MIT", "main": "build/index.js", diff --git a/packages/jest-circus/package.json b/packages/jest-circus/package.json index 9ae03271ff97..7778c15cdd52 100644 --- a/packages/jest-circus/package.json +++ b/packages/jest-circus/package.json @@ -3,7 +3,8 @@ "version": "23.6.0", "repository": { "type": "git", - "url": "https://github.com/facebook/jest.git" + "url": "https://github.com/facebook/jest.git", + "directory": "packages/jest-circus" }, "license": "MIT", "main": "build/index.js", diff --git a/packages/jest-cli/package.json b/packages/jest-cli/package.json index bfb7d9f3f18e..c84b1f30021a 100644 --- a/packages/jest-cli/package.json +++ b/packages/jest-cli/package.json @@ -30,8 +30,10 @@ "jest-validate": "^23.6.0", "jest-watcher": "^23.4.0", "jest-worker": "^23.2.0", - "micromatch": "^2.3.11", + "micromatch": "^3.1.10", "node-notifier": "^5.2.1", + "p-each-series": "^1.0.0", + "pirates": "^4.0.0", "prompts": "^2.0.1", "realpath-native": "^1.0.0", "rimraf": "^2.5.4", @@ -49,7 +51,8 @@ }, "repository": { "type": "git", - "url": "https://github.com/facebook/jest" + "url": "https://github.com/facebook/jest", + "directory": "packages/jest-cli" }, "bugs": { "url": "https://github.com/facebook/jest/issues" diff --git a/packages/jest-cli/src/SearchSource.js b/packages/jest-cli/src/SearchSource.js index 1744ef00bb2a..3d004d8ef140 100644 --- a/packages/jest-cli/src/SearchSource.js +++ b/packages/jest-cli/src/SearchSource.js @@ -19,6 +19,7 @@ import testPathPatternToRegExp from './testPathPatternToRegexp'; import {escapePathForRegex} from 'jest-regex-util'; import {replaceRootDirInPath} from 'jest-config'; import {buildSnapshotResolver} from 'jest-snapshot'; +import {replacePathSepForGlob} from 'jest-util'; type SearchResult = {| noSCM?: boolean, @@ -48,7 +49,8 @@ const globsToMatcher = (globs: ?Array) => { return () => true; } - return path => micromatch([path], globs, {dot: true}).length > 0; + return path => + micromatch.some(replacePathSepForGlob(path), globs, {dot: true}); }; const regexToMatcher = (testRegex: Array) => { diff --git a/packages/jest-cli/src/__tests__/SearchSource.test.js b/packages/jest-cli/src/__tests__/SearchSource.test.js index 53d979ec0d56..0a5ddef370dc 100644 --- a/packages/jest-cli/src/__tests__/SearchSource.test.js +++ b/packages/jest-cli/src/__tests__/SearchSource.test.js @@ -9,9 +9,9 @@ 'use strict'; import path from 'path'; -import {skipSuiteOnWindows} from '../../../../scripts/ConditionalTest'; jest.setTimeout(15000); + const rootDir = path.resolve(__dirname, 'test_root'); const testRegex = path.sep + '__testtests__' + path.sep; const testMatch = ['**/__testtests__/**/*']; @@ -23,8 +23,6 @@ let findMatchingTests; let normalize; describe('SearchSource', () => { - skipSuiteOnWindows(); - const name = 'SearchSource'; let Runtime; let SearchSource; @@ -481,22 +479,24 @@ describe('SearchSource', () => { }); it('does not mistake roots folders with prefix names', async () => { - const config = normalize( - { - name, - rootDir: '.', - roots: ['/foo/bar/prefix'], - }, - {}, - ).options; + if (process.platform !== 'win32') { + const config = normalize( + { + name, + rootDir: '.', + roots: ['/foo/bar/prefix'], + }, + {}, + ).options; - searchSource = new SearchSource( - await Runtime.createContext(config, {maxWorkers}), - ); + searchSource = new SearchSource( + await Runtime.createContext(config, {maxWorkers}), + ); - const input = ['/foo/bar/prefix-suffix/__tests__/my-test.test.js']; - const data = searchSource.findTestsByPaths(input); - expect(data.tests).toEqual([]); + const input = ['/foo/bar/prefix-suffix/__tests__/my-test.test.js']; + const data = searchSource.findTestsByPaths(input); + expect(data.tests).toEqual([]); + } }); }); }); diff --git a/packages/jest-cli/src/__tests__/runJestWithCoverage.test.js b/packages/jest-cli/src/__tests__/runJestWithCoverage.test.js index 21a9d76c0c40..e0ceb5266755 100644 --- a/packages/jest-cli/src/__tests__/runJestWithCoverage.test.js +++ b/packages/jest-cli/src/__tests__/runJestWithCoverage.test.js @@ -2,7 +2,13 @@ import runJest from '../runJest'; -jest.mock('jest-util'); +jest.mock('jest-util', () => { + const util = jest.requireActual('jest-util'); + return { + ...jest.genMockFromModule('jest-util'), + replacePathSepForGlob: util.replacePathSepForGlob, + }; +}); jest.mock( '../TestScheduler', diff --git a/packages/jest-cli/src/runGlobalHook.js b/packages/jest-cli/src/runGlobalHook.js index 844b39729726..cd5a4ff06bad 100644 --- a/packages/jest-cli/src/runGlobalHook.js +++ b/packages/jest-cli/src/runGlobalHook.js @@ -6,9 +6,15 @@ * * @flow */ + import type {GlobalConfig} from 'types/Config'; import type {Test} from 'types/TestRunner'; +import {extname} from 'path'; +import pEachSeries from 'p-each-series'; +import {addHook} from 'pirates'; +import Runtime from 'jest-runtime'; + export default ({ allTests, globalConfig, @@ -17,7 +23,7 @@ export default ({ allTests: Array, globalConfig: GlobalConfig, moduleName: 'globalSetup' | 'globalTeardown', -}): Promise => { +}): Promise => { const globalModulePaths = new Set( allTests.map(test => test.context.config[moduleName]), ); @@ -27,24 +33,44 @@ export default ({ } if (globalModulePaths.size > 0) { - return Promise.all( - Array.from(globalModulePaths).map(async modulePath => { - if (!modulePath) { - return null; - } - - // $FlowFixMe - const globalModule = require(modulePath); - - if (typeof globalModule !== 'function') { - throw new TypeError( - `${moduleName} file must export a function at ${modulePath}`, - ); - } - - return globalModule(globalConfig); - }), - ); + return pEachSeries(Array.from(globalModulePaths), async modulePath => { + if (!modulePath) { + return; + } + + const correctConfig = allTests.find( + t => t.context.config[moduleName] === modulePath, + ); + + const projectConfig = correctConfig + ? correctConfig.context.config + : // Fallback to first config + allTests[0].context.config; + + const transformer = new Runtime.ScriptTransformer(projectConfig); + + const revertHook = addHook( + (code, filename) => + transformer.transformSource(filename, code, false).code || code, + { + exts: [extname(modulePath)], + matcher: transformer._shouldTransform.bind(transformer), + }, + ); + + // $FlowFixMe + const globalModule = require(modulePath); + + if (typeof globalModule !== 'function') { + throw new TypeError( + `${moduleName} file must export a function at ${modulePath}`, + ); + } + + await globalModule(globalConfig); + + revertHook(); + }); } return Promise.resolve(); diff --git a/packages/jest-cli/src/runJest.js b/packages/jest-cli/src/runJest.js index 8e3a6dcb1785..121cb201c72e 100644 --- a/packages/jest-cli/src/runJest.js +++ b/packages/jest-cli/src/runJest.js @@ -19,7 +19,7 @@ import micromatch from 'micromatch'; import chalk from 'chalk'; import path from 'path'; import {sync as realpath} from 'realpath-native'; -import {Console, formatTestResults} from 'jest-util'; +import {Console, formatTestResults, replacePathSepForGlob} from 'jest-util'; import exit from 'exit'; import fs from 'graceful-fs'; import getNoTestsFoundMessage from './getNoTestsFoundMessage'; @@ -165,10 +165,12 @@ export default (async function runJest({ matches.collectCoverageFrom.filter(filename => { if ( globalConfig.collectCoverageFrom && - !micromatch( - [path.relative(globalConfig.rootDir, filename)], + !micromatch.some( + replacePathSepForGlob( + path.relative(globalConfig.rootDir, filename), + ), globalConfig.collectCoverageFrom, - ).length + ) ) { return false; } diff --git a/packages/jest-config/package.json b/packages/jest-config/package.json index 1088d90fc266..f41992144802 100644 --- a/packages/jest-config/package.json +++ b/packages/jest-config/package.json @@ -3,7 +3,8 @@ "version": "23.6.0", "repository": { "type": "git", - "url": "https://github.com/facebook/jest.git" + "url": "https://github.com/facebook/jest.git", + "directory": "packages/jest-config" }, "license": "MIT", "main": "build/index.js", @@ -20,7 +21,7 @@ "jest-resolve": "^23.6.0", "jest-util": "^23.4.0", "jest-validate": "^23.6.0", - "micromatch": "^2.3.11", + "micromatch": "^3.1.10", "pretty-format": "^23.6.0", "realpath-native": "^1.0.2" }, diff --git a/packages/jest-config/src/index.js b/packages/jest-config/src/index.js index 7502ea6ffb51..16affb204add 100644 --- a/packages/jest-config/src/index.js +++ b/packages/jest-config/src/index.js @@ -286,6 +286,7 @@ export function readConfigs( .filter(root => { // Ignore globbed files that cannot be `require`d. if ( + typeof root === 'string' && fs.existsSync(root) && !fs.lstatSync(root).isDirectory() && !root.endsWith('.js') && diff --git a/packages/jest-config/src/normalize.js b/packages/jest-config/src/normalize.js index 4133f3f51351..a001625daf47 100644 --- a/packages/jest-config/src/normalize.js +++ b/packages/jest-config/src/normalize.js @@ -21,7 +21,7 @@ import glob from 'glob'; import path from 'path'; import {ValidationError, validate} from 'jest-validate'; import validatePattern from './validatePattern'; -import {clearLine} from 'jest-util'; +import {clearLine, replacePathSepForGlob} from 'jest-util'; import chalk from 'chalk'; import getMaxWorkers from './getMaxWorkers'; import micromatch from 'micromatch'; @@ -608,10 +608,20 @@ export default function normalize(options: InitialOptions, argv: Argv) { break; case 'moduleDirectories': case 'testMatch': - value = _replaceRootDirTags( - escapeGlobCharacters(options.rootDir), - options[key], - ); + { + const replacedRootDirTags = _replaceRootDirTags( + escapeGlobCharacters(options.rootDir), + options[key], + ); + + if (replacedRootDirTags) { + value = Array.isArray(replacedRootDirTags) + ? replacedRootDirTags.map(replacePathSepForGlob) + : replacePathSepForGlob(replacedRootDirTags); + } else { + value = replacedRootDirTags; + } + } break; case 'testRegex': value = options[key] @@ -810,10 +820,10 @@ export default function normalize(options: InitialOptions, argv: Argv) { if (newOptions.collectCoverageFrom) { collectCoverageFrom = collectCoverageFrom.reduce((patterns, filename) => { if ( - !micromatch( - [path.relative(options.rootDir, filename)], + !micromatch.some( + replacePathSepForGlob(path.relative(options.rootDir, filename)), newOptions.collectCoverageFrom, - ).length + ) ) { return patterns; } diff --git a/packages/jest-diff/package.json b/packages/jest-diff/package.json index 7f09f4270557..e2df7d315b06 100644 --- a/packages/jest-diff/package.json +++ b/packages/jest-diff/package.json @@ -3,7 +3,8 @@ "version": "23.6.0", "repository": { "type": "git", - "url": "https://github.com/facebook/jest.git" + "url": "https://github.com/facebook/jest.git", + "directory": "packages/jest-diff" }, "license": "MIT", "main": "build/index.js", diff --git a/packages/jest-docblock/package.json b/packages/jest-docblock/package.json index fe5b997592e5..d445de5c15d9 100644 --- a/packages/jest-docblock/package.json +++ b/packages/jest-docblock/package.json @@ -3,7 +3,8 @@ "version": "23.2.0", "repository": { "type": "git", - "url": "https://github.com/facebook/jest.git" + "url": "https://github.com/facebook/jest.git", + "directory": "packages/jest-docblock" }, "license": "MIT", "main": "build/index.js", diff --git a/packages/jest-each/package.json b/packages/jest-each/package.json index 342bc636b433..dfae0c58209a 100644 --- a/packages/jest-each/package.json +++ b/packages/jest-each/package.json @@ -5,7 +5,8 @@ "main": "build/index.js", "repository": { "type": "git", - "url": "https://github.com/facebook/jest.git" + "url": "https://github.com/facebook/jest.git", + "directory": "packages/jest-each" }, "keywords": [ "jest", diff --git a/packages/jest-environment-jsdom/package.json b/packages/jest-environment-jsdom/package.json index 7d0b1df0de4d..3651b5710bef 100644 --- a/packages/jest-environment-jsdom/package.json +++ b/packages/jest-environment-jsdom/package.json @@ -3,7 +3,8 @@ "version": "23.4.0", "repository": { "type": "git", - "url": "https://github.com/facebook/jest.git" + "url": "https://github.com/facebook/jest.git", + "directory": "packages/jest-environment-jsdom" }, "license": "MIT", "main": "build/index.js", diff --git a/packages/jest-environment-node/package.json b/packages/jest-environment-node/package.json index c56b96ff082f..11fd7919a6f9 100644 --- a/packages/jest-environment-node/package.json +++ b/packages/jest-environment-node/package.json @@ -3,7 +3,8 @@ "version": "23.4.0", "repository": { "type": "git", - "url": "https://github.com/facebook/jest.git" + "url": "https://github.com/facebook/jest.git", + "directory": "packages/jest-environment-node" }, "license": "MIT", "main": "build/index.js", diff --git a/packages/jest-environment-node/src/index.js b/packages/jest-environment-node/src/index.js index 646f846d2ce5..f09b3f7c30a1 100644 --- a/packages/jest-environment-node/src/index.js +++ b/packages/jest-environment-node/src/index.js @@ -88,9 +88,7 @@ class NodeEnvironment { } // Disabling rule as return type depends on script's return type. - /* eslint-disable flowtype/no-weak-types */ runScript(script: Script): ?any { - /* eslint-enable flowtype/no-weak-types */ if (this.context) { return script.runInContext(this.context); } diff --git a/packages/jest-get-type/package.json b/packages/jest-get-type/package.json index 31bc2a8e0593..1c013bf888d9 100644 --- a/packages/jest-get-type/package.json +++ b/packages/jest-get-type/package.json @@ -4,7 +4,8 @@ "version": "22.1.0", "repository": { "type": "git", - "url": "https://github.com/facebook/jest.git" + "url": "https://github.com/facebook/jest.git", + "directory": "packages/jest-get-type" }, "engines": { "node": ">= 6" diff --git a/packages/jest-haste-map/package.json b/packages/jest-haste-map/package.json index 2588f476c89c..c3ef408ebf02 100644 --- a/packages/jest-haste-map/package.json +++ b/packages/jest-haste-map/package.json @@ -3,7 +3,8 @@ "version": "23.6.0", "repository": { "type": "git", - "url": "https://github.com/facebook/jest.git" + "url": "https://github.com/facebook/jest.git", + "directory": "packages/jest-haste-map" }, "license": "MIT", "main": "build/index.js", @@ -12,8 +13,9 @@ "graceful-fs": "^4.1.15", "invariant": "^2.2.4", "jest-serializer": "^23.0.1", + "jest-util": "^23.4.0", "jest-worker": "^23.2.0", - "micromatch": "^2.3.11", + "micromatch": "^3.1.10", "sane": "^3.0.0" }, "engines": { diff --git a/packages/jest-haste-map/src/HasteFS.js b/packages/jest-haste-map/src/HasteFS.js index 617ef744850e..c703376accde 100644 --- a/packages/jest-haste-map/src/HasteFS.js +++ b/packages/jest-haste-map/src/HasteFS.js @@ -10,6 +10,7 @@ import type {Glob, Path} from 'types/Config'; import type {FileData} from 'types/HasteMap'; +import {replacePathSepForGlob} from 'jest-util'; import * as fastPath from './lib/fast_path'; import micromatch from 'micromatch'; import H from './constants'; @@ -78,7 +79,7 @@ export default class HasteFS { const files = new Set(); for (const file of this.getAbsoluteFileIterator()) { const filePath = root ? fastPath.relative(root, file) : file; - if (micromatch([filePath], globs).length) { + if (micromatch.some(replacePathSepForGlob(filePath), globs)) { files.add(file); } } diff --git a/packages/jest-jasmine2/package.json b/packages/jest-jasmine2/package.json index b67dda0e5a7b..454a2e9e0d3f 100644 --- a/packages/jest-jasmine2/package.json +++ b/packages/jest-jasmine2/package.json @@ -3,7 +3,8 @@ "version": "23.6.0", "repository": { "type": "git", - "url": "https://github.com/facebook/jest.git" + "url": "https://github.com/facebook/jest.git", + "directory": "packages/jest-jasmine2" }, "license": "MIT", "main": "build/index.js", diff --git a/packages/jest-jasmine2/src/index.js b/packages/jest-jasmine2/src/index.js index d9f84a70ed73..199afc3f94e2 100644 --- a/packages/jest-jasmine2/src/index.js +++ b/packages/jest-jasmine2/src/index.js @@ -11,7 +11,6 @@ import type {Environment} from 'types/Environment'; import type {GlobalConfig, ProjectConfig} from 'types/Config'; import type {SnapshotState} from 'jest-snapshot'; import type {TestResult} from 'types/TestResult'; -// eslint-disable-next-line import/no-extraneous-dependencies import type Runtime from 'jest-runtime'; import path from 'path'; diff --git a/packages/jest-jasmine2/src/jasmine/CallTracker.js b/packages/jest-jasmine2/src/jasmine/CallTracker.js index 60020c8ea62b..3f676d118a05 100644 --- a/packages/jest-jasmine2/src/jasmine/CallTracker.js +++ b/packages/jest-jasmine2/src/jasmine/CallTracker.js @@ -29,7 +29,6 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* @flow */ -/* eslint-disable sort-keys */ function CallTracker() { let calls = []; diff --git a/packages/jest-jasmine2/src/jasmine/ReportDispatcher.js b/packages/jest-jasmine2/src/jasmine/ReportDispatcher.js index 3194423f9861..aa1ed23997e7 100644 --- a/packages/jest-jasmine2/src/jasmine/ReportDispatcher.js +++ b/packages/jest-jasmine2/src/jasmine/ReportDispatcher.js @@ -29,7 +29,6 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* @flow */ -/* eslint-disable sort-keys */ export default function ReportDispatcher(methods: Array) { const dispatchedMethods = methods || []; diff --git a/packages/jest-jasmine2/src/jasmine/SpyStrategy.js b/packages/jest-jasmine2/src/jasmine/SpyStrategy.js index 57a11332ada6..2a996f085248 100644 --- a/packages/jest-jasmine2/src/jasmine/SpyStrategy.js +++ b/packages/jest-jasmine2/src/jasmine/SpyStrategy.js @@ -29,7 +29,6 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* @flow */ -/* eslint-disable sort-keys */ export default function SpyStrategy(options: Object) { options = options || {}; diff --git a/packages/jest-jasmine2/src/jasmine/Timer.js b/packages/jest-jasmine2/src/jasmine/Timer.js index 7d5b87d05165..be908df48185 100644 --- a/packages/jest-jasmine2/src/jasmine/Timer.js +++ b/packages/jest-jasmine2/src/jasmine/Timer.js @@ -29,7 +29,6 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* @flow */ -/* eslint-disable sort-keys */ const defaultNow = (function(Date) { return function() { diff --git a/packages/jest-leak-detector/package.json b/packages/jest-leak-detector/package.json index d4d03fa78829..83e76fd09a31 100644 --- a/packages/jest-leak-detector/package.json +++ b/packages/jest-leak-detector/package.json @@ -3,7 +3,8 @@ "version": "23.6.0", "repository": { "type": "git", - "url": "https://github.com/facebook/jest.git" + "url": "https://github.com/facebook/jest.git", + "directory": "packages/jest-leak-detector" }, "license": "MIT", "main": "build/index.js", diff --git a/packages/jest-matcher-utils/package.json b/packages/jest-matcher-utils/package.json index baf7017cbd44..15f3019ef755 100644 --- a/packages/jest-matcher-utils/package.json +++ b/packages/jest-matcher-utils/package.json @@ -4,7 +4,8 @@ "version": "23.6.0", "repository": { "type": "git", - "url": "https://github.com/facebook/jest.git" + "url": "https://github.com/facebook/jest.git", + "directory": "packages/jest-matcher-utils" }, "engines": { "node": ">= 6" diff --git a/packages/jest-message-util/package.json b/packages/jest-message-util/package.json index 9812ad2ed322..fcf8b4858fc1 100644 --- a/packages/jest-message-util/package.json +++ b/packages/jest-message-util/package.json @@ -3,7 +3,8 @@ "version": "23.4.0", "repository": { "type": "git", - "url": "https://github.com/facebook/jest.git" + "url": "https://github.com/facebook/jest.git", + "directory": "packages/jest-message-util" }, "engines": { "node": ">= 6" @@ -13,7 +14,7 @@ "dependencies": { "@babel/code-frame": "^7.0.0", "chalk": "^2.0.1", - "micromatch": "^2.3.11", + "micromatch": "^3.1.10", "slash": "^2.0.0", "stack-utils": "^1.0.1" } diff --git a/packages/jest-message-util/src/index.js b/packages/jest-message-util/src/index.js index 87c95800454a..48afb9ec2a31 100644 --- a/packages/jest-message-util/src/index.js +++ b/packages/jest-message-util/src/index.js @@ -210,7 +210,7 @@ const formatPaths = (config: StackTraceConfig, relativeTestPath, line) => { if ( (config.testMatch && config.testMatch.length && - micromatch(filePath, config.testMatch)) || + micromatch.some(filePath, config.testMatch)) || filePath === relativeTestPath ) { filePath = chalk.reset.cyan(filePath); diff --git a/packages/jest-mock/package.json b/packages/jest-mock/package.json index 7d7f2958a197..3287eae23bba 100644 --- a/packages/jest-mock/package.json +++ b/packages/jest-mock/package.json @@ -3,7 +3,8 @@ "version": "23.2.0", "repository": { "type": "git", - "url": "https://github.com/facebook/jest.git" + "url": "https://github.com/facebook/jest.git", + "directory": "packages/jest-mock" }, "engines": { "node": ">= 6" diff --git a/packages/jest-phabricator/package.json b/packages/jest-phabricator/package.json index 913598cd7a36..a25ff5f73e0e 100644 --- a/packages/jest-phabricator/package.json +++ b/packages/jest-phabricator/package.json @@ -3,7 +3,8 @@ "version": "23.2.0", "repository": { "type": "git", - "url": "https://github.com/facebook/jest.git" + "url": "https://github.com/facebook/jest.git", + "directory": "packages/jest-phabricator" }, "engines": { "node": ">= 6" diff --git a/packages/jest-regex-util/package.json b/packages/jest-regex-util/package.json index ab665d8b6805..c675bf117b53 100644 --- a/packages/jest-regex-util/package.json +++ b/packages/jest-regex-util/package.json @@ -3,7 +3,8 @@ "version": "23.3.0", "repository": { "type": "git", - "url": "https://github.com/facebook/jest.git" + "url": "https://github.com/facebook/jest.git", + "directory": "packages/jest-regex-util" }, "engines": { "node": ">= 6" diff --git a/packages/jest-repl/package.json b/packages/jest-repl/package.json index 95286104461f..d33cfb6d0088 100644 --- a/packages/jest-repl/package.json +++ b/packages/jest-repl/package.json @@ -3,7 +3,8 @@ "version": "23.6.0", "repository": { "type": "git", - "url": "https://github.com/facebook/jest.git" + "url": "https://github.com/facebook/jest.git", + "directory": "packages/jest-repl" }, "license": "MIT", "main": "build/index.js", diff --git a/packages/jest-resolve-dependencies/package.json b/packages/jest-resolve-dependencies/package.json index 20ed227945ae..f97178ca1514 100644 --- a/packages/jest-resolve-dependencies/package.json +++ b/packages/jest-resolve-dependencies/package.json @@ -3,7 +3,8 @@ "version": "23.6.0", "repository": { "type": "git", - "url": "https://github.com/facebook/jest.git" + "url": "https://github.com/facebook/jest.git", + "directory": "packages/jest-resolve-dependencies" }, "license": "MIT", "main": "build/index.js", diff --git a/packages/jest-resolve/package.json b/packages/jest-resolve/package.json index 4b380f43aa79..c995e6c9f8d2 100644 --- a/packages/jest-resolve/package.json +++ b/packages/jest-resolve/package.json @@ -3,7 +3,8 @@ "version": "23.6.0", "repository": { "type": "git", - "url": "https://github.com/facebook/jest.git" + "url": "https://github.com/facebook/jest.git", + "directory": "packages/jest-resolve" }, "license": "MIT", "main": "build/index.js", diff --git a/packages/jest-runner/package.json b/packages/jest-runner/package.json index 0568ad7eb1ad..fc4c9780fa27 100644 --- a/packages/jest-runner/package.json +++ b/packages/jest-runner/package.json @@ -3,7 +3,8 @@ "version": "23.6.0", "repository": { "type": "git", - "url": "https://github.com/facebook/jest.git" + "url": "https://github.com/facebook/jest.git", + "directory": "packages/jest-runner" }, "license": "MIT", "main": "build/index.js", diff --git a/packages/jest-runtime/package.json b/packages/jest-runtime/package.json index 9a0158bd7ad0..5e74ff84ef95 100644 --- a/packages/jest-runtime/package.json +++ b/packages/jest-runtime/package.json @@ -3,7 +3,8 @@ "version": "23.6.0", "repository": { "type": "git", - "url": "https://github.com/facebook/jest.git" + "url": "https://github.com/facebook/jest.git", + "directory": "packages/jest-runtime" }, "license": "MIT", "main": "build/index.js", @@ -24,7 +25,7 @@ "jest-snapshot": "^23.6.0", "jest-util": "^23.4.0", "jest-validate": "^23.6.0", - "micromatch": "^2.3.11", + "micromatch": "^3.1.10", "realpath-native": "^1.0.0", "slash": "^2.0.0", "strip-bom": "3.0.0", diff --git a/packages/jest-runtime/src/__tests__/should_instrument.test.js b/packages/jest-runtime/src/__tests__/should_instrument.test.js index 3601007aec57..376e8e7d0b4f 100644 --- a/packages/jest-runtime/src/__tests__/should_instrument.test.js +++ b/packages/jest-runtime/src/__tests__/should_instrument.test.js @@ -93,22 +93,6 @@ describe('shouldInstrument', () => { ); }); - it('should should match invalid globs, to be removed in the next major', () => { - const testSingleCollectCoverageFrom = pattern => - testShouldInstrument( - 'do/collect/coverage.js', - { - collectCoverage: true, - collectCoverageFrom: [pattern], - }, - defaultConfig, - ); - - testSingleCollectCoverageFrom('**/do/**/*.{js}'); - testSingleCollectCoverageFrom('**/do/**/*.{js|ts}'); - testSingleCollectCoverageFrom('**/do/**.js'); - }); - it('should return true if the file is not in coveragePathIgnorePatterns', () => { testShouldInstrument('do/collect/coverage.js', defaultOptions, { coveragePathIgnorePatterns: ['dont'], diff --git a/packages/jest-runtime/src/shouldInstrument.js b/packages/jest-runtime/src/shouldInstrument.js index 769105a30e86..6717fbea3e52 100644 --- a/packages/jest-runtime/src/shouldInstrument.js +++ b/packages/jest-runtime/src/shouldInstrument.js @@ -12,6 +12,7 @@ import type {Options} from './ScriptTransformer'; import path from 'path'; import {escapePathForRegex} from 'jest-regex-util'; +import {replacePathSepForGlob} from 'jest-util'; import micromatch from 'micromatch'; const MOCKS_PATTERN = new RegExp( @@ -49,7 +50,7 @@ export default function shouldInstrument( if ( config.testMatch && config.testMatch.length && - micromatch([filename], config.testMatch).length + micromatch.some(replacePathSepForGlob(filename), config.testMatch) ) { return false; } @@ -68,10 +69,10 @@ export default function shouldInstrument( // still cover if `only` is specified !options.collectCoverageOnlyFrom && options.collectCoverageFrom && - !micromatch( - [path.relative(config.rootDir, filename)], + !micromatch.some( + replacePathSepForGlob(path.relative(config.rootDir, filename)), options.collectCoverageFrom, - ).length + ) ) { return false; } diff --git a/packages/jest-serializer/package.json b/packages/jest-serializer/package.json index 0bbb47d5cc72..029fb4f5b33b 100644 --- a/packages/jest-serializer/package.json +++ b/packages/jest-serializer/package.json @@ -3,7 +3,8 @@ "version": "23.0.1", "repository": { "type": "git", - "url": "https://github.com/facebook/jest.git" + "url": "https://github.com/facebook/jest.git", + "directory": "packages/jest-serializer" }, "engines": { "node": ">= 6" diff --git a/packages/jest-snapshot/package.json b/packages/jest-snapshot/package.json index 0be2703adf33..239b35601b37 100644 --- a/packages/jest-snapshot/package.json +++ b/packages/jest-snapshot/package.json @@ -3,7 +3,8 @@ "version": "23.6.0", "repository": { "type": "git", - "url": "https://github.com/facebook/jest.git" + "url": "https://github.com/facebook/jest.git", + "directory": "packages/jest-snapshot" }, "license": "MIT", "main": "build/index.js", diff --git a/packages/jest-util/package.json b/packages/jest-util/package.json index 1c6d5ef70bdf..6de8acb09f21 100644 --- a/packages/jest-util/package.json +++ b/packages/jest-util/package.json @@ -3,7 +3,8 @@ "version": "23.4.0", "repository": { "type": "git", - "url": "https://github.com/facebook/jest.git" + "url": "https://github.com/facebook/jest.git", + "directory": "packages/jest-util" }, "license": "MIT", "main": "build/index.js", diff --git a/packages/jest-util/src/FakeTimers.js b/packages/jest-util/src/FakeTimers.js index 8fe11e83295d..c00a3c30da25 100644 --- a/packages/jest-util/src/FakeTimers.js +++ b/packages/jest-util/src/FakeTimers.js @@ -19,9 +19,7 @@ import setGlobal from './setGlobal'; * we are disabling the flowtype/no-weak-types rule here. */ -/* eslint-disable flowtype/no-weak-types */ type Callback = (...args: any) => void; -/* eslint-enable flowtype/no-weak-types */ type TimerID = string; @@ -50,11 +48,9 @@ type TimerAPI = { * here. */ - /* eslint-disable flowtype/no-weak-types */ setImmediate(callback: Callback, ms?: number, ...args: Array): number, setInterval(callback: Callback, ms?: number, ...args: Array): number, setTimeout(callback: Callback, ms?: number, ...args: Array): number, - /* eslint-enable flowtype/no-weak-types */ }; type TimerConfig = {| diff --git a/packages/jest-util/src/__tests__/fakeTimers.test.js b/packages/jest-util/src/__tests__/fakeTimers.test.js index 3f153759b93c..c39fb0c2a4e4 100644 --- a/packages/jest-util/src/__tests__/fakeTimers.test.js +++ b/packages/jest-util/src/__tests__/fakeTimers.test.js @@ -26,7 +26,6 @@ describe('FakeTimers', () => { }); describe('construction', () => { - /* eslint-disable no-new */ it('installs setTimeout mock', () => { const global = {process}; const timers = new FakeTimers({global, moduleMocker, timerConfig}); diff --git a/packages/jest-util/src/createDirectory.js b/packages/jest-util/src/createDirectory.js new file mode 100644 index 000000000000..929eabb66cd0 --- /dev/null +++ b/packages/jest-util/src/createDirectory.js @@ -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. + * + * @flow + */ + +import type {Path} from 'types/Config'; + +import mkdirp from 'mkdirp'; + +export default function createDirectory(path: Path) { + try { + mkdirp.sync(path, '777'); + } catch (e) { + if (e.code !== 'EEXIST') { + throw e; + } + } +} diff --git a/packages/jest-util/src/index.js b/packages/jest-util/src/index.js index 2824f51815b4..04aed91a67bb 100644 --- a/packages/jest-util/src/index.js +++ b/packages/jest-util/src/index.js @@ -7,11 +7,10 @@ * @flow */ -import mkdirp from 'mkdirp'; - import BufferedConsole from './BufferedConsole'; import clearLine from './clearLine'; import CustomConsole from './CustomConsole'; +import createDirectory from './createDirectory'; import ErrorWithStack from './ErrorWithStack'; import FakeTimers from './FakeTimers'; import formatTestResults from './formatTestResults'; @@ -25,16 +24,7 @@ import setGlobal from './setGlobal'; import deepCyclicCopy from './deepCyclicCopy'; import convertDescriptorToString from './convertDescriptorToString'; import * as specialChars from './specialChars'; - -const createDirectory = (path: string) => { - try { - mkdirp.sync(path, '777'); - } catch (e) { - if (e.code !== 'EEXIST') { - throw e; - } - } -}; +import replacePathSepForGlob from './replacePathSepForGlob'; module.exports = { BufferedConsole, @@ -52,6 +42,7 @@ module.exports = { getFailedSnapshotTests, installCommonGlobals, isInteractive, + replacePathSepForGlob, setGlobal, specialChars, }; diff --git a/packages/jest-util/src/replacePathSepForGlob.js b/packages/jest-util/src/replacePathSepForGlob.js new file mode 100644 index 000000000000..1c4362b02d81 --- /dev/null +++ b/packages/jest-util/src/replacePathSepForGlob.js @@ -0,0 +1,14 @@ +/** + * 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. + * + * @flow + */ + +import type {Path, Glob} from 'types/Config'; + +export default function replacePathSepForGlob(path: Path): Glob { + return path.replace(/\\(?![{}()+?.^$])/g, '/'); +} diff --git a/packages/jest-validate/package.json b/packages/jest-validate/package.json index 6ea5a6e5b68f..42c099c7456b 100644 --- a/packages/jest-validate/package.json +++ b/packages/jest-validate/package.json @@ -3,7 +3,8 @@ "version": "23.6.0", "repository": { "type": "git", - "url": "https://github.com/facebook/jest.git" + "url": "https://github.com/facebook/jest.git", + "directory": "packages/jest-validate" }, "license": "MIT", "main": "build/index.js", diff --git a/packages/jest-watcher/package.json b/packages/jest-watcher/package.json index 3734874f02bc..258805d74e69 100644 --- a/packages/jest-watcher/package.json +++ b/packages/jest-watcher/package.json @@ -11,7 +11,8 @@ }, "repository": { "type": "git", - "url": "https://github.com/facebook/jest" + "url": "https://github.com/facebook/jest", + "directory": "packages/jest-watcher" }, "bugs": { "url": "https://github.com/facebook/jest/issues" diff --git a/packages/jest-worker/package.json b/packages/jest-worker/package.json index 43b6b489284d..2daf4db1a440 100644 --- a/packages/jest-worker/package.json +++ b/packages/jest-worker/package.json @@ -3,7 +3,8 @@ "version": "23.2.0", "repository": { "type": "git", - "url": "https://github.com/facebook/jest.git" + "url": "https://github.com/facebook/jest.git", + "directory": "packages/jest-worker" }, "license": "MIT", "main": "build/index.js", @@ -11,6 +12,9 @@ "merge-stream": "^1.0.1", "supports-color": "^6.1.0" }, + "devDependencies": { + "worker-farm": "^1.6.0" + }, "engines": { "node": ">= 6" } diff --git a/packages/jest-worker/src/index.js b/packages/jest-worker/src/index.js index b5bc4885b53f..0b3c4a40b59b 100644 --- a/packages/jest-worker/src/index.js +++ b/packages/jest-worker/src/index.js @@ -111,7 +111,6 @@ export default class JestWorker { }); } - // eslint-disable-next-line no-unclear-flowtypes _callFunctionWithArgs(method: string, ...args: Array): Promise { if (this._ending) { throw new Error('Farm is ended, no more calls can be done to it'); diff --git a/packages/jest-worker/src/types.js b/packages/jest-worker/src/types.js index 15647155c50a..b0a80f325c77 100644 --- a/packages/jest-worker/src/types.js +++ b/packages/jest-worker/src/types.js @@ -13,8 +13,6 @@ // coming from any of the other processes cannot be typed. Thus, many types // include "any" as a flow type, which is (unfortunately) correct here. -/* eslint-disable no-unclear-flowtypes */ - export const CHILD_MESSAGE_INITIALIZE: 0 = 0; export const CHILD_MESSAGE_CALL: 1 = 1; export const CHILD_MESSAGE_END: 2 = 2; diff --git a/packages/pretty-format/package.json b/packages/pretty-format/package.json index 916a74227d6e..00537df293d9 100644 --- a/packages/pretty-format/package.json +++ b/packages/pretty-format/package.json @@ -3,7 +3,8 @@ "version": "23.6.0", "repository": { "type": "git", - "url": "https://github.com/facebook/jest.git" + "url": "https://github.com/facebook/jest.git", + "directory": "packages/pretty-format" }, "license": "MIT", "description": "Stringify any JavaScript value.", diff --git a/scripts/browserBuild.js b/scripts/browserBuild.js index 045135e33b7a..f9f02827cd74 100644 --- a/scripts/browserBuild.js +++ b/scripts/browserBuild.js @@ -11,7 +11,6 @@ const rollup = require('rollup').rollup; const rollupResolve = require('rollup-plugin-node-resolve'); const rollupCommonjs = require('rollup-plugin-commonjs'); const rollupBuiltins = require('rollup-plugin-node-builtins'); -const rollupGlobals = require('rollup-plugin-node-globals'); const rollupJson = require('rollup-plugin-json'); const rollupBabel = require('rollup-plugin-babel'); const rollupFlow = require('rollup-plugin-flow'); @@ -52,7 +51,6 @@ function browserBuild(pkgName, entryPath, destination) { rollupJson(), rollupCommonjs(), rollupBabel(babelEs5Options), - rollupGlobals(), rollupBuiltins(), rollupResolve(), ], diff --git a/scripts/build.js b/scripts/build.js index 243df45bc3ba..2dd1420aceca 100644 --- a/scripts/build.js +++ b/scripts/build.js @@ -133,7 +133,7 @@ function buildFile(file, silent) { return; } - mkdirp.sync(path.dirname(destPath)); + mkdirp.sync(path.dirname(destPath), '777'); if (!micromatch.isMatch(file, JS_FILES_PATTERN)) { fs.createReadStream(file).pipe(fs.createWriteStream(destPath)); silent || diff --git a/website/static/css/custom.css b/website/static/css/custom.css index 257a6ae3d995..a0707d51284f 100644 --- a/website/static/css/custom.css +++ b/website/static/css/custom.css @@ -13,7 +13,6 @@ .fixedHeaderContainer header h3 { font-size: 14px; - margin-top: 2px; text-decoration: none; } diff --git a/yarn.lock b/yarn.lock index d3805d10e5af..dae900532674 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1544,7 +1544,7 @@ acorn-walk@^6.0.1, acorn-walk@^6.1.0: resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-6.1.1.tgz#d363b66f5fac5f018ff9c3a1e7b6f8e310cc3913" integrity sha512-OtUw6JUTgxA2QoqqmrmQ7F2NYqiBPi/L2jqHyFtllhOUvXYQXf0Z1CYUinIfyT4bTCGmrA7gX9FvHA81uzCoVw== -acorn@^5.5.3, acorn@^5.7.3: +acorn@^5.5.3: version "5.7.3" resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.3.tgz#67aa231bf8812974b85235a96771eb6bd07ea279" integrity sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw== @@ -2578,7 +2578,7 @@ buffer-crc32@~0.2.3: resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" integrity sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI= -buffer-es6@^4.9.2, buffer-es6@^4.9.3: +buffer-es6@^4.9.2: version "4.9.3" resolved "https://registry.yarnpkg.com/buffer-es6/-/buffer-es6-4.9.3.tgz#f26347b82df76fd37e18bcb5288c4970cfd5c404" integrity sha1-8mNHuC33b9N+GLy1KIxJcM/VxAQ= @@ -4495,7 +4495,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.1, errno@~0.1.1: +errno@^0.1.1, errno@~0.1.1, errno@~0.1.7: version "0.1.7" resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.7.tgz#4684d71779ad39af177e3f007996f7c67c852618" integrity sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg== @@ -8231,13 +8231,6 @@ ltgt@^2.1.2: resolved "https://registry.yarnpkg.com/ltgt/-/ltgt-2.2.1.tgz#f35ca91c493f7b73da0e07495304f17b31f87ee5" integrity sha1-81ypHEk/e3PaDgdJUwTxezH4fuU= -magic-string@^0.22.5: - version "0.22.5" - resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.22.5.tgz#8e9cf5afddf44385c1da5bc2a6a0dbd10b03657e" - integrity sha512-oreip9rJZkzvA8Qzk9HFs8fZGF/u7H/gtrE8EN6RjKJ9kh2HlC+yQ2QezifqTZfGyiuAV0dRv5a+y/8gBb1m9w== - dependencies: - vlq "^0.2.2" - magic-string@^0.25.1: version "0.25.1" resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.1.tgz#b1c248b399cd7485da0fe7385c2fc7011843266e" @@ -9557,6 +9550,13 @@ p-defer@^1.0.0: resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-1.0.0.tgz#9f6eb182f6c9aa8cd743004a7d4f96b196b0fb0c" integrity sha1-n26xgvbJqozXQwBKfU+WsZaw+ww= +p-each-series@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-each-series/-/p-each-series-1.0.0.tgz#930f3d12dd1f50e7434457a22cd6f04ac6ad7f71" + integrity sha1-kw89Et0fUOdDRFeiLNbwSsatf3E= + dependencies: + p-reduce "^1.0.0" + p-finally@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" @@ -10305,7 +10305,7 @@ private@^0.1.6: resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" integrity sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg== -process-es6@^0.11.2, process-es6@^0.11.6: +process-es6@^0.11.2: version "0.11.6" resolved "https://registry.yarnpkg.com/process-es6/-/process-es6-0.11.6.tgz#c6bb389f9a951f82bd4eb169600105bd2ff9c778" integrity sha1-xrs4n5qVH4K9TrFpYAEFvS/5x3g= @@ -11334,18 +11334,6 @@ rollup-plugin-node-builtins@^2.1.1: crypto-browserify "^3.11.0" process-es6 "^0.11.2" -rollup-plugin-node-globals@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/rollup-plugin-node-globals/-/rollup-plugin-node-globals-1.4.0.tgz#5e1f24a9bb97c0ef51249f625e16c7e61b7c020b" - integrity sha512-xRkB+W/m1KLIzPUmG0ofvR+CPNcvuCuNdjVBVS7ALKSxr3EDhnzNceGkGi1m8MToSli13AzKFYH4ie9w3I5L3g== - dependencies: - acorn "^5.7.3" - buffer-es6 "^4.9.3" - estree-walker "^0.5.2" - magic-string "^0.22.5" - process-es6 "^0.11.6" - rollup-pluginutils "^2.3.1" - rollup-plugin-node-resolve@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-4.0.0.tgz#9bc6b8205e9936cc0e26bba2415f1ecf1e64d9b2" @@ -13201,7 +13189,7 @@ vinyl@^1.0.0: clone-stats "^0.0.1" replace-ext "0.0.1" -vlq@^0.2.1, vlq@^0.2.2: +vlq@^0.2.1: version "0.2.3" resolved "https://registry.yarnpkg.com/vlq/-/vlq-0.2.3.tgz#8f3e4328cf63b1540c0d67e1b2778386f8975b26" integrity sha512-DRibZL6DsNhIgYQ+wNdWDL2SL3bKPlVrRiBqV5yuMm++op8W4kGFtaQfCs4KEJn0wBZcHVHJ3eoywX8983k1ow== @@ -13370,6 +13358,13 @@ wordwrap@~0.0.2: resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" integrity sha1-o9XabNXAvAAI03I0u68b7WMFkQc= +worker-farm@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.6.0.tgz#aecc405976fab5a95526180846f0dba288f3a4a0" + integrity sha512-6w+3tHbM87WnSWnENBUvA2pxJPLhQUg5LKwUQHq3r+XPhIM+Gh2R5ycbwPCyuGbNg+lPgdcnQUhuC02kJCvffQ== + dependencies: + errno "~0.1.7" + wrap-ansi@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85"