c8 7.8.0 → 7.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/lib/commands/report.js +2 -1
- package/lib/parse-args.js +5 -0
- package/lib/report.js +4 -2
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [7.9.0](https://www.github.com/bcoe/c8/compare/v7.8.0...v7.9.0) (2021-09-10)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* add --exclude-node-modules option ([#321](https://www.github.com/bcoe/c8/issues/321)) ([a4733c6](https://www.github.com/bcoe/c8/commit/a4733c68abd778757bb6ed641e074be94b79c417))
|
|
11
|
+
|
|
5
12
|
## [7.8.0](https://www.github.com/bcoe/c8/compare/v7.7.3...v7.8.0) (2021-07-10)
|
|
6
13
|
|
|
7
14
|
|
package/lib/commands/report.js
CHANGED
|
@@ -24,7 +24,8 @@ exports.outputReport = async function (argv) {
|
|
|
24
24
|
all: argv.all,
|
|
25
25
|
allowExternal: argv.allowExternal,
|
|
26
26
|
src: argv.src,
|
|
27
|
-
skipFull: argv.skipFull
|
|
27
|
+
skipFull: argv.skipFull,
|
|
28
|
+
excludeNodeModules: argv.excludeNodeModules
|
|
28
29
|
})
|
|
29
30
|
await report.run()
|
|
30
31
|
if (argv.checkCoverage) await checkCoverages(argv, report)
|
package/lib/parse-args.js
CHANGED
|
@@ -41,6 +41,11 @@ function buildYargs (withCommands = false) {
|
|
|
41
41
|
describe: 'supplying --src will override cwd as the default location where --all looks for src files. --src can be ' +
|
|
42
42
|
'supplied multiple times and each directory will be included. This allows for workspaces spanning multiple projects'
|
|
43
43
|
})
|
|
44
|
+
.option('exclude-node-modules', {
|
|
45
|
+
default: true,
|
|
46
|
+
type: 'boolean',
|
|
47
|
+
describe: 'whether or not to exclude all node_module folders (i.e. **/node_modules/**) by default'
|
|
48
|
+
})
|
|
44
49
|
.option('include', {
|
|
45
50
|
alias: 'n',
|
|
46
51
|
default: [],
|
package/lib/report.js
CHANGED
|
@@ -27,7 +27,8 @@ class Report {
|
|
|
27
27
|
all,
|
|
28
28
|
src,
|
|
29
29
|
allowExternal = false,
|
|
30
|
-
skipFull
|
|
30
|
+
skipFull,
|
|
31
|
+
excludeNodeModules
|
|
31
32
|
}) {
|
|
32
33
|
this.reporter = reporter
|
|
33
34
|
this.reportsDirectory = reportsDirectory
|
|
@@ -37,7 +38,8 @@ class Report {
|
|
|
37
38
|
this.exclude = new Exclude({
|
|
38
39
|
exclude: exclude,
|
|
39
40
|
include: include,
|
|
40
|
-
relativePath: !allowExternal
|
|
41
|
+
relativePath: !allowExternal,
|
|
42
|
+
excludeNodeModules: excludeNodeModules
|
|
41
43
|
})
|
|
42
44
|
this.excludeAfterRemap = excludeAfterRemap
|
|
43
45
|
this.omitRelative = omitRelative
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "c8",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.9.0",
|
|
4
4
|
"description": "output coverage reports using Node.js' built in coverage",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"types": "./index.d.ts",
|
|
@@ -47,11 +47,12 @@
|
|
|
47
47
|
"yargs-parser": "^20.2.7"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
+
"@types/node": "^16.9.1",
|
|
50
51
|
"chai": "^4.2.0",
|
|
51
52
|
"chai-jest-snapshot": "^2.0.0",
|
|
52
53
|
"mocha": "^9.0.0",
|
|
53
54
|
"standard": "^16.0.3",
|
|
54
|
-
"ts-node": "^
|
|
55
|
+
"ts-node": "^10.0.0",
|
|
55
56
|
"typescript": "^4.0.0"
|
|
56
57
|
},
|
|
57
58
|
"engines": {
|