Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jokeyrhyme/update-nodejs-notifier.js
tell your CLI users that their Node.js is old
https://github.com/jokeyrhyme/update-nodejs-notifier.js
cli nodejs
Last synced: 21 days ago
JSON representation
tell your CLI users that their Node.js is old
- Host: GitHub
- URL: https://github.com/jokeyrhyme/update-nodejs-notifier.js
- Owner: jokeyrhyme
- License: mit
- Created: 2016-10-24T23:23:17.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2020-06-02T23:54:26.000Z (over 4 years ago)
- Last Synced: 2024-10-14T21:23:39.029Z (25 days ago)
- Topics: cli, nodejs
- Language: JavaScript
- Size: 163 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# update-nodejs-notifier [![npm](https://img.shields.io/npm/v/update-nodejs-notifier.svg?maxAge=2592000)](https://www.npmjs.com/package/update-nodejs-notifier) [![AppVeyor Status](https://ci.appveyor.com/api/projects/status/094e7unld01so0o7?svg=true)](https://ci.appveyor.com/project/jokeyrhyme/update-nodejs-notifier-js) [![Travis CI Status](https://travis-ci.org/jokeyrhyme/update-nodejs-notifier.js.svg?branch=master)](https://travis-ci.org/jokeyrhyme/update-nodejs-notifier.js)
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
```js
const { updateNodejsNotifier } = require('update-nodejs-notifier')
updateNodejsNotifier()
```### Comprehensive example
```js
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
- [boxen-notify](https://github.com/jokeyrhyme/boxen-notify.js)
- [hsipe](https://github.com/jokeyrhyme/hsipe.js)
- [conf](https://github.com/sindresorhus/conf)
- [package-engines-notifier](https://github.com/jokeyrhyme/package-engines-notifier.js)
- [update-notifier](https://github.com/yeoman/update-notifier)
- [nodejs-support-dates](https://github.com/jokeyrhyme/nodejs-support-dates.js)