Skip to content

v0.2.0

Choose a tag to compare

@tech-sumit tech-sumit released this 15 Feb 14:29
· 5 commits to master since this release

What's new

Test suite (76 tests, 7 suites)

Comprehensive test coverage using vitest + @testing-library/react:

  • useWebMCPTool — 17 tests (lifecycle, fingerprint stability, execute ref, error handling)
  • useWebMCPContext — 14 tests (provideContext/clearContext, multi-tool, ref-based execute)
  • useToolEvent — 7 tests (event types, filtering, cleanup)
  • WebMCPForm — 10 tests (attributes, events, submit handler, cleanup)
  • WebMCPInput/Select/Textarea — 15 tests (attribute mapping, prop passthrough)
  • WebMCPProvider — 5 tests (availability detection, defaults)
  • ModelContext utilities — 8 tests (API detection, warning helper)

Production-safe logging

  • console.warn and console.error gated behind process.env.NODE_ENV !== 'production'
  • Warnings are stripped from production bundles by all major bundlers

Code quality

  • Cleaner conditional field inclusion using explicit if checks
  • Tests run in CI and publish workflows