Discord Username / User ID
interferon0
What does this improvement do?
The CLI ships only via npm and goes stale silently: a user on 0.1.x is missing setup, doctor, completion, and the failure-bundle fixes, and nothing ever tells them. Add the gh/npm-style update notice: at most once per 24h, fetch the latest version from registry.npmjs.org, cache it in ~/.testsprite/update-check.json, and print a one-line stderr notice when a newer version exists. Strictly non-blocking and silent where it must be: stderr only, TTY only, skipped in CI, under --output json, under --dry-run, and for the completion command (its stdout is eval'd by shells); opt-out via TESTSPRITE_NO_UPDATE_NOTIFIER (mirrors the existing TESTSPRITE_NO_SKILL_WARNING); every error swallowed so the nudge can never break a command.
Details / implementation notes
Hand-rolled 130 lines in src/lib/update-check.ts: global fetch with AbortSignal.timeout(1500), a simple x.y.z compare (prerelease = older), a valibot-validated cache shape (/.testsprite/ is already owned by config/credentials). The update-notifier npm package is deliberately NOT used (large transitive tree; violates the 2-dependency budget). Wire next to the existing preAction skill-nudge hook in src/index.ts. Honest note: this adds the CLI's only outbound call besides api.testsprite.com — mitigations are the 24h TTL, a request carrying nothing but the package name, and the env opt-out. Tests: TTL cache behavior, every gate (CI/TTY/json/dry-run/completion), notice rendering. PR to follow once assigned.
Confirmations
Discord Username / User ID
interferon0
What does this improvement do?
The CLI ships only via npm and goes stale silently: a user on 0.1.x is missing setup, doctor, completion, and the failure-bundle fixes, and nothing ever tells them. Add the gh/npm-style update notice: at most once per 24h, fetch the latest version from registry.npmjs.org, cache it in ~/.testsprite/update-check.json, and print a one-line stderr notice when a newer version exists. Strictly non-blocking and silent where it must be: stderr only, TTY only, skipped in CI, under --output json, under --dry-run, and for the completion command (its stdout is eval'd by shells); opt-out via TESTSPRITE_NO_UPDATE_NOTIFIER (mirrors the existing TESTSPRITE_NO_SKILL_WARNING); every error swallowed so the nudge can never break a command.
Details / implementation notes
Hand-rolled
130 lines in src/lib/update-check.ts: global fetch with AbortSignal.timeout(1500), a simple x.y.z compare (prerelease = older), a valibot-validated cache shape (/.testsprite/ is already owned by config/credentials). The update-notifier npm package is deliberately NOT used (large transitive tree; violates the 2-dependency budget). Wire next to the existing preAction skill-nudge hook in src/index.ts. Honest note: this adds the CLI's only outbound call besides api.testsprite.com — mitigations are the 24h TTL, a request carrying nothing but the package name, and the env opt-out. Tests: TTL cache behavior, every gate (CI/TTY/json/dry-run/completion), notice rendering. PR to follow once assigned.Confirmations