Skip to content

Commit

Permalink
Drop redundant dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
fregante committed Aug 26, 2024
1 parent cb073f0 commit 80f6d9f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
"latest-version": "^9.0.0",
"pupa": "^3.1.0",
"semver": "^7.6.3",
"semver-diff": "^4.0.0",
"xdg-basedir": "^5.1.0"
},
"devDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions update-notifier.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import path from 'node:path';
import {format} from 'node:util';
import ConfigStore from 'configstore';
import chalk from 'chalk';
import semver from 'semver';
import semverDiff from 'semver-diff';
import semverDiff from 'semver/functions/diff';
import semverGt from 'semver/functions/gt'

Check failure on line 9 in update-notifier.js

View workflow job for this annotation

GitHub Actions / Node.js 20

Missing semicolon.

Check failure on line 9 in update-notifier.js

View workflow job for this annotation

GitHub Actions / Node.js 18

Missing semicolon.
import latestVersion from 'latest-version';
import {isNpmOrYarn} from 'is-npm';
import isInstalledGlobally from 'is-installed-globally';
Expand Down Expand Up @@ -126,7 +126,7 @@ export default class UpdateNotifier {

notify(options) {
const suppressForNpm = !this._shouldNotifyInNpmScript && isNpmOrYarn;
if (!process.stdout.isTTY || suppressForNpm || !this.update || !semver.gt(this.update.latest, this.update.current)) {
if (!process.stdout.isTTY || suppressForNpm || !this.update || !semverGt(this.update.latest, this.update.current)) {
return this;
}

Expand Down

0 comments on commit 80f6d9f

Please sign in to comment.