NuGet / Home

Repo for NuGet Client issues
Other
1.5k stars 253 forks source link

nuget package deprecate API support #13564

Open WeihanLi opened 3 months ago

WeihanLi commented 3 months ago

NuGet Product(s) Involved

NuGet.exe, dotnet.exe, NuGet SDK

The Elevator Pitch

Some packages are deprecated as scheduled, it would be great if we could support package deprecation via API, so that we could automate the deprecation process in automation job/CI etc

Additional Context and Details

No response

nkolev92 commented 3 months ago

@WeihanLi

Are you asking for a CLI addition or an SDK? I see you've selected all options.

WeihanLi commented 3 months ago

@nkolev92 yes, I only know I could operate on nuget.org website, is there an HTTP API for this? In addition to the http API, the CLI/SDK support would be great, we could use the CLI from dotnet SDK easily in a CI step

nkolev92 commented 3 months ago

I wasn't referring to the HTTP API.

CLI = dotnet.exe functionality SDK = NuGet.Protocol package https://www.nuget.org/packages/NuGet.Protocol/6.11.0-preview.2, so that people can implement it individiually.

Sounds like your preference is more about the CLI though, so I'll mark it as such.

WeihanLi commented 3 months ago

Yep, think both SDK and CLI needed, and I suppose the SDK is based on the HTTP API, is it right? Find a little info about vulnerability-info: https://learn.microsoft.com/en-us/nuget/api/vulnerability-info#samples , but seemed had to analyze the whole files, any query parameter to filter by packageId and package version?

nkolev92 commented 3 months ago

Vulnerability info is a static resource, so no query parameters.