vlt v1.9.0: vlt stage and vlt trust
vlt v1.9.0 adds vlt stage, which uploads a version for a maintainer to approve before it is published, and vlt trust, which manages the CI workflows that publish without a token.

- Author
- Published
- Tags
vlt v1.9.0 is out, and it brings two new commands for publishing packages. The first is vlt stage, which adds staged publishing, following the design of npm stage. vlt stage publish uploads a version that the registry stores but does not serve until a person approves it with a second factor. Staging never asks for one, so a CI workflow can stage a release and a maintainer confirms it: vlt stage list and vlt stage view show what is waiting, vlt stage download saves the tarball to inspect, vlt stage approve publishes the version and vlt stage reject deletes it.
Terminal
# in CI
$ vlt stage publish
# later, a maintainer reviews and approves
$ vlt stage list
$ vlt stage download <stage-id>
$ vlt stage approve <stage-id>The second is vlt trust, which manages the trusted publishers of a package: the CI workflows that a registry lets publish with no stored token, because the job exchanges its identity token for a short-lived registry token. vlt publish could already publish that way, but adding a trusted publisher took the registry's dashboard or npm trust. Now vlt trust github trusts a GitHub Actions workflow to publish a package, to stage it or both, vlt trust list shows the trusted publishers of a package and vlt trust revoke removes one. Used together, the two commands let a workflow that holds no token stage a release that only goes out once a maintainer approves it. Both need a registry that supports these features, as the vlt.io registry does.
Terminal
$ vlt trust github --file=release.yml --allow-stage-publish
$ vlt trust list
$ vlt trust revoke --id=<trust-id>Other changes
- vlt stage and vlt trust use the package's publishConfig.registry. When the package in the current directory sets publishConfig.registry, the vlt stage subcommands talk to that registry, so vlt stage list finds the versions that vlt stage publish staged there, and vlt trust uses it when it manages that package. Otherwise they use --registry, a registry picked with vlt registry <alias> or the configured registry.
- A refused publish points to vlt stage publish. When a registry answers vlt publish with a 403, the error now says to run vlt stage publish instead if the account, token or trusted publisher only allows staged publishing.
- Recursive publishes mix trusted and token publishing. In vlt publish --recursive on CI, a package with no trusted publisher was sent with the short-lived token of the package published before it, and the registry refused it with a 403, even when the job had a token that could publish it. Every package now starts from the configured credentials.
- Trusted publishing works behind a proxy. The requests that exchange the job's identity token for a publish token ignored http_proxy, https_proxy and no_proxy, so on a runner that can only reach the network through a proxy the exchange never got a token. They now use the same connection settings as every other registry request.
- link: dependencies. A dependency like "foo": "link:../foo", as pnpm, Yarn and Bun accept, used to fail with Unknown spec prefix "link:". It is now installed as an unmanaged link: a symlink to the directory plus its bins. Its dependencies are not installed and its scripts never run, the directory needs no package.json, and a missing directory is linked with a warning. vlt install foo@link:../foo saves the spec as typed, while vlt install ../foo still saves file:../foo.
- npm_config_cafile is supported. Setting npm_config_cafile (or NPM_CONFIG_CAFILE) to a PEM file makes registry connections trust only the certificate authorities in that file, as npm's cafile does, for direct and proxied connections. To add a certificate authority and keep the default ones, NODE_EXTRA_CA_CERTS and NODE_USE_SYSTEM_CA=1 already worked.
- vlt ping pings every configured registry. With two or more registries configured and none of them set as the default, vlt ping failed with "Multiple registries are configured" before it pinged anything. It now pings all of them.
- The registry prompt remembers the last pick. With several registries configured, account and publish commands ask which one to use, and the prompt always pre-selected the default registry. It now pre-selects the registry picked last time in the project. The pick is kept in node_modules/.vlt, so it needs a project that vlt has installed.
- Update notices work with any registry. The check for a new version asked the configured registry, without credentials, so a registry that requires a token never produced a notice. The check now always goes to vlt's public npm mirror, and a failed check is retried after an hour instead of a day.
- Update notices show up in fewer wrong places. The notice is no longer printed while vlt install -g vlt is updating vlt, in the middle of the output of a package script that calls vlt, or by a vlt installed in a project's node_modules. The command it suggests now names the version, vlt install -g vlt@<version>, and an invalid VLT_UPDATE_CHECK_INTERVAL value falls back to the default 24 hours instead of running a check on every command.
- Shorter errors for invalid option values. An invalid value for a known option, like --update-check-interval=0, printed the list of every vlt option. The error now shows only the option and the value it found.
- No EPERM when a cached tarball is evicted on Windows. When a cached tarball no longer matches the lockfile, vlt removes it from the cache and downloads it again. On Windows, that removal could fail the install with an EPERM error.
Try it
You can find every patch note in the GitHub releases. To install or update vlt, run:
Terminal
curl -fsSL https://install.vlt.sh | bashAlready on vlt? Run vlt install -g vlt to update.
Get new posts by email
Deep dives and product updates from the vlt team.