* feat(config): add support for token helper
Use the new interface in `pnpm/credentials-by-uri` for supporting token
helpers. A token helper is an executable, set in the user's `.npmrc`
which outputs an auth token. This can be used in situations where the
`authToken` is not a constant value, but is something that refreshes
regularly, where a script or other tool can use an existing refresh
token to obtain a new access token.
The configuration for the path to the helper must be an absolute path,
with no arguments. In order to be secure, it is _only_ permitted to set
this value in the user `.npmrc`, otherwise a project could place a value
in a project local `.npmrc` and run arbitrary executables.
A similar feature is available in many similar tools. The implementation
in `credentials-by-uri` is modelled after the `vault` (vaultproject.io)
implementation - https://github.com/hashicorp/vault/blob/main/command/token/helper_external.go
* test: fix
* docs: add changesets
Co-authored-by: Zoltan Kochan <z@kochan.io>
Add a `pnpm store path` command to print the location of the pnpm store
as the CLI would resolve it. This allows the user to inspect the current
store location, as well as allows external tooling (like shell scripts)
to locate the pnpm store without needing to make assumptions about its
location or needing to load the `@pnpm/store-path` module.
This command differs from running `pnpm get store`, as `pnpm get store`
prints "undefined" in the case that no custom store path has been set,
which requires external tooling to have knowledge about where pnpm
locates its store in the default case.
close#2575
Reduce the number of directories in the virtual store directory.
Don't create a subdirectory for the package version. Append the
package version to the package name directory.
close#2521
PR #2531
Instead of creating a separate subdir for executables in the content-addressable storage, use the directory where all the files are stored but suffix the executable files with `-exec`. Also suffix the package index files with `-index.json`.
ref #2521
PR #2530