pnpm update
Aliases: up
pnpm update
updates packages to their latest version based on the specified range.
When used without arguments, updates all dopependencies. You can use patterns to update all dependencies that match it.
#
Synopsis#
tl;drCommand | Meaning |
---|---|
pnpm up | updates all dependencies. Adheres ranges specified in package.json |
pnpm up --latest | updates all dependencies. Ignores ranges specified in package.json |
pnpm up [email protected] | updates foo to the latest v2 |
pnpm up @babel/* | updates all dependencies with the @babel scope |
#
Options#
--recursive, -rConcurrently runs update in all subdirectories with a package.json
(excluding node_modules).
Usage examples:
#
--latest, -LAdded in: v3.2.0
Ignores the version range specified in package.json
. Instead, the version specified by the latest
tag will be used (potentially upgrading the packages across major versions).
#
--filter <package_selector>#
--globalUpdate global packages.
#
--workspaceAdded in: v4.4.0
Tries to link all packages from the workspace. Versions are updated to match the versions of packages inside the workspace.
If specific packages are updated, the command will fail if any of the updated
dependencies is not found inside the workspace. For instance, the following
command fails if express
is not a workspace package:
pnpm up -r --workspace express
.
#
--prod, -PUpdate packages only in dependencies
and optionalDependencies
.
#
--dev, -DUpdate packages only in devDependencies
.
#
--no-optionalDon't update packages in optionalDependencies
.
#
--interactive, -iAdded in: v4.8.0
Show outdated dependencies and select which ones to update.