From 7a3df06eb573d36142bd1a8e03c5ce8752d300b3 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Wed, 24 May 2017 15:10:37 +0200 Subject: fix build issues and add typedoc --- node_modules/istanbul-lib-coverage/.doc.yml | 3 --- node_modules/istanbul-lib-coverage/CHANGELOG.md | 16 ++++++++++++++++ node_modules/istanbul-lib-coverage/lib/coverage-map.js | 14 ++++++++++++++ node_modules/istanbul-lib-coverage/lib/file.js | 2 +- node_modules/istanbul-lib-coverage/package.json | 6 +++++- 5 files changed, 36 insertions(+), 5 deletions(-) delete mode 100644 node_modules/istanbul-lib-coverage/.doc.yml (limited to 'node_modules/istanbul-lib-coverage') diff --git a/node_modules/istanbul-lib-coverage/.doc.yml b/node_modules/istanbul-lib-coverage/.doc.yml deleted file mode 100644 index dbf917bf9..000000000 --- a/node_modules/istanbul-lib-coverage/.doc.yml +++ /dev/null @@ -1,3 +0,0 @@ -order: - - Exports - diff --git a/node_modules/istanbul-lib-coverage/CHANGELOG.md b/node_modules/istanbul-lib-coverage/CHANGELOG.md index 7b01b5c81..eef0a0053 100644 --- a/node_modules/istanbul-lib-coverage/CHANGELOG.md +++ b/node_modules/istanbul-lib-coverage/CHANGELOG.md @@ -3,6 +3,22 @@ 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. + +# [1.1.0](https://github.com/istanbuljs/istanbul-lib-coverage/compare/istanbul-lib-coverage@1.0.2...istanbul-lib-coverage@1.1.0) (2017-04-29) + + +### Bug Fixes + +* getBranchCoverageByLine() was looking for line coverage using wrong object structure ([bf36658](https://github.com/istanbuljs/istanbul-lib-coverage/commit/bf36658)) + + +### Features + +* add possibility to filter coverage maps when running reports post-hoc ([#24](https://github.com/istanbuljs/istanbuljs/issues/24)) ([e1c99d6](https://github.com/istanbuljs/istanbul-lib-coverage/commit/e1c99d6)) + + + + ## [1.0.2](https://github.com/istanbuljs/istanbul-lib-coverage/compare/istanbul-lib-coverage@1.0.1...istanbul-lib-coverage@1.0.2) (2017-03-27) diff --git a/node_modules/istanbul-lib-coverage/lib/coverage-map.js b/node_modules/istanbul-lib-coverage/lib/coverage-map.js index 440779a6a..ccb3c8a4c 100644 --- a/node_modules/istanbul-lib-coverage/lib/coverage-map.js +++ b/node_modules/istanbul-lib-coverage/lib/coverage-map.js @@ -57,6 +57,20 @@ CoverageMap.prototype.merge = function (obj) { } }); }; +/** + * filter the coveragemap based on the callback provided + * @param {Function (filename)} callback - Returns true if the path + * should be included in the coveragemap. False if it should be + * removed. + */ +CoverageMap.prototype.filter = function (callback) { + var that = this; + Object.keys(that.data).forEach(function (k) { + if (!callback(k)) { + delete that.data[k]; + } + }); +}; /** * returns a JSON-serializable POJO for this coverage map * @returns {Object} diff --git a/node_modules/istanbul-lib-coverage/lib/file.js b/node_modules/istanbul-lib-coverage/lib/file.js index 3cb0ce263..5de8599fb 100644 --- a/node_modules/istanbul-lib-coverage/lib/file.js +++ b/node_modules/istanbul-lib-coverage/lib/file.js @@ -204,7 +204,7 @@ FileCoverage.prototype.getBranchCoverageByLine = function () { branches = this.b, ret = {}; Object.keys(branchMap).forEach(function (k) { - var line = branchMap[k].line, + var line = branchMap[k].line || branchMap[k].loc.start.line, branchData = branches[k]; ret[line] = ret[line] || []; ret[line].push.apply(ret[line], branchData); diff --git a/node_modules/istanbul-lib-coverage/package.json b/node_modules/istanbul-lib-coverage/package.json index 2e9bc8cc9..2b2275f9e 100644 --- a/node_modules/istanbul-lib-coverage/package.json +++ b/node_modules/istanbul-lib-coverage/package.json @@ -1,9 +1,13 @@ { "name": "istanbul-lib-coverage", - "version": "1.0.2", + "version": "1.1.0", "description": "Data library for istanbul coverage objects", "author": "Krishnan Anantheswaran ", "main": "index.js", + "files": [ + "lib", + "index.js" + ], "scripts": { "pretest": "jshint index.js lib/ test/", "test": "mocha" -- cgit v1.2.3