Skip to content

Commit e0bd51a

Browse files
authored
require dart 3.0; update to the latest package:lints (#399)
* require dart 3.0; update to the latest package:lints * update pubspec and changelog
1 parent 6b9678e commit e0bd51a

24 files changed

+45
-42
lines changed

.github/workflows/dart.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
matrix:
1414
os: [ubuntu-latest]
1515
# Test with at least the declared minimum Dart version
16-
sdk: [2.18.7, stable]
16+
sdk: ['3.0', stable]
1717
steps:
1818
- uses: actions/checkout@v4
1919
- uses: dart-lang/setup-dart@v1

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 9.23.0
2+
3+
* Require Dart 3.0.
4+
* Update to the latest `package:lints`.
5+
16
## 9.22.0
27

38
* Add support for the `Ghost` user when the Github user is deleted.

analysis_options.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ linter:
1515
- avoid_implementing_value_types
1616
- avoid_js_rounded_ints
1717
- avoid_private_typedef_functions
18-
- avoid_returning_null
19-
- avoid_returning_null_for_future
2018
- avoid_returning_this
2119
- avoid_setters_without_getters
2220
- avoid_slow_async_io

lib/src/common.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
/// The Core of GitHub for Dart.
22
/// Contains the Models and other GitHub stuff.
3+
library;
4+
35
export 'package:github/src/common/activity_service.dart';
46
export 'package:github/src/common/authorizations_service.dart';
57
export 'package:github/src/common/checks_service.dart';

lib/src/common/activity_service.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import 'package:http/http.dart' as http;
99
///
1010
/// API docs: https://developer.github.com/v3/activity/
1111
class ActivityService extends Service {
12-
ActivityService(GitHub github) : super(github);
12+
ActivityService(super.github);
1313

1414
/// Lists public events.
1515
///

lib/src/common/authorizations_service.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import 'package:github/src/common.dart';
1010
///
1111
/// API docs: https://developer.github.com/v3/oauth_authorizations/
1212
class AuthorizationsService extends Service {
13-
AuthorizationsService(GitHub github) : super(github);
13+
AuthorizationsService(super.github);
1414

1515
/// Lists all authorizations.
1616
///

lib/src/common/checks_service.dart

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,13 @@ class ChecksService extends Service {
1818
/// API docs: https://developer.github.com/v3/checks/suites/
1919
final CheckSuitesService checkSuites;
2020

21-
ChecksService(GitHub github)
21+
ChecksService(super.github)
2222
: checkRuns = CheckRunsService._(github),
23-
checkSuites = CheckSuitesService._(github),
24-
super(github);
23+
checkSuites = CheckSuitesService._(github);
2524
}
2625

2726
class CheckRunsService extends Service {
28-
CheckRunsService._(GitHub github) : super(github);
27+
CheckRunsService._(super.github);
2928

3029
/// Creates a new check run for a specific commit in a repository.
3130
/// Your GitHub App must have the `checks:write` permission to create check runs.
@@ -235,7 +234,7 @@ class CheckRunsService extends Service {
235234
}
236235

237236
class CheckSuitesService extends Service {
238-
CheckSuitesService._(GitHub github) : super(github);
237+
CheckSuitesService._(super.github);
239238

240239
/// Gets a single check suite using its `id`.
241240
/// GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check suites.

lib/src/common/gists_service.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import 'package:github/src/common.dart';
88
///
99
/// API docs: https://developer.github.com/v3/gists/
1010
class GistsService extends Service {
11-
GistsService(GitHub github) : super(github);
11+
GistsService(super.github);
1212

1313
/// lists gists for a user.
1414
///

lib/src/common/git_service.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import 'package:github/src/common.dart';
88
///
99
/// API docs: https://developer.github.com/v3/git/blobs/
1010
class GitService extends Service {
11-
const GitService(GitHub github) : super(github);
11+
const GitService(super.github);
1212

1313
/// Fetches a blob from [slug] for a given [sha].
1414
///

lib/src/common/issues_service.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import 'package:github/src/common.dart';
88
///
99
/// API docs: https://developer.github.com/v3/issues/
1010
class IssuesService extends Service {
11-
IssuesService(GitHub github) : super(github);
11+
IssuesService(super.github);
1212

1313
/// List all issues across all the authenticated user’s visible repositories
1414
/// including owned repositories, member repositories, and organization repositories

0 commit comments

Comments
 (0)