Go to file
silverwind 1200c572a8
Some checks failed
ci / test ([bun 1], macos-latest) (push) Has been cancelled
ci / test ([bun 1], ubuntu-latest) (push) Has been cancelled
ci / test ([bun 1], windows-latest) (push) Has been cancelled
ci / test ([node 18], macos-latest) (push) Has been cancelled
ci / test ([node 18], ubuntu-latest) (push) Has been cancelled
ci / test ([node 18], windows-latest) (push) Has been cancelled
ci / test ([node 20], macos-latest) (push) Has been cancelled
ci / test ([node 20], ubuntu-latest) (push) Has been cancelled
ci / test ([node 20], windows-latest) (push) Has been cancelled
ci / test ([node 22], macos-latest) (push) Has been cancelled
ci / test ([node 22], ubuntu-latest) (push) Has been cancelled
ci / test ([node 22], windows-latest) (push) Has been cancelled
tweak actions matrix
2024-05-28 00:48:24 +02:00
.github/workflows tweak actions matrix 2024-05-28 00:48:24 +02:00
fixtures add test for dual 2023-09-05 01:03:57 +02:00
snapshots fix snapshots and coerce 2024-05-27 23:44:41 +02:00
.editorconfig misc tweaks 2022-08-25 01:13:46 +02:00
.eslintrc.yaml convert to typescript 2024-05-23 23:53:45 +02:00
.gitattributes convert to typescript 2024-05-23 23:53:45 +02:00
.gitignore add bun to ci 2024-03-16 04:35:45 +01:00
.ignore rename bin dir to dist 2024-03-09 05:51:05 +01:00
.npmrc switch to npm 2021-08-23 09:44:25 +02:00
index.test.ts tweak actions matrix 2024-05-28 00:48:24 +02:00
index.ts fix snapshots and coerce 2024-05-27 23:44:41 +02:00
Makefile convert to typescript 2024-05-23 23:53:45 +02:00
package-lock.json update deps, re-add bun 2024-05-28 00:22:47 +02:00
package.json tweak actions matrix 2024-05-28 00:48:24 +02:00
README.md support typescript config 2024-05-18 00:42:47 +02:00
screenshot.png tweak screenshot 2020-07-14 23:05:32 +02:00
tsconfig.json convert to typescript 2024-05-23 23:53:45 +02:00
updates.config.js pin execa 2024-05-18 00:56:00 +02:00
vite.config.ts Update vite config 2024-05-28 00:19:51 +02:00
vitest.config.ts convert to typescript 2024-05-23 23:53:45 +02:00

updates

updates is a CLI tool which checks for npm and poetry dependency updates of the current project and optionally updates package.json/pyproject.toml. It is highly configurable and is typically able to complete in less than a second.

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. CLI arguments have precedence over options in the config file, except for include and exclude options which are merged.

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

Config File Locations

The config file can be placed in these locations, relative to package.json:

  • updates.config.{js,ts,mjs,mts}
  • .config/updates.{js,ts,mjs,mts}

For typescript, your runtime needs to support it either natively or via a node loader.

Config File 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

© silverwind, distributed under BSD licence