fix(lockfile): set back versions to the actual latest one in the lockfile#29079
fix(lockfile): set back versions to the actual latest one in the lockfile#29079lorypelli wants to merge 3 commits intooven-sh:mainfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughWhen running Changes
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/install/lockfile.zig`:
- Around line 847-881: The code only replaces ws_dep.version.literal leaving the
parsed Dependency.Version stale and leaking allocPrint buffers; fix by mirroring
preprocessUpdateRequests(): build the final version string into a temporary
stack/StringBuilder (use string_buf_alloc or a stack buffer), append that slice
into new.buffers.string_bytes via string_buf_alloc.append (so ownership is
tracked), then set ws_dep.version = Dependency.parse(the_appended_slice) instead
of only assigning ws_dep.version.literal; ensure you stop using the raw
allocPrint results (don't keep pointers to their buffers) so they aren't leaked
and the in-memory parsed state (latest/dist-tag/range) is updated correctly.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 3a56f278-b332-48c4-b613-226cdd67e58d
📒 Files selected for processing (1)
src/install/lockfile.zig
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
@claude review |
This pull request adds logic to the
cleanWithLoggerfunction insrc/install/lockfile.zigto improve how dependency versions are recorded during abun update --latestoperation. Now, when updating all dependencies to their latest versions, version literals like"latest"are replaced with the actual resolved versions (e.g.,^19.0.0). This ensures the lockfile contains explicit version numbers instead of vague references.Dependency update improvements:
bun update --latestwithout specifying packages, the lockfile now records the resolved version (e.g.,^19.0.0) instead of"latest"for each dependency, making version tracking more accurate and explicit.