escover 2.4.0 → 2.5.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.5.0
2
+
3
+ feature:
4
+ - escover: add ability to handle multiple load
5
+
1
6
  2022.07.30, v2.4.0
2
7
 
3
8
  feature:
package/lib/escover.js CHANGED
@@ -1,4 +1,3 @@
1
- import montag from 'montag';
2
1
  import process from 'process';
3
2
 
4
3
  import {instrument} from './instrument/index.js';
@@ -45,7 +44,13 @@ export async function load(url, context, defaultLoad) {
45
44
  source: rawSource,
46
45
  };
47
46
 
48
- const source = montag`
47
+ if (rawSource.includes('const __c4'))
48
+ return {
49
+ format,
50
+ source: rawSource,
51
+ };
52
+
53
+ const source = `
49
54
  const __c4 = global.__createC4('${url}');
50
55
  ${instrument(url, rawSource)}
51
56
  `;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "escover",
3
- "version": "2.4.0",
3
+ "version": "2.5.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",