Skip to content

v0.5.0 - Strict Watch Mode & Schema Refinements

Choose a tag to compare

@AmiteK23 AmiteK23 released this 28 Jan 17:55
· 134 commits to main since this release
62363ba

This release introduces strict watch mode for real-time breaking-change detection during development, along with clarifying (breaking) schema renames and several correctness and performance fixes.


Added

Strict Watch Mode (--strict-watch)

Track breaking changes and violations during watch mode:

  • Violation detection — Automatically detects breaking changes when files are modified:
    • Removed props, emits, state, functions, or variables (errors)
    • Changed prop types (warnings)
    • Removed contracts (errors)
    • Missing dependencies (warnings)
  • Real-time reporting — Violations are displayed immediately after each regeneration
  • Cumulative tracking — Violations are tracked across the entire watch session
  • Session summary — Final violation counts printed on exit (Ctrl+C)
  • Structured report output — Writes JSON report to:
    • .logicstamp/strict_watch_violations.json
  • CI-friendly exit behavior — Exits with code 1 if errors occurred during the session
  • New violation types:
    • missing_dependency
    • breaking_change_prop_removed
    • breaking_change_prop_type
    • breaking_change_event_removed
    • breaking_change_state_removed
    • breaking_change_function_removed
    • breaking_change_variable_removed
    • contract_removed

Changed

⚠️ Breaking Schema Renames

MissingDependency.versionpackageVersion

  • Old: { name, reason, packageName, version }
  • New: { name, reason, packageName, packageVersion }
  • Rationale: Avoids confusion with component versioning and pairs naturally with packageName
  • Migration: Update any code reading meta.missing[].version

UIFContract.versioncomposition

  • Old: version: { variables, hooks, components, functions }
  • New: composition: { variables, hooks, components, functions }
  • Rationale: Describes structural composition, not a version number
  • Migration: Update any access to contract.version

UIFContract.logicSignatureinterface

  • Old: logicSignature: { props, emits, state, apiSignature }
  • New: interface: { props, emits, state, apiSignature }
  • Rationale: Clearly represents the external API/contract surface
  • Migration: Update any access to contract.logicSignature

Fixed

  • Documentation mismatch — Corrected eventsemits in schema and UIF contract docs
  • Watch mode race condition — Prevented overlapping regenerations using Promise-based locking
  • Silent error swallowing — Compare handler now logs cleanup errors instead of ignoring them

Improved

  • O(1) dependency collection — Replaced linear scans with Map-based lookups
  • O(1) missing dependency tracking — Replaced array duplication checks with Set-based tracking

⚠️ Breaking Changes Summary

  • MissingDependency.versionpackageVersion
  • UIFContract.versioncomposition
  • UIFContract.logicSignatureinterface

Migration required: Any tooling that parses generated context bundles must update field access accordingly.
Schema version has been bumped to reflect these changes.


Non-Breaking Additions

  • --strict-watch is opt-in — existing watch behavior is unchanged
  • Race condition fix improves correctness without API changes
  • Performance improvements do not alter output
  • New exports are additive:
    • Violation
    • ViolationType
    • StrictWatchStatus

🔗 Related PRs

  • #68 – Schema renames and dependency performance improvements
  • #69 – Compare handler cleanup and schema version updates
  • #70 – Strict watch mode with cumulative violation tracking
  • #71 – Documentation fixes and 0.5.0 release prep

Changelog

👉 Full changelog