Skip to content

Dev - #174

Merged
wallpants merged 8 commits into
mainfrom
dev
Jul 18, 2026
Merged

Dev#174
wallpants merged 8 commits into
mainfrom
dev

Conversation

@wallpants

Copy link
Copy Markdown
Owner

No description provided.

wallpants and others added 8 commits July 17, 2026 16:29
Replace the eslint stack (typescript-eslint, import-x plugins) with
oxlint + oxlint-tsgolint for type-aware linting. The typescript-eslint
peer range capped typescript at <6.1.0, which blocked the upgrade to
typescript 7.0.1-rc (native compiler).

Also fix tsconfig "types" to reference the @types/bun package directly
instead of relying on the hoisted transitive bun-types package, and drop
"composite" which forced tsbuildinfo emission without project references.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- create the msgpack decode stream per connection instead of sharing a
  module-level singleton; concurrent attach() calls no longer cross-talk
  or leak stream listeners
- reject all in-flight call() promises when the socket errors or closes;
  previously they hung forever if neovim died
- detach() now tears down pending requests, the out-queue, and stream
  listeners, and is idempotent
- convert neovim error payloads ([code, message] tuples) into real Error
  instances instead of blindly casting; type RPCResponse's error slot
  accordingly
- run notification handlers sequentially with per-handler error logging
  instead of fire-and-forget async forEach (unhandled rejections)
- drain the outgoing message queue with a loop instead of unbounded
  recursion
- merge the logger's two file transports that wrote interleaved entries
  to the same file

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Un-comment the types command that generates neovim-api.types.ts from
nvim --api-info. The type mapper no longer throws on unknown neovim
types: ArrayOf(X) and ArrayOf(X, n) are resolved recursively and
anything else falls back to "unknown" with a warning. Add the Dict type
(renamed from Dictionary in newer neovim).

Regenerate neovim-api.types.ts against neovim 0.11: adds
nvim_win_text_height, nvim_ui_term_event, nvim_ui_send,
nvim_tabpage_set_win, nvim_open_tabpage and nvim_get_hl_ns; drops
deprecated nvim_subscribe, nvim_unsubscribe, nvim_win_get_option and
nvim_win_set_option.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Replace the placeholder sample test with a real suite (bun:test):

- attach.test.ts runs against a fake neovim server on a unix socket,
  covering the handshake, out-of-order response correlation, split-frame
  reassembly, error conversion, notification handler isolation/removal,
  request handling, rejection of pending calls on connection loss, and
  detach cleanup, plus a regression test for stream state shared across
  connections
- logger.test.ts covers disabled logging, single-write log entries, the
  custom json file transport, and prettyRPCMessage formatting
- generate.test.ts covers the neovim-to-typescript type mapping and full
  content generation

Test files and helpers are excluded from the published package.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- fix invalid syntax in the logging file example (double colon) and stop
  suggesting "~" paths, which node's resolve() does not expand
- the onRequest example passed a buffer number where its declared type
  was a buffer name string; use nvim_buf_get_name(0)
- mention the "bunx bunvim types" command next to the generated
  TypeScript definitions
- fix "listenning" typo

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Excluding deprecated functions from the generated types turned every
neovim deprecation into a hard type error for consumers (e.g.
nvim_notify, deprecated since api level 13). Include them with a
"@deprecated since api level N" jsdoc tag instead, so existing code
keeps compiling while editors and typescript/no-deprecated surface the
deprecation.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The `bunvim types` command now stamps the Neovim version and api level
from the api-info metadata into the generated file's header comment,
making it the single source of truth for which Neovim the bundled
definitions were generated against. The readme points to the header
instead of hardcoding a version.
@wallpants
wallpants merged commit 921add5 into main Jul 18, 2026
2 checks passed
@wallpants
wallpants deleted the dev branch July 18, 2026 17:57
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant