overridesText static method
The new text of project's pubspec_overrides.yaml with exactly
checkouts in the dev-link block (none removes it).
Implementation
static String overridesText(JustProject project, List<Checkout> checkouts) {
final current = project.readText(JustProject.overrides) ?? '';
final editor = PubspecEditor.parse(current, marker: ManagedBlock.devLinks)
..setManaged('dependency_overrides', {
for (final c in checkouts)
c.name: PathDependency(pathFrom(project, c.path)),
});
return editor.text;
}