Skip to content

Commit

Permalink
update lints dependency
Browse files Browse the repository at this point in the history
Bump min Dart SDK
  • Loading branch information
kevmoo committed May 26, 2024
1 parent d9f82bf commit 14e884e
Show file tree
Hide file tree
Showing 22 changed files with 54 additions and 48 deletions.
38 changes: 19 additions & 19 deletions .github/workflows/dart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,23 +40,23 @@ jobs:
- name: mono_repo self validate
run: dart pub global run mono_repo generate --validate
job_002:
name: "analyze_and_format; linux; Dart 3.0.0; PKGS: pkgs/shelf, pkgs/shelf_packages_handler, pkgs/shelf_proxy, pkgs/shelf_router, pkgs/shelf_router_generator, pkgs/shelf_static, pkgs/shelf_test_handler, pkgs/shelf_web_socket; `dart analyze --fatal-infos .`"
name: "analyze_and_format; linux; Dart 3.3.0; PKGS: pkgs/shelf, pkgs/shelf_packages_handler, pkgs/shelf_proxy, pkgs/shelf_router, pkgs/shelf_router_generator, pkgs/shelf_static, pkgs/shelf_test_handler, pkgs/shelf_web_socket; `dart analyze --fatal-infos .`"
runs-on: ubuntu-latest
steps:
- name: Cache Pub hosted dependencies
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
with:
path: "~/.pub-cache/hosted"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/shelf-pkgs/shelf_packages_handler-pkgs/shelf_proxy-pkgs/shelf_router-pkgs/shelf_router_generator-pkgs/shelf_static-pkgs/shelf_test_handler-pkgs/shelf_web_socket;commands:analyze"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/shelf-pkgs/shelf_packages_handler-pkgs/shelf_proxy-pkgs/shelf_router-pkgs/shelf_router_generator-pkgs/shelf_static-pkgs/shelf_test_handler-pkgs/shelf_web_socket;commands:analyze"
restore-keys: |
os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/shelf-pkgs/shelf_packages_handler-pkgs/shelf_proxy-pkgs/shelf_router-pkgs/shelf_router_generator-pkgs/shelf_static-pkgs/shelf_test_handler-pkgs/shelf_web_socket
os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0
os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/shelf-pkgs/shelf_packages_handler-pkgs/shelf_proxy-pkgs/shelf_router-pkgs/shelf_router_generator-pkgs/shelf_static-pkgs/shelf_test_handler-pkgs/shelf_web_socket
os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0
os:ubuntu-latest;pub-cache-hosted
os:ubuntu-latest
- name: Setup Dart SDK
uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30
with:
sdk: "3.0.0"
sdk: "3.3.0"
- id: checkout
name: Checkout repository
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
Expand Down Expand Up @@ -319,23 +319,23 @@ jobs:
if: "always() && steps.pkgs_shelf_web_socket_pub_upgrade.conclusion == 'success'"
working-directory: pkgs/shelf_web_socket
job_005:
name: "unit_test; linux; Dart 3.0.0; PKGS: pkgs/shelf, pkgs/shelf_test_handler; `dart test --test-randomize-ordering-seed=random -p chrome`"
name: "unit_test; linux; Dart 3.3.0; PKGS: pkgs/shelf, pkgs/shelf_test_handler; `dart test --test-randomize-ordering-seed=random -p chrome`"
runs-on: ubuntu-latest
steps:
- name: Cache Pub hosted dependencies
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
with:
path: "~/.pub-cache/hosted"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/shelf-pkgs/shelf_test_handler;commands:test_1"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/shelf-pkgs/shelf_test_handler;commands:test_1"
restore-keys: |
os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/shelf-pkgs/shelf_test_handler
os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0
os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/shelf-pkgs/shelf_test_handler
os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0
os:ubuntu-latest;pub-cache-hosted
os:ubuntu-latest
- name: Setup Dart SDK
uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30
with:
sdk: "3.0.0"
sdk: "3.3.0"
- id: checkout
name: Checkout repository
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
Expand Down Expand Up @@ -363,23 +363,23 @@ jobs:
- job_003
- job_004
job_006:
name: "unit_test; linux; Dart 3.0.0; PKGS: pkgs/shelf, pkgs/shelf_packages_handler, pkgs/shelf_proxy, pkgs/shelf_router, pkgs/shelf_router_generator, pkgs/shelf_static, pkgs/shelf_test_handler, pkgs/shelf_web_socket; `dart test --test-randomize-ordering-seed=random`"
name: "unit_test; linux; Dart 3.3.0; PKGS: pkgs/shelf, pkgs/shelf_packages_handler, pkgs/shelf_proxy, pkgs/shelf_router, pkgs/shelf_router_generator, pkgs/shelf_static, pkgs/shelf_test_handler, pkgs/shelf_web_socket; `dart test --test-randomize-ordering-seed=random`"
runs-on: ubuntu-latest
steps:
- name: Cache Pub hosted dependencies
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
with:
path: "~/.pub-cache/hosted"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/shelf-pkgs/shelf_packages_handler-pkgs/shelf_proxy-pkgs/shelf_router-pkgs/shelf_router_generator-pkgs/shelf_static-pkgs/shelf_test_handler-pkgs/shelf_web_socket;commands:test_0"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/shelf-pkgs/shelf_packages_handler-pkgs/shelf_proxy-pkgs/shelf_router-pkgs/shelf_router_generator-pkgs/shelf_static-pkgs/shelf_test_handler-pkgs/shelf_web_socket;commands:test_0"
restore-keys: |
os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/shelf-pkgs/shelf_packages_handler-pkgs/shelf_proxy-pkgs/shelf_router-pkgs/shelf_router_generator-pkgs/shelf_static-pkgs/shelf_test_handler-pkgs/shelf_web_socket
os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0
os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/shelf-pkgs/shelf_packages_handler-pkgs/shelf_proxy-pkgs/shelf_router-pkgs/shelf_router_generator-pkgs/shelf_static-pkgs/shelf_test_handler-pkgs/shelf_web_socket
os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0
os:ubuntu-latest;pub-cache-hosted
os:ubuntu-latest
- name: Setup Dart SDK
uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30
with:
sdk: "3.0.0"
sdk: "3.3.0"
- id: checkout
name: Checkout repository
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
Expand Down Expand Up @@ -682,13 +682,13 @@ jobs:
- job_003
- job_004
job_011:
name: "unit_test; windows; Dart 3.0.0; PKGS: pkgs/shelf, pkgs/shelf_test_handler; `dart test --test-randomize-ordering-seed=random -p chrome`"
name: "unit_test; windows; Dart 3.3.0; PKGS: pkgs/shelf, pkgs/shelf_test_handler; `dart test --test-randomize-ordering-seed=random -p chrome`"
runs-on: windows-latest
steps:
- name: Setup Dart SDK
uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30
with:
sdk: "3.0.0"
sdk: "3.3.0"
- id: checkout
name: Checkout repository
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
Expand Down Expand Up @@ -716,13 +716,13 @@ jobs:
- job_003
- job_004
job_012:
name: "unit_test; windows; Dart 3.0.0; PKGS: pkgs/shelf_packages_handler, pkgs/shelf_static, pkgs/shelf_test_handler, pkgs/shelf_web_socket; `dart test --test-randomize-ordering-seed=random`"
name: "unit_test; windows; Dart 3.3.0; PKGS: pkgs/shelf_packages_handler, pkgs/shelf_static, pkgs/shelf_test_handler, pkgs/shelf_web_socket; `dart test --test-randomize-ordering-seed=random`"
runs-on: windows-latest
steps:
- name: Setup Dart SDK
uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30
with:
sdk: "3.0.0"
sdk: "3.3.0"
- id: checkout
name: Checkout repository
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
Expand Down
2 changes: 1 addition & 1 deletion pkgs/shelf/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## 1.4.2-wip

