Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

update-notifier

Package Overview
Dependencies
Maintainers
9
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

update-notifier - npm Package Compare versions

Comparing version 6.0.2 to 7.0.0

24

package.json
{
"name": "update-notifier",
"version": "6.0.2",
"version": "7.0.0",
"description": "Update notifications for your CLI app",

@@ -16,6 +16,6 @@ "license": "BSD-2-Clause",

"engines": {
"node": ">=14.16"
"node": ">=18"
},
"scripts": {
"test": "xo && ava"
"test": "xo && NODE_OPTIONS='--loader=esmock --no-warnings' ava"
},

@@ -41,14 +41,12 @@ "files": [

"dependencies": {
"boxen": "^7.0.0",
"chalk": "^5.0.1",
"boxen": "^7.1.1",
"chalk": "^5.3.0",
"configstore": "^6.0.0",
"has-yarn": "^3.0.0",
"import-lazy": "^4.0.0",
"is-ci": "^3.0.1",
"is-in-ci": "^0.1.0",
"is-installed-globally": "^0.4.0",
"is-npm": "^6.0.0",
"is-yarn-global": "^0.4.0",
"latest-version": "^7.0.0",
"pupa": "^3.1.0",
"semver": "^7.3.7",
"semver": "^7.5.4",
"semver-diff": "^4.0.0",

@@ -58,8 +56,8 @@ "xdg-basedir": "^5.1.0"

"devDependencies": {
"ava": "^4.3.0",
"ava": "^5.3.1",
"clear-module": "^4.1.2",
"esmock": "^2.5.8",
"fixture-stdout": "^0.2.1",
"mock-require": "^3.0.3",
"strip-ansi": "^7.0.1",
"xo": "^0.50.0"
"strip-ansi": "^7.1.0",
"xo": "^0.56.0"
},

@@ -66,0 +64,0 @@ "ava": {

@@ -130,6 +130,6 @@ # update-notifier

- `latest` _(String)_ - Latest version.
- `current` _(String)_ - Current version.
- `type` _(String)_ - Type of current update. Possible values: `latest`, `major`, `minor`, `patch`, `prerelease`, `build`.
- `name` _(String)_ - Package name.
- `latest` *(string)* - Latest version.
- `current` *(string)* - Current version.
- `type` *(string)* - Type of current update. Possible values: `latest`, `major`, `minor`, `patch`, `prerelease`, `build`.
- `name` *(string)* - Package name.

@@ -195,4 +195,4 @@ ### notifier.notify(options?)

The check is also skipped automatically:
- on CI
- in unit tests (when the `NODE_ENV` environment variable is `test`)
- [in CI](https://github.com/sindresorhus/is-in-ci)
- in unit tests (when the `NODE_ENV` environment variable is `test`)

@@ -214,13 +214,1 @@ ## About

[And 2700+ more…](https://www.npmjs.org/browse/depended/update-notifier)
---
<div align="center">
<b>
<a href="https://tidelift.com/subscription/pkg/npm-update_notifier?utm_source=npm-update-notifier&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
</b>
<br>
<sub>
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
</sub>
</div>

@@ -13,7 +13,5 @@ import process from 'node:process';

import isInstalledGlobally from 'is-installed-globally';
import isYarnGlobal from 'is-yarn-global';
import hasYarn from 'has-yarn';
import boxen from 'boxen';
import {xdgConfig} from 'xdg-basedir';
import isCi from 'is-ci';
import isInCi from 'is-in-ci';
import pupa from 'pupa';

@@ -41,4 +39,4 @@

this.#options = options;
options.pkg = options.pkg || {};
options.distTag = options.distTag || 'latest';
options.pkg = options.pkg ?? {};
options.distTag = options.distTag ?? 'latest';

@@ -48,4 +46,4 @@ // Reduce pkg to the essential keys. with fallback to deprecated options

options.pkg = {
name: options.pkg.name || options.packageName,
version: options.pkg.version || options.packageVersion,
name: options.pkg.name ?? options.packageName,
version: options.pkg.version ?? options.packageVersion,
};

@@ -63,3 +61,3 @@

|| process.argv.includes('--no-update-notifier')
|| isCi;
|| isInCi;
this._shouldNotifyInNpmScript = options.shouldNotifyInNpmScript;

@@ -128,3 +126,3 @@

current: this.#packageVersion,
type: semverDiff(this.#packageVersion, latest) || distTag,
type: semverDiff(this.#packageVersion, latest) ?? distTag,
name: this._packageName,

@@ -142,16 +140,6 @@ };

isGlobal: isInstalledGlobally,
isYarnGlobal: isYarnGlobal(),
...options,
};
let installCommand;
if (options.isYarnGlobal) {
installCommand = `yarn global add ${this._packageName}`;
} else if (options.isGlobal) {
installCommand = `npm i -g ${this._packageName}`;
} else if (hasYarn()) {
installCommand = `yarn add ${this._packageName}`;
} else {
installCommand = `npm i ${this._packageName}`;
}
const installCommand = options.isGlobal ? `npm i -g ${this._packageName}` : `npm i ${this._packageName}`;

@@ -166,3 +154,3 @@ const defaultTemplate = 'Update available '

options.boxenOptions = options.boxenOptions || {
options.boxenOptions ??= {
padding: 1,

@@ -169,0 +157,0 @@ margin: 1,

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc