escover 1.15.0 → 1.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ChangeLog +6 -0
- package/lib/formatters/lines.js +2 -1
- package/lib/instrument/plugin-mark/index.js +4 -16
- package/package.json +1 -1
package/ChangeLog
CHANGED
package/lib/formatters/lines.js
CHANGED
|
@@ -68,19 +68,6 @@ export const fix = (path, {options}) => {
|
|
|
68
68
|
lineNode.expression,
|
|
69
69
|
path.node,
|
|
70
70
|
]));
|
|
71
|
-
/*
|
|
72
|
-
if (path.isLogicalExpression()) {
|
|
73
|
-
replaceWith(path.get('left'), SequenceExpression([
|
|
74
|
-
lineNode.expression,
|
|
75
|
-
path.node.left,
|
|
76
|
-
]));
|
|
77
|
-
replaceWith(path.get('right'), SequenceExpression([
|
|
78
|
-
getLineNode(c4, path.node.right.loc.start).expression,
|
|
79
|
-
path.node.right,
|
|
80
|
-
]));
|
|
81
|
-
return;
|
|
82
|
-
}
|
|
83
|
-
*/
|
|
84
71
|
|
|
85
72
|
if (path.isAssignmentPattern() || path.isAssignmentExpression()) {
|
|
86
73
|
replaceWith(path.get('right'), SequenceExpression([
|
|
@@ -179,8 +166,9 @@ export const traverse = ({push}) => ({
|
|
|
179
166
|
push(path);
|
|
180
167
|
},
|
|
181
168
|
SequenceExpression(path) {
|
|
182
|
-
if (compare(path, `(${LINE}, __z)`))
|
|
169
|
+
if (compare(path, `(${LINE}, __z)`)) {
|
|
183
170
|
return;
|
|
171
|
+
}
|
|
184
172
|
|
|
185
173
|
const expressions = path.get('expressions');
|
|
186
174
|
|
|
@@ -191,7 +179,7 @@ export const traverse = ({push}) => ({
|
|
|
191
179
|
push(expPath);
|
|
192
180
|
}
|
|
193
181
|
},
|
|
194
|
-
IfStatement(path) {
|
|
182
|
+
'IfStatement|ConditionalExpression'(path) {
|
|
195
183
|
const consequentPath = path.get('consequent');
|
|
196
184
|
const alternatePath = path.get('alternate');
|
|
197
185
|
|
|
@@ -201,7 +189,7 @@ export const traverse = ({push}) => ({
|
|
|
201
189
|
if (!alternatePath.node)
|
|
202
190
|
return;
|
|
203
191
|
|
|
204
|
-
if (!alternatePath.isBlockStatement())
|
|
192
|
+
if (!alternatePath.isBlockStatement() && !isExclude(alternatePath))
|
|
205
193
|
push(alternatePath);
|
|
206
194
|
},
|
|
207
195
|
});
|