Skip to content

Commit 6240393

Browse files
authored
Assorted updates
* Remove Node.js 17 support * Add Node.js 18 support * Use latest everything for CI tasks * Configure Volta for managing development versions * Update dependencies
1 parent b208d14 commit 6240393

25 files changed

+1083
-1415
lines changed

.github/workflows/ci.yml

Lines changed: 22 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,21 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
node-version: [^12.22, ^14.17, ^16.4, ^17]
18+
node-version: [^12.22, ^14.17, ^16.4, ^18]
1919
os: [ubuntu-latest, windows-latest]
2020
steps:
21-
- uses: actions/checkout@v2
21+
- uses: actions/checkout@v3
2222
- name: Enable symlinks
2323
if: matrix.os == 'windows-latest'
2424
run: |
2525
git config core.symlinks true
2626
git reset --hard
27-
- run: rm .npmrc
28-
- uses: actions/setup-node@v2
27+
- uses: actions/setup-node@v3
2928
with:
3029
node-version: ${{ matrix.node-version }}
3130
cache: npm
3231
- name: Upgrade npm
33-
run: npm install --global npm@^8.1.2
32+
run: npm install --global npm@^8.12
3433
- run: npm install --no-audit
3534
- run: npm run cover
3635
- uses: codecov/codecov-action@v2
@@ -45,14 +44,13 @@ jobs:
4544
matrix:
4645
ts-version: [~4.4, ~4.5, ~4.6, ~4.7]
4746
steps:
48-
- uses: actions/checkout@v2
49-
- run: rm .npmrc
50-
- uses: actions/setup-node@v2
47+
- uses: actions/checkout@v3
48+
- uses: actions/setup-node@v3
5149
with:
52-
node-version: ^12.22
50+
node-version: ^18
5351
cache: npm
5452
- name: Upgrade npm
55-
run: npm install --global npm@^8.1.2
53+
run: npm install --global npm@^8.12
5654
- run: npm install --no-audit
5755
- run: npm i typescript@${TS_VERSION}
5856
env:
@@ -65,15 +63,14 @@ jobs:
6563
name: Test package-lock for unexpected modifications
6664
runs-on: ubuntu-latest
6765
steps:
68-
- uses: actions/checkout@v2
69-
- run: rm .npmrc
70-
- uses: actions/setup-node@v2
66+
- uses: actions/checkout@v3
67+
- uses: actions/setup-node@v3
7168
with:
72-
node-version: ^12.22
69+
node-version: ^18
7370
cache: npm
7471
- name: Upgrade npm
75-
run: if [[ "$(npm -v)" != "8.1.2" ]]; then npm install --global npm@8.1.2; fi
76-
- run: npm install --no-audit --lockfile-version=3
72+
run: if [[ "$(npm -v)" != "8.12.0" ]]; then npm install --global npm@8.12.0; fi
73+
- run: npm install --no-audit
7774
- name: Test package-lock for unexpected modifications
7875
run: |
7976
npm -v
@@ -88,27 +85,25 @@ jobs:
8885
name: Install dependencies without using a lockfile
8986
runs-on: ubuntu-latest
9087
steps:
91-
- uses: actions/checkout@v2
92-
- run: rm .npmrc
93-
- uses: actions/setup-node@v2
88+
- uses: actions/checkout@v3
89+
- uses: actions/setup-node@v3
9490
with:
95-
node-version: ^12.22
91+
node-version: ^18
9692
- name: Upgrade npm
97-
run: npm install --global npm@^8.1.2
98-
- run: npm install --no-shrinkwrap --no-audit
93+
run: npm install --global npm@^8.12
94+
- run: npm install --no-package-lock --no-audit
9995
- run: npm run cover
10096

10197
xo:
10298
name: Lint source files
10399
runs-on: ubuntu-latest
104100
steps:
105-
- uses: actions/checkout@v2
106-
- run: rm .npmrc
107-
- uses: actions/setup-node@v2
101+
- uses: actions/checkout@v3
102+
- uses: actions/setup-node@v3
108103
with:
109-
node-version: ^16.4
104+
node-version: ^18
110105
cache: npm
111106
- name: Upgrade npm
112-
run: npm install --global npm@^8.1.2
107+
run: npm install --global npm@^8.12
113108
- run: npm install --no-audit
114109
- run: npx xo

lib/reporters/default.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ export default class Reporter {
231231
}
232232

233233
case 'hook-finished': {
234-
if (true && event.logs.length > 0) {
234+
if (event.logs.length > 0) {
235235
this.lineWriter.writeLine(` ${this.prefixTitle(event.testFile, event.title)}`);
236236
this.writeLogs(event);
237237
}
@@ -312,7 +312,7 @@ export default class Reporter {
312312
this.filesWithoutMatchedLineNumbers.add(event.testFile);
313313

314314
this.lineWriter.writeLine(colors.error(`${figures.cross} Line numbers for ${this.relativeFile(event.testFile)} did not match any tests`));
315-
} else if (true && !this.failFastEnabled && fileStats.remainingTests > 0) {
315+
} else if (!this.failFastEnabled && fileStats.remainingTests > 0) {
316316
this.lineWriter.writeLine(colors.error(`${figures.cross} ${fileStats.remainingTests} ${plur('test', fileStats.remainingTests)} remaining in ${this.relativeFile(event.testFile)}`));
317317
}
318318
}
@@ -571,17 +571,12 @@ export default class Reporter {
571571
this.lineWriter.writeLine();
572572

573573
if (this.failures.length > 0) {
574-
const writeTrailingLines = this.internalErrors.length > 0 || this.sharedWorkerErrors.length > 0 || this.uncaughtExceptions.length > 0 || this.unhandledRejections.length > 0;
575-
576574
const lastFailure = this.failures[this.failures.length - 1];
577575
for (const event of this.failures) {
578576
this.writeFailure(event);
579577
if (event !== lastFailure) {
580578
this.lineWriter.writeLine();
581579
this.lineWriter.writeLine();
582-
} else if (!true && writeTrailingLines) {
583-
this.lineWriter.writeLine();
584-
this.lineWriter.writeLine();
585580
}
586581
}
587582

lib/runner.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ export default class Runner extends Emittery {
524524
// If a concurrent test fails, even if `failFast` is enabled it won't
525525
// stop other concurrent tests from running.
526526
const allOkays = await Promise.all(concurrentTests.map(task => this.runTest(task, contextRef.copy())));
527-
return allOkays.every(ok => ok);
527+
return allOkays.every(Boolean);
528528
});
529529

530530
const beforeExitHandler = this.beforeExitHandler.bind(this);

0 commit comments

Comments
 (0)