NuGet/Home

Machine readable output for 'why' command

Open

#13.649 aperta il 24 lug 2024

Vedi su GitHub
 (1 commento) (2 reazioni) (1 assegnatario)HTML (292 fork)batch import
Functionality:WhyPriority:2Product:dotnet.exeType:Featurehelp wanted

Metriche repository

Star
 (1459 star)
Metriche merge PR
 (Merge medio 464g 23h) (1 PR mergiata in 30 g)

Descrizione

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.

Guida contributor