Releases: felmonon/msw-inspector
Release list
v0.3.2
v0.3.2 fixes the documented CLI version command.
- Adds standard --version and -V support.
- Reports the installed package version and exits successfully.
- Adds regression coverage so users can reliably include their version in bug reports.
The JSON report schema and scanner behavior are unchanged.
v0.3.1
v0.3.1 is a correctness release for static MSW handler coverage.
Scanner reliability
- Resolves direct and const-backed new URL(...).href handler matchers, including absolute URLs without a base.
- Preserves JavaScript new RegExp(pattern, flags) semantics when matching static handler patterns.
- Resolves MSW import bindings and same-file matcher constants by lexical scope, so shadowed aliases and values are not mistaken for handlers.
CLI and docs
- --limit now consistently caps unsupported-pattern output as well as the other detailed text sections.
- Clarifies the published package name (msw-inspector-cli) and installed binary (msw-inspector).
- Corrects the maintainer release runbook so GitHub Releases trigger npm publication.
The JSON report schema is unchanged.
v0.3.0
Output identity release: the two places msw-inspector is actually seen — the terminal and the PR comment — now communicate a verdict at a glance.
Terminal
- Every run ends with a bold verdict line:
✗ 74% mock coverage — 8 unmocked calls(red),◌ … ambiguous calls to review(yellow),✓ 100% … all calls mocked(green). - Consistent glyph grammar throughout: green
✓fine, red✗gap, yellow◌needs review.
GitHub Action comment & job summary
- Verdict emoji headline (
## 🔴 MSW mock coverage: 25% (1/4)), unicode coverage bar, compact metric table. - Long lists collapse into
<details>sections withfile:lineper item. - Footer linking back to the project.
Also adds a social preview card under assets/. JSON output and the report schema are unchanged. Update the action to msw-inspector-action@v1.2.0 (or the moving v1) for the new comment design.
v0.2.0
Trust-hardening release. The numbers msw-inspector reports are now reliable enough to gate CI on.
Correctness
- Fixed stale-handler false positives: every handler matching a call is marked used, not just the first.
- Calls whose HTTP method cannot be resolved statically but whose path matches a handler are now reported as
ambiguousCallsinstead of unmocked; their handlers are not flagged stale. fetch(new Request(url, init))resolves with static arguments (init overrides the Request method per spec).
CLI
- Text output lists unmocked API calls and stale handlers with file:line;
--limitcontrols how many. --format,--min-coverage, and--limitare validated (usage errors exit 2); empty scans warn on stderr and--fail-on-emptyturns that into a gate. Exit codes documented in the README.- Report file paths are relative to
--cwdwith forward slashes on every platform — reports are portable and safe as CI baselines.
Contract & project health
- JSON report contract documented in
docs/report-schema.mdand frozen inschema/coverage-report.v1.json(ships with the package, validated in tests). felmonon/msw-inspector-actionis the canonical GitHub Action; this repo no longer shipsaction.ymlor committeddist/.- CI: Node 20/22/24 on Ubuntu and Windows. Declared the real Node requirement (
>=20). - Clean
npm audit: path-to-regexp ReDoS fix,@actions/*off undici 5, esbuild override.
Full details in CHANGELOG.md.
Thanks
This is the first release carrying community contributions, and since v0.1.5 was never published to npm, both land for npm users here:
- @Diyaaa-12 — unsupported patterns now print with file, line, kind, and reason in text output (#16)
- @lovewave02 — the Vite + Vitest (#6) and Next.js (#26) coverage examples under
docs/examples/
v0.1.5
Highlights
- New: text output now lists unsupported patterns with
file:line, kind, and reason (up to 5, plus an "and N more" count), so CLI output is actionable instead of a bare count. Thanks @Diyaaa-12 (#16). - Toolchain modernized to TypeScript 6, with a build fix for the
baseUrldeprecation.
Features
- feat(cli): show unsupported pattern locations in text output (#16)
Maintenance
- Upgrade to TypeScript 6, ts-morph 28, commander 15, @actions/core 3, @actions/github 9 (#12, #11)
- CI: bump actions/checkout to v7 and actions/setup-node to v6 (#10, #9)
- Bump vite, postcss, brace-expansion, @types/node, and vitest (#15, #13, #14, #11)
- fix(build): set
ignoreDeprecations: "6.0"for the TypeScript 6baseUrldeprecation
Docs
- Add Vite + Vitest + MSW example. Thanks @lovewave02 (#6)
- Add CONTRIBUTING, ROADMAP, SECURITY, SUPPORT, CODE_OF_CONDUCT, and README polish
Full Changelog: v0.1.4...v0.1.5
v0.1.4
Adds baseUrl-aware coverage analysis and updates the README to point to the dedicated GitHub Action repository.
- new
--base-urloption for origin-aware matching of relative handlers and API calls - added real dogfooding examples and a screenshot from local repo runs
- GitHub Action now lives in
felmonon/msw-inspector-action
v0.1.3
msw-inspector v0.1.3
Installable npm release for the MSW mock coverage analyzer.
Install
npm install -D msw-inspector-cli
The package is published as msw-inspector-cli because msw-inspector is already taken on npm. The installed CLI binary remains msw-inspector.
Run
npx msw-inspectorafter installnpx msw-inspector-clifor one-off usage
Highlights
- Scan MSW handlers from
http.*and legacyrest.*APIs. - Scan API usage from
fetch,window.fetch,globalThis.fetch, and commonaxioscall shapes. - Report mocked API calls, unmocked API calls, stale handlers, and unsupported dynamic patterns.
- Emit stable JSON output with
schemaVersion: 1. - Ship a GitHub Action that publishes job summaries and optional sticky PR comments from the JSON report.
Validation
npm run checknpm run build
Repository
v0.1.1
msw-inspector v0.1.1
First npm-ready release of @felmonon/msw-inspector, a CLI and GitHub Action for finding gaps in MSW mock coverage.
Install
npm install -D @felmonon/msw-inspector
Run
npx msw-inspector after install, or npx @felmonon/msw-inspector for one-off usage.
Highlights
- Scan MSW handlers from
http.*and legacyrest.*APIs. - Scan API usage from
fetch,window.fetch,globalThis.fetch, and commonaxioscall shapes. - Report mocked API calls, unmocked API calls, stale handlers, and unsupported dynamic patterns.
- Emit stable JSON output with
schemaVersion: 1. - Ship a GitHub Action that publishes job summaries and optional sticky PR comments from the JSON report.
Validation
npm run checknpm run build
Repository
v0.1.0
msw-inspector v0.1.0
Initial release of msw-inspector, a CLI and GitHub Action for finding gaps in MSW mock coverage.
Highlights
- Scan MSW handlers from
http.*and legacyrest.*APIs. - Scan real API calls from
fetch,window.fetch,globalThis.fetch, and commonaxioscall shapes. - Compare handlers against actual API usage and report:
- mocked API calls
- unmocked API calls
- stale handlers
- unsupported dynamic patterns
- Emit both text output and stable JSON output with
schemaVersion: 1. - Ship a thin GitHub Action that publishes job summaries and optional sticky PR comments from the CLI JSON report.
Install
npm install -D msw-inspector
Example
npx msw-inspector --report-file msw-inspector.json --format json
First-release scope
This release is intentionally narrow and static-analysis-first. It favors explicit unsupported diagnostics over guessing at dynamic patterns.
Included in v0.1.0:
- direct MSW
http.*andrest.*handler extraction - static string, template, regex, and URL-based matcher resolution
- same-file
axios.create(...)instance support - coverage matching by HTTP method and normalized path
Not included yet:
- custom API wrapper inference
- cross-file constant resolution
- GraphQL, WebSocket, or SSE analysis
- baseline coverage deltas in the GitHub Action
Validation
Verified locally with:
npm run checknpm run build