aboutsummaryrefslogtreecommitdiff
path: root/node_modules/istanbul-lib-instrument
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-08-14 05:01:11 +0200
committerFlorian Dold <florian.dold@gmail.com>2017-08-14 05:02:09 +0200
commit363723fc84f7b8477592e0105aeb331ec9a017af (patch)
tree29f92724f34131bac64d6a318dd7e30612e631c7 /node_modules/istanbul-lib-instrument
parent5634e77ad96bfe1818f6b6ee70b7379652e5487f (diff)
downloadwallet-core-363723fc84f7b8477592e0105aeb331ec9a017af.tar.xz
node_modules
Diffstat (limited to 'node_modules/istanbul-lib-instrument')
-rw-r--r--node_modules/istanbul-lib-instrument/CHANGELOG.md28
-rw-r--r--node_modules/istanbul-lib-instrument/dist/visitor.js13
-rw-r--r--node_modules/istanbul-lib-instrument/package.json12
3 files changed, 45 insertions, 8 deletions
diff --git a/node_modules/istanbul-lib-instrument/CHANGELOG.md b/node_modules/istanbul-lib-instrument/CHANGELOG.md
index 925db8493..b41d8a0d3 100644
--- a/node_modules/istanbul-lib-instrument/CHANGELOG.md
+++ b/node_modules/istanbul-lib-instrument/CHANGELOG.md
@@ -3,6 +3,34 @@
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.7.4"></a>
+## [1.7.4](https://github.com/istanbuljs/istanbuljs/compare/istanbul-lib-instrument@1.7.3...istanbul-lib-instrument@1.7.4) (2017-07-16)
+
+
+### Bug Fixes
+
+* update increment operator to appropriate expression type ([#74](https://github.com/istanbuljs/istanbuljs/issues/74)) ([dc69e66](https://github.com/istanbuljs/istanbuljs/commit/dc69e66))
+
+
+
+
+<a name="1.7.3"></a>
+## [1.7.3](https://github.com/istanbuljs/istanbuljs/compare/istanbul-lib-instrument@1.7.2...istanbul-lib-instrument@1.7.3) (2017-06-25)
+
+
+
+
+<a name="1.7.2"></a>
+## [1.7.2](https://github.com/istanbuljs/istanbuljs/compare/istanbul-lib-instrument@1.7.1...istanbul-lib-instrument@1.7.2) (2017-05-27)
+
+
+### Bug Fixes
+
+* hoist statement counter for class variables, so that name is preserved ([#60](https://github.com/istanbuljs/istanbuljs/issues/60)) ([120d221](https://github.com/istanbuljs/istanbuljs/commit/120d221))
+
+
+
+
<a name="1.7.1"></a>
## [1.7.1](https://github.com/istanbuljs/istanbul-lib-instrument/compare/istanbul-lib-instrument@1.7.0...istanbul-lib-instrument@1.7.1) (2017-04-29)
diff --git a/node_modules/istanbul-lib-instrument/dist/visitor.js b/node_modules/istanbul-lib-instrument/dist/visitor.js
index beae5d91b..3462f9314 100644
--- a/node_modules/istanbul-lib-instrument/dist/visitor.js
+++ b/node_modules/istanbul-lib-instrument/dist/visitor.js
@@ -101,6 +101,15 @@ var VisitState = function () {
extractURL(node.trailingComments);
}
+ // for these expressions the statement counter needs to be hoisted, so
+ // function name inference can be preserved
+
+ }, {
+ key: 'counterNeedsHoisting',
+ value: function counterNeedsHoisting(path) {
+ return path.isFunctionExpression() || path.isArrowFunctionExpression() || path.isClassExpression();
+ }
+
// all the generic stuff that needs to be done on enter for every node
}, {
@@ -174,7 +183,7 @@ var VisitState = function () {
} : function (x) {
return x;
};
- return T.unaryExpression('++', wrap(T.memberExpression(T.memberExpression(T.identifier(this.varName), T.identifier(type)), T.numericLiteral(id), true)));
+ return T.updateExpression('++', wrap(T.memberExpression(T.memberExpression(T.identifier(this.varName), T.identifier(type)), T.numericLiteral(id), true)));
}
}, {
key: 'insertCounter',
@@ -184,7 +193,7 @@ var VisitState = function () {
path.node.body.unshift(T.expressionStatement(increment));
} else if (path.isStatement()) {
path.insertBefore(T.expressionStatement(increment));
- } else if ((path.isFunctionExpression() || path.isArrowFunctionExpression()) && T.isVariableDeclarator(path.parentPath)) {
+ } else if (this.counterNeedsHoisting(path) && T.isVariableDeclarator(path.parentPath)) {
// make an attempt to hoist the statement counter, so that
// function names are maintained.
var parent = path.parentPath.parentPath;
diff --git a/node_modules/istanbul-lib-instrument/package.json b/node_modules/istanbul-lib-instrument/package.json
index 7a8083475..6a503e5bf 100644
--- a/node_modules/istanbul-lib-instrument/package.json
+++ b/node_modules/istanbul-lib-instrument/package.json
@@ -1,6 +1,6 @@
{
"name": "istanbul-lib-instrument",
- "version": "1.7.1",
+ "version": "1.7.4",
"description": "Core istanbul API for JS code coverage",
"author": "Krishnan Anantheswaran <kananthmail-github@yahoo.com>",
"main": "dist/index.js",
@@ -18,8 +18,8 @@
"babel-template": "^6.16.0",
"babel-traverse": "^6.18.0",
"babel-types": "^6.18.0",
- "babylon": "^6.13.0",
- "istanbul-lib-coverage": "^1.1.0",
+ "babylon": "^6.17.4",
+ "istanbul-lib-coverage": "^1.1.1",
"semver": "^5.3.0"
},
"devDependencies": {
@@ -39,12 +39,12 @@
},
"license": "BSD-3-Clause",
"bugs": {
- "url": "https://github.com/istanbuljs/istanbul-lib-instrument/issues"
+ "url": "https://github.com/istanbuljs/istanbuljs/issues"
},
- "homepage": "https://github.com/istanbuljs/istanbul-lib-instrument",
+ "homepage": "https://github.com/istanbuljs/istanbuljs",
"repository": {
"type": "git",
- "url": "git@github.com:istanbuljs/istanbul-lib-instrument.git"
+ "url": "git@github.com:istanbuljs/istanbuljs.git"
},
"keywords": [
"coverage",