## Changelog - 2.12.11 - fixed child process crash when the tested code spawns a subprocess with a different cwd (NODE_OPTIONS register path is now absolute) - 2.12.10 - updated dependencies - 2.12.9 - fixed (#119) - 2.12.8 - fixed (#119) - 2.12.7 - fixed normalizeSourcePath - 2.12.6 - fixed typo in `index.d.ts` - fixed #113 - 2.12.5 - fixed #112 - added `sourceMapResolver` option - 2.12.4 - fixed #109 - 2.12.3 - fixed (#108) - 2.12.2 - fixed #104 - fixed #106 - 2.12.1 - fixed a css coverage issue for tailwindcss v4: Cannot read properties of undefined (reading 'forEach') - 2.12.0 - fixed source path normalization policy (localhost-8130 => localhost:8130) - 2.11.6 - added close() to CoverageClient type definition (#102) - 2.11.5 - fixed sourcemap file JSON error (#97) - 2.11.4 - fixed encoded source url issue - fixed filter for encoded url - 2.11.3 - fixed cli to support `merge` command - 2.11.2 - fixed log style - 2.11.1 - added option `gc` for running gc manually - 2.11.0 - added `zip` and `merge` option for `raw` report - 2.10.9 - fixed empty coverage issue - 2.10.8 - fixed source path for untested files - 2.10.7 - fixed source filter for untested files - 2.10.6 - fixed untested file coverage - 2.10.5 - added `all.transformer` option to transform untested files - fixed merging issue for statements coverage - fixed merging issue for uncovered bytes if range not in sourcemap - 2.10.4 - fixed sourcemap issue for jsx file (#72) - 2.10.3 - fixed branch coverage issue for `switch/case` (#68) - 2.10.2 - fixed branch coverage issue for `static async` function (#67) - 2.10.1 - fixed hits UI issue (skip indent) - fixed ranges for original bytes - 2.10.0 - (breaking snapshot) the report's files will be sorted by default - (breaking assets) the report assets have been changed from multiple files to a single compressed file - added `maxCols` for `markdown-details` - added `filter` for `markdown-details` and `console-details` - added name for function coverage - 2.9.3 - fixed `minimatch` version to support Nodejs 18 - 2.9.2 - supported indexed sourcemaps (#57) - 2.9.1 - improved performance - refactor for vendor - 2.9.0 - performance improvement for comment parser (monocart-locator) - added new build-in report: `markdown-summary` (coverage-summary.md) - added new build-in report: `markdown-details` (coverage-details.md) - added new option: `dataDir` alternative to method `addFromDir()` - added new data `extras` for blank/comment/ignored lines - 2.8.7 - fixed OOM with better GC - added new build-in report: `codacy` (codacy.json) - 2.8.6 - improved performance - fixed warning message for adding empty istanbul coverage - fixed time duration formatter - 2.8.5 - fixed a sourcemap content issue - 2.8.4 - updated UI: highlight keywords for searching results - fixed coverage for static initialization blocks (#37) - fixed coverage for function defined after return (#38) - fixed ignored ranges - fixed `CoverageReportOptions#reports` type - fixed v8 report UI for hits - 2.8.3 - fixed error occurred in electron (#27) - 2.8.2 - fixed source path issue on Windows (#12) - 2.8.1 - added `baseDir` option for normalizing the relative source path - 2.8.0 - added `filter` option as combined filter for `entryFilter` and `sourceFilter` - added `--all` option for CLI - removed default config file `.mcrrc.js` and `.mcrrc` - added `find-up` for default config file - fixed type style for UI - fixed string to multiple patterns "{...}" for minimatch filter - added README.zh-Hans.md - 2.7.10 - fixed undefined error when reading mappings - 2.7.9 - fixed UI assets path - 2.7.8 - fixed node import issue - fixed sourceRoot issue - fixed debug message - fixed Maximum call stack issue for cleanCache - updated formatter and locator - 2.7.7 - fixed coverage undefined for `CDPClient` - added API `getIstanbulCoverage` for `CDPClient` - 2.7.6 - fixed CLI arguments for `--` separator - fixed sourcemap if range in a comment - added cache for sourcemap conversion - fixed ECONNREFUSED on NodeJS 18 - added new API `WSSession` for custom CDPSession - 2.7.5 - fixed special generated codes for original coverage - fixed generated bytes twice - fixed performance issue for diff matching - fixed loading sourcemap file if Content-Type is not json - 2.7.4 - fixed sourcemap matching (diff algorithm) - 2.7.3 - fixed a parser error for inline sourcemap - fixed error for loading config default - fixed sourcemap for more accurate matching - 2.7.2 - fixed the switch between original and generated - fixed source url - added register to export source for v8 coverage - added support to read source from v8 coverage dir - added new API `addFromDir` - 2.7.1 - fixed invalid `sourcesContent` - added new argument `info` for `sourcePath` - 2.7.0 - added new API `CDPClient` for collecting v8 coverage more easily - added debug message for invalid coverage - fixed snapshot without debug file - fixed range mapping for debug - 2.6.5 - fixed sourcemap issue for multiple lines of original text - fixed UI issues, next selection - 2.6.4 - fixed summary name color for `console-details` - fixed uncaughtException for CLI - added `loadConfig` API - 2.6.3 - fixed the path of sourcemap sources - fixed the deletion for node v8 coverage dir - fixed tbe end offset do not > source.length - added `onReady` hook for CLI - added `onEntry` hook - added default config file `mcr.config.ts` and better supports for `ts-node` - 2.6.2 - fixed cli sub arguments - fixed report data for single `codecov` report - 2.6.1 - fixed ts source issue - added `getEntryFilter` API - 2.6.0 - fixed coverage for invalid original code - fixed coverage for empty bytes - added `getSnapshot` and `diffSnapshot` API for snapshot testing - added istanbul support for `codecov` and `console-details` - 2.5.9 - fixed issue for istanbul source and source path replacement - fixed issue for original file when fully uncovered - added new option `cleanCache` - 2.5.8 - added new option `all` for adding empty coverage for all files - added multiple patterns support for entryFilter and sourceFilter - fixed ast parser for empty coverage file - fixed percentage for empty css - fixed UI selection range error - 2.5.7 - added object key/value replacement support for `sourcePath` - 2.5.6 - added `minimatch` support for entryFilter and sourceFilter - added supports for loading default configuration file - 2.5.5 - added switch button for count - fixed UI performance issue - fixed sourcemap content issue - 2.5.4 - fixed empty coverage - 2.5.3 - fixed color issue for `console-details` - fixed file url - 2.5.2 - removed URL.canParse to support node 14 - 2.5.1 - added new option `clean` - 2.5.0 - (New Feature) added new report `console-details` - 2.4.4 - fixed branch count - fixed function range for class method - 2.4.3 - fixed original offset if reversed - 2.4.2 - fixed default reports with lcov - 2.4.1 - fixed issue if uncovered in indent or ends with ";" - supports decorations for uncovered none else branches - 2.4.0 - (New Feature) added statements to report - optimized source mapping related codes - 2.3.4 - fixed ignore lines - fixed AssignmentPattern branches - added skip lines - 2.3.3 - supports c8 ignore - fixed ignore range - 2.3.2 - fixed issue for rmSync - fixed issue for AssignmentPattern - fixed url issue if entry url is a path - added inputDir option for CLI - 2.3.1 - fixed issue for a source file fully uncovered - 2.3.0 - added new feature: custom reporter - added new reporter: raw - added new option: inputDir - added support for vm scriptOffset - fixed branches if exists in wrapper function - fixed performance for decoding source mappings - fixed branch locations range error - 2.2.2 - added codecov report - 2.2.1 - fixed anonymous url for linux - 2.2.0 - (New Feature) supports `mcr` CLI - 2.1.0 (Breaking Change) - defaults to export `createCoverageReport` function instead of `CoverageReport` class ```diff - import CoverageReport, { createCoverageReport } from 'monocart-coverage-reports'; + import createCoverageReport, { CoverageReport } from 'monocart-coverage-reports'; ``` - fixed format for `files` of coverage results - fixed types for commonjs - 2.0.10 - updated dependencies - 2.0.9 - fixed ignore for istanbul (#3) - fixed duplicate source file - fixed UI issues - 2.0.8 - added new feature `v8 ignore next N/start/stop` - 2.0.7 - added `metrics` option for `v8` and `console-summary` report - 2.0.6 - added `console-summary` report - 2.0.5 - fixed AST parsing issue - fixed worker issue - updated formatter for worker issue - 2.0.4 - fixed source mapping issue - 2.0.3 - fixed branches count if no function ranges - 2.0.2 - fixed TypeError: Cannot read properties of undefined (reading 'startOffset') - updated css parser - 2.0.0 - added functions coverage for v8 (typescript) - added lines coverage for v8 (blanks, comments) - added node.js coverage test - 1.1.0 - added onEnd hook - 1.0.9 - added v8-json report - 1.0.8 - fixed module path for pnpm - 1.0.7 - fixed report path - added types for v8 options - 1.0.6 - fixed reading json file - 1.0.4 - added reportPath option