Repository navigation
fix(cli): installing the CLI no longer downloads an unused code formatter - #5906
Conversation
vanceingalls
left a comment
There was a problem hiding this comment.
Reviewed at 7d935433d4f5211563dd7723e2125d05b7a36af5 against merge-base 4c798f39. The diff is packages/cli/package.json (−1) and bun.lock (−2). No code changes.
What I checked
- Nothing imports it. At this head, grepping the whole repo (lockfile, Markdown and HTML excluded) finds no
import/require/dynamicimport()ofprettierorprettier/*, and nonpx/bunx prettierorprettier --invocation. The only non-comment mention underpackages/*/src,packages/cli,skills,scriptsor.githubis theprettier-directive prefix inscripts/check-comment-citations.mjs:48, which is a regex, not a use. Everything else isprettier-ignorecomments in generated catalog HTML. - No other declarer. No
package.jsonin the repo mentionsprettierany more. - The lockfile edit is exactly the two lines. It removes the CLI workspace entry and the
prettier@3.8.3package entry. No"prettier"key remains anywhere inbun.lock, so nothing else resolved through it. CI's frozen install accepts the edited lockfile.
CI at this head: Build (frozen install plus verify:packed-manifests with the CLI's clean consumer install and startup), Render on windows-latest, Semantic PR title, Test, Test: runtime contract, Tests on windows-latest, Typecheck and regression are green.
Verdict: APPROVE
Reasoning: An unused runtime dependency removed with a matching two-line lockfile edit. No code path references it, and the frozen install and packed-consumer checks pass.
— Via
Edit accuracy: accurate 271 (base branch 271), smooth 140 of thoseThe gate passes. Quarantined, measured but not gated (0) Unstable (1)
|
What
hyperframesno longer listsprettieras a runtime dependency. Everynpm install hyperframesstops downloading it.Why
Nothing in the CLI uses it. On
main, no file underpackages/*/src,scriptsor.githubimports, requires or runs it. The builtdistmentions it only in// prettier-ignorecomments, and no other installed package declares it as a peer. It still cost every install about 10 MB.Related work
None.
How
prettierentry frompackages/cli/package.jsondependencies.bun.lock: the CLI workspace entry and the package entry. No other workspace depends on it.bun install --frozen-lockfilereports no changes with the edited lockfile.The lockfile's other drift (workspace version fields behind
package.json) is left alone to keep this diff to the one dependency.Test plan
Measured on Linux with Node 22.22, npm 10.9 and bun 1.4.2. Each side packed
packages/cliwithbun pm packand installed the tarball into an empty project withnpm install --omit=dev.node_modulesnode_modules/prettierThe tarball itself barely changes, because
prettierwas never bundled; the saving is in what the install pulls in.Smoke from the installed tarball, both sides:
hyperframes --versionprints0.8.177.hyperframes linton a one-file composition exits 0 with 0 errors and 1 warning, the same output on both sides.bun run verify:packed-manifestsafter the change: every package's packed manifest is publish-safe, the clean consumer install, Node execution, NodeNext declarations, Vite resolution and CLI startup checks pass, and all 14 packages are within their size budgets. No budget changes.