Reputation: 652
Dart: How to determine which pub package is discontinued?
I have a long list of packages. When I run dart pub upgrade
it says that one is discontinued. Is there a command to list which one is discontinued?
Upvotes: 17
Views: 4066
Reputation: 652
Use the following combination of commands:
dart pub upgrade --dry-run | grep discontinued
In the resulting long list of packages from the dart pub upgrade
command, I did not at first notice that "discontinued" is printed in parenthesis inline with the corresponding package. The above command combo will find those lines for you.
It's possible that the discontinued package is not in your direct pubspec packages, but buried deep in their dependencies. In my case, the "pedantic" package is discontinued, and that is still used by many other packages.
[EDIT]
In my original answer, I mixed up and put the incorrect command, which one of the comments references. "outdated" does not return discontinued. I corrected the command above. This was my original incorrect command.
dart pub outdated --show-all | grep discontinued
Upvotes: 25