Skip to content

Flexible npm and poetry dependency update tool

License

Notifications You must be signed in to change notification settings

silverwind/updates

Folders and files

NameName
Last commit message
Last commit date

Latest commit

85132c1 · Mar 18, 2025
Jul 23, 2024
Jun 1, 2024
Jun 1, 2024
Aug 24, 2022
Dec 9, 2024
Jun 2, 2024
Mar 16, 2024
Mar 9, 2024
Aug 23, 2021
Feb 14, 2025
Jul 23, 2024
Aug 19, 2024
Feb 7, 2025
Mar 18, 2025
Feb 14, 2025
Feb 14, 2025
Jul 14, 2020
Feb 14, 2025
Feb 7, 2025
Aug 10, 2024
May 23, 2024

Repository files navigation

updates

updates is a CLI tool which checks for dependency updates. It is typically able to complete in less than a second. Supported dependencies are:

  • npm via package.json
  • poetry via pyproject.toml
  • go via go.mod (checking only currently, disabled by default when directory is used)

Usage

With Node.js:

# check for updates
npx updates

# update package.json and install new dependencies
npx updates -u && npm i

With Bun:

# check for updates
bunx updates

# update package.json and install new dependencies
bunx updates -u && bun i

Options

See --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 picomatch or regex (on CLI, wrap the regex in slashes, e.g. '/^foo/').

Notes

The module uses global fetch under the hood. In Node.js HTTP proxies from environment are not supported, but it's still possible to enable updates to use them by installing the undici dependency into your project.

Config File

The config file is used to configure certain options of the module. It be placed as updates.config.{js,ts,mjs,mts} or config/updates.config.{js,ts,mjs,mts}, relative to package.json / pyproject.toml / go.mod.

For typescript to work in Node 22.6.0 and above, set NODE_OPTIONS="--experimental-strip-types" in your environment.

export default {
  exclude: [
    "semver",
    "@vitejs/*",
    /^react(-dom)?$/,
  ],
};

Config Options

  • include Array[String|Regexp]: Array of dependencies to include
  • exclude Array[String|Regexp]: Array of dependencies to exclude
  • types Array[String]: Array of dependency types
  • registry String: URL to npm registry

CLI arguments have precedence over options in the config file, except for include and exclude options which are merged.

© silverwind, distributed under BSD licence