CoolFace
Apppublic

opusdev/vector-similarity-api

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes
1# simple-update-notifier [![GitHub stars](https://img.shields.io/github/stars/alexbrazier/simple-update-notifier?label=Star%20Project&style=social)](https://github.com/alexbrazier/simple-update-notifier/stargazers)2 3[![CI](https://github.com/alexbrazier/simple-update-notifier/workflows/Build%20and%20Deploy/badge.svg)](https://github.com/alexbrazier/simple-update-notifier/actions)4[![Dependencies](https://img.shields.io/librariesio/release/npm/simple-update-notifier)](https://www.npmjs.com/package/simple-update-notifier?activeTab=dependencies)5[![npm](https://img.shields.io/npm/v/simple-update-notifier)](https://www.npmjs.com/package/simple-update-notifier)6[![npm bundle size](https://img.shields.io/bundlephobia/min/simple-update-notifier)](https://bundlephobia.com/result?p=simple-update-notifier)7[![npm downloads](https://img.shields.io/npm/dw/simple-update-notifier)](https://www.npmjs.com/package/simple-update-notifier)8[![License](https://img.shields.io/npm/l/simple-update-notifier)](./LICENSE)9 10Simple update notifier to check for npm updates for cli applications.11 12<img src="./.github/demo.png" alt="Demo in terminal showing an update is required">13 14Checks for updates for an npm module and outputs to the command line if there is one available. The result is cached for the specified time so it doesn't check every time the app runs.15 16## Install17 18```bash19npm install simple-update-notifier20OR21yarn add simple-update-notifier22```23 24## Usage25 26```js27import updateNotifier from 'simple-update-notifier';28import packageJson from './package.json' assert { type: 'json' };29 30updateNotifier({ pkg: packageJson });31```32 33### Options34 35#### pkg36 37Type: `object`38 39##### name40 41_Required_\42Type: `string`43 44##### version45 46_Required_\47Type: `string`48 49#### updateCheckInterval50 51Type: `number`\52Default: `1000 * 60 * 60 * 24` _(1 day)_53 54How often to check for updates.55 56#### shouldNotifyInNpmScript57 58Type: `boolean`\59Default: `false`60 61Allows notification to be shown when running as an npm script.62 63#### distTag64 65Type: `string`\66Default: `'latest'`67 68Which [dist-tag](https://docs.npmjs.com/adding-dist-tags-to-packages) to use to find the latest version.69 70#### alwaysRun71 72Type: `boolean`\73Default: `false`74 75When set, `updateCheckInterval` will not be respected and a check for an update will always be performed.76 77#### debug78 79Type: `boolean`\80Default: `false`81 82When set, logs explaining the decision will be output to `stderr` whenever the module opts to not print an update notification83