Project-Pandora-Game / pandora

https://project-pandora.com
Other
11 stars 2 forks source link

[CHORE] Update socket.io packages to v4.8.1 #840

Open renovate[bot] opened 2 months ago

renovate[bot] commented 2 months ago

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
socket.io (source) 4.6.2 -> 4.8.1 age adoption passing confidence
socket.io-client (source) 4.6.1 -> 4.8.1 age adoption passing confidence

Release Notes

socketio/socket.io (socket.io) ### [`v4.8.1`](https://redirect.github.com/socketio/socket.io/releases/tag/socket.io-client%404.8.1) [Compare Source](https://redirect.github.com/socketio/socket.io/compare/socket.io@4.8.0...socket.io@4.8.1) ##### Bug Fixes - **bundle:** do not mangle the "\_placeholder" attribute ([ca9e994](https://redirect.github.com/socketio/socket.io/commit/ca9e994815aa2e31e0342e37ccdc2e9e8c5fd13c)) ##### Dependencies - [`engine.io-client@~6.6.1`](https://redirect.github.com/socketio/engine.io-client/releases/tag/6.5.2) (no change) - [`ws@~8.17.1`](https://redirect.github.com/websockets/ws/releases/tag/8.17.1) (no change) ### [`v4.8.0`](https://redirect.github.com/socketio/socket.io/releases/tag/socket.io-client%404.8.0) [Compare Source](https://redirect.github.com/socketio/socket.io/compare/socket.io@4.7.5...socket.io@4.8.0) ##### Features ##### Custom transport implementations The `transports` option now accepts an array of transport implementations: ```js import { io } from "socket.io-client"; import { XHR, WebSocket } from "engine.io-client"; const socket = io({ transports: [XHR, WebSocket] }); ``` Here is the list of provided implementations: | Transport | Description | |-----------------|------------------------------------------------------------------------------------------------------| | `Fetch` | HTTP long-polling based on the built-in `fetch()` method. | | `NodeXHR` | HTTP long-polling based on the `XMLHttpRequest` object provided by the `xmlhttprequest-ssl` package. | | `XHR` | HTTP long-polling based on the built-in `XMLHttpRequest` object. | | `NodeWebSocket` | WebSocket transport based on the `WebSocket` object provided by the `ws` package. | | `WebSocket` | WebSocket transport based on the built-in `WebSocket` object. | | `WebTransport` | WebTransport transport based on the built-in `WebTransport` object. | Usage: | Transport | browser | Node.js | Deno | Bun | |-----------------|--------------------|------------------------|--------------------|--------------------| | `Fetch` | :white_check_mark: | :white_check_mark: (1) | :white_check_mark: | :white_check_mark: | | `NodeXHR` | | :white_check_mark: | :white_check_mark: | :white_check_mark: | | `XHR` | :white_check_mark: | | | | | `NodeWebSocket` | | :white_check_mark: | :white_check_mark: | :white_check_mark: | | `WebSocket` | :white_check_mark: | :white_check_mark: (2) | :white_check_mark: | :white_check_mark: | | `WebTransport` | :white_check_mark: | :white_check_mark: | | | (1) since [v18.0.0](https://nodejs.org/api/globals.html#fetch) (2) since [v21.0.0](https://nodejs.org/api/globals.html#websocket) Added in [f4d898e](https://redirect.github.com/socketio/engine.io-client/commit/f4d898ee9652939a4550a41ac0e8143056154c0a) and [b11763b](https://redirect.github.com/socketio/engine.io-client/commit/b11763beecfe4622867b4dec9d1db77460733ffb). ##### Test each low-level transports When setting the `tryAllTransports` option to `true`, if the first transport (usually, HTTP long-polling) fails, then the other transports will be tested too: ```js import { io } from "socket.io-client"; const socket = io({ tryAllTransports: true }); ``` This feature is useful in two cases: - when HTTP long-polling is disabled on the server, or if CORS fails - when WebSocket is tested first (with `transports: ["websocket", "polling"]`) The only potential downside is that the connection attempt could take more time in case of failure, as there have been reports of WebSocket connection errors taking several seconds before being detected (that's one reason for using HTTP long-polling first). That's why the option defaults to `false` for now. Added in [579b243](https://redirect.github.com/socketio/engine.io-client/commit/579b243e89ac7dc58233f9844ef70817364ecf52). ##### Bug Fixes - accept string | undefined as init argument (bis) ([60c757f](https://redirect.github.com/socketio/socket.io/commit/60c757f718d400e052c3160ee377bbe4973277c9)) - allow to manually stop the reconnection loop ([13c6d2e](https://redirect.github.com/socketio/socket.io/commit/13c6d2e89deb1e6c6c8c7245118f9b37d66537cb)) - close the engine upon decoding exception ([04c8dd9](https://redirect.github.com/socketio/socket.io/commit/04c8dd979ce40acaceec1f4507c1ae69325d6158)) - do not send a packet on an expired connection ([#​5134](https://redirect.github.com/socketio/socket.io/issues/5134)) ([8adcfbf](https://redirect.github.com/socketio/socket.io/commit/8adcfbfde50679095ec2abe376650cf2b6814325)) ##### Dependencies - [`engine.io-client@~6.6.1`](https://redirect.github.com/socketio/engine.io-client/releases/tag/6.5.2) ([diff](https://redirect.github.com/socketio/engine.io-client/compare/6.5.3...6.6.0) and [diff](https://redirect.github.com/socketio/socket.io/compare/engine.io-client@6.6.0...engine.io-client@6.6.1)) - [`ws@~8.17.1`](https://redirect.github.com/websockets/ws/releases/tag/8.17.1) ([diff](https://redirect.github.com/websockets/ws/compare/8.11.0...8.17.1)) ### [`v4.7.5`](https://redirect.github.com/socketio/socket.io/releases/tag/4.7.5) [Compare Source](https://redirect.github.com/socketio/socket.io/compare/4.7.4...socket.io@4.7.5) ##### Bug Fixes - close the adapters when the server is closed ([bf64870](https://redirect.github.com/socketio/socket.io/commit/bf64870957e626a73e0544716a1a41a4ba5093bb)) - remove duplicate pipeline when serving bundle ([e426f3e](https://redirect.github.com/socketio/socket.io/commit/e426f3e8e1bfea5720c32d30a3663303200ee6ad)) ##### Links - Diff: https://github.com/socketio/socket.io/compare/4.7.4...4.7.5 - Client release: [4.7.5](https://redirect.github.com/socketio/socket.io-client/releases/tag/4.7.5) - [`engine.io@~6.5.2`](https://redirect.github.com/socketio/engine.io/releases/tag/6.5.2) (no change) - [`ws@~8.11.0`](https://redirect.github.com/websockets/ws/releases/tag/8.11.0) (no change) ### [`v4.7.4`](https://redirect.github.com/socketio/socket.io/releases/tag/4.7.4) [Compare Source](https://redirect.github.com/socketio/socket.io/compare/4.7.3...4.7.4) ##### Bug Fixes - **typings:** calling io.emit with no arguments incorrectly errored ([cb6d2e0](https://redirect.github.com/socketio/socket.io/commit/cb6d2e02aa7ec03c2de1817d35cffa1128b107ef)), closes [#​4914](https://redirect.github.com/socketio/socket.io/issues/4914) ##### Links - Diff: https://github.com/socketio/socket.io/compare/4.7.3...4.7.4 - Client release: [4.7.4](https://redirect.github.com/socketio/socket.io-client/releases/tag/4.7.4) - [`engine.io@~6.5.2`](https://redirect.github.com/socketio/engine.io/releases/tag/6.5.2) (no change) - [`ws@~8.11.0`](https://redirect.github.com/websockets/ws/releases/tag/8.11.0) (no change) ### [`v4.7.3`](https://redirect.github.com/socketio/socket.io/releases/tag/4.7.3) [Compare Source](https://redirect.github.com/socketio/socket.io/compare/4.7.2...4.7.3) ##### Bug Fixes - return the first response when broadcasting to a single socket ([#​4878](https://redirect.github.com/socketio/socket.io/issues/4878)) ([df8e70f](https://redirect.github.com/socketio/socket.io/commit/df8e70f79822e3887b4f21ca718af8a53bbda2c4)) - **typings:** allow to bind to a non-secure Http2Server ([#​4853](https://redirect.github.com/socketio/socket.io/issues/4853)) ([8c9ebc3](https://redirect.github.com/socketio/socket.io/commit/8c9ebc30e5452ff9381af5d79f547394fa55633c)) ##### Links - Diff: https://github.com/socketio/socket.io/compare/4.7.2...4.7.3 - Client release: [4.7.3](https://redirect.github.com/socketio/socket.io-client/releases/tag/4.7.3) - [`engine.io@~6.5.2`](https://redirect.github.com/socketio/engine.io/releases/tag/6.5.2) (no change) - [`ws@~8.11.0`](https://redirect.github.com/websockets/ws/releases/tag/8.11.0) (no change) ### [`v4.7.2`](https://redirect.github.com/socketio/socket.io/releases/tag/4.7.2) [Compare Source](https://redirect.github.com/socketio/socket.io/compare/4.7.1...4.7.2) ##### Bug Fixes - clean up child namespace when client is rejected in middleware ([#​4773](https://redirect.github.com/socketio/socket.io/issues/4773)) ([0731c0d](https://redirect.github.com/socketio/socket.io/commit/0731c0d2f497d5cce596ea1ec32a67c08bcccbcd)) - **webtransport:** properly handle WebTransport-only connections ([3468a19](https://redirect.github.com/socketio/socket.io/commit/3468a197afe87e65eb0d779fabd347fe683013ab)) - **webtransport:** add proper framing ([a306db0](https://redirect.github.com/socketio/engine.io/commit/a306db09e8ddb367c7d62f45fec920f979580b7c)) ##### Links - Diff: https://github.com/socketio/socket.io/compare/4.7.1...4.7.2 - Client release: [4.7.2](https://redirect.github.com/socketio/socket.io-client/releases/tag/4.7.2) - [`engine.io@~6.5.2`](https://redirect.github.com/socketio/engine.io/releases/tag/6.5.2) ([diff](https://redirect.github.com/socketio/engine.io/compare/6.5.0...6.5.2)) - [`ws@~8.11.0`](https://redirect.github.com/websockets/ws/releases/tag/8.11.0) (no change) ### [`v4.7.1`](https://redirect.github.com/socketio/socket.io/releases/tag/4.7.1) [Compare Source](https://redirect.github.com/socketio/socket.io/compare/4.7.0...4.7.1) The client bundle contains a few fixes regarding the WebTransport support. ##### Links - Diff: https://github.com/socketio/socket.io/compare/4.7.0...4.7.1 - Client release: [4.7.1](https://redirect.github.com/socketio/socket.io-client/releases/tag/4.7.1) - [`engine.io@~6.5.0`](https://redirect.github.com/socketio/engine.io/releases/tag/6.5.0) (no change) - [`ws@~8.11.0`](https://redirect.github.com/websockets/ws/releases/tag/8.11.0) (no change) ### [`v4.7.0`](https://redirect.github.com/socketio/socket.io/releases/tag/4.7.0) [Compare Source](https://redirect.github.com/socketio/socket.io/compare/4.6.2...4.7.0) ##### Bug Fixes - remove the Partial modifier from the socket.data type ([#​4740](https://redirect.github.com/socketio/socket.io/issues/4740)) ([e5c62ca](https://redirect.github.com/socketio/socket.io/commit/e5c62cad60fc7d16fbb024fd9be1d1880f4e6f5f)) ##### Features ##### Support for WebTransport The Socket.IO server can now use WebTransport as the underlying transport. WebTransport is a web API that uses the HTTP/3 protocol as a bidirectional transport. It's intended for two-way communications between a web client and an HTTP/3 server. References: - https://w3c.github.io/webtransport/ - https://developer.mozilla.org/en-US/docs/Web/API/WebTransport - https://developer.chrome.com/articles/webtransport/ Until WebTransport support lands [in Node.js](https://redirect.github.com/nodejs/node/issues/38478), you can use the `@fails-components/webtransport` package: ```js import { readFileSync } from "fs"; import { createServer } from "https"; import { Server } from "socket.io"; import { Http3Server } from "@​fails-components/webtransport"; // WARNING: the total length of the validity period MUST NOT exceed two weeks (https://w3c.github.io/webtransport/#custom-certificate-requirements) const cert = readFileSync("/path/to/my/cert.pem"); const key = readFileSync("/path/to/my/key.pem"); const httpsServer = createServer({ key, cert }); httpsServer.listen(3000); const io = new Server(httpsServer, { transports: ["polling", "websocket", "webtransport"] // WebTransport is not enabled by default }); const h3Server = new Http3Server({ port: 3000, host: "0.0.0.0", secret: "changeit", cert, privKey: key, }); (async () => { const stream = await h3Server.sessionStream("/socket.io/"); const sessionReader = stream.getReader(); while (true) { const { done, value } = await sessionReader.read(); if (done) { break; } io.engine.onWebTransportSession(value); } })(); h3Server.startServer(); ``` Added in [123b68c](https://redirect.github.com/socketio/engine.io/commit/123b68c04f9e971f59b526e0f967a488ee6b0116). ##### Client bundles with CORS headers The bundles will now have the right `Access-Control-Allow-xxx` headers. Added in [63f181c](https://redirect.github.com/socketio/socket.io/commit/63f181cc12cbbbf94ed40eef52d60f36a1214fbe). ##### Links - Diff: https://github.com/socketio/socket.io/compare/4.6.2...4.7.0 - Client release: [4.7.0](https://redirect.github.com/socketio/socket.io-client/releases/tag/4.7.0) - [`engine.io@~6.5.0`](https://redirect.github.com/socketio/engine.io/releases/tag/6.5.0) ([diff](https://redirect.github.com/socketio/engine.io/compare/6.4.2...6.5.0)) - [`ws@~8.11.0`](https://redirect.github.com/websockets/ws/releases/tag/8.11.0) (no change)

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.



This PR was generated by Mend Renovate. View the repository job log.

renovate[bot] commented 2 months ago

Branch automerge failure

This PR was configured for branch automerge. However, this is not possible, so it has been raised as a PR instead.