diff options
author | Florian Dold <florian.dold@gmail.com> | 2018-09-20 02:56:13 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2018-09-20 02:56:13 +0200 |
commit | bbff7403fbf46f9ad92240ac213df8d30ef31b64 (patch) | |
tree | c58400ec5124da1c7d56b01aea83309f80a56c3b /node_modules/istanbul-lib-instrument | |
parent | 003fb34971cf63466184351b4db5f7c67df4f444 (diff) | |
download | wallet-core-bbff7403fbf46f9ad92240ac213df8d30ef31b64.tar.xz |
update packages
Diffstat (limited to 'node_modules/istanbul-lib-instrument')
5 files changed, 50 insertions, 8 deletions
diff --git a/node_modules/istanbul-lib-instrument/CHANGELOG.md b/node_modules/istanbul-lib-instrument/CHANGELOG.md index f795dea3e..3e652d7f3 100644 --- a/node_modules/istanbul-lib-instrument/CHANGELOG.md +++ b/node_modules/istanbul-lib-instrument/CHANGELOG.md @@ -3,6 +3,45 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +<a name="1.10.2"></a> +## [1.10.2](https://github.com/istanbuljs/istanbuljs/compare/istanbul-lib-instrument@1.9.2...istanbul-lib-instrument@1.10.2) (2018-09-05) + + +### Bug Fixes + +* Tweak package.json files for republish as latest 1.x. ([#217](https://github.com/istanbuljs/istanbuljs/issues/217)) ([420481d](https://github.com/istanbuljs/istanbuljs/commit/420481d)), closes [#216](https://github.com/istanbuljs/istanbuljs/issues/216) + + +### BREAKING CHANGES + +* leaked into 1.x modules but it was thought they were +never released to latest. Apparently releasing 2.x to latest makes +those unwanted versions of 1.x available. + +This patch sets all modules to the latest 1.x version (4.x for +test-exclude). This will allow a new release to be made to revert +release of the breaking changes. + +Stop upgrading npm to latest for testing as it's not compatible with +node 4.x. + + + + +<a name="1.9.2"></a> +## [1.9.2](https://github.com/istanbuljs/istanbuljs/compare/istanbul-lib-instrument@1.9.1...istanbul-lib-instrument@1.9.2) (2018-02-13) + + +### Bug Fixes + +* compatibility with babel 7 ([#135](https://github.com/istanbuljs/istanbuljs/issues/135)) ([6cac849](https://github.com/istanbuljs/istanbuljs/commit/6cac849)) +* handle instrumentation when a function is called Function ([#131](https://github.com/istanbuljs/istanbuljs/issues/131)) ([b12a07e](https://github.com/istanbuljs/istanbuljs/commit/b12a07e)) +* proper passing of the preserveComments option to babel ([#122](https://github.com/istanbuljs/istanbuljs/issues/122)) ([470bb0e](https://github.com/istanbuljs/istanbuljs/commit/470bb0e)) +* update instrument, account for lack of arrow expression ([#119](https://github.com/istanbuljs/istanbuljs/issues/119)) ([#125](https://github.com/istanbuljs/istanbuljs/issues/125)) ([0968206](https://github.com/istanbuljs/istanbuljs/commit/0968206)) + + + + <a name="1.9.1"></a> ## [1.9.1](https://github.com/istanbuljs/istanbuljs/compare/istanbul-lib-instrument@1.9.0...istanbul-lib-instrument@1.9.1) (2017-10-22) diff --git a/node_modules/istanbul-lib-instrument/dist/instrumenter.js b/node_modules/istanbul-lib-instrument/dist/instrumenter.js index 313647ccf..cbd74af65 100644 --- a/node_modules/istanbul-lib-instrument/dist/instrumenter.js +++ b/node_modules/istanbul-lib-instrument/dist/instrumenter.js @@ -140,6 +140,7 @@ var Instrumenter = function () { var generateOptions = { compact: opts.compact, + comments: opts.preserveComments, sourceMaps: opts.produceSourceMap, sourceFileName: filename }; diff --git a/node_modules/istanbul-lib-instrument/dist/read-coverage.js b/node_modules/istanbul-lib-instrument/dist/read-coverage.js index 73e74291a..e2460c43c 100644 --- a/node_modules/istanbul-lib-instrument/dist/read-coverage.js +++ b/node_modules/istanbul-lib-instrument/dist/read-coverage.js @@ -45,7 +45,7 @@ function readInitialCoverage(code) { if (!magicValue.confident || magicValue.value !== _constants.MAGIC_VALUE) { return; } - covScope = path.scope.getFunctionParent(); + covScope = path.scope.getFunctionParent() || path.scope.getProgramParent(); path.stop(); } } diff --git a/node_modules/istanbul-lib-instrument/dist/visitor.js b/node_modules/istanbul-lib-instrument/dist/visitor.js index 79744abf2..bd8f9e3ff 100644 --- a/node_modules/istanbul-lib-instrument/dist/visitor.js +++ b/node_modules/istanbul-lib-instrument/dist/visitor.js @@ -394,9 +394,11 @@ function parenthesizedExpressionProp(prop) { function convertArrowExpression(path) { var n = path.node; var T = this.types; - if (n.expression) { + if (!T.isBlockStatement(n.body)) { var bloc = n.body.loc; - n.expression = false; + if (n.expression === true) { + n.expression = false; + } n.body = T.blockStatement([T.returnStatement(n.body)]); // restore body location n.body.loc = bloc; @@ -508,7 +510,7 @@ var codeVisitor = { LogicalExpression: entries(coverLogicalExpression) }; // the template to insert at the top of the program. -var coverageTemplate = (0, _babelTemplate2.default)('\n var COVERAGE_VAR = (function () {\n var path = PATH,\n hash = HASH,\n global = (new Function(\'return this\'))(),\n gcv = GLOBAL_COVERAGE_VAR,\n coverageData = INITIAL,\n coverage = global[gcv] || (global[gcv] = {});\n if (coverage[path] && coverage[path].hash === hash) {\n return coverage[path];\n }\n coverageData.hash = hash;\n return coverage[path] = coverageData;\n })();\n'); +var coverageTemplate = (0, _babelTemplate2.default)('\n var COVERAGE_VAR = (function () {\n var path = PATH,\n hash = HASH,\n Function = (function(){}).constructor,\n global = (new Function(\'return this\'))(),\n gcv = GLOBAL_COVERAGE_VAR,\n coverageData = INITIAL,\n coverage = global[gcv] || (global[gcv] = {});\n if (coverage[path] && coverage[path].hash === hash) {\n return coverage[path];\n }\n coverageData.hash = hash;\n return coverage[path] = coverageData;\n })();\n'); // the rewire plugin (and potentially other babel middleware) // may cause files to be instrumented twice, see: // https://github.com/istanbuljs/babel-plugin-istanbul/issues/94 @@ -582,7 +584,7 @@ function programVisitor(types) { INITIAL: coverageNode, HASH: T.stringLiteral(hash) }); - cv._blockHoist = 3; + cv._blockHoist = 5; path.node.body.unshift(cv); return { fileCoverage: coverageData, diff --git a/node_modules/istanbul-lib-instrument/package.json b/node_modules/istanbul-lib-instrument/package.json index ce3db5303..f52beeaf6 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.9.1", + "version": "1.10.2", "description": "Core istanbul API for JS code coverage", "author": "Krishnan Anantheswaran <kananthmail-github@yahoo.com>", "main": "dist/index.js", @@ -19,13 +19,13 @@ "babel-traverse": "^6.18.0", "babel-types": "^6.18.0", "babylon": "^6.18.0", - "istanbul-lib-coverage": "^1.1.1", + "istanbul-lib-coverage": "^1.2.1", "semver": "^5.3.0" }, "devDependencies": { "babel-cli": "^6.3.17", "babel-plugin-istanbul": "^2.0.3", - "babel-preset-es2015": "^6.3.13", + "babel-preset-env": "^1.6.1", "babel-register": "^6.16.3", "chai": "^3.0.0", "clone": "^2.0.0", |