Closed renovate[bot] closed 3 years ago
Merging #705 (ba351a4) into main (8bc6788) will not change coverage. The diff coverage is
n/a
.
@@ Coverage Diff @@
## main #705 +/- ##
=======================================
Coverage 91.64% 91.64%
=======================================
Files 8 8
Lines 910 910
=======================================
Hits 834 834
Misses 76 76
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 3659f29...ba351a4. Read the comment docs.
This PR will trigger a patch release when merged.
:tada: This PR is included in version 5.3.71 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
This PR contains the following updates:
7.5.3
->8.0.0
Release Notes
websockets/ws
### [`v8.0.0`](https://togithub.com/websockets/ws/releases/8.0.0) [Compare Source](https://togithub.com/websockets/ws/compare/7.5.3...8.0.0) ### Breaking changes - The `WebSocket` constructor now throws a `SyntaxError` if any of the subprotocol names are invalid or duplicated ([`0aecf0c`](https://togithub.com/websockets/ws/commit/0aecf0c9)). - The server now aborts the opening handshake if an invalid `Sec-WebSocket-Protocol` header field value is received ([`1877dde`](https://togithub.com/websockets/ws/commit/1877ddeb)). - The `protocols` argument of `handleProtocols` hook is no longer an `Array` but a `Set` ([`1877dde`](https://togithub.com/websockets/ws/commit/1877ddeb)). - The opening handshake is now aborted if the `Sec-WebSocket-Extensions` header field value is empty or it begins or ends with a white space ([`e814110`](https://togithub.com/websockets/ws/commit/e814110e)). - Dropped support for Node.js < 10.0.0 ([`552b506`](https://togithub.com/websockets/ws/commit/552b5067)). - The `WebSocket` constructor now throws a `SyntaxError` if the connection URL contains a fragment identifier or if the URL's protocol is not one of `'ws:'`, `'wss:'`, or `'ws+unix:'` ([`ebea038`](https://togithub.com/websockets/ws/commit/ebea038f)). - Text messages and close reasons are no longer decoded to strings. They are passed as `Buffer`s to the listeners of their respective events. The listeners of the `'message'` event now take a boolean argument specifying whether or not the message is binary ([`e173423`](https://togithub.com/websockets/ws/commit/e173423c)). Existing code can be migrated by decoding the buffer explicitly. ```js websocket.on('message', function message(data, isBinary) { const message = isBinary ? data : data.toString(); // Continue as before. }); websocket.on('close', function close(code, data) { const reason = data.toString(); // Continue as before. }); ``` - The package now uses an ES module wrapper ([`78adf5f`](https://togithub.com/websockets/ws/commit/78adf5f7)). - `WebSocketServer.prototype.close()` no longer closes existing connections ([`df7de57`](https://togithub.com/websockets/ws/commit/df7de574)). Existing code can be migrated by closing the connections manually. ```js websocketServer.close(); for (const ws of websocketServer.clients) { ws.terminate(); } ``` - The callback of `WebSocketServer.prototype.close()` is now called with an error if the server is already closed ([`abde9cf`](https://togithub.com/websockets/ws/commit/abde9cfc)). - `WebSocket.prototype.addEventListener()` is now a noop if the `type` argument is not one of `'close'`, `'error'`, `'message'`, or `'open'` ([`a421eb5`](https://togithub.com/websockets/ws/commit/a421eb50)). - `WebSocket.prototype.removeEventListener()` now only removes listeners added with `WebSocket.prototype.addEventListener()` and only one at time ([`1bd93f0`](https://togithub.com/websockets/ws/commit/1bd93f0c)). - The value of the `onclose`, `onerror`, `onmessage`, and `onopen` properties is now `null` if the respective event handler is not set ([`45790db`](https://togithub.com/websockets/ws/commit/45790dbc)). - The `OpenEvent` class has been removed ([`c4394c3`](https://togithub.com/websockets/ws/commit/c4394c3c)). ### Bug fixes - The event listeners added via handler properties are now independent from the event listeners added with `WebSocket.prototype.addEventListener()` ([`0b21c03`](https://togithub.com/websockets/ws/commit/0b21c03a)).Configuration
📅 Schedule: "after 2pm on Monday" in timezone Europe/Zurich.
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by WhiteSource Renovate. View repository job log here.