Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mattlewis92/karma-coverage-istanbul-reporter
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.1.1
Choose a base ref
...
head repository: mattlewis92/karma-coverage-istanbul-reporter
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v3.0.3
Choose a head ref
  • 17 commits
  • 12 files changed
  • 5 contributors

Commits on May 1, 2020

  1. feat: upgrade to latest istanbul api

    BREAKING CHANGE: node 6 and node 8 are no longer supported. To use this package you must upgrade to node 10 or higher.
    sebastianhaeni authored May 1, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    28cbbfb View commit details
  2. Copy the full SHA
    baba524 View commit details
  3. build: fix linting

    mattlewis92 committed May 1, 2020
    Copy the full SHA
    9cd809e View commit details
  4. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    f01c19e View commit details
  5. Copy the full SHA
    31b1a40 View commit details
  6. chore(release): 3.0.0

    mattlewis92 committed May 1, 2020
    Copy the full SHA
    5304cd6 View commit details
  7. Copy the full SHA
    b6632e2 View commit details

Commits on May 4, 2020

  1. Copy the full SHA
    9ba3fe0 View commit details
  2. test: fix test exit code

    mattlewis92 committed May 4, 2020
    Copy the full SHA
    e756c12 View commit details
  3. chore(release): 3.0.1

    mattlewis92 committed May 4, 2020
    Copy the full SHA
    a50d4e5 View commit details
  4. Copy the full SHA
    0d37f42 View commit details
  5. style: fix lint issue

    mattlewis92 committed May 4, 2020
    Copy the full SHA
    e8d4f4a View commit details

Commits on May 5, 2020

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    a0cbdd8 View commit details
  2. chore(release): 3.0.2

    mattlewis92 committed May 5, 2020
    Copy the full SHA
    5f5ca05 View commit details
  3. docs: update changelog

    mattlewis92 committed May 5, 2020
    Copy the full SHA
    5f3f030 View commit details

Commits on May 28, 2020

  1. fix: duplicated files when "skipFilesWithNoCoverage=false" on windows

    Co-authored-by: Cristian Danilo Gutiérrez <cristian.gutierrez@globant.com>
    CrisDan1905 and Cristian Danilo Gutiérrez authored May 28, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    052f6ab View commit details
  2. chore(release): 3.0.3

    mattlewis92 committed May 28, 2020
    Copy the full SHA
    b61dd30 View commit details
Showing with 6,007 additions and 4,604 deletions.
  1. +4 −1 .prettierrc
  2. +1 −2 .travis.yml
  3. +34 −2 CHANGELOG.md
  4. +17 −23 README.md
  5. +5,639 −4,372 package-lock.json
  6. +32 −24 package.json
  7. +60 −34 src/reporter.js
  8. +6 −6 src/util.js
  9. +18 −18 test/karma.conf.js
  10. +0 −1 test/mocha.opts
  11. +127 −83 test/reporter.spec.js
  12. +69 −38 test/util.spec.js
5 changes: 4 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"singleQuote": true
"singleQuote": true,
"trailingComma": "es5",
"arrowParens": "always",
"bracketSpacing": true
}
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
language: node_js

node_js:
- '14'
- '12'
- '10'
- '8'
- '6'

script: npm test

36 changes: 34 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,39 @@
# Change Log
# Changelog

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.

### [3.0.3](https://github.com/mattlewis92/karma-coverage-istanbul-reporter/compare/v3.0.2...v3.0.3) (2020-05-28)


### Bug Fixes

