Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: Drop node.js 6, upgrade dependencies #1134

Merged
merged 2 commits into from Jul 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions .taprc
@@ -0,0 +1,7 @@
{
"test-ignore": "^test/(helpers|src)/",
"coverage": false,
"jobs": 1,
"timeout": 360,
"bail": false
}
1 change: 0 additions & 1 deletion .travis.yml
Expand Up @@ -7,7 +7,6 @@ node_js:
- "node"
- 10
- 8
- 6
matrix:
## An ENOMEM error occurs with 10+ under Travis-CI for Windows.
## Disable until we can determine the cause.
Expand Down
7 changes: 5 additions & 2 deletions bin/wrap.js
Expand Up @@ -16,8 +16,11 @@ if (process.env.NYC_PROCESSINFO_EXTERNAL_ID) {
}

if (process.env.NYC_CONFIG_OVERRIDE) {
var override = JSON.parse(process.env.NYC_CONFIG_OVERRIDE)
config = Object.assign(config, override)
const override = JSON.parse(process.env.NYC_CONFIG_OVERRIDE)
config = {
...config,
...override
}
process.env.NYC_CONFIG = JSON.stringify(config)
}

Expand Down
16 changes: 7 additions & 9 deletions index.js
Expand Up @@ -393,20 +393,18 @@ class NYC {
}

report () {
var tree
var map = this.getCoverageMapFromAllCoverageFiles()
var context = libReport.createContext({
const context = libReport.createContext({
dir: this.reportDirectory(),
watermarks: this.config.watermarks
watermarks: this.config.watermarks,
coverageMap: this.getCoverageMapFromAllCoverageFiles()
})

tree = libReport.summarizers.pkg(map)

this.reporter.forEach((_reporter) => {
tree.visit(reports.create(_reporter, {
reports.create(_reporter, {
skipEmpty: this.config.skipEmpty,
skipFull: this.config.skipFull
}), context)
skipFull: this.config.skipFull,
maxCols: process.stdout.columns || 100
}).execute(context)
})

if (this._showProcessTree) {
Expand Down
7 changes: 4 additions & 3 deletions lib/instrumenters/istanbul.js
Expand Up @@ -8,16 +8,17 @@ function InstrumenterIstanbul (options) {
const { plugins } = options
const configPlugins = plugins ? { plugins } : {}

const instrumenter = createInstrumenter(Object.assign({
const instrumenter = createInstrumenter({
autoWrap: true,
coverageVariable: '__coverage__',
embedSource: true,
compact: options.compact,
preserveComments: options.preserveComments,
produceSourceMap: options.produceSourceMap,
ignoreClassMethods: options.ignoreClassMethods,
esModules: options.esModules
}, configPlugins))
esModules: options.esModules,
...configPlugins
})

return {
instrumentSync (code, filename, sourceMap) {
Expand Down