depends icon indicating copy to clipboard operation
depends copied to clipboard

Add nuget.org information for dependencies

Open damageboy opened this issue 7 years ago • 4 comments

Would be nice to use the nuget repository for the discovered dependencies to figure out display stuff like:

  • Latest Version (outdated packages)
  • Short descriptions of the nuget dependency

damageboy avatar Jul 04 '18 11:07 damageboy

I really like this project and would like to contribute. Could we come up with a more detailed specification for this issue so I could try my best to implement it?

NikiforovAll avatar Oct 01 '20 21:10 NikiforovAll

@NikiforovAll thanks! Any thoughts on how you would like to implement this? One could just be as simple as opening the package over at nuget.org. Another would be to download the package metadata from the registration URL (https://docs.microsoft.com/en-us/nuget/api/registration-base-url-resource) and display it in a dialogue.

bjorkstromm avatar Oct 06 '20 18:10 bjorkstromm

I think the main goal is to be able to peak at NuGet package without leaving the terminal.

Here is my take on it:

What

We could show next information:

  • items.items[:latest:].description // this gives as latest description of the package
  • items.items[:top5:].catalogEntry.version // latest 5 packages information
  • items.upper: "3.4.1"
  • items.lower: "3.0.0-beta"
  • 🔗 hyperlink to nuget.org (if relevant). Since Windows Terminal 1.4 supports hyperlinks, this would be nice addition.

E.g. https://api.nuget.org/v3/registration3/nuget.server.core/index.json

How

I think we could add another layout that could be toggled when the current dependency comes from NuGet.

image

NikiforovAll avatar Oct 06 '20 19:10 NikiforovAll

@NikiforovAll sounds like you have a great plan! 👍 looking forward to your PR.

Please note we already have a dependency on the NuGet Client libs, so we can easily use the PackageMetadataResource in order to get registration info. More info here https://daveaglick.com/posts/exploring-the-nuget-v3-libraries-part-2 Here also some usage on NuGet Client libs inside Depends https://github.com/mholo65/depends/blob/master/src/Depends.Core/DependencyAnalyzer.cs#L42

bjorkstromm avatar Oct 06 '20 20:10 bjorkstromm