npm / monocart-coverage-reports
monocart-coverage-reports
What changed in monocart-coverage-reports 2 to 3, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-27.
17 breaking1 deprecations10 new APIs and options1 performance4 behavior and defaults3 tooling14 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initmonocart-coverage-reports 345 changes
Breaking changes 17
Pending WebSocket commands reject on disconnect or detach, and CDP protocol errors propagate to callers.
CLI commands now use execa without shell mode, preserving argument boundaries; shell strings, pipes, and redirections are no longer interpreted.
Task failures propagate, and in-flight work is drained before queue cleanup.
V8 and both custom reporter loading or initialization failures now propagate instead of being silently skipped.
ESM config files must use export default; existing CommonJS configs remain supported when renamed to .cjs.
Requests now have a default 30000ms total deadline covering response headers and body transfer; 0 disables it.
External reporters and CLI preloads must load through native ESM import(); Node handles CJS interoperability without a separate loader.
Use --import for CLI preloads; local file extensions are required.
Throws when an explicit config is missing or when loading fails.
Retries through IPv4 occur only on connection refusal, not on HTTP errors, JSON parsing failures, timeouts, or cancellation.
Pass CLI commands as an executable and separate arguments; MCR no longer interprets shell strings, expansions, globs, pipes, redirections, or &&.
Failed child commands retain their failure status even if a hook resets process.exitCode; report generation failures also exit nonzero.
The package is ESM only; use default or named imports, or dynamic import() from CommonJS, instead of the callable require() entry.
The /converter entry point now exposes named exports only.
The /util entry point now exposes named exports only.
Node.js >= 22.15.0 is now required.
Relative reporter paths require ./ or ../ prefixes and explicit file extensions; unprefixed paths are treated as package specifiers.
Deprecations 1
Deprecated as an alias for --import.
New APIs and options 10
Adds onTestEnd(testResults) for mcr test, providing structured test results and TypeScript types.
Adds configurable CDP command timeouts, defaulting to 30000ms; 0 disables the deadline.
timeout controls HTTP debugger discovery and WebSocket connection establishment, with a default of 10000ms.
Existing CommonJS config files must be renamed to .cjs and remain supported.
Exposed as a named export and as MCR.CoverageClient.
Adds a command using the native Node.js test runner with automatic coverage reports.
Supports test targets from config or CLI and Node runner arguments after --.
Adds filtering of final V8 results by sourcePath, including converted Istanbul reports.
A new optional filter is available and is disabled by default; entryFilter and sourceFilter remain available.
Custom WebSocket sessions support a timeout option, with 0 disabling the corresponding timeout.
Performance 1
Untested sources are read after filtering when source-path callbacks do not need the source.
Behavior and default changes 4
Recognizes .styl, .stylus, .postcss, .pcss and .sss in all, and recognizes style extensions case-insensitively.
Falls back to generated CSS when sourcemaps cannot be reliably mapped, including Sass mixins.
Coverage is generated after failed tests, while test and report failure exit codes are preserved.
Source capture uses synchronous module.registerHooks(), including for CommonJS modules loaded through require() and createRequire().
Tooling 3
Test results are exported in raw reports and debug caches, with hook-based redaction before publication.
Supports CSS sourcemaps for Less, Sass, Stylus, PostCSS and SugarSS, including coverage merging across bundles.
CLI preloads use native ESM loading; prefer --import for preloads.
Fixes and other changes 9
Fixes branch coverage counts to avoid false coverage for uninstantiated classes and preserve initializer execution counts.
A copy of a file that never ran no longer hides uncovered lines left by other copies.
Prevents empty entries from altering real coverage.
Tolerates foreign or malformed file URLs and partially missing sourcemap sources without aborting reports.
Fixes coverage and report generation for untested files.
Stalled handshakes are terminated, and the connection timeout applies to HTTP debugger discovery.
Config errors retain their details and original causes, including when the thrown value is not an Error.
Requests settle on timeout, cancellation, or premature response closure and release their connections.
Pending commands are rejected on disconnect or detach, request timers are cleaned up, and CDP protocol errors propagate.
monocart-coverage-reports 25 changes
Fixes and other changes 5
Fixed source-map detection after regular expressions containing quotes.
Fixed fallback for invalid annotations without changing V8 offsets.
Generates zero-coverage reports when no coverage data is supplied.
Annotations inside JavaScript strings or templates are no longer mistaken for real comments; original source and V8 offsets are preserved while resolving source maps.
Node.js 22 is recommended for using monocart-coverage-reports.