Skip to content
This repository has been archived by the owner on Nov 6, 2023. It is now read-only.

Commit

Permalink
upgrade: Redis related dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
dulguun0225 committed Sep 29, 2023
1 parent a79ea92 commit df63f60
Show file tree
Hide file tree
Showing 17 changed files with 54 additions and 52 deletions.
2 changes: 1 addition & 1 deletion cli/commands/docker/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ const deployDbs = async () => {
}

dockerComposeConfig.services.redis = {
image: 'redis:5.0.5',
image: 'redis:7.2.1',
command: `redis-server --appendonly yes --requirepass ${configs.redis.password}`,
ports: [`${REDIS_PORT}:6379`],
networks: ['erxes'],
Expand Down
2 changes: 1 addition & 1 deletion cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "erxes",
"version": "0.4.26",
"version": "0.4.27",
"description": "Free and open fair-code licensed all-in-one growth marketing & management software",
"homepage": "https://erxes.io",
"repository": "https://github.com/erxes/erxes",
Expand Down
2 changes: 1 addition & 1 deletion packages/api-plugin-template.erxes/src/pubsub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as dotenv from 'dotenv';
dotenv.config();
import { RedisPubSub } from 'graphql-redis-subscriptions';
import { PubSub } from 'graphql-subscriptions';
import * as Redis from 'ioredis';
import Redis from 'ioredis';

const { REDIS_HOST, REDIS_PORT, REDIS_PASSWORD, SKIP_REDIS } = process.env;

Expand Down
1 change: 0 additions & 1 deletion packages/api-plugin-template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
"@types/dotenv": "^4.0.3",
"@types/express": "^4.16.0",
"@types/formidable": "^1.0.31",
"@types/ioredis": "^3.2.15",
"@types/json2csv": "^5.0.1",
"@types/mongodb": "^3.1.2",
"@types/mongoose": "5.7.3",
Expand Down
7 changes: 3 additions & 4 deletions packages/api-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"@babel/preset-env": "^7.11.0",
"@babel/preset-typescript": "^7.10.4",
"@babel/runtime": "^7.11.2",
"@types/ioredis": "^4.28.7",
"@types/lodash": "^4.14.178",
"@types/node": "^17.0.7",
"babel-preset-gatsby-package": "^0.5.2",
Expand All @@ -27,10 +26,10 @@
"dotenv": "^4.0.0",
"elasticsearch": "^16.7.2",
"graphql": "^16.7.1",
"graphql-redis-subscriptions": "^1.4.0",
"graphql-subscriptions": "^1.1.0",
"graphql-redis-subscriptions": "^2.4.2",
"graphql-subscriptions": "^2.0.0",
"graphql-tag" : "^2.12.6",
"ioredis": "^4.28.2",
"ioredis": "^5.3.2",
"lodash": "^4.17.21",
"nanoid" : "^3.3.6",
"moment": "^2.18.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/api-utils/src/redis.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as Redis from 'ioredis';
import Redis from 'ioredis';
import * as dotenv from 'dotenv';
import * as fakeRedis from './redisSubstitute';
dotenv.config();
Expand Down
2 changes: 1 addition & 1 deletion packages/api-utils/src/serviceDiscovery.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as dotenv from 'dotenv';
import redisClient from './redis';
import * as Redis from 'ioredis';
import Redis from 'ioredis';
dotenv.config();

const REDIS_CHANNEL_REFRESH_ENABLED_SERVICES = 'refresh_enabled_services';
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/pubsub.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as dotenv from 'dotenv';
import { redisOptions } from 'erxes-inmemory-storage';
import { RedisPubSub } from 'graphql-redis-subscriptions';
import * as Redis from 'ioredis';
import Redis from 'ioredis';

// load environment variables
dotenv.config();
Expand Down
3 changes: 1 addition & 2 deletions packages/gateway/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"graphql-subscriptions": "^2.0.0",
"graphql-ws": "5.5.5",
"http-proxy-middleware": "^2.0.1",
"ioredis": "^4.28.2",
"ioredis": "^5.3.2",
"lodash": "^4.17.21",
"node-fetch": "^2.6.7",
"nodejs-file-downloader": "^4.9.2",
Expand All @@ -40,7 +40,6 @@
"@types/cookie-parser": "^1.4.2",
"@types/cors": "^2.8.4",
"@types/express": "^4.16.0",
"@types/ioredis": "^4.28.5",
"@types/jsonwebtoken": "^8.5.6",
"@types/lodash": "^4.14.178",
"@types/mongodb": "^3.6.20",
Expand Down
2 changes: 1 addition & 1 deletion packages/gateway/src/subscription/pubsub.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as dotenv from 'dotenv';
dotenv.config();
import { RedisPubSub } from 'graphql-redis-subscriptions';
import * as Redis from 'ioredis';
import Redis from 'ioredis';

const { REDIS_HOST, REDIS_PORT, REDIS_PASSWORD } = process.env;

Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-clientportal-api/src/redis.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as dotenv from 'dotenv';
import * as Redis from 'ioredis';
import Redis from 'ioredis';

dotenv.config();

Expand Down
10 changes: 5 additions & 5 deletions packages/plugin-engages-api/src/redis.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import * as dotenv from "dotenv";
import * as Redis from "ioredis";
import * as dotenv from 'dotenv';
import Redis from 'ioredis';

dotenv.config();

const { REDIS_HOST, REDIS_PORT, REDIS_PASSWORD } = process.env;

const redis = new Redis({
host: REDIS_HOST,
port: parseInt(REDIS_PORT || "6379", 10),
password: REDIS_PASSWORD,
port: parseInt(REDIS_PORT || '6379', 10),
password: REDIS_PASSWORD
});

export default redis;
export default redis;
2 changes: 1 addition & 1 deletion packages/plugin-exm-api/src/redis.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as dotenv from 'dotenv';
import * as Redis from 'ioredis';
import Redis from 'ioredis';

dotenv.config();

Expand Down
10 changes: 5 additions & 5 deletions packages/plugin-inbox-api/src/redis.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import * as dotenv from "dotenv";
import * as Redis from "ioredis";
import * as dotenv from 'dotenv';
import Redis from 'ioredis';

dotenv.config();

const { REDIS_HOST, REDIS_PORT, REDIS_PASSWORD } = process.env;

const redis = new Redis({
host: REDIS_HOST,
port: parseInt(REDIS_PORT || "6379", 10),
password: REDIS_PASSWORD,
port: parseInt(REDIS_PORT || '6379', 10),
password: REDIS_PASSWORD
});

export default redis;
export default redis;
2 changes: 1 addition & 1 deletion packages/plugin-khanbank-api/src/redis.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as dotenv from 'dotenv';
import * as Redis from 'ioredis';
import Redis from 'ioredis';

dotenv.config();

Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-payment-api/src/redis.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as dotenv from 'dotenv';
import * as Redis from 'ioredis';
import Redis from 'ioredis';

dotenv.config();

Expand Down
53 changes: 29 additions & 24 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3890,6 +3890,11 @@
resolved "https://registry.npmjs.org/@interactjs/types/-/types-1.10.17.tgz"
integrity sha512-X2JpoM7xUw0p9Me0tMaI0HNfcF/Hd07ZZlzpnpEMpGerUZOLoyeThrV9P+CrBHxZrluWJrigJbcdqXliFd0YMA==

"@ioredis/commands@^1.1.1":
version "1.2.0"
resolved "https://registry.yarnpkg.com/@ioredis/commands/-/commands-1.2.0.tgz#6d61b3097470af1fdbbe622795b8921d42018e11"
integrity sha512-Sx1pU8EM64o2BrqNpEO1CNLtKQwyhuXuqyfH7oGKCk+1a33d2r5saW8zNwm3j6BTExtjrv2BxTgzzkMwts6vGg==

"@istanbuljs/load-nyc-config@^1.0.0", "@istanbuljs/load-nyc-config@^1.1.0":
version "1.1.0"
resolved "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz"
Expand Down Expand Up @@ -5085,17 +5090,12 @@
"@babel/types" "^7.3.0"

"@types/babylon@^6.16.2":
version "6.16.6"
resolved "https://registry.npmjs.org/@types/babylon/-/babylon-6.16.6.tgz"
integrity sha512-G4yqdVlhr6YhzLXFKy5F7HtRBU8Y23+iWy7UKthMq/OSQnL1hbsoeXESQ2LY8zEDlknipDG3nRGhUC9tkwvy/w==
version "6.16.7"
resolved "https://registry.yarnpkg.com/@types/babylon/-/babylon-6.16.7.tgz#76ea14f935dab440b0b6039a3ed5a2cbf2e850bf"
integrity sha512-8wz9tFZVI35Bnyq5qFQ/+yAVLRuU5xglYKmWSKT2KC+QL3QtbTnBK4LbnATb2J762w/tA2A/3XSQ3WsPlu+3bA==
dependencies:
"@types/babel-types" "*"

"@types/bluebird@*":
version "3.5.36"
resolved "https://registry.npmjs.org/@types/bluebird/-/bluebird-3.5.36.tgz"
integrity sha512-HBNx4lhkxN7bx6P0++W8E289foSu8kO8GCk2unhuVggO+cE7rh9DhZUyPhUxNRG9m+5B5BTKxZQ5ZP92x/mx9Q==

"@types/body-parser@*", "@types/body-parser@^1.17.0":
version "1.19.2"
resolved "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz"
Expand Down Expand Up @@ -5311,21 +5311,6 @@
dependencies:
"@types/node" "*"

"@types/ioredis@^3.2.15":
version "3.2.26"
resolved "https://registry.npmjs.org/@types/ioredis/-/ioredis-3.2.26.tgz"
integrity sha512-VfD0g1o+u7CpjaRPmTbVU0GMMEAjDX6/x2wCZXJv7ExqtawEzJ0KI7tcA82lbcuWNWbMjqmQsUcfQnEspCNp8A==
dependencies:
"@types/bluebird" "*"
"@types/node" "*"

"@types/ioredis@^4.28.5", "@types/ioredis@^4.28.7":
version "4.28.8"
resolved "https://registry.npmjs.org/@types/ioredis/-/ioredis-4.28.8.tgz"
integrity sha512-mULOyO2smtvkE1zmzRRA4P0+1UjEqusi014kXOL1q3CY0RgqkR5/wKvv+vAJbPw2Q66wPyylKeevUy+m/FaRMg==
dependencies:
"@types/node" "*"

"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0":
version "2.0.1"
resolved "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz"
Expand Down Expand Up @@ -10658,6 +10643,11 @@ denque@^2.0.1:
resolved "https://registry.npmjs.org/denque/-/denque-2.0.1.tgz"
integrity sha512-tfiWc6BQLXNLpNiR5iGd0Ocu3P3VpxfzFiqubLgMfhfOw9WyvgJBd46CClNn9k3qfbjvT//0cf7AlYRX/OslMQ==

denque@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/denque/-/denque-2.1.0.tgz#e93e1a6569fb5e66f16a3c2a2964617d349d6ab1"
integrity sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==

[email protected], depd@^2.0.0, depd@~2.0.0:
version "2.0.0"
resolved "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz"
Expand Down Expand Up @@ -14620,7 +14610,7 @@ ioredis@^3.1.2:
redis-commands "^1.2.0"
redis-parser "^2.4.0"

ioredis@^4.17.3, ioredis@^4.27.8, ioredis@^4.28.2:
ioredis@^4.17.3, ioredis@^4.27.8:
version "4.28.5"
resolved "https://registry.npmjs.org/ioredis/-/ioredis-4.28.5.tgz"
integrity sha512-3GYo0GJtLqgNXj4YhrisLaNNvWSNwSS2wS4OELGfGxH8I69+XfNdnmV1AyN+ZqMh0i7eX+SWjrwFKDBDgfBC1A==
Expand All @@ -14637,6 +14627,21 @@ ioredis@^4.17.3, ioredis@^4.27.8, ioredis@^4.28.2:
redis-parser "^3.0.0"
standard-as-callback "^2.1.0"

ioredis@^5.3.2:
version "5.3.2"
resolved "https://registry.yarnpkg.com/ioredis/-/ioredis-5.3.2.tgz#9139f596f62fc9c72d873353ac5395bcf05709f7"
integrity sha512-1DKMMzlIHM02eBBVOFQ1+AolGjs6+xEcM4PDL7NqOS6szq7H9jSaEkIUH6/a5Hl241LzW6JLSiAbNvTQjUupUA==
dependencies:
"@ioredis/commands" "^1.1.1"
cluster-key-slot "^1.1.0"
debug "^4.3.4"
denque "^2.1.0"
lodash.defaults "^4.2.0"
lodash.isarguments "^3.1.0"
redis-errors "^1.2.0"
redis-parser "^3.0.0"
standard-as-callback "^2.1.0"

ip-regex@^2.1.0:
version "2.1.0"
resolved "https://registry.npmjs.org/ip-regex/-/ip-regex-2.1.0.tgz"
Expand Down

0 comments on commit df63f60

Please sign in to comment.