From 7ca37bd6c3b6c39cb40c34b5e9ac1824580e6281 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Fri, 15 Sep 2023 09:35:51 -0400 Subject: [PATCH] fix: #12009, check if suggested/current versions are valid --- src/cli/upgrade-plugins.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cli/upgrade-plugins.js b/src/cli/upgrade-plugins.js index e789993388..2c76a6c5b1 100644 --- a/src/cli/upgrade-plugins.js +++ b/src/cli/upgrade-plugins.js @@ -106,7 +106,7 @@ async function checkPlugins() { current = plugins[suggestObj.package]; suggested = suggestObj.version; - if (suggestObj.code === 'match-found' && semver.gt(suggested, current)) { + if (suggestObj.code === 'match-found' && semver.valid(current) && semver.valid(suggested) && semver.gt(suggested, current)) { return { name: suggestObj.package, current: current,