Skip to content

Commit

Permalink
feat!: v2.0.0-nullsafety.0
Browse files Browse the repository at this point in the history
  • Loading branch information
felangel committed Nov 22, 2020
1 parent 3ca74d7 commit 60409c5
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 30 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ 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
run: pub get
- 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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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))
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 0 additions & 2 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ analyzer:
implicit-dynamic: false
errors:
close_sinks: ignore
enable-experiment:
- non-nullable

linter:
rules:
Expand Down
3 changes: 0 additions & 3 deletions example/analysis_options.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion example/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
15 changes: 7 additions & 8 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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
11 changes: 3 additions & 8 deletions test/equatable_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -742,11 +742,9 @@ void main() {

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']),
);
Expand All @@ -755,11 +753,10 @@ void main() {
});

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']),
);
Expand All @@ -768,11 +765,10 @@ void main() {
});

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']),
);
Expand All @@ -781,11 +777,10 @@ void main() {
});

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']),
);
Expand Down

0 comments on commit 60409c5

Please sign in to comment.