update-nodejs-notifier

1.1.1 • Public • Published

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

Package Sidebar

Install

npm i update-nodejs-notifier

Weekly Downloads

73

Version

1.1.1

License

MIT

Last publish

Collaborators

  • jokeyrhyme