Repository navigation
refactor(deps): make Nix the single source for publint and prune dead catalogs - #1495
Conversation
publint was pinned twice: once as a pnpm catalog entry expanded into the devDependencies of `ccusage` and all six native packages, and once as the bun2nix-built `nix/tools/publint` used by the `publint` flake check and the dev shell. The two pins could drift silently, and Renovate only ever bumps one of them at a time. Keep the Nix build as the single pin and drop the pnpm copies. The `build`/`prepack` scripts still call bare `publint`, which now always resolves from PATH: the dev shell and `just ccusage::build-package` already provided it, and the two publish jobs that install tools with `nix profile install` instead of entering the dev shell now request `.#publint` explicitly. Both publint invocations stay: `prepack` packs a real tarball while the flake check runs `--pack false` against stubbed generated files, so they cover different failure modes.
The `runtime` catalog lost its last reference when the TypeScript CLI was replaced by the Rust binary (#1306), and `llm-docs` lost its only reference when the gunshi docs dependency was removed. Both blocks stayed behind in pnpm-workspace.yaml, so Renovate kept opening bumps against specifiers no package resolves (#1350, #1351) and neither catalog ever reached the lockfile. Only `docs` and `types` have consumers, so keep those two.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (10)
💤 Files with no reviewable changes (7)
📝 WalkthroughWalkthroughPublint is removed from package development dependencies, invoked by native package prepack scripts, and installed directly in publishing workflows. Several obsolete documentation catalog groups are also removed from the workspace configuration. ChangesPublint packaging workflow
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
ccusage-guide | 092ab89 | Commit Preview URL Branch Preview URL |
Jul 27 2026, 10:31 AM |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — consolidates publint to a single Nix source by dropping the duplicate pnpm catalog:lint pin, and removes two dead catalogs (runtime, llm-docs) with zero consumers.
- Source
publintfrom Nix flake only — removes thepublintdevDependenciesfromapps/ccusageand all 6 native platform packages, adds.#publintto thenix profile installlines in CI and release workflows where the dev shell is intentionally bypassed. - Prune dead
runtimeandllm-docscatalogs — both lost their last consumers in prior refactors; Renovate was bumping specifiers no package resolves.
@v0 or keep the SHA fresh with Dependabot | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
ccusage
@ccusage/ccusage-darwin-arm64
@ccusage/ccusage-darwin-x64
@ccusage/ccusage-linux-arm64
@ccusage/ccusage-linux-x64
@ccusage/ccusage-win32-x64
commit: |
ccusage performance comparisonPR SHA: This compares the Rust PR release binary against the configured base package on the same CI runner. Package runtime diagnosticsCompares the PR package wrapper, the installed native optional dependency binary, and the workspace release binary on the same large fixture. This identifies whether slow package results come from JavaScript wrapper overhead, the published native binary build, or the Rust core itself. Fixtures: Claude
Committed fixture performanceCommitted small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage. Fixtures: Claude
Large real-world-shaped fixture performanceGenerated fixtures shaped from aggregate local log statistics: thousands of JSONL files, many small sessions, and a long tail of larger sessions. No real prompts, paths, or outputs are stored in the fixtures. Fixtures: Claude
Artifact size
Lower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees. |
ccusage performance comparisonPR SHA: This compares the PR package against the configured base package on the same CI runner. Package runtime diagnosticsCompares the PR package wrapper, the installed native optional dependency binary, and the workspace release binary on the same large fixture. This identifies whether slow package results come from JavaScript wrapper overhead, the published native binary build, or the Rust core itself. Fixtures: Claude
Committed fixture performanceCommitted small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage. Fixtures: Claude
Large real-world-shaped fixture performanceGenerated fixtures shaped from aggregate local log statistics: thousands of JSONL files, many small sessions, and a long tail of larger sessions. No real prompts, paths, or outputs are stored in the fixtures. Fixtures: Claude
Artifact size
Lower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees. |

Summary
publintwas pinned in two places: the pnpmlintcatalog (expanded into the devDependencies ofccusageand all six native packages) and the bun2nix-builtnix/tools/publintused by thepublintflake check and the dev shell. Nothing kept the two pins in sync. This drops the pnpm copies and keeps the Nix build as the only pin.While auditing
pnpm-workspace.yaml, two more catalogs turned out to have no consumers at all, so they are removed in a follow-up commit.What Changed
lintcatalog and thepublintdevDependency fromapps/ccusageandpackages/ccusage-*; regeneratedpnpm-lock.yaml(4 packages fewer)..#publintto thenix profile installline of the two publish jobs (release.yamlnpm job,ci.yamlpkg-pr-new job). These jobs deliberately skip the full dev shell, so they need the tool requested explicitly.runtimeandllm-docscatalogs.runtimelost its last reference when the TypeScript CLI was replaced by the Rust binary (build: migrate package tooling to nushell and node test #1306) andllm-docswhen the gunshi docs dependency was dropped; Renovate has been bumping specifiers no package resolves (chore(deps): update dependency get-stdin to v10 #1350, chore(deps): update dependency type-fest to v5 #1351).docsandtypesare still in use and stay.Why
The
build/prepackscripts call barepublint, which resolves from PATH — the dev shell andjust ccusage::build-packagealready provided the Nix build, so the pnpm copy only mattered inside the publish jobs. Supplying it there from the flake collapses the two pins into one without changing what runs.Both publint invocations are kept on purpose:
prepackpacks a real tarball, while the flake check runs--pack falseagainst stubbed generated files. They cover different failure modes.Removing the pnpm copy means
pnpm publishin a bare non-Nix checkout no longer haspublinton PATH. Releases run through Nix, so that path is not exercised.Testing
nix build .#checks.aarch64-darwin.publint— all 7 packages "All good!"nix build .#publint,nix eval .#publint.meta.mainProgram— the attr the CI jobs install resolvespnpm --filter ccusage exec publint --version→publint, 0.3.12, resolved from the Nix store after the devDependency removalpnpm install --frozen-lockfile— lockfile in sync; dropping the dead catalogs left it untouched, confirming they never reached itjust fmt,prek run --from-ref main --to-ref HEAD— cleanNeed help on this PR? Tag
@codesmith-botwith what you need. Autofix is enabled.Summary by cubic
Make Nix the single source of
publintto avoid version drift and simplify the workspace. CI now installs flake.#publintso prepack checks keep working.publintfromapps/ccusageand all native package devDependencies; deleted thelintcatalog; lockfile shrinks by 4 packages.ci.yamlandrelease.yamlto install.#publintwithnix profile install(alongsidenixpkgs#pnpmand, in CI,nixpkgs#nodejs).runtimeandllm-docscatalogs; keptdocsandtypes.Written for commit 092ab89. Summary will update on new commits.
Summary by CodeRabbit
Chores
Bug Fixes
User Impact