sortDependencies function

  1. @visibleForTesting
List<DependencyConfig> sortDependencies(
  1. List<DependencyConfig> it
)

Implementation

@visibleForTesting
List<DependencyConfig> sortDependencies(List<DependencyConfig> it) {
  // sort dependencies alphabetically by all the various attributes that may make them unique
  final deps = it.sortedBy<num>((e) => e.identityHash);
  // sort dependencies by their register order
  final List<DependencyConfig> sorted = [];
  _sortByDependents(deps, sorted);
  // sort dependencies by their orderPosition
  return sorted.sortedBy<num>((e) => e.orderPosition);
}