Skip to content

Commit

Permalink
feat: drop support for node 4
Browse files Browse the repository at this point in the history
BREAKING CHANGE: node 4 is no longer supported
  • Loading branch information
Matt Lewis committed May 17, 2018
1 parent 2ee4810 commit 26ad3af
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 14 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ node_js:
- '10'
- '8'
- '6'
- '4'

script: npm test

Expand Down
4 changes: 0 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,6 @@
"node",
"mocha"
],
"rules": {
"prefer-destructuring": 0,
"prefer-rest-params": 0
},
"prettier": true
},
"config": {
Expand Down
3 changes: 1 addition & 2 deletions src/reporter.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

const istanbul = require('istanbul-api');
const util = require('./util');

Expand Down Expand Up @@ -187,6 +185,7 @@ function CoverageIstanbulReporter(baseReporterDecorator, logger, config) {

const baseReporterOnRunComplete = this.onRunComplete;
this.onRunComplete = function(browsers, results) {
// eslint-disable-next-line prefer-rest-params
baseReporterOnRunComplete.apply(this, arguments);

if (coverageConfig.combineBrowserReports) {
Expand Down
4 changes: 1 addition & 3 deletions src/util.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

const path = require('path');
const minimatch = require('minimatch');

Expand All @@ -23,7 +21,7 @@ function fixWebpackFilePath(filePath) {
}

function fixWebpackSourcePaths(sourceMap, webpackConfig) {
let sourceRoot = sourceMap.sourceRoot;
let { sourceRoot } = sourceMap;
// Fix for https://github.com/mattlewis92/karma-coverage-istanbul-reporter/issues/32
// The sourceRoot is relative to the project directory and not an absolute path, so add the webpack context to it if set
if (
Expand Down
4 changes: 2 additions & 2 deletions test/reporter.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ const chai = require('chai');
const karma = require('karma');
const rimraf = require('rimraf');
const karmaCoverageIstanbulReporter = require('../src/reporter');
const OUTPUT_LOG_FILE = require('./karma.conf').OUTPUT_LOG_FILE;
const { OUTPUT_LOG_FILE } = require('./karma.conf');

const expect = chai.expect;
const { expect } = chai;
const OUTPUT_PATH = path.join(__dirname, 'fixtures', 'outputs');
const OUTPUT_FILE = path.join(OUTPUT_PATH, 'coverage-summary.json');
const fileReadTimeout = 300;
Expand Down
4 changes: 2 additions & 2 deletions test/util.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const expect = require('chai').expect;
const fixWebpackSourcePaths = require('../src/util').fixWebpackSourcePaths;
const { expect } = require('chai');
const { fixWebpackSourcePaths } = require('../src/util');

const originalPlatform = process.platform;

Expand Down

0 comments on commit 26ad3af

Please sign in to comment.