vlt / docs

  • PricingBenchmarks (opens in new window)Community (opens in new window)Feedback
  • Overview
  • bugs
  • build
  • cache
  • ci
  • config
  • create
  • deploy
  • docs
  • exec-cache
  • exec-local
  • exec
  • help
  • init
  • install
  • list
  • login
  • logout
  • outdated
  • pack
  • ping
  • pkg
  • publish
  • query
  • registry
  • repo
  • run-exec
  • run
  • setup
  • skills
  • token
  • uninstall
  • update
  • version
  • view
  • whoami
  • Updating some dependencies
  • Examples
  • Options
  • target
  • workspace
  • workspace-group
  • save-config
  • allow-scripts
  • allow-skills
  • Aliases
  1. Client
  2. /
  3. Commands
  4. /
  5. update

vlt update

Usage:

Terminal
$ vlt update
$ vlt update [package ...]
$ vlt update [--target=<query>]

Update dependencies to the newest versions their declared ranges allow, and save them to vlt-lock.json. package.json is not changed.

With no arguments, every dependency is resolved again from scratch. --workspace and --workspace-group limit that to the dependencies of the given workspaces; other workspaces, and the dependencies they share, keep their locked versions.

Updating some dependencies

Package names, or a DSS query selector given to --target, pick the dependencies to update. Only those are resolved again. Everything else keeps its locked version, including the dependencies of an updated package while they still satisfy it.

  • a name matches every locked copy of that dependency, at any depth (an alias by its alias name)
  • a selected package is updated for all of its dependents, within each one's range
  • workspaces and the project root are never selected, and a query that matches nothing changes nothing
  • selectors reading package.json fields (e.g. [name=…], :semver()) need installed packages: run vlt install first
  • names or --target can't be combined with --workspace or --workspace-group: select by workspace in the query instead, e.g. --target=":workspace#a > *"

Examples

Update react and react-dom

Terminal
$ vlt update react react-dom

Update the direct dependencies of the project root

Terminal
$ vlt update --target=":root > *"

Update the dev dependencies of the project root

Terminal
$ vlt update --target=":root > *:dev"

Options

target

DSS query selecting the dependencies to update, in place of package names. Command line or env (VLT_TARGET) only: a target in vlt.json doesn't apply.

Text
--target=<query>

workspace

Limit update to matching workspaces. Others, and deps they share, keep their locked versions.

Text
--workspace=<path|glob>

workspace-group

Limit update to workspace groups. Others, and deps they share, keep their locked versions.

Text
--workspace-group=<name>

save-config

Save registry and git host options given on the command line or via env (e.g. --registries name=url) to the project vlt.json, or the user vlt.json with --config=user.

Text
--save-config

allow-scripts

Filter which packages are allowed to run lifecycle scripts using DSS query syntax.

Text
--allow-scripts=<query>

allow-skills

Link agent skills of packages matching this DSS query into the project's agent skill dirs. Saved to vlt.json.

Text
--allow-skills=<query>

Aliases

Text
u

PreviousuninstallNextversion

On this page

  • Updating some dependencies
  • Examples
  • Options
  • target
  • workspace
  • workspace-group
  • save-config
  • allow-scripts
  • allow-skills
  • Aliases
Edit this page

Deploy your package on vlt.io

Publish scoped and private packages, manage organizations and access, and give every developer and CI environment a consistent source for public and private JavaScript dependencies.

Publish now