-
Notifications
You must be signed in to change notification settings - Fork 252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NuGet outdated, check or equivalent functionality #5762
Comments
Thanks for the PR @AndrewGretton, for the update command that change does look handy. Do you think it would make more sense to have a new command to find outdated packages? My concern here is that |
yes, we'd want this to work for all project types, not just packages.config. |
@nkolev92 I'm posting here to continue the conversation from #3415.
I have a hack week coming up soon, so I should be able to spend some time on implementation then. In the meantime I'm happy to discuss ideas and agree what the functionality should be. It looks like the OP here is suggesting adding a Also, any thoughts on output? This is my inital idea based on
|
@kevinkuszyk A few important things about this feature.
There's lots of other details that we'd need to consider, like the handling of transitive packages in package reference etc. What's the location bit supposed to be? Project?
Another thing is, do we want to display the versions of transitive packages. |
What is 'Wanted'? Who wants it? 😀 |
@anangaur It's the npm nomenclature, didn't think too hard about it :D |
I read it that I have a version constraint, or I've pinned a package to a specific version. In the example above for NUnit:
As @nkolev92 notes, it's inspired by npm. |
@anangaur @nkolev92, fyi, from the npm docs:
For nuget, I see location as the project. If you run HTH. |
I so very much want this. It's the NuGet spiritual "npm check" |
This feature can tied with the deprecation feature: #2867 i.e. the same command should be able to flag the deprecated feature along with the reason why a particular package in use is deprecated - |
And of course this needs linked to the nice deprecated feed I want as its source |
Nice. I was following the dupe PR. I ended up writing a powershell script that just parses packages.config, hits our repo for each package and checks the version there. That being said, could there be an option to specify multiple repo's (as we have private ones with our own packages on there). --repos=repo1.com,repo2.com or would this just read from the config and do all enabled ones by default? |
@blowdart What do you mean by deprecated feed? |
Here is write up on the Spec: Show outdated packages |
@DanWallaceAdslot The |
I don't see a problem with having a --source param on the command. However, we don't recommend having variable sources across NuGet commands (specifically restore). Even with a lock file, using different sources among different commands will lead to a confusing behavior, where the resolved package versions vary because of differences on the feeds (when updating the lock file). There's a use case for --source in this case though. |
Here's an old issue I suggested a while ago (https://github.com/dotnet/cli/issues/7483) ... Please make this happen. It's not really helpful to just show me what's outdated. If you can "just" implement the way yarn does it, it would be awesome.
And more importantly, Also, this for reference: |
@anangaur Sorry, my terminology is all over the place. I was referring to the packageSources inside NuGet.config and was wondering about a filter. Thanks for clearing it up and ignore my comment :) |
related #6848 is about a package being able to declare it has patch releases (with semver semantics). That metadata can be used to automatically roll-forward patch versions, e.g. during the restore operation. |
@kjbetz What you are asking is an |
Some functionality of |
This is great. I would like to have either a function that I can call from my code to get all of this info, or failing that, the data output in an easily machine-readable format I would like sufficient data to calculate the "libyear" metric amongst others |
ETA? |
@derek126 the functionality of outdated is available today with dotnet list package —outdated command. https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-list-package Is this what you are looking for? |
@rrelyea i believe we should close this issue and open another one to track the list functionality outputting a json or other machine readable format. |
Update by @anangaur:
Spec: Show outdated packages (Status: Incubation)
We often find ourselves wishing to do a task during CI, that is only possible with cmdlets available in the package management console. Obviously these cmdlets can't run as part of CI, so we're stuck. Our most recurring painpoint is working out what package updates are available, without actually making modifications - this would let us:
I've submittted a PR with an example naive implementation of this here: NuGet/NuGet.Client#1649
Would others find this type of feature useful?
The text was updated successfully, but these errors were encountered: