Replace Package record with two specialized records for version and version range parsing#6850
Merged
Nigusu-Allehu merged 3 commits intodevfrom Oct 15, 2025
Merged
Conversation
zivkan
reviewed
Oct 11, 2025
zivkan
previously approved these changes
Oct 13, 2025
Member
zivkan
left a comment
There was a problem hiding this comment.
just a few nitpicks, but otherwise it looks fine to me.
nkolev92
reviewed
Oct 13, 2025
Package record with two specialized records for version and version range parsing
jebriede
reviewed
Oct 14, 2025
zivkan
approved these changes
Oct 15, 2025
jeffkl
approved these changes
Oct 15, 2025
This was referenced Nov 6, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
Fixes:
Related: #6804
Description
This PR refactors the
Packagerecord inNuGet.CommandLine.XPlat.Commands.Package.Updateto make it more general-purpose.After this change, there will be two records and can be used by commands that parse inputs of the form
package@version, supporting both exact-version and version-range scenarios. Depending on their purpose, commands can now invoke the appropriate parser (PackagesWithNuGetVersion.ParseorPackagesWithVersionRange.Parse)I have also changed the namespace and location of the record to fit its purpose.
Note: I am doing this to prevent making the
package downloadsupport PR less longer.PR Checklist