compare function
Implementation
Future<List<ApiChange>> compare({
required String baseRef,
required String newRef,
required Directory dartRoot,
required Directory gitRoot,
required bool cache,
}) async {
// Load config and determine doc file path
final baseApi = await getRef(ref: baseRef, dartRoot: dartRoot, gitRoot: gitRoot, cache: cache);
final newApi = await getRef(ref: newRef, dartRoot: dartRoot, gitRoot: gitRoot, cache: cache);
final apiChanges = baseApi.components.compareTo(
newApi.components,
);
apiChanges.addAll(baseApi.metadata.compareTo(newApi.metadata));
return apiChanges;
}