fn package_turbo_json_dirs<'a>(
    repo_root: &AbsoluteSystemPath,
    root_turbo_json_path: AbsoluteSystemPathBuf,
    packages: impl Iterator<Item = (&'a PackageName, &'a PackageInfo)>,
) -> HashMap<PackageName, AbsoluteSystemPathBuf> {
    let mut package_turbo_jsons = HashMap::new();
    package_turbo_jsons.insert(PackageName::Root, root_turbo_json_path);
    package_turbo_jsons.extend(packages.filter_map(|(pkg, info)| {
        if pkg == &PackageName::Root {
            None
        } else {
            Some((pkg.clone(), repo_root.resolve(info.package_path())))
        }
    }));
    package_turbo_jsons
}
Map all packages in the package graph to their dirs that contain a
turbo.json
crates/turborepo-lib/src/turbo_json/loader.rs