Skip to content

Latest commit

 

History

History
130 lines (97 loc) · 3.8 KB

CHANGELOG.md

File metadata and controls

130 lines (97 loc) · 3.8 KB

History

Version Release date
0.2.1 January 2025
0.2.0 October 2022
0.1.1 September 2022
0.1.0 September 2022

Release notes

0.2.1 (2025-01-09)

Bug Fixes

  • check if websocket is open before writing (#22) (d08f8f2)
  • make socket#nsp public (84d97be)
  • use Deno.serve() instead of serve() (5a27581)

BREAKING CHANGE ⚠️

Please use Deno.serve() instead of serve(), which was removed in Deno v1.

Before:

import { serve } from "https://deno.land/[email protected]/http/server.ts";
import { Server } from "https://deno.land/x/[email protected]/mod.ts";

const io = new Server();

await serve(io.handler(), {
  port: 3000,
});

After:

import { Server } from "https://deno.land/x/[email protected]/mod.ts";

const io = new Server();

Deno.serve({
  handler: io.handler(),
  port: 3000,
});

0.2.0 (2022-10-11)

Bug Fixes

  • engine: properly pause the polling transport during upgrade (c706741), closes #4
  • restore socket.to() and socket.except() methods (4ce5f64), closes #3
  • server: send events once the handshake is completed (518f534)

Features

  • implement catch-all listeners (333dfdd)

Syntax:

io.on("connection", (socket) => {
  socket.onAnyIncoming((event, ...args) => {
    // ...
  });

  socket.onAnyOutgoing((event, ...args) => {
    // ...
  });
});
  • implement the Redis adapter (39eaa0e)
import { serve } from "https://deno.land/[email protected]/http/server.ts";
import {
  createRedisAdapter,
  createRedisClient,
  Server,
} from "https://deno.land/x/[email protected]/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 (2022-09-14)

Bug Fixes

  • disallow duplicate WebSocket connections with same sid (193a9b5)
  • disallow mismatching transport (6b2cc16)
  • prevent crash when using custom headers (dfe3122)
  • send a "noop" packet when transport is already closed (3b1eb82)

0.1.0 (2022-09-12)

This is the first release of this library!