From e5d79d8db41b65e3b49ae3fde865fee14b2b9ee8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Istv=C3=A1n=20So=C3=B3s?= Date: Fri, 24 May 2024 14:43:15 +0200 Subject: [PATCH] Analyze and report 'pub downgrade' issues. (#1365) --- CHANGELOG.md | 4 ++ lib/src/package_context.dart | 42 +++++++++++ lib/src/report/dependencies.dart | 30 +++++++- lib/src/sdk_env.dart | 69 +++++++------------ lib/src/version.dart | 2 +- pubspec.yaml | 2 +- .../_dummy_pkg-1.0.0-null-safety.1.json | 6 +- ...mmy_pkg-1.0.0-null-safety.1.json_report.md | 21 +++++- test/goldens/end2end/async-2.11.0.json | 10 +-- .../end2end/async-2.11.0.json_report.md | 7 +- .../end2end/audio_service-0.18.10.json | 6 +- .../audio_service-0.18.10.json_report.md | 23 ++++++- test/goldens/end2end/bulma_min-0.7.4.json | 6 +- .../end2end/bulma_min-0.7.4.json_report.md | 24 ++++++- test/goldens/end2end/dnd-2.0.1.json | 10 +-- test/goldens/end2end/dnd-2.0.1.json_report.md | 7 +- test/goldens/end2end/http-0.13.0.json | 10 +-- .../end2end/http-0.13.0.json_report.md | 7 +- test/goldens/end2end/lints-1.0.0.json | 10 +-- .../end2end/lints-1.0.0.json_report.md | 7 +- test/goldens/end2end/mime_type-0.3.2.json | 6 +- .../end2end/mime_type-0.3.2.json_report.md | 24 ++++++- test/goldens/end2end/nsd_android-1.2.2.json | 6 +- .../end2end/nsd_android-1.2.2.json_report.md | 23 ++++++- test/goldens/end2end/onepub-1.1.0.json | 10 +-- .../end2end/onepub-1.1.0.json_report.md | 7 +- test/goldens/end2end/sdp_transform-0.2.0.json | 6 +- .../sdp_transform-0.2.0.json_report.md | 24 ++++++- test/goldens/end2end/skiplist-0.1.0.json | 6 +- .../end2end/skiplist-0.1.0.json_report.md | 24 ++++++- test/goldens/end2end/steward-0.3.1.json | 10 +-- .../end2end/steward-0.3.1.json_report.md | 7 +- test/goldens/end2end/url_launcher-6.1.12.json | 6 +- .../url_launcher-6.1.12.json_report.md | 23 ++++++- test/goldens/end2end/webdriver-3.0.0.json | 10 +-- .../end2end/webdriver-3.0.0.json_report.md | 7 +- test/report/dependencies_test.dart | 12 ++-- 37 files changed, 381 insertions(+), 133 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e59c709f..afe64964b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.22.4 + +- Report and score `pub downgrade` + `dart analyze`. + ## 0.22.3 - Do not emit package names in `allDependencies` with trivial syntax issues. diff --git a/lib/src/package_context.dart b/lib/src/package_context.dart index 137a3a9ea..f6c167277 100644 --- a/lib/src/package_context.dart +++ b/lib/src/package_context.dart @@ -182,6 +182,48 @@ class PackageContext { return errorMessage; }(); + /// Runs `pub downgrade` and then static analysis. + /// Returns `null` when no issues found or a String description of the issues. + late final downgradeAnalysisErrorMessage = () async { + try { + log.info('Analyzing pub downgrade...'); + final tool = usesFlutter ? 'flutter' : 'dart'; + final pr = await toolEnvironment.runPub( + packageDir, + usesFlutter: usesFlutter, + command: 'downgrade', + ); + if (pr.exitCode != 0) { + return '`$tool pub downgrade` failed with:\n\n```\n${pr.asTrimmedOutput}\n```\n'; + } + + final problems = await _staticAnalysis(packageDir: packageDir); + final errors = problems.where((e) => e.isError).toList(); + if (errors.isEmpty) { + // success returning `null` + return null; + } else { + final issueLines = errors + .take(3) + .map((cp) => + ' - `${cp.errorCode}` - `${cp.file}:${cp.line}:${cp.col}` - ${cp.description}\n') + .join(); + final issueLabel = errors.length == 1 ? 'error' : 'errors'; + return 'downgrade analysis failed failed with ${errors.length} $issueLabel:\n\n$issueLines'; + } + } on ToolException catch (e) { + return 'downgrade analysis failed with:\n${e.message}'; + } finally { + try { + await toolEnvironment.runPub(packageDir, + usesFlutter: usesFlutter, command: 'upgrade'); + } on ToolException catch (e, st) { + errors.add('`dart upgrade` failed'); + log.warning('dart upgrade failed', e, st); + } + } + }(); + Future> staticAnalysis() async { if (_codeProblems != null) return _codeProblems!; try { diff --git a/lib/src/report/dependencies.dart b/lib/src/report/dependencies.dart index 646c29cd7..3b50d10e9 100644 --- a/lib/src/report/dependencies.dart +++ b/lib/src/report/dependencies.dart @@ -224,13 +224,39 @@ Future trustworthyDependency(PackageContext context) async { ); } + Future downgrade() async { + final message = await context.downgradeAnalysisErrorMessage; + final isPassed = message == null; + final tool = context.usesFlutter ? 'flutter' : 'dart'; + final issues = isPassed + ? [ + RawParagraph( + '`pub downgrade` does not expose any static analysis error.'), + ] + : [ + Issue(message), + RawParagraph( + 'Run `$tool pub downgrade` and then `$tool analyze` to reproduce the above problem.\n\n' + 'You may run `dart pub upgrade --tighten` to update your dependency constraints, ' + 'or visit http://dart.dev/go/downgrade-testing for further help.'), + ]; + return Subsection( + 'Compatible with dependency constraint lower bounds', + issues, + isPassed ? 20 : 0, + 20, + isPassed ? ReportStatus.passed : ReportStatus.failed, + ); + } + final dependencySection = await dependencies(); final sdkSection = await sdkSupport(); - final subsections = [dependencySection, sdkSection]; + final downgradeSection = await downgrade(); + final subsections = [dependencySection, sdkSection, downgradeSection]; return makeSection( id: ReportSectionId.dependency, title: 'Support up-to-date dependencies', - maxPoints: 20, + maxPoints: subsections.map((e) => e.maxPoints).fold(0, (a, b) => a + b), subsections: subsections, basePath: packageDir, ); diff --git a/lib/src/sdk_env.dart b/lib/src/sdk_env.dart index 1187d6642..048005a71 100644 --- a/lib/src/sdk_env.dart +++ b/lib/src/sdk_env.dart @@ -9,7 +9,6 @@ import 'dart:io'; import 'package:cli_util/cli_util.dart' as cli; import 'package:path/path.dart' as p; import 'package:pub_semver/pub_semver.dart'; -import 'package:retry/retry.dart'; import 'analysis_options.dart'; import 'internal_model.dart'; @@ -305,54 +304,36 @@ class ToolEnvironment { Future runUpgrade( String packageDir, bool usesFlutter, { - int retryCount = 3, + @Deprecated('retryCount is ignored') int retryCount = 3, }) async { - return await _withStripAndAugmentPubspecYaml(packageDir, () async { - final retryOptions = const RetryOptions(maxAttempts: 3); - bool retryIf(PanaProcessResult result) { - final errOutput = result.stderr.asString; - // find cases where retrying is not going to help – and short-circuit - if (errOutput.contains('Could not get versions for flutter from sdk')) { - return false; - } - if (errOutput.contains('FINE: Exception type: NoVersionException')) { - return false; - } - return true; - } + return await runPub( + packageDir, + usesFlutter: usesFlutter, + command: 'upgrade', + ); + } - if (usesFlutter) { - return await runConstrained( - [ + Future runPub( + String packageDir, { + required bool usesFlutter, + required String command, + }) async { + return await _withStripAndAugmentPubspecYaml(packageDir, () async { + return await runConstrained( + [ + if (usesFlutter) ...[ ..._flutterSdk.flutterCmd, 'packages', - 'pub', - 'upgrade', - '--no-example', - '--verbose', - ], - workingDirectory: packageDir, - environment: - usesFlutter ? _flutterSdk.environment : _dartSdk.environment, - retryIf: retryIf, - retryOptions: retryOptions, - ); - } else { - return await runConstrained( - [ + ] else ..._dartSdk.dartCmd, - 'pub', - 'upgrade', - '--no-example', - '--verbose', - ], - workingDirectory: packageDir, - environment: - usesFlutter ? _flutterSdk.environment : _dartSdk.environment, - retryIf: retryIf, - retryOptions: retryOptions, - ); - } + 'pub', + command, + '--no-example', + ], + workingDirectory: packageDir, + environment: + usesFlutter ? _flutterSdk.environment : _dartSdk.environment, + ); }); } diff --git a/lib/src/version.dart b/lib/src/version.dart index 7229db388..840f99dd5 100644 --- a/lib/src/version.dart +++ b/lib/src/version.dart @@ -1,2 +1,2 @@ // Generated code. Do not modify. -const packageVersion = '0.22.3'; +const packageVersion = '0.22.4'; diff --git a/pubspec.yaml b/pubspec.yaml index d5be75d27..10775ef92 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.3 +version: 0.22.4 repository: https://github.com/dart-lang/pana topics: - tool diff --git a/test/goldens/end2end/_dummy_pkg-1.0.0-null-safety.1.json b/test/goldens/end2end/_dummy_pkg-1.0.0-null-safety.1.json index 986b8df12..e3c478a4a 100644 --- a/test/goldens/end2end/_dummy_pkg-1.0.0-null-safety.1.json +++ b/test/goldens/end2end/_dummy_pkg-1.0.0-null-safety.1.json @@ -71,9 +71,9 @@ "id": "dependency", "title": "Support up-to-date dependencies", "grantedPoints": 0, - "maxPoints": 20, + "maxPoints": 40, "status": "failed", - "summary": "### [x] 0/10 points: All of the package dependencies are supported in the latest version\n\n
\n\nSdk constraint doesn't support current Dart version {{sdk-version}}. Cannot run `dart pub outdated`.\n\n\n`pubspec.yaml:6:8`\n\n```\n ╷\n6 │ sdk: \">=2.12.0-0 <2.12.0\"\n │ ^^^^^^^^^^^^^^^^^^^^\n ╵\n```\n\n
\n\n### [x] 0/10 points: Package supports latest stable Dart and Flutter SDKs\n\n
\n\nSdk constraint doesn't support current Dart version {{sdk-version}}.\n\n\n`pubspec.yaml:6:8`\n\n```\n ╷\n6 │ sdk: \">=2.12.0-0 <2.12.0\"\n │ ^^^^^^^^^^^^^^^^^^^^\n ╵\n```\n\nTry widening the upper boundary of the constraint.\n
" + "summary": "### [x] 0/10 points: All of the package dependencies are supported in the latest version\n\n
\n\nSdk constraint doesn't support current Dart version {{sdk-version}}. Cannot run `dart pub outdated`.\n\n\n`pubspec.yaml:6:8`\n\n```\n ╷\n6 │ sdk: \">=2.12.0-0 <2.12.0\"\n │ ^^^^^^^^^^^^^^^^^^^^\n ╵\n```\n\n
\n\n### [x] 0/10 points: Package supports latest stable Dart and Flutter SDKs\n\n
\n\nSdk constraint doesn't support current Dart version {{sdk-version}}.\n\n\n`pubspec.yaml:6:8`\n\n```\n ╷\n6 │ sdk: \">=2.12.0-0 <2.12.0\"\n │ ^^^^^^^^^^^^^^^^^^^^\n ╵\n```\n\nTry widening the upper boundary of the constraint.\n
\n\n### [x] 0/20 points: Compatible with dependency constraint lower bounds\n\n* `dart pub downgrade` failed with:\n\n```\nOUT:\nResolving dependencies...\nERR:\nThe current Dart SDK version is {{sdk-version}}.\n\nBecause _dummy_pkg requires SDK version >=2.12.0-0 <2.12.0, version solving failed.\n```\n\nRun `dart pub downgrade` and then `dart analyze` to reproduce the above problem.\n\nYou may run `dart pub upgrade --tighten` to update your dependency constraints, or visit http://dart.dev/go/downgrade-testing for further help." } ] }, @@ -81,7 +81,7 @@ "result": { "homepageUrl": "https://github.com/dart-lang/pub-dev", "grantedPoints": 15, - "maxPoints": 140 + "maxPoints": 160 }, "urlProblems": [], "errorMessage": "Running `dart pub outdated` failed with the following output:\n\n```\nThe current Dart SDK version is {{sdk-version}}.\nBecause _dummy_pkg requires SDK version >=2.12.0-0 <2.12.0, version solving failed.\n```" diff --git a/test/goldens/end2end/_dummy_pkg-1.0.0-null-safety.1.json_report.md b/test/goldens/end2end/_dummy_pkg-1.0.0-null-safety.1.json_report.md index 261a4db41..854022687 100644 --- a/test/goldens/end2end/_dummy_pkg-1.0.0-null-safety.1.json_report.md +++ b/test/goldens/end2end/_dummy_pkg-1.0.0-null-safety.1.json_report.md @@ -97,7 +97,7 @@ Because _dummy_pkg requires SDK version >=2.12.0-0 <2.12.0, version solving fail ``` -## 0/20 Support up-to-date dependencies +## 0/40 Support up-to-date dependencies ### [x] 0/10 points: All of the package dependencies are supported in the latest version @@ -134,4 +134,21 @@ Sdk constraint doesn't support current Dart version {{sdk-version}}. ``` Try widening the upper boundary of the constraint. - \ No newline at end of file + + +### [x] 0/20 points: Compatible with dependency constraint lower bounds + +* `dart pub downgrade` failed with: + +``` +OUT: +Resolving dependencies... +ERR: +The current Dart SDK version is {{sdk-version}}. + +Because _dummy_pkg requires SDK version >=2.12.0-0 <2.12.0, version solving failed. +``` + +Run `dart pub downgrade` and then `dart analyze` to reproduce the above problem. + +You may run `dart pub upgrade --tighten` to update your dependency constraints, or visit http://dart.dev/go/downgrade-testing for further help. \ No newline at end of file diff --git a/test/goldens/end2end/async-2.11.0.json b/test/goldens/end2end/async-2.11.0.json index 560e1a8a2..fb2533c3b 100644 --- a/test/goldens/end2end/async-2.11.0.json +++ b/test/goldens/end2end/async-2.11.0.json @@ -100,10 +100,10 @@ { "id": "dependency", "title": "Support up-to-date dependencies", - "grantedPoints": 20, - "maxPoints": 20, + "grantedPoints": 40, + "maxPoints": 40, "status": "passed", - "summary": "### [*] 10/10 points: All of the package dependencies are supported in the latest version\n\n|Package|Constraint|Compatible|Latest|\n|:-|:-|:-|:-|\n|[`collection`]|`^1.15.0`|1.18.0|1.18.0|\n|[`meta`]|`^1.1.7`|1.11.0|1.11.0|\n\nTo reproduce run `dart pub outdated --no-dev-dependencies --up-to-date --no-dependency-overrides`.\n\n[`collection`]: https://pub.dev/packages/collection\n[`meta`]: https://pub.dev/packages/meta\n\n\n### [*] 10/10 points: Package supports latest stable Dart and Flutter SDKs\n" + "summary": "### [*] 10/10 points: All of the package dependencies are supported in the latest version\n\n|Package|Constraint|Compatible|Latest|\n|:-|:-|:-|:-|\n|[`collection`]|`^1.15.0`|1.18.0|1.18.0|\n|[`meta`]|`^1.1.7`|1.11.0|1.11.0|\n\nTo reproduce run `dart pub outdated --no-dev-dependencies --up-to-date --no-dependency-overrides`.\n\n[`collection`]: https://pub.dev/packages/collection\n[`meta`]: https://pub.dev/packages/meta\n\n\n### [*] 10/10 points: Package supports latest stable Dart and Flutter SDKs\n\n\n### [*] 20/20 points: Compatible with dependency constraint lower bounds\n\n`pub downgrade` does not expose any static analysis error." } ] }, @@ -118,8 +118,8 @@ "branch": "master" }, "contributingUrl": "https://github.com/dart-lang/async/blob/master/CONTRIBUTING.md", - "grantedPoints": 130, - "maxPoints": 140 + "grantedPoints": 150, + "maxPoints": 160 }, "urlProblems": [] } diff --git a/test/goldens/end2end/async-2.11.0.json_report.md b/test/goldens/end2end/async-2.11.0.json_report.md index 02269d3b8..6cdb6fef4 100644 --- a/test/goldens/end2end/async-2.11.0.json_report.md +++ b/test/goldens/end2end/async-2.11.0.json_report.md @@ -45,7 +45,7 @@ See [package layout](https://dart.dev/tools/pub/package-layout#examples) guideli ### [*] 50/50 points: code has no errors, warnings, lints, or formatting issues -## 20/20 Support up-to-date dependencies +## 40/40 Support up-to-date dependencies ### [*] 10/10 points: All of the package dependencies are supported in the latest version @@ -61,3 +61,8 @@ To reproduce run `dart pub outdated --no-dev-dependencies --up-to-date --no-depe ### [*] 10/10 points: Package supports latest stable Dart and Flutter SDKs + + +### [*] 20/20 points: Compatible with dependency constraint lower bounds + +`pub downgrade` does not expose any static analysis error. \ No newline at end of file diff --git a/test/goldens/end2end/audio_service-0.18.10.json b/test/goldens/end2end/audio_service-0.18.10.json index 0a61c1917..5b7200de7 100644 --- a/test/goldens/end2end/audio_service-0.18.10.json +++ b/test/goldens/end2end/audio_service-0.18.10.json @@ -128,9 +128,9 @@ "id": "dependency", "title": "Support up-to-date dependencies", "grantedPoints": 10, - "maxPoints": 20, + "maxPoints": 40, "status": "failed", - "summary": "### [x] 0/10 points: All of the package dependencies are supported in the latest version\n\n* Could not run `flutter pub outdated`: `flutter pub get` failed:\n\n```\nOUT:\nResolving dependencies...\nERR:\nNote: meta is pinned to version 1.12.0 by flutter_web_plugins from the flutter SDK.\nSee https://dart.dev/go/sdk-version-pinning for details.\n\n\nBecause every version of flutter_web_plugins from sdk depends on meta 1.12.0 which doesn't match any versions, flutter_web_plugins from sdk is forbidden.\nSo, because audio_service depends on flutter_web_plugins from sdk, version solving failed.\n```\n\n### [*] 10/10 points: Package supports latest stable Dart and Flutter SDKs\n" + "summary": "### [x] 0/10 points: All of the package dependencies are supported in the latest version\n\n* Could not run `flutter pub outdated`: `flutter pub get` failed:\n\n```\nOUT:\nResolving dependencies...\nERR:\nNote: meta is pinned to version 1.12.0 by flutter_web_plugins from the flutter SDK.\nSee https://dart.dev/go/sdk-version-pinning for details.\n\n\nBecause every version of flutter_web_plugins from sdk depends on meta 1.12.0 which doesn't match any versions, flutter_web_plugins from sdk is forbidden.\nSo, because audio_service depends on flutter_web_plugins from sdk, version solving failed.\n```\n\n### [*] 10/10 points: Package supports latest stable Dart and Flutter SDKs\n\n\n### [x] 0/20 points: Compatible with dependency constraint lower bounds\n\n* `flutter pub downgrade` failed with:\n\n```\nOUT:\nResolving dependencies...\nERR:\nNote: meta is pinned to version 1.12.0 by flutter_web_plugins from the flutter SDK.\nSee https://dart.dev/go/sdk-version-pinning for details.\n\n\nBecause every version of flutter_web_plugins from sdk depends on meta 1.12.0 which doesn't match any versions, flutter_web_plugins from sdk is forbidden.\nSo, because audio_service depends on flutter_web_plugins from sdk, version solving failed.\n```\n\nRun `flutter pub downgrade` and then `flutter analyze` to reproduce the above problem.\n\nYou may run `dart pub upgrade --tighten` to update your dependency constraints, or visit http://dart.dev/go/downgrade-testing for further help." } ] }, @@ -147,7 +147,7 @@ }, "contributingUrl": "https://github.com/ryanheise/audio_service/blob/minor/CONTRIBUTING.md", "grantedPoints": 50, - "maxPoints": 130 + "maxPoints": 150 }, "urlProblems": [], "errorMessage": "Running `flutter pub outdated` failed with the following output:\n\n```\nNote: meta is pinned to version 1.12.0 by flutter_web_plugins from the flutter SDK.\nSee https://dart.dev/go/sdk-version-pinning for details.\n```" diff --git a/test/goldens/end2end/audio_service-0.18.10.json_report.md b/test/goldens/end2end/audio_service-0.18.10.json_report.md index a8e191703..f090f61a2 100644 --- a/test/goldens/end2end/audio_service-0.18.10.json_report.md +++ b/test/goldens/end2end/audio_service-0.18.10.json_report.md @@ -42,7 +42,7 @@ See https://dart.dev/go/sdk-version-pinning for details. ``` -## 10/20 Support up-to-date dependencies +## 10/40 Support up-to-date dependencies ### [x] 0/10 points: All of the package dependencies are supported in the latest version @@ -61,3 +61,24 @@ So, because audio_service depends on flutter_web_plugins from sdk, version solvi ``` ### [*] 10/10 points: Package supports latest stable Dart and Flutter SDKs + + +### [x] 0/20 points: Compatible with dependency constraint lower bounds + +* `flutter pub downgrade` failed with: + +``` +OUT: +Resolving dependencies... +ERR: +Note: meta is pinned to version 1.12.0 by flutter_web_plugins from the flutter SDK. +See https://dart.dev/go/sdk-version-pinning for details. + + +Because every version of flutter_web_plugins from sdk depends on meta 1.12.0 which doesn't match any versions, flutter_web_plugins from sdk is forbidden. +So, because audio_service depends on flutter_web_plugins from sdk, version solving failed. +``` + +Run `flutter pub downgrade` and then `flutter analyze` to reproduce the above problem. + +You may run `dart pub upgrade --tighten` to update your dependency constraints, or visit http://dart.dev/go/downgrade-testing for further help. \ No newline at end of file diff --git a/test/goldens/end2end/bulma_min-0.7.4.json b/test/goldens/end2end/bulma_min-0.7.4.json index b5c298736..200bbeb76 100644 --- a/test/goldens/end2end/bulma_min-0.7.4.json +++ b/test/goldens/end2end/bulma_min-0.7.4.json @@ -72,9 +72,9 @@ "id": "dependency", "title": "Support up-to-date dependencies", "grantedPoints": 0, - "maxPoints": 20, + "maxPoints": 40, "status": "failed", - "summary": "### [x] 0/10 points: All of the package dependencies are supported in the latest version\n\n
\n\nSdk constraint doesn't support current Dart version {{sdk-version}}. Cannot run `dart pub outdated`.\n\n\n`pubspec.yaml:8:8`\n\n```\n ╷\n8 │ sdk: '>=1.0.0 <3.0.0'\n │ ^^^^^^^^^^^^^^^^\n ╵\n```\n\n
\n\n### [x] 0/10 points: Package supports latest stable Dart and Flutter SDKs\n\n
\n\nSdk constraint doesn't support current Dart version {{sdk-version}}.\n\n\n`pubspec.yaml:8:8`\n\n```\n ╷\n8 │ sdk: '>=1.0.0 <3.0.0'\n │ ^^^^^^^^^^^^^^^^\n ╵\n```\n\nTry widening the upper boundary of the constraint.\n
" + "summary": "### [x] 0/10 points: All of the package dependencies are supported in the latest version\n\n
\n\nSdk constraint doesn't support current Dart version {{sdk-version}}. Cannot run `dart pub outdated`.\n\n\n`pubspec.yaml:8:8`\n\n```\n ╷\n8 │ sdk: '>=1.0.0 <3.0.0'\n │ ^^^^^^^^^^^^^^^^\n ╵\n```\n\n
\n\n### [x] 0/10 points: Package supports latest stable Dart and Flutter SDKs\n\n
\n\nSdk constraint doesn't support current Dart version {{sdk-version}}.\n\n\n`pubspec.yaml:8:8`\n\n```\n ╷\n8 │ sdk: '>=1.0.0 <3.0.0'\n │ ^^^^^^^^^^^^^^^^\n ╵\n```\n\nTry widening the upper boundary of the constraint.\n
\n\n### [x] 0/20 points: Compatible with dependency constraint lower bounds\n\n* `dart pub downgrade` failed with:\n\n```\nOUT:\nResolving dependencies...\nERR:\nThe lower bound of \"sdk: '>=1.0.0 <3.0.0'\" must be 2.12.0'\nor higher to enable null safety.\n\nThe current Dart SDK (3.4.0) only supports null safety.\n\nFor details, see https://dart.dev/null-safety\n```\n\nRun `dart pub downgrade` and then `dart analyze` to reproduce the above problem.\n\nYou may run `dart pub upgrade --tighten` to update your dependency constraints, or visit http://dart.dev/go/downgrade-testing for further help." } ] }, @@ -89,7 +89,7 @@ "branch": "master" }, "grantedPoints": 30, - "maxPoints": 130 + "maxPoints": 150 }, "urlProblems": [], "errorMessage": "Running `dart pub outdated` failed with the following output:\n\n```\nThe lower bound of \"sdk: '>=1.0.0 <3.0.0'\" must be 2.12.0'\nor higher to enable null safety.\n```" diff --git a/test/goldens/end2end/bulma_min-0.7.4.json_report.md b/test/goldens/end2end/bulma_min-0.7.4.json_report.md index 97d6584bb..e745e63d7 100644 --- a/test/goldens/end2end/bulma_min-0.7.4.json_report.md +++ b/test/goldens/end2end/bulma_min-0.7.4.json_report.md @@ -49,7 +49,7 @@ or higher to enable null safety. ``` -## 0/20 Support up-to-date dependencies +## 0/40 Support up-to-date dependencies ### [x] 0/10 points: All of the package dependencies are supported in the latest version @@ -86,4 +86,24 @@ Sdk constraint doesn't support current Dart version {{sdk-version}}. ``` Try widening the upper boundary of the constraint. - \ No newline at end of file + + +### [x] 0/20 points: Compatible with dependency constraint lower bounds + +* `dart pub downgrade` failed with: + +``` +OUT: +Resolving dependencies... +ERR: +The lower bound of "sdk: '>=1.0.0 <3.0.0'" must be 2.12.0' +or higher to enable null safety. + +The current Dart SDK (3.4.0) only supports null safety. + +For details, see https://dart.dev/null-safety +``` + +Run `dart pub downgrade` and then `dart analyze` to reproduce the above problem. + +You may run `dart pub upgrade --tighten` to update your dependency constraints, or visit http://dart.dev/go/downgrade-testing for further help. \ No newline at end of file diff --git a/test/goldens/end2end/dnd-2.0.1.json b/test/goldens/end2end/dnd-2.0.1.json index e06c7c8ab..944760902 100644 --- a/test/goldens/end2end/dnd-2.0.1.json +++ b/test/goldens/end2end/dnd-2.0.1.json @@ -84,10 +84,10 @@ { "id": "dependency", "title": "Support up-to-date dependencies", - "grantedPoints": 20, - "maxPoints": 20, + "grantedPoints": 40, + "maxPoints": 40, "status": "passed", - "summary": "### [*] 10/10 points: All of the package dependencies are supported in the latest version\n\nNo dependencies.\n\nTo reproduce run `dart pub outdated --no-dev-dependencies --up-to-date --no-dependency-overrides`.\n\n\n### [*] 10/10 points: Package supports latest stable Dart and Flutter SDKs\n" + "summary": "### [*] 10/10 points: All of the package dependencies are supported in the latest version\n\nNo dependencies.\n\nTo reproduce run `dart pub outdated --no-dev-dependencies --up-to-date --no-dependency-overrides`.\n\n\n### [*] 10/10 points: Package supports latest stable Dart and Flutter SDKs\n\n\n### [*] 20/20 points: Compatible with dependency constraint lower bounds\n\n`pub downgrade` does not expose any static analysis error." } ] }, @@ -102,8 +102,8 @@ "repository": "marcojakob/dart-dnd", "branch": "master" }, - "grantedPoints": 120, - "maxPoints": 140 + "grantedPoints": 140, + "maxPoints": 160 }, "urlProblems": [] } diff --git a/test/goldens/end2end/dnd-2.0.1.json_report.md b/test/goldens/end2end/dnd-2.0.1.json_report.md index d7485a794..cacdf80b7 100644 --- a/test/goldens/end2end/dnd-2.0.1.json_report.md +++ b/test/goldens/end2end/dnd-2.0.1.json_report.md @@ -117,7 +117,7 @@ INFO: The part-of directive uses a library name. To reproduce make sure you are using the [lints_core](https://pub.dev/packages/lints) and run `dart analyze lib/src/draggable.dart` -## 20/20 Support up-to-date dependencies +## 40/40 Support up-to-date dependencies ### [*] 10/10 points: All of the package dependencies are supported in the latest version @@ -127,3 +127,8 @@ To reproduce run `dart pub outdated --no-dev-dependencies --up-to-date --no-depe ### [*] 10/10 points: Package supports latest stable Dart and Flutter SDKs + + +### [*] 20/20 points: Compatible with dependency constraint lower bounds + +`pub downgrade` does not expose any static analysis error. \ No newline at end of file diff --git a/test/goldens/end2end/http-0.13.0.json b/test/goldens/end2end/http-0.13.0.json index fe93d58b3..9bc235fd6 100644 --- a/test/goldens/end2end/http-0.13.0.json +++ b/test/goldens/end2end/http-0.13.0.json @@ -105,10 +105,10 @@ { "id": "dependency", "title": "Support up-to-date dependencies", - "grantedPoints": 20, - "maxPoints": 20, + "grantedPoints": 40, + "maxPoints": 40, "status": "passed", - "summary": "### [*] 10/10 points: All of the package dependencies are supported in the latest version\n\n|Package|Constraint|Compatible|Latest|\n|:-|:-|:-|:-|\n|[`http_parser`]|`^4.0.0`|4.0.2|4.0.2|\n|[`meta`]|`^1.3.0`|1.11.0|1.11.0|\n|[`path`]|`^1.8.0`|1.8.3|1.8.3|\n|[`pedantic`]|`^1.10.0`|1.11.1|1.11.1|\n\n
Transitive dependencies\n\n|Package|Constraint|Compatible|Latest|\n|:-|:-|:-|:-|\n|[`collection`]|-|1.18.0|1.18.0|\n|[`source_span`]|-|1.10.0|1.10.0|\n|[`string_scanner`]|-|1.2.0|1.2.0|\n|[`term_glyph`]|-|1.2.1|1.2.1|\n|[`typed_data`]|-|1.3.2|1.3.2|\n
\n\nTo reproduce run `dart pub outdated --no-dev-dependencies --up-to-date --no-dependency-overrides`.\n\n[`http_parser`]: https://pub.dev/packages/http_parser\n[`meta`]: https://pub.dev/packages/meta\n[`path`]: https://pub.dev/packages/path\n[`pedantic`]: https://pub.dev/packages/pedantic\n[`collection`]: https://pub.dev/packages/collection\n[`source_span`]: https://pub.dev/packages/source_span\n[`string_scanner`]: https://pub.dev/packages/string_scanner\n[`term_glyph`]: https://pub.dev/packages/term_glyph\n[`typed_data`]: https://pub.dev/packages/typed_data\n\n\n### [*] 10/10 points: Package supports latest stable Dart and Flutter SDKs\n" + "summary": "### [*] 10/10 points: All of the package dependencies are supported in the latest version\n\n|Package|Constraint|Compatible|Latest|\n|:-|:-|:-|:-|\n|[`http_parser`]|`^4.0.0`|4.0.2|4.0.2|\n|[`meta`]|`^1.3.0`|1.11.0|1.11.0|\n|[`path`]|`^1.8.0`|1.8.3|1.8.3|\n|[`pedantic`]|`^1.10.0`|1.11.1|1.11.1|\n\n
Transitive dependencies\n\n|Package|Constraint|Compatible|Latest|\n|:-|:-|:-|:-|\n|[`collection`]|-|1.18.0|1.18.0|\n|[`source_span`]|-|1.10.0|1.10.0|\n|[`string_scanner`]|-|1.2.0|1.2.0|\n|[`term_glyph`]|-|1.2.1|1.2.1|\n|[`typed_data`]|-|1.3.2|1.3.2|\n
\n\nTo reproduce run `dart pub outdated --no-dev-dependencies --up-to-date --no-dependency-overrides`.\n\n[`http_parser`]: https://pub.dev/packages/http_parser\n[`meta`]: https://pub.dev/packages/meta\n[`path`]: https://pub.dev/packages/path\n[`pedantic`]: https://pub.dev/packages/pedantic\n[`collection`]: https://pub.dev/packages/collection\n[`source_span`]: https://pub.dev/packages/source_span\n[`string_scanner`]: https://pub.dev/packages/string_scanner\n[`term_glyph`]: https://pub.dev/packages/term_glyph\n[`typed_data`]: https://pub.dev/packages/typed_data\n\n\n### [*] 10/10 points: Package supports latest stable Dart and Flutter SDKs\n\n\n### [*] 20/20 points: Compatible with dependency constraint lower bounds\n\n`pub downgrade` does not expose any static analysis error." } ] }, @@ -124,8 +124,8 @@ "path": "pkgs/http" }, "contributingUrl": "https://github.com/dart-lang/http/blob/master/CONTRIBUTING.md", - "grantedPoints": 120, - "maxPoints": 130 + "grantedPoints": 140, + "maxPoints": 150 }, "urlProblems": [] } diff --git a/test/goldens/end2end/http-0.13.0.json_report.md b/test/goldens/end2end/http-0.13.0.json_report.md index 037e4e06e..2a687ce36 100644 --- a/test/goldens/end2end/http-0.13.0.json_report.md +++ b/test/goldens/end2end/http-0.13.0.json_report.md @@ -50,7 +50,7 @@ INFO: Dangling library doc comment. To reproduce make sure you are using the [lints_core](https://pub.dev/packages/lints) and run `dart analyze lib/http.dart` -## 20/20 Support up-to-date dependencies +## 40/40 Support up-to-date dependencies ### [*] 10/10 points: All of the package dependencies are supported in the latest version @@ -86,3 +86,8 @@ To reproduce run `dart pub outdated --no-dev-dependencies --up-to-date --no-depe ### [*] 10/10 points: Package supports latest stable Dart and Flutter SDKs + + +### [*] 20/20 points: Compatible with dependency constraint lower bounds + +`pub downgrade` does not expose any static analysis error. \ No newline at end of file diff --git a/test/goldens/end2end/lints-1.0.0.json b/test/goldens/end2end/lints-1.0.0.json index 6a8ae3459..78e0498ca 100644 --- a/test/goldens/end2end/lints-1.0.0.json +++ b/test/goldens/end2end/lints-1.0.0.json @@ -82,17 +82,17 @@ { "id": "dependency", "title": "Support up-to-date dependencies", - "grantedPoints": 20, - "maxPoints": 20, + "grantedPoints": 40, + "maxPoints": 40, "status": "passed", - "summary": "### [*] 10/10 points: All of the package dependencies are supported in the latest version\n\nNo dependencies.\n\nTo reproduce run `dart pub outdated --no-dev-dependencies --up-to-date --no-dependency-overrides`.\n\n\n### [*] 10/10 points: Package supports latest stable Dart and Flutter SDKs\n" + "summary": "### [*] 10/10 points: All of the package dependencies are supported in the latest version\n\nNo dependencies.\n\nTo reproduce run `dart pub outdated --no-dev-dependencies --up-to-date --no-dependency-overrides`.\n\n\n### [*] 10/10 points: Package supports latest stable Dart and Flutter SDKs\n\n\n### [*] 20/20 points: Compatible with dependency constraint lower bounds\n\n`pub downgrade` does not expose any static analysis error." } ] }, "screenshots": [], "result": { - "grantedPoints": 110, - "maxPoints": 130 + "grantedPoints": 130, + "maxPoints": 150 }, "urlProblems": [] } diff --git a/test/goldens/end2end/lints-1.0.0.json_report.md b/test/goldens/end2end/lints-1.0.0.json_report.md index 6e8997de5..16d30b5eb 100644 --- a/test/goldens/end2end/lints-1.0.0.json_report.md +++ b/test/goldens/end2end/lints-1.0.0.json_report.md @@ -43,7 +43,7 @@ See [package layout](https://dart.dev/tools/pub/package-layout#examples) guideli ### [*] 50/50 points: code has no errors, warnings, lints, or formatting issues -## 20/20 Support up-to-date dependencies +## 40/40 Support up-to-date dependencies ### [*] 10/10 points: All of the package dependencies are supported in the latest version @@ -53,3 +53,8 @@ To reproduce run `dart pub outdated --no-dev-dependencies --up-to-date --no-depe ### [*] 10/10 points: Package supports latest stable Dart and Flutter SDKs + + +### [*] 20/20 points: Compatible with dependency constraint lower bounds + +`pub downgrade` does not expose any static analysis error. \ No newline at end of file diff --git a/test/goldens/end2end/mime_type-0.3.2.json b/test/goldens/end2end/mime_type-0.3.2.json index 5365f6f46..58528a5bc 100644 --- a/test/goldens/end2end/mime_type-0.3.2.json +++ b/test/goldens/end2end/mime_type-0.3.2.json @@ -65,9 +65,9 @@ "id": "dependency", "title": "Support up-to-date dependencies", "grantedPoints": 0, - "maxPoints": 20, + "maxPoints": 40, "status": "failed", - "summary": "### [x] 0/10 points: All of the package dependencies are supported in the latest version\n\n
\n\nSdk constraint doesn't support current Dart version {{sdk-version}}. Cannot run `dart pub outdated`.\n\n\n`pubspec.yaml:10:10`\n\n```\n ╷\n10 │ sdk: '>=0.8.10 <3.0.0'\n │ ^^^^^^^^^^^^^^^^^\n ╵\n```\n\n
\n\n### [x] 0/10 points: Package supports latest stable Dart and Flutter SDKs\n\n
\n\nSdk constraint doesn't support current Dart version {{sdk-version}}.\n\n\n`pubspec.yaml:10:10`\n\n```\n ╷\n10 │ sdk: '>=0.8.10 <3.0.0'\n │ ^^^^^^^^^^^^^^^^^\n ╵\n```\n\nTry widening the upper boundary of the constraint.\n
" + "summary": "### [x] 0/10 points: All of the package dependencies are supported in the latest version\n\n
\n\nSdk constraint doesn't support current Dart version {{sdk-version}}. Cannot run `dart pub outdated`.\n\n\n`pubspec.yaml:10:10`\n\n```\n ╷\n10 │ sdk: '>=0.8.10 <3.0.0'\n │ ^^^^^^^^^^^^^^^^^\n ╵\n```\n\n
\n\n### [x] 0/10 points: Package supports latest stable Dart and Flutter SDKs\n\n
\n\nSdk constraint doesn't support current Dart version {{sdk-version}}.\n\n\n`pubspec.yaml:10:10`\n\n```\n ╷\n10 │ sdk: '>=0.8.10 <3.0.0'\n │ ^^^^^^^^^^^^^^^^^\n ╵\n```\n\nTry widening the upper boundary of the constraint.\n
\n\n### [x] 0/20 points: Compatible with dependency constraint lower bounds\n\n* `dart pub downgrade` failed with:\n\n```\nOUT:\nResolving dependencies...\nERR:\nThe lower bound of \"sdk: '>=0.8.10 <3.0.0'\" must be 2.12.0'\nor higher to enable null safety.\n\nThe current Dart SDK (3.4.0) only supports null safety.\n\nFor details, see https://dart.dev/null-safety\n```\n\nRun `dart pub downgrade` and then `dart analyze` to reproduce the above problem.\n\nYou may run `dart pub upgrade --tighten` to update your dependency constraints, or visit http://dart.dev/go/downgrade-testing for further help." } ] }, @@ -82,7 +82,7 @@ "branch": "master" }, "grantedPoints": 5, - "maxPoints": 130 + "maxPoints": 150 }, "urlProblems": [], "errorMessage": "Running `dart pub outdated` failed with the following output:\n\n```\nThe lower bound of \"sdk: '>=0.8.10 <3.0.0'\" must be 2.12.0'\nor higher to enable null safety.\n```" diff --git a/test/goldens/end2end/mime_type-0.3.2.json_report.md b/test/goldens/end2end/mime_type-0.3.2.json_report.md index e08ba87bf..a2e3efabb 100644 --- a/test/goldens/end2end/mime_type-0.3.2.json_report.md +++ b/test/goldens/end2end/mime_type-0.3.2.json_report.md @@ -78,7 +78,7 @@ or higher to enable null safety. ``` -## 0/20 Support up-to-date dependencies +## 0/40 Support up-to-date dependencies ### [x] 0/10 points: All of the package dependencies are supported in the latest version @@ -115,4 +115,24 @@ Sdk constraint doesn't support current Dart version {{sdk-version}}. ``` Try widening the upper boundary of the constraint. - \ No newline at end of file + + +### [x] 0/20 points: Compatible with dependency constraint lower bounds + +* `dart pub downgrade` failed with: + +``` +OUT: +Resolving dependencies... +ERR: +The lower bound of "sdk: '>=0.8.10 <3.0.0'" must be 2.12.0' +or higher to enable null safety. + +The current Dart SDK (3.4.0) only supports null safety. + +For details, see https://dart.dev/null-safety +``` + +Run `dart pub downgrade` and then `dart analyze` to reproduce the above problem. + +You may run `dart pub upgrade --tighten` to update your dependency constraints, or visit http://dart.dev/go/downgrade-testing for further help. \ No newline at end of file diff --git a/test/goldens/end2end/nsd_android-1.2.2.json b/test/goldens/end2end/nsd_android-1.2.2.json index 8e088749c..4dcb061f6 100644 --- a/test/goldens/end2end/nsd_android-1.2.2.json +++ b/test/goldens/end2end/nsd_android-1.2.2.json @@ -90,9 +90,9 @@ "id": "dependency", "title": "Support up-to-date dependencies", "grantedPoints": 10, - "maxPoints": 20, + "maxPoints": 40, "status": "failed", - "summary": "### [x] 0/10 points: All of the package dependencies are supported in the latest version\n\n* Could not run `flutter pub outdated`: `flutter pub get` failed:\n\n```\nOUT:\nResolving dependencies...\nERR:\nNote: meta is pinned to version 1.12.0 by flutter from the flutter SDK.\nSee https://dart.dev/go/sdk-version-pinning for details.\n\n\nBecause every version of flutter from sdk depends on meta 1.12.0 which doesn't match any versions, flutter from sdk is forbidden.\nSo, because nsd_android depends on flutter from sdk, version solving failed.\n```\n\n### [*] 10/10 points: Package supports latest stable Dart and Flutter SDKs\n" + "summary": "### [x] 0/10 points: All of the package dependencies are supported in the latest version\n\n* Could not run `flutter pub outdated`: `flutter pub get` failed:\n\n```\nOUT:\nResolving dependencies...\nERR:\nNote: meta is pinned to version 1.12.0 by flutter from the flutter SDK.\nSee https://dart.dev/go/sdk-version-pinning for details.\n\n\nBecause every version of flutter from sdk depends on meta 1.12.0 which doesn't match any versions, flutter from sdk is forbidden.\nSo, because nsd_android depends on flutter from sdk, version solving failed.\n```\n\n### [*] 10/10 points: Package supports latest stable Dart and Flutter SDKs\n\n\n### [x] 0/20 points: Compatible with dependency constraint lower bounds\n\n* `flutter pub downgrade` failed with:\n\n```\nOUT:\nResolving dependencies...\nERR:\nNote: meta is pinned to version 1.12.0 by flutter from the flutter SDK.\nSee https://dart.dev/go/sdk-version-pinning for details.\n\n\nBecause every version of flutter from sdk depends on meta 1.12.0 which doesn't match any versions, flutter from sdk is forbidden.\nSo, because nsd_android depends on flutter from sdk, version solving failed.\n```\n\nRun `flutter pub downgrade` and then `flutter analyze` to reproduce the above problem.\n\nYou may run `dart pub upgrade --tighten` to update your dependency constraints, or visit http://dart.dev/go/downgrade-testing for further help." } ] }, @@ -108,7 +108,7 @@ "path": "nsd_android" }, "grantedPoints": 40, - "maxPoints": 130 + "maxPoints": 150 }, "urlProblems": [], "errorMessage": "Running `flutter pub outdated` failed with the following output:\n\n```\nNote: meta is pinned to version 1.12.0 by flutter from the flutter SDK.\nSee https://dart.dev/go/sdk-version-pinning for details.\n```" diff --git a/test/goldens/end2end/nsd_android-1.2.2.json_report.md b/test/goldens/end2end/nsd_android-1.2.2.json_report.md index e900a70ae..268ab25c9 100644 --- a/test/goldens/end2end/nsd_android-1.2.2.json_report.md +++ b/test/goldens/end2end/nsd_android-1.2.2.json_report.md @@ -49,7 +49,7 @@ See https://dart.dev/go/sdk-version-pinning for details. ``` -## 10/20 Support up-to-date dependencies +## 10/40 Support up-to-date dependencies ### [x] 0/10 points: All of the package dependencies are supported in the latest version @@ -68,3 +68,24 @@ So, because nsd_android depends on flutter from sdk, version solving failed. ``` ### [*] 10/10 points: Package supports latest stable Dart and Flutter SDKs + + +### [x] 0/20 points: Compatible with dependency constraint lower bounds + +* `flutter pub downgrade` failed with: + +``` +OUT: +Resolving dependencies... +ERR: +Note: meta is pinned to version 1.12.0 by flutter from the flutter SDK. +See https://dart.dev/go/sdk-version-pinning for details. + + +Because every version of flutter from sdk depends on meta 1.12.0 which doesn't match any versions, flutter from sdk is forbidden. +So, because nsd_android depends on flutter from sdk, version solving failed. +``` + +Run `flutter pub downgrade` and then `flutter analyze` to reproduce the above problem. + +You may run `dart pub upgrade --tighten` to update your dependency constraints, or visit http://dart.dev/go/downgrade-testing for further help. \ No newline at end of file diff --git a/test/goldens/end2end/onepub-1.1.0.json b/test/goldens/end2end/onepub-1.1.0.json index 64fccf781..96c8b32f5 100644 --- a/test/goldens/end2end/onepub-1.1.0.json +++ b/test/goldens/end2end/onepub-1.1.0.json @@ -152,18 +152,18 @@ { "id": "dependency", "title": "Support up-to-date dependencies", - "grantedPoints": 10, - "maxPoints": 20, + "grantedPoints": 30, + "maxPoints": 40, "status": "failed", - "summary": "### [x] 0/10 points: All of the package dependencies are supported in the latest version\n\n|Package|Constraint|Compatible|Latest|\n|:-|:-|:-|:-|\n|[`dcli`]|`^1.15.5`|1.36.2|**3.1.0**|\n\n
Transitive dependencies\n\n|Package|Constraint|Compatible|Latest|\n|:-|:-|:-|:-|\n|[`archive`]|-|3.4.6|3.4.6|\n|[`args`]|-|2.4.2|2.4.2|\n|[`async`]|-|2.11.0|2.11.0|\n|[`basic_utils`]|-|3.9.4|5.7.0|\n|[`boolean_selector`]|-|2.1.1|2.1.1|\n|[`characters`]|-|1.3.0|1.3.0|\n|[`chunked_stream`]|-|1.4.2|1.4.2|\n|[`circular_buffer`]|-|0.11.0|0.11.0|\n|[`clock`]|-|1.1.1|1.1.1|\n|[`collection`]|-|1.18.0|1.18.0|\n|[`convert`]|-|3.1.1|3.1.1|\n|[`crypto`]|-|3.0.3|3.0.3|\n|[`csv`]|-|5.1.0|5.1.0|\n|[`dart_console2`]|-|2.0.1|3.0.0|\n|[`dcli_core`]|-|1.36.2|3.1.0|\n|[`equatable`]|-|2.0.5|2.0.5|\n|[`ffi`]|-|2.1.0|2.1.0|\n|[`file`]|-|6.1.4|7.0.0|\n|[`file_utils`]|-|1.0.1|1.0.1|\n|[`functional_data`]|-|1.1.1|1.1.1|\n|[`glob`]|-|2.1.2|2.1.2|\n|[`globbing`]|-|1.0.0|1.0.0|\n|[`http`]|-|0.13.6|1.1.0|\n|[`http_parser`]|-|4.0.2|4.0.2|\n|[`ini`]|-|2.1.0|2.1.0|\n|[`intl`]|-|0.17.0|0.18.1|\n|[`js`]|-|0.6.7|0.6.7|\n|[`json2yaml`]|-|3.0.1|3.0.1|\n|[`json_annotation`]|-|4.8.1|4.8.1|\n|[`logging`]|-|1.2.0|1.2.0|\n|[`matcher`]|-|0.12.16|0.12.16|\n|[`meta`]|-|1.11.0|1.11.0|\n|[`mime`]|-|1.0.4|1.0.4|\n|[`path`]|-|1.8.3|1.8.3|\n|[`pointycastle`]|-|3.7.3|3.7.3|\n|[`posix`]|-|4.1.0|5.0.0|\n|[`pub_semver`]|-|2.1.4|2.1.4|\n|[`pubspec2`]|-|2.4.2|4.0.0|\n|[`pubspec_lock`]|-|3.0.2|3.0.2|\n|[`quiver`]|-|3.2.1|3.2.1|\n|[`random_string`]|-|2.3.1|2.3.1|\n|[`scope`]|-|3.0.0|4.1.0|\n|[`settings_yaml`]|-|4.0.1|7.1.0|\n|[`source_span`]|-|1.10.0|1.10.0|\n|[`stack_trace`]|-|1.11.1|1.11.1|\n|[`stacktrace_impl`]|-|2.3.0|2.3.0|\n|[`stream_channel`]|-|2.1.2|2.1.2|\n|[`string_scanner`]|-|1.2.0|1.2.0|\n|[`sum_types`]|-|0.3.5|0.3.5|\n|[`system_info2`]|-|2.0.4|4.0.0|\n|[`term_glyph`]|-|1.2.1|1.2.1|\n|[`test_api`]|-|0.6.1|0.6.1|\n|[`typed_data`]|-|1.3.2|1.3.2|\n|[`uuid`]|-|3.0.7|4.1.0|\n|[`validators2`]|-|3.0.0|5.0.0|\n|[`vin_decoder`]|-|0.2.1-nullsafety|0.2.1-nullsafety|\n|[`win32`]|-|3.1.4|5.0.9|\n|[`yaml`]|-|3.1.2|3.1.2|\n
\n\nTo reproduce run `dart pub outdated --no-dev-dependencies --up-to-date --no-dependency-overrides`.\n\n[`dcli`]: https://pub.dev/packages/dcli\n[`archive`]: https://pub.dev/packages/archive\n[`args`]: https://pub.dev/packages/args\n[`async`]: https://pub.dev/packages/async\n[`basic_utils`]: https://pub.dev/packages/basic_utils\n[`boolean_selector`]: https://pub.dev/packages/boolean_selector\n[`characters`]: https://pub.dev/packages/characters\n[`chunked_stream`]: https://pub.dev/packages/chunked_stream\n[`circular_buffer`]: https://pub.dev/packages/circular_buffer\n[`clock`]: https://pub.dev/packages/clock\n[`collection`]: https://pub.dev/packages/collection\n[`convert`]: https://pub.dev/packages/convert\n[`crypto`]: https://pub.dev/packages/crypto\n[`csv`]: https://pub.dev/packages/csv\n[`dart_console2`]: https://pub.dev/packages/dart_console2\n[`dcli_core`]: https://pub.dev/packages/dcli_core\n[`equatable`]: https://pub.dev/packages/equatable\n[`ffi`]: https://pub.dev/packages/ffi\n[`file`]: https://pub.dev/packages/file\n[`file_utils`]: https://pub.dev/packages/file_utils\n[`functional_data`]: https://pub.dev/packages/functional_data\n[`glob`]: https://pub.dev/packages/glob\n[`globbing`]: https://pub.dev/packages/globbing\n[`http`]: https://pub.dev/packages/http\n[`http_parser`]: https://pub.dev/packages/http_parser\n[`ini`]: https://pub.dev/packages/ini\n[`intl`]: https://pub.dev/packages/intl\n[`js`]: https://pub.dev/packages/js\n[`json2yaml`]: https://pub.dev/packages/json2yaml\n[`json_annotation`]: https://pub.dev/packages/json_annotation\n[`logging`]: https://pub.dev/packages/logging\n[`matcher`]: https://pub.dev/packages/matcher\n[`meta`]: https://pub.dev/packages/meta\n[`mime`]: https://pub.dev/packages/mime\n[`path`]: https://pub.dev/packages/path\n[`pointycastle`]: https://pub.dev/packages/pointycastle\n[`posix`]: https://pub.dev/packages/posix\n[`pub_semver`]: https://pub.dev/packages/pub_semver\n[`pubspec2`]: https://pub.dev/packages/pubspec2\n[`pubspec_lock`]: https://pub.dev/packages/pubspec_lock\n[`quiver`]: https://pub.dev/packages/quiver\n[`random_string`]: https://pub.dev/packages/random_string\n[`scope`]: https://pub.dev/packages/scope\n[`settings_yaml`]: https://pub.dev/packages/settings_yaml\n[`source_span`]: https://pub.dev/packages/source_span\n[`stack_trace`]: https://pub.dev/packages/stack_trace\n[`stacktrace_impl`]: https://pub.dev/packages/stacktrace_impl\n[`stream_channel`]: https://pub.dev/packages/stream_channel\n[`string_scanner`]: https://pub.dev/packages/string_scanner\n[`sum_types`]: https://pub.dev/packages/sum_types\n[`system_info2`]: https://pub.dev/packages/system_info2\n[`term_glyph`]: https://pub.dev/packages/term_glyph\n[`test_api`]: https://pub.dev/packages/test_api\n[`typed_data`]: https://pub.dev/packages/typed_data\n[`uuid`]: https://pub.dev/packages/uuid\n[`validators2`]: https://pub.dev/packages/validators2\n[`vin_decoder`]: https://pub.dev/packages/vin_decoder\n[`win32`]: https://pub.dev/packages/win32\n[`yaml`]: https://pub.dev/packages/yaml\n\n
\n\nThe constraint `^1.15.5` on dcli does not support the stable version `2.0.1`.\n\n\nTry running `dart pub upgrade --major-versions dcli` to update the constraint.\n
\n\n### [*] 10/10 points: Package supports latest stable Dart and Flutter SDKs\n" + "summary": "### [x] 0/10 points: All of the package dependencies are supported in the latest version\n\n|Package|Constraint|Compatible|Latest|\n|:-|:-|:-|:-|\n|[`dcli`]|`^1.15.5`|1.36.2|**3.1.0**|\n\n
Transitive dependencies\n\n|Package|Constraint|Compatible|Latest|\n|:-|:-|:-|:-|\n|[`archive`]|-|3.4.6|3.4.6|\n|[`args`]|-|2.4.2|2.4.2|\n|[`async`]|-|2.11.0|2.11.0|\n|[`basic_utils`]|-|3.9.4|5.7.0|\n|[`boolean_selector`]|-|2.1.1|2.1.1|\n|[`characters`]|-|1.3.0|1.3.0|\n|[`chunked_stream`]|-|1.4.2|1.4.2|\n|[`circular_buffer`]|-|0.11.0|0.11.0|\n|[`clock`]|-|1.1.1|1.1.1|\n|[`collection`]|-|1.18.0|1.18.0|\n|[`convert`]|-|3.1.1|3.1.1|\n|[`crypto`]|-|3.0.3|3.0.3|\n|[`csv`]|-|5.1.0|5.1.0|\n|[`dart_console2`]|-|2.0.1|3.0.0|\n|[`dcli_core`]|-|1.36.2|3.1.0|\n|[`equatable`]|-|2.0.5|2.0.5|\n|[`ffi`]|-|2.1.0|2.1.0|\n|[`file`]|-|6.1.4|7.0.0|\n|[`file_utils`]|-|1.0.1|1.0.1|\n|[`functional_data`]|-|1.1.1|1.1.1|\n|[`glob`]|-|2.1.2|2.1.2|\n|[`globbing`]|-|1.0.0|1.0.0|\n|[`http`]|-|0.13.6|1.1.0|\n|[`http_parser`]|-|4.0.2|4.0.2|\n|[`ini`]|-|2.1.0|2.1.0|\n|[`intl`]|-|0.17.0|0.18.1|\n|[`js`]|-|0.6.7|0.6.7|\n|[`json2yaml`]|-|3.0.1|3.0.1|\n|[`json_annotation`]|-|4.8.1|4.8.1|\n|[`logging`]|-|1.2.0|1.2.0|\n|[`matcher`]|-|0.12.16|0.12.16|\n|[`meta`]|-|1.11.0|1.11.0|\n|[`mime`]|-|1.0.4|1.0.4|\n|[`path`]|-|1.8.3|1.8.3|\n|[`pointycastle`]|-|3.7.3|3.7.3|\n|[`posix`]|-|4.1.0|5.0.0|\n|[`pub_semver`]|-|2.1.4|2.1.4|\n|[`pubspec2`]|-|2.4.2|4.0.0|\n|[`pubspec_lock`]|-|3.0.2|3.0.2|\n|[`quiver`]|-|3.2.1|3.2.1|\n|[`random_string`]|-|2.3.1|2.3.1|\n|[`scope`]|-|3.0.0|4.1.0|\n|[`settings_yaml`]|-|4.0.1|7.1.0|\n|[`source_span`]|-|1.10.0|1.10.0|\n|[`stack_trace`]|-|1.11.1|1.11.1|\n|[`stacktrace_impl`]|-|2.3.0|2.3.0|\n|[`stream_channel`]|-|2.1.2|2.1.2|\n|[`string_scanner`]|-|1.2.0|1.2.0|\n|[`sum_types`]|-|0.3.5|0.3.5|\n|[`system_info2`]|-|2.0.4|4.0.0|\n|[`term_glyph`]|-|1.2.1|1.2.1|\n|[`test_api`]|-|0.6.1|0.6.1|\n|[`typed_data`]|-|1.3.2|1.3.2|\n|[`uuid`]|-|3.0.7|4.1.0|\n|[`validators2`]|-|3.0.0|5.0.0|\n|[`vin_decoder`]|-|0.2.1-nullsafety|0.2.1-nullsafety|\n|[`win32`]|-|3.1.4|5.0.9|\n|[`yaml`]|-|3.1.2|3.1.2|\n
\n\nTo reproduce run `dart pub outdated --no-dev-dependencies --up-to-date --no-dependency-overrides`.\n\n[`dcli`]: https://pub.dev/packages/dcli\n[`archive`]: https://pub.dev/packages/archive\n[`args`]: https://pub.dev/packages/args\n[`async`]: https://pub.dev/packages/async\n[`basic_utils`]: https://pub.dev/packages/basic_utils\n[`boolean_selector`]: https://pub.dev/packages/boolean_selector\n[`characters`]: https://pub.dev/packages/characters\n[`chunked_stream`]: https://pub.dev/packages/chunked_stream\n[`circular_buffer`]: https://pub.dev/packages/circular_buffer\n[`clock`]: https://pub.dev/packages/clock\n[`collection`]: https://pub.dev/packages/collection\n[`convert`]: https://pub.dev/packages/convert\n[`crypto`]: https://pub.dev/packages/crypto\n[`csv`]: https://pub.dev/packages/csv\n[`dart_console2`]: https://pub.dev/packages/dart_console2\n[`dcli_core`]: https://pub.dev/packages/dcli_core\n[`equatable`]: https://pub.dev/packages/equatable\n[`ffi`]: https://pub.dev/packages/ffi\n[`file`]: https://pub.dev/packages/file\n[`file_utils`]: https://pub.dev/packages/file_utils\n[`functional_data`]: https://pub.dev/packages/functional_data\n[`glob`]: https://pub.dev/packages/glob\n[`globbing`]: https://pub.dev/packages/globbing\n[`http`]: https://pub.dev/packages/http\n[`http_parser`]: https://pub.dev/packages/http_parser\n[`ini`]: https://pub.dev/packages/ini\n[`intl`]: https://pub.dev/packages/intl\n[`js`]: https://pub.dev/packages/js\n[`json2yaml`]: https://pub.dev/packages/json2yaml\n[`json_annotation`]: https://pub.dev/packages/json_annotation\n[`logging`]: https://pub.dev/packages/logging\n[`matcher`]: https://pub.dev/packages/matcher\n[`meta`]: https://pub.dev/packages/meta\n[`mime`]: https://pub.dev/packages/mime\n[`path`]: https://pub.dev/packages/path\n[`pointycastle`]: https://pub.dev/packages/pointycastle\n[`posix`]: https://pub.dev/packages/posix\n[`pub_semver`]: https://pub.dev/packages/pub_semver\n[`pubspec2`]: https://pub.dev/packages/pubspec2\n[`pubspec_lock`]: https://pub.dev/packages/pubspec_lock\n[`quiver`]: https://pub.dev/packages/quiver\n[`random_string`]: https://pub.dev/packages/random_string\n[`scope`]: https://pub.dev/packages/scope\n[`settings_yaml`]: https://pub.dev/packages/settings_yaml\n[`source_span`]: https://pub.dev/packages/source_span\n[`stack_trace`]: https://pub.dev/packages/stack_trace\n[`stacktrace_impl`]: https://pub.dev/packages/stacktrace_impl\n[`stream_channel`]: https://pub.dev/packages/stream_channel\n[`string_scanner`]: https://pub.dev/packages/string_scanner\n[`sum_types`]: https://pub.dev/packages/sum_types\n[`system_info2`]: https://pub.dev/packages/system_info2\n[`term_glyph`]: https://pub.dev/packages/term_glyph\n[`test_api`]: https://pub.dev/packages/test_api\n[`typed_data`]: https://pub.dev/packages/typed_data\n[`uuid`]: https://pub.dev/packages/uuid\n[`validators2`]: https://pub.dev/packages/validators2\n[`vin_decoder`]: https://pub.dev/packages/vin_decoder\n[`win32`]: https://pub.dev/packages/win32\n[`yaml`]: https://pub.dev/packages/yaml\n\n
\n\nThe constraint `^1.15.5` on dcli does not support the stable version `2.0.1`.\n\n\nTry running `dart pub upgrade --major-versions dcli` to update the constraint.\n
\n\n### [*] 10/10 points: Package supports latest stable Dart and Flutter SDKs\n\n\n### [*] 20/20 points: Compatible with dependency constraint lower bounds\n\n`pub downgrade` does not expose any static analysis error." } ] }, "screenshots": [], "result": { "homepageUrl": "https://github.com/noojee/onepub.dev", - "grantedPoints": 100, - "maxPoints": 140 + "grantedPoints": 120, + "maxPoints": 160 }, "urlProblems": [] } diff --git a/test/goldens/end2end/onepub-1.1.0.json_report.md b/test/goldens/end2end/onepub-1.1.0.json_report.md index 9c872b28a..c6712c187 100644 --- a/test/goldens/end2end/onepub-1.1.0.json_report.md +++ b/test/goldens/end2end/onepub-1.1.0.json_report.md @@ -87,7 +87,7 @@ Cannot assign Web automatically to a binary only package. ### [*] 50/50 points: code has no errors, warnings, lints, or formatting issues -## 10/20 Support up-to-date dependencies +## 30/40 Support up-to-date dependencies ### [x] 0/10 points: All of the package dependencies are supported in the latest version @@ -230,3 +230,8 @@ Try running `dart pub upgrade --major-versions dcli` to update the constraint. ### [*] 10/10 points: Package supports latest stable Dart and Flutter SDKs + + +### [*] 20/20 points: Compatible with dependency constraint lower bounds + +`pub downgrade` does not expose any static analysis error. \ No newline at end of file diff --git a/test/goldens/end2end/sdp_transform-0.2.0.json b/test/goldens/end2end/sdp_transform-0.2.0.json index eac61bd03..42f2ad9e4 100644 --- a/test/goldens/end2end/sdp_transform-0.2.0.json +++ b/test/goldens/end2end/sdp_transform-0.2.0.json @@ -81,9 +81,9 @@ "id": "dependency", "title": "Support up-to-date dependencies", "grantedPoints": 0, - "maxPoints": 20, + "maxPoints": 40, "status": "failed", - "summary": "### [x] 0/10 points: All of the package dependencies are supported in the latest version\n\n
\n\nSdk constraint doesn't support current Dart version {{sdk-version}}. Cannot run `dart pub outdated`.\n\n\n`pubspec.yaml:10:8`\n\n```\n ╷\n10 │ sdk: '<3.0.0'\n │ ^^^^^^^^\n ╵\n```\n\n
\n\n### [x] 0/10 points: Package supports latest stable Dart and Flutter SDKs\n\n
\n\nSdk constraint doesn't support current Dart version {{sdk-version}}.\n\n\n`pubspec.yaml:10:8`\n\n```\n ╷\n10 │ sdk: '<3.0.0'\n │ ^^^^^^^^\n ╵\n```\n\nTry widening the upper boundary of the constraint.\n
" + "summary": "### [x] 0/10 points: All of the package dependencies are supported in the latest version\n\n
\n\nSdk constraint doesn't support current Dart version {{sdk-version}}. Cannot run `dart pub outdated`.\n\n\n`pubspec.yaml:10:8`\n\n```\n ╷\n10 │ sdk: '<3.0.0'\n │ ^^^^^^^^\n ╵\n```\n\n
\n\n### [x] 0/10 points: Package supports latest stable Dart and Flutter SDKs\n\n
\n\nSdk constraint doesn't support current Dart version {{sdk-version}}.\n\n\n`pubspec.yaml:10:8`\n\n```\n ╷\n10 │ sdk: '<3.0.0'\n │ ^^^^^^^^\n ╵\n```\n\nTry widening the upper boundary of the constraint.\n
\n\n### [x] 0/20 points: Compatible with dependency constraint lower bounds\n\n* `dart pub downgrade` failed with:\n\n```\nOUT:\nResolving dependencies...\nERR:\nThe lower bound of \"sdk: '>=1.0.0 <3.0.0'\" must be 2.12.0'\nor higher to enable null safety.\n\nThe current Dart SDK (3.4.0) only supports null safety.\n\nFor details, see https://dart.dev/null-safety\n```\n\nRun `dart pub downgrade` and then `dart analyze` to reproduce the above problem.\n\nYou may run `dart pub upgrade --tighten` to update your dependency constraints, or visit http://dart.dev/go/downgrade-testing for further help." } ] }, @@ -98,7 +98,7 @@ "branch": "master" }, "grantedPoints": 40, - "maxPoints": 130 + "maxPoints": 150 }, "urlProblems": [], "errorMessage": "Running `dart pub outdated` failed with the following output:\n\n```\nThe lower bound of \"sdk: '>=1.0.0 <3.0.0'\" must be 2.12.0'\nor higher to enable null safety.\n```" diff --git a/test/goldens/end2end/sdp_transform-0.2.0.json_report.md b/test/goldens/end2end/sdp_transform-0.2.0.json_report.md index bc21f4c33..2c4d5c212 100644 --- a/test/goldens/end2end/sdp_transform-0.2.0.json_report.md +++ b/test/goldens/end2end/sdp_transform-0.2.0.json_report.md @@ -55,7 +55,7 @@ or higher to enable null safety. ``` -## 0/20 Support up-to-date dependencies +## 0/40 Support up-to-date dependencies ### [x] 0/10 points: All of the package dependencies are supported in the latest version @@ -92,4 +92,24 @@ Sdk constraint doesn't support current Dart version {{sdk-version}}. ``` Try widening the upper boundary of the constraint. - \ No newline at end of file + + +### [x] 0/20 points: Compatible with dependency constraint lower bounds + +* `dart pub downgrade` failed with: + +``` +OUT: +Resolving dependencies... +ERR: +The lower bound of "sdk: '>=1.0.0 <3.0.0'" must be 2.12.0' +or higher to enable null safety. + +The current Dart SDK (3.4.0) only supports null safety. + +For details, see https://dart.dev/null-safety +``` + +Run `dart pub downgrade` and then `dart analyze` to reproduce the above problem. + +You may run `dart pub upgrade --tighten` to update your dependency constraints, or visit http://dart.dev/go/downgrade-testing for further help. \ No newline at end of file diff --git a/test/goldens/end2end/skiplist-0.1.0.json b/test/goldens/end2end/skiplist-0.1.0.json index f7625b379..55b15bf0d 100644 --- a/test/goldens/end2end/skiplist-0.1.0.json +++ b/test/goldens/end2end/skiplist-0.1.0.json @@ -78,9 +78,9 @@ "id": "dependency", "title": "Support up-to-date dependencies", "grantedPoints": 0, - "maxPoints": 20, + "maxPoints": 40, "status": "failed", - "summary": "### [x] 0/10 points: All of the package dependencies are supported in the latest version\n\n* Sdk constraint doesn't support current Dart version {{sdk-version}}. Cannot run `dart pub outdated`.\n\n### [x] 0/10 points: Package supports latest stable Dart and Flutter SDKs\n\n
\n\nPubspec.yaml does not have an sdk version constraint.\n\n\nTry adding an sdk constraint to your `pubspec.yaml`\n
" + "summary": "### [x] 0/10 points: All of the package dependencies are supported in the latest version\n\n* Sdk constraint doesn't support current Dart version {{sdk-version}}. Cannot run `dart pub outdated`.\n\n### [x] 0/10 points: Package supports latest stable Dart and Flutter SDKs\n\n
\n\nPubspec.yaml does not have an sdk version constraint.\n\n\nTry adding an sdk constraint to your `pubspec.yaml`\n
\n\n### [x] 0/20 points: Compatible with dependency constraint lower bounds\n\n* `dart pub downgrade` failed with:\n\n```\nOUT:\nResolving dependencies...\nERR:\nThe lower bound of \"sdk: '>=1.0.0 <=3.4.0'\" must be 2.12.0'\nor higher to enable null safety.\n\nThe current Dart SDK (3.4.0) only supports null safety.\n\nFor details, see https://dart.dev/null-safety\n```\n\nRun `dart pub downgrade` and then `dart analyze` to reproduce the above problem.\n\nYou may run `dart pub upgrade --tighten` to update your dependency constraints, or visit http://dart.dev/go/downgrade-testing for further help." } ] }, @@ -95,7 +95,7 @@ "branch": "master" }, "grantedPoints": 20, - "maxPoints": 130 + "maxPoints": 150 }, "urlProblems": [], "errorMessage": "Running `dart pub outdated` failed with the following output:\n\n```\nThe lower bound of \"sdk: '>=1.0.0 <=3.4.0'\" must be 2.12.0'\nor higher to enable null safety.\n```" diff --git a/test/goldens/end2end/skiplist-0.1.0.json_report.md b/test/goldens/end2end/skiplist-0.1.0.json_report.md index a51dc70f5..70532cd07 100644 --- a/test/goldens/end2end/skiplist-0.1.0.json_report.md +++ b/test/goldens/end2end/skiplist-0.1.0.json_report.md @@ -56,7 +56,7 @@ or higher to enable null safety. ``` -## 0/20 Support up-to-date dependencies +## 0/40 Support up-to-date dependencies ### [x] 0/10 points: All of the package dependencies are supported in the latest version @@ -70,4 +70,24 @@ Pubspec.yaml does not have an sdk version constraint. Try adding an sdk constraint to your `pubspec.yaml` - \ No newline at end of file + + +### [x] 0/20 points: Compatible with dependency constraint lower bounds + +* `dart pub downgrade` failed with: + +``` +OUT: +Resolving dependencies... +ERR: +The lower bound of "sdk: '>=1.0.0 <=3.4.0'" must be 2.12.0' +or higher to enable null safety. + +The current Dart SDK (3.4.0) only supports null safety. + +For details, see https://dart.dev/null-safety +``` + +Run `dart pub downgrade` and then `dart analyze` to reproduce the above problem. + +You may run `dart pub upgrade --tighten` to update your dependency constraints, or visit http://dart.dev/go/downgrade-testing for further help. \ No newline at end of file diff --git a/test/goldens/end2end/steward-0.3.1.json b/test/goldens/end2end/steward-0.3.1.json index f1c4af661..77a762df1 100644 --- a/test/goldens/end2end/steward-0.3.1.json +++ b/test/goldens/end2end/steward-0.3.1.json @@ -108,10 +108,10 @@ { "id": "dependency", "title": "Support up-to-date dependencies", - "grantedPoints": 20, - "maxPoints": 20, + "grantedPoints": 40, + "maxPoints": 40, "status": "passed", - "summary": "### [*] 10/10 points: All of the package dependencies are supported in the latest version\n\n|Package|Constraint|Compatible|Latest|\n|:-|:-|:-|:-|\n|[`bosun`]|`^0.2.1`|0.2.2|0.2.2|\n|[`flat`]|`^0.4.0`|0.4.1|0.4.1|\n|[`mustache_template`]|`^2.0.0`|2.0.0|2.0.0|\n|[`path_to_regexp`]|`^0.4.0`|0.4.0|0.4.0|\n|[`recase`]|`^4.0.0`|4.1.0|4.1.0|\n|[`yaml`]|`^3.1.0`|3.1.2|3.1.2|\n\n
Transitive dependencies\n\n|Package|Constraint|Compatible|Latest|\n|:-|:-|:-|:-|\n|[`collection`]|-|1.18.0|1.18.0|\n|[`path`]|-|1.8.3|1.8.3|\n|[`source_span`]|-|1.10.0|1.10.0|\n|[`string_scanner`]|-|1.2.0|1.2.0|\n|[`term_glyph`]|-|1.2.1|1.2.1|\n|[`tree_iterator`]|-|2.0.0|3.0.0|\n
\n\nTo reproduce run `dart pub outdated --no-dev-dependencies --up-to-date --no-dependency-overrides`.\n\n[`bosun`]: https://pub.dev/packages/bosun\n[`flat`]: https://pub.dev/packages/flat\n[`mustache_template`]: https://pub.dev/packages/mustache_template\n[`path_to_regexp`]: https://pub.dev/packages/path_to_regexp\n[`recase`]: https://pub.dev/packages/recase\n[`yaml`]: https://pub.dev/packages/yaml\n[`collection`]: https://pub.dev/packages/collection\n[`path`]: https://pub.dev/packages/path\n[`source_span`]: https://pub.dev/packages/source_span\n[`string_scanner`]: https://pub.dev/packages/string_scanner\n[`term_glyph`]: https://pub.dev/packages/term_glyph\n[`tree_iterator`]: https://pub.dev/packages/tree_iterator\n\n\n### [*] 10/10 points: Package supports latest stable Dart and Flutter SDKs\n" + "summary": "### [*] 10/10 points: All of the package dependencies are supported in the latest version\n\n|Package|Constraint|Compatible|Latest|\n|:-|:-|:-|:-|\n|[`bosun`]|`^0.2.1`|0.2.2|0.2.2|\n|[`flat`]|`^0.4.0`|0.4.1|0.4.1|\n|[`mustache_template`]|`^2.0.0`|2.0.0|2.0.0|\n|[`path_to_regexp`]|`^0.4.0`|0.4.0|0.4.0|\n|[`recase`]|`^4.0.0`|4.1.0|4.1.0|\n|[`yaml`]|`^3.1.0`|3.1.2|3.1.2|\n\n
Transitive dependencies\n\n|Package|Constraint|Compatible|Latest|\n|:-|:-|:-|:-|\n|[`collection`]|-|1.18.0|1.18.0|\n|[`path`]|-|1.8.3|1.8.3|\n|[`source_span`]|-|1.10.0|1.10.0|\n|[`string_scanner`]|-|1.2.0|1.2.0|\n|[`term_glyph`]|-|1.2.1|1.2.1|\n|[`tree_iterator`]|-|2.0.0|3.0.0|\n
\n\nTo reproduce run `dart pub outdated --no-dev-dependencies --up-to-date --no-dependency-overrides`.\n\n[`bosun`]: https://pub.dev/packages/bosun\n[`flat`]: https://pub.dev/packages/flat\n[`mustache_template`]: https://pub.dev/packages/mustache_template\n[`path_to_regexp`]: https://pub.dev/packages/path_to_regexp\n[`recase`]: https://pub.dev/packages/recase\n[`yaml`]: https://pub.dev/packages/yaml\n[`collection`]: https://pub.dev/packages/collection\n[`path`]: https://pub.dev/packages/path\n[`source_span`]: https://pub.dev/packages/source_span\n[`string_scanner`]: https://pub.dev/packages/string_scanner\n[`term_glyph`]: https://pub.dev/packages/term_glyph\n[`tree_iterator`]: https://pub.dev/packages/tree_iterator\n\n\n### [*] 10/10 points: Package supports latest stable Dart and Flutter SDKs\n\n\n### [*] 20/20 points: Compatible with dependency constraint lower bounds\n\n`pub downgrade` does not expose any static analysis error." } ] }, @@ -126,8 +126,8 @@ "branch": "main" }, "contributingUrl": "https://github.com/pyrestudios/steward/blob/main/CONTRIBUTING.md", - "grantedPoints": 120, - "maxPoints": 130 + "grantedPoints": 140, + "maxPoints": 150 }, "urlProblems": [] } diff --git a/test/goldens/end2end/steward-0.3.1.json_report.md b/test/goldens/end2end/steward-0.3.1.json_report.md index 057a5ea22..e10b273dd 100644 --- a/test/goldens/end2end/steward-0.3.1.json_report.md +++ b/test/goldens/end2end/steward-0.3.1.json_report.md @@ -103,7 +103,7 @@ INFO: The variable name 'PutAnnotation' isn't a lowerCamelCase identifier. To reproduce make sure you are using the [lints_core](https://pub.dev/packages/lints) and run `dart analyze lib/controllers/route_utils.dart` -## 20/20 Support up-to-date dependencies +## 40/40 Support up-to-date dependencies ### [*] 10/10 points: All of the package dependencies are supported in the latest version @@ -145,3 +145,8 @@ To reproduce run `dart pub outdated --no-dev-dependencies --up-to-date --no-depe ### [*] 10/10 points: Package supports latest stable Dart and Flutter SDKs + + +### [*] 20/20 points: Compatible with dependency constraint lower bounds + +`pub downgrade` does not expose any static analysis error. \ No newline at end of file diff --git a/test/goldens/end2end/url_launcher-6.1.12.json b/test/goldens/end2end/url_launcher-6.1.12.json index 18351006b..55ae627df 100644 --- a/test/goldens/end2end/url_launcher-6.1.12.json +++ b/test/goldens/end2end/url_launcher-6.1.12.json @@ -130,9 +130,9 @@ "id": "dependency", "title": "Support up-to-date dependencies", "grantedPoints": 10, - "maxPoints": 20, + "maxPoints": 40, "status": "failed", - "summary": "### [x] 0/10 points: All of the package dependencies are supported in the latest version\n\n* Could not run `flutter pub outdated`: `flutter pub get` failed:\n\n```\nOUT:\nResolving dependencies...\nERR:\nNote: meta is pinned to version 1.12.0 by flutter from the flutter SDK.\nSee https://dart.dev/go/sdk-version-pinning for details.\n\n\nBecause every version of flutter from sdk depends on meta 1.12.0 which doesn't match any versions, flutter from sdk is forbidden.\nSo, because url_launcher depends on flutter from sdk, version solving failed.\n```\n\n### [*] 10/10 points: Package supports latest stable Dart and Flutter SDKs\n" + "summary": "### [x] 0/10 points: All of the package dependencies are supported in the latest version\n\n* Could not run `flutter pub outdated`: `flutter pub get` failed:\n\n```\nOUT:\nResolving dependencies...\nERR:\nNote: meta is pinned to version 1.12.0 by flutter from the flutter SDK.\nSee https://dart.dev/go/sdk-version-pinning for details.\n\n\nBecause every version of flutter from sdk depends on meta 1.12.0 which doesn't match any versions, flutter from sdk is forbidden.\nSo, because url_launcher depends on flutter from sdk, version solving failed.\n```\n\n### [*] 10/10 points: Package supports latest stable Dart and Flutter SDKs\n\n\n### [x] 0/20 points: Compatible with dependency constraint lower bounds\n\n* `flutter pub downgrade` failed with:\n\n```\nOUT:\nResolving dependencies...\nERR:\nNote: meta is pinned to version 1.12.0 by flutter from the flutter SDK.\nSee https://dart.dev/go/sdk-version-pinning for details.\n\n\nBecause every version of flutter from sdk depends on meta 1.12.0 which doesn't match any versions, flutter from sdk is forbidden.\nSo, because url_launcher depends on flutter from sdk, version solving failed.\n```\n\nRun `flutter pub downgrade` and then `flutter analyze` to reproduce the above problem.\n\nYou may run `dart pub upgrade --tighten` to update your dependency constraints, or visit http://dart.dev/go/downgrade-testing for further help." } ] }, @@ -148,7 +148,7 @@ }, "contributingUrl": "https://github.com/flutter/packages/blob/main/CONTRIBUTING.md", "grantedPoints": 50, - "maxPoints": 140 + "maxPoints": 160 }, "urlProblems": [], "errorMessage": "Running `flutter pub outdated` failed with the following output:\n\n```\nNote: meta is pinned to version 1.12.0 by flutter from the flutter SDK.\nSee https://dart.dev/go/sdk-version-pinning for details.\n```" diff --git a/test/goldens/end2end/url_launcher-6.1.12.json_report.md b/test/goldens/end2end/url_launcher-6.1.12.json_report.md index 599da35e0..6bd5a2bbe 100644 --- a/test/goldens/end2end/url_launcher-6.1.12.json_report.md +++ b/test/goldens/end2end/url_launcher-6.1.12.json_report.md @@ -53,7 +53,7 @@ See https://dart.dev/go/sdk-version-pinning for details. ``` -## 10/20 Support up-to-date dependencies +## 10/40 Support up-to-date dependencies ### [x] 0/10 points: All of the package dependencies are supported in the latest version @@ -72,3 +72,24 @@ So, because url_launcher depends on flutter from sdk, version solving failed. ``` ### [*] 10/10 points: Package supports latest stable Dart and Flutter SDKs + + +### [x] 0/20 points: Compatible with dependency constraint lower bounds + +* `flutter pub downgrade` failed with: + +``` +OUT: +Resolving dependencies... +ERR: +Note: meta is pinned to version 1.12.0 by flutter from the flutter SDK. +See https://dart.dev/go/sdk-version-pinning for details. + + +Because every version of flutter from sdk depends on meta 1.12.0 which doesn't match any versions, flutter from sdk is forbidden. +So, because url_launcher depends on flutter from sdk, version solving failed. +``` + +Run `flutter pub downgrade` and then `flutter analyze` to reproduce the above problem. + +You may run `dart pub upgrade --tighten` to update your dependency constraints, or visit http://dart.dev/go/downgrade-testing for further help. \ No newline at end of file diff --git a/test/goldens/end2end/webdriver-3.0.0.json b/test/goldens/end2end/webdriver-3.0.0.json index f68b3e682..4f41b1e4c 100644 --- a/test/goldens/end2end/webdriver-3.0.0.json +++ b/test/goldens/end2end/webdriver-3.0.0.json @@ -106,10 +106,10 @@ { "id": "dependency", "title": "Support up-to-date dependencies", - "grantedPoints": 20, - "maxPoints": 20, + "grantedPoints": 40, + "maxPoints": 40, "status": "passed", - "summary": "### [*] 10/10 points: All of the package dependencies are supported in the latest version\n\n|Package|Constraint|Compatible|Latest|\n|:-|:-|:-|:-|\n|[`archive`]|`^3.0.0`|3.4.6|3.4.6|\n|[`matcher`]|`^0.12.10`|0.12.16|0.12.16|\n|[`path`]|`^1.8.0`|1.8.3|1.8.3|\n|[`stack_trace`]|`^1.10.0`|1.11.1|1.11.1|\n|[`sync_http`]|`^0.3.0`|0.3.1|0.3.1|\n\n
Transitive dependencies\n\n|Package|Constraint|Compatible|Latest|\n|:-|:-|:-|:-|\n|[`async`]|-|2.11.0|2.11.0|\n|[`boolean_selector`]|-|2.1.1|2.1.1|\n|[`collection`]|-|1.18.0|1.18.0|\n|[`convert`]|-|3.1.1|3.1.1|\n|[`crypto`]|-|3.0.3|3.0.3|\n|[`js`]|-|0.6.7|0.6.7|\n|[`meta`]|-|1.11.0|1.11.0|\n|[`pointycastle`]|-|3.7.3|3.7.3|\n|[`source_span`]|-|1.10.0|1.10.0|\n|[`stream_channel`]|-|2.1.2|2.1.2|\n|[`string_scanner`]|-|1.2.0|1.2.0|\n|[`term_glyph`]|-|1.2.1|1.2.1|\n|[`test_api`]|-|0.6.1|0.6.1|\n|[`typed_data`]|-|1.3.2|1.3.2|\n
\n\nTo reproduce run `dart pub outdated --no-dev-dependencies --up-to-date --no-dependency-overrides`.\n\n[`archive`]: https://pub.dev/packages/archive\n[`matcher`]: https://pub.dev/packages/matcher\n[`path`]: https://pub.dev/packages/path\n[`stack_trace`]: https://pub.dev/packages/stack_trace\n[`sync_http`]: https://pub.dev/packages/sync_http\n[`async`]: https://pub.dev/packages/async\n[`boolean_selector`]: https://pub.dev/packages/boolean_selector\n[`collection`]: https://pub.dev/packages/collection\n[`convert`]: https://pub.dev/packages/convert\n[`crypto`]: https://pub.dev/packages/crypto\n[`js`]: https://pub.dev/packages/js\n[`meta`]: https://pub.dev/packages/meta\n[`pointycastle`]: https://pub.dev/packages/pointycastle\n[`source_span`]: https://pub.dev/packages/source_span\n[`stream_channel`]: https://pub.dev/packages/stream_channel\n[`string_scanner`]: https://pub.dev/packages/string_scanner\n[`term_glyph`]: https://pub.dev/packages/term_glyph\n[`test_api`]: https://pub.dev/packages/test_api\n[`typed_data`]: https://pub.dev/packages/typed_data\n\n\n### [*] 10/10 points: Package supports latest stable Dart and Flutter SDKs\n" + "summary": "### [*] 10/10 points: All of the package dependencies are supported in the latest version\n\n|Package|Constraint|Compatible|Latest|\n|:-|:-|:-|:-|\n|[`archive`]|`^3.0.0`|3.4.6|3.4.6|\n|[`matcher`]|`^0.12.10`|0.12.16|0.12.16|\n|[`path`]|`^1.8.0`|1.8.3|1.8.3|\n|[`stack_trace`]|`^1.10.0`|1.11.1|1.11.1|\n|[`sync_http`]|`^0.3.0`|0.3.1|0.3.1|\n\n
Transitive dependencies\n\n|Package|Constraint|Compatible|Latest|\n|:-|:-|:-|:-|\n|[`async`]|-|2.11.0|2.11.0|\n|[`boolean_selector`]|-|2.1.1|2.1.1|\n|[`collection`]|-|1.18.0|1.18.0|\n|[`convert`]|-|3.1.1|3.1.1|\n|[`crypto`]|-|3.0.3|3.0.3|\n|[`js`]|-|0.6.7|0.6.7|\n|[`meta`]|-|1.11.0|1.11.0|\n|[`pointycastle`]|-|3.7.3|3.7.3|\n|[`source_span`]|-|1.10.0|1.10.0|\n|[`stream_channel`]|-|2.1.2|2.1.2|\n|[`string_scanner`]|-|1.2.0|1.2.0|\n|[`term_glyph`]|-|1.2.1|1.2.1|\n|[`test_api`]|-|0.6.1|0.6.1|\n|[`typed_data`]|-|1.3.2|1.3.2|\n
\n\nTo reproduce run `dart pub outdated --no-dev-dependencies --up-to-date --no-dependency-overrides`.\n\n[`archive`]: https://pub.dev/packages/archive\n[`matcher`]: https://pub.dev/packages/matcher\n[`path`]: https://pub.dev/packages/path\n[`stack_trace`]: https://pub.dev/packages/stack_trace\n[`sync_http`]: https://pub.dev/packages/sync_http\n[`async`]: https://pub.dev/packages/async\n[`boolean_selector`]: https://pub.dev/packages/boolean_selector\n[`collection`]: https://pub.dev/packages/collection\n[`convert`]: https://pub.dev/packages/convert\n[`crypto`]: https://pub.dev/packages/crypto\n[`js`]: https://pub.dev/packages/js\n[`meta`]: https://pub.dev/packages/meta\n[`pointycastle`]: https://pub.dev/packages/pointycastle\n[`source_span`]: https://pub.dev/packages/source_span\n[`stream_channel`]: https://pub.dev/packages/stream_channel\n[`string_scanner`]: https://pub.dev/packages/string_scanner\n[`term_glyph`]: https://pub.dev/packages/term_glyph\n[`test_api`]: https://pub.dev/packages/test_api\n[`typed_data`]: https://pub.dev/packages/typed_data\n\n\n### [*] 10/10 points: Package supports latest stable Dart and Flutter SDKs\n\n\n### [*] 20/20 points: Compatible with dependency constraint lower bounds\n\n`pub downgrade` does not expose any static analysis error." } ] }, @@ -124,8 +124,8 @@ "branch": "master" }, "contributingUrl": "https://github.com/google/webdriver.dart/blob/master/CONTRIBUTING.md", - "grantedPoints": 80, - "maxPoints": 130 + "grantedPoints": 100, + "maxPoints": 150 }, "urlProblems": [] } diff --git a/test/goldens/end2end/webdriver-3.0.0.json_report.md b/test/goldens/end2end/webdriver-3.0.0.json_report.md index f53fbfbd3..f602f1130 100644 --- a/test/goldens/end2end/webdriver-3.0.0.json_report.md +++ b/test/goldens/end2end/webdriver-3.0.0.json_report.md @@ -132,7 +132,7 @@ WARNING: Unnecessary type check; the result is always 'true'. To reproduce make sure you are using the [lints_core](https://pub.dev/packages/lints) and run `dart analyze lib/src/handler/json_wire/utils.dart` -## 20/20 Support up-to-date dependencies +## 40/40 Support up-to-date dependencies ### [*] 10/10 points: All of the package dependencies are supported in the latest version @@ -188,3 +188,8 @@ To reproduce run `dart pub outdated --no-dev-dependencies --up-to-date --no-depe ### [*] 10/10 points: Package supports latest stable Dart and Flutter SDKs + + +### [*] 20/20 points: Compatible with dependency constraint lower bounds + +`pub downgrade` does not expose any static analysis error. \ No newline at end of file diff --git a/test/report/dependencies_test.dart b/test/report/dependencies_test.dart index 686084295..8b2379d5e 100644 --- a/test/report/dependencies_test.dart +++ b/test/report/dependencies_test.dart @@ -39,7 +39,7 @@ void main() { { final section = await trustworthyDependency(await newContext()); - expect(section.grantedPoints, 20); + expect(section.grantedPoints, section.maxPoints); } DateTime daysAgo(int days) => DateTime.now().subtract(Duration(days: days)); @@ -63,7 +63,7 @@ void main() { '* The constraint `^1.1.0` on foo does not support the stable version `4.0.0`, ' 'but that version doesn\'t support the current Dart SDK version $currentSdkVersion')); - expect(section.grantedPoints, 20); + expect(section.grantedPoints, section.maxPoints); } { globalPackageServer! @@ -76,7 +76,7 @@ void main() { 'The constraint `^1.1.0` on foo does not support the stable version `3.0.0`, that was published 3 days ago.'), ); - expect(section.grantedPoints, 20); + expect(section.grantedPoints, section.maxPoints); } { globalPackageServer!.add( @@ -99,7 +99,7 @@ void main() { contains( 'The constraint `^1.1.0` on foo does not support the stable version `2.0.0`.'), ); - expect(section.grantedPoints, 10); + expect(section.grantedPoints, section.maxPoints - 10); } }); @@ -118,7 +118,7 @@ void main() { packageDir: descriptor.io.path, ); final section = await trustworthyDependency(context); - expect(section.grantedPoints, 20); + expect(section.grantedPoints, section.maxPoints); }); test('Understands `>=2.12.0 <3.0.0` as `>=2.12.0 <4.0.0`', () async { @@ -135,7 +135,7 @@ void main() { packageDir: descriptor.io.path, ); final section = await trustworthyDependency(context); - expect(section.grantedPoints, 20); + expect(section.grantedPoints, section.maxPoints); }); test('complains about Flutter constraint upper bound', () async {