fix(release): handle short and full project names in commit scopes#34219
fix(release): handle short and full project names in commit scopes#34219ShwethaSundar wants to merge 2 commits intonrwl:masterfrom
Conversation
👷 Deploy request for nx-docs pending review.Visit the deploys page to approve it
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
3d0e6b8 to
80de2ce
Compare
|
@leosvelperez @Coly010 Could you please review this MR? |
👷 Deploy request for nx-dev pending review.Visit the deploys page to approve it
|
|
@Coly010 @leosvelperez Could I get a review please? |
JamesHenry
left a comment
There was a problem hiding this comment.
@ShwethaSundar I'm a bit uneasy with the ad hoc matching logic here in general... can we please integrate the findMatchingProjects utility that is used throughout most of the nx codebase? It should handle the short name matching consistently with the task runner
fcd64ca to
ea82900
Compare
ea82900 to
b921308
Compare
|
View your CI Pipeline Execution ↗ for commit b410b91
☁️ Nx Cloud last updated this comment at |
There was a problem hiding this comment.
Nx Cloud is proposing a fix for your failed CI:
These changes fix the module resolution error that was causing all e2e-release tests to fail. We corrected the import path from an absolute-style path to a relative path (../../../utils/find-matching-projects), which aligns with the existing import patterns in the file and allows Node.js to properly resolve the module.
Warning
❌ We could not verify this fix.
diff --git a/packages/nx/src/command-line/release/utils/shared.ts b/packages/nx/src/command-line/release/utils/shared.ts
index bc56d46675..347d59b6ed 100644
--- a/packages/nx/src/command-line/release/utils/shared.ts
+++ b/packages/nx/src/command-line/release/utils/shared.ts
@@ -14,7 +14,7 @@ import {
gitCommit,
sanitizeProjectNameForGitTag,
} from './git';
-import { findMatchingProjects } from 'packages/nx/src/utils/find-matching-projects';
+import { findMatchingProjects } from '../../../utils/find-matching-projects';
import { ReleaseGraph } from './release-graph';
export const noDiffInChangelogMessage = pc.yellow(
Because this branch comes from a fork, it is not possible for us to apply fixes directly, but you can apply the changes locally using the available options below.
Apply changes locally with:
npx nx-cloud apply-locally Ih60-sZ3q
Apply fix locally with your editor ↗ View interactive diff ↗
🎓 Learn more about Self-Healing CI on nx.dev
|
@ShwethaSundar just checking you saw the failing CI and suggested fix? |
c452f17 to
56d1363
Compare
yes its fixed. |
Current Behavior
Conventional commit scopes must exactly match the Nx project name.
If a commit uses a short scope (e.g.
commons2) while the project name is fully qualified (e.g.@commons/commons2), the commit is treated as not project-scoped. This causes incorrect semver bumps, sometimes affecting multiple projects.Expected Behavior
Commit scopes should match projects using either:
@commons/commons2)commons2)Related Issue(s)
Fixes #