diff --git a/CHANGELOG.md b/CHANGELOG.md index c49e835df..f474b1c4f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.22.14 + +- Accept `logger` in `PackageAnalyzer.inspectDir` method. + ## 0.22.13 - Pass-through for `formatter/page_width` in `analysis_options.yaml`. diff --git a/lib/src/package_analyzer.dart b/lib/src/package_analyzer.dart index 2476f136c..71dd93430 100644 --- a/lib/src/package_analyzer.dart +++ b/lib/src/package_analyzer.dart @@ -89,14 +89,23 @@ class PackageAnalyzer { }, logger: logger); } - Future inspectDir(String packageDir, {InspectOptions? options}) { + Future inspectDir( + String packageDir, { + InspectOptions? options, + Logger? logger, + }) { final sharedContext = _createSharedContext(options: options); - return withTempDir((tempDir) async { - final rootDir = await _detectGitRoot(packageDir) ?? packageDir; - await copyDir(rootDir, tempDir); - final relativeDir = path.relative(packageDir, from: rootDir); - return await _inspect(sharedContext, path.join(tempDir, relativeDir)); - }); + return withLogger( + logger: logger, + () async { + return withTempDir((tempDir) async { + final rootDir = await _detectGitRoot(packageDir) ?? packageDir; + await copyDir(rootDir, tempDir); + final relativeDir = path.relative(packageDir, from: rootDir); + return await _inspect(sharedContext, path.join(tempDir, relativeDir)); + }); + }, + ); } SharedAnalysisContext _createSharedContext({ diff --git a/lib/src/version.dart b/lib/src/version.dart index 082f85d72..dca859314 100644 --- a/lib/src/version.dart +++ b/lib/src/version.dart @@ -1,2 +1,2 @@ // Generated code. Do not modify. -const packageVersion = '0.22.13'; +const packageVersion = '0.22.14-dev'; diff --git a/pubspec.yaml b/pubspec.yaml index 6cc0d2870..cc0dac41a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: pana description: PAckage aNAlyzer - produce a report summarizing the health and quality of a Dart package. -version: 0.22.13 +version: 0.22.14-dev repository: https://github.com/dart-lang/pana topics: - tool