vlt v1.8.1: faster repeat installs and bug fixes
vlt v1.8.1 makes vlt install return sooner on a project that is already up to date, and fixes bugs in lockfile installs, vlt pack and semver range comparisons.

- Author
- Published
- Tags
vlt v1.8.1 is out, a maintenance release with bug fixes and more work on install performance. The biggest change is to vlt install on a project that is already up to date. It used to load the installed tree, build the dependency graph from vlt-lock.json and compare the two, only to find nothing to do. vlt install now records what the tree was built from once it is in place, and the next run checks that record first and returns without building any graph.
As for the fixes, a lockfile that is missing one of a package's dependencies no longer installs silently: vlt install and vlt ci stop with an error that names the missing dependency and the vlt update command that repairs it. vlt pack and vlt publish got two fixes for what goes into the tarball, both following what npm does: ! entries in files now exclude paths, and npm's default ignored files are left out at any depth. Finally, @vltpkg/semver no longer reports a prerelease version as intersecting a range it does not satisfy.
Changes
- vlt install returns early on an up-to-date project. Once the tree is in place, vlt install saves a record of its inputs in node_modules/.vlt/state.json: package.json, the workspace manifests, vlt.json, vlt-lock.json, the configuration that shapes the tree and the dependency links of the project and its workspaces. When all of it still matches, the next vlt install prints the same result as before without loading a lockfile or building a graph. Any difference takes the regular path, and so do vlt ci, --frozen-lockfile, --lockfile-only and installs that add a dependency.
- A deleted dependency link is restored. After something like rm node_modules/react, vlt install used to find nothing to do and leave the link missing. The new check notices it and links the dependency again.
- Installs fail when the lockfile is missing a dependency. A vlt-lock.json in which a package had no entry for one of its dependencies installed without that dependency and exited 0, and the gap only showed up later as a Cannot find module error at runtime. vlt install and vlt ci now fail when a package they extract lists a dependency the lockfile does not resolve, the way npm ci refuses a lockfile that is missing a package. node_modules and the lockfile are left as they were, and the error names the vlt update <name> command that rebuilds the missing entries. Optional and bundled dependencies are not checked.
- ! entries in files exclude paths when packing. With "files": ["dist", "!dist/nested"], vlt pack and vlt publish packed src/, test/ and most of the package folder along with dist/. A ! entry now excludes the paths it matches and the last matching entry wins, as in npm, so a later entry can include a path again. vlt deploy uses the same filter and gets the fix too.
- npm's default ignored files are left out at any depth. vlt pack only excluded files such as .DS_Store, .gitignore and .npmignore at the package root, so with "files": ["dist"] a dist/.DS_Store ended up in the tarball. Those rules now apply at any depth and ignore case, as they do in npm, and the npm defaults that vlt was missing were added (.svn, .hg, CVS, *.orig, npm-debug.log and a few more).
- intersects and subset apply the prerelease rule. Both @vltpkg/semver functions compared range bounds only, so intersects('15.5.0-alpha.0', '^15.0.0') returned true although no version satisfies both. They now agree with satisfies and with node-semver. In the CLI, :semver() queries that use intersects or subset and :v() graph modifiers no longer match a prerelease pin outside the range, and a pinned prerelease no longer satisfies a plain peer dependency range.
- vlt ci deletes the old node_modules after the install. With a node_modules already present, vlt ci moved it aside and started deleting it right away in a background process, which competed with the install for disk and CPU. The old tree is now deleted once the new one and its lockfiles are in place. A vlt ci that fails puts the previous node_modules back when it can, and one that is interrupted still cleans up the folder it moved aside.
- Manifests answered by the registry's resolve endpoint are cached. A registry that serves the vlt extensions, like the vlt.io registry, sends the manifests an install needs in one response. Those manifests were never written to the manifest cache, so every later install without a lockfile waited for that response again, and a lookup that raced it fetched the full packument anyway. They are now cached like any other manifest, and the race is gone.
- --libc gets its own manifest cache entries. The manifest cache key included --node-version, --os and --arch but not --libc, so shortly after an install for glibc, a --libc=musl lookup of the same package could be answered with the manifest picked for glibc.
- Less work on every install. Tarballs and packuments are inflated in a single pass instead of 16 KiB at a time, which lowers CPU time on cold installs. When no dependency is allowed to run scripts, the build step visits the project and its workspaces instead of every package, and vlt ci loads vlt-lock.json once instead of twice. Optional packages that are skipped on the current platform, like the @esbuild/* builds for other systems, and scoped packages no longer cost failed filesystem calls, and parsing dependency specs reuses the options it already resolved.
Thanks to @sronix for reporting the semver bug.
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.