monocart-coverage-reports
Advanced tools
Comparing version 1.0.7 to 1.0.8
@@ -106,2 +106,30 @@ const fs = require('fs'); | ||
resolveNodeModule: (p) => { | ||
// same level dep | ||
const dep = path.resolve(__dirname, '../../../', p); | ||
if (fs.existsSync(dep)) { | ||
return dep; | ||
} | ||
// root | ||
const cwd = path.resolve('node_modules', p); | ||
if (fs.existsSync(cwd)) { | ||
return cwd; | ||
} | ||
// sub node modules | ||
const sub = path.resolve(__dirname, '../../node_modules', p); | ||
if (fs.existsSync(sub)) { | ||
return sub; | ||
} | ||
Util.logError(`Not found module: ${p}`); | ||
return cwd; | ||
}, | ||
resolvePackage: (p) => { | ||
return path.resolve(__dirname, '../packages', p); | ||
}, | ||
saveHtmlReport: async (options) => { | ||
@@ -108,0 +136,0 @@ |
@@ -183,7 +183,7 @@ const path = require('path'); | ||
const jsFiles = ['monocart-code-viewer', 'monocart-formatter', 'turbogrid'].map((it) => { | ||
return path.resolve(`node_modules/${it}/dist/${it}.js`); | ||
return Util.resolveNodeModule(`${it}/dist/${it}.js`); | ||
}); | ||
// package v8 ui | ||
jsFiles.push(path.resolve(__dirname, '../packages/monocart-coverage-v8.js')); | ||
jsFiles.push(Util.resolvePackage('monocart-coverage-v8.js')); | ||
@@ -190,0 +190,0 @@ // console.log(jsFiles); |
{ | ||
"name": "monocart-coverage-reports", | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"description": "Monocart coverage reports", | ||
@@ -55,8 +55,8 @@ "main": "lib/index.js", | ||
"eslint-plugin-vue": "^9.19.2", | ||
"github-markdown-css": "^5.4.0", | ||
"github-markdown-css": "^5.5.0", | ||
"koa": "^2.14.2", | ||
"koa-static-resolver": "^1.0.4", | ||
"marked": "^11.0.0", | ||
"marked": "^11.0.1", | ||
"playwright": "^1.40.1", | ||
"stylelint": "^15.11.0", | ||
"stylelint": "^16.0.2", | ||
"stylelint-config-plus": "^1.0.4", | ||
@@ -63,0 +63,0 @@ "webpack": "^5.89.0", |
@@ -104,3 +104,3 @@ # Monocart Coverage Reports | ||
| Output | [Istanbul HTML report](https://cenfun.github.io/monocart-coverage-reports/istanbul) | [V8 HTML report](https://cenfun.github.io/monocart-coverage-reports/v8) | [Istanbul HTML report](https://cenfun.github.io/monocart-coverage-reports/v8-and-istanbul/istanbul) | | ||
| Indicators | Covered Lines, Branches, Statements and Functions, Execution Counts | Covered Bytes, Lines❔, Execution Counts | Covered Lines, Branches❔, Statements and Functions, Execution Counts | | ||
| Indicators | Covered Lines, Branches, Statements and Functions, Execution Counts | Covered Bytes, Lines❔, Execution Counts | Covered Lines, Branches❔, Statements and Functions❔, Execution Counts | | ||
| CSS coverage | ❌ | ✅ | ✅ | | ||
@@ -119,3 +119,3 @@ | Minified code | N/A | ✅ | ❌ | | ||
- V8 Workflows | ||
- 1, For any runtime code: nothing to do. For source code: building code with `development` mode and sourcemap support, see [webpack.config-v8.js](https://github.com/cenfun/monocart-coverage-reports/blob/main/mock/webpack.config-v8.js). | ||
- 1, For any runtime code: nothing to do. For source code: building code with `development` [mode](https://webpack.js.org/configuration/mode/) and [sourcemap](https://webpack.js.org/configuration/devtool/) support, see [webpack.config-v8.js](https://github.com/cenfun/monocart-coverage-reports/blob/main/mock/webpack.config-v8.js). | ||
- 2, Collecting coverage data with [Chromium Coverage API](#chromium-coverage-api), see [example](https://github.com/cenfun/monocart-coverage-reports/blob/main/tests/test-v8.js). | ||
@@ -122,0 +122,0 @@ - 3, Generating coverage report. |
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
520687
3960