aboutsummaryrefslogtreecommitdiff
path: root/node_modules/istanbul-lib-coverage
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-05-24 15:10:37 +0200
committerFlorian Dold <florian.dold@gmail.com>2017-05-24 15:11:17 +0200
commit7a3df06eb573d36142bd1a8e03c5ce8752d300b3 (patch)
tree70bfaea8884c374876f607774850a3a51c0cb381 /node_modules/istanbul-lib-coverage
parentaca1143cb9eed16cf37f04e475e4257418dd18ac (diff)
downloadwallet-core-7a3df06eb573d36142bd1a8e03c5ce8752d300b3.tar.xz
fix build issues and add typedoc
Diffstat (limited to 'node_modules/istanbul-lib-coverage')
-rw-r--r--node_modules/istanbul-lib-coverage/.doc.yml3
-rw-r--r--node_modules/istanbul-lib-coverage/CHANGELOG.md16
-rw-r--r--node_modules/istanbul-lib-coverage/lib/coverage-map.js14
-rw-r--r--node_modules/istanbul-lib-coverage/lib/file.js2
-rw-r--r--node_modules/istanbul-lib-coverage/package.json6
5 files changed, 36 insertions, 5 deletions
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.
+<a name="1.1.0"></a>
+# [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))
+
+
+
+
<a name="1.0.2"></a>
## [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
@@ -58,6 +58,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 <kananthmail-github@yahoo.com>",
"main": "index.js",
+ "files": [
+ "lib",
+ "index.js"
+ ],
"scripts": {
"pretest": "jshint index.js lib/ test/",
"test": "mocha"