Skip to content

Commit

Permalink
Merge pull request #15 from capricorn86/should-only-update-dependencies
Browse files Browse the repository at this point in the history
fix: [#1] Should only update dependencies when setting workspace version
  • Loading branch information
capricorn86 authored Jan 29, 2024
2 parents bd68ce4 + 9a826f5 commit ba08711
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions bin/happy-set-workspace-version.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
Expand Down

0 comments on commit ba08711

Please sign in to comment.