chore(nix): package bumpp and changelogithub, refactor publint#1316
chore(nix): package bumpp and changelogithub, refactor publint#1316ryoppippi wants to merge 4 commits into
Conversation
|
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 (4)
📒 Files selected for processing (15)
💤 Files with no reviewable changes (1)
✅ Files skipped from review due to trivial changes (5)
🚧 Files skipped from review as they are similar to previous changes (7)
📝 WalkthroughWalkthroughIntroduces a shared ChangesNix-packaged pnpm CLI tools
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
ccusage-guide | 9953df7 | Commit Preview URL Branch Preview URL |
Jun 15 2026, 03:34 AM |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
bump.config.ts (1)
44-77: Usesatisfiesfor the config literal instead of type annotation.This tooling-file config object should use
satisfies BumppConfiginstead of the: BumppConfigannotation to align with the repository's TypeScript guidelines for typed literals.Suggested change
-const config: BumppConfig = { - async execute(operation) { +const config = { + async execute(operation: BumppOperation) { const result = spawnSync( 'cargo', [ 'set-version', '--manifest-path', @@ operation.update({ updatedFiles: [ ...new Set([ ...operation.state.updatedFiles, ...getUpdatedRustReleaseFiles(operation.options.cwd).map((filePath) => resolve(operation.options.cwd, filePath), ), ]), ], }); }, -}; +} satisfies BumppConfig;🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@bump.config.ts` around lines 44 - 77, The config constant declaration currently uses a type annotation with `: BumppConfig` syntax. Replace this with the `satisfies BumppConfig` keyword instead to align with the repository's TypeScript guidelines for typed literals. Update the declaration of the config constant to use satisfies rather than a direct type annotation.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@bump.config.ts`:
- Around line 44-77: The config constant declaration currently uses a type
annotation with `: BumppConfig` syntax. Replace this with the `satisfies
BumppConfig` keyword instead to align with the repository's TypeScript
guidelines for typed literals. Update the declaration of the config constant to
use satisfies rather than a direct type annotation.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: a0e10281-c657-462a-919e-ddd21ddd4041
⛔ Files ignored due to path filters (4)
nix/bumpp/pnpm-lock.yamlis excluded by!**/pnpm-lock.yamlnix/changelogithub/pnpm-lock.yamlis excluded by!**/pnpm-lock.yamlnix/publint/pnpm-lock.yamlis excluded by!**/pnpm-lock.yamlpnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (15)
.github/workflows/release.yamlbump.config.tsjustfilenix/bumpp/package.jsonnix/bumpp/package.nixnix/changelogithub/package.jsonnix/changelogithub/package.nixnix/dev-shell.nixnix/packages.nixnix/pnpm-tool.nixnix/publint.nixnix/publint/package.jsonnix/publint/package.nixpackage.jsonpnpm-workspace.yaml
💤 Files with no reviewable changes (3)
- nix/publint.nix
- package.json
- pnpm-workspace.yaml
ccusage
@ccusage/ccusage-darwin-arm64
@ccusage/ccusage-darwin-x64
@ccusage/ccusage-linux-arm64
@ccusage/ccusage-linux-x64
@ccusage/ccusage-win32-x64
commit: |
There was a problem hiding this comment.
1 issue found across 19 files
Tip: cubic can generate docs of your entire codebase and keep them up to date. Try it here.
Fix all with cubic | Re-trigger cubic
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. |
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. |
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. |
Extract the duplicated "install an npm CLI with pnpm and wrap its binary" logic from publint.nix into a reusable nix/pnpm-tool.nix builder. publint now lives in its own directory with a standalone package.json and pnpm-lock.yaml instead of inline heredocs, so the lockfile is a normal reviewable file. The builder also exposes an updateProgram so packaged tools can be refreshed (version, lockfile, and FOD hash) without manual edits. No behaviour change: the publint derivation and its FOD hash are identical to the previous inline definition.
Add bumpp and changelogithub as Nix packages built through the shared pnpm-tool builder, each with its own pinned package.json and pnpm-lock.yaml, and expose them in the dev shell. The changelogithub lockfile carries the c12 3.3.4 override previously kept in pnpm-workspace.yaml. Wire each tool's updateProgram as a flake app (update-publint, update-bumpp, update-changelogithub) and add a `just update-pnpm-tools` recipe so the pinned versions, lockfiles, and FOD hashes can be refreshed with `nix run`.
Drop bumpp and changelogithub from the root devDependencies, the release catalog, the c12 override, and the pnpm lockfile now that they are provided by the Nix dev shell. Point the consumers at the Nix-provided binaries: `just release` calls `bumpp -r` directly, the release workflow runs `changelogithub` under `nix develop`, and bump.config.ts mirrors the small slice of the bumpp config types locally instead of importing from the package.
Co-authored-by: Codesmith <codesmith-bot@users.noreply.github.com>
1a6e933 to
9953df7
Compare
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 sizeLower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees. |


Summary
Move the npm release tools
bumppandchangelogithubout of pnpm and into Nix packages, and refactor the existingpublintpackage to use file-based lockfiles. Add a reusable builder andnix runupdaters so the pinned tools stay maintainable.What changed
nix/pnpm-tool.nix): extracts the "install an npm CLI with pnpm and wrap its binary" logic that was inline inpublint.nix.nix/publint/with a standalonepackage.jsonandpnpm-lock.yamlinstead of inline heredocs. The derivation and FOD hash are unchanged.nix/bumpp/andnix/changelogithub/and added to the dev shell. The changelogithub lockfile carries thec12@3.3.4override that previously lived inpnpm-workspace.yaml.devDependencies, the release catalog, thec12override, andpnpm-lock.yaml.just releasecallsbumpp -r, the release workflow runschangelogithubundernix develop, andbump.config.tsmirrors the small slice of bumpp's config types locally instead of importing the package.updateProgramis exposed as a flake app (update-publint,update-bumpp,update-changelogithub). Runjust update-pnpm-tools(ornix run .#update-<tool>) to refresh the version, regenerate the lockfile, and recompute the FOD hash automatically.Why
These are dev/release-only tools. Keeping them in Nix matches the existing
publintsetup, keeps the pnpm install lean, and makes the lockfiles reviewable as real files. The updater apps remove the only real downside (manual FOD hash bumps), since renovate cannot update Nix hashes on its own.Testing
nix build .#publint .#bumpp .#changelogithub— all buildnix run .#update-bumpp— verified end-to-end (regenerates lockfile, recomputes hash, rebuilds)just typecheck(oxlint) — 0 errorsnix fmt, pre-commit hooks (treefmt, gitleaks, node test) — passNote
The updater is run on demand (
just update-pnpm-tools); there is no scheduled CI job wiring it up yet. Happy to add a scheduled workflow that runs it and opens a PR if wanted.Need help on this PR? Tag
/codesmithwith what you need. Autofix is enabled.Summary by cubic
Packages the release tools
bumppandchangelogithubwith Nix and refactorspublintto use real lockfiles. Adds a shared builder andnix runupdaters so versions, lockfiles, and hashes are easy to refresh.New Features
nix/pnpm-tool.nixto install npm CLIs withpnpmand wrap their binaries.publint(same hash),bumpp11.1.0,changelogithub14.0.0 withc12@3.3.4override; all included in the dev shell.update-publint,update-bumpp,update-changelogithub) and ajust update-pnpm-toolsrecipe.Refactors
publinttonix/publint/withpackage.jsonandpnpm-lock.yaml(reviewable files); removed the oldnix/publint.nix.bumppandchangelogithubfrom rootdevDependencies, release catalog,c12override, andpnpm-lock.yaml.just releasecallsbumpp -r, the release workflow runsnix develop --command changelogithub, andbump.config.tsdefines minimal local types instead of importing frombumpp.gnugrepfrom its runtime inputs.Written for commit 9953df7. Summary will update on new commits.
Summary by CodeRabbit
New Features
Chores
Refactor