* Require Dart ^3.0.0
* Require Dart `^3.3.0`.

## 1.4.1

Expand Down
2 changes: 1 addition & 1 deletion pkgs/shelf/lib/src/cascade.dart
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class Cascade {

return (request) {
if (_parent!._handler == null) return handler(request);
return Future.sync(() => _parent!.handler(request)).then((response) {
return Future.sync(() => _parent.handler(request)).then((response) {
if (_shouldCascade(response)) return handler(request);
return response;
});
Expand Down
4 changes: 2 additions & 2 deletions pkgs/shelf/lib/src/request.dart
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class Request extends Message {
///
/// This will be `false` either if the adapter doesn't support hijacking, or
/// if the request has already been hijacked.
bool get canHijack => _onHijack != null && !_onHijack!.called;
bool get canHijack => _onHijack != null && !_onHijack.called;

/// If this is non-`null` and the requested resource hasn't been modified
/// since this date and time, the server should return a 304 Not Modified
Expand Down Expand Up @@ -280,7 +280,7 @@ class Request extends Message {
throw StateError("This request can't be hijacked.");
}

_onHijack!.run(callback);
_onHijack.run(callback);

throw const HijackException();
}
Expand Down
2 changes: 1 addition & 1 deletion pkgs/shelf/lib/src/server_handler.dart
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class _HandlerServer implements Server {

@override
Future<void> close() => _closeMemo.runOnce(() {
return _onClose == null ? null : _onClose!();
return _onClose == null ? null : _onClose();
});
final _closeMemo = AsyncMemoizer<void>();
}
4 changes: 2 additions & 2 deletions pkgs/shelf/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ topics:
- backend

environment:
sdk: ^3.0.0
sdk: ^3.3.0

dependencies:
async: ^2.5.0
Expand All @@ -21,6 +21,6 @@ dependencies:
stream_channel: ^2.1.0

dev_dependencies:
dart_flutter_team_lints: ^2.0.0
dart_flutter_team_lints: ^3.0.0
http: '>=0.13.0 <2.0.0'
test: ^1.16.0
2 changes: 1 addition & 1 deletion pkgs/shelf_packages_handler/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## 3.0.3-wip

* Require Dart `^3.0.0`
* Require Dart `^3.3.0`.

## 3.0.2

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class PackageConfigHandler {
_packageHandlers.putIfAbsent(packageName, () async {
Uri? packageUri;
if (_packageMap != null) {
packageUri = _packageMap![packageName];
packageUri = _packageMap[packageName];
} else {
final fakeResolvedUri = await Isolate.resolvePackageUri(
Uri(scheme: 'package', path: '$packageName/'));
Expand Down
4 changes: 2 additions & 2 deletions pkgs/shelf_packages_handler/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ topics:
- shelf

environment:
sdk: ^3.0.0
sdk: ^3.3.0

dependencies:
path: ^1.8.0
shelf: ^1.0.0
shelf_static: ^1.0.0

dev_dependencies:
dart_flutter_team_lints: ^2.0.0
dart_flutter_team_lints: ^3.0.0
test: ^1.16.0
2 changes: 1 addition & 1 deletion pkgs/shelf_proxy/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## 1.0.5-wip

* Require Dart `^3.0.0`
* Require Dart `^3.3.0`.

## 1.0.4

Expand Down
4 changes: 2 additions & 2 deletions pkgs/shelf_proxy/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ topics:
- shelf

environment:
sdk: ^3.0.0
sdk: ^3.3.0

dependencies:
http: '>=0.13.0 <2.0.0'
path: ^1.8.0
shelf: ^1.0.0

dev_dependencies:
dart_flutter_team_lints: ^2.0.0
dart_flutter_team_lints: ^3.0.0
test: ^1.6.0
2 changes: 1 addition & 1 deletion pkgs/shelf_router/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## 1.1.5-wip

* Require Dart `^3.0.0`.
* Require Dart `^3.3.0`.

## 1.1.4

Expand Down
4 changes: 2 additions & 2 deletions pkgs/shelf_router/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ topics:
- shelf

environment:
sdk: ^3.0.0
sdk: ^3.3.0

dependencies:
http_methods: ^1.1.0
meta: ^1.3.0
shelf: ^1.0.0

dev_dependencies:
dart_flutter_team_lints: ^2.0.0
dart_flutter_team_lints: ^3.0.0
http: '>=0.13.0 <2.0.0'
test: ^1.16.0
4 changes: 4 additions & 0 deletions pkgs/shelf_router_generator/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.1.1-wip

* Require `sdk: ^3.3.0`

## 1.1.0

* Require `sdk: ^3.0.0`
Expand Down
4 changes: 2 additions & 2 deletions pkgs/shelf_router_generator/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ topics:
- shelf

environment:
sdk: ^3.0.0
sdk: ^3.3.0

dependencies:
analyzer: '>=4.6.0 <7.0.0'
Expand All @@ -25,6 +25,6 @@ dependencies:
dev_dependencies:
build_runner: ^2.0.0
build_verify: ^3.0.0
dart_flutter_team_lints: ^2.0.0
dart_flutter_team_lints: ^3.0.0
http: '>=0.13.0 <2.0.0'
test: ^1.5.3
2 changes: 1 addition & 1 deletion pkgs/shelf_static/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## 1.1.3-wip

* Require Dart `^3.0.0`.
* Require Dart `^3.3.0`.

## 1.1.2

Expand Down
4 changes: 2 additions & 2 deletions pkgs/shelf_static/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ topics:
- shelf

environment:
sdk: ^3.0.0
sdk: ^3.3.0

dependencies:
convert: ^3.0.0
Expand All @@ -20,6 +20,6 @@ dependencies:

dev_dependencies:
args: ^2.0.0
dart_flutter_team_lints: ^2.0.0
dart_flutter_team_lints: ^3.0.0
test: ^1.16.0
test_descriptor: ^2.0.0
2 changes: 1 addition & 1 deletion pkgs/shelf_test_handler/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## 2.0.3-wip

* Require Dart `^3.0.0`.
* Require Dart `^3.3.0`.

## 2.0.2

Expand Down
4 changes: 2 additions & 2 deletions pkgs/shelf_test_handler/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ topics:
- shelf

environment:
sdk: ^3.0.0
sdk: ^3.3.0

dependencies:
http_multi_server: ^3.0.0
shelf: ^1.0.0
test: ^1.16.0

dev_dependencies:
dart_flutter_team_lints: ^2.0.0
dart_flutter_team_lints: ^3.0.0
http: '>=0.13.0 <2.0.0'
shelf_web_socket: ^1.0.0
web_socket_channel: ^2.0.0
2 changes: 2 additions & 0 deletions pkgs/shelf_web_socket/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## 2.0.1-wip

* Require Dart `^3.3.0`.

## 2.0.0

* Require Dart `^3.0.0`.
Expand Down
4 changes: 2 additions & 2 deletions pkgs/shelf_web_socket/lib/src/web_socket_handler.dart
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class WebSocketHandler {
final origin = request.headers['Origin'];
if (origin != null &&
_allowedOrigins != null &&
!_allowedOrigins!.contains(origin.toLowerCase())) {
!_allowedOrigins.contains(origin.toLowerCase())) {
return _forbidden('invalid origin "$origin".');
}

Expand Down Expand Up @@ -102,7 +102,7 @@ class WebSocketHandler {
if (_protocols == null) return null;
for (var requestProtocol in requestProtocols.split(',')) {
requestProtocol = requestProtocol.trim();
if (_protocols!.contains(requestProtocol)) return requestProtocol;
if (_protocols.contains(requestProtocol)) return requestProtocol;
}
return null;
}
Expand Down
4 changes: 2 additions & 2 deletions pkgs/shelf_web_socket/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ topics:
- shelf

environment:
sdk: ^3.0.0
sdk: ^3.3.0

dependencies:
shelf: ^1.1.0
stream_channel: ^2.1.0
web_socket_channel: '>=2.0.0 <4.0.0'

dev_dependencies:
dart_flutter_team_lints: ^2.0.0
dart_flutter_team_lints: ^3.0.0
http: '>=0.13.0 <2.0.0'
test: ^1.25.2

0 comments on commit 14e884e

Please sign in to comment.