Skip to content

[rush] Fix an issue where rush add always adds the latest version if ensureConsistentVersions is set in rush.json. #4828

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

Merged
merged 1 commit into from
Jul 10, 2024

Conversation

iclanton
Copy link
Member

Summary

Fixes #4826

Details

The code that determines which version to add uses the ensureConsistentVersions property from the object that is constructed from the common-versions.json file. This was introduced in #4735. This issue was caused by a missed case - the ensureConsistentVersions property of rushConfiguration is marked as @deprecated, but its value wasn't plumbed into the CommonVersionsConfiguration object. This PR uses the rush.json value if a value wasn't provided in common-versions.json

How it was tested

Tested in a repo with a repro, and added unit tests for the CommonVersionsConfiguration change.

Impacted documentation

None.

@iclanton iclanton enabled auto-merge (squash) July 10, 2024 20:31
@octogonz
Copy link
Collaborator

@william2958 FYI

@iclanton iclanton merged commit 27eb138 into microsoft:main Jul 10, 2024
5 checks passed
@iclanton iclanton deleted the fix-rush-add branch July 11, 2024 03:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Closed
Development

Successfully merging this pull request may close these issues.

[rush] rush add adds latest version when repository already has a dependency on the package
2 participants