v3 new release (#84)

swap to graphql
This commit is contained in:
github-actions[bot]
2022-07-11 13:48:02 -04:00
committed by GitHub
parent 20d2b4f98d
commit e4f3964f67
1492 changed files with 63799 additions and 63001 deletions

View File

@ -3,6 +3,13 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [5.2.0](https://github.com/istanbuljs/istanbuljs/compare/istanbul-lib-instrument-v5.1.0...istanbul-lib-instrument-v5.2.0) (2022-02-21)
### Features
* exclude Empty Object and Arrays in Truthy Detection ([#666](https://github.com/istanbuljs/istanbuljs/issues/666)) ([e279684](https://github.com/istanbuljs/istanbuljs/commit/e279684e735f4b7dbe2b632cde2515f6862099de))
## [5.1.0](https://www.github.com/istanbuljs/istanbuljs/compare/istanbul-lib-instrument-v5.0.4...istanbul-lib-instrument-v5.1.0) (2021-10-27)

View File

@ -1,6 +1,6 @@
{
"name": "istanbul-lib-instrument",
"version": "5.1.0",
"version": "5.2.0",
"description": "Core istanbul API for JS code coverage",
"author": "Krishnan Anantheswaran <kananthmail-github@yahoo.com>",
"main": "src/index.js",

View File

@ -200,10 +200,7 @@ class VisitState {
),
T.parenthesizedExpression(
T.conditionalExpression(
T.memberExpression(
T.callExpression(T.identifier(this.varName), []),
T.identifier(tempName)
),
this.validateTrueNonTrivial(T, tempName),
this.increase(type, id, index),
T.nullLiteral()
)
@ -215,6 +212,97 @@ class VisitState {
]);
}
validateTrueNonTrivial(T, tempName) {
return T.logicalExpression(
'&&',
T.memberExpression(
T.callExpression(T.identifier(this.varName), []),
T.identifier(tempName)
),
T.logicalExpression(
'&&',
T.parenthesizedExpression(
T.logicalExpression(
'||',
T.unaryExpression(
'!',
T.callExpression(
T.memberExpression(
T.identifier('Array'),
T.identifier('isArray')
),
[
T.memberExpression(
T.callExpression(
T.identifier(this.varName),
[]
),
T.identifier(tempName)
)
]
)
),
T.memberExpression(
T.memberExpression(
T.callExpression(
T.identifier(this.varName),
[]
),
T.identifier(tempName)
),
T.identifier('length')
)
)
),
T.parenthesizedExpression(
T.logicalExpression(
'||',
T.binaryExpression(
'!==',
T.callExpression(
T.memberExpression(
T.identifier('Object'),
T.identifier('getPrototypeOf')
),
[
T.memberExpression(
T.callExpression(
T.identifier(this.varName),
[]
),
T.identifier(tempName)
)
]
),
T.memberExpression(
T.identifier('Object'),
T.identifier('prototype')
)
),
T.memberExpression(
T.callExpression(
T.memberExpression(
T.identifier('Object'),
T.identifier('values')
),
[
T.memberExpression(
T.callExpression(
T.identifier(this.varName),
[]
),
T.identifier(tempName)
)
]
),
T.identifier('length')
)
)
)
)
);
}
insertCounter(path, increment) {
const T = this.types;
if (path.isBlockStatement()) {