From 80a9321cb4a60ce2716fb6897bc4600d33fa419f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20=C5=BBuber?= Date: Wed, 9 Aug 2023 11:07:59 +0200 Subject: [PATCH 1/2] fix: don't touch packages with 'workspace' set as a package version --- lib/updateDeps.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/updateDeps.js b/lib/updateDeps.js index 3628651..0a073b2 100644 --- a/lib/updateDeps.js +++ b/lib/updateDeps.js @@ -240,7 +240,8 @@ const resolveNextVersion = (currentVersion, nextVersion, strategy = "override", // Check the next pkg version against its current references. // If it matches (`*` matches to any, `1.1.0` matches `1.1.x`, `1.5.0` matches to `^1.0.0` and so on) // release will not be triggered, if not `override` strategy will be applied instead. - if ((strategy === "satisfy" || strategy === "inherit") && semver.satisfies(nextVersion, currentVersion)) { + // If currentVersion has "workspace" inside it means it shouldn't be checked with semver.satisfies as it's covered by yarn's/pnpm's/npm's workspaces versioning + if (currentVersion.includes("workspace") || (strategy === "satisfy" || strategy === "inherit") && semver.satisfies(nextVersion, currentVersion)) { return currentVersion; } From 5b497307a9e4dccb592aefb823a3fe322010c27f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20=C5=BBuber?= Date: Wed, 9 Aug 2023 13:52:45 +0200 Subject: [PATCH 2/2] fix: add parentheses --- lib/updateDeps.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/updateDeps.js b/lib/updateDeps.js index 0a073b2..19c6e63 100644 --- a/lib/updateDeps.js +++ b/lib/updateDeps.js @@ -241,7 +241,7 @@ const resolveNextVersion = (currentVersion, nextVersion, strategy = "override", // If it matches (`*` matches to any, `1.1.0` matches `1.1.x`, `1.5.0` matches to `^1.0.0` and so on) // release will not be triggered, if not `override` strategy will be applied instead. // If currentVersion has "workspace" inside it means it shouldn't be checked with semver.satisfies as it's covered by yarn's/pnpm's/npm's workspaces versioning - if (currentVersion.includes("workspace") || (strategy === "satisfy" || strategy === "inherit") && semver.satisfies(nextVersion, currentVersion)) { + if (currentVersion.includes("workspace") || ((strategy === "satisfy" || strategy === "inherit") && semver.satisfies(nextVersion, currentVersion))) { return currentVersion; }