mirror of
https://github.com/oven-sh/bun
synced 2026-02-14 21:01:52 +00:00
Implements `bun add --catalog` and `bun add --catalog=name` flags to add dependencies with catalog references instead of actual versions. Usage: - `bun add --catalog react` adds `"react": "catalog:"` to dependencies - `bun add --catalog=dev typescript` adds `"typescript": "catalog:dev"` to dependencies The catalog itself must be pre-defined in the root package.json. This command only updates package.json with the catalog reference; actual installation happens when running `bun install` afterwards, which resolves versions from the catalog. Changes: - Add --catalog parameter to CommandLineArguments - Thread catalog_name through PackageManager options - Modify PackageJSONEditor to write catalog references - Skip installation when --catalog is used (only update package.json) - Add comprehensive tests for catalog functionality 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>