Update ioredis to fix connection uri options (#15876)

* updated ioredis to 5.2.3

* type fixes

* removed obsolete @types/ioredis package
This commit is contained in:
Brainslug
2022-10-12 21:56:22 +02:00
committed by GitHub
parent 040e9c240a
commit 5fcb3c84c7
3 changed files with 11 additions and 49 deletions

View File

@@ -121,7 +121,7 @@
"graphql-compose": "^9.0.8",
"helmet": "^4.6.0",
"inquirer": "^8.2.4",
"ioredis": "^4.27.6",
"ioredis": "^5.2.3",
"joi": "^17.6.0",
"js-yaml": "^4.1.0",
"js2xmlparser": "^4.0.2",
@@ -196,7 +196,6 @@
"@types/flat": "5.0.2",
"@types/fs-extra": "9.0.13",
"@types/inquirer": "8.2.1",
"@types/ioredis": "^4.28.10",
"@types/jest": "27.5.2",
"@types/js-yaml": "4.0.5",
"@types/json2csv": "5.0.3",

View File

@@ -1,5 +1,6 @@
import { parseJSON } from '@directus/shared/utils';
import IORedis from 'ioredis';
import type { Redis } from 'ioredis';
import env from './env';
import { getConfigFromEnv } from './utils/get-config-from-env';
@@ -33,8 +34,8 @@ export class MessengerMemory implements Messenger {
export class MessengerRedis implements Messenger {
namespace: string;
pub: IORedis.Redis;
sub: IORedis.Redis;
pub: Redis;
sub: Redis;
constructor() {
const config = getConfigFromEnv('MESSENGER_REDIS');
@@ -51,7 +52,7 @@ export class MessengerRedis implements Messenger {
subscribe(channel: string, callback: MessengerSubscriptionCallback) {
this.sub.subscribe(`${this.namespace}:${channel}`);
this.sub.on('message', (messageChannel, payloadString) => {
this.sub.on('message', (messageChannel: string, payloadString: string) => {
const payload = parseJSON(payloadString);
if (messageChannel === `${this.namespace}:${channel}`) {

50
pnpm-lock.yaml generated
View File

@@ -99,7 +99,6 @@ importers:
'@types/flat': 5.0.2
'@types/fs-extra': 9.0.13
'@types/inquirer': 8.2.1
'@types/ioredis': ^4.28.10
'@types/jest': 27.5.2
'@types/js-yaml': 4.0.5
'@types/json2csv': 5.0.3
@@ -158,7 +157,7 @@ importers:
graphql-compose: ^9.0.8
helmet: ^4.6.0
inquirer: ^8.2.4
ioredis: ^4.27.6
ioredis: ^5.2.3
jest: 28.1.2
joi: ^17.6.0
js-yaml: ^4.1.0
@@ -263,7 +262,7 @@ importers:
graphql-compose: 9.0.8_graphql@15.8.0
helmet: 4.6.0
inquirer: 8.2.4
ioredis: 4.28.5
ioredis: 5.2.3
joi: 17.6.0
js-yaml: 4.1.0
js2xmlparser: 4.0.2
@@ -335,7 +334,6 @@ importers:
'@types/flat': 5.0.2
'@types/fs-extra': 9.0.13
'@types/inquirer': 8.2.1
'@types/ioredis': 4.28.10
'@types/jest': 27.5.2
'@types/js-yaml': 4.0.5
'@types/json2csv': 5.0.3
@@ -3776,7 +3774,6 @@ packages:
/@ioredis/commands/1.2.0:
resolution: {integrity: sha512-Sx1pU8EM64o2BrqNpEO1CNLtKQwyhuXuqyfH7oGKCk+1a33d2r5saW8zNwm3j6BTExtjrv2BxTgzzkMwts6vGg==}
dev: false
optional: true
/@istanbuljs/load-nyc-config/1.1.0:
resolution: {integrity: sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==}
@@ -4364,7 +4361,7 @@ packages:
engines: {node: '>= 12'}
requiresBuild: true
dependencies:
ioredis: 5.2.0
ioredis: 5.2.3
transitivePeerDependencies:
- supports-color
dev: false
@@ -6881,12 +6878,6 @@ packages:
rxjs: 7.5.6
dev: true
/@types/ioredis/4.28.10:
resolution: {integrity: sha512-69LyhUgrXdgcNDv7ogs1qXZomnfOEnSmrmMFqKgt1XMJxmoOSG/u3wYy13yACIfKuMJ8IhKgHafDO3sx19zVQQ==}
dependencies:
'@types/node': 16.11.9
dev: true
/@types/is-function/1.0.1:
resolution: {integrity: sha512-A79HEEiwXTFtfY+Bcbo58M2GRYzCr9itHWzbzHVFNEYCcoU/MMGwYYf721gBrnhpj1s6RGVVha/IgNFnR0Iw/Q==}
dev: true
@@ -10630,16 +10621,10 @@ packages:
/delegates/1.0.0:
resolution: {integrity: sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==}
/denque/1.5.1:
resolution: {integrity: sha512-XwE+iZ4D6ZUB7mfYRMb5wByE8L74HCn30FBN7sWnXksWc1LO1bPDl67pBR9o/kC4z/xSNAwkMYcGgqDV3BE3Hw==}
engines: {node: '>=0.10'}
dev: false
/denque/2.0.1:
resolution: {integrity: sha512-tfiWc6BQLXNLpNiR5iGd0Ocu3P3VpxfzFiqubLgMfhfOw9WyvgJBd46CClNn9k3qfbjvT//0cf7AlYRX/OslMQ==}
engines: {node: '>=0.10'}
dev: false
optional: true
/depd/1.1.2:
resolution: {integrity: sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==}
@@ -13570,27 +13555,8 @@ packages:
resolution: {integrity: sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==}
engines: {node: '>= 0.10'}
/ioredis/4.28.5:
resolution: {integrity: sha512-3GYo0GJtLqgNXj4YhrisLaNNvWSNwSS2wS4OELGfGxH8I69+XfNdnmV1AyN+ZqMh0i7eX+SWjrwFKDBDgfBC1A==}
engines: {node: '>=6'}
dependencies:
cluster-key-slot: 1.1.0
debug: 4.3.4
denque: 1.5.1
lodash.defaults: 4.2.0
lodash.flatten: 4.4.0
lodash.isarguments: 3.1.0
p-map: 2.1.0
redis-commands: 1.7.0
redis-errors: 1.2.0
redis-parser: 3.0.0
standard-as-callback: 2.1.0
transitivePeerDependencies:
- supports-color
dev: false
/ioredis/5.2.0:
resolution: {integrity: sha512-a1E7qDtuuI+We60TLIm3TMrH5auIhbfINXYag6ZdB+mGJnH8rbmDOpr1V7iUvQQ7pWnEDYI/KXmia5IemsNJEQ==}
/ioredis/5.2.3:
resolution: {integrity: sha512-gQNcMF23/NpvjCaa1b5YycUyQJ9rBNH2xP94LWinNpodMWVUPP5Ai/xXANn/SM7gfIvI62B5CCvZxhg5pOgyMw==}
engines: {node: '>=12.22.0'}
dependencies:
'@ioredis/commands': 1.2.0
@@ -13605,7 +13571,6 @@ packages:
transitivePeerDependencies:
- supports-color
dev: false
optional: true
/ip/1.1.8:
resolution: {integrity: sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg==}
@@ -17520,6 +17485,7 @@ packages:
/p-map/2.1.0:
resolution: {integrity: sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==}
engines: {node: '>=6'}
dev: true
/p-map/3.0.0:
resolution: {integrity: sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==}
@@ -19177,10 +19143,6 @@ packages:
strip-indent: 3.0.0
dev: true
/redis-commands/1.7.0:
resolution: {integrity: sha512-nJWqw3bTFy21hX/CPKHth6sfhZbdiHP6bTawSgQBlKOVRG7EZkfHbbHwQJnrE4vsQf0CMNE+3gJ4Fmm16vdVlQ==}
dev: false
/redis-errors/1.2.0:
resolution: {integrity: sha512-1qny3OExCf0UvUV/5wpYKf2YwPcOqXzkwKKSmKHiE6ZMQs5heeE/c8eXK+PNllPvmjgAbfnsbpkGZWy8cBpn9w==}
engines: {node: '>=4'}