linked static method

Map<String, String> linked(
  1. JustProject project
)

The checkouts project links now, by name → path, from its block.

Implementation

static Map<String, String> linked(JustProject project) {
  final text = project.readText(JustProject.overrides);
  if (text == null) return const {};
  final editor = PubspecEditor.parse(text, marker: ManagedBlock.devLinks);
  return {
    for (final e in editor.managed('dependency_overrides').entries)
      if (e.value case PathDependency(:final path)) e.key: path,
  };
}