Problem
Bun recently added support for catalogs, a feature analogous to pnpm catalogs. However, ni does not currently support this feature for bun workspaces.
This is analogous to #274, which requests pnpm catalog support.
Solution
Add a --catalog flag for bun workspaces that:
- Updates the
bunfig.toml file to add the dependency under a catalog
- References the cataloged version in
package.json
Example - Named Catalog:
Should update the catalogs in package.json.
And reference in package.json:
{
"dependencies": {
"lodash": "catalog:prod"
}
}
Example - Default Catalog:
Should use the default catalog in bunfig.toml.
nup
It would be helpful if the feature also worked for nup (updating packages) not just ni.
Problem
Bun recently added support for catalogs, a feature analogous to pnpm catalogs. However,
nidoes not currently support this feature for bun workspaces.This is analogous to #274, which requests pnpm catalog support.
Solution
Add a
--catalogflag for bun workspaces that:bunfig.tomlfile to add the dependency under a catalogpackage.jsonExample - Named Catalog:
Should update the catalogs in
package.json.And reference in
package.json:{ "dependencies": { "lodash": "catalog:prod" } }Example - Default Catalog:
Should use the default catalog in
bunfig.toml.Note
This feature was introduced in Bun v1.2.9.
nupIt would be helpful if the feature also worked for
nup(updating packages) not justni.