Open mend-for-github-com[bot] opened 1 year ago
This PR contains the following updates:
^3.1.0
^4.5.0
By merging this PR, the below issues will be automatically resolved and closed:
This PR contains the following updates:
^3.1.0
->^4.5.0
By merging this PR, the below issues will be automatically resolved and closed:
Release Notes
socketio/socket.io (socket.io-client)
### [`v4.5.0`](https://redirect.github.com/socketio/socket.io/releases/tag/4.5.0) [Compare Source](https://redirect.github.com/socketio/socket.io/compare/4.4.1...4.5.0) ##### Bug Fixes - **typings:** ensure compatibility with TypeScript 3.x ([#4259](https://redirect.github.com/socketio/socket.io/issues/4259)) ([02c87a8](https://redirect.github.com/socketio/socket.io/commit/02c87a85614e217b8e7b93753f315790ae9d99f6)) ##### Features - add support for catch-all listeners for outgoing packets ([531104d](https://redirect.github.com/socketio/socket.io/commit/531104d332690138b7aab84d5583d6204132c8b4)) This is similar to `onAny()`, but for outgoing packets. Syntax: ```js socket.onAnyOutgoing((event, ...args) => { console.log(event); }); ``` - broadcast and expect multiple acks ([8b20457](https://redirect.github.com/socketio/socket.io/commit/8b204570a94979bbec307f23ca078f30f5cf07b0)) Syntax: ```js io.timeout(1000).emit("some-event", (err, responses) => { // ... }); ``` - add the "maxPayload" field in the handshake details ([088dcb4](https://redirect.github.com/socketio/engine.io/commit/088dcb4dff60df39785df13d0a33d3ceaa1dff38)) So that clients in HTTP long-polling can decide how many packets they have to send to stay under the maxHttpBufferSize value. This is a backward compatible change which should not mandate a new major revision of the protocol (we stay in v4), as we only add a field in the JSON-encoded handshake data: 0{"sid":"lv_VI97HAXpY6yYWAAAC","upgrades":["websocket"],"pingInterval":25000,"pingTimeout":5000,"maxPayload":1000000} ##### Links: - Diff: https://github.com/socketio/socket.io/compare/4.4.1...4.5.0 - Client release: [4.5.0](https://redirect.github.com/socketio/socket.io-client/releases/tag/4.5.0) - engine.io version: `~6.2.0` ([diff](https://redirect.github.com/socketio/engine.io/compare/6.1.0...6.2.0)) - ws version: `~8.2.3` ### [`v4.4.1`](https://redirect.github.com/socketio/socket.io/releases/tag/4.4.1) [Compare Source](https://redirect.github.com/socketio/socket.io/compare/4.4.0...4.4.1) ##### Bug Fixes - **types:** make `RemoteSocket.data` type safe ([#4234](https://redirect.github.com/socketio/socket.io/issues/4234)) ([770ee59](https://redirect.github.com/socketio/socket.io/commit/770ee5949fb47c2556876c622f06c862573657d6)) - **types:** pass `SocketData` type to custom namespaces ([#4233](https://redirect.github.com/socketio/socket.io/issues/4233)) ([f2b8de7](https://redirect.github.com/socketio/socket.io/commit/f2b8de71919e1b4d3e57f15a459972c1d1064787)) ##### Links: - Diff: https://github.com/socketio/socket.io/compare/4.4.0...4.4.1 - Client release: [4.4.1](https://redirect.github.com/socketio/socket.io-client/releases/tag/4.4.1) - engine.io version: `~6.1.0` ([diff](https://redirect.github.com/socketio/engine.io/compare/6.0.0...6.1.0)) - ws version: `~8.2.3` ### [`v4.4.0`](https://redirect.github.com/socketio/socket.io/releases/tag/4.4.0) [Compare Source](https://redirect.github.com/socketio/socket.io/compare/4.3.2...4.4.0) ##### Bug Fixes - only set 'connected' to true after middleware execution ([02b0f73](https://redirect.github.com/socketio/socket.io/commit/02b0f73e2c64b09c72c5fbf7dc5f059557bdbe50)) ##### Features - add an implementation based on uWebSockets.js ([c0d8c5a](https://redirect.github.com/socketio/socket.io/commit/c0d8c5ab234d0d2bef0d0dec472973cc9662f647)) ```js const { App } = require("uWebSockets.js"); const { Server } = require("socket.io"); const app = new App(); const io = new Server(); io.attachApp(app); io.on("connection", (socket) => { // ... }); app.listen(3000, (token) => { if (!token) { console.warn("port already in use"); } }); ``` - add timeout feature ([f0ed42f](https://redirect.github.com/socketio/socket.io/commit/f0ed42f18cabef20ad976aeec37077b6bf3837a5)) ```js socket.timeout(5000).emit("my-event", (err) => { if (err) { // the client did not acknowledge the event in the given delay } }); ``` - add type information to `socket.data` ([#4159](https://redirect.github.com/socketio/socket.io/issues/4159)) ([fe8730c](https://redirect.github.com/socketio/socket.io/commit/fe8730ca0f15bc92d5de81cf934c89c76d6af329)) ```js interface SocketData { name: string; age: number; } const io = new Server