Skip to content

feat: update check notifications — non-blocking version detection #287

@flyingrobots

Description

@flyingrobots

Summary

Add non-blocking update check that notifies users when a newer version is available on npm.

  • src/update-check.js — check npm registry, cache result, format notification
  • Fire-and-forget pattern: check runs during command execution, notification shows from previous cache
  • 24h cache TTL in ~/.gitmind/update-check.json
  • 3s fetch timeout via AbortController
  • All errors silently swallowed — must never break any command
  • Notification on stderr, suppressed in --json mode
  • No new runtime dependencies (uses Node built-in fetch)

Acceptance Criteria

  • Update check never blocks or slows commands
  • Notification appears on stderr only when a newer version exists
  • --json output is never polluted
  • Tests cover cache read/write, semver comparison, error handling

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions