Files
bun.sh/test/cli
Claude Bot 3108b5c19f fix(install): update overrides/resolutions when running bun add
When `bun add pkg@version` is used to update a package that has an
existing entry in the `overrides` (npm) or `resolutions` (yarn)
section of package.json, the override/resolution entry was not being
updated. This caused the old version from the override to be installed
instead of the newly requested version.

This fix adds an `editOverrides` function that updates any matching
overrides/resolutions entries when a package is added or updated.
The function is called twice:
1. Before install: Uses the literal version from CLI to ensure the
   install uses the correct version
2. After install: Uses the resolved version from the lockfile to
   ensure the final package.json has resolved versions (e.g., when
   using dist-tags like "latest")

Fixes #25843

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-06 18:29:55 +00:00
..