Skip to content

Commit 00c3b34

Browse files
authored
feat: Drop node.js 6, upgrade dependencies (#1134)
BREAKING CHANGE: Node.js 8 is now required to run nyc
1 parent 421c5bd commit 00c3b34

19 files changed

+3009
-1625
lines changed

.taprc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"test-ignore": "^test/(helpers|src)/",
3+
"coverage": false,
4+
"jobs": 1,
5+
"timeout": 360,
6+
"bail": false
7+
}

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ node_js:
77
- "node"
88
- 10
99
- 8
10-
- 6
1110
matrix:
1211
## An ENOMEM error occurs with 10+ under Travis-CI for Windows.
1312
## Disable until we can determine the cause.

bin/wrap.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,11 @@ if (process.env.NYC_PROCESSINFO_EXTERNAL_ID) {
1616
}
1717

1818
if (process.env.NYC_CONFIG_OVERRIDE) {
19-
var override = JSON.parse(process.env.NYC_CONFIG_OVERRIDE)
20-
config = Object.assign(config, override)
19+
const override = JSON.parse(process.env.NYC_CONFIG_OVERRIDE)
20+
config = {
21+
...config,
22+
...override
23+
}
2124
process.env.NYC_CONFIG = JSON.stringify(config)
2225
}
2326

index.js

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -393,20 +393,18 @@ class NYC {
393393
}
394394

395395
report () {
396-
var tree
397-
var map = this.getCoverageMapFromAllCoverageFiles()
398-
var context = libReport.createContext({
396+
const context = libReport.createContext({
399397
dir: this.reportDirectory(),
400-
watermarks: this.config.watermarks
398+
watermarks: this.config.watermarks,
399+
coverageMap: this.getCoverageMapFromAllCoverageFiles()
401400
})
402401

403-
tree = libReport.summarizers.pkg(map)
404-
405402
this.reporter.forEach((_reporter) => {
406-
tree.visit(reports.create(_reporter, {
403+
reports.create(_reporter, {
407404
skipEmpty: this.config.skipEmpty,
408-
skipFull: this.config.skipFull
409-
}), context)
405+
skipFull: this.config.skipFull,
406+
maxCols: process.stdout.columns || 100
407+
}).execute(context)
410408
})
411409

412410
if (this._showProcessTree) {

lib/instrumenters/istanbul.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,17 @@ function InstrumenterIstanbul (options) {
88
const { plugins } = options
99
const configPlugins = plugins ? { plugins } : {}
1010

11-
const instrumenter = createInstrumenter(Object.assign({
11+
const instrumenter = createInstrumenter({
1212
autoWrap: true,
1313
coverageVariable: '__coverage__',
1414
embedSource: true,
1515
compact: options.compact,
1616
preserveComments: options.preserveComments,
1717
produceSourceMap: options.produceSourceMap,
1818
ignoreClassMethods: options.ignoreClassMethods,
19-
esModules: options.esModules
20-
}, configPlugins))
19+
esModules: options.esModules,
20+
...configPlugins
21+
})
2122

2223
return {
2324
instrumentSync (code, filename, sourceMap) {

0 commit comments

Comments
 (0)