# npm-updater

> check npm package update

Latest version **3.0.3** (published 2017-06-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install npm-updater
pnpm add npm-updater
yarn add npm-updater
bun add npm-updater
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.3 |
| Published | 2017-06-19 |
| First published | 2015-11-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=4.0.0 |
| Dependencies | 7 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 33 |
| Author | dead-horse |
| Maintainers | atian25, dead_horse |
| Keywords | npm, updater |

## Links

- npm: https://www.npmjs.com/package/npm-updater
- Repository: https://github.com/node-modules/npm-updater
- Homepage: https://github.com/node-modules/npm-updater#readme
- Issues: https://github.com/node-modules/npm-updater/issues
- npm.io page: https://npm.io/package/npm-updater

## Dependencies (7)

- [co](https://npm.io/package/co.md) ^4.6.0
- [chalk](https://npm.io/package/chalk.md) ^1.1.3
- [debug](https://npm.io/package/debug.md) ^2.6.3
- [urllib](https://npm.io/package/urllib.md) ^2.21.2
- [configstore](https://npm.io/package/configstore.md) ^3.0.0
- [humanize-ms](https://npm.io/package/humanize-ms.md) ^1.2.0
- [semver-diff](https://npm.io/package/semver-diff.md) ^2.1.0

## Recent versions

- 3.0.3 (latest) — 2017-06-19
- 3.0.2 — 2017-05-15
- 3.0.1 — 2017-05-03
- 3.0.0 — 2017-03-24
- 2.0.1 — 2017-03-22
- 2.0.0 — 2017-03-22
- 1.2.0 — 2016-11-08
- 1.1.0 — 2015-11-29
- 1.0.2 — 2015-11-29
- 1.0.1 — 2015-11-29
- 1.0.0 — 2015-11-29

## README

# npm-updater

[![NPM version][npm-image]][npm-url]
[![build status][travis-image]][travis-url]
[![Test coverage][codecov-image]][codecov-url]
[![David deps][david-image]][david-url]
[![Known Vulnerabilities][snyk-image]][snyk-url]
[![npm download][download-image]][download-url]

[npm-image]: https://img.shields.io/npm/v/npm-updater.svg?style=flat-square
[npm-url]: https://npmjs.org/package/npm-updater
[travis-image]: https://img.shields.io/travis/node-modules/npm-updater.svg?style=flat-square
[travis-url]: https://travis-ci.org/node-modules/npm-updater
[codecov-image]: https://codecov.io/gh/node-modules/npm-updater/branch/master/graph/badge.svg
[codecov-url]: https://codecov.io/gh/node-modules/npm-updater
[david-image]: https://img.shields.io/david/node-modules/npm-updater.svg?style=flat-square
[david-url]: https://david-dm.org/node-modules/npm-updater
[snyk-image]: https://snyk.io/test/npm/npm-updater/badge.svg?style=flat-square
[snyk-url]: https://snyk.io/test/npm/npm-updater
[download-image]: https://img.shields.io/npm/dm/npm-updater.svg?style=flat-square
[download-url]: https://npmjs.org/package/npm-updater

Check update of npm package.

## Installation

```bash
$ npm i npm-updater --save
```

## Usage

```js
const updater = require('npm-updater');

updater({
  package: require('./package.json'),
  level: 'major',
}).then(result => {
  console.log(result.name, result.version, result.current, result.type);
});
```

### Options

```js
/**
 * check a package lastest version
 * @param {Object} options - query Object
 * @param {Object} options.name - package name, default get from parent package.
 * @param {Object} options.version - package current version, default get from parent package.
 * @param {Object} [options.package] - pass module's `package.json` object
 * @param {String} [options.registry] - publishConfig.registry || npm
 * @param {String} [options.tag] - compare with which tag, default to `latest`.
 * @param {String} [options.interval] - notify interval, default to 1d.
 * @param {Boolean} [options.abort] - If remote version changed, should we abort? default to `true`.
 * @param {String} [options.level] - abort level, default to `minor`.
 * @param {String} [options.updateMessage] - appending update message.
 * @param {Function} [options.formatter] - custom format fn, with args { name, version, current, isAbort, options }.
 * @return {Object} - { name, version, current, type, pkg, options }, type: latest, major, minor, patch, prerelease, build, null
 */
 ```

 ## Notice

Please make sure you pacakge's initial version is bigger than `1.0.0`.

## License

MIT

---
_Source: https://npm.io/package/npm-updater · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
