File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 47
47
"latest-version" : " ^9.0.0" ,
48
48
"pupa" : " ^3.1.0" ,
49
49
"semver" : " ^7.6.3" ,
50
- "semver-diff" : " ^4.0.0" ,
51
50
"xdg-basedir" : " ^5.1.0"
52
51
},
53
52
"devDependencies" : {
Original file line number Diff line number Diff line change @@ -5,8 +5,9 @@ import path from 'node:path';
5
5
import { format } from 'node:util' ;
6
6
import ConfigStore from 'configstore' ;
7
7
import chalk from 'chalk' ;
8
- import semver from 'semver' ;
9
- import semverDiff from 'semver-diff' ;
8
+ // Only import what we need for performance
9
+ import semverDiff from 'semver/functions/diff.js' ;
10
+ import semverGt from 'semver/functions/gt.js' ;
10
11
import latestVersion from 'latest-version' ;
11
12
import { isNpmOrYarn } from 'is-npm' ;
12
13
import isInstalledGlobally from 'is-installed-globally' ;
@@ -126,7 +127,7 @@ export default class UpdateNotifier {
126
127
127
128
notify ( options ) {
128
129
const suppressForNpm = ! this . _shouldNotifyInNpmScript && isNpmOrYarn ;
129
- if ( ! process . stdout . isTTY || suppressForNpm || ! this . update || ! semver . gt ( this . update . latest , this . update . current ) ) {
130
+ if ( ! process . stdout . isTTY || suppressForNpm || ! this . update || ! semverGt ( this . update . latest , this . update . current ) ) {
130
131
return this ;
131
132
}
132
133
You can’t perform that action at this time.
0 commit comments