monocart-coverage-reports
Advanced tools
Comparing version 2.5.2 to 2.5.3
@@ -26,8 +26,10 @@ const path = require('path'); | ||
// no url for anonymous | ||
if (!url) { | ||
// anonymous scripts will have __playwright_evaluation_script__ as their URL. | ||
url = pathToFileURL(['anonymous', index ? `-${index}` : '', type ? `.${type}` : ''].join('')).toString(); | ||
url = ['anonymous', index ? `-${index}` : '', type ? `.${type}` : ''].join(''); | ||
return filterPath(url); | ||
} | ||
// url could be a path | ||
// already is file url | ||
if (url.startsWith('file:')) { | ||
@@ -38,2 +40,3 @@ const relPath = Util.relativePath(fileURLToPath(url)); | ||
// http/https url, other url | ||
const urlObj = Util.resolveUrl(url); | ||
@@ -54,4 +57,6 @@ if (urlObj) { | ||
url = pathToFileURL(url).toString(); | ||
return filterPath(url); | ||
// could be path | ||
const fileUrl = pathToFileURL(url).toString(); | ||
const relPath = Util.relativePath(fileURLToPath(fileUrl)); | ||
return filterPath(relPath); | ||
@@ -58,0 +63,0 @@ }; |
@@ -12,4 +12,10 @@ const fs = require('fs'); | ||
const { acornWalk } = require('../packages/monocart-coverage-vendor.js'); | ||
const { acornWalk, supportsColor } = require('../packages/monocart-coverage-vendor.js'); | ||
// https://github.com/chalk/supports-color | ||
// disabled color if Terminal stdout does not support color | ||
if (!supportsColor.stdout) { | ||
EC.disabled = true; | ||
} | ||
const Util = { | ||
@@ -16,0 +22,0 @@ ... Share, |
{ | ||
"name": "monocart-coverage-reports", | ||
"version": "2.5.2", | ||
"version": "2.5.3", | ||
"description": "Monocart coverage reports", | ||
@@ -58,6 +58,6 @@ "main": "./lib/index.js", | ||
"console-grid": "~2.2.1", | ||
"eight-colors": "~1.2.1", | ||
"eight-colors": "~1.3.0", | ||
"istanbul-lib-coverage": "~3.2.2", | ||
"istanbul-lib-report": "~3.0.1", | ||
"istanbul-reports": "~3.1.6", | ||
"istanbul-reports": "~3.1.7", | ||
"lz-utils": "~2.0.2", | ||
@@ -75,4 +75,5 @@ "monocart-code-viewer": "~1.1.0", | ||
"stylelint": "^15.11.0", | ||
"stylelint-config-plus": "^1.0.4" | ||
"stylelint-config-plus": "^1.0.4", | ||
"supports-color": "^9.4.0" | ||
} | ||
} |
@@ -77,3 +77,3 @@ # Monocart Coverage Reports | ||
- coverage data for [Codecov](https://docs.codecov.com/docs/codecov-custom-coverage-format), see [example](https://app.codecov.io/github/cenfun/monocart-coverage-reports) | ||
- `console-details` Show file coverage and uncovered lines in the console. Like `text`, but for V8. | ||
- `console-details` Show file coverage and uncovered lines in the console. Like `text`, but for V8. For Github actions, we can enforce color with env: `FORCE_COLOR: true`. | ||
@@ -80,0 +80,0 @@ ![](test/console-details.png) |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
919060
7573
8
+ Addedeight-colors@1.3.1(transitive)
- Removedeight-colors@1.2.1(transitive)
Updatedeight-colors@~1.3.0
Updatedistanbul-reports@~3.1.7