# hfe-update-pkg

> update deps in package.json

Latest version **2.0.0** (published 2016-06-07) · 0 weekly downloads

## Install

```sh
npm install hfe-update-pkg
pnpm add hfe-update-pkg
yarn add hfe-update-pkg
bun add hfe-update-pkg
```

## 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 | 2.0.0 |
| Published | 2016-06-07 |
| First published | 2016-06-07 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | 薛定谔的猫 |
| Maintainers | zhaoshengdong |
| Keywords | npm, npm update |

## Links

- npm: https://www.npmjs.com/package/hfe-update-pkg
- npm.io page: https://npm.io/package/hfe-update-pkg

## Dependencies (2)

- [select-shell](https://npm.io/package/select-shell.md) ^0.1.1
- [latest-version](https://npm.io/package/latest-version.md) ^2.0.0

## Recent versions

- 2.0.0 (latest) — 2016-06-07
- 1.4.0 — 2016-06-07
- 1.3.0 — 2016-06-07
- 1.1.0 — 2016-06-07
- 1.0.0 — 2016-06-07

## README

# hfe-update-pkg

检查输入的package.json文件中的依赖的最新版本，提示用户升级。

## 安装

使用 [npm](https://npmjs.org) :

```
npm install hfe-update-pkg
```

## 使用:

```js
    var path = require('path');
    var pkg = path.join(__dirname, '/package.json');
    var update = require('hfe-update-pkg');
    update(pkg);
```
## 参数配置:

```js
    // 可选设置
    var cfg = {
        beforeMessage: '正在检查版本更新...',
        tipMessgae: '检测到以下依赖有新版本，请选择是否需要升级：',
        afterMessage: '检查安装版本更新完成。',
        nameFilter: function () {   // 依赖包名称过滤，return true表示检查更新，false表示不检查
            return true;
        },
        cb: function () {
            console.log(this.afterMessage);
            process.stdin.unref();
        }
    };

    update(pkg, cfg);
```

## 协议

MIT

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