Package Alias
Package Alias: Package Aliases make it possible to use a single, canonical, name to refer to a package that may be known by many distinct package names.
A number of packages may be known by distinct identifiers, across different package ecosystems.
For instance, NodeJS may be known by the following package names:
package_name |
package_type |
---|---|
node | docker |
docker.io/library/node | docker |
cgr.dev/chainguard/node | docker |
@types/node | npm |
node | node-version |
node | hermit |
node | devcontainer |
Similarly, Go modules may be known by different module import paths, which include the current major version. As we can see with oapi-codegen
, the package has also migrated between different organisations on GitHub, so we can see the following four package names to look up:
package_name |
package_type |
---|---|
github.com/deepmap/oapi-codegen | golang |
github.com/deepmap/oapi-codegen/v2 | golang |
github.com/oapi-codegen/oapi-codegen | golang |
github.com/oapi-codegen/oapi-codegen/v2 | golang |
With a Package Alias, it's possible to create a single canonical_name
that represents the collection of these different names for the same underlying package.