Skip to content

fix: make tsc pass and restore the daily update-check limit - #7

Open
rohit-pathak wants to merge 2 commits into
mainfrom
fix/typecheck
Open

rohit-pathak wants to merge 2 commits into
mainfrom
fix/typecheck

Conversation

@rohit-pathak

Copy link
Copy Markdown
Owner

What

  • Typecheck passes. Added typescript@5.9.3 and @types/node@24.19.2 as pinned devDependencies. tsc was only installed transitively (via bun-ffi-structs's peer dep), and src/clipboard.ts had no Node types.
  • Update-check bug. version.ts assumed an async KV. Opencode v1's TuiKV is synchronous, so checkForUpdate never saw a Promise and fetched from the GitHub API on every launch, which defeated the once-a-day limit. It now accepts both the sync v1 KV and the async v2 facade KV through Promise.resolve. The toast variant is narrowed to TuiToast's union.
  • Tests. Added test/version.test.ts, covering sync KV, async KV, stale checks and the no-KV case. Against the old code the sync-KV test fails; with this change all 4 pass.
  • CI. just check now runs tsc --noEmit, so type errors fail the build. These errors had gone unnoticed since v0.20.0 typed api as TuiPluginApi.
  • Tooling. Added mise.toml pinning bun 1.3, and updated the outdated api: any note in AGENTS.md and the just check descriptions in CONTRIBUTING.md.

Checks

just check: lint clean, tsc --noEmit clean, 576 tests pass.

🤖 Generated with Claude Code

rohit-pathak and others added 2 commits November 13, 2026 23:38
- Add typescript@5.9.3 and @types/node@24.19.2 as pinned devDependencies
  (tsc was only present transitively).
- version.ts: accept both the sync v1 TuiKV and the async v2 facade KV.
  With the sync KV, the "checked today" branch was never taken, so every
  launch hit the GitHub API. Narrow the toast variant to TuiToast's union.
- Add test/version.test.ts covering sync/async KV and stale checks.
- `just check` now runs `tsc --noEmit` so CI catches type errors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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