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
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Check update of npm package.
m i npm-updater --save
t updater = require('npm-updater');
ter({
ckage: require('./package.json'),
vel: 'major',
hen(result => {
nsole.log(result.name, result.version, result.current, result.type);
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
Please make sure you pacakge's initial version is bigger than 1.0.0
.
MIT