-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Support the file: and link: protocols as catalog entries #8642
Copy link
Copy link
Open
Description
Goal
It should be possible to use the file: and link: protocols in for a pnpm catalog entry.
# pnpm-workspace.yaml
packages:
- packages/*
catalog:
test-pkg: file:./tarballs/test-pkg-1.0.0.tgz{
"dependencies": {
"test-pkg": "catalog:"
}
}Today this errors on pnpm install.
❯ pnpm install
Scope: all 1 workspace projects
ERR_PNPM_CATALOG_ENTRY_INVALID_SPEC The entry for 'test-pkg' in catalog 'default' declares a dependency using the 'file' protocol. This is not yet supported, but may be in a future version of pnpm.
Support for this was intentionally punted for the initial pnpm catalogs release, but we should go back and add support for this.
Challenges
The file: and link: paths should be interpreted relative to pnpm-workspace.yaml, but there may be transformation of these paths needed when resolving them in a workspace package, which will mostly likely be in a different directory (e.g. packages/foo).
Reactions are currently unavailable