feat!: v2.0.0-nullsafety.0
diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml
index 9cb2f8c..222a6a3 100644
--- a/.github/workflows/main.yaml
+++ b/.github/workflows/main.yaml
@@ -12,7 +12,7 @@
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 @@
- 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 3b404c0..99a2da8 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 d11972c..ba8528b 100644
--- a/README.md
+++ b/README.md
@@ -108,7 +108,7 @@
```yaml
dependencies:
- equatable: ^1.2.5
+ equatable: ^2.0.0-nullsafety.0
```
Next, we need to install it:
@@ -178,8 +178,8 @@
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 9ac005e..e7fcb23 100644
--- a/analysis_options.yaml
+++ b/analysis_options.yaml
@@ -4,8 +4,6 @@
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 4163582..0000000
--- 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 1def8cd..bcdd28f 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 bba9187..418fc00 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 eb60e3f..1626f55 100644
--- a/test/equatable_test.dart
+++ b/test/equatable_test.dart
@@ -742,11 +742,9 @@
group('Set Equatable', () {
test('should return when values are same', () {
- // ignore: prefer_collection_literals
final instanceA = SimpleEquatable<Set<String>>(
Set.from(<String>['A', 'B']),
);
- // ignore: prefer_collection_literals
final instanceB = SimpleEquatable<Set<String>>(
Set.from(<String>['A', 'B']),
);
@@ -755,11 +753,10 @@
});
test('should return when values are same', () {
- // ignore: prefer_collection_literals
final instanceA = SimpleEquatable<Set<String>>(
Set.from(<String>['A', 'B', 'A']),
);
- // ignore: prefer_collection_literals
+
final instanceB = SimpleEquatable<Set<String>>(
Set.from(<String>['A', 'B']),
);
@@ -768,11 +765,10 @@
});
test('should return when values are different', () {
- // ignore: prefer_collection_literals
final instanceA = SimpleEquatable<Set<String>>(
Set.from(<String>['A', 'B']),
);
- // ignore: prefer_collection_literals
+
final instanceB = SimpleEquatable<Set<String>>(
Set.from(<String>['a', 'b']),
);
@@ -781,11 +777,10 @@
});
test('should return when values are different', () {
- // ignore: prefer_collection_literals
final instanceA = SimpleEquatable<Set<String>>(
Set.from(<String>['A', 'B']),
);
- // ignore: prefer_collection_literals
+
final instanceB = SimpleEquatable<Set<String>>(
Set.from(<String>['C', 'D']),
);