You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
vlt install should prioritize registry config changes over existing lockfile #1579
When the registry configuration value is changed (e.g. switching from registry.npmjs.org to a custom/private registry), vlt install should detect the registry change and re-resolve dependencies from the new registry, rather than continuing to use the registry URLs stored in the existing lockfile.
Current Behavior
After changing the registry config, running vlt install continues to use the registry URLs from the existing vlt-lock.json. The only way to switch registries is to delete the entire lockfile and regenerate from scratch.
Expected Behavior
vlt install should detect that the configured registry differs from what the lockfile was built against, and re-resolve dependencies from the new registry. This could be:
Automatic: detect the registry mismatch and re-resolve all affected entries
Prompted: warn the user about the mismatch and offer to re-resolve
Flagged: provide a CLI flag (e.g. --update-registry) to explicitly trigger re-resolution from the new registry
Use Case
Teams migrating between registries (e.g. npm → private registry, or npm → registry.vlt.io) need a clean way to switch without manually rebuilding the entire lockfile. This is especially important for monorepos where the lockfile can be large and complex.
Context
Discovered while working on registry migration in the vlt.io monorepo — changing the registry config required a full lockfile rebuild to take effect.
Adding a verified reproduction from a user-feedback triage (2026-09-11, vlt 1.0.8, behaviour unchanged at current main), since this gap is what forces the Quick Start's "delete your lockfile" step (#1846):
Project with an existing vlt-lock.json built against registry.npmjs.org; switch registries.npm in vlt.json to a local registry (http://127.0.0.1:4899/acme/npm/).
vlt install rewrote options.registries in the lockfile, but every node kept its resolved tarball URL and the client fetched https://registry.npmjs.org/lodash/-/lodash-4.18.1.tgz (confirmed via the registry-client cache .key files). The new registry was never contacted.
For comparison, kept lockfiles migrate cleanly with the other clients: npm has replace-registry-host (on by default) and rewrites the host of resolved URLs at fetch time; pnpm stores no tarball URLs at all. A replace-registry-host-style rewrite at fetch time (map a node's resolved host onto the currently configured registry for that node's registry alias) would cover the migration use case without re-resolving versions, and could be the "automatic" option listed above.
This matters for the vlt.io mirror migration story: switching a vlt project to registry.vlt.io/<account>/npm/ today silently keeps all traffic on npmjs, and fails outright where npmjs is firewalled.
Activity
ruy-bot commentedon Sep 14, 2026
Adding a verified reproduction from a user-feedback triage (2026-09-11, vlt 1.0.8, behaviour unchanged at current
main), since this gap is what forces the Quick Start's "delete your lockfile" step (#1846):vlt-lock.jsonbuilt againstregistry.npmjs.org; switchregistries.npminvlt.jsonto a local registry (http://127.0.0.1:4899/acme/npm/).vlt installrewroteoptions.registriesin the lockfile, but every node kept itsresolvedtarball URL and the client fetchedhttps://registry.npmjs.org/lodash/-/lodash-4.18.1.tgz(confirmed via the registry-client cache.keyfiles). The new registry was never contacted.For comparison, kept lockfiles migrate cleanly with the other clients: npm has
replace-registry-host(on by default) and rewrites the host ofresolvedURLs at fetch time; pnpm stores no tarball URLs at all. Areplace-registry-host-style rewrite at fetch time (map a node'sresolvedhost onto the currently configured registry for that node's registry alias) would cover the migration use case without re-resolving versions, and could be the "automatic" option listed above.This matters for the vlt.io mirror migration story: switching a vlt project to
registry.vlt.io/<account>/npm/today silently keeps all traffic on npmjs, and fails outright where npmjs is firewalled.docs: fix registry migration and CI auth guidance
docs: fix registry migration and CI auth guidance
docs: fix registry migration and CI auth guidance