Skip to content

install: keep workspace and other non-registry entries as written on bun update <name> - #38847

Open
robobun wants to merge 5 commits into
mainfrom
farm/b4f39c55/update-keeps-workspace-entries
Open

install: keep workspace and other non-registry entries as written on bun update <name>#38847
robobun wants to merge 5 commits into
mainfrom
farm/b4f39c55/update-keeps-workspace-entries

install: keep every non-registry entry out of the named update passes

c826a98
Select commit
Loading
Failed to load commit list.
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

See this annotation in the file changed.

@claude 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