escover 2.3.1 → 2.4.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 CHANGED
@@ -1,3 +1,8 @@
1
+ 2022.07.30, v2.4.0
2
+
3
+ feature:
4
+ - (escover) mark: improve support of ArrowFunctionExpressions
5
+
1
6
  2022.07.20, v2.3.1
2
7
 
3
8
  feature:
@@ -8,6 +8,7 @@ import * as mark from './plugin-mark/index.js';
8
8
  export const instrument = (url, source) => {
9
9
  const c4 = global.__createC4(url);
10
10
  const options = {
11
+ fixCount: 1,
11
12
  rules: {
12
13
  mark: ['on', {
13
14
  c4,
@@ -144,7 +144,12 @@ export const traverse = ({push}) => ({
144
144
  push(path);
145
145
  },
146
146
  ArrowFunctionExpression(path) {
147
- if (path.get('body').isBlockStatement())
147
+ const bodyPath = path.get('body');
148
+
149
+ if (bodyPath.isBlockStatement())
150
+ return;
151
+
152
+ if (isExclude(bodyPath))
148
153
  return;
149
154
 
150
155
  push(path);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "escover",
3
- "version": "2.3.1",
3
+ "version": "2.4.0",
4
4
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
5
5
  "description": "Coverage for EcmaScript Modules",
6
6
  "main": "lib/escover.js",