/ ai-anxieties-audio / node_modules / simple-update-notifier /

[ICO]NameLast modifiedSizeDescription
[PARENTDIR]Parent Directory  -  
[DIR]build/2 years ago -  
[DIR]node_modules/2 years ago -  
[DIR]src/2 years ago -  
[   ]LICENSE2 years ago1.0Kf0d2fc9 test post-receive hook [كارل مبارك]
[TXT]README.md2 years ago2.4K15de0e0 styling, texts [كارل مبارك]
[   ]package.json2 years ago2.4K120707f added node version q18.16 to dependincies [كارل مبارك]
README.md

simple-update-notifier GitHub stars

CI Dependencies npm npm bundle size npm downloads License

Simple update notifier to check for npm updates for cli applications.

Demo in terminal showing an update is required

Checks 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.

Install

npm install simple-update-notifier
OR
yarn add simple-update-notifier

Usage

import updateNotifier from 'simple-update-notifier';
import packageJson from './package.json' assert { type: 'json' };

updateNotifier({ pkg: packageJson });

Options

pkg

Type: object

name

_Required_
Type: string

version

_Required_
Type: string

updateCheckInterval

Type: number
Default: 1000 * 60 * 60 * 24 (1 day)

How often to check for updates.

shouldNotifyInNpmScript

Type: boolean
Default: false

Allows notification to be shown when running as an npm script.

distTag

Type: string
Default: 'latest'

Which dist-tag to use to find the latest version.

alwaysRun

Type: boolean
Default: false

When set, updateCheckInterval will not be respected and a check for an update will always be performed.

debug

Type: boolean
Default: false

When set, logs explaining the decision will be output to stderr whenever the module opts to not print an update notification

Apache/2.4.38 (Debian) Server at www.karls.computer Port 80