Skip to content

Commit fc97f3e

Browse files
authored
chore: remove p-each-series dep (#11903)
1 parent 0b2b33f commit fc97f3e

File tree

11 files changed

+600
-558
lines changed

11 files changed

+600
-558
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ exports[`code coverage for Handlebars 1`] = `
44
-----------|---------|----------|---------|---------|-------------------
55
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
66
-----------|---------|----------|---------|---------|-------------------
7-
All files | 75 | 66.67 | 66.67 | 66.67 |
8-
greet.hbs | 75 | 66.67 | 66.67 | 66.67 | 10
7+
All files | 75 | 66.66 | 66.66 | 66.66 |
8+
greet.hbs | 75 | 66.66 | 66.66 | 66.66 | 10
99
-----------|---------|----------|---------|---------|-------------------
1010
`;

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ exports[`on node >=12.16.0 prints correct coverage report, if a TS module is tra
1010
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
1111
--------------|---------|----------|---------|---------|-------------------
1212
All files | 50 | 25 | 25 | 50 |
13-
module.ts | 80.77 | 50 | 50 | 80.77 | 16-18,21-22
13+
module.ts | 80.76 | 50 | 50 | 80.76 | 16-18,21-22
1414
types.ts | 0 | 0 | 0 | 0 | 1-8
1515
uncovered.ts | 0 | 0 | 0 | 0 | 1-8
1616
--------------|---------|----------|---------|---------|-------------------
@@ -25,8 +25,8 @@ exports[`on node >=12.16.0 prints correct coverage report, if an ESM module is p
2525
--------------|---------|----------|---------|---------|-------------------
2626
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
2727
--------------|---------|----------|---------|---------|-------------------
28-
All files | 59.38 | 50 | 33.33 | 59.38 |
29-
module.js | 79.17 | 66.67 | 50 | 79.17 | 14-16,19-20
28+
All files | 59.37 | 50 | 33.33 | 59.37 |
29+
module.js | 79.16 | 66.66 | 50 | 79.16 | 14-16,19-20
3030
uncovered.js | 0 | 0 | 0 | 0 | 1-8
3131
--------------|---------|----------|---------|---------|-------------------
3232
`;
@@ -40,8 +40,8 @@ exports[`prints correct coverage report, if a CJS module is put under test witho
4040
--------------|---------|----------|---------|---------|-------------------
4141
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
4242
--------------|---------|----------|---------|---------|-------------------
43-
All files | 59.38 | 60 | 50 | 59.38 |
44-
module.js | 79.17 | 75 | 66.67 | 79.17 | 14-16,19-20
43+
All files | 59.37 | 60 | 50 | 59.37 |
44+
module.js | 79.16 | 75 | 66.66 | 79.16 | 14-16,19-20
4545
uncovered.js | 0 | 0 | 0 | 0 | 1-8
4646
--------------|---------|----------|---------|---------|-------------------
4747
`;
@@ -56,7 +56,7 @@ exports[`prints correct coverage report, if a TS module is transpiled by Babel t
5656
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
5757
--------------|---------|----------|---------|---------|-------------------
5858
All files | 50 | 25 | 25 | 50 |
59-
module.ts | 80.77 | 50 | 50 | 80.77 | 16-18,21-22
59+
module.ts | 80.76 | 50 | 50 | 80.76 | 16-18,21-22
6060
types.ts | 0 | 0 | 0 | 0 | 1-8
6161
uncovered.ts | 0 | 0 | 0 | 0 | 1-8
6262
--------------|---------|----------|---------|---------|-------------------

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ exports[`generates coverage when using the testRegex config param 1`] = `
4747
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
4848
-------------------------------------|---------|----------|---------|---------|-------------------
4949
All files | 60 | 0 | 50 | 60 |
50-
coverage-report | 47.37 | 0 | 25 | 50 |
50+
coverage-report | 47.36 | 0 | 25 | 50 |
5151
file.js | 100 | 100 | 100 | 100 |
5252
notRequiredInTestSuite.js | 0 | 0 | 0 | 0 | 8-19
5353
otherFile.js | 100 | 100 | 100 | 100 |
@@ -73,7 +73,7 @@ exports[`outputs coverage report 1`] = `
7373
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
7474
-------------------------------------|---------|----------|---------|---------|-------------------
7575
All files | 60 | 0 | 50 | 60 |
76-
coverage-report | 47.37 | 0 | 25 | 50 |
76+
coverage-report | 47.36 | 0 | 25 | 50 |
7777
file.js | 100 | 100 | 100 | 100 |
7878
notRequiredInTestSuite.js | 0 | 0 | 0 | 0 | 8-19
7979
otherFile.js | 100 | 100 | 100 | 100 |
@@ -98,7 +98,7 @@ Lines : 60% ( 12/20 )
9898
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
9999
-------------------------------------|---------|----------|---------|---------|-------------------
100100
All files | 60 | 0 | 50 | 60 |
101-
coverage-report | 47.37 | 0 | 25 | 50 |
101+
coverage-report | 47.36 | 0 | 25 | 50 |
102102
file.js | 100 | 100 | 100 | 100 |
103103
notRequiredInTestSuite.js | 0 | 0 | 0 | 0 | 8-19
104104
otherFile.js | 100 | 100 | 100 | 100 |
@@ -116,7 +116,7 @@ exports[`outputs coverage report when text is requested 1`] = `
116116
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
117117
-------------------------------------|---------|----------|---------|---------|-------------------
118118
All files | 60 | 0 | 50 | 60 |
119-
coverage-report | 47.37 | 0 | 25 | 50 |
119+
coverage-report | 47.36 | 0 | 25 | 50 |
120120
file.js | 100 | 100 | 100 | 100 |
121121
notRequiredInTestSuite.js | 0 | 0 | 0 | 0 | 8-19
122122
otherFile.js | 100 | 100 | 100 | 100 |

e2e/__tests__/workerForceExit.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,5 +69,5 @@ test('force exits a worker that fails to exit gracefully', async () => {
6969

7070
const [pid] = execRes!;
7171

72-
expect(await findProcess('pid', pid)).toHaveLength(0);
72+
expect(await findProcess('pid', Number(pid))).toHaveLength(0);
7373
});

examples/angular/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"@angular/platform-browser": "^12.0.0",
1414
"@angular/platform-browser-dynamic": "^12.0.0",
1515
"core-js": "^3.2.1",
16-
"rxjs": "^6.5.3",
16+
"rxjs": "^7.3.0",
1717
"tslib": "^2.0.0",
1818
"typescript": "*",
1919
"zone.js": "~0.11.3"

packages/jest-cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"jest-util": "^27.2.3",
2222
"jest-validate": "^27.2.3",
2323
"prompts": "^2.0.1",
24-
"yargs": "^16.0.3"
24+
"yargs": "^16.2.0"
2525
},
2626
"devDependencies": {
2727
"@jest/test-utils": "^27.2.3",

packages/jest-core/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
"jest-validate": "^27.2.3",
3535
"jest-watcher": "^27.2.3",
3636
"micromatch": "^4.0.4",
37-
"p-each-series": "^2.1.0",
3837
"rimraf": "^3.0.0",
3938
"slash": "^3.0.0",
4039
"strip-ansi": "^6.0.0"

packages/jest-core/src/runGlobalHook.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
*/
77

88
import * as util from 'util';
9-
import pEachSeries = require('p-each-series');
109
import type {Test} from '@jest/test-result';
1110
import {createScriptTransformer} from '@jest/transform';
1211
import type {Config} from '@jest/types';
@@ -30,9 +29,9 @@ export default async ({
3029
}
3130

3231
if (globalModulePaths.size > 0) {
33-
await pEachSeries(globalModulePaths, async modulePath => {
32+
for (const modulePath of globalModulePaths) {
3433
if (!modulePath) {
35-
return;
34+
continue;
3635
}
3736

3837
const correctConfig = allTests.find(
@@ -73,8 +72,6 @@ export default async ({
7372
)}`,
7473
);
7574
}
76-
});
75+
}
7776
}
78-
79-
return Promise.resolve();
8077
};

packages/jest-repl/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"jest-util": "^27.2.3",
2727
"jest-validate": "^27.2.3",
2828
"repl": "^0.1.3",
29-
"yargs": "^16.0.3"
29+
"yargs": "^16.2.0"
3030
},
3131
"devDependencies": {
3232
"@jest/test-utils": "^27.2.3",

packages/jest-runtime/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"jest-validate": "^27.2.3",
4141
"slash": "^3.0.0",
4242
"strip-bom": "^4.0.0",
43-
"yargs": "^16.0.3"
43+
"yargs": "^16.2.0"
4444
},
4545
"devDependencies": {
4646
"@jest/test-utils": "^27.2.3",

0 commit comments

Comments
 (0)