Skip to content

feat(release)!: match nx affected behavior to determine relevant conventional commits#32915

Merged
Coly010 merged 3 commits intomasterfrom
release/check-commits-for-affected
Oct 3, 2025
Merged

feat(release)!: match nx affected behavior to determine relevant conventional commits#32915
Coly010 merged 3 commits intomasterfrom
release/check-commits-for-affected

Conversation

@Coly010
Copy link
Contributor

@Coly010 Coly010 commented Oct 1, 2025

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

@Coly010 Coly010 requested a review from a team as a code owner October 1, 2025 10:24
@Coly010 Coly010 requested a review from AgentEnder October 1, 2025 10:24
@Coly010 Coly010 self-assigned this Oct 1, 2025
@vercel
Copy link

vercel bot commented Oct 1, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
nx-dev Ready Ready Preview Oct 3, 2025 2:22pm

@netlify
Copy link

netlify bot commented Oct 1, 2025

Deploy Preview for nx-docs ready!

Name Link
🔨 Latest commit 8da72d7
🔍 Latest deploy log https://app.netlify.com/projects/nx-docs/deploys/68dfd7504777b30008093ff5
😎 Deploy Preview https://deploy-preview-32915--nx-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@nx-cloud
Copy link
Contributor

nx-cloud bot commented Oct 1, 2025

View your CI Pipeline Execution ↗ for commit 8da72d7

Command Status Duration Result
nx affected --targets=lint,test,test-kt,build,e... ✅ Succeeded 32m 48s View ↗
nx run-many -t check-imports check-commit check... ✅ Succeeded 1m 58s View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded 2s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 7s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded 6s View ↗
nx documentation ✅ Succeeded 2m 31s View ↗

☁️ Nx Cloud last updated this comment at 2025-10-03 14:41:33 UTC

nx-cloud[bot]

This comment was marked as outdated.

@Coly010 Coly010 force-pushed the release/check-commits-for-affected branch from 6d00659 to c9fac89 Compare October 1, 2025 15:16
@Coly010 Coly010 requested a review from a team as a code owner October 1, 2025 15:16
@Coly010 Coly010 force-pushed the release/check-commits-for-affected branch from c9fac89 to 5ef45c2 Compare October 1, 2025 15:28
@Coly010 Coly010 force-pushed the release/check-commits-for-affected branch 2 times, most recently from ae5b539 to 47fc9c0 Compare October 1, 2025 15:39
@Coly010 Coly010 force-pushed the release/check-commits-for-affected branch from 47fc9c0 to e39f679 Compare October 1, 2025 16:00
nx-cloud[bot]

This comment was marked as outdated.

Copy link
Contributor

@nx-cloud nx-cloud bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Nx CloudView interactive diff ↗


⚙️ An Nx Cloud workspace admin can disable these reviews in workspace settings.

Coly010 and others added 2 commits October 3, 2025 15:00
…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.
@Coly010 Coly010 force-pushed the release/check-commits-for-affected branch from e3fb459 to 8da72d7 Compare October 3, 2025 14:01
@Coly010 Coly010 merged commit a520306 into master Oct 3, 2025
19 checks passed
@Coly010 Coly010 deleted the release/check-commits-for-affected branch October 3, 2025 15:01
@github-actions
Copy link
Contributor

github-actions bot commented Oct 9, 2025

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants