Files
bun.sh/test/cli
Claude Bot 9a912be19b fix(install): resolve GitHub override when package.json name differs
When using resolutions/overrides to override a semver dependency with
a GitHub dependency from a monorepo, the install would fail with
"failed to resolve" if the GitHub repo's root package.json had a
different name than the requested package.

For example, this would fail:
```json
{
  "dependencies": { "discord.js": "^14.14.1" },
  "resolutions": { "discord.js": "github:discordjs/discord.js#..." }
}
```

The discord.js GitHub repo is a monorepo where the root package.json
has name "@discordjs/discord.js", not "discord.js". After downloading
and extracting the tarball, the package was stored with the wrong name
hash, causing the resolution lookup to fail.

The fix directly assigns the resolution when processing dependencies
from overrides (where the original version tag like .npm doesn't match
the extracted package's resolution tag like .github), instead of trying
to re-resolve which would fail due to the name hash mismatch.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 10:57:56 +00:00
..
2025-10-11 08:23:25 -07:00