Skip to content

Commit

Permalink
feat(deps): update foreground-child to promise API (#512)
Browse files Browse the repository at this point in the history
  • Loading branch information
bcoe authored Jan 3, 2024
1 parent ef672da commit b46b640
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 22 deletions.
8 changes: 4 additions & 4 deletions bin/c8.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env node
'use strict'

const foreground = require('foreground-child')
const { foregroundChild } = require('foreground-child')
const { outputReport } = require('../lib/commands/report')
const { rm, mkdir } = require('fs/promises')
const {
Expand All @@ -25,14 +25,14 @@ async function run () {

await mkdir(argv.tempDirectory, { recursive: true })
process.env.NODE_V8_COVERAGE = argv.tempDirectory
foreground(hideInstrumenterArgs(argv), async (done) => {
foregroundChild(hideInstrumenterArgs(argv), async () => {
try {
await outputReport(argv)
return process.exitCode
} catch (err) {
console.error(err.stack)
process.exitCode = 1
return 1
}
done()
})
}
}
Expand Down
41 changes: 25 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"@bcoe/v8-coverage": "^0.2.3",
"@istanbuljs/schema": "^0.1.3",
"find-up": "^5.0.0",
"foreground-child": "^2.0.0",
"foreground-child": "^3.1.1",
"istanbul-lib-coverage": "^3.2.0",
"istanbul-lib-report": "^3.0.1",
"istanbul-reports": "^3.1.6",
Expand Down Expand Up @@ -64,4 +64,4 @@
"lib",
"bin"
]
}
}

0 comments on commit b46b640

Please sign in to comment.