diff --git a/CHANGELOG.md b/CHANGELOG.md index bcd56bb90..a94e6af09 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.22.10 + +- Remove `workspace` and `resolution` properties from pubspec before analyzing. + ## 0.22.9 - Updated suggestion for packages depending on SDK `_macros`. diff --git a/lib/src/sdk_env.dart b/lib/src/sdk_env.dart index d34ad164e..7df02bb72 100644 --- a/lib/src/sdk_env.dart +++ b/lib/src/sdk_env.dart @@ -492,8 +492,16 @@ class ToolEnvironment { } } - /// Removes the dev_dependencies from the pubspec.yaml - /// Adds lower-bound minimal SDK constraint - if missing. + /// Removes aspects of `pubspec.yaml` that are irrelevant when consuming the + /// package. + /// + /// * Removes `dev_dependencies` and `dependency_overrides` These have no + /// effect on the consuming resolution. + /// * Removes `workspace` and `resolution` These have no effect on the + /// consuming resolution, and might prevent the package from resolving on + /// its own. + /// * Adds lower-bound minimal SDK constraint - if missing. + /// /// Returns the backup file with the original content. Future _stripAndAugmentPubspecYaml(String packageDir) async { final now = DateTime.now(); @@ -505,6 +513,8 @@ class ToolEnvironment { final parsed = yamlToJson(original) ?? {}; parsed.remove('dev_dependencies'); parsed.remove('dependency_overrides'); + parsed.remove('workspace'); + parsed.remove('resolution'); // `pub` client checks if pubspec.yaml has no lower-bound SDK constraint, // and throws an exception if it is missing. While we no longer accept diff --git a/lib/src/version.dart b/lib/src/version.dart index 8e979f94c..57f391b89 100644 --- a/lib/src/version.dart +++ b/lib/src/version.dart @@ -1,2 +1,2 @@ // Generated code. Do not modify. -const packageVersion = '0.22.9'; +const packageVersion = '0.22.10'; diff --git a/pubspec.yaml b/pubspec.yaml index e75fbce98..833c5e82a 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.9 +version: 0.22.10 repository: https://github.com/dart-lang/pana topics: - tool