dependency_sorter library

Sort your pubspec dependencies alphabetically.

Classes

SortConfig
Which dependency sections of a pubspec should be sorted.
SortResult
The outcome of sorting a pubspec's dependency sections.

Constants

packageVersion → const String
The current package version, kept in sync with pubspec.yaml.

Functions

parseSortConfig(String contents) → SortConfig
Reads the dependency_sorter: config section from pubspec contents.
sortPubspecContents(String contents, SortConfig config) → SortResult
Sorts the enabled dependency sections of a pubspec document.
unifiedDiff({required String path, required List<String> from, required List<String> to, int context = 3}) → String
A minimal unified diff for --diff output.