Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/dart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
matrix:
os: [ubuntu-latest]
# Test with at least the declared minimum Dart version
sdk: ['3.1', stable]
sdk: ['3.5', stable]
steps:
- uses: actions/checkout@v4
- uses: dart-lang/setup-dart@v1
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## 9.25.0-wip

* Require Dart 3.1
* Require Dart 3.5
* Require `package:http` `^1.0.0`.

## 9.24.0
Expand Down
2 changes: 1 addition & 1 deletion example/common.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'dart:async';
// ignore: deprecated_member_use
import 'dart:html';

import 'package:github/github.dart';
Expand All @@ -13,7 +14,6 @@ export 'package:github/github.dart';
Future<void> initViewSourceButton(String script) async {
// query the DOM for the view source button, handle clicks
document.querySelector('#view-source')?.onClick.listen((_) {
// ignore: unsafe_html
final popup = window.open(
'https://github.com/SpinlockLabs/github.dart/blob/master/example/$script',
'View Source');
Expand Down
1 change: 1 addition & 0 deletions example/emoji.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'dart:async';
// ignore: deprecated_member_use
import 'dart:html';

import 'common.dart';
Expand Down
2 changes: 2 additions & 0 deletions example/index.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// ignore: deprecated_member_use
import 'dart:html';

import 'common.dart';

void main() {
Expand Down
2 changes: 1 addition & 1 deletion example/languages.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// ignore: deprecated_member_use
import 'dart:html';

import 'common.dart';
Expand Down Expand Up @@ -34,7 +35,6 @@ void reloadTable({int accuracy = 4}) {
isReloadingTable = true;
final md = generateMarkdown(accuracy);
github.misc.renderMarkdown(md).then((html) {
// ignore: unsafe_html
tableDiv!.setInnerHtml(html, treeSanitizer: NodeTreeSanitizer.trusted);
isReloadingTable = false;
});
Expand Down
1 change: 1 addition & 0 deletions example/organization.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'dart:async';
// ignore: deprecated_member_use
import 'dart:html';

import 'common.dart';
Expand Down
1 change: 1 addition & 0 deletions example/pr.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'dart:async';
// ignore: deprecated_member_use
import 'dart:html';

import 'common.dart';
Expand Down
1 change: 1 addition & 0 deletions example/readme.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// ignore: deprecated_member_use
import 'dart:html';

import 'common.dart';
Expand Down
1 change: 1 addition & 0 deletions example/release_notes.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// ignore: deprecated_member_use
import 'dart:html';

import 'package:pub_semver/pub_semver.dart';
Expand Down
1 change: 1 addition & 0 deletions example/releases.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// ignore: deprecated_member_use
import 'dart:html';

import 'common.dart';
Expand Down
1 change: 1 addition & 0 deletions example/repos.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'dart:async';
// ignore: deprecated_member_use
import 'dart:html';

import 'common.dart';
Expand Down
2 changes: 2 additions & 0 deletions example/search.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// ignore: deprecated_member_use
import 'dart:html';

import 'common.dart';

Future<void> main() async {
Expand Down
1 change: 1 addition & 0 deletions example/stars.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// ignore: deprecated_member_use
import 'dart:html';

import 'common.dart';
Expand Down
1 change: 1 addition & 0 deletions example/user_info.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// ignore: deprecated_member_use
import 'dart:html';

import 'common.dart';
Expand Down
1 change: 1 addition & 0 deletions example/users.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'dart:async';
// ignore: deprecated_member_use
import 'dart:html';

import 'common.dart';
Expand Down
2 changes: 2 additions & 0 deletions example/zen.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// ignore: deprecated_member_use
import 'dart:html';

import 'common.dart';

Future<void> main() async {
Expand Down
3 changes: 2 additions & 1 deletion lib/browser_helper.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// ignore: deprecated_member_use
import 'dart:html';

import 'package:github/src/common.dart';

/// Renders Markdown in HTML using the GitHub API
Expand All @@ -24,7 +26,6 @@ void renderMarkdown(GitHub github, String selector, {int indent = 4}) {
e.hidden = false;
e.setAttribute('rendered', '');
e.classes.add('markdown-body');
// ignore: unsafe_html
e.setInnerHtml(html, treeSanitizer: NodeTreeSanitizer.trusted);
});
}
Expand Down
3 changes: 1 addition & 2 deletions lib/hooks.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
/// Add this import if you are in a non-web environment and writing something
/// that uses github hooks. For more information, see github hooks documentation
/// https://developer.github.com/v3/repos/hooks/

library hooks;
library;

export 'src/server/xplat_server.dart';
2 changes: 2 additions & 0 deletions lib/src/browser/xplat_browser.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// ignore: deprecated_member_use
import 'dart:html';

import 'package:github/src/common.dart';
import 'package:github/src/common/xplat_common.dart'
show findAuthenticationInMap;
Expand Down
2 changes: 1 addition & 1 deletion lib/src/common/activity_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ class EventPoller {
final List<String?> handledEvents = [];

Timer? _timer;
StreamController<Event>? _controller; // ignore: close_sinks
StreamController<Event>? _controller;

String? _lastFetched;

Expand Down
8 changes: 4 additions & 4 deletions lib/src/common/github.dart
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ class GitHub {
///
/// The future will pass the object returned from this function to the then method.
/// The default [convert] function returns the input object.
/// [body] is the data to send to the server. Pass in a List<int> if you want to post binary body data. Everything else will have .toString() called on it and set as text content
/// [body] is the data to send to the server. Pass in a `List<int>` if you want to post binary body data. Everything else will have .toString() called on it and set as text content
/// [S] represents the input type.
/// [T] represents the type return from this function after conversion
Future<T> postJSON<S, T>(
Expand Down Expand Up @@ -232,7 +232,7 @@ class GitHub {
///
/// The future will pass the object returned from this function to the then method.
/// The default [convert] function returns the input object.
/// [body] is the data to send to the server. Pass in a List<int> if you want to post binary body data. Everything else will have .toString() called on it and set as text content
/// [body] is the data to send to the server. Pass in a `List<int>` if you want to post binary body data. Everything else will have .toString() called on it and set as text content
/// [S] represents the input type.
/// [T] represents the type return from this function after conversion
Future<T> putJSON<S, T>(
Expand Down Expand Up @@ -274,7 +274,7 @@ class GitHub {
///
/// The future will pass the object returned from this function to the then method.
/// The default [convert] function returns the input object.
/// [body] is the data to send to the server. Pass in a List<int> if you want to post binary body data. Everything else will have .toString() called on it and set as text content
/// [body] is the data to send to the server. Pass in a `List<int>` if you want to post binary body data. Everything else will have .toString() called on it and set as text content
/// [S] represents the input type.
/// [T] represents the type return from this function after conversion
Future<T> patchJSON<S, T>(
Expand Down Expand Up @@ -343,7 +343,7 @@ class GitHub {
/// [path] can either be a path like '/repos' or a full url.
/// [headers] are HTTP Headers. If it doesn't exist, the 'Accept' and 'Authorization' headers are added.
/// [params] are query string parameters.
/// [body] is the body content of requests that take content. Pass in a List<int> if you want to post binary body data. Everything else will have .toString() called on it and set as text content
/// [body] is the body content of requests that take content. Pass in a `List<int>` if you want to post binary body data. Everything else will have .toString() called on it and set as text content
///
Future<http.Response> request(
String method,
Expand Down
1 change: 0 additions & 1 deletion lib/src/common/util/pagination.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ class PaginationHelper {
var page = params['page'] ?? 1;
params['page'] = page;

// ignore: literal_only_boolean_expressions
while (true) {
http.Response response;
try {
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: A high-level GitHub API Client Library that uses Github's v3 API
homepage: https://github.com/SpinlockLabs/github.dart

environment:
sdk: ^3.1.0
sdk: ^3.5.0

dependencies:
http: ^1.0.0
Expand All @@ -19,7 +19,7 @@ dev_dependencies:
collection: ^1.15.0
dependency_validator: ^3.0.0
json_serializable: ^6.6.1
lints: ^4.0.0
lints: ^5.0.0
mockito: ^5.3.2
nock: ^1.1.3
pub_semver: ^2.0.0
Expand Down
1 change: 0 additions & 1 deletion test/unit/orgs_service_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ void main() {
final github = GitHub(client: client);
final organizationsService = OrganizationsService(github);

// ignore: omit_local_variable_types
expect(
() async => organizationsService.getTeamByName(
'flutter', 'flutter-programmers'),
Expand Down
Loading