bun icon indicating copy to clipboard operation
bun copied to clipboard

Package Aliasing

Open ian-weir opened this issue 3 years ago • 1 comments
trafficstars

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

ian-weir avatar Jul 28 '22 16:07 ian-weir

Bumping this issue, package aliasing would be super helpful!

plibither8 avatar Dec 28 '22 07:12 plibither8

Fixed by @alexlamsl in #1837

Jarred-Sumner avatar Jan 20 '23 00:01 Jarred-Sumner

@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]",

ian-weir avatar Feb 06 '23 19:02 ian-weir