install: keep workspace and other non-registry entries as written on bun update <name> - #38847
Open
robobun wants to merge 5 commits into
Open
install: keep workspace and other non-registry entries as written on bun update <name>#38847robobun wants to merge 5 commits into
robobun wants to merge 5 commits into
Claude / Claude Code Review
completed
Aug 15, 2026 in 33m 37s
Code review found 1 potential issue
Found 1 candidates, confirmed 1. See review comments for details.
Details
| Severity | Count |
|---|---|
| 🔴 Important | 0 |
| 🟡 Nit | 1 |
| 🟣 Pre-existing | 0 |
| Severity | File:Line | Issue |
|---|---|---|
| 🟡 Nit | src/install/PackageManager/PackageJSONEditor.rs:1454-1455 |
Plain-range workspace link with @ drops the declared operator |
Annotations
Check warning on line 1455 in src/install/PackageManager/PackageJSONEditor.rs
claude / Claude Code Review
Plain-range workspace link with @<spec> drops the declared operator
The `Workspace if Update => continue` arm relies on the before-install pass leaving the entry byte-identical, but for a plain range like `"pkg1": "^1.0.0"` + `bun update pkg1@1.0.0` the `!is_npm()` skip does not fire and the before-install pass rewrites to `"1.0.0"`, so the `^` is dropped on disk — the registry path restores it via `updating_packages[name].original_version_literal`, this arm does not. On main the same input wrote `workspace:*` (also not kept-as-written), so this is a lateral cha
Loading