File tree Expand file tree Collapse file tree 5 files changed +2245
-1429
lines changed
Expand file tree Collapse file tree 5 files changed +2245
-1429
lines changed Original file line number Diff line number Diff line change @@ -12,10 +12,10 @@ jobs:
1212 strategy :
1313 fail-fast : false
1414 matrix :
15- node : [12, 14, 16, 18]
15+ node : [14, 16, 18, 20 ]
1616 steps :
17- - uses : actions/checkout@v3
18- - uses : actions/setup-node@v3
17+ - uses : actions/checkout@v4
18+ - uses : actions/setup-node@v4
1919 with :
2020 node-version : ${{ matrix.node }}
2121 cache : npm
2424 windows :
2525 runs-on : windows-latest
2626 steps :
27- - uses : actions/checkout@v3
28- - uses : actions/setup-node@v3
27+ - uses : actions/checkout@v4
28+ - uses : actions/setup-node@v4
2929 with :
3030 node-version : lts/*
3131 cache : npm
3434 coverage :
3535 runs-on : ubuntu-latest
3636 steps :
37- - uses : actions/checkout@v3
38- - uses : actions/setup-node@v3
37+ - uses : actions/checkout@v4
38+ - uses : actions/setup-node@v4
3939 with :
4040 node-version : lts/*
4141 cache : npm
Original file line number Diff line number Diff line change 33
44const foreground = require ( 'foreground-child' )
55const { 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' )
97const {
108 buildYargs,
119 hideInstrumenteeArgs,
@@ -21,18 +19,11 @@ async function run () {
2119 ] . indexOf ( argv . _ [ 0 ] ) !== - 1 ) {
2220 argv = buildYargs ( true ) . parse ( process . argv . slice ( 2 ) )
2321 } 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-
3122 if ( argv . clean ) {
32- await promisify ( rimraf ) ( argv . tempDirectory )
23+ await rm ( argv . tempDirectory , { recursive : true , force : true } )
3324 }
3425
35- await promises . mkdir ( argv . tempDirectory , { recursive : true } )
26+ await mkdir ( argv . tempDirectory , { recursive : true } )
3627 process . env . NODE_V8_COVERAGE = argv . tempDirectory
3728 foreground ( hideInstrumenterArgs ( argv ) , async ( done ) => {
3829 try {
You can’t perform that action at this time.
0 commit comments