bun
bun copied to clipboard
Package Aliasing
What is the problem this feature will solve?
If multiple versions of a dependency are required for a project aliasing the different version is very helpful to development. Aliasing allows your require/import statements to use the aliased name as well so it's clear in the code which version is being used.
What is the feature you are proposing to solve the problem?
This is how yarn has solved it: https://classic.yarnpkg.com/en/docs/cli/add#toc-yarn-add-alias
What alternatives have you considered?
No response
Bumping this issue, package aliasing would be super helpful!
Fixed by @alexlamsl in #1837
@Jarred-Sumner I'm not strictly sure it is unless I just have the configuration incorrect.
For instance if I have this in my package.json
"docxtemplater": "3.26.4",
"docxtemplater-legacy": "[email protected]"
I get output like this from running bun install
error: package "docxtemplater-legacy" not found registry.yarnpkg.com/docxtemplater-legacy 404 error: docxtemplater-legacy@[email protected] failed to resolve
edit: I see I can the formatting incorrect as bun is mirroring npm so the correct format would be:
"docxtemplater-legacy": "npm:[email protected]",