update-nodejs-notifier

tell your CLI users that their Node.js is old

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
update-nodejs-notifier
1171.1.16 years ago6 years agoMinified + gzip package size for update-nodejs-notifier in KB

Readme

update-nodejs-notifier npm AppVeyor Status Travis CI Status
tell your CLI users that their Node.js is old

Usage

Set and forget. Users will see a notification if their Node.js version needs updating.
This library will make no more than a single HTTP request every 5 days.

Simple example

const { updateNodejsNotifier } = require('update-nodejs-notifier')
updateNodejsNotifier()

Comprehensive example

const { updateNodejsNotifier } = require('update-nodejs-notifier')

updateNodejsNotifier({
  // listed in order of most-severe to least-severe
  // we display the first most-severe matching alert
  // these are the default settings
  notSupported: true, // alert if upstream Node.js support ended
  daysOld: Infinity, // alert if version released this long ago
  stableMajor: true, // alert if MAJOR version older than best "stable"
  stableMinor: false, // alert if MINOR version older than best "stable"
  stablePatch: false, // alert if PATCH version older than best "stable"
})

See Also