Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
simple-update-notifier
Advanced tools
Simple update notifier to check for npm updates for cli applications
The simple-update-notifier package is designed to notify users of your Node.js application when a new version of the application is available. It is particularly useful for CLI tools where maintaining the latest version can be crucial for performance, security, or accessing new features.
Version Check and Notification
This feature automatically checks for updates against the npm registry based on the current package version and notifies the user if a newer version is available. The 'pkg' parameter should be the package.json of the application, which includes the version and name.
const simpleUpdateNotifier = require('simple-update-notifier');
simpleUpdateNotifier({pkg});
Similar to simple-update-notifier, update-notifier checks for available updates to npm packages and notifies the user. It provides more extensive configuration options, including custom messages, deferment of notification, and frequency of checks.
While not providing direct user notifications, latest-version allows you to fetch the latest version of any npm package programmatically. This can be used to inform users of updates in a more customized manner compared to simple-update-notifier.
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 'simple-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.
Type: boolean
Default: false
When set, updateCheckInterval
will not be respected and a check for an update will always be performed.
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
FAQs
Simple update notifier to check for npm updates for cli applications
The npm package simple-update-notifier receives a total of 2,592,926 weekly downloads. As such, simple-update-notifier popularity was classified as popular.
We found that simple-update-notifier demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.