feat: recognize bun.lock as a dependency lock file - #531
Conversation
Bun (bun.sh) is a widely used JS/TS runtime and package manager whose lockfile (bun.lock) pins exact versions like package-lock.json or pnpm-lock.yaml. Repos using Bun were previously scored as having no lock file even though dependencies are fully pinned. Adds bun.lock to the strict lock files list and a unit test covering a Bun-based repository.
📝 WalkthroughWalkthroughThe dependency assessor now recognizes ChangesDependency pinning
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
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 |
📈 Test Coverage Report
Coverage calculated from unit tests only |
jwm4
left a comment
There was a problem hiding this comment.
Thanks for this contribution! I checked out the branch and tested it against real repositories, and the change works as advertised:
- thisuxhq/sveltednd (has
bun.lock):lock_filesnow passes at 100 with evidence "Found lock file(s): bun.lock" - nensii21/devlink (has
package-lock.json): still passes at 100, so no regression - jbilcke-hf/clapper (has only
bun.lockb): still fails with "No dependency lock files found"
Two requests before merging:
-
Please update
docs/attributes.md. The auto-managed lock file list (around line 512) needsbun.lockadded. Our convention (AGENTS.md, guideline 7) is that any change to an assessor's recognized paths updates that doc in the same PR. -
Consider also adding
bun.lockb. That was Bun's default lockfile format before Bun 1.2, and many Bun repos still only have the binary lockfile (clapper above is an example, and it scores 0 on this attribute today despite having a fully pinned, auto-managed lockfile). Since the strict list is a filename existence check, this would be a one-line addition. If you'd rather keep this PR minimal, I'm fine deferring it to a follow-up, just let me know which way you want to go.
The code change itself looks good and the unit test is appreciated. Happy to merge once the docs are synced.
This comment is from Bill Murdock, written with assistance from Claude Code.
Description
Bun (https://bun.sh) is a JS/TS runtime and package manager whose lockfile
bun.lockpins exact dependency versions — equivalent topackage-lock.jsonorpnpm-lock.yaml. Repos using Bun were previously assessed as having no lock file (lock_filesscore 0) even though their dependencies are fully reproducible.Type of Change
Related Issues
No related issues (no existing Bun-support issue found; see sibling PRs #532, #533, #534).
Changes Made
bun.locktostrict_lock_filesinstub_assessors.py.test_bun_lock_filecovering a Bun-based repository.Testing
pytest) — 178 passedlock_files0 → 100)Checklist
Additional Notes
Part of a small series adding first-class Bun support to agentready (CI gates, single-file verification, dependency audit).