Comparing version
@@ -235,2 +235,9 @@ import type { Report } from 'c8'; | ||
/** | ||
* Merges all V8 coverage reports asynchronously and incrementally to avoid OOM issues. | ||
* | ||
* @defaultValue `false` | ||
*/ | ||
mergeAsync?: boolean | undefined; | ||
/** | ||
* Checks thresholds on a per-file basis. | ||
@@ -237,0 +244,0 @@ * |
@@ -6,3 +6,2 @@ import checkCoverages from './check-coverages.js'; | ||
import { c8js_version as version } from './utils.js'; | ||
import { promisify } from 'util'; | ||
import which from 'which'; | ||
@@ -43,7 +42,7 @@ | ||
{ | ||
return whichAsync('npm'); | ||
return which('npm'); | ||
}, | ||
get npx() | ||
{ | ||
return whichAsync('npx'); | ||
return which('npx'); | ||
}, | ||
@@ -83,5 +82,3 @@ }, | ||
const whichAsync = promisify(which); | ||
for (const [name, value] of Object.entries({ checkCoverage, commands, exec, report, version })) | ||
Object.defineProperty(c8js, name, { value }); |
@@ -24,2 +24,3 @@ import { requireAsC8 } from './utils.js'; | ||
'lines', | ||
'mergeAsync', | ||
'omitRelative', | ||
@@ -26,0 +27,0 @@ 'perFile', |
@@ -49,2 +49,3 @@ import parseConfig from './parse-config.js'; | ||
lines: 90, | ||
mergeAsync: false, | ||
omitRelative: true, | ||
@@ -51,0 +52,0 @@ perFile: false, |
{ | ||
"name": "c8js", | ||
"version": "0.4.0", | ||
"version": "0.5.0", | ||
"description": "A modern, asynchronous Node.js API for c8", | ||
@@ -27,5 +27,5 @@ "keywords": [ | ||
"coverage": "node dev/coverage", | ||
"lint": "eslint . --format compact --ignore-path .gitignore --ignore-pattern test/fixtures", | ||
"lint": "eslint . --format compact", | ||
"make-docs": "node dev/make-docs", | ||
"release": "git add CHANGELOG.md && npm version -f -m 'Version %s'", | ||
"release": "git add CHANGELOG.md && npm version -f -m \"Version %s\"", | ||
"test": "mocha --check-leaks --timeout=10000 test/*.spec.js" | ||
@@ -37,6 +37,7 @@ }, | ||
"c8": "7", | ||
"which": "2" | ||
"which": "3.0.1" | ||
}, | ||
"devDependencies": { | ||
"@origin-1/eslint-config": "latest", | ||
"eslint": "latest", | ||
"mocha": "latest", | ||
@@ -43,0 +44,0 @@ "ts-node": "latest", |
@@ -141,3 +141,3 @@ # c8js | ||
[npm badge]: https://badge.fury.io/js/c8js.svg | ||
[npm badge]: https://img.shields.io/npm/v/c8js?logo=npm | ||
[npm url]: https://www.npmjs.com/package/c8js |
46192
0.34%1198
0.5%7
16.67%+ Added
Updated