Skip to content

Releasing independently with projects filter creates incorrect git messages #32466

@A-EbrahimRSA

Description

@A-EbrahimRSA

Current Behavior

It seems the current git commit message behaviour doesn't handle independent project versioning and project filtering well.

This situation arises in the following example. If you have Project B =>(dependent on) Project A With the following nx.json configs:

...
"release": {
		"projectsRelationship": "independent",
		"version": {
			"conventionalCommits": true
		},
		...
}

When running nx release --projects=projectA NX will recognise that both Project A and Project B need to be updated. I have just used Conventional Commits in this example, but I assume manually selecting the versions will result in the same outcome.

The following git commit message will be generated:

chore(release): publish

- project: projectA 2.1.0

Expected Behavior

The git commit message for the above scenario should be:

chore(release): publish

- project: projectA 2.1.0

- project: projectB 1.1.0

GitHub Repo

Sorry Private :(

Steps to Reproduce

  1. Create a NX monorepo with at minimum two dependent packages
  2. Use independent project relationships
  3. Run the release command and filter against the parent project

Nx Report

Node           : 22.16.0
OS             : win32-x64
Native Target  : x86_64-windows
npm            : 10.9.2

nx             : 21.4.0
@nx/js         : 21.4.0
@nx/workspace  : 21.4.0
@nx/devkit     : 21.4.0
typescript     : 5.9.2
---------------------------------------
Registered Plugins:
@nx/js/typescript
---------------------------------------
Cache Usage: 0.00 B / 47.15 GB

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

I'm willing to create a PR for this, I think I've identified the issue located roughly in the createCommitMessageValues of shared.ts

export function createCommitMessageValues(

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions