updates/README.md

49 lines
1.6 KiB
Markdown
Raw Permalink Normal View History

2017-12-03 11:15:02 +00:00
# updates
2023-04-18 21:29:08 +00:00
[![](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)
2019-03-07 20:23:03 +00:00
2020-07-14 20:57:33 +00:00
![](./screenshot.png)
2023-06-18 00:08:11 +00:00
`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.
2017-12-03 11:15:02 +00:00
# Usage
2020-04-07 15:43:13 +00:00
```bash
2023-04-18 21:29:08 +00:00
# check for updates
npx updates
2023-04-23 21:45:14 +00:00
# update package.json and install new dependencies
2023-04-18 21:29:08 +00:00
npx updates -u && npm i
```
2023-04-18 21:29:08 +00:00
## Bun and Deno
2020-04-07 15:43:13 +00:00
```bash
2023-04-18 21:29:08 +00:00
bunx updates
deno run -A npm:updates
2019-07-12 14:38:41 +00:00
```
2019-07-12 14:37:24 +00:00
2019-03-07 20:23:03 +00:00
## 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.
2018-09-02 08:35:47 +00:00
## Config File
2023-04-24 16:29:25 +00:00
Put a `updates.config.js` or `updates.config.mjs` in the root of your project, usually besides `package.json` to configure certain options of the module. CLI arguments have precedence over options in the config file.
```js
export default {
exclude: [
2023-04-23 21:33:16 +00:00
"semver",
],
};
2017-12-03 16:05:35 +00:00
```
2017-12-03 11:15:02 +00:00
### Config Options
2023-04-24 16:29:25 +00:00
- `include` *Array<String>*: Array of dependencies to include
- `exclude` *Array<String>*: Array of dependencies to exclude
- `types` *Array<String>*: Array of dependency types
- `registry` *String*: URL to npm registry
2017-12-03 11:15:02 +00:00
© [silverwind](https://github.com/silverwind), distributed under BSD licence