Skip to content

Commit 54cac1f

Browse files
authored
chore: bump release versions (#140)
1 parent 4d66ef5 commit 54cac1f

File tree

9 files changed

+27
-11
lines changed

9 files changed

+27
-11
lines changed

.github/workflows/main.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,6 @@ jobs:
8585
- name: 🎯 Build ${{ matrix.package }}
8686
uses: ./.github/actions/dart_package
8787
with:
88-
# TODO: remove when fresh_http v0.1.0 is published.
89-
collect_score: ${{ matrix.package != 'fresh_http'}}
9088
min_coverage: 100
9189
working_directory: packages/${{ matrix.package }}
9290

packages/fresh/CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# 0.6.1.
2+
3+
- fix: guard authenticationStatus emits on whether internal controller is closed
4+
- fix: minor analysis warnings
5+
16
# 0.6.0
27

38
- **BREAKING**: `FreshMixin` now requires implementing `performTokenRefresh(T? token)` for raw refresh logic ([#130](https://github.com/felangel/fresh/pull/130))
@@ -9,7 +14,7 @@
914
# 0.5.0
1015

1116
- feat: add `Token` base class for token extensibility
12-
- feat: add `OAuth2Token.issuedAt` field for token issue date tracking
17+
- feat: add `OAuth2Token.issuedAt` field for token issue date tracking
1318
- feat: add `Token.expiresAt` getter for token expiration validation
1419

1520
# 0.4.4

packages/fresh/lib/src/fresh.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ mixin FreshMixin<T> {
136136
_token = null;
137137
if (_authenticationStatus != AuthenticationStatus.unauthenticated) {
138138
_authenticationStatus = AuthenticationStatus.unauthenticated;
139-
_controller.add(_authenticationStatus);
139+
if (!_controller.isClosed) _controller.add(_authenticationStatus);
140140
}
141141
await _tokenStorage.delete();
142142
}
@@ -239,6 +239,6 @@ mixin FreshMixin<T> {
239239
? AuthenticationStatus.authenticated
240240
: AuthenticationStatus.unauthenticated;
241241
_token = token;
242-
_controller.add(_authenticationStatus);
242+
if (!_controller.isClosed) _controller.add(_authenticationStatus);
243243
}
244244
}

packages/fresh/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ issue_tracker: https://github.com/felangel/fresh/issues
55
homepage: https://github.com/felangel/fresh
66
funding: [https://github.com/sponsors/felangel]
77

8-
version: 0.6.0
8+
version: 0.6.1
99

1010
environment:
1111
sdk: ">=2.12.0 <4.0.0"

packages/fresh/test/fresh_test.dart

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ class FreshController<T> with FreshMixin<T> {
3636
}
3737

3838
void main() {
39+
setUpAll(() {
40+
registerFallbackValue(FakeOAuth2Token());
41+
});
42+
3943
group('OAuth2Token', () {
4044
test('tokenType defaults to bearer', () {
4145
expect(const OAuth2Token(accessToken: 'accessToken').tokenType, 'bearer');
@@ -285,7 +289,7 @@ void main() {
285289
});
286290

287291
group('close', () {
288-
test('shoud close streams', () async {
292+
test('should close streams gracefully', () async {
289293
when(() => tokenStorage.read()).thenAnswer((_) async => null);
290294
when(() => tokenStorage.write(any())).thenAnswer((_) async {});
291295
final token = MockToken();
@@ -294,6 +298,7 @@ void main() {
294298

295299
await freshController.setToken(token);
296300
await freshController.close();
301+
await freshController.setToken(token);
297302

298303
await expectLater(
299304
freshController.authenticationStatus,

packages/fresh_dio/CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1+
# 0.6.0
2+
3+
- **BREAKING** feat: adjust the default `shouldRefreshBeforeRequest` to automatically refresh if the token expires within 30s
4+
15
# 0.5.1
26

37
- feat: single-flight token refresh - concurrent 401 responses trigger only one `refreshToken` call ([#126](https://github.com/felangel/fresh/issues/126), [#130](https://github.com/felangel/fresh/pull/130))
48

59
# 0.5.0
610

711
- feat: `ShouldRefreshBeforeRequest` allows conditional token refresh based on request details (path, headers, etc.) and token expiration
8-
- feat: automatic token refresh based on expiration before requests
12+
- feat: automatic token refresh based on expiration before requests
913
- feat: enhanced token validation with `Token.expiresAt` getter
1014
- feat: support for custom token validation logic with RequestOptions context
1115

packages/fresh_dio/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ issue_tracker: https://github.com/felangel/fresh/issues
55
homepage: https://github.com/felangel/fresh
66
funding: [https://github.com/sponsors/felangel]
77

8-
version: 0.5.1
8+
version: 0.6.0
99

1010
environment:
1111
sdk: ">=2.15.0 <4.0.0"

packages/fresh_graphql/CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 0.8.0
2+
3+
- **BREAKING** feat: adjust the default `shouldRefreshBeforeRequest` to automatically refresh if the token expires within 30s
4+
15
# 0.7.1
26

37
- feat: single-flight token refresh - concurrent UNAUTHENTICATED errors trigger only one `refreshToken` call ([#126](https://github.com/felangel/fresh/issues/126), [#130](https://github.com/felangel/fresh/pull/130))
@@ -7,7 +11,7 @@
711

812
- feat: `ShouldRefreshBeforeRequest` allows conditional token refresh based on GraphQL request details and token expiration
913
- feat: automatic token refresh based on expiration before requests
10-
- feat: enhanced token validation with `Token.expiresAt` getter
14+
- feat: enhanced token validation with `Token.expiresAt` getter
1115
- feat: support for custom token validation logic with GraphQL Request context
1216

1317
# 0.6.1

packages/fresh_graphql/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ issue_tracker: https://github.com/felangel/fresh/issues
55
homepage: https://github.com/felangel/fresh
66
funding: [https://github.com/sponsors/felangel]
77

8-
version: 0.7.1
8+
version: 0.8.0
99

1010
environment:
1111
sdk: ">=2.15.0 <4.0.0"

0 commit comments

Comments
 (0)