Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/silverwind/updates
Flexible npm and poetry dependency update tool
https://github.com/silverwind/updates
dependencies dependency-management dependency-updates nodejs npm package-json yarn
Last synced: 6 days ago
JSON representation
Flexible npm and poetry dependency update tool
- Host: GitHub
- URL: https://github.com/silverwind/updates
- Owner: silverwind
- Created: 2017-12-03T11:18:57.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2024-08-21T14:32:29.000Z (about 2 months ago)
- Last Synced: 2024-09-21T17:28:18.640Z (18 days ago)
- Topics: dependencies, dependency-management, dependency-updates, nodejs, npm, package-json, yarn
- Language: JavaScript
- Homepage:
- Size: 6.02 MB
- Stars: 98
- Watchers: 4
- Forks: 8
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-cli-apps - updates - Flexible npm dependency update tool. (Development / Npm)
- fucking-awesome-cli-apps - updates - Flexible npm dependency update tool. (Development / Npm)
- jimsghstars - silverwind/updates - Flexible npm and poetry dependency update tool (JavaScript)
README
# updates
[![](https://img.shields.io/npm/v/updates.svg?style=flat)](https://www.npmjs.org/package/updates) [![](https://img.shields.io/npm/dm/updates.svg)](https://www.npmjs.org/package/updates) [![](https://packagephobia.com/badge?p=updates)](https://packagephobia.com/result?p=updates)![](./screenshot.png)
`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:
```bash
# check for updates
npx updates# update package.json and install new dependencies
npx updates -u && npm i
```With Bun:
```bash
# 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](https://github.com/micromatch/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](https://github.com/nodejs/undici/issues/1650), 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.
```ts
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 registryCLI arguments have precedence over options in the config file, except for `include` and `exclude` options which are merged.
© [silverwind](https://github.com/silverwind), distributed under BSD licence