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

fix(deps): update dependency @socket.io/redis-adapter to v8 #11776

Merged
merged 1 commit into from Jun 14, 2023

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jun 14, 2023

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@socket.io/redis-adapter 7.2.0 -> 8.2.1 age adoption passing confidence

Release Notes

socketio/socket.io-redis-adapter

v8.2.1

Compare Source

Bug Fixes
  • sharded: ensure compatibility with ioredis (42c8ab6)
  • sharded: properly unsubscribe when closing (2da8d9e)

v8.2.0

Compare Source

Bug Fixes
Features
Sharded Pub/Sub

Sharded Pub/Sub was introduced in Redis 7.0 in order to help scaling the usage of Pub/Sub in cluster mode.

Reference: https://redis.io/docs/manual/pubsub/#sharded-pubsub

A dedicated adapter can be created with the createShardedAdapter() method:

import { Server } from 'socket.io';
import { createClient } from 'redis';
import { createShardedAdapter } from '@​socket.io/redis-adapter';

const pubClient = createClient({ host: 'localhost', port: 6379 });
const subClient = pubClient.duplicate();

await Promise.all([
  pubClient.connect(),
  subClient.connect()
]);

const io = new Server({
  adapter: createShardedAdapter(pubClient, subClient)
});

io.listen(3000);

Minimum requirements:

Added in e70b1bd.

Support for node-redis cluster

The redis package now supports Redis cluster.

Added in 77ef42c.

Subscription modes

The subscriptionMode option allows to configure how many Redis Pub/Sub channels are used:

  • "static": 2 channels per namespace

Useful when used with dynamic namespaces.

  • "dynamic": (2 + 1 per public room) channels per namespace

The default value, useful when some rooms have a low number of clients (so only a few Socket.IO servers are notified).

const io = new Server({
  adapter: createShardedAdapter(pubClient, subClient, {
    subscriptionMode: "static"
  })
});

Added in d3388bf.

Credits

Huge thanks to @​winchell for helping!

v8.1.0

Compare Source

The socket.io-adapter package was added to the list of peerDependencies, in order to fix sync issues with the version imported by the socket.io package (see f07ff7b).

Features
Automatic removal of empty child namespaces

The close() method was implemented, in order to be used with the new cleanupEmptyChildNamespaces option.

Reference: https://github.com/socketio/socket.io/releases/tag/4.6.0

Added in fe89f7e.

v8.0.1

Compare Source

This release pins the socket.io-adapter package to version ~2.4.0 instead of ^2.4.0.

v8.0.0

Compare Source

Dependencies
Features

Example with msgpackr:

import { unpack, pack } from "msgpackr";

io.adapter(createAdapter(pubClient, subClient, {
  parser: {
    encode(val) {
      return pack(val);
    },
    decode(val) {
      return unpack(val);
    }
  }
}));
  • remove deprecated methods (fb760d9)
BREAKING CHANGES
  • the remoteJoin(), remoteLeave(), remoteDisconnect()
    and sockets() methods are removed in favor of the official alternatives

Related: socketio/socket.io@b25495c

  • the format of Date objects is modified in a non
    backward-compatible way, as notepack.io now implements the MessagePack
    Timestamp extension type.

Reference: https://github.com/msgpack/msgpack/blob/master/spec.md#timestamp-extension-type

Previous versions of the adapter will not be able to parse the Date
objects sent by newer versions.


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 has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot added the dependencies Pull requests that update a dependency file label Jun 14, 2023
@coveralls
Copy link

Pull Request Test Coverage Report for Build 49d371c3-72df-486a-bed7-5c183828e243

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 92.784%

Totals Coverage Status
Change from base Build 494561d2-9514-417a-8e22-417704ceae3d: 0.0%
Covered Lines: 6326
Relevant Lines: 6818

💛 - Coveralls

@kamilmysliwiec kamilmysliwiec merged commit e4a338b into master Jun 14, 2023
5 checks passed
@delete-merged-branch delete-merged-branch bot deleted the renovate/socket.io-redis-adapter-8.x branch June 14, 2023 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants