Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency socket.io to v4.8.1 #8

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jul 12, 2023

This PR contains the following updates:

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

Release Notes

socketio/socket.io (socket.io)

v4.8.1

Compare Source

Bug Fixes
  • bundle: do not mangle the "_placeholder" attribute (ca9e994)
Dependencies

v4.8.0

Compare Source

Features
Custom transport implementations

The transports option now accepts an array of transport implementations:

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 ✅ (1)
NodeXHR
XHR
NodeWebSocket
WebSocket ✅ (2)
WebTransport

(1) since v18.0.0
(2) since v21.0.0

Added in f4d898e and b11763b.

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:

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.

Bug Fixes
  • accept string | undefined as init argument (bis) (60c757f)
  • allow to manually stop the reconnection loop (13c6d2e)
  • close the engine upon decoding exception (04c8dd9)
  • do not send a packet on an expired connection (#​5134) (8adcfbf)
Dependencies

v4.7.5

Compare Source

Bug Fixes
  • close the adapters when the server is closed (bf64870)
  • remove duplicate pipeline when serving bundle (e426f3e)
Links

v4.7.4

Compare Source

Bug Fixes
  • typings: calling io.emit with no arguments incorrectly errored (cb6d2e0), closes #​4914
Links

v4.7.3

Compare Source

Bug Fixes
  • return the first response when broadcasting to a single socket (#​4878) (df8e70f)
  • typings: allow to bind to a non-secure Http2Server (#​4853) (8c9ebc3)
Links

v4.7.2

Compare Source

Bug Fixes
  • clean up child namespace when client is rejected in middleware (#​4773) (0731c0d)
  • webtransport: properly handle WebTransport-only connections (3468a19)
  • webtransport: add proper framing (a306db0)
Links

v4.7.1

Compare Source

The client bundle contains a few fixes regarding the WebTransport support.

Links

v4.7.0

Compare Source

Bug Fixes
  • remove the Partial modifier from the socket.data type (#​4740) (e5c62ca)
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:

Until WebTransport support lands in Node.js, you can use the @fails-components/webtransport package:

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.

Client bundles with CORS headers

The bundles will now have the right Access-Control-Allow-xxx headers.

Added in 63f181c.

Links

v4.6.2

Compare Source

Bug Fixes
Links

Configuration

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

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

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


  • If you want to rebase/retry this PR, check this box

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

@renovate renovate bot changed the title Update dependency socket.io to v4.7.1 Update dependency socket.io to v4.7.2 Aug 3, 2023
@renovate renovate bot force-pushed the renovate/socket.io-packages branch from 7e3e052 to ca2fb2d Compare August 3, 2023 15:00
@renovate renovate bot changed the title Update dependency socket.io to v4.7.2 Update dependency socket.io to v4.7.3 Jan 4, 2024
@renovate renovate bot force-pushed the renovate/socket.io-packages branch from ca2fb2d to d2089f4 Compare January 4, 2024 14:47
@renovate renovate bot force-pushed the renovate/socket.io-packages branch from d2089f4 to 15fe0a0 Compare January 12, 2024 11:49
@renovate renovate bot changed the title Update dependency socket.io to v4.7.3 Update dependency socket.io to v4.7.4 Jan 12, 2024
@renovate renovate bot changed the title Update dependency socket.io to v4.7.4 Update dependency socket.io to v4.7.5 Mar 14, 2024
@renovate renovate bot force-pushed the renovate/socket.io-packages branch from 15fe0a0 to 26f463b Compare March 14, 2024 23:57
@renovate renovate bot force-pushed the renovate/socket.io-packages branch from 26f463b to 0493ef5 Compare September 21, 2024 08:33
@renovate renovate bot changed the title Update dependency socket.io to v4.7.5 Update dependency socket.io to v4.8.0 Sep 21, 2024
@renovate renovate bot changed the title Update dependency socket.io to v4.8.0 Update dependency socket.io to v4.8.1 Oct 26, 2024
@renovate renovate bot force-pushed the renovate/socket.io-packages branch from 0493ef5 to cf5a245 Compare October 26, 2024 05:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants