From 8c27fda5e59df0adb8fddab166fd99b9a7667b80 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Thu, 21 Mar 2024 11:58:40 -0700 Subject: [PATCH] Ready cupertino_http for release with WebSocket support --- pkgs/cupertino_http/CHANGELOG.md | 4 +++- pkgs/cupertino_http/lib/src/cupertino_web_socket.dart | 6 ++++++ pkgs/cupertino_http/pubspec.yaml | 7 ++----- pkgs/web_socket_conformance_tests/pubspec.yaml | 3 +-- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/pkgs/cupertino_http/CHANGELOG.md b/pkgs/cupertino_http/CHANGELOG.md index 34a36c59a4..da5b0b5c07 100644 --- a/pkgs/cupertino_http/CHANGELOG.md +++ b/pkgs/cupertino_http/CHANGELOG.md @@ -1,4 +1,6 @@ -## 1.3.1-wip +## 1.4.0 + +* **Experimental** support for the `package:web_socket` `WebSocket` interface. ## 1.3.0 diff --git a/pkgs/cupertino_http/lib/src/cupertino_web_socket.dart b/pkgs/cupertino_http/lib/src/cupertino_web_socket.dart index 94246744c2..c3d50ef508 100644 --- a/pkgs/cupertino_http/lib/src/cupertino_web_socket.dart +++ b/pkgs/cupertino_http/lib/src/cupertino_web_socket.dart @@ -22,6 +22,9 @@ class ConnectionException extends WebSocketException { /// A [WebSocket] implemented using the /// [NSURLSessionWebSocketTask API](https://developer.apple.com/documentation/foundation/nsurlsessionwebsockettask). +/// +/// NOTE: the [WebSocket] interface is currently experimental and may change in +/// the future. class CupertinoWebSocket implements WebSocket { /// Create a new WebSocket connection using the /// [NSURLSessionWebSocketTask API](https://developer.apple.com/documentation/foundation/nsurlsessionwebsockettask). @@ -31,6 +34,9 @@ class CupertinoWebSocket implements WebSocket { /// If provided, the [protocols] argument indicates that subprotocols that /// the peer is able to select. See /// [RFC-6455 1.9](https://datatracker.ietf.org/doc/html/rfc6455#section-1.9). + /// + /// NOTE: the [WebSocket] interface is currently experimental and may change + /// in the future. static Future connect(Uri url, {Iterable? protocols, URLSessionConfiguration? config}) async { if (!url.isScheme('ws') && !url.isScheme('wss')) { diff --git a/pkgs/cupertino_http/pubspec.yaml b/pkgs/cupertino_http/pubspec.yaml index 9d375981d0..12cdf94e62 100644 --- a/pkgs/cupertino_http/pubspec.yaml +++ b/pkgs/cupertino_http/pubspec.yaml @@ -1,7 +1,5 @@ name: cupertino_http -version: 1.4.0-wip -publish_to: none # Do not merge with this here! - +version: 1.4.0 description: >- A macOS/iOS Flutter plugin that provides access to the Foundation URL Loading System. @@ -17,8 +15,7 @@ dependencies: flutter: sdk: flutter http: ^1.2.0 - web_socket: - path: ../web_socket + web_socket: ^0.1.0 dev_dependencies: dart_flutter_team_lints: ^2.0.0 diff --git a/pkgs/web_socket_conformance_tests/pubspec.yaml b/pkgs/web_socket_conformance_tests/pubspec.yaml index afb952f804..2c7ffda0c2 100644 --- a/pkgs/web_socket_conformance_tests/pubspec.yaml +++ b/pkgs/web_socket_conformance_tests/pubspec.yaml @@ -15,8 +15,7 @@ dependencies: dart_style: ^2.3.4 stream_channel: ^2.1.2 test: ^1.24.0 - web_socket: - path: ../web_socket + web_socket: ^0.1.0 dev_dependencies: dart_flutter_team_lints: ^2.0.0