node-modules/npm-updater

Name: npm-updater

Owner: node_modules

Description: Prompt update of npm package

Created: 2015-11-29 09:53:20.0

Updated: 2018-03-16 05:36:19.0

Pushed: 2017-06-19 09:58:51.0

Homepage: null

Size: 22

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

npm-updater

NPM version build status Test coverage David deps Known Vulnerabilities npm download

Check update of npm package.

Installation
m i npm-updater --save
Usage
t updater = require('npm-updater');

ter({
ckage: require('./package.json'),
vel: 'major',
hen(result => {
nsole.log(result.name, result.version, result.current, result.type);

Options

heck 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


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.