monocart-coverage-reports 2.7.2 → 2.7.4
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/README.md +12 -2
- package/lib/cli.js +1 -1
- package/lib/converter/collect-source-maps.js +12 -1
- package/lib/converter/converter.js +2 -1
- package/lib/converter/find-original-range.js +260 -173
- package/lib/index.js +9 -5
- package/lib/packages/monocart-coverage-vendor.js +39 -39
- package/lib/register/hooks.js +39 -21
- package/package.json +13 -7
package/lib/index.js
CHANGED
|
@@ -28,12 +28,15 @@ const resolveConfigOptions = async (configPath) => {
|
|
|
28
28
|
err = ee;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
if (err
|
|
31
|
+
if (err) {
|
|
32
32
|
Util.logError(`ERROR: failed to load config "${configPath}": ${err && err.message} `);
|
|
33
33
|
return;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
// could be multiple level default
|
|
37
|
+
while (configOptions && configOptions.default) {
|
|
38
|
+
configOptions = configOptions.default;
|
|
39
|
+
}
|
|
37
40
|
|
|
38
41
|
return configOptions;
|
|
39
42
|
};
|
|
@@ -237,9 +240,9 @@ class CoverageReport {
|
|
|
237
240
|
'mcr.config.cjs',
|
|
238
241
|
'mcr.config.mjs',
|
|
239
242
|
'mcr.config.json',
|
|
243
|
+
'mcr.config.ts',
|
|
240
244
|
'.mcrrc.js',
|
|
241
|
-
'.mcrrc'
|
|
242
|
-
'mcr.config.ts'
|
|
245
|
+
'.mcrrc'
|
|
243
246
|
];
|
|
244
247
|
|
|
245
248
|
const existsList = configList.filter((p) => p && fs.existsSync(p));
|
|
@@ -262,7 +265,8 @@ class CoverageReport {
|
|
|
262
265
|
return;
|
|
263
266
|
}
|
|
264
267
|
|
|
265
|
-
Util.logInfo(`Loaded
|
|
268
|
+
Util.logInfo(`Loaded: ${EC.cyan(configPath)}`);
|
|
269
|
+
|
|
266
270
|
// init options again
|
|
267
271
|
this.options = {
|
|
268
272
|
... defaultOptions,
|