Skip to content

Commit 98ed700

Browse files
authored
chore: update @babel/code-frame (#11048)
1 parent baf9f99 commit 98ed700

File tree

13 files changed

+143
-154
lines changed

13 files changed

+143
-154
lines changed

e2e/Utils.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -282,17 +282,6 @@ export const normalizeIcons = (str: string) => {
282282
.replace(new RegExp('\u221A', 'g'), '\u2713');
283283
};
284284

285-
export const rightTrimStdout = (str: string) => {
286-
if (!str) {
287-
return str;
288-
}
289-
290-
return str
291-
.split('\n')
292-
.map(str => str.trimRight())
293-
.join('\n');
294-
};
295-
296285
// Certain environments (like CITGM and GH Actions) do not come with mercurial installed
297286
let hgIsInstalled: boolean | null = null;
298287

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
exports[`code coverage for Handlebars 1`] = `
44
-----------|---------|----------|---------|---------|-------------------
5-
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
5+
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.67 | 66.67 | 66.67 |
8+
greet.hbs | 75 | 66.67 | 66.67 | 66.67 | 10
99
-----------|---------|----------|---------|---------|-------------------
1010
`;

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

Lines changed: 64 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -2,61 +2,61 @@
22

33
exports[`collects coverage from duplicate files avoiding shared cache 1`] = `
44
---------------|---------|----------|---------|---------|-------------------
5-
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
5+
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
66
---------------|---------|----------|---------|---------|-------------------
7-
All files | 100 | 100 | 100 | 100 |
8-
a | 100 | 100 | 100 | 100 |
9-
identical.js | 100 | 100 | 100 | 100 |
10-
b | 100 | 100 | 100 | 100 |
11-
identical.js | 100 | 100 | 100 | 100 |
7+
All files | 100 | 100 | 100 | 100 |
8+
a | 100 | 100 | 100 | 100 |
9+
identical.js | 100 | 100 | 100 | 100 |
10+
b | 100 | 100 | 100 | 100 |
11+
identical.js | 100 | 100 | 100 | 100 |
1212
---------------|---------|----------|---------|---------|-------------------
1313
`;
1414

1515
exports[`collects coverage only from multiple specified files 1`] = `
1616
--------------|---------|----------|---------|---------|-------------------
17-
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
17+
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
1818
--------------|---------|----------|---------|---------|-------------------
19-
All files | 100 | 100 | 100 | 100 |
20-
file.js | 100 | 100 | 100 | 100 |
21-
otherFile.js | 100 | 100 | 100 | 100 |
19+
All files | 100 | 100 | 100 | 100 |
20+
file.js | 100 | 100 | 100 | 100 |
21+
otherFile.js | 100 | 100 | 100 | 100 |
2222
--------------|---------|----------|---------|---------|-------------------
2323
`;
2424

2525
exports[`collects coverage only from specified file 1`] = `
2626
----------|---------|----------|---------|---------|-------------------
27-
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
27+
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
2828
----------|---------|----------|---------|---------|-------------------
29-
All files | 100 | 100 | 100 | 100 |
30-
file.js | 100 | 100 | 100 | 100 |
29+
All files | 100 | 100 | 100 | 100 |
30+
file.js | 100 | 100 | 100 | 100 |
3131
----------|---------|----------|---------|---------|-------------------
3232
`;
3333

3434
exports[`collects coverage only from specified files avoiding dependencies 1`] = `
3535
----------|---------|----------|---------|---------|-------------------
36-
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
36+
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
3737
----------|---------|----------|---------|---------|-------------------
38-
All files | 87.5 | 100 | 50 | 100 |
39-
sum.js | 87.5 | 100 | 50 | 100 |
38+
All files | 87.5 | 100 | 50 | 100 |
39+
sum.js | 87.5 | 100 | 50 | 100 |
4040
----------|---------|----------|---------|---------|-------------------
4141
`;
4242

4343
exports[`does not output coverage report when html is requested 1`] = ``;
4444

4545
exports[`generates coverage when using the testRegex config param 1`] = `
4646
-------------------------------------|---------|----------|---------|---------|-------------------
47-
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
47+
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
4848
-------------------------------------|---------|----------|---------|---------|-------------------
49-
All files | 60 | 0 | 50 | 60 |
50-
coverage-report | 47.37 | 0 | 25 | 50 |
51-
file.js | 100 | 100 | 100 | 100 |
52-
notRequiredInTestSuite.js | 0 | 0 | 0 | 0 | 8-19
53-
otherFile.js | 100 | 100 | 100 | 100 |
54-
sum.js | 87.5 | 100 | 50 | 100 |
55-
sumDependency.js | 0 | 0 | 0 | 0 | 8-12
56-
coverage-report/cached-duplicates/a | 100 | 100 | 100 | 100 |
57-
identical.js | 100 | 100 | 100 | 100 |
58-
coverage-report/cached-duplicates/b | 100 | 100 | 100 | 100 |
59-
identical.js | 100 | 100 | 100 | 100 |
49+
All files | 60 | 0 | 50 | 60 |
50+
coverage-report | 47.37 | 0 | 25 | 50 |
51+
file.js | 100 | 100 | 100 | 100 |
52+
notRequiredInTestSuite.js | 0 | 0 | 0 | 0 | 8-19
53+
otherFile.js | 100 | 100 | 100 | 100 |
54+
sum.js | 87.5 | 100 | 50 | 100 |
55+
sumDependency.js | 0 | 0 | 0 | 0 | 8-12
56+
coverage-report/cached-duplicates/a | 100 | 100 | 100 | 100 |
57+
identical.js | 100 | 100 | 100 | 100 |
58+
coverage-report/cached-duplicates/b | 100 | 100 | 100 | 100 |
59+
identical.js | 100 | 100 | 100 | 100 |
6060
-------------------------------------|---------|----------|---------|---------|-------------------
6161
`;
6262

@@ -70,19 +70,19 @@ Ran all test suites.
7070
7171
exports[`outputs coverage report 1`] = `
7272
-------------------------------------|---------|----------|---------|---------|-------------------
73-
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
73+
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
7474
-------------------------------------|---------|----------|---------|---------|-------------------
75-
All files | 60 | 0 | 50 | 60 |
76-
coverage-report | 47.37 | 0 | 25 | 50 |
77-
file.js | 100 | 100 | 100 | 100 |
78-
notRequiredInTestSuite.js | 0 | 0 | 0 | 0 | 8-19
79-
otherFile.js | 100 | 100 | 100 | 100 |
80-
sum.js | 87.5 | 100 | 50 | 100 |
81-
sumDependency.js | 0 | 0 | 0 | 0 | 8-12
82-
coverage-report/cached-duplicates/a | 100 | 100 | 100 | 100 |
83-
identical.js | 100 | 100 | 100 | 100 |
84-
coverage-report/cached-duplicates/b | 100 | 100 | 100 | 100 |
85-
identical.js | 100 | 100 | 100 | 100 |
75+
All files | 60 | 0 | 50 | 60 |
76+
coverage-report | 47.37 | 0 | 25 | 50 |
77+
file.js | 100 | 100 | 100 | 100 |
78+
notRequiredInTestSuite.js | 0 | 0 | 0 | 0 | 8-19
79+
otherFile.js | 100 | 100 | 100 | 100 |
80+
sum.js | 87.5 | 100 | 50 | 100 |
81+
sumDependency.js | 0 | 0 | 0 | 0 | 8-12
82+
coverage-report/cached-duplicates/a | 100 | 100 | 100 | 100 |
83+
identical.js | 100 | 100 | 100 | 100 |
84+
coverage-report/cached-duplicates/b | 100 | 100 | 100 | 100 |
85+
identical.js | 100 | 100 | 100 | 100 |
8686
-------------------------------------|---------|----------|---------|---------|-------------------
8787
`;
8888
@@ -95,37 +95,37 @@ Functions : 50% ( 3/6 )
9595
Lines : 60% ( 12/20 )
9696
================================================================================
9797
-------------------------------------|---------|----------|---------|---------|-------------------
98-
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
98+
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
9999
-------------------------------------|---------|----------|---------|---------|-------------------
100-
All files | 60 | 0 | 50 | 60 |
101-
coverage-report | 47.37 | 0 | 25 | 50 |
102-
file.js | 100 | 100 | 100 | 100 |
103-
notRequiredInTestSuite.js | 0 | 0 | 0 | 0 | 8-19
104-
otherFile.js | 100 | 100 | 100 | 100 |
105-
sum.js | 87.5 | 100 | 50 | 100 |
106-
sumDependency.js | 0 | 0 | 0 | 0 | 8-12
107-
coverage-report/cached-duplicates/a | 100 | 100 | 100 | 100 |
108-
identical.js | 100 | 100 | 100 | 100 |
109-
coverage-report/cached-duplicates/b | 100 | 100 | 100 | 100 |
110-
identical.js | 100 | 100 | 100 | 100 |
100+
All files | 60 | 0 | 50 | 60 |
101+
coverage-report | 47.37 | 0 | 25 | 50 |
102+
file.js | 100 | 100 | 100 | 100 |
103+
notRequiredInTestSuite.js | 0 | 0 | 0 | 0 | 8-19
104+
otherFile.js | 100 | 100 | 100 | 100 |
105+
sum.js | 87.5 | 100 | 50 | 100 |
106+
sumDependency.js | 0 | 0 | 0 | 0 | 8-12
107+
coverage-report/cached-duplicates/a | 100 | 100 | 100 | 100 |
108+
identical.js | 100 | 100 | 100 | 100 |
109+
coverage-report/cached-duplicates/b | 100 | 100 | 100 | 100 |
110+
identical.js | 100 | 100 | 100 | 100 |
111111
-------------------------------------|---------|----------|---------|---------|-------------------
112112
`;
113113
114114
exports[`outputs coverage report when text is requested 1`] = `
115115
-------------------------------------|---------|----------|---------|---------|-------------------
116-
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
116+
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
117117
-------------------------------------|---------|----------|---------|---------|-------------------
118-
All files | 60 | 0 | 50 | 60 |
119-
coverage-report | 47.37 | 0 | 25 | 50 |
120-
file.js | 100 | 100 | 100 | 100 |
121-
notRequiredInTestSuite.js | 0 | 0 | 0 | 0 | 8-19
122-
otherFile.js | 100 | 100 | 100 | 100 |
123-
sum.js | 87.5 | 100 | 50 | 100 |
124-
sumDependency.js | 0 | 0 | 0 | 0 | 8-12
125-
coverage-report/cached-duplicates/a | 100 | 100 | 100 | 100 |
126-
identical.js | 100 | 100 | 100 | 100 |
127-
coverage-report/cached-duplicates/b | 100 | 100 | 100 | 100 |
128-
identical.js | 100 | 100 | 100 | 100 |
118+
All files | 60 | 0 | 50 | 60 |
119+
coverage-report | 47.37 | 0 | 25 | 50 |
120+
file.js | 100 | 100 | 100 | 100 |
121+
notRequiredInTestSuite.js | 0 | 0 | 0 | 0 | 8-19
122+
otherFile.js | 100 | 100 | 100 | 100 |
123+
sum.js | 87.5 | 100 | 50 | 100 |
124+
sumDependency.js | 0 | 0 | 0 | 0 | 8-12
125+
coverage-report/cached-duplicates/a | 100 | 100 | 100 | 100 |
126+
identical.js | 100 | 100 | 100 | 100 |
127+
coverage-report/cached-duplicates/b | 100 | 100 | 100 | 100 |
128+
identical.js | 100 | 100 | 100 | 100 |
129129
-------------------------------------|---------|----------|---------|---------|-------------------
130130
`;
131131

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

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,20 @@ Ran all test suites.
1717
1818
exports[`excludes tests matched by path threshold groups from global group: stdout 1`] = `
1919
-----------|---------|----------|---------|---------|-------------------
20-
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
20+
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
2121
-----------|---------|----------|---------|---------|-------------------
22-
All files | 50 | 100 | 50 | 50 |
23-
apple.js | 0 | 100 | 0 | 0 | 1-2
24-
banana.js | 100 | 100 | 100 | 100 |
22+
All files | 50 | 100 | 50 | 50 |
23+
apple.js | 0 | 100 | 0 | 0 | 1-2
24+
banana.js | 100 | 100 | 100 | 100 |
2525
-----------|---------|----------|---------|---------|-------------------
2626
`;
2727
2828
exports[`exits with 0 if global threshold group is not found in coverage data: stdout 1`] = `
2929
-----------|---------|----------|---------|---------|-------------------
30-
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
30+
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
3131
-----------|---------|----------|---------|---------|-------------------
32-
All files | 100 | 100 | 100 | 100 |
33-
banana.js | 100 | 100 | 100 | 100 |
32+
All files | 100 | 100 | 100 | 100 |
33+
banana.js | 100 | 100 | 100 | 100 |
3434
-----------|---------|----------|---------|---------|-------------------
3535
`;
3636
@@ -51,10 +51,10 @@ Ran all test suites.
5151
5252
exports[`exits with 1 if coverage threshold is not met: stdout 1`] = `
5353
----------------|---------|----------|---------|---------|-------------------
54-
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
54+
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
5555
----------------|---------|----------|---------|---------|-------------------
56-
All files | 50 | 100 | 0 | 50 |
57-
not-covered.js | 50 | 100 | 0 | 50 | 2
56+
All files | 50 | 100 | 0 | 50 |
57+
not-covered.js | 50 | 100 | 0 | 50 | 2
5858
----------------|---------|----------|---------|---------|-------------------
5959
`;
6060
@@ -75,10 +75,10 @@ Ran all test suites.
7575
7676
exports[`exits with 1 if path threshold group is not found in coverage data: stdout 1`] = `
7777
-----------|---------|----------|---------|---------|-------------------
78-
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
78+
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
7979
-----------|---------|----------|---------|---------|-------------------
80-
All files | 100 | 100 | 100 | 100 |
81-
banana.js | 100 | 100 | 100 | 100 |
80+
All files | 100 | 100 | 100 | 100 |
81+
banana.js | 100 | 100 | 100 | 100 |
8282
-----------|---------|----------|---------|---------|-------------------
8383
`;
8484
@@ -101,9 +101,9 @@ Ran all test suites.
101101
102102
exports[`file is matched by all path and glob threshold groups: stdout 1`] = `
103103
-----------|---------|----------|---------|---------|-------------------
104-
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
104+
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
105105
-----------|---------|----------|---------|---------|-------------------
106-
All files | 50 | 100 | 0 | 50 |
107-
banana.js | 50 | 100 | 0 | 50 | 2
106+
All files | 50 | 100 | 0 | 50 |
107+
banana.js | 50 | 100 | 0 | 50 | 2
108108
-----------|---------|----------|---------|---------|-------------------
109109
`;

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
exports[`produces code coverage for uncovered files without transformer 1`] = `
44
---------------------|---------|----------|---------|---------|-------------------
5-
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
5+
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
66
---------------------|---------|----------|---------|---------|-------------------
7-
All files | 0 | 100 | 0 | 0 |
8-
some-random-file.js | 0 | 100 | 0 | 0 | 8-10
7+
All files | 0 | 100 | 0 | 0 |
8+
some-random-file.js | 0 | 100 | 0 | 0 | 8-10
99
---------------------|---------|----------|---------|---------|-------------------
1010
`;

0 commit comments

Comments
 (0)