Skip to content

Commit

Permalink
Remove PackageAnalyzer.inspectVersions() (#1321)
Browse files Browse the repository at this point in the history
  • Loading branch information
isoos authored Jan 23, 2024
1 parent 57e8fe3 commit f0162ea
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 33 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
- deprecated APIs
- `InspectOptions.checkRemoteRepository` - repositories are verified by default
- `PackageAnalyzer.create()`
- `PackageAnalyzer.inspectVersions()`
- `ProcessOutput.asBytes`
- `Report.joinSection()`
- `ToolEnvironment`:
Expand Down
33 changes: 0 additions & 33 deletions lib/src/package_analyzer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -68,39 +68,6 @@ class PackageAnalyzer {
}, logger: logger);
}

Future<List<Summary>> inspectVersions(
String package,
List<String> versions, {
InspectOptions? options,
Logger Function(String version)? loggerFn,
Future<void> Function(String version, String filename, Uint8List data)?
storeResourceFn,
}) async {
final results = <Summary>[];
final sharedContext = _createSharedContext(options: options);
for (final version in versions) {
final summary = await withLogger(
() async {
return withTempDir((tempDir) async {
await downloadPackage(package, version,
destination: tempDir, pubHostedUrl: options!.pubHostedUrl);
return await _inspect(
sharedContext,
tempDir,
storeResource: storeResourceFn == null
? null
: (filename, data) =>
storeResourceFn(version, filename, data),
);
});
},
logger: loggerFn == null ? null : loggerFn(version),
);
results.add(summary);
}
return results;
}

Future<Summary> inspectDir(String packageDir, {InspectOptions? options}) {
final sharedContext = _createSharedContext(options: options);
return withTempDir((tempDir) async {
Expand Down

0 comments on commit f0162ea

Please sign in to comment.