Skip to content

Commit

Permalink
chore(lerna): do not force release a pre release package
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima committed Oct 2, 2024
1 parent aa24e0b commit 3b4c0c4
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
3 changes: 3 additions & 0 deletions lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
"graphType": "dependencies",
"message": "chore: publish",
"changelogPreset": "conventionalcommits"
},
"publish": {
"graphType": "dependencies"
}
},
"packages": ["workspaces/*"],
Expand Down
23 changes: 21 additions & 2 deletions patches/@lerna-lite+core+3.8.0.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/node_modules/@lerna-lite/core/dist/command.js b/node_modules/@lerna-lite/core/dist/command.js
index ad38175..068accc 100644
index ad38175..5a070b3 100644
--- a/node_modules/@lerna-lite/core/dist/command.js
+++ b/node_modules/@lerna-lite/core/dist/command.js
@@ -184,7 +184,8 @@ export class Command {
Expand All @@ -11,4 +11,23 @@ index ad38175..068accc 100644
+ this.packageGraph = new PackageGraph(packages || [], graphType ?? 'allDependencies');
});
}
return chain;
return chain;
diff --git a/node_modules/@lerna-lite/core/dist/utils/collect-updates/collect-updates.js b/node_modules/@lerna-lite/core/dist/utils/collect-updates/collect-updates.js
index 3c56f8a..2285571 100644
--- a/node_modules/@lerna-lite/core/dist/utils/collect-updates/collect-updates.js
+++ b/node_modules/@lerna-lite/core/dist/utils/collect-updates/collect-updates.js
@@ -53,13 +53,9 @@ export function collectUpdates(filteredPackages, packageGraph, execOpts, command
const hasDiff = makeDiffPredicate(committish, execOpts, commandOptions.ignoreChanges, {
independentSubpackages,
});
- const needsBump = !commandOptions.bump || commandOptions.bump.startsWith('pre')
- ? () => false
- :
- (node) => node.prereleaseId;
const isForced = (node, name) => (forced.has('*') || forced.has(name)) && ((useConventionalGraduate ? node.prereleaseId : true) || forceConventionalGraduate);
return collectPackages(packages, {
- isCandidate: (node, name) => isForced(node, name) || needsBump(node) || hasDiff(node),
+ isCandidate: (node, name) => isForced(node, name) || hasDiff(node),
onInclude: (name) => log.verbose('updated', name),
excludeDependents,
});

0 comments on commit 3b4c0c4

Please sign in to comment.