cachedPubspec function
Implementation
Pubspec cachedPubspec({String? path}) {
final sourceUrl = p.join(path ?? p.current, 'pubspec.yaml');
return _cachedPubspecs.putIfAbsent(
sourceUrl,
() => Pubspec.parse(File(sourceUrl).readAsStringSync(),
sourceUrl: Uri.parse(sourceUrl)));
}