Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nx release version is not correctly updating all of the packages in the dependency graph #29672

Open
2 of 4 tasks
asinning opened this issue Jan 18, 2025 · 1 comment
Open
2 of 4 tasks

Comments

@asinning
Copy link

asinning commented Jan 18, 2025

Current Behavior

nx release version --specifier=patch --projects={some-package-in-dependency-graph} is not correctly recursively updating all of the packages in the dependency graph that depend on the specified project(s).

The project in the repo (https://github.com/asinning/nx-release-version-bug) has the structure:

graph-top

  • dep-a
    • dep-b
      • dep-c
        • dep-d

We would expect nx release version --specifier=patch --projects=dep-d to bump the patch version for all 5 packages in the project; however, it only updates dep-d, dep-c and dep-b.

We would expect nx release version --specifier=patch --projects=dep-c to bump the patch version for all the packages in the project except for dep-d; however, it only updates dep-c, dep-b and dep-a.

We would expect nx release version --specifier=patch --projects=dep-b to bump the patch version for dep-b, dep-a and graph-top, and this is exactly what it does.

Even if we specify three packages in the middle of the graph, we do see the top most package updated. npx nx release version --specifier=patch --projects=dep-a,dep-b,dep-c only updates deps a, b and c.

However, and this is most curious of them all, npx nx release version --specifier=patch --projects=dep-a,dep-b,dep-c,dep-d will update all 5 packages, even though graph-top is not in the list.

In conclusion, it appears that the command nx release version tends to have a depth limit of 2; however, the exact pattern is difficult to determine.

Expected Behavior

I would expect all packages in the repo that are dependent on the specified project to have their patch version bumped.

GitHub Repo

https://github.com/asinning/nx-release-version-bug

Steps to Reproduce

See above, see README in repo https://github.com/asinning/nx-release-version-bug/blob/main/README.md

Nx Report

> npx nx report

 NX   Report complete - copy this into the issue template

Node           : 16.13.1
OS             : win32-x64
Native Target  : x86_64-windows
npm            : 8.1.2

nx             : 20.3.2
@nx/js         : 20.3.2
@nx/workspace  : 20.3.2
@nx/devkit     : 20.3.2
typescript     : 5.6.3
---------------------------------------
Registered Plugins:
@nx/js/typescript

Failure Logs

Package Manager Version

No response

Operating System

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

Additional Information

No response

@asinning asinning changed the title nx release version is not correctly updating all of the packages in the dependency graph nx release version is not correctly updating all of the packages in the dependency graph Jan 19, 2025
@thdk
Copy link
Contributor

thdk commented Jan 23, 2025

@asinning can you check if this is a duplicate of #29375 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants