istanbul-lib-instrument
Advanced tools
Comparing version 3.0.0 to 3.0.1
@@ -6,2 +6,10 @@ # Change Log | ||
<a name="3.0.1"></a> | ||
## [3.0.1](https://github.com/istanbuljs/istanbuljs/compare/istanbul-lib-instrument@3.0.0...istanbul-lib-instrument@3.0.1) (2018-12-25) | ||
**Note:** Version bump only for package istanbul-lib-instrument | ||
<a name="3.0.0"></a> | ||
@@ -8,0 +16,0 @@ # [3.0.0](https://github.com/istanbuljs/istanbuljs/compare/istanbul-lib-instrument@2.3.2...istanbul-lib-instrument@3.0.0) (2018-09-06) |
@@ -29,3 +29,3 @@ "use strict"; | ||
return { | ||
coverageVariable: "__coverage__", | ||
coverageVariable: '__coverage__', | ||
preserveComments: false, | ||
@@ -112,3 +112,3 @@ compact: true, | ||
allowReturnOutsideFunction: opts.autoWrap, | ||
sourceType: opts.esModules ? "module" : "script", | ||
sourceType: opts.esModules ? 'module' : 'script', | ||
plugins: opts.plugins | ||
@@ -115,0 +115,0 @@ }); |
@@ -30,3 +30,3 @@ "use strict"; | ||
allowSuperOutsideMethod: true, | ||
sourceType: "script", | ||
sourceType: 'script', | ||
// I think ? | ||
@@ -33,0 +33,0 @@ plugins: ['asyncGenerators', 'dynamicImport', 'objectRestSpread', 'optionalCatchBinding', 'flow', 'jsx'] |
@@ -89,3 +89,3 @@ "use strict"; | ||
if (!bMeta) { | ||
throw new Error("Invalid branch " + name); | ||
throw new Error('Invalid branch ' + name); | ||
} | ||
@@ -92,0 +92,0 @@ |
@@ -40,3 +40,3 @@ "use strict"; | ||
if (typeof inputSourceMap !== "undefined") { | ||
if (typeof inputSourceMap !== 'undefined') { | ||
this.cov.inputSourceMap(inputSourceMap); | ||
@@ -64,3 +64,3 @@ } | ||
/* istanbul ignore next: paranoid check */ | ||
"").trim(); | ||
'').trim(); | ||
const groups = v.match(COMMENT_RE); | ||
@@ -89,3 +89,3 @@ | ||
/* istanbul ignore next: paranoid check */ | ||
"").trim(); | ||
'').trim(); | ||
const groups = v.match(SOURCE_MAP_RE); | ||
@@ -175,4 +175,4 @@ | ||
const T = this.types; | ||
const wrap = index !== null // If `index` present, turn `x` into `x[index]`. | ||
? x => T.memberExpression(x, T.numericLiteral(index), true) : x => x; | ||
const wrap = index !== null ? // If `index` present, turn `x` into `x[index]`. | ||
x => T.memberExpression(x, T.numericLiteral(index), true) : x => x; | ||
return T.updateExpression('++', wrap(T.memberExpression(T.memberExpression(T.identifier(this.varName), T.identifier(type)), T.numericLiteral(id), true))); | ||
@@ -200,5 +200,5 @@ } | ||
} | ||
} else | ||
/* istanbul ignore else: not expected */ | ||
if (path.isExpression()) { | ||
} | ||
/* istanbul ignore else: not expected */ | ||
else if (path.isExpression()) { | ||
path.replaceWith(T.sequenceExpression([increment, path.node])); | ||
@@ -233,3 +233,3 @@ } else { | ||
switch (n.type) { | ||
case "FunctionDeclaration": | ||
case 'FunctionDeclaration': | ||
/* istanbul ignore else: paranoid check */ | ||
@@ -242,3 +242,3 @@ if (n.id) { | ||
case "FunctionExpression": | ||
case 'FunctionExpression': | ||
if (n.id) { | ||
@@ -289,3 +289,3 @@ dloc = n.id.loc; | ||
if (node.type === "LogicalExpression") { | ||
if (node.type === 'LogicalExpression') { | ||
const hint = this.hintFor(node); | ||
@@ -478,3 +478,3 @@ | ||
if (path.parentPath.node.type === "LogicalExpression") { | ||
if (path.parentPath.node.type === 'LogicalExpression') { | ||
return; // already processed | ||
@@ -485,3 +485,3 @@ } | ||
this.findLeaves(path.node, leaves); | ||
const b = this.cov.newBranch("binary-expr", path.node.loc); | ||
const b = this.cov.newBranch('binary-expr', path.node.loc); | ||
@@ -488,0 +488,0 @@ for (let i = 0; i < leaves.length; i += 1) { |
{ | ||
"name": "istanbul-lib-instrument", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"description": "Core istanbul API for JS code coverage", | ||
@@ -13,3 +13,2 @@ "author": "Krishnan Anantheswaran <kananthmail-github@yahoo.com>", | ||
"test": "mocha --require=@babel/register", | ||
"pretest": "jshint src/ test/", | ||
"prepublish": "npm run release" | ||
@@ -23,3 +22,3 @@ }, | ||
"@babel/types": "^7.0.0", | ||
"istanbul-lib-coverage": "^2.0.1", | ||
"istanbul-lib-coverage": "^2.0.2", | ||
"semver": "^5.5.0" | ||
@@ -37,3 +36,2 @@ }, | ||
"js-yaml": "^3.12.0", | ||
"jshint": "^2.9.5", | ||
"mocha": "^5.2.0", | ||
@@ -40,0 +38,0 @@ "nopt": "^4.0.1" |
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
51568
11
Updatedistanbul-lib-coverage@^2.0.2