Skip to content

Commit

Permalink
chore(release): 6.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
darrachequesne committed Jun 16, 2023
1 parent 9d37b16 commit 4abc2ca
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 4 deletions.
48 changes: 48 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## 2023

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

# Release notes

# [6.5.0](https://github.com/socketio/engine.io-client/compare/6.4.0...6.5.0) (2023-06-16)


### Features

#### Support for WebTransport

The Engine.IO client 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:

- https://w3c.github.io/webtransport/
- https://developer.mozilla.org/en-US/docs/Web/API/WebTransport
- https://developer.chrome.com/articles/webtransport/

**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:

```js
import { WebTransport } from "@fails-components/webtransport";

global.WebTransport = WebTransport;
```

Added in [7195c0f](https://github.com/socketio/engine.io-client/commit/7195c0f305b482f7b1ca2ed812030caaf72c0906).

#### Cookie management for the Node.js client

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.

```js
import { Socket } from "engine.io-client";

const socket = new Socket("https://example.com", {
withCredentials: true
});
```

Added in [5fc88a6](https://github.com/socketio/engine.io-client/commit/5fc88a62d4017cdc144fa39b9755deadfff2db34).

### Dependencies

- [`ws@~8.11.0`](https://github.com/websockets/ws/releases/tag/8.11.0) (no change)



## [6.4.0](https://github.com/socketio/engine.io-client/compare/6.3.1...6.4.0) (2023-02-06)

The minor bump is due to changes on the server side.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ Exposed as `eio` in the browser standalone build.
- `timestampParam` (`String`): timestamp parameter (`t`)
- `path` (`String`): path to connect to, default is `/engine.io`
- `transports` (`Array`): a list of transports to try (in order).
Defaults to `['polling', 'websocket']`. `Engine`
Defaults to `['polling', 'websocket', 'webtransport']`. `Engine`
always attempts to connect directly with the first one, provided the
feature detection test for it passes.
- `transportOptions` (`Object`): hash of options, indexed by transport name, overriding the common options for the given transport
Expand Down
9 changes: 7 additions & 2 deletions lib/socket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ export interface SocketOptions {
* A list of transports to try (in order). Engine.io always attempts to
* connect directly with the first one, provided the feature detection test
* for it passes.
* @default ['polling','websocket']
*
* @default ['polling','websocket', 'webtransport']
*/
transports: string[];

Expand Down Expand Up @@ -324,7 +325,11 @@ export class Socket extends Emitter<
? "443"
: "80");

this.transports = opts.transports || ["polling", "websocket"];
this.transports = opts.transports || [
"polling",
"websocket",
"webtransport",
];
this.writeBuffer = [];
this.prevBufferLen = 0;

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "engine.io-client",
"description": "Client for the realtime Engine",
"license": "MIT",
"version": "6.4.0",
"version": "6.5.0",
"main": "./build/cjs/index.js",
"module": "./build/esm/index.js",
"exports": {
Expand Down

0 comments on commit 4abc2ca

Please sign in to comment.