Resolve version ranges when using bun add
with an alias
#11901
Labels
enhancement
New feature or request
bun add
with an alias
#11901
What is the problem this feature would solve?
According to Install a package under a different name with Bun it's possible to add a dependency like this:
This results in a the following dependency being added to
package.json
as well as aformat
directory being added tonode_modules
containing theprettier
package.Compare this to how
npm
handles aliases.Note that
npm
resolves the latest version and adds a caret range. Bun does not do this, so you'd need to do that manually:What is the feature you are proposing to solve the problem?
bun add
should resolve the latest version of a package when using an alias. This would stay consistent with hownpm
installs aliased packages as well as hownpm install
andbun add
work in general.What alternatives have you considered?
The alternative is to add the version or range yourself, which is tedious and error prone.
The text was updated successfully, but these errors were encountered: