Damien Arrachequesne
a5a1c29082
chore: update dev dependencies
2022-10-13 09:17:46 +02:00
Damien Arrachequesne
8be95b3bd3
chore(release): 4.5.2
...
Diff: https://github.com/socketio/socket.io/compare/4.5.1...4.5.2
2022-09-02 23:46:14 +01:00
Damien Arrachequesne
9890b036cf
chore: bump dependencies
...
Production:
- socket.io-parser: ~4.0.4 => ~4.2.0
Development:
- superagent: ^6.1.0 => ^8.0.0
- tsd: ^0.17.0 => ^0.21.0
Related: https://github.com/socketio/socket.io/issues/3709
2022-06-27 09:16:08 +02:00
Damien Arrachequesne
713a6b451b
chore: bump mocha to version 10.0.0
...
Related: https://github.com/socketio/socket.io/issues/3710
2022-06-27 09:00:31 +02:00
Damien Arrachequesne
5ab8289c0a
chore(release): 4.5.1
...
Diff: https://github.com/socketio/socket.io/compare/4.5.0...4.5.1
2022-05-17 23:38:07 +02:00
Damien Arrachequesne
43f9ee8d23
chore(release): 0.2.0
...
Diff: https://github.com/socketio/socket.io-cluster-adapter/compare/0.1.0...0.2.0
2022-04-28 16:16:13 +02:00
Damien Arrachequesne
055b7840d8
feat: broadcast and expect multiple acks
...
This feature was added in `socket.io@4.5.0`:
```js
io.timeout(1000).emit("some-event", (err, responses) => {
// ...
});
```
Thanks to this change, it will now work with multiple Socket.IO
servers.
Related: https://github.com/socketio/socket.io/issues/4163
2022-04-28 16:11:12 +02:00
Damien Arrachequesne
8ecfcba5c1
chore(release): 4.5.0
...
Diff: https://github.com/socketio/socket.io/compare/4.4.1...4.5.0
2022-04-24 00:45:57 +02:00
Damien Arrachequesne
6e1bb62982
chore: bump engine.io to version 6.2.0
...
Release notes: https://github.com/socketio/engine.io/releases/tag/6.2.0
Diff: https://github.com/socketio/engine.io/compare/6.1.3...6.2.0
2022-04-22 22:43:31 +02:00
Damien Arrachequesne
8b204570a9
feat: broadcast and expect multiple acks
...
Syntax:
```js
io.timeout(1000).emit("some-event", (err, responses) => {
// ...
});
```
The adapter exposes two additional methods:
- `broadcastWithAck(packets, opts, clientCountCallback, ack)`
Similar to `broadcast(packets, opts)`, but:
* `clientCountCallback()` is called with the number of clients that
received the packet (can be called several times in a cluster)
* `ack()` is called for each client response
- `serverCount()`
It returns the number of Socket.IO servers in the cluster (1 for the
in-memory adapter).
Those two methods will be implemented in the other adapters (Redis,
Postgres, MongoDB, ...).
Related:
- https://github.com/socketio/socket.io/issues/1811
- https://github.com/socketio/socket.io/issues/4163
- https://github.com/socketio/socket.io-redis-adapter/issues/445
2022-03-31 07:49:09 +02:00
Szegedi Ádám
2f96438952
chore: bump engine.io version to fix CVE-2022-21676 ( #4262 )
...
Related: https://github.com/socketio/engine.io/security/advisories/GHSA-273r-mgr4-v34f
2022-01-25 22:18:18 +01:00
Damien Arrachequesne
c82a4bdf1f
chore(release): 4.4.1
...
Diff: https://github.com/socketio/socket.io/compare/4.4.0...4.4.1
2022-01-06 07:32:03 +01:00
Gray Zhang
51784d0305
chore: add types to exports field to be compatible with nodenext module resolution ( #4228 )
...
See [1] for detail, in `nodenext` module resolution it requires a
`types` field in `exports` with full filename including extension.
[1]: https://github.com/microsoft/TypeScript/issues/46770#issuecomment-966612103
2021-12-28 10:27:08 +01:00
Damien Arrachequesne
0f11c4745f
chore(release): 4.4.0
...
Diff: https://github.com/socketio/socket.io/compare/4.3.2...4.4.0
2021-11-18 14:10:19 +01:00
Damien Arrachequesne
2da82103d2
test: add test for volatile packet with binary
...
See also: 88eee5948a
2021-11-16 15:57:32 +01:00
Damien Arrachequesne
c0d8c5ab23
feat: add an implementation based on uWebSockets.js
...
Usage:
```js
const { App } = require("uWebSockets.js");
const { Server } = require("socket.io");
const app = new App();
const server = new Server();
server.attachApp(app);
app.listen(3000);
```
The Adapter prototype is updated so we can benefit from the publish
functionality of uWebSockets.js, so this will apply to all adapters
extending the default adapter.
Reference: https://github.com/uNetworking/uWebSockets.js
Related:
- https://github.com/socketio/socket.io/issues/3601
- https://github.com/socketio/engine.io/issues/578
2021-11-12 07:01:55 +01:00
Damien Arrachequesne
ed8483da4d
chore(release): 4.3.2
...
Diff: https://github.com/socketio/socket.io/compare/4.3.1...4.3.2
2021-11-08 06:39:20 +01:00
Damien Arrachequesne
ccc5ec39a8
chore(release): 4.3.1
...
Diff: https://github.com/socketio/socket.io/compare/4.3.0...4.3.1
2021-10-17 00:02:16 +02:00
Damien Arrachequesne
95810aa62d
chore(release): 4.3.0
...
Diff: https://github.com/socketio/socket.io/compare/4.2.0...4.3.0
2021-10-14 14:59:13 +02:00
Damien Arrachequesne
eb5fdbd03e
chore: bump engine.io to version 6.0.0
...
Release notes: https://github.com/socketio/engine.io/releases/tag/6.0.0
Diff: https://github.com/socketio/engine.io/compare/5.2.0...6.0.0
2021-10-12 00:05:10 +02:00
Damien Arrachequesne
c100b7b61c
chore(release): 4.2.0
...
Diff: https://github.com/socketio/socket.io/compare/4.1.3...4.2.0
2021-08-30 09:21:00 +02:00
Damien Arrachequesne
f03eeca39a
chore: bump dependencies
2021-08-30 08:27:46 +02:00
Damien Arrachequesne
dbd2a07cda
chore(release): 4.1.3
...
Diff: https://github.com/socketio/socket.io/compare/4.1.2...4.1.3
2021-07-10 12:13:15 +02:00
Damien Arrachequesne
7c44893d78
chore: bump dependencies
2021-07-04 00:37:35 +02:00
Damien Arrachequesne
6397c1bdfd
chore(release): 0.1.0
2021-06-22 07:06:15 +02:00
Damien Arrachequesne
ff370cfc46
Initial commit
2021-06-22 07:02:16 +02:00
Damien Arrachequesne
eb01ff5803
chore(release): 0.1.0
2021-06-14 08:02:20 +02:00
Damien Arrachequesne
f2e3d162ab
Initial commit
2021-06-14 07:59:12 +02:00
Damien Arrachequesne
1633150b2b
chore(release): 4.1.2
...
Diff: https://github.com/socketio/socket.io/compare/4.1.1...4.1.2
2021-05-17 23:17:31 +02:00
Damien Arrachequesne
995f38f4cc
chore(release): 4.1.1
...
Diff: https://github.com/socketio/socket.io/compare/4.1.0...4.1.1
2021-05-12 00:04:52 +02:00
Damien Arrachequesne
fb6b0efec9
chore(release): 4.1.0
...
Diff: https://github.com/socketio/socket.io/compare/4.0.2...4.1.0
2021-05-11 09:27:52 +02:00
Damien Arrachequesne
dc381b72c6
perf: add support for the "wsPreEncoded" writing option
...
Packets that are sent to multiple clients will now be pre-encoded for
the WebSocket transport (which means simply prepending "4" - which is
the "message" packet type in Engine.IO).
Note: buffers are not pre-encoded, since they are sent without
modification over the WebSocket connection
See also: 7706b123df
engine.io diff: https://github.com/socketio/engine.io/compare/5.0.0...5.1.0
2021-05-11 00:06:03 +02:00
Damien Arrachequesne
9fff03487c
chore(release): 4.0.2
...
Diff: https://github.com/socketio/socket.io/compare/4.0.1...4.0.2
2021-05-06 14:38:26 +02:00
Damien Arrachequesne
1faa7e3aea
chore(release): 4.0.1
...
Diff: https://github.com/socketio/socket.io/compare/4.0.0...4.0.1
2021-04-01 01:25:56 +02:00
Damien Arrachequesne
5eaeffc8e2
chore(release): 4.0.0
...
Diff: https://github.com/socketio/socket.io/compare/3.1.2...4.0.0
2021-03-10 12:43:53 +01:00
Damien Arrachequesne
1b6d6de4ed
chore: include Engine.IO v5
...
Release notes: https://github.com/socketio/engine.io/releases/tag/5.0.0
2021-03-10 11:14:33 +01:00
Maxime Kjaer
0107510ba8
feat: add support for typed events ( #3822 )
...
Syntax:
```ts
interface ClientToServerEvents {
"my-event": (a: number, b: string, c: number[]) => void;
}
interface ServerToClientEvents {
hello: (message: string) => void;
}
const io = new Server<ClientToServerEvents, ServerToClientEvents>(httpServer);
io.emit("hello", "world");
io.on("connection", (socket) => {
socket.on("my-event", (a, b, c) => {
// ...
});
socket.emit("hello", "again");
});
```
The events are not typed by default (inferred as any), so this change
is backward compatible.
Note: we could also have reused the method here ([1]) to add types to
the EventEmitter, instead of creating a StrictEventEmitter class.
Related: https://github.com/socketio/socket.io/issues/3742
[1]: https://github.com/binier/tiny-typed-emitter
2021-03-10 00:18:13 +01:00
Sebastiaan Marynissen
7de2e87e88
feat: allow to exclude specific rooms when broadcasting ( #3789 )
...
New syntax:
```
io.except("room1").emit(...);
io.to("room1").except("room2").emit(...);
socket.broadcast.except("room1").emit(...);
socket.to("room1").except("room2").emit(...);
```
Related:
- https://github.com/socketio/socket.io/issues/3629
- https://github.com/socketio/socket.io/issues/3657
2021-03-01 09:30:58 +01:00
Damien Arrachequesne
225ade062a
chore(release): 3.1.2
...
Diff: https://github.com/socketio/socket.io/compare/3.1.1...3.1.2
2021-02-26 01:18:42 +01:00
Damien Arrachequesne
67a61e39e6
chore: loosen the version requirement of @types/node
...
Related: https://github.com/socketio/socket.io/issues/3793
2021-02-26 00:58:01 +01:00
Damien Arrachequesne
12221f296d
chore(release): 3.1.1
...
Diff: https://github.com/socketio/socket.io/compare/3.1.0...3.1.1
2021-02-03 22:57:21 +01:00
Damien Arrachequesne
f05a4a6f82
chore(release): 3.1.0
...
Diff: https://github.com/socketio/socket.io/compare/3.0.5...3.1.0
2021-01-15 02:21:54 +01:00
Damien Arrachequesne
2c883f5d4e
chore: bump socket.io-adapter version
...
Diff: https://github.com/socketio/socket.io-adapter/compare/2.0.3...2.1.0
Includes:
- add room events ([155fa63 ](155fa6333a ))
- make rooms and sids public ([313c5a9 ](313c5a9fb6 ))
2021-01-15 01:41:37 +01:00
Damien Arrachequesne
9925746c8e
feat: add support for Socket.IO v2 clients
...
In order to ease the migration to Socket.IO v3, the Socket.IO server
can now communicate with v2 clients.
```js
const io = require("socket.io")({
allowEIO3: true
});
```
This feature is disabled by default.
2021-01-14 23:38:24 +01:00
Damien Arrachequesne
f8a66fd11a
chore(release): 3.0.5
...
Diff: https://github.com/socketio/socket.io/compare/3.0.4...3.0.5
2021-01-05 12:08:15 +01:00
Damien Arrachequesne
752dfe3b1e
chore: bump debug version
2021-01-05 11:53:27 +01:00
Stijn de Witt
230cd19164
chore: bump dependencies
2021-01-04 10:28:17 +01:00
David Fong
d1bfe40dbb
refactor: add more typing info and upgrade prettier ( #3725 )
...
This upgrades prettier to 2.2.0 to gain support for TypeScript's new
type-only-imports feature.
2020-12-11 12:19:20 +01:00
Damien Arrachequesne
81c1f4e819
chore(release): 3.0.4
...
Diff: https://github.com/socketio/socket.io/compare/3.0.3...3.0.4
2020-12-07 12:01:24 +01:00
Stijn de Witt
4e6d40493d
chore: make tests work on Windows ( #3708 )
2020-11-28 01:55:19 +01:00