From 9a826f52f8b8c05e509a4b413e238d6ea869039b Mon Sep 17 00:00:00 2001 From: David Date: Mon, 29 Jan 2024 11:18:38 +0100 Subject: [PATCH] fix: [#1] Should only update dependencies when setting workspace version --- bin/happy-set-workspace-version.cjs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/bin/happy-set-workspace-version.cjs b/bin/happy-set-workspace-version.cjs index 12ad0bb..f6f6ea9 100755 --- a/bin/happy-set-workspace-version.cjs +++ b/bin/happy-set-workspace-version.cjs @@ -112,13 +112,11 @@ async function main() { workspacePackage.packageJson.version = version; - for (const dependencyType of ['dependencies', 'devDependencies', 'peerDependencies']) { - const dependencies = workspacePackage.packageJson[dependencyType]; - if (dependencies) { - for (const dependency of Object.keys(dependencies)) { - if (workspacePackages[dependency]) { - dependencies[dependency] = dependencies[dependency].replace(VERSION_REGEXP, version); - } + const dependencies = workspacePackage.packageJson.dependencies; + if (dependencies) { + for (const dependency of Object.keys(dependencies)) { + if (workspacePackages[dependency]) { + dependencies[dependency] = dependencies[dependency].replace(VERSION_REGEXP, version); } } }