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
feat(release): updateDependents generator option for versioning #22836
feat(release): updateDependents generator option for versioning #22836
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
dd88497
to
1c4f962
Compare
…endents when they are being updated
+1 |
@JamesHenry can you please check also the test I was trying to update your test, But I'm not so sure about all snapshots. We are using the There is only one change in navigation, but the
I used this settings.
|
Hi @JamesHenry this would be a great addition to our setup. Any way I can help with this PR, to get it over the line? Thank you! |
Thanks @fotopixel I don't think using that unit test would help with what you are describing. I added a filter to remove any dependency bumps where the newVersion is null, I believe that should take care of the issue you saw. If you get chance to try the PR build again please let me know otherwise I will request final review on this |
@@ -73,6 +73,12 @@ export interface ReleaseVersionGeneratorSchema { | |||
installArgs?: string; | |||
installIgnoreScripts?: boolean; | |||
conventionalCommitsConfig?: NxReleaseConfig['conventionalCommits']; | |||
updateDependents?: { | |||
// "auto" means "only when the dependents are already included in the current batch", and is the default | |||
when?: 'auto' | 'always'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when?: 'auto' | 'always'; | |
when?: 'never' | 'auto'; |
never
is the current behavior. No dependents are updated.
auto
is the new behavior and will remain ambiguous with what we think is best.
We may add more in the future.
// "auto" means "only when the dependents are already included in the current batch", and is the default | ||
when?: 'auto' | 'always'; | ||
// in the case "when" is set to "always", what semver bump should be applied to the dependents which are not included in the current batch | ||
bump?: 'patch' | 'minor' | 'major'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm honestly not sure at this time what should be the logic here. Can we start off with just patch
? We can change the behavior when we have more use cases in mind.
I'm really looking forward to this PR being completed. |
I'm closing this one in favour of #23252 which will have enhanced caching for me directly on origin. We will get this merged very soon |
Current Behavior
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.
Expected Behavior
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.when = always
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.Related Issue(s)
Fixes #22268