From 76241474ca0311323a70c500741037f18a766130 Mon Sep 17 00:00:00 2001 From: Damien Arrachequesne Date: Tue, 11 Oct 2022 01:03:14 +0200 Subject: [PATCH] chore(release): 0.2.0 Diff: https://github.com/socketio/socket.io-deno/compare/0.1.1...0.2.0 --- CHANGELOG.md | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 2 +- 2 files changed, 63 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 61c5a30..370a3c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,70 @@ # Releases +- [0.2.0](#020-2022-10-11) (2022-10-11) - [0.1.1](#011-2022-09-14) (2022-09-14) - [0.1.0](#010-2022-09-12) (2022-09-12) +# [0.2.0](https://github.com/socketio/socket.io-deno/compare/0.1.1...0.2.0) (2022-10-11) + +### Bug Fixes + +- **engine:** properly pause the polling transport during upgrade + ([c706741](https://github.com/socketio/socket.io-deno/commit/c706741544e33ca364ef88e3779aa8d4ee3739f0)), + closes [#4](https://github.com/socketio/socket.io-deno/issues/4) +- restore socket.to() and socket.except() methods + ([4ce5f64](https://github.com/socketio/socket.io-deno/commit/4ce5f646a95d9dd522fdf3c86951f82d641e3418)), + closes [#3](https://github.com/socketio/socket.io-deno/issues/3) +- **server:** send events once the handshake is completed + ([518f534](https://github.com/socketio/socket.io-deno/commit/518f534e1c205b746b1cb21fe76b187dabc96f34)) + +### Features + +- implement catch-all listeners + ([333dfdd](https://github.com/socketio/socket.io-deno/commit/333dfdd8d0f8a3409e2f22a765b775f77fb05d85)) + +Syntax: + +```js +io.on("connection", (socket) => { + socket.onAnyIncoming((event, ...args) => { + // ... + }); + + socket.onAnyOutgoing((event, ...args) => { + // ... + }); +}); +``` + +- implement the Redis adapter + ([39eaa0e](https://github.com/socketio/socket.io-deno/commit/39eaa0e755cf16d7b099711c5ff759290103bfd3)) + +```js +import { serve } from "https://deno.land/std@a.b.c/http/server.ts"; +import { + createRedisAdapter, + createRedisClient, + Server, +} from "https://deno.land/x/socket_io@x.y.z/mod.ts"; + +const [pubClient, subClient] = await Promise.all([ + createRedisClient({ + hostname: "localhost", + }), + createRedisClient({ + hostname: "localhost", + }), +]); + +const io = new Server({ + adapter: createRedisAdapter(pubClient, subClient), +}); + +await serve(io.handler(), { + port: 3000, +}); +``` + # [0.1.1](https://github.com/socketio/socket.io-deno/compare/0.1.0...0.1.1) (2022-09-14) ### Bug Fixes diff --git a/README.md b/README.md index ac8bfe7..d9bcdf4 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Table of content: ```ts import { serve } from "https://deno.land/std@0.150.0/http/server.ts"; -import { Server } from "https://deno.land/x/socket_io@0.1.1/mod.ts"; +import { Server } from "https://deno.land/x/socket_io@0.2.0/mod.ts"; const io = new Server();