Skip to content

Commit 23d6a5e

Browse files
improved messaging around ~ and ^ wildcards
1 parent 7f9112d commit 23d6a5e

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@
5757
"chalk": "5.4.1"
5858
},
5959
"devDependencies": {
60-
"@eslint/js": "^9.31.0",
60+
"@eslint/js": "^9.30.0",
6161
"@types/node": "^24.0.13",
62-
"@typescript-eslint/eslint-plugin": "^8.36.0",
62+
"@typescript-eslint/eslint-plugin": "~8.35.0",
6363
"@typescript-eslint/parser": "*",
6464
"@vitest/coverage-v8": "latest",
6565
"eslint": "9.31.0",

src/core/dependency-checker.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,18 @@ function displayResults(dependencyInfos: DependencyInfo[]): void {
100100
status = chalk.cyan('LATEST TAG');
101101
versionInfo = `${dep.currentVersion}${chalk.cyan(dep.latestVersion)} (actual latest version)`;
102102
} else if (!/^\d+\.\d+\.\d+/.test(dep.currentVersion)) {
103-
status = chalk.blue('VERSION RANGE');
104-
versionInfo = `${dep.currentVersion}${chalk.cyan(dep.latestVersion)} (latest available)`;
103+
// Check if the version range matches the latest version
104+
const isRangeUpToDate = !isVersionOutdated({
105+
current: dep.currentVersion,
106+
latest: dep.latestVersion,
107+
});
108+
if (isRangeUpToDate) {
109+
status = chalk.green('UP TO DATE');
110+
versionInfo = dep.currentVersion;
111+
} else {
112+
status = chalk.blue('VERSION RANGE');
113+
versionInfo = `${dep.currentVersion}${chalk.cyan(dep.latestVersion)} (latest available)`;
114+
}
105115
} else if (dep.isOutdated) {
106116
const updateTypeColor = {
107117
major: chalk.yellow,

0 commit comments

Comments
 (0)