Skip to content

Commit ecac4ae

Browse files
authored
chore: bump most dated deps (#8850)
1 parent 9288b93 commit ecac4ae

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1343
-1595
lines changed

e2e/Utils.ts

+5-4
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,22 @@ import * as fs from 'fs';
1010
import * as path from 'path';
1111
import {Config} from '@jest/types';
1212

13-
import {ExecaReturns, sync as spawnSync} from 'execa';
13+
// eslint-disable-next-line import/named
14+
import {ExecaReturnValue, sync as spawnSync} from 'execa';
1415
import {createDirectory} from 'jest-util';
1516
import rimraf from 'rimraf';
1617

17-
export type RunResult = ExecaReturns & {
18+
interface RunResult extends ExecaReturnValue {
1819
status: number;
1920
error: Error;
20-
};
21+
}
2122
export const run = (cmd: string, cwd?: Config.Path): RunResult => {
2223
const args = cmd.split(/\s/).slice(1);
2324
const spawnOptions = {cwd, preferLocal: false, reject: false};
2425
const result = spawnSync(cmd.split(/\s/)[0], args, spawnOptions) as RunResult;
2526

2627
// For compat with cross-spawn
27-
result.status = result.code;
28+
result.status = result.exitCode;
2829

2930
if (result.status !== 0) {
3031
const message = `

e2e/__tests__/__snapshots__/coverageThreshold.test.ts.snap

-4
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ All files | 50 | 100 | 50 | 50 | |
2323
apple.js | 0 | 100 | 0 | 0 | 2,3 |
2424
banana.js | 100 | 100 | 100 | 100 | |
2525
-----------|----------|----------|----------|----------|-------------------|
26-
2726
`;
2827
2928
exports[`exits with 0 if global threshold group is not found in coverage data: stdout 1`] = `
@@ -57,7 +56,6 @@ File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
5756
All files | 50 | 100 | 0 | 50 | |
5857
not-covered.js | 50 | 100 | 0 | 50 | 3 |
5958
----------------|----------|----------|----------|----------|-------------------|
60-
6159
`;
6260
6361
exports[`exits with 1 if path threshold group is not found in coverage data 1`] = `
@@ -82,7 +80,6 @@ File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |
8280
All files | 100 | 100 | 100 | 100 | |
8381
banana.js | 100 | 100 | 100 | 100 | |
8482
-----------|----------|----------|----------|----------|-------------------|
85-
8683
`;
8784
8885
exports[`file is matched by all path and glob threshold groups 1`] = `
@@ -109,5 +106,4 @@ File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |
109106
All files | 50 | 100 | 0 | 50 | |
110107
banana.js | 50 | 100 | 0 | 50 | 3 |
111108
-----------|----------|----------|----------|----------|-------------------|
112-
113109
`;

e2e/__tests__/__snapshots__/customReporters.test.ts.snap

-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ exports[`Custom Reporters Integration invalid format for adding reporters 1`] =
117117
Configuration Documentation:
118118
https://jestjs.io/docs/configuration.html
119119
120-
121120
`;
122121
123122
exports[`Custom Reporters Integration valid array format for adding reporters 1`] = `

e2e/__tests__/__snapshots__/jestChangedFiles.test.ts.snap

-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ exports[`handles a bad revision for "changedSince", for git 1`] = `
77
88
fatal: bad revision '^blablabla'
99
10-
1110
`;
1211

1312
exports[`handles a bad revision for "changedSince", for hg 1`] = `
@@ -17,5 +16,4 @@ exports[`handles a bad revision for "changedSince", for hg 1`] = `
1716
1817
abort: unknown revision 'blablabla'!
1918
20-
2119
`;

e2e/__tests__/__snapshots__/processExit.test.ts.snap

-1
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,4 @@ exports[`prints stack trace pointing to process.exit call 1`] = `
1212
11 | expect(true).toBe(true);
1313
1414
at Object.exit (__tests__/test.js:8:9)
15-
1615
`;

e2e/__tests__/__snapshots__/resolveNoFileExtensions.test.ts.snap

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ exports[`show error message when no js moduleFileExtensions 1`] = `
1111
Configuration Documentation:
1212
https://jestjs.io/docs/configuration.html
1313
14-
1514
`;
1615

1716
exports[`show error message with matching files 1`] = `

e2e/__tests__/__snapshots__/transform.test.ts.snap

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ FAIL __tests__/ignoredFile.test.js
66
77
babel-jest: Babel ignores __tests__/ignoredFile.test.js - make sure to include the file in Jest's transformIgnorePatterns as well.
88
9-
at loadBabelConfig (../../../packages/babel-jest/build/index.js:157:13)
9+
at loadBabelConfig (../../../packages/babel-jest/build/index.js:174:13)
1010
`;
1111

1212
exports[`babel-jest instruments only specific files and collects coverage 1`] = `
@@ -33,7 +33,6 @@ File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |
3333
All files | 83.33 | 100 | 50 | 80 | |
3434
covered.js | 83.33 | 100 | 50 | 80 | 13 |
3535
------------|----------|----------|----------|----------|-------------------|
36-
3736
`;
3837

3938
exports[`transformer-config instruments only specific files and collects coverage 1`] = `

e2e/__tests__/processExit.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
import {wrap} from 'jest-snapshot-serializer-raw';
99
import runJest from '../runJest';
1010

11-
it('prints stack trace pointing to process.exit call', async () => {
12-
const {stderr} = await runJest('process-exit');
11+
it('prints stack trace pointing to process.exit call', () => {
12+
const {stderr} = runJest('process-exit');
1313

1414
expect(wrap(stderr)).toMatchSnapshot();
1515
});

e2e/__tests__/supportsDashedArgs.ts

+6-7
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,14 @@ test('throws error for unknown dashed & camelcase args', () => {
4545
'--useStderr',
4646
]);
4747
expect(result.stderr).toMatchInlineSnapshot(`
48-
● Unrecognized CLI Parameters:
48+
● Unrecognized CLI Parameters:
4949
50-
Following options were not recognized:
51-
["doesNotExist", "also-does-not-exist"]
50+
Following options were not recognized:
51+
["doesNotExist", "also-does-not-exist"]
5252
53-
CLI Options Documentation:
54-
https://jestjs.io/docs/en/cli.html
53+
CLI Options Documentation:
54+
https://jestjs.io/docs/en/cli.html
5555
56-
57-
`);
56+
`);
5857
expect(result.status).toBe(1);
5958
});

e2e/__tests__/testRetries.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ describe('Test Retries', () => {
2727
it('retries failed tests', () => {
2828
const result = runJest('test-retries', ['e2e.test.js']);
2929

30-
expect(result.code).toEqual(0);
30+
expect(result.status).toEqual(0);
3131
expect(result.failed).toBe(false);
3232
});
3333

e2e/runJest.ts

+10-7
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@
99
import * as path from 'path';
1010
import * as fs from 'fs';
1111
import {Writable} from 'stream';
12-
import execa, {ExecaChildProcess, ExecaReturns} from 'execa';
12+
import execa, {
13+
ExecaChildProcess,
14+
ExecaReturnValue,
15+
ExecaSyncReturnValue,
16+
} from 'execa';
1317
import stripAnsi from 'strip-ansi';
1418
import {normalizeIcons} from './Utils';
1519

@@ -39,7 +43,7 @@ function spawnJest(
3943
args?: Array<string>,
4044
options?: RunJestOptions,
4145
spawnAsync?: false,
42-
): ExecaReturns;
46+
): ExecaReturnValue;
4347
function spawnJest(
4448
dir: string,
4549
args?: Array<string>,
@@ -53,7 +57,7 @@ function spawnJest(
5357
args?: Array<string>,
5458
options: RunJestOptions = {},
5559
spawnAsync: boolean = false,
56-
): ExecaReturns | ExecaChildProcess {
60+
): ExecaSyncReturnValue | ExecaChildProcess {
5761
const isRelative = !path.isAbsolute(dir);
5862

5963
if (isRelative) {
@@ -91,19 +95,18 @@ function spawnJest(
9195
);
9296
}
9397

94-
type RunJestResult = ExecaReturns & {
98+
interface RunJestResult extends ExecaReturnValue {
9599
status?: number;
96-
code?: number;
97100
json?: (
98101
dir: string,
99102
args: Array<string> | undefined,
100103
options: RunJestOptions,
101104
) => RunJestResult;
102-
};
105+
}
103106

104107
function normalizeResult(result: RunJestResult, options: RunJestOptions) {
105108
// For compat with cross-spawn
106-
result.status = result.code;
109+
result.status = result.exitCode;
107110

108111
result.stdout = normalizeIcons(result.stdout);
109112
if (options.stripAnsi) result.stdout = stripAnsi(result.stdout);

lerna.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"lerna": "3.15.0",
2+
"lerna": "3.16.4",
33
"version": "24.9.0",
44
"npmClient": "yarn",
55
"packages": [

package.json

+9-9
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"@typescript-eslint/eslint-plugin": "^2.0.0",
1818
"@typescript-eslint/parser": "^2.0.0",
1919
"ansi-regex": "^4.0.0",
20-
"ansi-styles": "^3.2.0",
20+
"ansi-styles": "^4.0.0",
2121
"babel-eslint": "^10.0.2",
2222
"babel-loader": "^8.0.5",
2323
"babel-plugin-replace-ts-export-assignment": "^0.0.2",
@@ -29,32 +29,32 @@
2929
"eslint": "~6.1.0",
3030
"eslint-config-prettier": "^6.1.0",
3131
"eslint-plugin-babel": "^5.1.0",
32-
"eslint-plugin-flowtype": "^2.35.0",
32+
"eslint-plugin-flowtype": "^4.2.0",
3333
"eslint-plugin-import": "^2.6.0",
3434
"eslint-plugin-jest": "^22.0.0",
3535
"eslint-plugin-jsx-a11y": "^6.0.2",
3636
"eslint-plugin-markdown": "^1.0.0",
3737
"eslint-plugin-prettier": "^3.0.1",
3838
"eslint-plugin-react": "^7.1.0",
39-
"execa": "^1.0.0",
39+
"execa": "^2.0.4",
4040
"fast-check": "^1.13.0",
4141
"glob": "^7.1.1",
4242
"graceful-fs": "^4.1.15",
4343
"isbinaryfile": "^4.0.0",
4444
"istanbul-lib-coverage": "^2.0.2",
4545
"istanbul-lib-report": "^2.0.4",
4646
"istanbul-reports": "^2.1.1",
47-
"jest-junit": "^6.2.1",
47+
"jest-junit": "^7.0.0",
4848
"jest-silent-reporter": "^0.1.2",
4949
"jest-snapshot-serializer-raw": "^1.1.0",
50-
"jest-watch-typeahead": "^0.3.1",
50+
"jest-watch-typeahead": "^0.4.0",
5151
"jquery": "^3.2.1",
5252
"karma": "^4.0.1",
5353
"karma-chrome-launcher": "^3.0.0",
5454
"karma-mocha": "^1.3.0",
5555
"karma-webpack": "4.0.0-rc.5",
5656
"left-pad": "^1.1.1",
57-
"lerna": "3.15.0",
57+
"lerna": "3.16.4",
5858
"micromatch": "^4.0.2",
5959
"mkdirp": "^0.5.1",
6060
"mocha": "^6.0.2",
@@ -66,9 +66,9 @@
6666
"promise": "^8.0.2",
6767
"realpath-native": "^1.1.0",
6868
"resolve": "^1.4.0",
69-
"rimraf": "^2.6.2",
70-
"slash": "^2.0.0",
71-
"string-length": "^2.0.0",
69+
"rimraf": "^3.0.0",
70+
"slash": "^3.0.0",
71+
"string-length": "^3.1.0",
7272
"strip-ansi": "^5.0.0",
7373
"typescript": "^3.5.2",
7474
"webpack": "^4.28.4"

packages/babel-jest/package.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,10 @@
1717
"babel-plugin-istanbul": "^5.1.0",
1818
"babel-preset-jest": "^24.9.0",
1919
"chalk": "^2.4.2",
20-
"slash": "^2.0.0"
20+
"slash": "^3.0.0"
2121
},
2222
"devDependencies": {
23-
"@babel/core": "^7.1.0",
24-
"@types/slash": "^2.0.0"
23+
"@babel/core": "^7.1.0"
2524
},
2625
"peerDependencies": {
2726
"@babel/core": "^7.0.0"

packages/expect/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"browser": "build-es5/index.js",
1313
"dependencies": {
1414
"@jest/types": "^24.9.0",
15-
"ansi-styles": "^3.2.0",
15+
"ansi-styles": "^4.0.0",
1616
"jest-get-type": "^24.9.0",
1717
"jest-matcher-utils": "^24.9.0",
1818
"jest-message-util": "^24.9.0",

packages/jest-changed-files/package.json

+2-5
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,8 @@
1111
"types": "build/index.d.ts",
1212
"dependencies": {
1313
"@jest/types": "^24.9.0",
14-
"execa": "^1.0.0",
15-
"throat": "^4.0.0"
16-
},
17-
"devDependencies": {
18-
"@types/execa": "^0.9.0"
14+
"execa": "^2.0.4",
15+
"throat": "^5.0.0"
1916
},
2017
"engines": {
2118
"node": ">= 8"

packages/jest-changed-files/src/git.ts

+11-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*/
88

99
import * as path from 'path';
10-
import execa from 'execa';
10+
import execa, {ExecaReturnValue} from 'execa';
1111
import {Config} from '@jest/types';
1212

1313
import {SCMAdapter} from './types';
@@ -16,7 +16,16 @@ const findChangedFilesUsingCommand = async (
1616
args: Array<string>,
1717
cwd: Config.Path,
1818
): Promise<Array<Config.Path>> => {
19-
const result = await execa('git', args, {cwd});
19+
let result: ExecaReturnValue;
20+
21+
try {
22+
result = await execa('git', args, {cwd});
23+
} catch (e) {
24+
// TODO: Should we keep the original `message`?
25+
e.message = e.stderr;
26+
27+
throw e;
28+
}
2029

2130
return result.stdout
2231
.split('\n')

packages/jest-changed-files/src/hg.ts

+11-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*/
88

99
import * as path from 'path';
10-
import execa from 'execa';
10+
import execa, {ExecaReturnValue} from 'execa';
1111
import {Config} from '@jest/types';
1212

1313
import {SCMAdapter} from './types';
@@ -29,7 +29,16 @@ const adapter: SCMAdapter = {
2929
}
3030
args.push(...includePaths);
3131

32-
const result = await execa('hg', args, {cwd, env});
32+
let result: ExecaReturnValue;
33+
34+
try {
35+
result = await execa('hg', args, {cwd, env});
36+
} catch (e) {
37+
// TODO: Should we keep the original `message`?
38+
e.message = e.stderr;
39+
40+
throw e;
41+
}
3342

3443
return result.stdout
3544
.split('\n')

packages/jest-circus/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@
2525
"jest-util": "^24.9.0",
2626
"pretty-format": "^24.9.0",
2727
"stack-utils": "^1.0.1",
28-
"throat": "^4.0.0"
28+
"throat": "^5.0.0"
2929
},
3030
"devDependencies": {
3131
"@jest/test-utils": "^24.4.0",
3232
"@types/babel__traverse": "^7.0.4",
3333
"@types/co": "^4.6.0",
3434
"@types/stack-utils": "^1.0.1",
35-
"execa": "^1.0.0",
35+
"execa": "^2.0.4",
3636
"jest-runtime": "^24.9.0"
3737
},
3838
"engines": {

0 commit comments

Comments
 (0)