Skip to content

Commit 67235bf

Browse files
committed
feat: upgrade bull and bullmq dependencies
1 parent 85124c6 commit 67235bf

File tree

3 files changed

+81
-94
lines changed

3 files changed

+81
-94
lines changed

lib/queue-factory.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export interface FoundQueue {
2323
}
2424

2525
const getQueueKeys = async (client: Redis | Cluster) => {
26-
let nodes = "nodes" in client ? client.nodes('master'): [client]
26+
let nodes = "nodes" in client ? client.nodes('master') : [client]
2727
let keys = [];
2828
const startTime = Date.now();
2929

@@ -106,12 +106,12 @@ export function getRedisClient(
106106
if (clusterNodes && clusterNodes.length) {
107107
const { username, password } = redisOptsFromUrl(clusterNodes[0])
108108
redisClients[type] = new Redis.Cluster(clusterNodes, {
109-
...redisOpts,
109+
...redisOpts,
110110
redisOptions: {
111111
username,
112112
password,
113113
tls: process.env.REDIS_CLUSTER_TLS ? {
114-
cert: Buffer.from(process.env.REDIS_CLUSTER_TLS ?? '', 'base64').toString('ascii')
114+
cert: Buffer.from(process.env.REDIS_CLUSTER_TLS ?? '', 'base64').toString('ascii')
115115
} : undefined,
116116
}
117117
});
@@ -121,8 +121,7 @@ export function getRedisClient(
121121

122122
redisClients[type].on("error", (err: Error) => {
123123
console.log(
124-
`${chalk.yellow("Redis:")} ${chalk.red("redis connection error")} ${
125-
err.message
124+
`${chalk.yellow("Redis:")} ${chalk.red("redis connection error")} ${err.message
126125
}`
127126
);
128127
});
@@ -197,7 +196,7 @@ export function createQueue(
197196

198197
case "bull":
199198
return {
200-
queue: new Bull(foundQueue.name, {
199+
queue: new (<any>Bull)(foundQueue.name, {
201200
createClient,
202201
prefix: foundQueue.prefix,
203202
}),
@@ -206,7 +205,7 @@ export function createQueue(
206205
default:
207206
console.error(
208207
chalk.red(`ERROR:`) +
209-
`Unexpected queue type: ${foundQueue.type} for queue ${foundQueue.name}`
208+
`Unexpected queue type: ${foundQueue.type} for queue ${foundQueue.name}`
210209
);
211210
}
212211
}

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313
"dist"
1414
],
1515
"dependencies": {
16-
"bull": "^4.11.1",
17-
"bullmq": "^4.16.0",
16+
"bull": "^4.12.6",
17+
"bullmq": "^5.7.9",
1818
"chalk": "^4.1.0",
1919
"commander": "^5.1.0",
20-
"ioredis": "5.3.2",
20+
"ioredis": "^5.4.1",
2121
"latest-version": "^5.1.0",
2222
"lodash": "^4.17.21",
2323
"semver": "^7.3.2",

yarn.lock

Lines changed: 72 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -557,35 +557,35 @@
557557
"@jridgewell/resolve-uri" "^3.1.0"
558558
"@jridgewell/sourcemap-codec" "^1.4.14"
559559

560-
"@msgpackr-extract/msgpackr-extract-darwin-arm64@2.2.0":
561-
version "2.2.0"
562-
resolved "https://registry.yarnpkg.com/@msgpackr-extract/msgpackr-extract-darwin-arm64/-/msgpackr-extract-darwin-arm64-2.2.0.tgz#901c5937e1441572ea23e631fe6deca68482fe76"
563-
integrity sha512-Z9LFPzfoJi4mflGWV+rv7o7ZbMU5oAU9VmzCgL240KnqDW65Y2HFCT3MW06/ITJSnbVLacmcEJA8phywK7JinQ==
560+
"@msgpackr-extract/msgpackr-extract-darwin-arm64@3.0.2":
561+
version "3.0.2"
562+
resolved "https://registry.yarnpkg.com/@msgpackr-extract/msgpackr-extract-darwin-arm64/-/msgpackr-extract-darwin-arm64-3.0.2.tgz#44d752c1a2dc113f15f781b7cc4f53a307e3fa38"
563+
integrity sha512-9bfjwDxIDWmmOKusUcqdS4Rw+SETlp9Dy39Xui9BEGEk19dDwH0jhipwFzEff/pFg95NKymc6TOTbRKcWeRqyQ==
564564

565-
"@msgpackr-extract/msgpackr-extract-darwin-x64@2.2.0":
566-
version "2.2.0"
567-
resolved "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-darwin-x64/-/msgpackr-extract-darwin-x64-2.2.0.tgz"
568-
integrity sha512-vq0tT8sjZsy4JdSqmadWVw6f66UXqUCabLmUVHZwUFzMgtgoIIQjT4VVRHKvlof3P/dMCkbMJ5hB1oJ9OWHaaw==
565+
"@msgpackr-extract/msgpackr-extract-darwin-x64@3.0.2":
566+
version "3.0.2"
567+
resolved "https://registry.yarnpkg.com/@msgpackr-extract/msgpackr-extract-darwin-x64/-/msgpackr-extract-darwin-x64-3.0.2.tgz#f954f34355712212a8e06c465bc06c40852c6bb3"
568+
integrity sha512-lwriRAHm1Yg4iDf23Oxm9n/t5Zpw1lVnxYU3HnJPTi2lJRkKTrps1KVgvL6m7WvmhYVt/FIsssWay+k45QHeuw==
569569

570-
"@msgpackr-extract/msgpackr-extract-linux-arm64@2.2.0":
571-
version "2.2.0"
572-
resolved "https://registry.yarnpkg.com/@msgpackr-extract/msgpackr-extract-linux-arm64/-/msgpackr-extract-linux-arm64-2.2.0.tgz#986179c38b10ac41fbdaf7d036c825cbc72855d9"
573-
integrity sha512-hlxxLdRmPyq16QCutUtP8Tm6RDWcyaLsRssaHROatgnkOxdleMTgetf9JsdncL8vLh7FVy/RN9i3XR5dnb9cRA==
570+
"@msgpackr-extract/msgpackr-extract-linux-arm64@3.0.2":
571+
version "3.0.2"
572+
resolved "https://registry.yarnpkg.com/@msgpackr-extract/msgpackr-extract-linux-arm64/-/msgpackr-extract-linux-arm64-3.0.2.tgz#45c63037f045c2b15c44f80f0393fa24f9655367"
573+
integrity sha512-FU20Bo66/f7He9Fp9sP2zaJ1Q8L9uLPZQDub/WlUip78JlPeMbVL8546HbZfcW9LNciEXc8d+tThSJjSC+tmsg==
574574

575-
"@msgpackr-extract/msgpackr-extract-linux-arm@2.2.0":
576-
version "2.2.0"
577-
resolved "https://registry.yarnpkg.com/@msgpackr-extract/msgpackr-extract-linux-arm/-/msgpackr-extract-linux-arm-2.2.0.tgz#15f2c6fe9e0adc06c21af7e95f484ff4880d79ce"
578-
integrity sha512-SaJ3Qq4lX9Syd2xEo9u3qPxi/OB+5JO/ngJKK97XDpa1C587H9EWYO6KD8995DAjSinWvdHKRrCOXVUC5fvGOg==
575+
"@msgpackr-extract/msgpackr-extract-linux-arm@3.0.2":
576+
version "3.0.2"
577+
resolved "https://registry.yarnpkg.com/@msgpackr-extract/msgpackr-extract-linux-arm/-/msgpackr-extract-linux-arm-3.0.2.tgz#35707efeafe6d22b3f373caf9e8775e8920d1399"
578+
integrity sha512-MOI9Dlfrpi2Cuc7i5dXdxPbFIgbDBGgKR5F2yWEa6FVEtSWncfVNKW5AKjImAQ6CZlBK9tympdsZJ2xThBiWWA==
579579

580-
"@msgpackr-extract/msgpackr-extract-linux-x64@2.2.0":
581-
version "2.2.0"
582-
resolved "https://registry.yarnpkg.com/@msgpackr-extract/msgpackr-extract-linux-x64/-/msgpackr-extract-linux-x64-2.2.0.tgz#30cae5c9a202f3e1fa1deb3191b18ffcb2f239a2"
583-
integrity sha512-94y5PJrSOqUNcFKmOl7z319FelCLAE0rz/jPCWS+UtdMZvpa4jrQd+cJPQCLp2Fes1yAW/YUQj/Di6YVT3c3Iw==
580+
"@msgpackr-extract/msgpackr-extract-linux-x64@3.0.2":
581+
version "3.0.2"
582+
resolved "https://registry.yarnpkg.com/@msgpackr-extract/msgpackr-extract-linux-x64/-/msgpackr-extract-linux-x64-3.0.2.tgz#091b1218b66c341f532611477ef89e83f25fae4f"
583+
integrity sha512-gsWNDCklNy7Ajk0vBBf9jEx04RUxuDQfBse918Ww+Qb9HCPoGzS+XJTLe96iN3BVK7grnLiYghP/M4L8VsaHeA==
584584

585-
"@msgpackr-extract/msgpackr-extract-win32-x64@2.2.0":
586-
version "2.2.0"
587-
resolved "https://registry.yarnpkg.com/@msgpackr-extract/msgpackr-extract-win32-x64/-/msgpackr-extract-win32-x64-2.2.0.tgz#016d855b6bc459fd908095811f6826e45dd4ba64"
588-
integrity sha512-XrC0JzsqQSvOyM3t04FMLO6z5gCuhPE6k4FXuLK5xf52ZbdvcFe1yBmo7meCew9B8G2f0T9iu9t3kfTYRYROgA==
585+
"@msgpackr-extract/msgpackr-extract-win32-x64@3.0.2":
586+
version "3.0.2"
587+
resolved "https://registry.yarnpkg.com/@msgpackr-extract/msgpackr-extract-win32-x64/-/msgpackr-extract-win32-x64-3.0.2.tgz#0f164b726869f71da3c594171df5ebc1c4b0a407"
588+
integrity sha512-O+6Gs8UeDbyFpbSh2CPEz/UOrrdWPTBYNblZK5CxxLisYt4kGX3Sc+czffFonyjiGSq3jWLwJS/CCJc7tBr4sQ==
589589

590590
"@nodelib/fs.scandir@2.1.4":
591591
version "2.1.4"
@@ -1452,13 +1452,6 @@ brace-expansion@^1.1.7:
14521452
balanced-match "^1.0.0"
14531453
concat-map "0.0.1"
14541454

1455-
brace-expansion@^2.0.1:
1456-
version "2.0.1"
1457-
resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz"
1458-
integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==
1459-
dependencies:
1460-
balanced-match "^1.0.0"
1461-
14621455
braces@^3.0.1:
14631456
version "3.0.2"
14641457
resolved "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz"
@@ -1493,29 +1486,27 @@ builtins@^1.0.3:
14931486
resolved "https://registry.npmjs.org/builtins/-/builtins-1.0.3.tgz"
14941487
integrity sha512-uYBjakWipfaO/bXI7E8rq6kpwHRZK5cNYrUv2OzZSI/FvmdMyXJ2tG9dKcjEC5YHmHpUAwsargWIZNWdxb/bnQ==
14951488

1496-
bull@^4.11.1:
1497-
version "4.11.4"
1498-
resolved "https://registry.npmjs.org/bull/-/bull-4.11.4.tgz"
1499-
integrity sha512-6rPnFkUbN/eWhzGF65mcYM2HWDl2rp0fTidZ8en64Zwplioe/QxpdiWfLLtXX4Yy25piPly4f96wHR0NquiyyQ==
1489+
bull@^4.12.6:
1490+
version "4.12.6"
1491+
resolved "https://registry.yarnpkg.com/bull/-/bull-4.12.6.tgz#5a6138c0d41cf1ffb564868540bfd8f7644c9ded"
1492+
integrity sha512-QViK1i938moggAtlwhmJ8RmLadswgWKlqOFX9w+WBIAuV2L8qrte1XOIs7KUrRc9fbIfJTziaq7NZEpuaMO4Lw==
15001493
dependencies:
15011494
cron-parser "^4.2.1"
15021495
get-port "^5.1.1"
15031496
ioredis "^5.3.2"
15041497
lodash "^4.17.21"
1505-
msgpackr "^1.5.2"
1498+
msgpackr "^1.10.1"
15061499
semver "^7.5.2"
15071500
uuid "^8.3.0"
15081501

1509-
bullmq@^4.16.0:
1510-
version "4.16.0"
1511-
resolved "https://registry.yarnpkg.com/bullmq/-/bullmq-4.16.0.tgz#6e43f232624805b4bf90ac80b10c49e081805a3e"
1512-
integrity sha512-PLP5MM+Gyu3unRPr54xVN3WpagLa/noJihiNzsia5GJW+MkcaYnNohj8vsoz8KdEtfE/zw0JRYU64HvdrcZP5Q==
1502+
bullmq@^5.7.9:
1503+
version "5.7.9"
1504+
resolved "https://registry.yarnpkg.com/bullmq/-/bullmq-5.7.9.tgz#6f508b3b280562630f696f7397129d6096c81eab"
1505+
integrity sha512-ZTDIT6gM5XXeqBKqW6/Sbq1tdEzx0HXpx29ffejMcIXiG0wVBlOAEyp5dVHnjRyB2Nz9pZlQmhmJC9a1l+o0ug==
15131506
dependencies:
15141507
cron-parser "^4.6.0"
1515-
glob "^8.0.3"
1516-
ioredis "^5.3.2"
1517-
lodash "^4.17.21"
1518-
msgpackr "^1.6.2"
1508+
ioredis "^5.4.1"
1509+
msgpackr "^1.10.1"
15191510
node-abort-controller "^3.1.1"
15201511
semver "^7.5.4"
15211512
tslib "^2.0.0"
@@ -2351,17 +2342,6 @@ glob@^7.1.1, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6, glob@^7.1.7:
23512342
once "^1.3.0"
23522343
path-is-absolute "^1.0.0"
23532344

2354-
glob@^8.0.3:
2355-
version "8.1.0"
2356-
resolved "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz"
2357-
integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==
2358-
dependencies:
2359-
fs.realpath "^1.0.0"
2360-
inflight "^1.0.4"
2361-
inherits "2"
2362-
minimatch "^5.0.1"
2363-
once "^1.3.0"
2364-
23652345
globals@^11.1.0:
23662346
version "11.12.0"
23672347
resolved "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz"
@@ -2616,7 +2596,7 @@ into-stream@^6.0.0:
26162596
from2 "^2.3.0"
26172597
p-is-promise "^3.0.0"
26182598

2619-
ioredis@*, ioredis@5.3.2, ioredis@^5.3.2:
2599+
ioredis@*, ioredis@^5.3.2:
26202600
version "5.3.2"
26212601
resolved "https://registry.npmjs.org/ioredis/-/ioredis-5.3.2.tgz"
26222602
integrity sha512-1DKMMzlIHM02eBBVOFQ1+AolGjs6+xEcM4PDL7NqOS6szq7H9jSaEkIUH6/a5Hl241LzW6JLSiAbNvTQjUupUA==
@@ -2631,6 +2611,21 @@ ioredis@*, ioredis@5.3.2, ioredis@^5.3.2:
26312611
redis-parser "^3.0.0"
26322612
standard-as-callback "^2.1.0"
26332613

2614+
ioredis@^5.4.1:
2615+
version "5.4.1"
2616+
resolved "https://registry.yarnpkg.com/ioredis/-/ioredis-5.4.1.tgz#1c56b70b759f01465913887375ed809134296f40"
2617+
integrity sha512-2YZsvl7jopIa1gaePkeMtd9rAcSjOOjPtpcLlOeusyO+XH2SK5ZcT+UCrElPP+WVIInh2TzeI4XW9ENaSLVVHA==
2618+
dependencies:
2619+
"@ioredis/commands" "^1.1.1"
2620+
cluster-key-slot "^1.1.0"
2621+
debug "^4.3.4"
2622+
denque "^2.1.0"
2623+
lodash.defaults "^4.2.0"
2624+
lodash.isarguments "^3.1.0"
2625+
redis-errors "^1.2.0"
2626+
redis-parser "^3.0.0"
2627+
standard-as-callback "^2.1.0"
2628+
26342629
ip-regex@^4.1.0:
26352630
version "4.3.0"
26362631
resolved "https://registry.npmjs.org/ip-regex/-/ip-regex-4.3.0.tgz"
@@ -3641,13 +3636,6 @@ minimatch@^3.0.4:
36413636
dependencies:
36423637
brace-expansion "^1.1.7"
36433638

3644-
minimatch@^5.0.1:
3645-
version "5.1.6"
3646-
resolved "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz"
3647-
integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==
3648-
dependencies:
3649-
brace-expansion "^2.0.1"
3650-
36513639
minimist-options@4.1.0:
36523640
version "4.1.0"
36533641
resolved "https://registry.npmjs.org/minimist-options/-/minimist-options-4.1.0.tgz"
@@ -3758,26 +3746,26 @@ ms@^2.0.0, ms@^2.1.2:
37583746
resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz"
37593747
integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==
37603748

3761-
msgpackr-extract@^2.2.0:
3762-
version "2.2.0"
3763-
resolved "https://registry.npmjs.org/msgpackr-extract/-/msgpackr-extract-2.2.0.tgz"
3764-
integrity sha512-0YcvWSv7ZOGl9Od6Y5iJ3XnPww8O7WLcpYMDwX+PAA/uXLDtyw94PJv9GLQV/nnp3cWlDhMoyKZIQLrx33sWog==
3749+
msgpackr-extract@^3.0.2:
3750+
version "3.0.2"
3751+
resolved "https://registry.yarnpkg.com/msgpackr-extract/-/msgpackr-extract-3.0.2.tgz#e05ec1bb4453ddf020551bcd5daaf0092a2c279d"
3752+
integrity sha512-SdzXp4kD/Qf8agZ9+iTu6eql0m3kWm1A2y1hkpTeVNENutaB0BwHlSvAIaMxwntmRUAUjon2V4L8Z/njd0Ct8A==
37653753
dependencies:
3766-
node-gyp-build-optional-packages "5.0.3"
3754+
node-gyp-build-optional-packages "5.0.7"
37673755
optionalDependencies:
3768-
"@msgpackr-extract/msgpackr-extract-darwin-arm64" "2.2.0"
3769-
"@msgpackr-extract/msgpackr-extract-darwin-x64" "2.2.0"
3770-
"@msgpackr-extract/msgpackr-extract-linux-arm" "2.2.0"
3771-
"@msgpackr-extract/msgpackr-extract-linux-arm64" "2.2.0"
3772-
"@msgpackr-extract/msgpackr-extract-linux-x64" "2.2.0"
3773-
"@msgpackr-extract/msgpackr-extract-win32-x64" "2.2.0"
3774-
3775-
msgpackr@^1.5.2, msgpackr@^1.6.2:
3776-
version "1.8.1"
3777-
resolved "https://registry.npmjs.org/msgpackr/-/msgpackr-1.8.1.tgz"
3778-
integrity sha512-05fT4J8ZqjYlR4QcRDIhLCYKUOHXk7C/xa62GzMKj74l3up9k2QZ3LgFc6qWdsPHl91QA2WLWqWc8b8t7GLNNw==
3756+
"@msgpackr-extract/msgpackr-extract-darwin-arm64" "3.0.2"
3757+
"@msgpackr-extract/msgpackr-extract-darwin-x64" "3.0.2"
3758+
"@msgpackr-extract/msgpackr-extract-linux-arm" "3.0.2"
3759+
"@msgpackr-extract/msgpackr-extract-linux-arm64" "3.0.2"
3760+
"@msgpackr-extract/msgpackr-extract-linux-x64" "3.0.2"
3761+
"@msgpackr-extract/msgpackr-extract-win32-x64" "3.0.2"
3762+
3763+
msgpackr@^1.10.1:
3764+
version "1.10.1"
3765+
resolved "https://registry.yarnpkg.com/msgpackr/-/msgpackr-1.10.1.tgz#51953bb4ce4f3494f0c4af3f484f01cfbb306555"
3766+
integrity sha512-r5VRLv9qouXuLiIBrLpl2d5ZvPt8svdQTl5/vMvE4nzDMyEX4sgW5yWhuBBj5UmgwOTWj8CIdSXn5sAfsHAWIQ==
37793767
optionalDependencies:
3780-
msgpackr-extract "^2.2.0"
3768+
msgpackr-extract "^3.0.2"
37813769

37823770
mute-stream@~0.0.4:
37833771
version "0.0.8"
@@ -3816,10 +3804,10 @@ node-fetch@^2.6.1:
38163804
dependencies:
38173805
whatwg-url "^5.0.0"
38183806

3819-
node-gyp-build-optional-packages@5.0.3:
3820-
version "5.0.3"
3821-
resolved "https://registry.npmjs.org/node-gyp-build-optional-packages/-/node-gyp-build-optional-packages-5.0.3.tgz"
3822-
integrity sha512-k75jcVzk5wnnc/FMxsf4udAoTEUv2jY3ycfdSd3yWu6Cnd1oee6/CfZJApyscA4FJOmdoixWwiwOyf16RzD5JA==
3807+
node-gyp-build-optional-packages@5.0.7:
3808+
version "5.0.7"
3809+
resolved "https://registry.yarnpkg.com/node-gyp-build-optional-packages/-/node-gyp-build-optional-packages-5.0.7.tgz#5d2632bbde0ab2f6e22f1bbac2199b07244ae0b3"
3810+
integrity sha512-YlCCc6Wffkx0kHkmam79GKvDQ6x+QZkMjFGrIMxgFNILFvGSbCp2fCBC55pGTT9gVaz8Na5CLmxt/urtzRv36w==
38233811

38243812
node-gyp@^7.1.0, node-gyp@^7.1.2:
38253813
version "7.1.2"

0 commit comments

Comments
 (0)