monocart-coverage-reports 2.9.3 → 2.10.1
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 +6 -1
- package/README.zh-Hans.md +4 -1
- package/lib/assets.js +98 -0
- package/lib/converter/converter.js +36 -12
- package/lib/converter/find-original-range.js +29 -13
- package/lib/converter/flatten-source-maps.js +186 -166
- package/lib/converter/ignore.js +86 -24
- package/lib/converter/info-function.js +7 -4
- package/lib/generate.js +91 -476
- package/lib/index.d.ts +22 -1
- package/lib/istanbul/istanbul.js +11 -8
- package/lib/packages/monocart-coverage-assets.js +4 -0
- package/lib/packages/monocart-coverage-vendor.js +16 -16
- package/lib/platform/share.js +22 -0
- package/lib/reports/codacy.js +43 -0
- package/lib/reports/codecov.js +28 -0
- package/lib/reports/console-details.js +174 -0
- package/lib/reports/console-summary.js +83 -0
- package/lib/reports/custom.js +34 -0
- package/lib/reports/markdown-details.js +120 -0
- package/lib/reports/markdown-summary.js +44 -0
- package/lib/reports/raw.js +33 -0
- package/lib/reports/v8-json.js +22 -0
- package/lib/reports/v8.js +51 -0
- package/lib/utils/markdown.js +132 -132
- package/lib/utils/util.js +95 -155
- package/lib/v8/v8.js +16 -74
- package/package.json +116 -112
- package/lib/packages/monocart-coverage-app.js +0 -1
package/lib/istanbul/istanbul.js
CHANGED
|
@@ -87,14 +87,16 @@ const saveIstanbulReports = (coverageData, fileSources, options) => {
|
|
|
87
87
|
// create a context for report generation
|
|
88
88
|
const context = istanbulLibReport.createContext(contextOptions);
|
|
89
89
|
|
|
90
|
-
const istanbulGroup = options.reportGroup.istanbul;
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
const reportOptions
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
90
|
+
const istanbulGroup = options.reportGroup.get('istanbul');
|
|
91
|
+
// already has
|
|
92
|
+
if (istanbulGroup) {
|
|
93
|
+
for (const [reportName, reportOptions] of istanbulGroup) {
|
|
94
|
+
const t1 = Date.now();
|
|
95
|
+
const report = istanbulReports.create(reportName, reportOptions);
|
|
96
|
+
report.execute(context);
|
|
97
|
+
Util.logTime(`┌ [generate] saved report: ${reportName}`, t1);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
98
100
|
|
|
99
101
|
// add watermarks and color
|
|
100
102
|
const coverageReport = new IstanbulSummary();
|
|
@@ -109,6 +111,7 @@ const saveIstanbulReports = (coverageData, fileSources, options) => {
|
|
|
109
111
|
const coverageResults = {
|
|
110
112
|
type: 'istanbul',
|
|
111
113
|
reportPath,
|
|
114
|
+
version: Util.version,
|
|
112
115
|
name: options.name,
|
|
113
116
|
watermarks: contextOptions.watermarks,
|
|
114
117
|
// summary and files
|