escover 1.7.1 → 1.7.2

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,9 @@
1
+ 2022.01.18, v1.7.2
2
+
3
+ feature:
4
+ - escover: config: isExclude: add ability to drop stars
5
+
6
+
1
7
  2022.01.17, v1.7.1
2
8
 
3
9
  fix:
package/README.md CHANGED
@@ -53,11 +53,7 @@ escover npm test
53
53
 
54
54
  When everything is covered:
55
55
 
56
- ![image](https://user-images.githubusercontent.com/1573141/147943954-ef708577-2856-4de0-9397-dead487b8c08.png)
57
-
58
- When some lines missing coverage:
59
-
60
- ![image](https://user-images.githubusercontent.com/1573141/147944130-9b901646-05ff-4a76-86c9-30631b0a0dd4.png)
56
+ ![image](https://user-images.githubusercontent.com/1573141/149822261-ff9bc3b4-6ee4-452c-9ada-3cc922b630ec.png)
61
57
 
62
58
  ## What if I want to use 🎩`ESCover` with `mock-import`?
63
59
 
package/lib/config.js CHANGED
@@ -4,8 +4,20 @@ import {findUpSync} from 'find-up';
4
4
 
5
5
  const {parse} = JSON;
6
6
 
7
+ const addStars = (patterns) => {
8
+ const result = [];
9
+ for (const pattern of patterns) {
10
+ result.push(...[
11
+ `**/${pattern}/**`,
12
+ pattern,
13
+ ]);
14
+ }
15
+
16
+ return result;
17
+ };
18
+
7
19
  export const isExclude = (name, patterns) => {
8
- const isMatch = picomatch(patterns, {
20
+ const isMatch = picomatch(addStars(patterns), {
9
21
  dot: true,
10
22
  });
11
23
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "escover",
3
- "version": "1.7.1",
3
+ "version": "1.7.2",
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",