diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 9cb2f8ca..222a6a3f 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -12,7 +12,7 @@ jobs: build: runs-on: ubuntu-latest container: - image: google/dart:2.10.0-99.0.dev + image: google/dart:2.12-dev steps: - uses: actions/checkout@v2 - name: Install Dependencies @@ -20,8 +20,8 @@ jobs: - name: Format run: dartfmt --dry-run --set-exit-if-changed . - name: Analyze - run: dartanalyzer --enable-experiment=non-nullable --fatal-infos --fatal-warnings lib test + run: dartanalyzer --fatal-infos --fatal-warnings lib test - name: Run tests - run: pub run --enable-experiment=non-nullable test - # - name: Check Code Coverage - # uses: ChicagoFlutter/lcov-cop@v1.0.0 + run: dart test --coverage=coverage && pub run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info --packages=.packages --report-on=lib + - name: Check Code Coverage + uses: VeryGoodOpenSource/very_good_coverage@v1.1.1 diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b404c09..99a2da82 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# 2.0.0-nullsafety.0 + +- **BREAKING**: opt into null safety +- feat!: upgrade Dart SDK constraints to `>=2.12.0-0 <3.0.0` +- docs: minor updates to `README` and `example` + # 1.2.5 - docs: dartdoc improvements ([#80](https://github.com/felangel/equatable/issues/80)) diff --git a/README.md b/README.md index d11972c9..ba8528be 100644 --- a/README.md +++ b/README.md @@ -108,7 +108,7 @@ First, we need to do add `equatable` to the dependencies of the `pubspec.yaml` ```yaml dependencies: - equatable: ^1.2.5 + equatable: ^2.0.0-nullsafety.0 ``` Next, we need to install it: @@ -178,8 +178,8 @@ class Person extends Equatable { Equatable can implement `toString` method including all the given props. If you want that behaviour, just include the following: ```dart - @override - bool get stringify => true; +@override +bool get stringify => true; ``` For instance: diff --git a/analysis_options.yaml b/analysis_options.yaml index 9ac005ef..e7fcb233 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -4,8 +4,6 @@ analyzer: implicit-dynamic: false errors: close_sinks: ignore - enable-experiment: - - non-nullable linter: rules: diff --git a/example/analysis_options.yaml b/example/analysis_options.yaml deleted file mode 100644 index 41635820..00000000 --- a/example/analysis_options.yaml +++ /dev/null @@ -1,3 +0,0 @@ -analyzer: - enable-experiment: - - non-nullable diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 1def8cd0..bcdd28fd 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -1,7 +1,7 @@ name: example environment: - sdk: ">=2.10.0-99.0.dev <3.0.0" + sdk: ">=2.12.0-0 <3.0.0" dependencies: equatable: diff --git a/pubspec.yaml b/pubspec.yaml index bba91872..418fc00a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,19 +1,18 @@ name: equatable -publish_to: none -description: An abstract class that helps to implement equality without needing to explicitly override == and hashCode. -version: 1.3.0-nullsafety +description: A Dart package that helps to implement value based equality without needing to explicitly override == and hashCode. +version: 2.0.0-nullsafety.0 repository: https://github.com/felangel/equatable issue_tracker: https://github.com/felangel/equatable/issues homepage: https://github.com/felangel/equatable documentation: https://github.com/felangel/equatable environment: - sdk: ">=2.10.0-99.0.dev <3.0.0" + sdk: ">=2.12.0-0 <3.0.0" dependencies: - collection: ^1.15.0-nullsafety.2 - meta: ^1.3.0-nullsafety.2 + collection: ^1.15.0-nullsafety.5 + meta: ^1.3.0-nullsafety.6 dev_dependencies: - test: ^1.16.0-nullsafety.2 - test_coverage: ^0.4.1 + coverage: ^0.14.2 + test: ^1.16.0-nullsafety.12 diff --git a/test/equatable_test.dart b/test/equatable_test.dart index eb60e3f2..1626f552 100644 --- a/test/equatable_test.dart +++ b/test/equatable_test.dart @@ -742,11 +742,9 @@ void main() { group('Set Equatable', () { test('should return when values are same', () { - // ignore: prefer_collection_literals final instanceA = SimpleEquatable>( Set.from(['A', 'B']), ); - // ignore: prefer_collection_literals final instanceB = SimpleEquatable>( Set.from(['A', 'B']), ); @@ -755,11 +753,10 @@ void main() { }); test('should return when values are same', () { - // ignore: prefer_collection_literals final instanceA = SimpleEquatable>( Set.from(['A', 'B', 'A']), ); - // ignore: prefer_collection_literals + final instanceB = SimpleEquatable>( Set.from(['A', 'B']), ); @@ -768,11 +765,10 @@ void main() { }); test('should return when values are different', () { - // ignore: prefer_collection_literals final instanceA = SimpleEquatable>( Set.from(['A', 'B']), ); - // ignore: prefer_collection_literals + final instanceB = SimpleEquatable>( Set.from(['a', 'b']), ); @@ -781,11 +777,10 @@ void main() { }); test('should return when values are different', () { - // ignore: prefer_collection_literals final instanceA = SimpleEquatable>( Set.from(['A', 'B']), ); - // ignore: prefer_collection_literals + final instanceB = SimpleEquatable>( Set.from(['C', 'D']), );