Files
bun.sh/test/cli
Claude Bot cbf29c78e2 Strip registry URL prefix from tarball URLs in bun.lock
This change makes lockfiles more portable across different registries and
proxy configurations by storing tarball URLs as relative paths when they
start with the package's registry URL.

When writing the lockfile:
- If a tarball URL starts with the package's registry URL (from
  scopeForPackageName), strip that prefix
- Store only the relative path (e.g., "/lodash/-/lodash-4.17.21.tgz")

When reading the lockfile:
- If a URL doesn't start with http:// or https://, treat it as relative
- Prepend the package's registry URL to reconstruct the full URL

This allows users with custom registries or proxies to share lockfiles
more easily without URL mismatches.

Manual testing shows:
- Default registry packages now have relative URLs (e.g., "/is-number/-/is-number-7.0.0.tgz")
- Packages resolved from different registries keep full URLs
- Reinstalling from lockfiles works correctly with --frozen-lockfile

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-31 07:58:24 +00:00
..
2025-05-24 13:36:51 -07:00
2025-10-11 08:23:25 -07:00