chore(deps): drop yaml and @inquirer/confirm for Bun built-ins#65
Merged
Conversation
Runtime dependencies 3 → 1 (only zod remains). Removes ~12 installed packages (including the @InQuirer tree) and ~1.5 MB from every ~/.claude install, shrinking the surface to keep fresh. - yaml → Bun.YAML (frontmatter.ts). The strict path reports the error message only; Bun.YAML exposes no reliable block-relative line/col, so parseFrontmatterStrict (lint:skills / lint:knowledge) drops the position. Frontmatter blocks are a few lines, so the message alone is actionable. - @inquirer/confirm → node:readline/promises (prompts.ts). Same promptYn API and non-TTY fallback, no transitive tree. - engines.bun >=1.1.30 → >=1.2.21 (the release that added Bun.YAML); setup.sh BUN_MIN and the README/MANUAL/CLAUDE/mcp-configs docs match.
4 tasks
arzafran
added a commit
that referenced
this pull request
Jun 22, 2026
… swap (#68) An independent Codex cross-model review of the yaml→Bun.YAML and @inquirer/confirm→node:readline migration (#65) surfaced two real Medium regressions, both reproduced and confirmed: - Bun.YAML silently keeps the last value on duplicate mapping keys, where the `yaml` package threw "Map keys must be unique". parseFrontmatterStrict now detects duplicate top-level keys itself, so lint:skills / lint:knowledge keep catching them. The scan is column-0 only — nested mappings, list items, and block-scalar continuations are always indented, so they never false-trip (covered by a test). - promptYn (readline) hung on Ctrl+C: readline's close() does not unblock a pending question() — only an AbortSignal rejects it. Wired a SIGINT→AbortController so Ctrl+C falls back to the default, restoring the behavior @inquirer/confirm gave for free. Full suite 618 pass / 0 fail; lint:skills/lint:knowledge clean on the real corpus.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this does
Cuts cc-settings' runtime dependencies from 3 to 1 — only
zodremains. cc-settings has no bundler, so the win isn't bundle size: it's the install footprint (every~/.claudeinstall drops ~12 packages and ~1.5 MB, and these sit where every hook runs) and the staleness surface (two fewer libraries to keep current). Both replacements are Bun/Node platform built-ins, so the code modernizes without losing capability.Summary
yaml→Bun.YAML(frontmatter.ts, the sole importer).Bun.YAMLships in Bun since 1.2.21. One behaviour change: it exposes no reliable block-relative line/col on parse errors (the thrownline/columnmap to the JS call site;originalLine/Columnaren't block-relative either), soparseFrontmatterStrict— used bylint:skills/lint:knowledge— now reports the error message without a position. Frontmatter blocks are a handful of lines, so the message alone stays actionable; the lint formatter degrades cleanly.@inquirer/confirm→node:readline/promises(prompts.ts, the sole importer). This was a ~10-package transitive tree for one yes/no prompt. ThepromptYnAPI, the non-TTY default fallback, and the EOF→default behaviour are unchanged — only the rendering is plainer.engines.bun>=1.1.30→>=1.2.21(the release that introducedBun.YAML). The functional bootstrap gatesetup.sh:BUN_MINis bumped, plus the README / MANUAL / CLAUDE.md / mcp-configs docs.Test Plan
bun run typecheckcleanbun test— 614 pass (1 pre-existing env-dependentteamKnowledgeAwarenessfailure, unrelated to this change)bun run lintexit 0 ·bun run lint:skills0/0 ·bun run schemas:checkin syncnode_modulestop-level 27 → 15 packagespromptYnreturns default under non-TTY;parseFrontmatter/parseFrontmatterStrictparse valid blocks and surface a message on malformed ones