Skip to content

Commit

Permalink
chore: temporarily patch nx release to fix nrwl/nx#26949
Browse files Browse the repository at this point in the history
  • Loading branch information
tinesoft committed Jul 19, 2024
1 parent 74b38d5 commit 869e909
Show file tree
Hide file tree
Showing 3 changed files with 112 additions and 56 deletions.
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,5 +92,10 @@
"nx": {
"includedScripts": []
},
"packageManager": "[email protected]+sha512.f549b8a52c9d2b8536762f99c0722205efc5af913e77835dbccc3b0b0b2ca9e7dc8022b78062c17291c48e88749c70ce88eb5a74f1fa8c4bf5e18bb46c8bd83a"
"packageManager": "[email protected]+sha512.f549b8a52c9d2b8536762f99c0722205efc5af913e77835dbccc3b0b0b2ca9e7dc8022b78062c17291c48e88749c70ce88eb5a74f1fa8c4bf5e18bb46c8bd83a",
"pnpm": {
"patchedDependencies": {
"[email protected]": "patches/[email protected]"
}
}
}
46 changes: 46 additions & 0 deletions patches/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
diff --git a/release/changelog-renderer/index.js b/release/changelog-renderer/index.js
index 5b2f41a880933f41856de81b11453c9b27efa733..f4bb0609a3c155fd0dcddfcb6393d888c06cd76c 100644
--- a/release/changelog-renderer/index.js
+++ b/release/changelog-renderer/index.js
@@ -25,10 +25,13 @@ const defaultChangelogRenderer = async ({ projectGraph, changes, releaseVersion,
}
}
}
+
+ let relevantChanges = [];
// workspace root level changelog
if (project === null) {
+ relevantChanges = changes;
// No changes for the workspace
- if (changes.length === 0) {
+ if (relevantChanges.length === 0) {
if (dependencyBumps?.length) {
applyAdditionalDependencyBumps({
markdownLines,
@@ -42,7 +45,7 @@ const defaultChangelogRenderer = async ({ projectGraph, changes, releaseVersion,
}
return markdownLines.join('\n').trim();
}
- const typeGroups = groupBy(changes, 'type');
+ const typeGroups = groupBy(relevantChanges, 'type');
markdownLines.push('', createVersionTitle(releaseVersion, changelogRenderOptions), '');
for (const type of Object.keys(changeTypes)) {
const group = typeGroups[type];
@@ -75,7 +78,7 @@ const defaultChangelogRenderer = async ({ projectGraph, changes, releaseVersion,
}
else {
// project level changelog
- const relevantChanges = changes.filter((c) => c.affectedProjects &&
+ relevantChanges = changes.filter((c) => c.affectedProjects &&
(c.affectedProjects === '*' || c.affectedProjects.includes(project)));
// Generating for a named project, but that project has no relevant changes in the current set of commits, exit early
if (relevantChanges.length === 0) {
@@ -128,7 +131,7 @@ const defaultChangelogRenderer = async ({ projectGraph, changes, releaseVersion,
}
if (changelogRenderOptions.authors) {
const _authors = new Map();
- for (const change of changes) {
+ for (const change of relevantChanges) {
if (!change.author) {
continue;
}
Loading

0 comments on commit 869e909

Please sign in to comment.