File tree 5 files changed +2245
-1429
lines changed
5 files changed +2245
-1429
lines changed Original file line number Diff line number Diff line change @@ -12,10 +12,10 @@ jobs:
12
12
strategy :
13
13
fail-fast : false
14
14
matrix :
15
- node : [12, 14, 16, 18]
15
+ node : [14, 16, 18, 20 ]
16
16
steps :
17
- - uses : actions/checkout@v3
18
- - uses : actions/setup-node@v3
17
+ - uses : actions/checkout@v4
18
+ - uses : actions/setup-node@v4
19
19
with :
20
20
node-version : ${{ matrix.node }}
21
21
cache : npm
24
24
windows :
25
25
runs-on : windows-latest
26
26
steps :
27
- - uses : actions/checkout@v3
28
- - uses : actions/setup-node@v3
27
+ - uses : actions/checkout@v4
28
+ - uses : actions/setup-node@v4
29
29
with :
30
30
node-version : lts/*
31
31
cache : npm
34
34
coverage :
35
35
runs-on : ubuntu-latest
36
36
steps :
37
- - uses : actions/checkout@v3
38
- - uses : actions/setup-node@v3
37
+ - uses : actions/checkout@v4
38
+ - uses : actions/setup-node@v4
39
39
with :
40
40
node-version : lts/*
41
41
cache : npm
Original file line number Diff line number Diff line change 3
3
4
4
const foreground = require ( 'foreground-child' )
5
5
const { outputReport } = require ( '../lib/commands/report' )
6
- const { promises } = require ( 'fs' )
7
- const { promisify } = require ( 'util' )
8
- const rimraf = require ( 'rimraf' )
6
+ const { rm, mkdir } = require ( 'fs/promises' )
9
7
const {
10
8
buildYargs,
11
9
hideInstrumenteeArgs,
@@ -21,18 +19,11 @@ async function run () {
21
19
] . indexOf ( argv . _ [ 0 ] ) !== - 1 ) {
22
20
argv = buildYargs ( true ) . parse ( process . argv . slice ( 2 ) )
23
21
} else {
24
- // fs.promises was not added until Node.js v10.0.0, if it doesn't
25
- // exist, assume we're Node.js v8.x and skip coverage.
26
- if ( ! promises ) {
27
- foreground ( hideInstrumenterArgs ( argv ) )
28
- return
29
- }
30
-
31
22
if ( argv . clean ) {
32
- await promisify ( rimraf ) ( argv . tempDirectory )
23
+ await rm ( argv . tempDirectory , { recursive : true , force : true } )
33
24
}
34
25
35
- await promises . mkdir ( argv . tempDirectory , { recursive : true } )
26
+ await mkdir ( argv . tempDirectory , { recursive : true } )
36
27
process . env . NODE_V8_COVERAGE = argv . tempDirectory
37
28
foreground ( hideInstrumenterArgs ( argv ) , async ( done ) => {
38
29
try {
You can’t perform that action at this time.
0 commit comments