Skip to content

Commit a8de8c5

Browse files
authored
1.2.0 (#12)
* deps * lints * lints * lints * github actions
1 parent d2613b8 commit a8de8c5

File tree

11 files changed

+80
-46
lines changed

11 files changed

+80
-46
lines changed

.github/workflows/dart.yml

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Dart CI
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
schedule:
9+
# Runs at 02:00 UTC on the 1, 4, 7, 10, 13, 16, 19, 22, 25, 28 and 31st of every month.
10+
- cron: "0 2 */3 * *"
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
17+
strategy:
18+
matrix:
19+
container: [ 'google/dart:latest', 'google/dart:dev' ]
20+
21+
container:
22+
image: ${{ matrix.container }}
23+
24+
steps:
25+
- uses: actions/checkout@v2
26+
27+
- name: Print Dart version
28+
run: dart --version
29+
30+
- name: Install dependencies
31+
run: pub get
32+
33+
- name: Analyze
34+
run: dart analyze --fatal-infos --fatal-warnings
35+
36+
- name: Format code
37+
run: dart format . --set-exit-if-changed
38+
39+
- name: Active coverage
40+
run: pub global activate coverage
41+
42+
- name: Run tests
43+
run: pub run test test/rx_storage_test.dart --chain-stack-traces
44+
45+
- name: Start Observatory
46+
run: dart --disable-service-auth-codes --enable-vm-service=8111 --pause-isolates-on-exit --enable-asserts test/rx_storage_test.dart &
47+
48+
- name: Collect coverage
49+
run: nohup pub global run coverage:collect_coverage --port=8111 --out=coverage.json --wait-paused --resume-isolates
50+
51+
- name: Format coverage
52+
run: pub global run coverage:format_coverage --lcov --in=coverage.json --out=lcov.info --packages=.packages --report-on=lib
53+
54+
- uses: codecov/[email protected]

.travis.yml

-31
This file was deleted.

AUTHORS

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Petrus Nguyễn Thái Học <[email protected]>

CHANGELOG.md

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
## 1.2.0 - Sep 11, 2021
2+
3+
- Update dependencies
4+
- `rxdart` to `0.27.2`
5+
- `rxdart_ext` to `0.1.2`
6+
- `meta` to `1.7.0`
7+
8+
- Internal: migrated from `pedantic` to `lints`.
9+
110
## 1.1.0 - May 9, 2021
211

312
- Update `rxdart` to `0.27.0`.

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2020 Flutter-Dart-Open-Source - Petrus Nguyễn Thái Học
3+
Copyright (c) 2020-2021 Flutter-Dart-Open-Source - Petrus Nguyễn Thái Học
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

analysis_options.yaml

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
include: package:pedantic/analysis_options.1.11.0.yaml
1+
include: package:lints/recommended.yaml
22
analyzer:
33
strong-mode:
44
implicit-casts: false
@@ -7,4 +7,8 @@ linter:
77
rules:
88
- public_member_api_docs
99
- prefer_final_locals
10-
- prefer_relative_imports
10+
- prefer_relative_imports
11+
- always_declare_return_types # https://github.com/dart-lang/lints#migrating-from-packagepedantic
12+
- prefer_single_quotes # https://github.com/dart-lang/lints#migrating-from-packagepedantic
13+
- unawaited_futures # https://github.com/dart-lang/lints#migrating-from-packagepedantic
14+
- unsafe_html # https://github.com/dart-lang/lints#migrating-from-packagepedantic

example/rx_storage_example.dart

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

lib/src/impl/real_storage.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ class RealRxStorage<Key extends Object, Options,
396396
Future<void> dispose() {
397397
assert(_debugAssertNotDisposed());
398398

399-
final dispose = () =>
399+
Future<void> dispose() =>
400400
Future.wait(_writeQueueResources.values.map((q) => q.dispose()))
401401
.then((_) => _writeQueueResources.clear())
402402
.then((_) => _bag.dispose());

pubspec.yaml

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
name: rx_storage
22
description: Reactive storage for Dart/Flutter. RxDart Storage for Dart/Flutter.
3-
version: 1.1.0
4-
author: Petrus Nguyen Thai Hoc <[email protected]>
3+
version: 1.2.0
54
homepage: https://github.com/Flutter-Dart-Open-Source/rx_storage.git
65
repository: https://github.com/Flutter-Dart-Open-Source/rx_storage.git
76
issue_tracker: https://github.com/Flutter-Dart-Open-Source/rx_storage/issues
@@ -10,12 +9,12 @@ environment:
109
sdk: '>=2.12.0 <3.0.0'
1110

1211
dependencies:
13-
rxdart_ext: ^0.1.0
12+
rxdart_ext: ^0.1.2
1413
disposebag: ^1.5.0
15-
meta: ^1.3.0
14+
meta: ^1.7.0
1615
stack_trace: ^1.10.0
1716

1817
dev_dependencies:
19-
pedantic: ^1.11.0
20-
test: ^1.17.3
18+
lints: ^1.0.1
19+
test: ^1.17.12
2120
collection: ^1.15.0

test/logger/default_logger_test.dart

-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ void main() {
2020
' → { key: key2, type: int, value: 2 }\n',
2121
].join('\n')),
2222
);
23-
;
2423
});
2524

2625
test('OnDataStreamEvent', () {

test/storage/streams_test.dart

+2-4
Original file line numberDiff line numberDiff line change
@@ -405,8 +405,7 @@ void main() {
405405
await rxStorage.executeUpdate<User>(
406406
'User',
407407
jsonStringToUser, // read
408-
(user) =>
409-
user != null ? user.withName('Transformed ${user.name}') : null,
408+
(user) => user?.withName('Transformed ${user.name}'),
410409
// modify
411410
userToJsonString, // write
412411
);
@@ -434,8 +433,7 @@ void main() {
434433
rxStorage.executeUpdate<User>(
435434
'User',
436435
jsonStringToUser, // read
437-
(user) =>
438-
user != null ? user.withName('Transformed ${user.name}') : null,
436+
(user) => user?.withName('Transformed ${user.name}'),
439437
// modify
440438
userToJsonString, // write
441439
),

0 commit comments

Comments
 (0)