Skip to content

Conversation

@Nigusu-Allehu
Copy link
Member

@Nigusu-Allehu Nigusu-Allehu commented Oct 10, 2025

Bug

Fixes:
Related: #6804

Description

This PR refactors the Package record in NuGet.CommandLine.XPlat.Commands.Package.Update to 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.Parse or PackagesWithVersionRange.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 download support PR less longer.

PR Checklist

  • Meaningful title, helpful description and a linked NuGet/Home issue
  • Added tests
  • Link to an issue or pull request to update docs if this PR changes settings, environment variables, new feature, etc.

@Nigusu-Allehu Nigusu-Allehu marked this pull request as ready for review October 10, 2025 22:27
@Nigusu-Allehu Nigusu-Allehu requested a review from a team as a code owner October 10, 2025 22:27
@Nigusu-Allehu Nigusu-Allehu self-assigned this Oct 10, 2025
zivkan
zivkan previously approved these changes Oct 13, 2025
Copy link
Member

@zivkan zivkan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a few nitpicks, but otherwise it looks fine to me.

@Nigusu-Allehu Nigusu-Allehu changed the title Add Exact Version Parser to Xplat.Command.Package.NuGetPackage record Replace Package record with two specialized records for version and version range parsing Oct 13, 2025
@jeffkl jeffkl self-requested a review October 14, 2025 22:20
@Nigusu-Allehu Nigusu-Allehu enabled auto-merge (squash) October 15, 2025 22:36
@Nigusu-Allehu Nigusu-Allehu merged commit 7939812 into dev Oct 15, 2025
17 of 18 checks passed
@Nigusu-Allehu Nigusu-Allehu deleted the dev-nyenework-exact-version branch October 15, 2025 22:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants