diff --git a/.github/workflows/dart-ci.yml b/.github/workflows/dart-ci.yml index 7d76618..89647c3 100644 --- a/.github/workflows/dart-ci.yml +++ b/.github/workflows/dart-ci.yml @@ -1,6 +1,6 @@ name: Dart CI on: - pull_request_target: + pull_request: push: branches: - main @@ -19,10 +19,9 @@ jobs: - name: Verify formatting run: dart format --output=none --set-exit-if-changed . - - - name: Dart Analyze project source - run: dart analyze --fatal-infos - + - uses: invertase/github-action-dart-analyzer@v1 + with: + fatal-infos: true - name: Flutter Analyze project source run: flutter analyze . diff --git a/lib/src/stock_response.dart b/lib/src/stock_response.dart index d58afa8..f9a8d43 100644 --- a/lib/src/stock_response.dart +++ b/lib/src/stock_response.dart @@ -43,12 +43,11 @@ final class StockResponseLoading extends StockResponse { String toString() => 'StockResponse<$T>.loading(origin: $origin)'; @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is StockResponseLoading && - origin == other.origin); - } + bool operator ==(Object other) => + identical(this, other) || + (other.runtimeType == runtimeType && + other is StockResponseLoading && + origin == other.origin); @override int get hashCode => Object.hash(runtimeType, origin.hashCode); @@ -67,7 +66,7 @@ final class StockResponseData extends StockResponse { String toString() => 'StockResponse<$T>.data(origin: $origin, value: $value)'; @override - bool operator ==(dynamic other) => + bool operator ==(Object other) => identical(this, other) || (other.runtimeType == runtimeType && other is StockResponseData && @@ -97,7 +96,7 @@ final class StockResponseError extends StockResponse { 'stackTrace: $stackTrace)'; @override - bool operator ==(dynamic other) => + bool operator ==(Object other) => identical(this, other) || (other.runtimeType == runtimeType && other is StockResponseError && diff --git a/pubspec.lock b/pubspec.lock index 2739147..f9b4b91 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -77,10 +77,10 @@ packages: dependency: "direct dev" description: name: build_runner - sha256: "10c6bcdbf9d049a0b666702cf1cee4ddfdc38f02a19d35ae392863b47519848b" + sha256: "3ac61a79bfb6f6cc11f693591063a7f19a7af628dc52f141743edac5c16e8c22" url: "https://pub.dev" source: hosted - version: "2.4.6" + version: "2.4.9" build_runner_core: dependency: transitive description: @@ -245,10 +245,10 @@ packages: dependency: "direct dev" description: name: lints - sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452" + sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290 url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "3.0.0" logging: dependency: transitive description: @@ -261,18 +261,18 @@ packages: dependency: transitive description: name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.16" + version: "0.12.16+1" meta: dependency: "direct main" description: name: meta - sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e + sha256: "25dfcaf170a0190f47ca6355bdd4552cb8924b430512ff0cafb8db9bd41fe33b" url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.14.0" mime: dependency: transitive description: @@ -285,18 +285,18 @@ packages: dependency: "direct dev" description: name: mockito - sha256: "7d5b53bcd556c1bc7ffbe4e4d5a19c3e112b7e925e9e172dd7c6ad0630812616" + sha256: "6841eed20a7befac0ce07df8116c8b8233ed1f4486a7647c7fc5a02ae6163917" url: "https://pub.dev" source: hosted - version: "5.4.2" + version: "5.4.4" mutex: dependency: "direct main" description: name: mutex - sha256: "03116a4e46282a671b46c12de649d72c0ed18188ffe12a8d0fc63e83f4ad88f4" + sha256: "8827da25de792088eb33e572115a5eb0d61d61a3c01acbc8bcbe76ed78f1a1f2" url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.1.0" node_preamble: dependency: transitive description: @@ -461,26 +461,26 @@ packages: dependency: "direct dev" description: name: test - sha256: a20ddc0723556dc6dd56094e58ec1529196d5d7774156604cb14e8445a5a82ff + sha256: d11b55850c68c1f6c0cf00eabded4e66c4043feaf6c0d7ce4a36785137df6331 url: "https://pub.dev" source: hosted - version: "1.24.7" + version: "1.25.5" test_api: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "2419f20b0c8677b2d67c8ac4d1ac7372d862dc6c460cdbb052b40155408cd794" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.1" test_core: dependency: transitive description: name: test_core - sha256: "96382d0bc826e260b077bb496259e58bc82e90b603ab16cd5ae95dfe1dfcba8b" + sha256: "4d070a6bc36c1c4e89f20d353bfd71dc30cdf2bd0e14349090af360a029ab292" url: "https://pub.dev" source: hosted - version: "0.5.7" + version: "0.6.2" timing: dependency: transitive description: @@ -546,4 +546,4 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.0.0 <4.0.0" + dart: ">=3.1.0 <4.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 8562600..6f42809 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -11,12 +11,12 @@ environment: dependencies: meta: ^1.3.0 - mutex: ^3.0.0 + mutex: ^3.1.0 rxdart: ^0.27.2 dev_dependencies: - build_runner: 2.4.6 - lints: 2.1.1 - mockito: 5.4.2 - test: 1.24.7 - very_good_analysis: 5.1.0 + build_runner: ^2.4.9 + lints: ^3.0.0 + mockito: ^5.4.4 + test: ^1.25.5 + very_good_analysis: ^5.1.0 diff --git a/test/common_mocks.mocks.dart b/test/common_mocks.mocks.dart index 54ccc83..9ab5d74 100644 --- a/test/common_mocks.mocks.dart +++ b/test/common_mocks.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.2 from annotations +// Mocks generated by Mockito 5.4.4 from annotations // in stock/test/common_mocks.dart. // Do not manually edit this file. @@ -14,6 +14,8 @@ import 'stock_response_extension_test.dart' as _i2; // ignore_for_file: avoid_redundant_argument_values // ignore_for_file: avoid_setters_without_getters // ignore_for_file: comment_references +// ignore_for_file: deprecated_member_use +// ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member // ignore_for_file: prefer_const_constructors