项目作者: silverwind

项目描述 :
Flexible npm dependency update tool
高级语言: JavaScript
项目地址: git://github.com/silverwind/updates.git
创建时间: 2017-12-03T11:18:57Z
项目社区:https://github.com/silverwind/updates

开源协议:BSD 2-Clause "Simplified" License

下载


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:

  1. # check for updates
  2. npx updates
  3. # update package.json and install new dependencies
  4. npx updates -u && npm i

With Bun:

  1. # check for updates
  2. bunx updates
  3. # update package.json and install new dependencies
  4. 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.

  1. export default {
  2. exclude: [
  3. "semver",
  4. "@vitejs/*",
  5. /^react(-dom)?$/,
  6. ],
  7. };

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