* duplicated files when "skipFilesWithNoCoverage=false" on windows ([052f6ab](https://github.com/mattlewis92/karma-coverage-istanbul-reporter/commit/052f6abca9a3039fca2a65e9e8488f39f9072b26))

### [3.0.2](https://github.com/mattlewis92/karma-coverage-istanbul-reporter/compare/v3.0.1...v3.0.2) (2020-05-05)


### Bug Fixes

* return correct exit code when thresholds are not met (that works with the karma api) ([a0cbdd8](https://github.com/mattlewis92/karma-coverage-istanbul-reporter/commit/a0cbdd80a2268586b62ef72e5541a36b1b46396a)), closes [#80](https://github.com/mattlewis92/karma-coverage-istanbul-reporter/issues/80)

### [3.0.1](https://github.com/mattlewis92/karma-coverage-istanbul-reporter/compare/v3.0.0...v3.0.1) (2020-05-04)


### Bug Fixes

* set correct process exit code when thresholds are not met ([9ba3fe0](https://github.com/mattlewis92/karma-coverage-istanbul-reporter/commit/9ba3fe0acf3ee778518c154a8dd050584f47bc13)), closes [#80](https://github.com/mattlewis92/karma-coverage-istanbul-reporter/issues/80)

## [3.0.0](https://github.com/mattlewis92/karma-coverage-istanbul-reporter/compare/v2.1.1...v3.0.0) (2020-05-01)


### ⚠ BREAKING CHANGES

* node 6 and node 8 are no longer supported. To use this package you must upgrade to node 10 or higher.

### Features

* upgrade to latest istanbul api ([28cbbfb](https://github.com/mattlewis92/karma-coverage-istanbul-reporter/commit/28cbbfb2cf8bd5b9533ceb489cc5047ff3def730))

<a name="2.1.1"></a>
## [2.1.1](https://github.com/mattlewis92/karma-coverage-istanbul-reporter/compare/v2.1.0...v2.1.1) (2019-11-21)

@@ -206,4 +238,4 @@ All notable changes to this project will be documented in this file. See [standa

# 0.1.0

* Initial release
* Initial release
40 changes: 17 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@
## About

This is a reporter only and does not perform the actual instrumentation of your code. Babel users should use the [istanbul babel plugin](https://github.com/istanbuljs/babel-plugin-istanbul) to instrument your code and webpack + typescript users should use the [istanbul-instrumenter-loader](https://github.com/deepsweet/istanbul-instrumenter-loader) and then use this karma reporter to do the actual reporting. See the [test config](https://github.com/mattlewis92/karma-coverage-istanbul-reporter/blob/master/test/karma.conf.js) for an e2e example of how to combine them.
This is a reporter only and does not perform the actual instrumentation of your code. Babel users should use the [istanbul babel plugin](https://github.com/istanbuljs/babel-plugin-istanbul) to instrument your code and webpack + typescript users should use the [coverage-istanbul-loader](https://github.com/JS-DevTools/coverage-istanbul-loader) and then use this karma reporter to do the actual reporting. See the [test config](https://github.com/mattlewis92/karma-coverage-istanbul-reporter/blob/master/test/karma.conf.js) for an e2e example of how to combine them.

## Installation

@@ -34,9 +34,8 @@ module.exports = function(config) {

reporters: ['coverage-istanbul'],

// any of these options are valid: https://github.com/istanbuljs/istanbuljs/blob/aae256fb8b9a3d19414dcf069c592e88712c32c6/packages/istanbul-api/lib/config.js#L33-L39
coverageIstanbulReporter: {
// reports can be any that are listed here: https://github.com/istanbuljs/istanbuljs/tree/aae256fb8b9a3d19414dcf069c592e88712c32c6/packages/istanbul-reports/lib
// reports can be any that are listed here: https://github.com/istanbuljs/istanbuljs/tree/73c25ce79f91010d1ff073aa6ff3fd01114f90db/packages/istanbul-reports/lib
reports: ['html', 'lcovonly', 'text-summary'],

// base output directory. If you include %browser% in the path it will be replaced with the karma browser name
@@ -49,12 +48,12 @@ module.exports = function(config) {
// if using webpack and pre-loaders, work around webpack breaking the source path
fixWebpackSourcePaths: true,

// Omit files with no statements, no functions and no branches from the report
// Omit files with no statements, no functions and no branches covered from the report
skipFilesWithNoCoverage: true,

// Most reporters accept additional config options. You can pass these through the `report-config` option
'report-config': {
// all options available at: https://github.com/istanbuljs/istanbuljs/blob/aae256fb8b9a3d19414dcf069c592e88712c32c6/packages/istanbul-reports/lib/html/index.js#L135-L137
// all options available at: https://github.com/istanbuljs/istanbuljs/blob/73c25ce79f91010d1ff073aa6ff3fd01114f90db/packages/istanbul-reports/lib/html/index.js#L257-L261
html: {
// outputs the report in ./coverage/html
subdir: 'html'
@@ -86,32 +85,27 @@ module.exports = function(config) {
}
},

verbose: true, // output config used by istanbul for debugging

// `instrumentation` is used to configure Istanbul API package.
instrumentation: {
// To include `node_modules` code in the report.
'default-excludes': false
}
verbose: true // output config used by istanbul for debugging
}
});
};
```

### List of reporters and options

- [clover](https://github.com/istanbuljs/istanbuljs/blob/aae256fb8b9a3d19414dcf069c592e88712c32c6/packages/istanbul-reports/lib/clover/index.js#L8-L9)
- [cobertura](https://github.com/istanbuljs/istanbuljs/blob/aae256fb8b9a3d19414dcf069c592e88712c32c6/packages/istanbul-reports/lib/cobertura/index.js#L9-L10)
- [html](https://github.com/istanbuljs/istanbuljs/blob/aae256fb8b9a3d19414dcf069c592e88712c32c6/packages/istanbul-reports/lib/html/index.js#L135-L137)
- [json-summary](https://github.com/istanbuljs/istanbuljs/blob/aae256fb8b9a3d19414dcf069c592e88712c32c6/packages/istanbul-reports/lib/json-summary/index.js#L8)
- [json](https://github.com/istanbuljs/istanbuljs/blob/aae256fb8b9a3d19414dcf069c592e88712c32c6/packages/istanbul-reports/lib/json/index.js#L8)
- lcov
- [lcovonly](https://github.com/istanbuljs/istanbuljs/blob/aae256fb8b9a3d19414dcf069c592e88712c32c6/packages/istanbul-reports/lib/lcovonly/index.js#L8)
- [clover](https://github.com/istanbuljs/istanbuljs/blob/73c25ce79f91010d1ff073aa6ff3fd01114f90db/packages/istanbul-reports/lib/clover/index.js#L14-L15)
- [cobertura](https://github.com/istanbuljs/istanbuljs/blob/73c25ce79f91010d1ff073aa6ff3fd01114f90db/packages/istanbul-reports/lib/cobertura/index.js#L16-L17)
- [html-spa](https://github.com/istanbuljs/istanbuljs/blob/73c25ce79f91010d1ff073aa6ff3fd01114f90db/packages/istanbul-reports/lib/html-spa/index.js#L47-L61)
- [html](https://github.com/istanbuljs/istanbuljs/blob/73c25ce79f91010d1ff073aa6ff3fd01114f90db/packages/istanbul-reports/lib/html/index.js#L257-L261)
- [json-summary](https://github.com/istanbuljs/istanbuljs/blob/73c25ce79f91010d1ff073aa6ff3fd01114f90db/packages/istanbul-reports/lib/json-summary/index.js#L12)
- [json](https://github.com/istanbuljs/istanbuljs/blob/73c25ce79f91010d1ff073aa6ff3fd01114f90db/packages/istanbul-reports/lib/json/index.js#L12)
- [lcov](https://github.com/istanbuljs/istanbuljs/blob/73c25ce79f91010d1ff073aa6ff3fd01114f90db/packages/istanbul-reports/lib/lcov/index.js#L13)
- [lcovonly](https://github.com/istanbuljs/istanbuljs/blob/73c25ce79f91010d1ff073aa6ff3fd01114f90db/packages/istanbul-reports/lib/lcovonly/index.js#L11-L12)
- none
- [teamcity](https://github.com/istanbuljs/istanbuljs/blob/aae256fb8b9a3d19414dcf069c592e88712c32c6/packages/istanbul-reports/lib/teamcity/index.js#L9-L10)
- [text-lcov](https://github.com/istanbuljs/istanbuljs/blob/aae256fb8b9a3d19414dcf069c592e88712c32c6/packages/istanbul-reports/lib/text-lcov/index.js#L9)
- [text-summary](https://github.com/istanbuljs/istanbuljs/blob/aae256fb8b9a3d19414dcf069c592e88712c32c6/packages/istanbul-reports/lib/text-summary/index.js#L9)
- [text](https://github.com/istanbuljs/istanbuljs/blob/aae256fb8b9a3d19414dcf069c592e88712c32c6/packages/istanbul-reports/lib/text/index.js#L159-L160)
- [teamcity](https://github.com/istanbuljs/istanbuljs/blob/73c25ce79f91010d1ff073aa6ff3fd01114f90db/packages/istanbul-reports/lib/teamcity/index.js#L13-L14)
- [text-lcov](https://github.com/istanbuljs/istanbuljs/blob/73c25ce79f91010d1ff073aa6ff3fd01114f90db/packages/istanbul-reports/lib/text-lcov/index.js#L11)
- [text-summary](https://github.com/istanbuljs/istanbuljs/blob/73c25ce79f91010d1ff073aa6ff3fd01114f90db/packages/istanbul-reports/lib/text-summary/index.js#L13)
- [text](https://github.com/istanbuljs/istanbuljs/blob/73c25ce79f91010d1ff073aa6ff3fd01114f90db/packages/istanbul-reports/lib/text/index.js#L231-L237)

## Credits

Loading