You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Nx release in "projectRelationship": "independent" mode is not tagging and releasing projects that depend on projects that are getting published
#22268
Open
1 of 4 tasks
brugi82 opened this issue
Mar 11, 2024
· 4 comments
· May be fixed by #23252
nx release in "projectRelationship": "independent" mode is only tagging and releasing projects with changes. If there are projects that depend on these projects, they are not getting tagged and released.
For example, if we have 2 libraries, is-even and is-odd. is-odd has a dependency on package is-even that is correctly identified by dependency-checkseslint rule, and stated in it's package.json file. When changes are committed to package is-even and nx release is triggered, only that package is tagged for release. is-odd's package.json is getting updated, but the package is not getting released.
We are expecting that with the changes made to the "root" package, release bubbles up to all packages that depend on that package too. In this concrete example, we are expecting that with the changes made to is-even package, nx release not only triggers and tags is-even package, but is-odd package too, as that one directly depends on is-even.
This is also something I just ran into, as an example jscutlery has a --trackDeps flag which enables one to opt in to this behavior. Is there some setting somewhere that we can opt in for nx release that we are missing?
Hey, we're facing the same issue in our repository where the package @jscutlery/swc-angular-preset has implicit dependency + peer dependency on @jscutlery/swc-plugin-angular, yet when we release the swc-angular-preset project it doesn't bump the swc-plugin-angular including the peer dependency update.
Hey @edbzn and @brugi82, Nx Release doesn't update the version of is-odd in this case because it is unclear what the version bump for is-odd should be. Yes, its dependency on is-even was updated, but since they are independently versioned, there is no context for if is-even should be a patch, minor, or major version bump. There could be a major version of is-even released that does not change the core functionality of is-odd, so is-odd wouldn't need a major version bump.
Current Behavior
nx release
in"projectRelationship": "independent"
mode is only tagging and releasing projects with changes. If there are projects that depend on these projects, they are not getting tagged and released.For example, if we have 2 libraries,
is-even
andis-odd
.is-odd
has a dependency on packageis-even
that is correctly identified bydependency-checks
eslint
rule, and stated in it'spackage.json
file. When changes are committed to packageis-even
andnx release
is triggered, only that package is tagged for release.is-odd
'spackage.json
is getting updated, but the package is not getting released.Our
release
configuration fromnx.json
:Expected Behavior
We are expecting that with the changes made to the "root" package,
release
bubbles up to all packages that depend on that package too. In this concrete example, we are expecting that with the changes made tois-even
package,nx release
not only triggers and tagsis-even
package, butis-odd
package too, as that one directly depends onis-even
.GitHub Repo
https://github.com/brugi82/nx-independent-monorepo
Steps to Reproduce
is-odd
depends on packageis-even
.is-even
has one committed change that is not released.nx release --skip-publish --dry-run --verbose
is-even
is getting tagged & released.Nx Report
Failure Logs
No response
Package Manager Version
yarn 4.1.0
Operating System
Additional Information
I am willing to submit a PR that solves this problem.
The text was updated successfully, but these errors were encountered: