Closed devoncarew closed 10 months ago
Package | Version | Status | Publish tag (post-merge) |
---|---|---|---|
package:web_socket_channel | 2.4.3 | ready to publish | v2.4.3 |
Documentation at https://github.com/dart-lang/ecosystem/wiki/Publishing-automation.
cc @kevmoo, @srujzs, @natebosch for review
I believe the type change from 2.4.1 may only have been observable from the HtmlWebSocketChannel
constructor (the single websocket parameter) and the HtmlWebSocketChannel.innerWebSocket
field (a WebSocket
). I suspect the field (not changed in this PR) is not generally used by clients of this library.
@srujzs - am I correct that the new interop will be ok with the cast at runtime to a package:web WebSocket? The instance could have been from either a package:web WebSocket or a dart:html one.
(see https://github.com/dart-lang/web_socket_channel/pull/319 for a major version rev of this package)
am I correct that the new interop will be ok with the cast at runtime to a package:web WebSocket? The instance could have been from either a package:web WebSocket or a dart:html one.
Yep. Since we cast to a package:web
WebSocket
, a cast of a dart:html
WebSocket
should be trivially true. We do the same "Object
and then cast later" business in Flutter as well to support the same use case.
2.4.3
dart pub downgrade
HtmlWebSocketChannel
: Relax the type of the websocket parameter to the constructor in order to mitigate a breaking change introduced in2.4.1
; partially address https://github.com/dart-lang/web_socket_channel/issues/307package:web
dependency to^0.4.0
In future major versions of this package, we'd likely re-introduce a type annotation for HtmlWebSocketChannel constructor.
Contribution guidelines:
- See our [contributor guide](https://github.com/dart-lang/.github/blob/main/CONTRIBUTING.md) for general expectations for PRs. - Larger or significant changes should be discussed in an issue before creating a PR. - Contributions to our repos should follow the [Dart style guide](https://dart.dev/guides/language/effective-dart) and use `dart format`. - Most changes should add an entry to the changelog and may need to [rev the pubspec package version](https://github.com/dart-lang/sdk/wiki/External-Package-Maintenance#making-a-change). - Changes to packages require [corresponding tests](https://github.com/dart-lang/.github/blob/main/CONTRIBUTING.md#Testing). Note that many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.