Skip to content

Commit 4abc2ca

Browse files
chore(release): 6.5.0
Diff: 6.4.0...6.5.0
1 parent 9d37b16 commit 4abc2ca

File tree

4 files changed

+57
-4
lines changed

4 files changed

+57
-4
lines changed

CHANGELOG.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## 2023
44

5+
- [6.5.0](#650-2023-06-16) (Jun 2023)
56
- [6.4.0](#640-2023-02-06) (Feb 2023)
67
- [6.3.1](#631-2023-02-04) (Feb 2023)
78
- [6.3.0](#63O-2023-01-10) (Jan 2023)
@@ -36,6 +37,53 @@
3637

3738
# Release notes
3839

40+
# [6.5.0](https://github.com/socketio/engine.io-client/compare/6.4.0...6.5.0) (2023-06-16)
41+
42+
43+
### Features
44+
45+
#### Support for WebTransport
46+
47+
The Engine.IO client can now use WebTransport as the underlying transport.
48+
49+
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.
50+
51+
References:
52+
53+
- https://w3c.github.io/webtransport/
54+
- https://developer.mozilla.org/en-US/docs/Web/API/WebTransport
55+
- https://developer.chrome.com/articles/webtransport/
56+
57+
**For Node.js clients**: until WebTransport support lands [in Node.js](https://github.com/nodejs/node/issues/38478), you can use the `@fails-components/webtransport` package:
58+
59+
```js
60+
import { WebTransport } from "@fails-components/webtransport";
61+
62+
global.WebTransport = WebTransport;
63+
```
64+
65+
Added in [7195c0f](https://github.com/socketio/engine.io-client/commit/7195c0f305b482f7b1ca2ed812030caaf72c0906).
66+
67+
#### Cookie management for the Node.js client
68+
69+
When setting the `withCredentials` option to `true`, the Node.js client will now include the cookies in the HTTP requests, making it easier to use it with cookie-based sticky sessions.
70+
71+
```js
72+
import { Socket } from "engine.io-client";
73+
74+
const socket = new Socket("https://example.com", {
75+
withCredentials: true
76+
});
77+
```
78+
79+
Added in [5fc88a6](https://github.com/socketio/engine.io-client/commit/5fc88a62d4017cdc144fa39b9755deadfff2db34).
80+
81+
### Dependencies
82+
83+
- [`ws@~8.11.0`](https://github.com/websockets/ws/releases/tag/8.11.0) (no change)
84+
85+
86+
3987
## [6.4.0](https://github.com/socketio/engine.io-client/compare/6.3.1...6.4.0) (2023-02-06)
4088

4189
The minor bump is due to changes on the server side.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ Exposed as `eio` in the browser standalone build.
234234
- `timestampParam` (`String`): timestamp parameter (`t`)
235235
- `path` (`String`): path to connect to, default is `/engine.io`
236236
- `transports` (`Array`): a list of transports to try (in order).
237-
Defaults to `['polling', 'websocket']`. `Engine`
237+
Defaults to `['polling', 'websocket', 'webtransport']`. `Engine`
238238
always attempts to connect directly with the first one, provided the
239239
feature detection test for it passes.
240240
- `transportOptions` (`Object`): hash of options, indexed by transport name, overriding the common options for the given transport

lib/socket.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ export interface SocketOptions {
7373
* A list of transports to try (in order). Engine.io always attempts to
7474
* connect directly with the first one, provided the feature detection test
7575
* for it passes.
76-
* @default ['polling','websocket']
76+
*
77+
* @default ['polling','websocket', 'webtransport']
7778
*/
7879
transports: string[];
7980

@@ -324,7 +325,11 @@ export class Socket extends Emitter<
324325
? "443"
325326
: "80");
326327

327-
this.transports = opts.transports || ["polling", "websocket"];
328+
this.transports = opts.transports || [
329+
"polling",
330+
"websocket",
331+
"webtransport",
332+
];
328333
this.writeBuffer = [];
329334
this.prevBufferLen = 0;
330335

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "engine.io-client",
33
"description": "Client for the realtime Engine",
44
"license": "MIT",
5-
"version": "6.4.0",
5+
"version": "6.5.0",
66
"main": "./build/cjs/index.js",
77
"module": "./build/esm/index.js",
88
"exports": {

0 commit comments

Comments
 (0)