Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
115 commits
Select commit Hold shift + click to select a range
2aea45a
add license info
julianlam Jul 6, 2016
40c6d28
Merge pull request #114 from julianlam/master
darrachequesne Aug 4, 2016
3da4f41
Fix an issue when broadcasting binary data between nodes. (#122)
darrachequesne Sep 24, 2016
6a78282
Remove unused import (#123)
darrachequesne Sep 24, 2016
679e73c
Get all clients in a room across all nodes (#109)
Sep 24, 2016
d5849b5
[chore] release 1.1.0 (#126)
darrachequesne Sep 24, 2016
6350633
[test] Add tests with ioredis client (#128)
darrachequesne Sep 26, 2016
9c3616e
[refactor] Use this.channel to construct the name of a channel (#129)
darrachequesne Sep 26, 2016
c55fbfd
[chore] Restrict files included in npm package (#130)
darrachequesne Sep 26, 2016
8b754e3
[chore] release 1.1.1 (#132)
darrachequesne Sep 26, 2016
98c0fe4
[chore] Bump socket.io-adapter to version 0.5.0 (#145)
darrachequesne Nov 20, 2016
145ec56
[chore] Bump debug to version 2.3.3 (#147)
darrachequesne Nov 20, 2016
75807b9
[chore] Bump redis to version 2.6.3 (#148)
darrachequesne Nov 20, 2016
4cb9320
[chore] Bump async library to 2.1.4 (#62)
tomasvts Jun 22, 2015
c38e323
[feature] Add a `local` flag (#119)
Jul 27, 2016
84261b2
[feature] Refactor requests between nodes and add `clientRooms` metho…
darrachequesne Nov 28, 2016
298dff2
[feature] Add an option to disable channel multiplexing (#140)
darrachequesne Nov 28, 2016
f2dd9fe
[fix] receive a message only once per-emit (not per-joined rooms) (#151)
darrachequesne Nov 28, 2016
2a6d27b
[chore] Bump mocha to 3.2.0 (#152)
darrachequesne Nov 28, 2016
e8d1f14
[chore] Release 2.0.0 (#153)
darrachequesne Nov 28, 2016
866aa8f
[fix] Make sure numsub is an integer (#155)
barisusakli Nov 30, 2016
aae6f21
[chore] Release 2.0.1 (#159)
darrachequesne Dec 8, 2016
73ce3ea
[feature] Make subEvent default to `messageBuffer` (#157)
darrachequesne Dec 8, 2016
cdddf36
[chore] Replace msgpack with msgpack-lite (#156)
CarsonF Dec 8, 2016
83fc741
[feature] Forward errors from pub/sub clients to the adapter (#160)
darrachequesne Dec 16, 2016
0a5bd4c
[perf] Micro-optimisations (#163)
billouboq Jan 6, 2017
a01262d
[test] simplify tests by using beforeEach/afterEach methods (#166)
darrachequesne Jan 6, 2017
e26590c
[test] Add newer nodejs versions in Travis (#167)
darrachequesne Jan 6, 2017
1d32abc
[feature] Add some helper methods (#168)
darrachequesne Jan 8, 2017
ddd6906
[chore] Release 3.0.0 (#170)
darrachequesne Jan 8, 2017
598583c
[test] Use quit() instead of end() to close Redis connection (#176)
darrachequesne Jan 15, 2017
a1861cb
[test] Fix 'Connection is closed' errors when cleaning up tests (#178)
darrachequesne Jan 15, 2017
df7cc77
[fix] Subscribe only once per room (#175)
darrachequesne Jan 15, 2017
11ab62b
[feature] Implement remoteDisconnect method (#177)
overflowz Jan 15, 2017
8876d54
[docs] Document remoteDisconnect method (#179)
overflowz Jan 15, 2017
2e0ca4e
[chore] Release 3.1.0 (#180)
darrachequesne Jan 16, 2017
01028d0
[feature] Make customHook async (#181)
naderio Jan 16, 2017
38b8a2b
[docs] Update History.md regarding the `return_buffers` option (#189)
darrachequesne Feb 7, 2017
1dc1a9b
[docs] Update code examples in the Readme (#194)
darrachequesne Feb 7, 2017
7ae896a
[fix] Fix remoteJoin/remoteLeave methods (#201)
darrachequesne Feb 15, 2017
2354068
[chore] Release 4.0.0 (#202)
darrachequesne Feb 15, 2017
bceab01
[fix] Fix duplicate identifier declaration (#213)
MyMomSaysIAmSpecial May 10, 2017
a33499d
[docs] Add link to Go implementation of socket.io-emitter (#199)
May 10, 2017
d3d000b
[chore] Release 4.0.1
darrachequesne May 10, 2017
05f926e
[perf] Use pattern matching at the namespace level (#217)
darrachequesne May 10, 2017
f42e26d
[perf] Use notepack instead of msgpack-lite (#218)
darrachequesne May 10, 2017
5f475fb
[chore] Release 5.0.0
darrachequesne May 10, 2017
8dd84c7
[fix] Fix broken protocol in 5.0.0 (#221)
darrachequesne May 13, 2017
c743d61
[chore] Release 5.0.1
darrachequesne May 13, 2017
4f08b1a
[fix] Use the requestid from response when deleting requests (#225)
beaucollins Jun 4, 2017
b3ad4ad
[feat] Add support for ArrayBuffer (#226)
darrachequesne Jun 4, 2017
dfe1401
[chore] Bump dependencies (#227)
darrachequesne Jun 4, 2017
f978d24
[chore] Release 5.1.0
darrachequesne Jun 4, 2017
d6586a1
[docs] Add an example with ioredis (#231)
darrachequesne Jun 14, 2017
b97c96d
[chore] Bump notepack.io to version 2.1.2 (#242)
darrachequesne Aug 23, 2017
37e28df
[feat] Increase default requestsTimeout to 5000 ms (#243)
darrachequesne Aug 23, 2017
ba2b2e6
[chore] Bump redis to version 2.8.0 (#244)
darrachequesne Aug 23, 2017
142f742
[docs] Add note about compatibility (#238)
luislobo Aug 23, 2017
f27d2b8
[chore] Release 5.2.0
darrachequesne Aug 24, 2017
5fe5dad
[docs] Update README.md about requestsTimeout (#258)
DingGGu Feb 22, 2018
91fb8ed
[docs] Add an example with Sentinel in the README
darrachequesne Feb 27, 2018
353870b
[chore] Bump debug to version 3.1.0
darrachequesne Feb 27, 2018
e9cbe30
[docs] Fix Sentinel example in the README (#276)
veyond May 4, 2018
8fe4e03
[docs] Fix Cluster example in the README
darrachequesne May 4, 2018
6d787fb
[chore] Remove support for Node.js 4
darrachequesne Sep 26, 2018
a1cebc8
[chore] Bump ioredis to version 4.0.0 (#291)
knoxcard Sep 26, 2018
d6242d9
chore: bump debug to version 4.1.0 (#306)
DimitarNestorov Jun 4, 2020
f257303
chore: add package-lock.json file
darrachequesne Jun 4, 2020
2500964
test: add Node.js 10, 12 and 13 in the test matrix
darrachequesne Jun 4, 2020
597a8d1
chore: add docker-compose.yml file
darrachequesne Jun 4, 2020
7a19075
feat: add support for Redis Cluster
laurentP22 Jun 4, 2020
ed83ba9
chore(release): 5.3.0
darrachequesne Jun 4, 2020
fa4d474
chore: update node-redis version to 3.x (#351)
WilliamDASILVA Sep 2, 2020
5b3ed58
chore: bump notepack.io to version 2.2.0
darrachequesne Sep 2, 2020
2e39996
chore(release): 5.4.0
darrachequesne Sep 2, 2020
d9bcb19
feat: add support for Socket.IO v3
darrachequesne Nov 12, 2020
2cab2e3
chore(release): 6.0.0
darrachequesne Nov 12, 2020
3334d99
fix: fix broadcasting (#361)
tomasvidhall Nov 13, 2020
0d2d69c
fix(typings): properly expose the createAdapter method
darrachequesne Nov 14, 2020
509c0f0
docs: add examples with TypeScript and ES6 modules
darrachequesne Nov 14, 2020
4dae265
chore(release): 6.0.1
darrachequesne Nov 14, 2020
5cfdf90
docs: add details about the implementation
darrachequesne Nov 15, 2020
72fe98e
docs: fix allSockets example (#381)
yatki Jan 21, 2021
4059501
test: convert tests to TypeScript
darrachequesne Mar 12, 2021
fc19812
ci: migrate to GitHub Actions
darrachequesne Mar 12, 2021
468c3c8
feat: implement utility methods from Socket.IO v4
darrachequesne Mar 12, 2021
6c8d770
perf: remove one round-trip for the requester
darrachequesne Mar 12, 2021
900ddfa
chore: bump debug package
darrachequesne Mar 12, 2021
5f2de9b
chore(release): 6.1.0
darrachequesne Mar 12, 2021
0eb6fed
docs: fix example in README (#368)
CoveMB Mar 12, 2021
95dcd22
docs: update README (#392)
heiye9 Mar 25, 2021
7931420
chore: bump y18n from 4.0.0 to 4.0.1 (#397)
dependabot[bot] Apr 1, 2021
3cac178
feat: rename the package to @socket.io/redis-adapter
darrachequesne May 11, 2021
c68a47c
feat: remove direct redis dependency
darrachequesne May 11, 2021
3a0f29f
feat: implement the serverSideEmit functionality
darrachequesne May 11, 2021
3242d8e
chore(release): 7.0.0
darrachequesne May 11, 2021
d40f1d3
chore: bump ws from 7.4.5 to 7.4.6 (#410)
dependabot[bot] Jun 3, 2021
8f5737c
chore: bump lodash from 4.17.20 to 4.17.21 (#403)
dependabot[bot] Jul 8, 2021
95b7396
docs: fix NPM badge pointing at old package name (#415)
MasterOdin Aug 28, 2021
b068b48
chore: bump path-parse from 1.0.6 to 1.0.7 (#414)
dependabot[bot] Sep 20, 2021
bbfb84a
docs: add notes for the migration from `socket.io-redis`
darrachequesne Nov 13, 2021
214b5d1
fix: allow numeric rooms
darrachequesne Nov 15, 2021
c5dce43
fix: ignore sessionStore in the fetchSockets method
darrachequesne Nov 15, 2021
a148e2f
test: cleanup tests
darrachequesne Nov 15, 2021
934155d
chore(release): 7.0.1
darrachequesne Nov 15, 2021
b29d494
chore: bump ansi-regex from 5.0.0 to 5.0.1 (#428)
dependabot[bot] Nov 15, 2021
aa681b3
feat: add support for redis v4
darrachequesne Nov 29, 2021
f66de11
feat: send response to the requesting node only
darrachequesne Nov 29, 2021
8e5c84f
feat: do not emit "error" events anymore
darrachequesne Nov 29, 2021
e0850c8
chore(release): 7.1.0
darrachequesne Nov 29, 2021
936810c
docs: add example with redis@4
darrachequesne Dec 14, 2021
ff22767
test: fix flaky test
darrachequesne Dec 14, 2021
1687394
docs: fix incorrect use of import (#437)
mcrawshaw Dec 23, 2021
d55d6e5
docs: fix example with redis v4
darrachequesne Jan 4, 2022
d2faa8a
fix: add support for ioredis v5 (#453)
ReflexFox Apr 28, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: CI

on:
push:
pull_request:
schedule:
- cron: '0 0 * * 0'

jobs:
test-node:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [12.x, 14.x]

services:
redis:
image: redis
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm test
env:
CI: true
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ results

npm-debug.log
node_modules
.idea
.idea
.nyc_output/
dist/
10 changes: 0 additions & 10 deletions .travis.yml

This file was deleted.

153 changes: 153 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
# [7.1.0](https://github.com/socketio/socket.io-redis-adapter/compare/7.0.1...7.1.0) (2021-11-29)


### Features

* add support for redis v4 ([aa681b3](https://github.com/socketio/socket.io-redis-adapter/commit/aa681b3bc914358d206ab35761d291a466ac18da))
* do not emit "error" events anymore ([8e5c84f](https://github.com/socketio/socket.io-redis-adapter/commit/8e5c84f7edcda85a6f7e36c04ebd74152c1cade1))
* send response to the requesting node only ([f66de11](https://github.com/socketio/socket.io-redis-adapter/commit/f66de114a4581b692da759015def0373c619aab7))



## [7.0.1](https://github.com/socketio/socket.io-redis-adapter/compare/7.0.0...7.0.1) (2021-11-15)


### Bug Fixes

* allow numeric rooms ([214b5d1](https://github.com/socketio/socket.io-redis-adapter/commit/214b5d1a8d4f1bc037712ed53dceba7ee55ea643))
* ignore sessionStore in the fetchSockets method ([c5dce43](https://github.com/socketio/socket.io-redis-adapter/commit/c5dce438950491b608ed8ed46369b8f120fa82e4))



# [7.0.0](https://github.com/socketio/socket.io-redis-adapter/compare/6.1.0...7.0.0) (2021-05-11)


### Features

* implement the serverSideEmit functionality ([3a0f29f](https://github.com/socketio/socket.io-redis-adapter/commit/3a0f29fbe322f280f48f92b3aac0fcc94d698ee8))
* remove direct redis dependency ([c68a47c](https://github.com/socketio/socket.io-redis-adapter/commit/c68a47c4948554125dac0e317e19947a4d3d3251))
* rename the package to `@socket.io/redis-adapter` ([3cac178](https://github.com/socketio/socket.io-redis-adapter/commit/3cac1789c558a3ece5bb222d73f097952b55c340))


### BREAKING CHANGES

* the library will no longer create Redis clients on behalf of the user.

Before:

```js
io.adapter(redisAdapter({ host: "localhost", port: 6379 }));
```

After:

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

io.adapter(redisAdapter(pubClient, subClient));
```


# [6.1.0](https://github.com/socketio/socket.io-redis/compare/6.0.1...6.1.0) (2021-03-12)


### Features

* implement utility methods from Socket.IO v4 ([468c3c8](https://github.com/socketio/socket.io-redis/commit/468c3c8008ddd0c89b2fc2054d874e9e706f0948))


### Performance Improvements

* remove one round-trip for the requester ([6c8d770](https://github.com/socketio/socket.io-redis/commit/6c8d7701962bee4acf83568f8e998876d3549fb8))


## [6.0.1](https://github.com/socketio/socket.io-redis/compare/6.0.0...6.0.1) (2020-11-14)


### Bug Fixes

* **typings:** properly expose the createAdapter method ([0d2d69c](https://github.com/socketio/socket.io-redis/commit/0d2d69cc78aa3418a7b5a6231a13ea4028dd74a3))
* fix broadcasting ([#361](https://github.com/socketio/socket.io-redis/issues/361)) ([3334d99](https://github.com/socketio/socket.io-redis/commit/3334d99e1b6e2f80485c73133381a18798b24bc0))



# [6.0.0](https://github.com/socketio/socket.io-redis/compare/5.4.0...6.0.0) (2020-11-12)


### Features

* add support for Socket.IO v3 ([d9bcb19](https://github.com/socketio/socket.io-redis/commit/d9bcb1935940d7ad414ba7154de51cdc4a7d45b1))

### BREAKING CHANGES:

- all the requests (for inter-node communication) now return a Promise instead of accepting a callback

Before:

```js
io.of('/').adapter.allRooms((err, rooms) => {
console.log(rooms); // an array containing all rooms (accross every node)
});
```

After:

```js
const rooms = await io.of('/').adapter.allRooms();
console.log(rooms); // a Set containing all rooms (across every node)
```

- RedisAdapter.clients() is renamed to RedisAdapter.sockets()

See https://github.com/socketio/socket.io-adapter/commit/130f28a43c5aca924aa2c1a318422d21ba03cdac

- RedisAdapter.customHook() and RedisAdapter.customRequest() are removed

Those methods will be replaced by a more intuitive API in a future iteration.

- support for Node.js 8 is dropped

See https://github.com/nodejs/Release



# [5.4.0](https://github.com/socketio/socket.io-redis/compare/5.3.0...5.4.0) (2020-09-02)


### Features

* update node-redis version to 3.x ([5b3ed58](https://github.com/socketio/socket.io-redis/commit/5b3ed5877acfdb35e4faa2f46f06a8032ff8b574))



# [5.3.0](https://github.com/socketio/socket.io-redis/compare/5.2.0...5.3.0) (2020-06-04)


### Features

* add support for Redis Cluster ([7a19075](https://github.com/socketio/socket.io-redis/commit/7a190755c01732d1335199732e7b0eb5a1fb1f9e))



# [5.2.0](https://github.com/socketio/socket.io-redis/compare/5.1.0...5.2.0) (2017-08-24)


### Features

* increase default requestsTimeout to 5000 ms ([37e28df](https://github.com/socketio/socket.io-redis/commit/37e28df54b0b8c71b4f8ea1766e56dc63fb26ba2))



# [5.1.0](https://github.com/socketio/socket.io-redis/compare/5.0.1...5.1.0) (2017-06-04)

### Bug Fixes

* use the requestid from response when deleting requests ([4f08b1a](https://github.com/socketio/socket.io-redis/commit/4f08b1ae7b3b9ee549349f1b95f5e3f3ff69d651))


### Features

* add support for ArrayBuffer ([b3ad4ad](https://github.com/socketio/socket.io-redis/commit/b3ad4ad28b225f1999d5dd709f2ea6d5674085f6))


47 changes: 0 additions & 47 deletions History.md

This file was deleted.

7 changes: 7 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Copyright (c) 2016 Guillermo Rauch (@rauchg)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
5 changes: 0 additions & 5 deletions Makefile

This file was deleted.

Loading