nx release version does not propagate changes to release groups with "projectsRelationship": "fixed"
Current Behavior
In the following case -
group (apps) ({ "projectsRelationship": "fixed" }):
- app-one -> depends on shared-util -> depends on math-util
- app-two
group (pacakges) ({ "projectsRelationship": "independent" }):
- shared-util
- math-util
and a changelog is true.
There is a changelog file in .nx/version-plans directory, which specifies to bump math-util.
When running 'nx release version --dry-run', it bumps only app-one and math-util, although app-one and app-two are in the same fixed group.
LOGS:
NX Running release version for project: @org/shared-util
@org/shared-util Resolved the current version as 0.0.1 from manifest: packages/shared-util/package.json
@org/shared-util No changes were detected within version plans
@org/shared-util No changes were detected within version plans
@org/shared-util No changes were detected within version plans
NX Running release version for project: @org/math-util
@org/math-util Resolved the current version as 0.0.1 from manifest: packages/math-util/package.json
@org/math-util ❓ Applied semver relative bump "patch", read from version plan .nx/version-plans/CHANGELOG.md, to get new version 0.0.2
@org/math-util ✍️ New version 0.0.2 written to manifest: packages/math-util/package.json
NX Running release version for project: app-one
app-one Resolved the current version as 1.0.0 from manifest: apps/app-one/package.json
app-one ❓ Applied semver relative bump "patch", because a dependency was bumped, to get new version 1.0.1
app-one ✍️ New version 1.0.1 written to manifest: apps/app-one/package.json
app-one No changes were detected within version plans
NX Running release version for project: app-two
app-two Resolved the current version as 1.0.0 from manifest: apps/app-two/package.json
app-two Skipping versioning for app-two as it is a part of a fixed release group with app-one and no dependency bumps were detected
UPDATE packages/math-util/package.json [dry-run]
"name": "@org/math-util",
- "version": "0.0.1",
+ "version": "0.0.2",
"type": "module",
UPDATE apps/app-one/package.json [dry-run]
"name": "app-one",
- "version": "1.0.0",
+ "version": "1.0.1",
"type": "module",
NX Updating pnpm lock file
NX Staging changed files with git
NOTE: The "dryRun" flag means no changes were made.
Expected Behavior
I would expect that if shared-util and or math-util are mentioned in the changelog, than on nx release version, it will bump both app-one and app-two due to the fact that app-one is affected, and app-two is in the same fixed group as app-one.
GitHub Repo
https://github.com/jonsnow-hub6/testing
Steps to Reproduce
- Clone repo
- Run
pnpm i; pnpm build - Run
nx release version --dry-run - See that only app-one and math-util are being bumped.
Nx Report
Node : 24.13.0
OS : linux-x64
Native Target : x86_64-linux
pnpm : 12.4.2
daemon : Available
nx (global) : 22.6.4
nx : 23.2.1
@nx/js : 23.2.1
typescript : 5.9.3
---------------------------------------
Cache
- Usage: 0.00 B / 6.79 GB (0.0%)
- Location: ~/.nx/1d6eda2852e7f0bd/cacheFailure Logs
Package Manager Version
pnpm 12.4.2
Operating System
- macOS
- Linux
- Windows
- Other (Please specify)
Additional Information
The following issue had a similar bug https://github.com/nrwl/nx/issues/31724. A test coverage was added in this issue but than was closed https://github.com/nrwl/nx/pull/31722/changes
Source: nrwl/nx