1. updates
Flexible npm and poetry dependency update tool
updates
Package: updates
Created by: silverwind
Last modified: Mon, 08 Apr 2024 23:54:43 GMT
Version: 16.0.1
License: BSD-2-Clause
Downloads: 27,676
Repository: https://github.com/silverwind/updates

Install

npm install updates
yarn add updates

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
  • updates.config.mjs
  • .config/updates.js
  • .config/updates.mjs

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

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code