updates/README.md

62 lines
1.6 KiB
Markdown
Raw Normal View History

2017-12-03 11:15:02 +00:00
# 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://api.travis-ci.org/silverwind/updates.svg?style=flat)](https://travis-ci.org/silverwind/updates)
2017-12-03 11:36:27 +00:00
> Fast npm dependency updating tool
2017-12-03 11:15:02 +00:00
2017-12-03 13:27:35 +00:00
<p align="center">
2017-12-03 13:33:46 +00:00
<img src="https://i.imgur.com/jBjNoKO.png"/>
2017-12-03 13:27:35 +00:00
</p>
2017-12-03 13:14:30 +00:00
`updates` is a CLI tool which checks for npm dependency updates of the current project and optionally updates `package.json`. It is typically able to complete in less than a second.
2017-12-03 11:15:02 +00:00
2017-12-03 11:38:46 +00:00
## Install
2017-12-03 11:30:39 +00:00
2017-12-03 12:18:53 +00:00
```console
2018-01-16 20:59:59 +00:00
$ npm i -g updates
2017-12-03 11:30:39 +00:00
```
2017-12-03 14:16:59 +00:00
## Examples
2017-12-03 16:08:01 +00:00
### Check for updates
2017-12-03 12:18:53 +00:00
```console
2017-12-03 11:15:56 +00:00
$ updates
NAME OLD NEW
chalk 1.3.0 2.3.0
got ^7.0.1 ^8.0.1
minimist ^1.0.0 ^1.2.0
2017-12-03 14:16:59 +00:00
```
2017-12-03 16:08:01 +00:00
### Update package.json
2017-12-03 14:16:59 +00:00
```console
2017-12-03 11:15:56 +00:00
$ updates -u
NAME OLD NEW
chalk 1.3.0 2.3.0
got ^7.0.1 ^8.0.1
minimist ^1.0.0 ^1.2.0
2018-07-24 17:47:29 +00:00
╭────────────────────────╮
│ package.json updated │
╰────────────────────────╯
2017-12-03 14:16:59 +00:00
```
2017-12-03 16:08:01 +00:00
### JSON Output
2018-06-11 18:04:58 +00:00
`updates` can output JSON. The result is always an object with the key `results` and depending on operation, `message` and `error` properties can also be present.
2017-12-03 16:05:35 +00:00
```console
$ updates -j
{
"results": {
"chalk": {
"old": "1.3.0",
"new": "2.3.0"
},
"got": {
"old": "^7.0.1",
"new": "^8.0.1"
},
"minimist": {
"old": "^1.0.0",
"new": "^1.2.0"
}
2017-12-03 16:05:35 +00:00
}
}
2017-12-03 16:05:35 +00:00
```
2017-12-03 11:15:02 +00:00
© [silverwind](https://github.com/silverwind), distributed under BSD licence