forked from NuGet/NuGet.Client
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(NuGet#9) Alter filter construction for prereleases
When the prerelease option is included in the outgoing query, a decision is made about including either IsLatestVersion is IsAbsoluteLatestVersion in the query. However, in the case where preelease is true and the feed being queried doesn't support IsAbsoluteLatestVersion, the IsLatestVersion is included in the query. This is deemed as wrong, since it is the exact opposite of what is being asked for. This commit addresses this issue specifically by only including IsLatestVersion when explicitly not asking for prerelease. We believe that this will prevent confusion when folks are using Chocolatey. In addition, when doing the PackageAsync call, when we can't use IsLatestVersion or IsAbsoluteLatestVersion, defer to using a new helper method FindPackageByIdAsync which was introduced in another scope of work, to selectively search for a package given the searchTerm then order by version, and return the highest. This is required, since the query can potentially return more than more result, which is not desired. In order to use this method, it was necessary to further extend the IV2FeedParser to include the method definition.
- Loading branch information
Showing
5 changed files
with
109 additions
and
12 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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