NuGet/Home

Machine readable output for 'why' command

Open

#13 649 ouverte le 24 juil. 2024

Voir sur GitHub
 (1 commentaire) (2 réactions) (1 assigné)HTML (292 forks)batch import
Functionality:WhyPriority:2Product:dotnet.exeType:Featurehelp wanted

Métriques du dépôt

Stars
 (1 459 stars)
Métriques de merge PR
 (Merge moyen 464j 23h) (1 PR mergée en 30 j)

Description

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.

Guide contributeur