-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 in "projectRelationship": "independent" mode is not tagging and releasing projects that depend on projects that are getting published #22268
Comments
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? |
Propagate release for all dependant packages that need updating when projectRelationship is "independent" . Fixes nrwl#22268
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 |
The PR to address this is ready for review here: #22836 |
I have the following scenario: With this fix, will it be required for lib-A and lib-B to have its own package.json, even if I don't version/release them? The only versioning/release is for app-A. The |
This will be addressed with #23252 |
…ort circular dependencies (#23252) <!-- Please make sure you have read the submission guidelines before posting an PR --> <!-- https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr --> <!-- Please make sure that your commit message follows our format --> <!-- Example: `fix(nx): must begin with lowercase` --> ## Current Behavior <!-- This is the behavior we have today --> When releasing projects independently, if a dependent project is untouched directly by the changes, it will not have its version updated and there is no way to opt into this behavior. Additionally, circular dependencies between packages are not supported. ## Expected Behavior <!-- This is the behavior we should expect with the changes in this PR --> When releasing projects independently, if a dependent project is untouched directly by the changes, **BY DEFAULT** it will not have its version updated, **BUT** you can opt into it always being updated via a generator option (`release.version.generatorOptions.updateDependents = auto` and you can control what kind of semver bump should be applied to the otherwise unchanged dependent project. Transitive local dependents (`A -> B -> C`) will also be updated in this scenario. Additionally, when opted into, such version only changes will appear in the changelog under a new `Updated Dependencies` section. Circular dependencies between packages are now supported for versioning, changelog generation and publishing. ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes #22268
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
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: