All Projects → vercel → Update Check

vercel / Update Check

Licence: mit
Minimalistic update notifications for command line interfaces

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Update Check

Nupdate
A comfortable update solution for .NET-applications.
Stars: ✭ 394 (+171.72%)
Mutual labels:  update, package
Inview notifier list
A Flutter package that builds a list view and notifies when the widgets are on screen.
Stars: ✭ 269 (+85.52%)
Mutual labels:  package, notification
Npmvet
A simple CLI tool for vetting npm package versions
Stars: ✭ 193 (+33.1%)
Mutual labels:  package, checker
Django Notifications
GitHub notifications alike app for Django
Stars: ✭ 1,237 (+753.1%)
Mutual labels:  package, notification
Go Fcm
Firebase Cloud Messaging Library for Golang
Stars: ✭ 138 (-4.83%)
Mutual labels:  notification
Laravel Governor
Manage authorization with granular role-based permissions in your Laravel Apps.
Stars: ✭ 131 (-9.66%)
Mutual labels:  package
Xmake Repo
📦 An official xmake package repository
Stars: ✭ 130 (-10.34%)
Mutual labels:  package
Scobot
SCORM API for Content. JavaScript library, QUnit tests and examples.
Stars: ✭ 128 (-11.72%)
Mutual labels:  package
Modern Wasm Starter
🛸 Run C++ code on web and create blazingly fast websites! A starter template to easily create WebAssembly packages using type-safe C++ bindings with automatic TypeScript declarations.
Stars: ✭ 140 (-3.45%)
Mutual labels:  package
Follow Github Organisation
Get notified when a new repository is created in a GitHub organisation
Stars: ✭ 143 (-1.38%)
Mutual labels:  notification
Packagehunter
📥 [Android Library] Hunt down all package information
Stars: ✭ 137 (-5.52%)
Mutual labels:  package
Pip Check
pip-check gives you a quick overview of all installed packages and their update status.
Stars: ✭ 134 (-7.59%)
Mutual labels:  package
Timetable
📅 Customizable flutter calendar widget including day and week views
Stars: ✭ 140 (-3.45%)
Mutual labels:  package
Flutterweekview
Displays a highly customizable week view (or day view) which is able to display events, to be scrolled, to be zoomed-in & out and a lot more !
Stars: ✭ 130 (-10.34%)
Mutual labels:  package
Update
清晰灵活简单易用的应用更新库
Stars: ✭ 1,739 (+1099.31%)
Mutual labels:  update
Elegantota
Push OTAs to ESP8266 or ESP32 Elegantly.
Stars: ✭ 128 (-11.72%)
Mutual labels:  update
Noty
A simple library for creating animated warnings/dialogs/alerts for Android.
Stars: ✭ 136 (-6.21%)
Mutual labels:  notification
Laravel Paket
Composer GUI. Manage Laravel dependencies from web interface without switching to command line!
Stars: ✭ 143 (-1.38%)
Mutual labels:  package
Koukicons flutter
🍪 Colorful Icons for your Flutter App
Stars: ✭ 136 (-6.21%)
Mutual labels:  package
Laravel Messenger
Notifying your users doesn't have to be a lot of work.
Stars: ✭ 135 (-6.9%)
Mutual labels:  package

update-check

npm version install size

This is a very minimal approach to update checking for globally installed packages.

Because it's so simple, the error surface is very tiny and your user's are guaranteed to receive the update message if there's a new version.

You can read more about the reasoning behind this project here.

Usage

Firstly, install the package with yarn...

yarn add update-check

...or npm:

npm install update-check

Next, initialize it.

If there's a new update available, the package will return the content of latest version's package.json file:

const pkg = require('./package');
const checkForUpdate = require('update-check');

let update = null;

try {
	update = await checkForUpdate(pkg);
} catch (err) {
	console.error(`Failed to check for updates: ${err}`);
}

if (update) {
	console.log(`The latest version is ${update.latest}. Please update!`);
}

That's it! You're done.

Configuration

If you want, you can also pass options to customize the package's behavior:

const pkg = require('./package');
const checkForUpdate = require('update-check');

let update = null;

try {
	update = await checkForUpdate(pkg, {
		interval: 3600000,  // For how long to cache latest version (default: 1 day)
		distTag: 'canary'   // A npm distribution tag for comparision (default: 'latest')
	});
} catch (err) {
	console.error(`Failed to check for updates: ${err}`);
}

if (update) {
	console.log(`The latest version is ${update.latest}. Please update!`);
}

Contributing

  1. Fork this repository to your own GitHub account and then clone it to your local device
  2. Link the package to the global module directory: npm link
  3. Within the module you want to test your local development instance of the package, just link it: npm link update-check. Instead of the default one from npm, node will now use your clone.

Author

Leo Lamprecht (@notquiteleo) - ZEIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].