Skip to content

feat(plugin): add startup update check#10

Merged
Statsly-org merged 1 commit into
mainfrom
feat/update-check
Apr 26, 2026
Merged

feat(plugin): add startup update check#10
Statsly-org merged 1 commit into
mainfrom
feat/update-check

Conversation

@Statsly-org
Copy link
Copy Markdown
Owner

Summary

  • Add an optional startup update checker that queries the npm registry for @st3ix/pman and logs a hint when a newer version is available.
  • Default is enabled (updateCheck: true), can be disabled via plugin options.
  • Non-blocking, short timeout, silent on failures/offline.

Why

Keep installations current without interrupting normal Fastify startup or Postman sync, and provide a clear npm i @st3ix/pman@latest upgrade hint.

Changes

  • src/update-check.ts: background npm registry check + semver compare + log message
  • src/options.ts: add updateCheck option (default true)
  • src/plugin.ts: schedule the check on startup (onReady)
  • README.md: document updateCheck
  • test/update-check.test.js: basic coverage

Test plan

  • npm test
  • npm run lint
  • Manual: start an app using the plugin and verify it logs pman: update available when latest > current (or stays silent otherwise).

Notes

  • No secrets are written; the check uses the configured fetchImpl and never blocks startup.

@Statsly-org Statsly-org self-assigned this Apr 26, 2026
@Statsly-org Statsly-org merged commit d363393 into main Apr 26, 2026
2 checks passed
@Statsly-org Statsly-org deleted the feat/update-check branch April 26, 2026 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant