From ee2308bf3c0aedbf1caafd74ef1a19ed4db11a0b Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Fri, 16 Feb 2024 16:01:08 -0800 Subject: [PATCH 1/3] Support the latest pkg:web, require Dart 3.3 --- example/server.dart | 2 +- lib/client/sse_client.dart | 4 ++-- pubspec.yaml | 4 ++-- test/web/index.dart | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/example/server.dart b/example/server.dart index 74439c9..b6ee750 100644 --- a/example/server.dart +++ b/example/server.dart @@ -7,7 +7,7 @@ import 'package:sse/server/sse_handler.dart'; /// A basic server which sets up an SSE handler. /// -/// When a client connnects it will send a simple message and print the +/// When a client connects it will send a simple message and print the /// response. void main() async { var handler = SseHandler(Uri.parse('/sseHandler')); diff --git a/lib/client/sse_client.dart b/lib/client/sse_client.dart index f5be1e5..4d3df49 100644 --- a/lib/client/sse_client.dart +++ b/lib/client/sse_client.dart @@ -9,7 +9,7 @@ import 'dart:js_interop'; import 'package:logging/logging.dart'; import 'package:pool/pool.dart'; import 'package:stream_channel/stream_channel.dart'; -import 'package:web/helpers.dart'; +import 'package:web/web.dart'; import '../src/util/uuid.dart'; @@ -21,7 +21,7 @@ import '../src/util/uuid.dart'; /// Note Chrome's limit is 6000. So this gives us plenty of headroom. final _requestPool = Pool(1000); -/// A client for bi-directional sse communcation. +/// A client for bi-directional sse communication. /// /// The client can send any JSON-encodable messages to the server by adding /// them to the [sink] and listen to messages from the server on the [stream]. diff --git a/pubspec.yaml b/pubspec.yaml index 6d150ad..4aae6e4 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -7,7 +7,7 @@ description: >- repository: https://github.com/dart-lang/sse environment: - sdk: ^3.2.0 + sdk: ^3.3.0 dependencies: async: ^2.0.8 @@ -16,7 +16,7 @@ dependencies: pool: ^1.5.0 shelf: ^1.1.0 stream_channel: ^2.0.0 - web: '>=0.3.0 <0.5.0' + web: ^0.5.0 dev_dependencies: dart_flutter_team_lints: ^2.0.0 diff --git a/test/web/index.dart b/test/web/index.dart index fadb147..c4d78cd 100644 --- a/test/web/index.dart +++ b/test/web/index.dart @@ -3,7 +3,7 @@ // BSD-style license that can be found in the LICENSE file. import 'package:sse/client/sse_client.dart'; -import 'package:web/helpers.dart'; +import 'package:web/web.dart'; void main() { var channel = SseClient('/test'); From 57f2b661f7bc8939f5427377e9a2c13dfe27abfb Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Fri, 16 Feb 2024 16:04:35 -0800 Subject: [PATCH 2/3] fix ci --- .github/workflows/test-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-package.yml b/.github/workflows/test-package.yml index 1fb3260..84d263d 100644 --- a/.github/workflows/test-package.yml +++ b/.github/workflows/test-package.yml @@ -47,7 +47,7 @@ jobs: matrix: # Add macos-latest and/or windows-latest if relevant for this package. os: [ubuntu-latest] - sdk: [3.2.0, dev] + sdk: [3.3, dev] steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 From 4423a9995a4ceccd4d5dd9de1a6a5b072a5530db Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Fri, 16 Feb 2024 16:16:52 -0800 Subject: [PATCH 3/3] update changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f1deed7..b652f9c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ ## 4.1.5-wip - Drop unneeded dependency on `package:js`. +- Update the minimum Dart SDK version to `3.3.0`. +- Support the latest `package:web`. ## 4.1.4