Flexible dependency update tool
npm install updates
updates is a CLI tool which checks for dependency updates. It is typically able to complete in less than a second.
- package.json, supported with all npm package managers
- pyproject.toml: supports uv and poetry
- go.mod: supports standard go dependencies
``bashcheck for updates
npx updates
Options
|Option|Description|
|:-|:-|
|
-u, --update|Update versions and write package file|
|-f, --file |File or directory to use, defaults to current directory|
|-i, --include |Include only given packages|
|-e, --exclude |Exclude given packages|
|-p, --prerelease [|Consider prerelease versions|
|-R, --release [|Only use release versions, may downgrade|
|-g, --greatest [|Prefer greatest over latest version|
|-t, --types |Dependency types to update|
|-P, --patch [|Consider only up to semver-patch|
|-m, --minor [|Consider only up to semver-minor|
|-d, --allow-downgrade [|Allow version downgrades when using latest version|
|-C, --cooldown |Minimum package age in days|
|-l, --pin |Pin package to given semver range|
|-E, --error-on-outdated|Exit with code 2 when updates are available and 0 when not|
|-U, --error-on-unchanged|Exit with code 0 when updates are available and 2 when not|
|-r, --registry |Override npm registry URL|
|-S, --sockets |Maximum number of parallel HTTP sockets opened. Default: 96|
|-M, --modes |Which modes to enable. Either npm, pypi, go. Default: npm,pypi,go|
|-j, --json|Output a JSON object|
|-n, --no-color|Disable color output|
|-v, --version|Print the version|
|-V, --verbose|Print verbose output to stderr|
|-h, --help|Print the help|Options that take multiple arguments can take them either via comma-separated value or by specifying the option multiple times. If an option has a optional
pkg argument but none is given, the option will be applied to all packages instead. All pkg options support glob matching via * or regex (on CLI, wrap the regex in slashes, e.g. '/^foo/').Config File
The config file is used to configure certain options of the module. It is placed at
updates.config.{js,ts,mjs,mts} or .config/updates.config.{js,ts,mjs,mts}, relative to package.json / pyproject.toml / go.mod.`ts
import type {Config} from "updates";export default {
exclude: [
"semver",
"@vitejs/*",
/^react(-dom)?$/,
],
pin: {
"typescript": "^5.0.0",
},
} satisfies Config;
`$3
-
include Array\ : Array of packages to include
- exclude Array\ : Array of packages to exclude
- types Array\ : Array of package types to use
- registry string: URL to npm registry
- minAge number: Minimum package age in hours
- pin Record\ : Pin packages to semver rangesCLI arguments have precedence over options in the config file.
include, exclude, and pin` options are merged.© silverwind, distributed under BSD licence