Skip to content

Commit

Permalink
chore(release): 0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
darrachequesne committed Feb 23, 2023
1 parent e77063b commit b39f5d5
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 4 deletions.
36 changes: 34 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,35 @@
# History

- [0.3.0](#030-2023-02-23) (Feb 2023)
- [0.2.1](#021-2022-05-03) (May 2022)
- [0.2.0](#020-2022-04-27) (Apr 2022)
- [0.1.0](#010-2021-06-01) (Jun 2021)

# Release notes

## [0.3.0](https://github.com/socketio/socket.io-mongo-adapter/compare/0.2.1...0.3.0) (2023-02-23)


### Features

#### Connection state recovery

This adapter is now compatible with the connection state recovery feature, which was added in `[email protected]`.

Reference: https://socket.io/docs/v4/connection-state-recovery

Added in [02e4d57](https://github.com/socketio/socket.io-mongo-adapter/commit/02e4d57721937ce832fc9a83abddaecd4f8d38aa).

#### Resume token

Upon reconnection to the MongoDB server, the client will now try to resume the stream at the last offset it has processed.

If the MongoDB client is disconnected for too long and its token is no longer valid, then the Socket.IO clients connected to this server may miss some packets (which was the previous behavior).

Added in [e77063b](https://github.com/socketio/socket.io-mongo-adapter/commit/e77063b8fd88b68df58e7bfdc7f3ef4edb51dca0).



## [0.2.1](https://github.com/socketio/socket.io-mongo-adapter/compare/0.2.0...0.2.1) (2022-05-03)


Expand All @@ -7,7 +39,7 @@



# [0.2.0](https://github.com/socketio/socket.io-mongo-adapter/compare/0.1.0...0.2.0) (2022-04-27)
## [0.2.0](https://github.com/socketio/socket.io-mongo-adapter/compare/0.1.0...0.2.0) (2022-04-27)


### Features
Expand All @@ -32,7 +64,7 @@ Thanks to this change, it will now work with multiple Socket.IO servers.

The adapter will now create one single MongoDB stream for all namespaces, instead of one per namespace, which could lead to performance issues.

# 0.1.0 (2021-06-01)
## 0.1.0 (2021-06-01)

Initial commit

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Supported features:
- [`disconnectSockets`](https://socket.io/docs/v4/server-instance/#disconnectSockets)
- [`fetchSockets`](https://socket.io/docs/v4/server-instance/#fetchSockets)
- [`serverSideEmit`](https://socket.io/docs/v4/server-instance/#serverSideEmit)
- [`Connection state recovery`](https://socket.io/docs/v4/connection-state-recovery)

Related packages:

Expand Down
2 changes: 1 addition & 1 deletion lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,7 @@ export class MongoAdapter extends Adapter {

const session = results[0].value.data;

// could use a sparse index on [_id, data.opts.rooms, data.opts.except] (only index the documents whose type is EventType.BROADCAST)
// could use a sparse index on [_id, nsp, data.opts.rooms, data.opts.except] (only index the documents whose type is EventType.BROADCAST)
const cursor = this.mongoCollection.find({
$and: [
{
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@socket.io/mongo-adapter",
"version": "0.2.1",
"version": "0.3.0",
"description": "The Socket.IO MongoDB adapter, allowing to broadcast events between several Socket.IO servers",
"license": "MIT",
"repository": {
Expand Down

0 comments on commit b39f5d5

Please sign in to comment.