diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index bd81c5a2..e2bd9d6d 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/pkgs/shelf/CHANGELOG.md b/pkgs/shelf/CHANGELOG.md index e8ef847e..abd27324 100644 --- a/pkgs/shelf/CHANGELOG.md +++ b/pkgs/shelf/CHANGELOG.md @@ -1,6 +1,6 @@ ## 1.4.2-wip -* Require Dart ^3.0.0 +* Require Dart `^3.3.0`. ## 1.4.1 diff --git a/pkgs/shelf/lib/src/cascade.dart b/pkgs/shelf/lib/src/cascade.dart index 577c5067..992aea6e 100644 --- a/pkgs/shelf/lib/src/cascade.dart +++ b/pkgs/shelf/lib/src/cascade.dart @@ -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; }); diff --git a/pkgs/shelf/lib/src/request.dart b/pkgs/shelf/lib/src/request.dart index bf77f49f..7be8b3ff 100644 --- a/pkgs/shelf/lib/src/request.dart +++ b/pkgs/shelf/lib/src/request.dart @@ -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 @@ -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(); } diff --git a/pkgs/shelf/lib/src/server_handler.dart b/pkgs/shelf/lib/src/server_handler.dart index 1dd968bd..a25cdf0c 100644 --- a/pkgs/shelf/lib/src/server_handler.dart +++ b/pkgs/shelf/lib/src/server_handler.dart @@ -89,7 +89,7 @@ class _HandlerServer implements Server { @override Future close() => _closeMemo.runOnce(() { - return _onClose == null ? null : _onClose!(); + return _onClose == null ? null : _onClose(); }); final _closeMemo = AsyncMemoizer(); } diff --git a/pkgs/shelf/pubspec.yaml b/pkgs/shelf/pubspec.yaml index 72be310f..11f8671b 100644 --- a/pkgs/shelf/pubspec.yaml +++ b/pkgs/shelf/pubspec.yaml @@ -10,7 +10,7 @@ topics: - backend environment: - sdk: ^3.0.0 + sdk: ^3.3.0 dependencies: async: ^2.5.0 @@ -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 diff --git a/pkgs/shelf_packages_handler/CHANGELOG.md b/pkgs/shelf_packages_handler/CHANGELOG.md index 2f6ce796..ade77478 100644 --- a/pkgs/shelf_packages_handler/CHANGELOG.md +++ b/pkgs/shelf_packages_handler/CHANGELOG.md @@ -1,6 +1,6 @@ ## 3.0.3-wip -* Require Dart `^3.0.0` +* Require Dart `^3.3.0`. ## 3.0.2 diff --git a/pkgs/shelf_packages_handler/lib/src/package_config_handler.dart b/pkgs/shelf_packages_handler/lib/src/package_config_handler.dart index 460885fa..2ffb091f 100644 --- a/pkgs/shelf_packages_handler/lib/src/package_config_handler.dart +++ b/pkgs/shelf_packages_handler/lib/src/package_config_handler.dart @@ -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/')); diff --git a/pkgs/shelf_packages_handler/pubspec.yaml b/pkgs/shelf_packages_handler/pubspec.yaml index 3c04d3f7..bd119031 100644 --- a/pkgs/shelf_packages_handler/pubspec.yaml +++ b/pkgs/shelf_packages_handler/pubspec.yaml @@ -8,7 +8,7 @@ topics: - shelf environment: - sdk: ^3.0.0 + sdk: ^3.3.0 dependencies: path: ^1.8.0 @@ -16,5 +16,5 @@ dependencies: 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 diff --git a/pkgs/shelf_proxy/CHANGELOG.md b/pkgs/shelf_proxy/CHANGELOG.md index 07041940..17363646 100644 --- a/pkgs/shelf_proxy/CHANGELOG.md +++ b/pkgs/shelf_proxy/CHANGELOG.md @@ -1,6 +1,6 @@ ## 1.0.5-wip -* Require Dart `^3.0.0` +* Require Dart `^3.3.0`. ## 1.0.4 diff --git a/pkgs/shelf_proxy/pubspec.yaml b/pkgs/shelf_proxy/pubspec.yaml index e8c3c2aa..1ac4060d 100644 --- a/pkgs/shelf_proxy/pubspec.yaml +++ b/pkgs/shelf_proxy/pubspec.yaml @@ -8,7 +8,7 @@ topics: - shelf environment: - sdk: ^3.0.0 + sdk: ^3.3.0 dependencies: http: '>=0.13.0 <2.0.0' @@ -16,5 +16,5 @@ dependencies: shelf: ^1.0.0 dev_dependencies: - dart_flutter_team_lints: ^2.0.0 + dart_flutter_team_lints: ^3.0.0 test: ^1.6.0 diff --git a/pkgs/shelf_router/CHANGELOG.md b/pkgs/shelf_router/CHANGELOG.md index c3dbf816..6e88703e 100644 --- a/pkgs/shelf_router/CHANGELOG.md +++ b/pkgs/shelf_router/CHANGELOG.md @@ -1,6 +1,6 @@ ## 1.1.5-wip -* Require Dart `^3.0.0`. +* Require Dart `^3.3.0`. ## 1.1.4 diff --git a/pkgs/shelf_router/pubspec.yaml b/pkgs/shelf_router/pubspec.yaml index b2eed2c5..9be8a34f 100644 --- a/pkgs/shelf_router/pubspec.yaml +++ b/pkgs/shelf_router/pubspec.yaml @@ -10,7 +10,7 @@ topics: - shelf environment: - sdk: ^3.0.0 + sdk: ^3.3.0 dependencies: http_methods: ^1.1.0 @@ -18,6 +18,6 @@ dependencies: 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 diff --git a/pkgs/shelf_router_generator/CHANGELOG.md b/pkgs/shelf_router_generator/CHANGELOG.md index 6a03aff1..eeac453c 100644 --- a/pkgs/shelf_router_generator/CHANGELOG.md +++ b/pkgs/shelf_router_generator/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.1.1-wip + +* Require `sdk: ^3.3.0` + ## 1.1.0 * Require `sdk: ^3.0.0` diff --git a/pkgs/shelf_router_generator/pubspec.yaml b/pkgs/shelf_router_generator/pubspec.yaml index 11453c8a..3f38a535 100644 --- a/pkgs/shelf_router_generator/pubspec.yaml +++ b/pkgs/shelf_router_generator/pubspec.yaml @@ -10,7 +10,7 @@ topics: - shelf environment: - sdk: ^3.0.0 + sdk: ^3.3.0 dependencies: analyzer: '>=4.6.0 <7.0.0' @@ -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 diff --git a/pkgs/shelf_static/CHANGELOG.md b/pkgs/shelf_static/CHANGELOG.md index 496c589b..7713e435 100644 --- a/pkgs/shelf_static/CHANGELOG.md +++ b/pkgs/shelf_static/CHANGELOG.md @@ -1,6 +1,6 @@ ## 1.1.3-wip -* Require Dart `^3.0.0`. +* Require Dart `^3.3.0`. ## 1.1.2 diff --git a/pkgs/shelf_static/pubspec.yaml b/pkgs/shelf_static/pubspec.yaml index 14b15dc9..4c3a6723 100644 --- a/pkgs/shelf_static/pubspec.yaml +++ b/pkgs/shelf_static/pubspec.yaml @@ -8,7 +8,7 @@ topics: - shelf environment: - sdk: ^3.0.0 + sdk: ^3.3.0 dependencies: convert: ^3.0.0 @@ -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 diff --git a/pkgs/shelf_test_handler/CHANGELOG.md b/pkgs/shelf_test_handler/CHANGELOG.md index 56b4e792..941ecbc6 100644 --- a/pkgs/shelf_test_handler/CHANGELOG.md +++ b/pkgs/shelf_test_handler/CHANGELOG.md @@ -1,6 +1,6 @@ ## 2.0.3-wip -* Require Dart `^3.0.0`. +* Require Dart `^3.3.0`. ## 2.0.2 diff --git a/pkgs/shelf_test_handler/pubspec.yaml b/pkgs/shelf_test_handler/pubspec.yaml index 0b77af4c..fe0238e6 100644 --- a/pkgs/shelf_test_handler/pubspec.yaml +++ b/pkgs/shelf_test_handler/pubspec.yaml @@ -8,7 +8,7 @@ topics: - shelf environment: - sdk: ^3.0.0 + sdk: ^3.3.0 dependencies: http_multi_server: ^3.0.0 @@ -16,7 +16,7 @@ dependencies: 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 diff --git a/pkgs/shelf_web_socket/CHANGELOG.md b/pkgs/shelf_web_socket/CHANGELOG.md index a9300190..77f0882d 100644 --- a/pkgs/shelf_web_socket/CHANGELOG.md +++ b/pkgs/shelf_web_socket/CHANGELOG.md @@ -1,5 +1,7 @@ ## 2.0.1-wip +* Require Dart `^3.3.0`. + ## 2.0.0 * Require Dart `^3.0.0`. diff --git a/pkgs/shelf_web_socket/lib/src/web_socket_handler.dart b/pkgs/shelf_web_socket/lib/src/web_socket_handler.dart index a41ed697..4c9c5ceb 100644 --- a/pkgs/shelf_web_socket/lib/src/web_socket_handler.dart +++ b/pkgs/shelf_web_socket/lib/src/web_socket_handler.dart @@ -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".'); } @@ -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; } diff --git a/pkgs/shelf_web_socket/pubspec.yaml b/pkgs/shelf_web_socket/pubspec.yaml index 14c92967..84cf9f2f 100644 --- a/pkgs/shelf_web_socket/pubspec.yaml +++ b/pkgs/shelf_web_socket/pubspec.yaml @@ -9,7 +9,7 @@ topics: - shelf environment: - sdk: ^3.0.0 + sdk: ^3.3.0 dependencies: shelf: ^1.1.0 @@ -17,6 +17,6 @@ dependencies: 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