- Notifications
You must be signed in to change notification settings - Fork2.6k
Description
Current Behavior
We are using conventional commits and nx to version our project.
For our trunk based development we release versions with an alpha preid vianx release version --preid=alpha --git-commit --git-tag
If we want to make an actual release, we then instead runnx release --skip-publish which creates a "regular version", i.e. without preid.
Right now we can see that the first command does not take into account any new regular tags and keeps bumping the previous alpha tags. This behavior started with the upgrade to nx 22.0.0
E.g. the tags right now look like
1.0.0
1.1.0-alpha.0
1.1.0-alpha.1
1.1.0
1.1.0-alpha.2
1.1.1
1.1.0-alpha.3
...
Expected Behavior
We would expect the same behavior to happen as in v 21.6.8.
E.g. the tags should look like this
1.0.0
1.1.0-alpha.0
1.1.0-alpha.1
1.1.0
1.1.1-alpha.0
1.1.1
1.1.2-alpha.0
...
GitHub Repo
No response
Steps to Reproduce
- Create 3 commits with random changes (feat: test)
- Tag the first commit with the -alpha version (e.g. nx-test-1.0.0-alpha.0)
- Tag the second commit with the regular version (nx-test-2.0.0)
- Run nx
nx release version --preid=alpha --git-commit --git-tag-> incorrectly tries to create version 1.0.0-alpha.1 in package.json - Downgrade to nx v21.6.8 and run step 4 again -> correctly tries to create version 2.1.0-alpha.0 in package.json
Nx Report
Node: 20.19.2OS: darwin-arm64Native Target: aarch64-macospnpm: 10.13.1nx: 22.0.2@nx/js: 22.0.2@nx/linter: 19.8.4@nx/eslint: 19.8.4@nx/workspace: 22.0.2@nx/devkit: 22.0.2@nx/eslint-plugin: 22.0.2typescript: 5.9.3---------------------------------------Registered Plugins:@nx/js@nxlv/python---------------------------------------Community plugins:@nxlv/python: 21.2.0---------------------------------------Cache Usage: 0.00 B / 92.64 GB---------------------------------------The following packages should match the installed version of nx - @nx/linter@19.8.4 - @nx/eslint@19.8.4To fix this, run`nx migrate nx@22.0.2`
Failure Logs
Package Manager Version
pnpm
Operating System
- macOS
- Linux
- Windows
- Other (Please specify)
Additional Information
No response