|
2 роки тому | |
---|---|---|
.. | ||
build | 2 роки тому | |
node_modules | 2 роки тому | |
src | 2 роки тому | |
LICENSE | 2 роки тому | |
README.md | 2 роки тому | |
package.json | 2 роки тому |
Simple update notifier to check for npm updates for cli applications.
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.
npm install simple-update-notifier
OR
yarn add simple-update-notifier
import updateNotifier from 'update-notifier';
import packageJson from './package.json' assert { type: 'json' };
updateNotifier({ pkg: packageJson });
Type: object
Required\
Type: string
Required\
Type: string
Type: number
\
Default: 1000 * 60 * 60 * 24
(1 day)
How often to check for updates.
Type: boolean
\
Default: false
Allows notification to be shown when running as an npm script.
Type: string
\
Default: 'latest'
Which dist-tag to use to find the latest version.