Skip to content

Commit

Permalink
chore(release): 6.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
darrachequesne committed Feb 6, 2023
1 parent 6220d14 commit 898bd1c
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 10 deletions.
49 changes: 49 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## 2023

- [6.4.0](#640-2023-02-06) (Feb 2023)
- [6.3.1](#631-2023-01-12) (Jan 2023)
- [6.3.0](#630-2023-01-10) (Jan 2023)

Expand Down Expand Up @@ -44,9 +45,57 @@

# Release notes

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


### Features

* add support for Express middlewares ([24786e7](https://github.com/socketio/engine.io/commit/24786e77c5403b1c4b5a2bc84e2af06f9187f74a))

This commit implements middlewares at the Engine.IO level, because Socket.IO middlewares are meant for namespace authorization and are not executed during a classic HTTP request/response cycle.

A workaround was possible by using the allowRequest option and the "headers" event, but this feels way cleaner and works with upgrade requests too.

Syntax:

```js
engine.use((req, res, next) => {
// do something

next();
});

// with express-session
import session from "express-session";

engine.use(session({
secret: "keyboard cat",
resave: false,
saveUninitialized: true,
cookie: { secure: true }
}));

// with helmet
import helmet from "helmet";

engine.use(helmet());
```


### Dependencies

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



## [6.3.1](https://github.com/socketio/engine.io/compare/6.3.0...6.3.1) (2023-01-12)


### Dependencies

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



## [6.3.0](https://github.com/socketio/engine.io/compare/6.2.1...6.3.0) (2023-01-10)

Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "engine.io",
"version": "6.3.1",
"version": "6.4.0",
"description": "The realtime engine behind Socket.IO. Provides the foundation of a bidirectional connection between client and server",
"type": "commonjs",
"main": "./build/engine.io.js",
Expand Down Expand Up @@ -45,7 +45,7 @@
"devDependencies": {
"babel-eslint": "^8.0.2",
"eiows": "^4.1.2",
"engine.io-client": "6.3.0",
"engine.io-client": "6.4.0",
"engine.io-client-v3": "npm:[email protected]",
"expect.js": "^0.3.1",
"express-session": "^1.17.3",
Expand Down
2 changes: 1 addition & 1 deletion test/engine.io.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ describe("engine", () => {
expect(protocol).to.be.a("number");
});

it.skip("should be the same version as client", () => {
it("should be the same version as client", () => {
const version = require("../package.json").version;
expect(version).to.be(require("engine.io-client/package.json").version);
});
Expand Down

0 comments on commit 898bd1c

Please sign in to comment.