From abf01d36b770db326774495c0afd6faa51c7c602 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Wed, 18 Dec 2024 13:28:29 -0600 Subject: [PATCH] Bump deps, prepare v5.4.5 (#789) Also un-archive this repo - for now --- .github/workflows/test-package.yml | 8 ++------ CHANGELOG.md | 10 +++++----- README.md | 3 --- lib/mockito.dart | 2 ++ lib/src/builder.dart | 4 ++-- pubspec.yaml | 30 ++++++++++++++--------------- test/builder/auto_mocks_test.dart | 2 ++ test/builder/custom_mocks_test.dart | 2 ++ 8 files changed, 30 insertions(+), 31 deletions(-) diff --git a/.github/workflows/test-package.yml b/.github/workflows/test-package.yml index b5331a38..824462b8 100644 --- a/.github/workflows/test-package.yml +++ b/.github/workflows/test-package.yml @@ -37,8 +37,6 @@ jobs: strategy: fail-fast: false matrix: - # TODO(srawlins): Re-enable stable Dart when 3.6.0 is available. - #sdk: [3.5.0, dev] sdk: [dev] steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 @@ -51,7 +49,7 @@ jobs: - name: Build generated artifacts run: dart pub run build_runner build - name: Analyze code - run: dart analyze + run: dart analyze --fatal-infos # Run tests against stable and dev SDKs. test: @@ -61,9 +59,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - # TODO(srawlins): Re-enable stable Dart when 3.6.0 is available. - #sdk: [3.5.0, dev] - sdk: [dev] + sdk: [3.6.0, dev] steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 diff --git a/CHANGELOG.md b/CHANGELOG.md index fe2babbf..06fb5c82 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,11 +3,11 @@ * Ignore "must_be_immutable" warning in generated files. Mocks cannot be made immutable anyway, but this way users aren't prevented from using generated mocks altogether. -* Require Dart SDK ^3.6.0-0. -* Require analyzer ^6.9.0. -* Require build_runner ^2.4.11. -* Require dart_style ^2.3.7, so that the current Dart language version can be - passed to `DartFormatter`. +* Require Dart SDK ^3.6.0. +* Require `analyzer: '>=6.9.0 <8.0.0'`. +* Require `dart_style: '>=2.3.7 <4.0.0'`, so that the current Dart language + version can be passed to `DartFormatter`. +* Require `source_gen: ">=1.4.0 <3.0.0"`. * Add support for extension types. * Add topics to `pubspec.yaml`. * Fix a bug where type aliases in type arguments were not correctly diff --git a/README.md b/README.md index bb40fbab..a9fdfac6 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,3 @@ -> [!IMPORTANT] -> This repo has moved to https://github.com/dart-lang/test/tree/master/pkgs/mockito - [![Dart CI](https://github.com/dart-lang/mockito/actions/workflows/test-package.yml/badge.svg)](https://github.com/dart-lang/mockito/actions/workflows/test-package.yml) [![Pub](https://img.shields.io/pub/v/mockito.svg)](https://pub.dev/packages/mockito) [![package publisher](https://img.shields.io/pub/publisher/mockito.svg)](https://pub.dev/packages/mockito/publisher) diff --git a/lib/mockito.dart b/lib/mockito.dart index 312fee4c..354ce1d1 100644 --- a/lib/mockito.dart +++ b/lib/mockito.dart @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +// ignore_for_file: combinators_ordering + // ignore: deprecated_member_use export 'package:test_api/fake.dart' show Fake; diff --git a/lib/src/builder.dart b/lib/src/builder.dart index 57d2ca1a..5573cecd 100644 --- a/lib/src/builder.dart +++ b/lib/src/builder.dart @@ -1707,8 +1707,8 @@ class _MockClassInfo { ..initializers.add(refer('super') .call([refer('parent'), refer('parentInvocation')]).code))); - final toStringMethod = - elementToFake.lookUpMethod('toString', elementToFake.library); + final toStringMethod = elementToFake.augmented + .lookUpMethod(name: 'toString', library: elementToFake.library); if (toStringMethod != null && toStringMethod.parameters.isNotEmpty) { // If [elementToFake] includes an overriding `toString` implementation, // we need to include an implementation which matches the signature. diff --git a/pubspec.yaml b/pubspec.yaml index c41ff6c8..c3931c96 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -10,25 +10,25 @@ topics: - mocking environment: - sdk: ^3.6.0-0 + sdk: ^3.6.0 dependencies: - analyzer: '>=6.9.0 <7.0.0' - build: ^2.0.0 + analyzer: '>=6.9.0 <8.0.0' + build: ^2.4.1 code_builder: ^4.5.0 - collection: ^1.15.0 - dart_style: ^2.3.7 - matcher: ^0.12.15 - meta: ^1.3.0 - path: ^1.8.0 - source_gen: ^1.0.0 - test_api: '>=0.2.1 <0.8.0' + collection: ^1.19.0 + dart_style: '>=2.3.7 <4.0.0' + matcher: ^0.12.16 + meta: ^1.15.0 + path: ^1.9.0 + source_gen: ">=1.4.0 <3.0.0" + test_api: ">=0.6.1 <0.8.0" dev_dependencies: build_runner: ^2.4.11 - build_test: ^2.0.0 - build_web_compilers: '>=3.0.0 <5.0.0' + build_test: ^2.1.7 + build_web_compilers: ^4.0.11 http: ^1.0.0 - lints: ^3.0.0 - package_config: ^2.0.0 - test: ^1.16.0 + lints: ^5.1.0 + package_config: ^2.1.0 + test: ^1.24.4 diff --git a/test/builder/auto_mocks_test.dart b/test/builder/auto_mocks_test.dart index 7a5aec29..ddd9437d 100644 --- a/test/builder/auto_mocks_test.dart +++ b/test/builder/auto_mocks_test.dart @@ -13,6 +13,8 @@ // limitations under the License. @TestOn('vm') +library; + import 'dart:convert' show utf8; import 'package:build/build.dart'; diff --git a/test/builder/custom_mocks_test.dart b/test/builder/custom_mocks_test.dart index 0ec23ade..7bf92629 100644 --- a/test/builder/custom_mocks_test.dart +++ b/test/builder/custom_mocks_test.dart @@ -13,6 +13,8 @@ // limitations under the License. @TestOn('vm') +library; + import 'dart:convert' show utf8; import 'package:build/build.dart';