Skip to content

Commit

Permalink
Use package info for dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Rexios80 committed Dec 3, 2023
1 parent f7be696 commit 5a32c5d
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions pub_stats_collector/lib/repo/pub_repo.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,6 @@ class PubRepo {
return;
}

final dependencies = metrics.scorecard.panaReport.allDependencies;
if (dependencies == null) {
print('No dependency report for $package');
return;
}

final likeCount = metrics.score.likeCount;
if (likeCount > mostLikedPackage.$2) {
print('Most liked package: $package');
Expand All @@ -64,6 +58,8 @@ class PubRepo {
final isFlutterFavorite =
metrics.score.tags.contains(PackageTag.isFlutterFavorite);

final info = await _client.packageInfo(package);
final dependencies = info.latestPubspec.allDependencies.keys;
for (final dependency in dependencies) {
dependentMap.update(
dependency,
Expand Down

0 comments on commit 5a32c5d

Please sign in to comment.