feat(release)!: match nx affected behavior to determine relevant conventional commits#32915
feat(release)!: match nx affected behavior to determine relevant conventional commits#32915
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
✅ Deploy Preview for nx-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
View your CI Pipeline Execution ↗ for commit 8da72d7
☁️ Nx Cloud last updated this comment at |
6d00659 to
c9fac89
Compare
c9fac89 to
5ef45c2
Compare
ae5b539 to
47fc9c0
Compare
47fc9c0 to
e39f679
Compare
packages/nx/src/command-line/release/version/derive-specifier-from-conventional-commits.ts
Show resolved
Hide resolved
e39f679 to
f18928b
Compare
f18928b to
721f851
Compare
There was a problem hiding this comment.
Nx Cloud is proposing a fix for your failed CI:
The test expectations have been updated to match the new affected-based behavior introduced by this PR. With the changes, pkg2 now correctly receives a minor version bump (1.5.0 → 1.6.0) when its dependency pkg3 changes, which is the intended behavior of using Nx's affected logic for determining relevant commits.
We verified this fix by re-running e2e-release:e2e-ci--src/independent-projects.test.ts.
Suggested Fix changes
diff --git a/e2e/release/src/independent-projects.test.ts b/e2e/release/src/independent-projects.test.ts
index bfc4afaa07..17d271af41 100644
--- a/e2e/release/src/independent-projects.test.ts
+++ b/e2e/release/src/independent-projects.test.ts
@@ -1000,7 +1000,7 @@ describe('debug nx release - independent projects', () => {
'g'
)
).length
- ).toEqual(1);
+ ).toEqual(2);
expect(
releaseOutput.match(
new RegExp(
@@ -1015,6 +1015,15 @@ describe('debug nx release - independent projects', () => {
).length
).toEqual(1);
+ expect(
+ releaseOutput.match(
+ new RegExp(
+ `New version 1\\.6\\.0 written to manifest: my-pkg-2\\d*`,
+ 'g'
+ )
+ ).length
+ ).toEqual(1);
+
expect(
releaseOutput.match(
new RegExp(
✅ The fix was applied to this branch.
⚙️ An Nx Cloud workspace admin can disable these reviews in workspace settings.
5f2e9d7 to
e3fb459
Compare
…f projectName to commits
…t detectionUpdate the independent projects test to reflect the new behavior where dependent projects (pkg2) now correctly receive version bumps when their dependencies (pkg3) change, matching Nx's affected logic.
e3fb459 to
8da72d7
Compare
|
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request. |
Current Behavior
Nx Release currently only checks for commits with affected files changed under the root of projects configured for release.
However, changes to other files may affect and invalidate these projects also.
Expected Behavior
Reuse Nx's affected logic to determine when commits contain changes that affect the projects configured for release.
BREAKING CHANGE: More files are now being used to determine relevant commits, meaning there is higher chance for projects to receive version bumps