istanbul-lib-instrument
Advanced tools
Comparing version 1.1.3 to 1.1.4
@@ -5,2 +5,12 @@ # Change Log | ||
<a name="1.1.4"></a> | ||
## [1.1.4](https://github.com/istanbuljs/istanbul-lib-instrument/compare/v1.1.3...v1.1.4) (2016-10-17) | ||
### Bug Fixes | ||
* hoist coverage variable to very top of file ([#26](https://github.com/istanbuljs/istanbul-lib-instrument/issues/26)) ([0225e8c](https://github.com/istanbuljs/istanbul-lib-instrument/commit/0225e8c)) | ||
<a name="1.1.3"></a> | ||
@@ -7,0 +17,0 @@ ## [1.1.3](https://github.com/istanbuljs/istanbul-lib-instrument/compare/v1.1.2...v1.1.3) (2016-09-13) |
@@ -70,3 +70,3 @@ 'use strict'; | ||
function Instrumenter() { | ||
var opts = arguments.length <= 0 || arguments[0] === undefined ? defaultOpts() : arguments[0]; | ||
var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultOpts(); | ||
@@ -73,0 +73,0 @@ _classCallCheck(this, Instrumenter); |
@@ -489,4 +489,4 @@ 'use strict'; | ||
function programVisitor(types) { | ||
var sourceFilePath = arguments.length <= 1 || arguments[1] === undefined ? 'unknown.js' : arguments[1]; | ||
var opts = arguments.length <= 2 || arguments[2] === undefined ? { coverageVariable: '__coverage__' } : arguments[2]; | ||
var sourceFilePath = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'unknown.js'; | ||
var opts = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : { coverageVariable: '__coverage__' }; | ||
@@ -511,2 +511,3 @@ var T = types; | ||
}); | ||
cv._blockHoist = 3; | ||
path.node.body.unshift(cv); | ||
@@ -513,0 +514,0 @@ return { |
{ | ||
"name": "istanbul-lib-instrument", | ||
"version": "1.1.3", | ||
"version": "1.1.4", | ||
"description": "Core istanbul API for JS code coverage", | ||
@@ -9,9 +9,7 @@ "author": "Krishnan Anantheswaran <kananthmail-github@yahoo.com>", | ||
"release": "babel src --out-dir dist && documentation build -f md -o api.md src/*js", | ||
"v10-test": "mocha --compilers js:babel-core/register --recursive test/", | ||
"fast": "mocha --harmony --compilers js:babel-core/register --recursive test/", | ||
"test": "NODE_ENV=test nyc --check-coverage --statements 90 --branches 80 mocha --recursive test/", | ||
"pretest": "jshint src/ test/", | ||
"test": "./test.sh", | ||
"posttest": "node ./node_modules/istanbul/lib/cli.js check-coverage --statements 90 --branches 80", | ||
"prepublish": "npm test && npm run release", | ||
"version": "standard-version" | ||
"version": "standard-version", | ||
"coverage": "nyc report --reporter=text-lcov | coveralls" | ||
}, | ||
@@ -28,15 +26,26 @@ "dependencies": { | ||
"babel-cli": "^6.3.17", | ||
"babel-core": "^6.3.21", | ||
"babel-plugin-istanbul": "^2.0.2", | ||
"babel-preset-es2015": "^6.3.13", | ||
"babel-register": "^6.16.3", | ||
"chai": "^3.0.0", | ||
"clone": "^1.0.2", | ||
"clone": "^2.0.0", | ||
"coveralls": "^2.11.4", | ||
"documentation": "^4.0.0-beta5", | ||
"istanbul": "^1.0.0-alpha.2", | ||
"documentation": "^4.0.0-beta9", | ||
"js-yaml": "^3.3.1", | ||
"jshint": "^2.8.0", | ||
"mocha": "^2.2.5", | ||
"mocha": "^3.1.2", | ||
"nopt": "^3.0.6", | ||
"standard-version": "^2.4.0" | ||
"nyc": "^8.3.1", | ||
"standard-version": "^3.0.0" | ||
}, | ||
"nyc": { | ||
"include": [ | ||
"src/**/*.js" | ||
], | ||
"require": [ | ||
"babel-register" | ||
], | ||
"sourceMap": false, | ||
"instrument": false | ||
}, | ||
"license": "BSD-3-Clause", | ||
@@ -43,0 +52,0 @@ "bugs": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
86516
10
770
14