NuGet/Home

Machine readable output for 'why' command

Open

#13.649 geöffnet am 24. Juli 2024

Auf GitHub ansehen
 (1 Kommentar) (2 Reaktionen) (1 zugewiesene Person)HTML (292 Forks)batch import
Functionality:WhyPriority:2Product:dotnet.exeType:Featurehelp wanted

Repository-Metriken

Stars
 (1.459 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 464T 23h) (1 gemergte PR in 30 T)

Beschreibung

NuGet Product(s) Affected

dotnet.exe

Current Behavior

The output of the dotnet nuget why command is easily readable for humans but not for machines.

Desired Behavior

Have an optional switch that allows the output to be machine readable from the console output.

Ideas for the output format: json or plain with a delimiter. json

{
  "net472": { },
  "net6.0": [
    {
      "name": "Azure.Core",
      "version": "1.38.0",
      "packages": [
        {
          "name": "System.Text.Json",
          "version": "8.0.3"
        },
        {
          "name": "System.Memory.Data",
          "version": "1.0.2",
          "packages": [
            {
              "name": "System.Text.Json",
              "version": "8.0.3"
            }
          ]
        }
      ]
    }
  ]
}

plain

net472/
net6.0/System.Text.Json:8.0.3
net6.0/Azure.Core:1.38.0/System.Text.Json:8.0.3
net6.0/Azure.Core:1.38.0/System.Memory.Data:1.0.2/System.Text.Json:8.0.3

Additional Context

Following up on issue #13639.

We want to use the results of the dotnet nuget why command in automated reports for our developers. We therefore desire to use the data of the why command programmatically and make several processes easier.

Contributor Guide