From 667fc6e00ae4d6da639d285a104fb67e01c95bbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Herv=C3=A9?= Date: Mon, 4 Nov 2019 11:37:53 +0100 Subject: [PATCH 01/22] fix: default job settings #58 I updated job options merging in order to override default job options when options are provided at job level. Maybe a deep merge between the two objects could be even better. --- src/classes/queue.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/classes/queue.ts b/src/classes/queue.ts index a48874ba61..374e0735d1 100644 --- a/src/classes/queue.ts +++ b/src/classes/queue.ts @@ -52,13 +52,13 @@ export class Queue extends QueueGetters { return (await this.repeat).addNextRepeatableJob( jobName, data, - { ...opts, ...this.jobsOpts }, + { ...this.jobsOpts, ...opts }, true, ); } else { const job = await Job.create(this, jobName, data, { - ...opts, ...this.jobsOpts, + ...opts, }); this.emit('waiting', job); return job; @@ -77,7 +77,7 @@ export class Queue extends QueueGetters { jobs.map(job => ({ name: job.name, data: job.data, - opts: { ...job.opts, ...this.jobsOpts }, + opts: { ...this.jobsOpts, ...job.opts }, })), ); } From fde089d85397ad48a382e3c1eb0fac835a9f49ad Mon Sep 17 00:00:00 2001 From: Manuel Astudillo Date: Thu, 7 Nov 2019 21:01:15 +0000 Subject: [PATCH 02/22] GitBook: [master] 4 pages modified --- docs/gitbook/guide/architecture.md | 2 +- docs/gitbook/guide/connections.md | 4 ++-- docs/gitbook/guide/jobs/README.md | 2 +- docs/gitbook/guide/jobs/stalled.md | 16 ++++++++-------- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/gitbook/guide/architecture.md b/docs/gitbook/guide/architecture.md index 8a212d182f..a281e48ead 100644 --- a/docs/gitbook/guide/architecture.md +++ b/docs/gitbook/guide/architecture.md @@ -12,5 +12,5 @@ In order to use the full potential of Bull queues, it is important to understand When a job is added to a queue it can be in one of two states, it can either be in the “wait” status, which is, in fact, a waiting list, where all jobs must enter before they can be processed, or it can be in a “delayed” status: a delayed status implies that the job is waiting for some timeout or to be promoted for being processed, however, a delayed job will not be processed directly, instead it will be placed at the beginning of the waiting list and processed as soon as a worker is idle. -The next state for a job I the “active” state. The active state is represented by a set, and are jobs that are currently being processed, i.e. they are running in the `process` function explained in the previous chapter. A job can be in the active state for an unlimited amount of time until the process is completed or an exception is thrown so that the job will end in either the “completed” or the “failed” status. +The next state for a job Is the “active” state. The active state is represented by a set, and are jobs that are currently being processed, i.e. they are running in the `process` function explained in the previous chapter. A job can be in the active state for an unlimited amount of time until the process is completed or an exception is thrown so that the job will end in either the “completed” or the “failed” status. diff --git a/docs/gitbook/guide/connections.md b/docs/gitbook/guide/connections.md index 335372a2b4..ad4b8b74e3 100644 --- a/docs/gitbook/guide/connections.md +++ b/docs/gitbook/guide/connections.md @@ -1,6 +1,6 @@ # Connections -In order to start working with a Queue, a connection to a Redis instance is necessary. BullMQ uses the node module [ioredis](https://github.com/luin/ioredis), and the options you pass to BullMQ are just passed to the constructor of ioredis. If you do not provide any options, it will default to port 6739 and localhost. +In order to start working with a Queue, a connection to a Redis instance is necessary. BullMQ uses the node module [ioredis](https://github.com/luin/ioredis), and the options you pass to BullMQ are just passed to the constructor of ioredis. If you do not provide any options, it will default to port 6739 and localhost. Every class will consume at least one redis connection, but it is also possible to reuse connections in some situations. For example, the _Queue_ and _Worker_ classes can accept an existing ioredis instance, and by that reusing that connection, however _QueueScheduler_ and _QueueEvents_ cannot do that because they require blocking connections to Redis, which makes it impossible to reuse them. @@ -14,7 +14,7 @@ const myQueue = new Queue('myqueue', { connection: { host: myredis.taskforce.run, port: 32856 }}); - + const myWorker = new Worker('myworker', { connection: { host: myredis.taskforce.run, port: 32856 diff --git a/docs/gitbook/guide/jobs/README.md b/docs/gitbook/guide/jobs/README.md index a5dca3795b..bb5a882c6f 100644 --- a/docs/gitbook/guide/jobs/README.md +++ b/docs/gitbook/guide/jobs/README.md @@ -2,5 +2,5 @@ Queues can hold different types of jobs which determine how and when they are processed. In this section we will describe them in detail. -An important thing to consider is that you can mix the different job types in the same queue, so you can add FIFO jobs and at any moment for example add a a LIFO of a delayed job. +An important thing to consider is that you can mix the different job types in the same queue, so you can add FIFO jobs, and at any moment add a LIFO or a delayed job. diff --git a/docs/gitbook/guide/jobs/stalled.md b/docs/gitbook/guide/jobs/stalled.md index 927d15b09b..2736cd0337 100644 --- a/docs/gitbook/guide/jobs/stalled.md +++ b/docs/gitbook/guide/jobs/stalled.md @@ -12,24 +12,24 @@ In order to avoid stalled jobs, make sure that your worker does not keep NodeJS Another way to reduce the chance for stalled jobs is using so called "sandboxed" processors. In this case, the workers will spawn new separate NodeJS processes, running separately from the main process. -{% code-tabs %} -{% code-tabs-item title="main.ts" %} +{% tabs %} +{% tab title="main.ts" %} ```typescript import { Worker } from 'bullmq'; const worker = new Worker('Paint', painter); ``` -{% endcode-tabs-item %} -{% endcode-tabs %} +{% endtab %} +{% endtabs %} -{% code-tabs %} -{% code-tabs-item title="painter.ts" %} +{% tabs %} +{% tab title="painter.ts" %} ```typescript export default = (job) => { // Paint something } ``` -{% endcode-tabs-item %} -{% endcode-tabs %} +{% endtab %} +{% endtabs %} From ad1fc3c19d5c02382989a7e1cb72b807b743465c Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Fri, 8 Nov 2019 17:45:08 +0000 Subject: [PATCH 03/22] chore(release): 1.4.1 [skip ci]nn## [1.4.1](https://github.com/taskforcesh/bullmq/compare/v1.4.0...v1.4.1) (2019-11-08) ### Bug Fixes * default job settings [#58](https://github.com/taskforcesh/bullmq/issues/58) ([667fc6e](https://github.com/taskforcesh/bullmq/commit/667fc6e00ae4d6da639d285a104fb67e01c95bbd)) --- CHANGELOG.md | 7 +++++++ package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b72d378de0..d2e3a0d68d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [1.4.1](https://github.com/taskforcesh/bullmq/compare/v1.4.0...v1.4.1) (2019-11-08) + + +### Bug Fixes + +* default job settings [#58](https://github.com/taskforcesh/bullmq/issues/58) ([667fc6e](https://github.com/taskforcesh/bullmq/commit/667fc6e00ae4d6da639d285a104fb67e01c95bbd)) + # [1.4.0](https://github.com/taskforcesh/bullmq/compare/v1.3.0...v1.4.0) (2019-11-06) diff --git a/package.json b/package.json index 858168462e..62c3f72790 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bullmq", - "version": "1.4.0", + "version": "1.4.1", "description": "Queue for messages and jobs based on Redis", "main": "dist/index.js", "types": "dist/index.d.ts", From d1118aab77f755b4a65e3dd8ea2e195baf3d2602 Mon Sep 17 00:00:00 2001 From: Stanislav Mamontov <46541650+stansv@users.noreply.github.com> Date: Wed, 20 Nov 2019 15:47:13 +0300 Subject: [PATCH 04/22] fix: check in moveToFinished to use default val for opts.maxLenEvents --- src/commands/moveToFinished-7.lua | 7 +++++-- src/test/test_job.ts | 11 +++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/commands/moveToFinished-7.lua b/src/commands/moveToFinished-7.lua index ea52e7352e..14357899d0 100644 --- a/src/commands/moveToFinished-7.lua +++ b/src/commands/moveToFinished-7.lua @@ -80,10 +80,10 @@ if rcall("EXISTS", KEYS[3]) == 1 then -- // Make sure job exists rcall("XADD", KEYS[6], "*", "event", ARGV[5], "jobId", ARGV[1], ARGV[3], ARGV[4]) - -- Try to get next job to avoid an extra roundtrip if the queue is not closing, + -- Try to get next job to avoid an extra roundtrip if the queue is not closing, -- and not rate limited. if (ARGV[8] == "1") then - -- move from wait to active + -- move from wait to active local jobId = rcall("RPOPLPUSH", KEYS[4], KEYS[1]) if jobId then local jobKey = ARGV[9] .. jobId @@ -104,6 +104,9 @@ if rcall("EXISTS", KEYS[3]) == 1 then -- // Make sure job exists end local maxEvents = rcall("HGET", KEYS[7], "opts.maxLenEvents") + if (maxEvents == false) then + maxEvents = 10000 + end rcall("XTRIM", KEYS[6], "MAXLEN", "~", maxEvents) return 0 diff --git a/src/test/test_job.ts b/src/test/test_job.ts index f81368efad..bb3567f96b 100644 --- a/src/test/test_job.ts +++ b/src/test/test_job.ts @@ -132,6 +132,17 @@ describe('Job', function() { expect(job2.returnvalue).to.be.equal('succeeded'); expect(job1Id[1]).to.be.equal(job1.id); }); + + /** + * Verify moveToFinished use default value for opts.maxLenEvents + * if it does not exist in meta key (or entire meta key is missing). + */ + it('should not fail if queue meta key is missing', async function() { + const job = await queue.add('test', { color: 'red' }); + const client = await queue.client; + await client.del(queue.toKey('meta')); + await job.moveToCompleted('done', '0', false); + }); }); describe('.moveToFailed', function() { From 5941b82b646e46d53970197a404e5ea54f09d008 Mon Sep 17 00:00:00 2001 From: Jacob Rothstein Date: Wed, 20 Nov 2019 12:25:43 -0800 Subject: [PATCH 05/22] fix: avoid the .toJSON serializer interface #70 renames Job#toJSON to Job#asJSON and adds a test --- src/classes/job.ts | 4 ++-- src/classes/sandbox.ts | 2 +- src/test/test_job.ts | 11 +++++++++++ 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/classes/job.ts b/src/classes/job.ts index 18d91202a8..d318b08532 100644 --- a/src/classes/job.ts +++ b/src/classes/job.ts @@ -144,7 +144,7 @@ export class Job { } } - toJSON(): JobJson { + asJSON(): JobJson { return { id: this.id, name: this.name, @@ -452,7 +452,7 @@ export class Job { private addJob(client: IORedis.Redis): string { const queue = this.queue; - const jobData = this.toJSON(); + const jobData = this.asJSON(); return Scripts.addJob(client, queue, jobData, this.opts, this.id); } diff --git a/src/classes/sandbox.ts b/src/classes/sandbox.ts index 5d6f26ab48..aefb97a2c3 100644 --- a/src/classes/sandbox.ts +++ b/src/classes/sandbox.ts @@ -6,7 +6,7 @@ const sandbox = (processFile: any, childPool: any) => { child.send({ cmd: 'start', - job: job.toJSON(), + job: job.asJSON(), }); const done = new Promise((resolve, reject) => { diff --git a/src/test/test_job.ts b/src/test/test_job.ts index f81368efad..843585e0bf 100644 --- a/src/test/test_job.ts +++ b/src/test/test_job.ts @@ -67,6 +67,17 @@ describe('Job', function() { }); }); + describe('JSON.stringify', function() { + it("retains the data property's type", async function() { + const data = { foo: 'bar' }; + const job = await Job.create(queue, 'test', data); + expect(JSON.parse(JSON.stringify(job))).to.have.deep.property( + 'data', + data, + ); + }); + }); + describe('.update', function() { it('should allow updating job data', async function() { const job = await Job.create(queue, 'test', { foo: 'bar' }); From 5752727a6294e1b8d35f6a49e4953375510e10e6 Mon Sep 17 00:00:00 2001 From: Jacob Rothstein Date: Wed, 20 Nov 2019 15:08:45 -0800 Subject: [PATCH 06/22] fix: avoid Job<->Queue circular json error --- src/classes/job.ts | 5 +++++ src/test/test_job.ts | 24 ++++++++++++++++++------ 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/src/classes/job.ts b/src/classes/job.ts index d318b08532..ff3fab8fa1 100644 --- a/src/classes/job.ts +++ b/src/classes/job.ts @@ -144,6 +144,11 @@ export class Job { } } + toJSON() { + const { queue, ...withoutQueue } = this; + return withoutQueue; + } + asJSON(): JobJson { return { id: this.id, diff --git a/src/test/test_job.ts b/src/test/test_job.ts index 843585e0bf..081b9b4f7c 100644 --- a/src/test/test_job.ts +++ b/src/test/test_job.ts @@ -67,14 +67,26 @@ describe('Job', function() { }); }); - describe('JSON.stringify', function() { - it("retains the data property's type", async function() { + describe('JSON.stringify', () => { + it('retains property types', async () => { const data = { foo: 'bar' }; const job = await Job.create(queue, 'test', data); - expect(JSON.parse(JSON.stringify(job))).to.have.deep.property( - 'data', - data, - ); + job.returnvalue = 1; + job.progress = 20; + const json = JSON.stringify(job); + const parsed = JSON.parse(json); + expect(parsed).to.have.deep.property('data', data); + expect(parsed).to.have.property('name', 'test'); + expect(parsed).to.have.property('returnvalue', 1); + expect(parsed).to.have.property('progress', 20); + }); + + it('omits the queue property to avoid a circular json error on node 8', async () => { + const data = { foo: 'bar' }; + const job = await Job.create(queue, 'test', data); + const json = JSON.stringify(job); + const parsed = JSON.parse(json); + expect(parsed).not.to.have.property('queue'); }); }); From 371ef07fbb61c5ad490061c9571dbd8df9f6ab47 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Thu, 21 Nov 2019 08:06:37 +0000 Subject: [PATCH 07/22] chore(release): 1.4.2 [skip ci]nn## [1.4.2](https://github.com/taskforcesh/bullmq/compare/v1.4.1...v1.4.2) (2019-11-21) ### Bug Fixes * avoid Job<->Queue circular json error ([5752727](https://github.com/taskforcesh/bullmq/commit/5752727a6294e1b8d35f6a49e4953375510e10e6)) * avoid the .toJSON serializer interface [#70](https://github.com/taskforcesh/bullmq/issues/70) ([5941b82](https://github.com/taskforcesh/bullmq/commit/5941b82b646e46d53970197a404e5ea54f09d008)) --- CHANGELOG.md | 8 ++++++++ package.json | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d2e3a0d68d..3a3deecd7a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +## [1.4.2](https://github.com/taskforcesh/bullmq/compare/v1.4.1...v1.4.2) (2019-11-21) + + +### Bug Fixes + +* avoid Job<->Queue circular json error ([5752727](https://github.com/taskforcesh/bullmq/commit/5752727a6294e1b8d35f6a49e4953375510e10e6)) +* avoid the .toJSON serializer interface [#70](https://github.com/taskforcesh/bullmq/issues/70) ([5941b82](https://github.com/taskforcesh/bullmq/commit/5941b82b646e46d53970197a404e5ea54f09d008)) + ## [1.4.1](https://github.com/taskforcesh/bullmq/compare/v1.4.0...v1.4.1) (2019-11-08) diff --git a/package.json b/package.json index 62c3f72790..5fb2929360 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bullmq", - "version": "1.4.1", + "version": "1.4.2", "description": "Queue for messages and jobs based on Redis", "main": "dist/index.js", "types": "dist/index.d.ts", From 136f0879bb28d4b6c2e860f11fc6d65446ac6900 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Thu, 21 Nov 2019 14:25:24 +0000 Subject: [PATCH 08/22] chore(release): 1.4.3 [skip ci]nn## [1.4.3](https://github.com/taskforcesh/bullmq/compare/v1.4.2...v1.4.3) (2019-11-21) ### Bug Fixes * check in moveToFinished to use default val for opts.maxLenEvents ([d1118aa](https://github.com/taskforcesh/bullmq/commit/d1118aab77f755b4a65e3dd8ea2e195baf3d2602)) --- CHANGELOG.md | 7 +++++++ package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a3deecd7a..6e8c5c1342 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [1.4.3](https://github.com/taskforcesh/bullmq/compare/v1.4.2...v1.4.3) (2019-11-21) + + +### Bug Fixes + +* check in moveToFinished to use default val for opts.maxLenEvents ([d1118aa](https://github.com/taskforcesh/bullmq/commit/d1118aab77f755b4a65e3dd8ea2e195baf3d2602)) + ## [1.4.2](https://github.com/taskforcesh/bullmq/compare/v1.4.1...v1.4.2) (2019-11-21) diff --git a/package.json b/package.json index 5fb2929360..1eb8c26d0f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bullmq", - "version": "1.4.2", + "version": "1.4.3", "description": "Queue for messages and jobs based on Redis", "main": "dist/index.js", "types": "dist/index.d.ts", From bedbaf25af6479e387cd7548e246dca7c72fc140 Mon Sep 17 00:00:00 2001 From: Jacob Rothstein Date: Thu, 21 Nov 2019 15:31:56 -0800 Subject: [PATCH 09/22] feat: remove dependence on Bluebird.delay #67 This approach uses a simple setTimeout-based delay in the only production usage (src/classes/queue-events.ts), defined in src/util.ts, and since there was already a devDependency on a library called [delay](https://www.npmjs.com/package/delay), this commit uses that in test contexts. It should be easy to replace that dep with a `(ms:number) => new Promise(r => setTimeout(r, ms))` as well. Closes #67 --- package.json | 2 -- src/classes/queue-events.ts | 3 +-- src/classes/worker.ts | 11 +---------- src/test/test_clean.ts | 2 +- src/test/test_compat.ts | 2 +- src/test/test_job.ts | 2 +- src/test/test_stalled_jobs.ts | 2 +- src/test/test_worker.ts | 2 +- src/utils.ts | 6 ++++++ yarn.lock | 5 ----- 10 files changed, 13 insertions(+), 24 deletions(-) diff --git a/package.json b/package.json index 1eb8c26d0f..f99a2d6a22 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,6 @@ }, "dependencies": { "@types/ioredis": "^4.0.13", - "bluebird": "^3.5.3", "cron-parser": "^2.7.3", "get-port": "^5.0.0", "ioredis": "^4.3.0", @@ -43,7 +42,6 @@ "@semantic-release/github": "^5.5.4", "@semantic-release/npm": "^5.2.0", "@semantic-release/release-notes-generator": "^7.3.0", - "@types/bluebird": "^3.5.25", "@types/chai": "^4.1.7", "@types/lodash": "^4.14.119", "@types/mocha": "^5.2.5", diff --git a/src/classes/queue-events.ts b/src/classes/queue-events.ts index 8cf1b36f1f..653e81b538 100644 --- a/src/classes/queue-events.ts +++ b/src/classes/queue-events.ts @@ -1,6 +1,5 @@ -import { delay } from 'bluebird'; import { QueueEventsOptions } from '../interfaces'; -import { array2obj } from '../utils'; +import { array2obj, delay } from '../utils'; import { QueueBase } from './queue-base'; export class QueueEvents extends QueueBase { diff --git a/src/classes/worker.ts b/src/classes/worker.ts index edd05c99a6..1d4a760bf3 100644 --- a/src/classes/worker.ts +++ b/src/classes/worker.ts @@ -1,4 +1,3 @@ -import * as Bluebird from 'bluebird'; import fs from 'fs'; import IORedis from 'ioredis'; import path from 'path'; @@ -282,16 +281,8 @@ export class Worker extends QueueBase { }; const handleFailed = async (err: Error) => { - let error = err; - if ( - error instanceof Bluebird.OperationalError && - (error).cause instanceof Error - ) { - error = (error).cause; // Handle explicit rejection - } - await job.moveToFailed(err, token); - this.emit('failed', job, error, 'active'); + this.emit('failed', job, err, 'active'); }; // TODO: how to cancel the processing? (null -> job.cancel() => throw CancelError()void) diff --git a/src/test/test_clean.ts b/src/test/test_clean.ts index c138c0a4a6..71fe051dd9 100644 --- a/src/test/test_clean.ts +++ b/src/test/test_clean.ts @@ -1,5 +1,5 @@ import { Queue, QueueEvents, Worker } from '../classes'; -import { delay } from 'bluebird'; +import delay from 'delay'; import { expect } from 'chai'; import IORedis from 'ioredis'; import { after } from 'lodash'; diff --git a/src/test/test_compat.ts b/src/test/test_compat.ts index 9ac13a298b..ca52bf6a23 100644 --- a/src/test/test_compat.ts +++ b/src/test/test_compat.ts @@ -4,7 +4,7 @@ import { Job, Worker } from '@src/classes'; import { Queue3 } from '@src/classes/compat'; -import { delay } from 'bluebird'; +import delay from 'delay'; import { expect } from 'chai'; import IORedis from 'ioredis'; import { after } from 'lodash'; diff --git a/src/test/test_job.ts b/src/test/test_job.ts index 03de55a389..ea30e71c6b 100644 --- a/src/test/test_job.ts +++ b/src/test/test_job.ts @@ -5,7 +5,7 @@ import { Job, Queue, QueueScheduler } from '@src/classes'; import { QueueEvents } from '@src/classes/queue-events'; import { Worker } from '@src/classes/worker'; import { JobsOptions } from '@src/interfaces'; -import { delay } from 'bluebird'; +import delay from 'delay'; import { expect } from 'chai'; import IORedis from 'ioredis'; import { after } from 'lodash'; diff --git a/src/test/test_stalled_jobs.ts b/src/test/test_stalled_jobs.ts index a4c77027d2..f042399a1d 100644 --- a/src/test/test_stalled_jobs.ts +++ b/src/test/test_stalled_jobs.ts @@ -1,5 +1,5 @@ import { Queue, QueueScheduler, Worker, QueueEvents } from '@src/classes'; -import { delay } from 'bluebird'; +import delay from 'delay'; import IORedis from 'ioredis'; import { after } from 'lodash'; import { beforeEach, describe, it } from 'mocha'; diff --git a/src/test/test_worker.ts b/src/test/test_worker.ts index b4d19ee7e9..17833e0108 100644 --- a/src/test/test_worker.ts +++ b/src/test/test_worker.ts @@ -3,7 +3,7 @@ import { describe, beforeEach, it } from 'mocha'; import { expect } from 'chai'; import IORedis from 'ioredis'; import { v4 } from 'uuid'; -import { delay } from 'bluebird'; +import delay from 'delay'; import { after, times, once } from 'lodash'; import { RetryErrors } from '@src/enums'; import * as sinon from 'sinon'; diff --git a/src/utils.ts b/src/utils.ts index 5b1d305d4b..4501b2fc29 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -26,3 +26,9 @@ export function array2obj(arr: string[]) { } return obj; } + +export function delay(ms: number): Promise { + return new Promise(resolve => { + setTimeout(() => resolve(), ms); + }); +} diff --git a/yarn.lock b/yarn.lock index 28d8336731..fa89bc5501 100644 --- a/yarn.lock +++ b/yarn.lock @@ -428,11 +428,6 @@ resolved "https://registry.yarnpkg.com/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz#8da5c6530915653f3a1f38fd5f101d8c3f8079c5" integrity sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ== -"@types/bluebird@^3.5.25": - version "3.5.28" - resolved "https://registry.yarnpkg.com/@types/bluebird/-/bluebird-3.5.28.tgz#04c1a520ff076649236bc8ca21198542ce2bdb09" - integrity sha512-0Vk/kqkukxPKSzP9c8WJgisgGDx5oZDbsLLWIP5t70yThO/YleE+GEm2S1GlRALTaack3O7U5OS5qEm7q2kciA== - "@types/chai@^4.1.7": version "4.2.3" resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.2.3.tgz#419477a3d5202bad19e14c787940a61dc9ea6407" From 97e1a3015d853e615ddd623af07f12a194ccab2c Mon Sep 17 00:00:00 2001 From: Jacob Rothstein Date: Fri, 22 Nov 2019 11:35:47 -0800 Subject: [PATCH 10/22] feat: remove delay dependency this commit uses delay from utils in typescript and adds a simple test/fixtures/delay.js for use in javascript fixtures. this change also allowed the ts compiler to identify a promise that was not `await`ed in src/test/test_worker.ts --- package.json | 1 - src/test/fixtures/delay.js | 5 +++++ src/test/fixtures/fixture_processor.js | 2 +- src/test/fixtures/fixture_processor_bar.js | 2 +- src/test/fixtures/fixture_processor_exit.js | 2 +- src/test/fixtures/fixture_processor_fail.js | 2 +- src/test/fixtures/fixture_processor_foo.js | 2 +- src/test/fixtures/fixture_processor_progress.js | 2 +- src/test/fixtures/fixture_processor_slow.js | 2 +- src/test/test_clean.ts | 2 +- src/test/test_compat.ts | 2 +- src/test/test_job.ts | 2 +- src/test/test_pause.ts | 3 +-- src/test/test_sandboxed_process.ts | 5 ++--- src/test/test_stalled_jobs.ts | 2 +- src/test/test_worker.ts | 4 ++-- yarn.lock | 5 ----- 17 files changed, 21 insertions(+), 24 deletions(-) create mode 100644 src/test/fixtures/delay.js diff --git a/package.json b/package.json index f99a2d6a22..878095ae77 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,6 @@ "chai": "^4.2.0", "copyfiles": "^2.1.1", "coveralls": "^3.0.7", - "delay": "^4.3.0", "husky": "^3.0.3", "istanbul": "^0.4.5", "mocha": "^6.1.4", diff --git a/src/test/fixtures/delay.js b/src/test/fixtures/delay.js new file mode 100644 index 0000000000..71b2860784 --- /dev/null +++ b/src/test/fixtures/delay.js @@ -0,0 +1,5 @@ +module.exports = function delay(ms) { + return new Promise(function(resolve) { + return setTimeout(resolve, ms); + }); +}; diff --git a/src/test/fixtures/fixture_processor.js b/src/test/fixtures/fixture_processor.js index a27b8f3a72..f7d3327f0b 100644 --- a/src/test/fixtures/fixture_processor.js +++ b/src/test/fixtures/fixture_processor.js @@ -4,7 +4,7 @@ */ 'use strict'; -const delay = require('delay'); +const delay = require('./delay'); module.exports = function(/*job*/) { return delay(500).then(() => { diff --git a/src/test/fixtures/fixture_processor_bar.js b/src/test/fixtures/fixture_processor_bar.js index 76606ac1cf..01158f77e4 100644 --- a/src/test/fixtures/fixture_processor_bar.js +++ b/src/test/fixtures/fixture_processor_bar.js @@ -4,7 +4,7 @@ */ 'use strict'; -const delay = require('delay'); +const delay = require('./delay'); module.exports = function(/*job*/) { return delay(500).then(() => { diff --git a/src/test/fixtures/fixture_processor_exit.js b/src/test/fixtures/fixture_processor_exit.js index 3a3ad1c92e..769e6d3963 100644 --- a/src/test/fixtures/fixture_processor_exit.js +++ b/src/test/fixtures/fixture_processor_exit.js @@ -4,7 +4,7 @@ */ 'use strict'; -const delay = require('delay'); +const delay = require('./delay'); module.exports = function(/*job*/) { return delay(500).then(() => { diff --git a/src/test/fixtures/fixture_processor_fail.js b/src/test/fixtures/fixture_processor_fail.js index 7148b34558..914ebb9371 100644 --- a/src/test/fixtures/fixture_processor_fail.js +++ b/src/test/fixtures/fixture_processor_fail.js @@ -4,7 +4,7 @@ */ 'use strict'; -const delay = require('delay'); +const delay = require('./delay'); module.exports = function(/*job*/) { return delay(500).then(() => { diff --git a/src/test/fixtures/fixture_processor_foo.js b/src/test/fixtures/fixture_processor_foo.js index 0d01e5dbb6..23994a6418 100644 --- a/src/test/fixtures/fixture_processor_foo.js +++ b/src/test/fixtures/fixture_processor_foo.js @@ -4,7 +4,7 @@ */ 'use strict'; -const delay = require('delay'); +const delay = require('./delay'); module.exports = function(/*job*/) { return delay(500).then(() => { diff --git a/src/test/fixtures/fixture_processor_progress.js b/src/test/fixtures/fixture_processor_progress.js index 3443aa2123..a63086d149 100644 --- a/src/test/fixtures/fixture_processor_progress.js +++ b/src/test/fixtures/fixture_processor_progress.js @@ -4,7 +4,7 @@ */ 'use strict'; -const delay = require('delay'); +const delay = require('./delay'); module.exports = function(job) { return delay(50) diff --git a/src/test/fixtures/fixture_processor_slow.js b/src/test/fixtures/fixture_processor_slow.js index 4bd829686c..3604f90db7 100644 --- a/src/test/fixtures/fixture_processor_slow.js +++ b/src/test/fixtures/fixture_processor_slow.js @@ -4,7 +4,7 @@ */ 'use strict'; -const delay = require('delay'); +const delay = require('./delay'); module.exports = function(/*job*/) { return delay(1000).then(() => { diff --git a/src/test/test_clean.ts b/src/test/test_clean.ts index 71fe051dd9..1d3c87a597 100644 --- a/src/test/test_clean.ts +++ b/src/test/test_clean.ts @@ -1,5 +1,5 @@ import { Queue, QueueEvents, Worker } from '../classes'; -import delay from 'delay'; +import { delay } from '@src/utils'; import { expect } from 'chai'; import IORedis from 'ioredis'; import { after } from 'lodash'; diff --git a/src/test/test_compat.ts b/src/test/test_compat.ts index ca52bf6a23..051179a7fc 100644 --- a/src/test/test_compat.ts +++ b/src/test/test_compat.ts @@ -4,7 +4,7 @@ import { Job, Worker } from '@src/classes'; import { Queue3 } from '@src/classes/compat'; -import delay from 'delay'; +import { delay } from '@src/utils'; import { expect } from 'chai'; import IORedis from 'ioredis'; import { after } from 'lodash'; diff --git a/src/test/test_job.ts b/src/test/test_job.ts index ea30e71c6b..d25926257b 100644 --- a/src/test/test_job.ts +++ b/src/test/test_job.ts @@ -5,7 +5,7 @@ import { Job, Queue, QueueScheduler } from '@src/classes'; import { QueueEvents } from '@src/classes/queue-events'; import { Worker } from '@src/classes/worker'; import { JobsOptions } from '@src/interfaces'; -import delay from 'delay'; +import { delay } from '@src/utils'; import { expect } from 'chai'; import IORedis from 'ioredis'; import { after } from 'lodash'; diff --git a/src/test/test_pause.ts b/src/test/test_pause.ts index 601d85ed96..f2bb7b13b3 100644 --- a/src/test/test_pause.ts +++ b/src/test/test_pause.ts @@ -5,8 +5,7 @@ import { expect } from 'chai'; import IORedis from 'ioredis'; import { beforeEach, describe, it } from 'mocha'; import { v4 } from 'uuid'; - -const delay = require('delay'); +import { delay } from '@src/utils'; describe('Pause', function() { let queue: Queue; diff --git a/src/test/test_sandboxed_process.ts b/src/test/test_sandboxed_process.ts index 86d0b381fe..805f67ccf5 100644 --- a/src/test/test_sandboxed_process.ts +++ b/src/test/test_sandboxed_process.ts @@ -1,12 +1,11 @@ import { expect } from 'chai'; import IORedis from 'ioredis'; import { after } from 'lodash'; -import { Queue, QueueEvents, Worker } from '@src/classes'; +import { Queue, QueueEvents, Worker, pool } from '@src/classes'; import { beforeEach } from 'mocha'; import { v4 } from 'uuid'; -const delay = require('delay'); +import { delay } from '@src/utils'; const pReflect = require('p-reflect'); -const pool = require('../classes/child-pool').pool; describe('sandboxed process', () => { let queue: Queue; diff --git a/src/test/test_stalled_jobs.ts b/src/test/test_stalled_jobs.ts index f042399a1d..daf3ac2380 100644 --- a/src/test/test_stalled_jobs.ts +++ b/src/test/test_stalled_jobs.ts @@ -1,5 +1,5 @@ import { Queue, QueueScheduler, Worker, QueueEvents } from '@src/classes'; -import delay from 'delay'; +import { delay } from '@src/utils'; import IORedis from 'ioredis'; import { after } from 'lodash'; import { beforeEach, describe, it } from 'mocha'; diff --git a/src/test/test_worker.ts b/src/test/test_worker.ts index 17833e0108..96290ee001 100644 --- a/src/test/test_worker.ts +++ b/src/test/test_worker.ts @@ -3,7 +3,7 @@ import { describe, beforeEach, it } from 'mocha'; import { expect } from 'chai'; import IORedis from 'ioredis'; import { v4 } from 'uuid'; -import delay from 'delay'; +import { delay } from '@src/utils'; import { after, times, once } from 'lodash'; import { RetryErrors } from '@src/enums'; import * as sinon from 'sinon'; @@ -685,7 +685,7 @@ describe('workers', function() { if (addedJob.id !== job.id) { err = new Error('Processed job id does not match that of added job'); } - delay(500); + await delay(500); }); await worker.waitUntilReady(); diff --git a/yarn.lock b/yarn.lock index fa89bc5501..cfdc5d0cbb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1492,11 +1492,6 @@ define-properties@^1.1.1, define-properties@^1.1.2, define-properties@^1.1.3: dependencies: object-keys "^1.0.12" -delay@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/delay/-/delay-4.3.0.tgz#efeebfb8f545579cb396b3a722443ec96d14c50e" - integrity sha512-Lwaf3zVFDMBop1yDuFZ19F9WyGcZcGacsbdlZtWjQmM50tOcMntm1njF/Nb/Vjij3KaSvCF+sEYGKrrjObu2NA== - delayed-stream@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" From e8e37cf2da26d1f67f21e3bd94da65025e7bde8f Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Fri, 22 Nov 2019 20:44:52 +0000 Subject: [PATCH 11/22] chore(release): 1.5.0 [skip ci]nn# [1.5.0](https://github.com/taskforcesh/bullmq/compare/v1.4.3...v1.5.0) (2019-11-22) ### Features * remove delay dependency ([97e1a30](https://github.com/taskforcesh/bullmq/commit/97e1a3015d853e615ddd623af07f12a194ccab2c)) * remove dependence on Bluebird.delay [#67](https://github.com/taskforcesh/bullmq/issues/67) ([bedbaf2](https://github.com/taskforcesh/bullmq/commit/bedbaf25af6479e387cd7548e246dca7c72fc140)) --- CHANGELOG.md | 8 ++++++++ package.json | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e8c5c1342..3e45faee30 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +# [1.5.0](https://github.com/taskforcesh/bullmq/compare/v1.4.3...v1.5.0) (2019-11-22) + + +### Features + +* remove delay dependency ([97e1a30](https://github.com/taskforcesh/bullmq/commit/97e1a3015d853e615ddd623af07f12a194ccab2c)) +* remove dependence on Bluebird.delay [#67](https://github.com/taskforcesh/bullmq/issues/67) ([bedbaf2](https://github.com/taskforcesh/bullmq/commit/bedbaf25af6479e387cd7548e246dca7c72fc140)) + ## [1.4.3](https://github.com/taskforcesh/bullmq/compare/v1.4.2...v1.4.3) (2019-11-21) diff --git a/package.json b/package.json index 878095ae77..bf0b652375 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bullmq", - "version": "1.4.3", + "version": "1.5.0", "description": "Queue for messages and jobs based on Redis", "main": "dist/index.js", "types": "dist/index.d.ts", From 762f7e60f0577560b6e1ce1545b88e01d96d62b3 Mon Sep 17 00:00:00 2001 From: Eric Carboni Date: Tue, 3 Dec 2019 14:41:30 -0500 Subject: [PATCH 12/22] Update README.md --- docs/gitbook/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/gitbook/README.md b/docs/gitbook/README.md index 35b096eed4..3c5d34b611 100644 --- a/docs/gitbook/README.md +++ b/docs/gitbook/README.md @@ -44,7 +44,7 @@ import { Worker } from 'bullmq' const worker = new Worker(queueName, async job => { // Will print { foo: 'bar'} for the first job // and { qux: 'baz' } for the second. - console.log(job.data): + console.log(job.data); }); ``` From 4adf85680028bafe2f7f1ac7a350f2d83a3fb58f Mon Sep 17 00:00:00 2001 From: Eric Carboni Date: Wed, 4 Dec 2019 17:48:31 -0500 Subject: [PATCH 13/22] docs: add github link to what-is-bullmq.md (#80) --- docs/gitbook/what-is-bullmq.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/gitbook/what-is-bullmq.md b/docs/gitbook/what-is-bullmq.md index ff4aacb464..d2ded2192d 100644 --- a/docs/gitbook/what-is-bullmq.md +++ b/docs/gitbook/what-is-bullmq.md @@ -13,6 +13,8 @@ The library is designed so that it will fulfil the following goals: * Consistent. * High performant. Try to get the highest possible throughput from Redis by combining efficient .lua scripts and pipelining. +View the repository, see open issues, and contribute back [on GitHub](https://github.com/taskforcesh/bullmq)! + ### **Features** If you are new to Message Queues, you may wonder why they are needed after all. Queues can solve many different problems in an elegant way, from smoothing out processing peaks to creating robust communication channels between micro-services or offloading heavy work from one server to many smaller workers, and many other cases. Check the [Patterns](patterns/producer-consumer.md) section for getting some inspiration and information about best practices. From 3c5b01d16ee1442f5802a0fe4e7675c14f7a7f1f Mon Sep 17 00:00:00 2001 From: Jacob Rothstein Date: Fri, 6 Dec 2019 15:40:32 -0800 Subject: [PATCH 14/22] fix: change default QueueEvents lastEventId to $ --- src/classes/queue-events.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/classes/queue-events.ts b/src/classes/queue-events.ts index 653e81b538..9e0bab5b34 100644 --- a/src/classes/queue-events.ts +++ b/src/classes/queue-events.ts @@ -25,7 +25,7 @@ export class QueueEvents extends QueueBase { const opts: QueueEventsOptions = this.opts; const key = this.keys.events; - let id = opts.lastEventId || '0-0'; + let id = opts.lastEventId || '$'; while (!this.closing) { try { From fd190f4be792b03273481c8aaf73be5ca42663d1 Mon Sep 17 00:00:00 2001 From: Jacob Rothstein Date: Fri, 6 Dec 2019 15:49:32 -0800 Subject: [PATCH 15/22] fix: ensure QE ready before adding test events --- src/classes/compat.ts | 3 +-- src/test/test_compat.ts | 56 ++++++++++++++++++++--------------------- 2 files changed, 28 insertions(+), 31 deletions(-) diff --git a/src/classes/compat.ts b/src/classes/compat.ts index fed33bb84d..42f95d8759 100644 --- a/src/classes/compat.ts +++ b/src/classes/compat.ts @@ -42,11 +42,10 @@ export class Queue3 extends EventEmitter { * The name of the queue */ name: string; + queueEvents: QueueEvents; private opts: CommonOptions; - private readonly queue: Queue; - private queueEvents: QueueEvents; private worker: Worker; private queueScheduler: QueueScheduler; diff --git a/src/test/test_compat.ts b/src/test/test_compat.ts index 051179a7fc..7c1a9a8e9a 100644 --- a/src/test/test_compat.ts +++ b/src/test/test_compat.ts @@ -369,23 +369,16 @@ describe('Compat', function() { }); }); - it('should listen to global events', function(done) { - let state: string; - queue.on('global:waiting', function() { - expect(state).to.be.undefined; - state = 'waiting'; - }); - queue.once('global:active', function() { - expect(state).to.be.equal('waiting'); - state = 'active'; - }); - queue.once('global:completed', async function() { - expect(state).to.be.equal('active'); - done(); - }); - - queue.add('test', {}); - queue.process(async () => {}); + it('should listen to global events', async function() { + const events: string[] = []; + queue.once('global:waiting', () => events.push('waiting')); + queue.once('global:active', () => events.push('active')); + queue.once('global:completed', () => events.push('completed')); + await queue.queueEvents.waitUntilReady(); + await queue.add('test', {}); + await queue.process(() => null); + await delay(50); + expect(events).to.eql(['waiting', 'active', 'completed']); }); }); @@ -443,6 +436,17 @@ describe('Compat', function() { isResumed = true, first = true; + queue.on('global:paused', async () => { + isPaused = false; + await queue.resume(); + }); + + queue.on('global:resumed', () => { + isResumed = true; + }); + + await queue.queueEvents.waitUntilReady(); + const processPromise = new Promise((resolve, reject) => { process = async (job: Job) => { try { @@ -468,15 +472,6 @@ describe('Compat', function() { queue.add('test', { foo: 'paused' }); queue.add('test', { foo: 'paused' }); - queue.on('global:paused', async () => { - isPaused = false; - await queue.resume(); - }); - - queue.on('global:resumed', () => { - isResumed = true; - }); - return processPromise; }); @@ -619,9 +614,7 @@ describe('Compat', function() { it('pauses fast when queue is drained', async function() { await queue.process(async () => {}); - await queue.add('test', {}); - - return new Promise((resolve, reject) => { + const promise = new Promise((resolve, reject) => { queue.on('global:drained', async () => { try { const start = new Date().getTime(); @@ -635,6 +628,11 @@ describe('Compat', function() { } }); }); + + await queue.queueEvents.waitUntilReady(); + + await queue.add('test', {}); + return promise; }); }); }); From ea11087b292d9325105707b53f92ac61c334a147 Mon Sep 17 00:00:00 2001 From: Jacob Rothstein Date: Fri, 6 Dec 2019 18:25:58 -0800 Subject: [PATCH 16/22] fix: explicitly test the behavior of .on and .once --- src/test/test_compat.ts | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/src/test/test_compat.ts b/src/test/test_compat.ts index 7c1a9a8e9a..0adbcb4192 100644 --- a/src/test/test_compat.ts +++ b/src/test/test_compat.ts @@ -369,17 +369,38 @@ describe('Compat', function() { }); }); - it('should listen to global events', async function() { + it('should listen to global events with .once', async function() { const events: string[] = []; queue.once('global:waiting', () => events.push('waiting')); queue.once('global:active', () => events.push('active')); queue.once('global:completed', () => events.push('completed')); await queue.queueEvents.waitUntilReady(); await queue.add('test', {}); + await queue.add('test', {}); await queue.process(() => null); await delay(50); expect(events).to.eql(['waiting', 'active', 'completed']); }); + + it('should listen to global events with .on', async function() { + const events: string[] = []; + queue.on('global:waiting', () => events.push('waiting')); + queue.on('global:active', () => events.push('active')); + queue.on('global:completed', () => events.push('completed')); + await queue.queueEvents.waitUntilReady(); + await queue.add('test', {}); + await queue.add('test', {}); + await queue.process(() => null); + await delay(50); + expect(events).to.eql([ + 'waiting', + 'waiting', + 'active', + 'completed', + 'active', + 'completed', + ]); + }); }); describe('Pause', function() { From fd5e524d7435df6ad0c1c805b9ed56293fc39101 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Thu, 12 Dec 2019 19:56:21 +0000 Subject: [PATCH 17/22] chore(release): 1.6.0 [skip ci]nn# [1.6.0](https://github.com/taskforcesh/bullmq/compare/v1.5.0...v1.6.0) (2019-12-12) ### Features * add generic type to job data and return value ([87c0531](https://github.com/taskforcesh/bullmq/commit/87c0531efc2716db37f8a0886848cdb786709554)) --- CHANGELOG.md | 7 +++++++ package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e45faee30..fa2e64359b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# [1.6.0](https://github.com/taskforcesh/bullmq/compare/v1.5.0...v1.6.0) (2019-12-12) + + +### Features + +* add generic type to job data and return value ([87c0531](https://github.com/taskforcesh/bullmq/commit/87c0531efc2716db37f8a0886848cdb786709554)) + # [1.5.0](https://github.com/taskforcesh/bullmq/compare/v1.4.3...v1.5.0) (2019-11-22) diff --git a/package.json b/package.json index bf0b652375..49b3e221e3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bullmq", - "version": "1.5.0", + "version": "1.6.0", "description": "Queue for messages and jobs based on Redis", "main": "dist/index.js", "types": "dist/index.d.ts", From dd466b332b03b430108126531d59ff9e66ce9521 Mon Sep 17 00:00:00 2001 From: Marc-Antoine Fernandes Date: Fri, 13 Dec 2019 12:33:30 +0100 Subject: [PATCH 18/22] fix: check of existing redis instance --- src/classes/redis-connection.ts | 5 +++-- src/classes/worker.ts | 7 ++++--- src/utils.ts | 8 ++++++++ 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/classes/redis-connection.ts b/src/classes/redis-connection.ts index f786f9653d..7021126be4 100644 --- a/src/classes/redis-connection.ts +++ b/src/classes/redis-connection.ts @@ -3,6 +3,7 @@ import IORedis, { Redis } from 'ioredis'; import * as semver from 'semver'; import { load } from '../commands'; import { ConnectionOptions, RedisOptions } from '../interfaces'; +import { isRedisInstance } from '../utils'; export class RedisConnection extends EventEmitter { static minimumVersion = '5.0.0'; @@ -13,7 +14,7 @@ export class RedisConnection extends EventEmitter { constructor(private opts?: ConnectionOptions) { super(); - if (!(opts instanceof IORedis)) { + if (!isRedisInstance(opts)) { this.opts = { port: 6379, host: '127.0.0.1', @@ -23,7 +24,7 @@ export class RedisConnection extends EventEmitter { ...opts, }; } else { - this._client = opts; + this._client = opts; } this.initializing = this.init(); diff --git a/src/classes/worker.ts b/src/classes/worker.ts index 1b6185ca30..bff0405855 100644 --- a/src/classes/worker.ts +++ b/src/classes/worker.ts @@ -1,5 +1,5 @@ import fs from 'fs'; -import IORedis from 'ioredis'; +import { Redis } from 'ioredis'; import path from 'path'; import { Processor, WorkerOptions } from '../interfaces'; import { QueueBase, Repeat } from './'; @@ -10,6 +10,7 @@ import sandbox from './sandbox'; import { Scripts } from './scripts'; import uuid from 'uuid'; import { TimerManager } from './timer-manager'; +import { isRedisInstance } from '../utils'; // note: sandboxed processors would also like to define concurrency per process // for better resource utilization. @@ -51,8 +52,8 @@ export class Worker extends QueueBase { this.opts.lockRenewTime || this.opts.lockDuration / 2; this.blockingConnection = new RedisConnection( - opts instanceof IORedis - ? (opts.connection).duplicate() + isRedisInstance(opts.connection) + ? (opts.connection).duplicate() : opts.connection, ); this.blockingConnection.on('error', this.emit.bind(this)); diff --git a/src/utils.ts b/src/utils.ts index 4501b2fc29..63784905d0 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -32,3 +32,11 @@ export function delay(ms: number): Promise { setTimeout(() => resolve(), ms); }); } + +export function isRedisInstance(obj: any): boolean { + if (!obj) { + return false; + } + const redisApi = ['connect', 'disconnect', 'duplicate']; + return redisApi.every(name => typeof obj[name] === 'function'); +} From 4780be24fe8233f778fbb871bef2cafe9a0c37fe Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 13 Dec 2019 19:20:43 +0000 Subject: [PATCH 19/22] chore(deps): bump npm from 6.12.0 to 6.13.4 Bumps [npm](https://github.com/npm/cli) from 6.12.0 to 6.13.4. - [Release notes](https://github.com/npm/cli/releases) - [Changelog](https://github.com/npm/cli/blob/latest/CHANGELOG.md) - [Commits](https://github.com/npm/cli/compare/v6.12.0...v6.13.4) Signed-off-by: dependabot[bot] --- yarn.lock | 319 +++++++++++++++++++++++++++++++----------------------- 1 file changed, 186 insertions(+), 133 deletions(-) diff --git a/yarn.lock b/yarn.lock index cfdc5d0cbb..7d51cc97c0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -737,9 +737,9 @@ aws-sign2@~0.7.0: integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= aws4@^1.8.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f" - integrity sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ== + version "1.9.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.9.0.tgz#24390e6ad61386b0a747265754d2a17219de862c" + integrity sha512-Uvq6hVe90D0B2WEnUqtdgY1bATGz3mw33nH9Y+dmA+w5DHvUmBgkr5rM/KCHpCsiFNRUfokW/szpPPgMK2hm4A== babel-polyfill@6.26.0: version "6.26.0" @@ -782,21 +782,22 @@ before-after-hook@^2.0.0: resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.1.0.tgz#b6c03487f44e24200dd30ca5e6a1979c5d2fb635" integrity sha512-IWIbu7pMqyw3EAJHzzHbWa85b6oud/yfKYg5rqB5hNE8CeMi3nX+2C2sj0HswfblST86hpVEOAb9x34NZd6P7A== -bin-links@^1.1.2, bin-links@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/bin-links/-/bin-links-1.1.3.tgz#702fd59552703727313bc624bdbc4c0d3431c2ca" - integrity sha512-TEwmH4PHU/D009stP+fkkazMJgkBNCv60z01lQ/Mn8E6+ThHoD03svMnBVuCowwXo2nP2qKyKZxKxp58OHRzxw== +bin-links@^1.1.2, bin-links@^1.1.6: + version "1.1.6" + resolved "https://registry.yarnpkg.com/bin-links/-/bin-links-1.1.6.tgz#30d33e810829305e5e61b90cfcb9a3a4f65eb516" + integrity sha512-b5rV3uVyrlrJWLI3mawUUf5t2f9mCEQm/TqT5zNj6DPYhYDZaNp0AYaYd/CVASkSEklayNDLliZHVdo2J3niPw== dependencies: bluebird "^3.5.3" cmd-shim "^3.0.0" - gentle-fs "^2.0.1" + gentle-fs "^2.3.0" graceful-fs "^4.1.15" + npm-normalize-package-bin "^1.0.0" write-file-atomic "^2.3.0" bluebird@^3.5.1, bluebird@^3.5.3, bluebird@^3.5.5: - version "3.7.1" - resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.1.tgz#df70e302b471d7473489acf26a93d63b53f874de" - integrity sha512-DdmyoGCleJnkbp3nkbxTLJ18rjDsE4yCggEwKNXkeV123sPNfOCYeDoeuOY+F2FrSjO1YXcTU+dsy96KMy+gcg== + version "3.7.2" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" + integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== bottleneck@^2.18.1: version "2.19.5" @@ -989,7 +990,7 @@ check-error@^1.0.2: resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" integrity sha1-V00xLt2Iu13YkS6Sht1sCu1KrII= -chownr@^1.1.1, chownr@^1.1.2: +chownr@^1.1.1, chownr@^1.1.2, chownr@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.3.tgz#42d837d5239688d55f303003a508230fa6727142" integrity sha512-i70fVHhmV3DtTl6nqvZOnIjbY0Pe4kAUjwHj8z0zAdgBtYrJyYwLKCCuRBQ5ppkyL0AkN7HKRnETdmdp1zqNXw== @@ -1431,7 +1432,7 @@ debug@^4.0.0, debug@^4.1.0, debug@^4.1.1: dependencies: ms "^2.1.1" -debuglog@^1.0.1: +debuglog@*, debuglog@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492" integrity sha1-qiT/uaw9+aI1GDfPstJ5NgzXhJI= @@ -1660,26 +1661,27 @@ error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" -es-abstract@^1.5.1: - version "1.16.0" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.16.0.tgz#d3a26dc9c3283ac9750dca569586e976d9dcc06d" - integrity sha512-xdQnfykZ9JMEiasTAJZJdMWCQ1Vm00NBw79/AWi7ELfZuuPCSOMDZbT9mkOfSctVtfhb+sAAzrm+j//GjjLHLg== +es-abstract@^1.17.0-next.1: + version "1.17.0-next.1" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.17.0-next.1.tgz#94acc93e20b05a6e96dacb5ab2f1cb3a81fc2172" + integrity sha512-7MmGr03N7Rnuid6+wyhD9sHNE2n4tFSwExnU2lQl3lIo2ShXWGePY80zYaoMOmILWv57H0amMjZGHNzzGG70Rw== dependencies: - es-to-primitive "^1.2.0" + es-to-primitive "^1.2.1" function-bind "^1.1.1" has "^1.0.3" - has-symbols "^1.0.0" + has-symbols "^1.0.1" is-callable "^1.1.4" is-regex "^1.0.4" - object-inspect "^1.6.0" + object-inspect "^1.7.0" object-keys "^1.1.1" + object.assign "^4.1.0" string.prototype.trimleft "^2.1.0" string.prototype.trimright "^2.1.0" -es-to-primitive@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.0.tgz#edf72478033456e8dda8ef09e00ad9650707f377" - integrity sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg== +es-to-primitive@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" + integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== dependencies: is-callable "^1.1.4" is-date-object "^1.0.1" @@ -2033,13 +2035,14 @@ genfun@^5.0.0: resolved "https://registry.yarnpkg.com/genfun/-/genfun-5.0.0.tgz#9dd9710a06900a5c4a5bf57aca5da4e52fe76537" integrity sha512-KGDOARWVga7+rnB3z9Sd2Letx515owfk0hSxHGuqjANb1M+x2bGZGqHLiozPsYMdM2OubeMni/Hpwmjq6qIUhA== -gentle-fs@^2.0.1, gentle-fs@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/gentle-fs/-/gentle-fs-2.2.1.tgz#1f38df4b4ead685566257201fd526de401ebb215" - integrity sha512-e7dRgUM5fsS+7wm2oggZpgcRx6sEvJHXujPH5RzgQ1ziQY4+HuVBYsnUzJwJ+C7mjOJN27DjiFy1TaL+TNltow== +gentle-fs@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/gentle-fs/-/gentle-fs-2.3.0.tgz#13538db5029400f98684be4894e8a7d8f0d1ea7f" + integrity sha512-3k2CgAmPxuz7S6nKK+AqFE2AdM1QuwqKLPKzIET3VRwK++3q96MsNFobScDjlCrq97ZJ8y5R725MOlm6ffUCjg== dependencies: aproba "^1.1.2" chownr "^1.1.2" + cmd-shim "^3.0.3" fs-vacuum "^1.2.10" graceful-fs "^4.1.11" iferr "^0.1.5" @@ -2156,9 +2159,9 @@ glob@^5.0.15: path-is-absolute "^1.0.0" glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.3, glob@^7.1.4: - version "7.1.4" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255" - integrity sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A== + version "7.1.6" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" + integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" @@ -2210,10 +2213,10 @@ got@^6.7.1: unzip-response "^2.0.1" url-parse-lax "^1.0.0" -graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.3, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.2: - version "4.2.2" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.2.tgz#6f0952605d0140c1cfdb138ed005775b92d67b02" - integrity sha512-IItsdsea19BoLC7ELy13q1iJFNmd7ofZH5+X/pJr90/nRoPEX0DJo1dHDbgtYWOhJhcCgMDTOw84RZ72q6lB+Q== +graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.3, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.3.tgz#4a12ff1b60376ef09862c2093edd908328be8423" + integrity sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ== growl@1.10.5, "growl@~> 1.10.0": version "1.10.5" @@ -2259,10 +2262,10 @@ has-flag@^3.0.0: resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= -has-symbols@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.0.tgz#ba1a8f1af2a0fc39650f5c850367704122063b44" - integrity sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q= +has-symbols@^1.0.0, has-symbols@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.1.tgz#9f5214758a44196c406d9bd76cebf81ec2dd31e8" + integrity sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg== has-unicode@^2.0.0, has-unicode@~2.0.1: version "2.0.1" @@ -2332,10 +2335,10 @@ http-signature@~1.2.0: jsprim "^1.2.2" sshpk "^1.7.0" -https-proxy-agent@^2.2.1: - version "2.2.2" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.2.tgz#271ea8e90f836ac9f119daccd39c19ff7dfb0793" - integrity sha512-c8Ndjc9Bkpfx/vCJueCPy0jlP4ccCCSNDp8xwCZzPjKJUm+B+u9WX2x98Qx4n1PiMNTWo3D7KK5ifNV/yJyRzg== +https-proxy-agent@^2.2.3: + version "2.2.4" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz#4ee7a737abd92678a293d9b34a1af4d0d08c787b" + integrity sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg== dependencies: agent-base "^4.3.0" debug "^3.1.0" @@ -2429,7 +2432,7 @@ import-lazy@^2.1.0: resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-2.1.0.tgz#05698e3d45c88e8d7e9d92cb0584e77f096f3e43" integrity sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM= -imurmurhash@^0.1.4: +imurmurhash@*, imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= @@ -2519,7 +2522,7 @@ ip-regex@^2.1.0: resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-2.1.0.tgz#fa78bf5d2e6913c911ce9f819ee5146bb6d844e9" integrity sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk= -ip@^1.1.5: +ip@1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a" integrity sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo= @@ -2664,11 +2667,11 @@ is-stream@^2.0.0: integrity sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw== is-symbol@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.2.tgz#a055f6ae57192caee329e7a860118b497a950f38" - integrity sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw== + version "1.0.3" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.3.tgz#38e1014b9e6329be0de9d24a414fd7441ec61937" + integrity sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ== dependencies: - has-symbols "^1.0.0" + has-symbols "^1.0.1" is-text-path@^1.0.0: version "1.0.1" @@ -2921,7 +2924,7 @@ levn@~0.3.0: prelude-ls "~1.1.2" type-check "~0.3.2" -libcipm@^4.0.4: +libcipm@^4.0.7: version "4.0.7" resolved "https://registry.yarnpkg.com/libcipm/-/libcipm-4.0.7.tgz#76cd675c98bdaae64db88b782b01b804b6d02c8a" integrity sha512-fTq33otU3PNXxxCTCYCYe7V96o59v/o7bvtspmbORXpgFk+wcWrGf5x6tBgui5gCed/45/wtPomBsZBYm5KbIw== @@ -3108,6 +3111,11 @@ lockfile@^1.0.4: dependencies: signal-exit "^3.0.2" +lodash._baseindexof@*: + version "3.1.0" + resolved "https://registry.yarnpkg.com/lodash._baseindexof/-/lodash._baseindexof-3.1.0.tgz#fe52b53a1c6761e42618d654e4a25789ed61822c" + integrity sha1-/lK1OhxnYeQmGNZU5KJXie1hgiw= + lodash._baseuniq@~4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash._baseuniq/-/lodash._baseuniq-4.6.0.tgz#0ebb44e456814af7905c6212fa2c9b2d51b841e8" @@ -3116,11 +3124,33 @@ lodash._baseuniq@~4.6.0: lodash._createset "~4.0.0" lodash._root "~3.0.0" +lodash._bindcallback@*: + version "3.0.1" + resolved "https://registry.yarnpkg.com/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz#e531c27644cf8b57a99e17ed95b35c748789392e" + integrity sha1-5THCdkTPi1epnhftlbNcdIeJOS4= + +lodash._cacheindexof@*: + version "3.0.2" + resolved "https://registry.yarnpkg.com/lodash._cacheindexof/-/lodash._cacheindexof-3.0.2.tgz#3dc69ac82498d2ee5e3ce56091bafd2adc7bde92" + integrity sha1-PcaayCSY0u5ePOVgkbr9Ktx73pI= + +lodash._createcache@*: + version "3.1.2" + resolved "https://registry.yarnpkg.com/lodash._createcache/-/lodash._createcache-3.1.2.tgz#56d6a064017625e79ebca6b8018e17440bdcf093" + integrity sha1-VtagZAF2JeeevKa4AY4XRAvc8JM= + dependencies: + lodash._getnative "^3.0.0" + lodash._createset@~4.0.0: version "4.0.3" resolved "https://registry.yarnpkg.com/lodash._createset/-/lodash._createset-4.0.3.tgz#0f4659fbb09d75194fa9e2b88a6644d363c9fe26" integrity sha1-D0ZZ+7CddRlPqeK4imZE02PJ/iY= +lodash._getnative@*, lodash._getnative@^3.0.0: + version "3.9.1" + resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5" + integrity sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U= + lodash._reinterpolate@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" @@ -3181,6 +3211,11 @@ lodash.isstring@^4.0.1: resolved "https://registry.yarnpkg.com/lodash.isstring/-/lodash.isstring-4.0.1.tgz#d527dfb5456eca7cc9bb95d5daeaf88ba54a5451" integrity sha1-1SfftUVuynzJu5XV2ur4i6VKVFE= +lodash.restparam@*: + version "3.6.1" + resolved "https://registry.yarnpkg.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805" + integrity sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU= + lodash.set@^4.3.2: version "4.3.2" resolved "https://registry.yarnpkg.com/lodash.set/-/lodash.set-4.3.2.tgz#d8757b1da807dde24816b0d6a84bea1a76230b23" @@ -3312,15 +3347,15 @@ make-error@^1.1.1: integrity sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g== make-fetch-happen@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-5.0.0.tgz#a8e3fe41d3415dd656fe7b8e8172e1fb4458b38d" - integrity sha512-nFr/vpL1Jc60etMVKeaLOqfGjMMb3tAHFVJWxHOFCFS04Zmd7kGlMxo0l1tzfhoQje0/UPnd0X8OeGUiXXnfPA== + version "5.0.2" + resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-5.0.2.tgz#aa8387104f2687edca01c8687ee45013d02d19bd" + integrity sha512-07JHC0r1ykIoruKO8ifMXu+xEU8qOXDFETylktdug6vJDACnP+HKevOu3PXyNPzFyTSlz8vrBYlBO1JZRe8Cag== dependencies: agentkeepalive "^3.4.1" cacache "^12.0.0" http-cache-semantics "^3.8.1" http-proxy-agent "^2.1.0" - https-proxy-agent "^2.2.1" + https-proxy-agent "^2.2.3" lru-cache "^5.1.1" mississippi "^3.0.0" node-fetch-npm "^2.0.2" @@ -3431,17 +3466,17 @@ micromatch@^4.0.0, micromatch@^4.0.2: braces "^3.0.1" picomatch "^2.0.5" -mime-db@1.40.0: - version "1.40.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.40.0.tgz#a65057e998db090f732a68f6c276d387d4126c32" - integrity sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA== +mime-db@1.42.0: + version "1.42.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.42.0.tgz#3e252907b4c7adb906597b4b65636272cf9e7bac" + integrity sha512-UbfJCR4UAVRNgMpfImz05smAXK7+c+ZntjaA26ANtkXLlOe947Aag5zdIcKQULAiF9Cq4WxBi9jUs5zkA84bYQ== mime-types@^2.1.12, mime-types@~2.1.19: - version "2.1.24" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.24.tgz#b6f8d0b3e951efb77dedeca194cff6d16f676f81" - integrity sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ== + version "2.1.25" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.25.tgz#39772d46621f93e2a80a856c53b86a62156a6437" + integrity sha512-5KhStqB5xpTAeGqKBAMgwaYMnQik7teQN4IAzC7npDv6kzeU6prfkR67bc87J1kWMPGkoaZSq1npmexMgkmEVg== dependencies: - mime-db "1.40.0" + mime-db "1.42.0" mime@^2.4.3: version "2.4.4" @@ -3733,9 +3768,11 @@ npm-audit-report@^1.3.2: console-control-strings "^1.1.0" npm-bundled@^1.0.1: - version "1.0.6" - resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.6.tgz#e7ba9aadcef962bb61248f91721cd932b3fe6bdd" - integrity sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g== + version "1.1.1" + resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.1.1.tgz#1edd570865a94cdb1bc8220775e29466c9fb234b" + integrity sha512-gqkfgGePhTpAEgUsGEgcq1rqPXA+tv/aVBlgEzfXwA1yiUJF7xtEt3CtVwOjNYQOVknDk0F20w58Fnm3EtG0fA== + dependencies: + npm-normalize-package-bin "^1.0.1" npm-cache-filename@~1.0.2: version "1.0.2" @@ -3768,6 +3805,11 @@ npm-logical-tree@^1.2.1: resolved "https://registry.yarnpkg.com/npm-logical-tree/-/npm-logical-tree-1.2.1.tgz#44610141ca24664cad35d1e607176193fd8f5b88" integrity sha512-AJI/qxDB2PWI4LG1CYN579AY1vCiNyWfkiquCsJWqntRu/WwimVrC8yXeILBFHDwxfOejxewlmnvW9XXjMlYIg== +npm-normalize-package-bin@^1.0.0, npm-normalize-package-bin@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz#6e79a41f23fd235c0623218228da7d9c23b8f6e2" + integrity sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA== + "npm-package-arg@^4.0.0 || ^5.0.0 || ^6.0.0", npm-package-arg@^6.0.0, npm-package-arg@^6.1.0, npm-package-arg@^6.1.1: version "6.1.1" resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-6.1.1.tgz#02168cb0a49a2b75bf988a28698de7b529df5cb7" @@ -3778,10 +3820,10 @@ npm-logical-tree@^1.2.1: semver "^5.6.0" validate-npm-package-name "^3.0.0" -npm-packlist@^1.1.12, npm-packlist@^1.4.4: - version "1.4.6" - resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.6.tgz#53ba3ed11f8523079f1457376dd379ee4ea42ff4" - integrity sha512-u65uQdb+qwtGvEJh/DgQgW1Xg7sqeNbmxYyrvlNznaVTjV3E5P6F/EFjM+BVHXl7JJlsdG8A64M0XI8FI/IOlg== +npm-packlist@^1.1.12, npm-packlist@^1.4.7: + version "1.4.7" + resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.7.tgz#9e954365a06b80b18111ea900945af4f88ed4848" + integrity sha512-vAj7dIkp5NhieaGZxBJB8fF4R0078rqsmhJcAfXZ6O7JJhjhPK96n5Ry1oZcfLXgfun0GWTZPOxaEyqv8GBykQ== dependencies: ignore-walk "^3.0.1" npm-bundled "^1.0.1" @@ -3804,7 +3846,7 @@ npm-profile@^4.0.2: figgy-pudding "^3.4.1" npm-registry-fetch "^4.0.0" -npm-registry-fetch@^4.0.0: +npm-registry-fetch@^4.0.0, npm-registry-fetch@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/npm-registry-fetch/-/npm-registry-fetch-4.0.2.tgz#2b1434f93ccbe6b6385f8e45f45db93e16921d7a" integrity sha512-Z0IFtPEozNdeZRPh3aHHxdG+ZRpzcbQaJLthsm3VhNf6DScicTFRHZzK82u8RsJUsUHkX+QH/zcB/5pmd20H4A== @@ -3837,9 +3879,9 @@ npm-user-validate@~1.0.0: integrity sha1-jOyg9c6gTU6TUZ73LQVXp1Ei6VE= npm@^6.10.3: - version "6.12.0" - resolved "https://registry.yarnpkg.com/npm/-/npm-6.12.0.tgz#255e6fbb514be15c6595f9cbc5bc248e251e1476" - integrity sha512-juj5VkB3/k+PWbJUnXD7A/8oc8zLusDnK/sV9PybSalsbOVOTIp5vSE0rz5rQ7BsmUgQS47f/L2GYQnWXaKgnQ== + version "6.13.4" + resolved "https://registry.yarnpkg.com/npm/-/npm-6.13.4.tgz#1e95b0f311999cf682384c38865dfeb3127203bb" + integrity sha512-vTcUL4SCg3AzwInWTbqg1OIaOXlzKSS8Mb8kc5avwrJpcvevDA5J9BhYSuei+fNs3pwOp4lzA5x2FVDXACvoXA== dependencies: JSONStream "^1.3.5" abbrev "~1.1.1" @@ -3847,18 +3889,19 @@ npm@^6.10.3: ansistyles "~0.1.3" aproba "^2.0.0" archy "~1.0.0" - bin-links "^1.1.3" + bin-links "^1.1.6" bluebird "^3.5.5" byte-size "^5.0.1" cacache "^12.0.3" call-limit "^1.1.1" - chownr "^1.1.2" + chownr "^1.1.3" ci-info "^2.0.0" cli-columns "^3.1.2" cli-table3 "^0.5.1" cmd-shim "^3.0.3" columnify "~1.5.4" config-chain "^1.1.12" + debuglog "*" detect-indent "~5.0.0" detect-newline "^2.1.0" dezalgo "~1.0.3" @@ -3867,12 +3910,13 @@ npm@^6.10.3: find-npm-prefix "^1.0.2" fs-vacuum "~1.2.10" fs-write-stream-atomic "~1.0.10" - gentle-fs "^2.2.1" + gentle-fs "^2.3.0" glob "^7.1.4" - graceful-fs "^4.2.2" + graceful-fs "^4.2.3" has-unicode "~2.0.1" hosted-git-info "^2.8.5" iferr "^1.0.2" + imurmurhash "*" infer-owner "^1.0.4" inflight "~1.0.6" inherits "^2.0.4" @@ -3881,7 +3925,7 @@ npm@^6.10.3: is-cidr "^3.0.0" json-parse-better-errors "^1.0.2" lazy-property "~1.0.0" - libcipm "^4.0.4" + libcipm "^4.0.7" libnpm "^3.0.1" libnpmaccess "^3.0.2" libnpmhook "^5.0.3" @@ -3891,8 +3935,14 @@ npm@^6.10.3: libnpx "^10.2.0" lock-verify "^2.1.0" lockfile "^1.0.4" + lodash._baseindexof "*" lodash._baseuniq "~4.6.0" + lodash._bindcallback "*" + lodash._cacheindexof "*" + lodash._createcache "*" + lodash._getnative "*" lodash.clonedeep "~4.5.0" + lodash.restparam "*" lodash.union "~4.6.0" lodash.uniq "~4.5.0" lodash.without "~4.4.0" @@ -3909,25 +3959,25 @@ npm@^6.10.3: npm-install-checks "^3.0.2" npm-lifecycle "^3.1.4" npm-package-arg "^6.1.1" - npm-packlist "^1.4.4" + npm-packlist "^1.4.7" npm-pick-manifest "^3.0.2" npm-profile "^4.0.2" - npm-registry-fetch "^4.0.0" + npm-registry-fetch "^4.0.2" npm-user-validate "~1.0.0" npmlog "~4.1.2" once "~1.4.0" opener "^1.5.1" osenv "^0.1.5" - pacote "^9.5.8" + pacote "^9.5.11" path-is-inside "~1.0.2" promise-inflight "~1.0.1" qrcode-terminal "^0.12.0" query-string "^6.8.2" qw "~1.0.1" read "~1.0.7" - read-cmd-shim "^1.0.4" + read-cmd-shim "^1.0.5" read-installed "~4.0.3" - read-package-json "^2.1.0" + read-package-json "^2.1.1" read-package-tree "^5.3.1" readable-stream "^3.4.0" readdir-scoped-modules "^1.1.0" @@ -3942,7 +3992,7 @@ npm@^6.10.3: sorted-union-stream "~2.1.3" ssri "^6.0.1" stringify-package "^1.0.1" - tar "^4.4.12" + tar "^4.4.13" text-table "~0.2.0" tiny-relative-date "^1.3.0" uid-number "0.0.6" @@ -3950,7 +4000,7 @@ npm@^6.10.3: unique-filename "^1.1.1" unpipe "~1.0.0" update-notifier "^2.5.0" - uuid "^3.3.2" + uuid "^3.3.3" validate-npm-package-license "^3.0.4" validate-npm-package-name "~3.0.0" which "^1.3.1" @@ -4013,17 +4063,17 @@ object-assign@^4.1.0: resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= -object-inspect@^1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.6.0.tgz#c70b6cbf72f274aab4c34c0c82f5167bf82cf15b" - integrity sha512-GJzfBZ6DgDAmnuaM3104jR4s1Myxr3Y3zfIyN4z3UdqN69oSRacNK8UhnobDdC+7J2AHCjGwxQubNJfE70SXXQ== +object-inspect@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.7.0.tgz#f4f6bd181ad77f006b5ece60bd0b6f398ff74a67" + integrity sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw== object-keys@^1.0.11, object-keys@^1.0.12, object-keys@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== -object.assign@4.1.0: +object.assign@4.1.0, object.assign@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w== @@ -4034,12 +4084,12 @@ object.assign@4.1.0: object-keys "^1.0.11" object.getownpropertydescriptors@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz#8758c846f5b407adab0f236e0986f14b051caa16" - integrity sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY= + version "2.1.0" + resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz#369bf1f9592d8ab89d712dced5cb81c7c5352649" + integrity sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg== dependencies: - define-properties "^1.1.2" - es-abstract "^1.5.1" + define-properties "^1.1.3" + es-abstract "^1.17.0-next.1" octokit-pagination-methods@^1.1.0: version "1.1.0" @@ -4245,10 +4295,10 @@ package-json@^4.0.0: registry-url "^3.0.3" semver "^5.1.0" -pacote@^9.1.0, pacote@^9.5.3, pacote@^9.5.8: - version "9.5.8" - resolved "https://registry.yarnpkg.com/pacote/-/pacote-9.5.8.tgz#23480efdc4fa74515855c9ecf39cf64078f99786" - integrity sha512-0Tl8Oi/K0Lo4MZmH0/6IsT3gpGf9eEAznLXEQPKgPq7FscnbUOyopnVpwXlnQdIbCUaojWy1Wd7VMyqfVsRrIw== +pacote@^9.1.0, pacote@^9.5.11, pacote@^9.5.3: + version "9.5.11" + resolved "https://registry.yarnpkg.com/pacote/-/pacote-9.5.11.tgz#524152077cb392c47b1fbe198aa28f778bef7ee1" + integrity sha512-DMDPvFKCjCg6zMS4IfzZyvT57O/bX8XGG00eEoy4K/S4Wj+qiN8KbnmKpsTvfS6OL9r5TAicxMKWbj1yV2Yh4g== dependencies: bluebird "^3.5.3" cacache "^12.0.2" @@ -4264,6 +4314,7 @@ pacote@^9.1.0, pacote@^9.5.3, pacote@^9.5.8: mississippi "^3.0.0" mkdirp "^0.5.1" normalize-package-data "^2.4.0" + npm-normalize-package-bin "^1.0.0" npm-package-arg "^6.1.0" npm-packlist "^1.1.12" npm-pick-manifest "^3.0.0" @@ -4490,9 +4541,9 @@ pseudomap@^1.0.2: integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM= psl@^1.1.24: - version "1.4.0" - resolved "https://registry.yarnpkg.com/psl/-/psl-1.4.0.tgz#5dd26156cdb69fa1fdb8ab1991667d3f80ced7c2" - integrity sha512-HZzqCGPecFLyoRj5HLfuDSKYTJkAfB5thKBIkRHtGjWwY7p1dAyveIbXIq4tO0KYfDF2tHqPUgY9SDnGm00uFw== + version "1.6.0" + resolved "https://registry.yarnpkg.com/psl/-/psl-1.6.0.tgz#60557582ee23b6c43719d9890fb4170ecd91e110" + integrity sha512-SYKKmVel98NCOYXpkwUqZqh0ahZeeKfmisiLIcEZdsb+WbLv02g/dI5BUmZnIyOe7RzZtLax81nnb2HbvC2tzA== pump@^2.0.0: version "2.0.1" @@ -4545,9 +4596,9 @@ qs@~6.5.2: integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== query-string@^6.8.2: - version "6.8.3" - resolved "https://registry.yarnpkg.com/query-string/-/query-string-6.8.3.tgz#fd9fb7ffb068b79062b43383685611ee47777d4b" - integrity sha512-llcxWccnyaWlODe7A9hRjkvdCKamEKTh+wH8ITdTc3OhchaqUZteiSCX/2ablWHVrkVIe04dntnaZJ7BdyW0lQ== + version "6.9.0" + resolved "https://registry.yarnpkg.com/query-string/-/query-string-6.9.0.tgz#1c3b727c370cf00f177c99f328fda2108f8fa3dd" + integrity sha512-KG4bhCFYapExLsUHrFt+kQVEegF2agm4cpF/VNc6pZVthIfCc/GK8t8VyNIE3nyXG9DK3Tf2EGkxjR6/uRdYsA== dependencies: decode-uri-component "^0.2.0" split-on-first "^1.0.0" @@ -4573,10 +4624,10 @@ rc@^1.0.1, rc@^1.1.6, rc@^1.2.8: minimist "^1.2.0" strip-json-comments "~2.0.1" -read-cmd-shim@^1.0.1, read-cmd-shim@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/read-cmd-shim/-/read-cmd-shim-1.0.4.tgz#b4a53d43376211b45243f0072b6e603a8e37640d" - integrity sha512-Pqpl3qJ/QdOIjRYA0q5DND/gLvGOfpIz/fYVDGYpOXfW/lFrIttmLsBnd6IkyK10+JHU9zhsaudfvrQTBB9YFQ== +read-cmd-shim@^1.0.1, read-cmd-shim@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/read-cmd-shim/-/read-cmd-shim-1.0.5.tgz#87e43eba50098ba5a32d0ceb583ab8e43b961c16" + integrity sha512-v5yCqQ/7okKoZZkBQUAfTsQ3sVJtXdNfbPnI5cceppoxEVLYA3k+VtV2omkeo8MS94JCy4fSiUwlRBAwCVRPUA== dependencies: graceful-fs "^4.1.2" @@ -4594,15 +4645,15 @@ read-installed@~4.0.3: optionalDependencies: graceful-fs "^4.1.2" -"read-package-json@1 || 2", read-package-json@^2.0.0, read-package-json@^2.0.13, read-package-json@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/read-package-json/-/read-package-json-2.1.0.tgz#e3d42e6c35ea5ae820d9a03ab0c7291217fc51d5" - integrity sha512-KLhu8M1ZZNkMcrq1+0UJbR8Dii8KZUqB0Sha4mOx/bknfKI/fyrQVrG/YIt2UOtG667sD8+ee4EXMM91W9dC+A== +"read-package-json@1 || 2", read-package-json@^2.0.0, read-package-json@^2.0.13, read-package-json@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/read-package-json/-/read-package-json-2.1.1.tgz#16aa66c59e7d4dad6288f179dd9295fd59bb98f1" + integrity sha512-dAiqGtVc/q5doFz6096CcnXhpYk0ZN8dEKVkGLU0CsASt8SrgF6SF7OTKAYubfvFhWaqofl+Y8HK19GR8jwW+A== dependencies: glob "^7.1.1" json-parse-better-errors "^1.0.1" normalize-package-data "^2.0.0" - slash "^1.0.0" + npm-normalize-package-bin "^1.0.0" optionalDependencies: graceful-fs "^4.1.2" @@ -4874,13 +4925,20 @@ resolve@1.1.x: resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs= -resolve@^1.1.6, resolve@^1.10.0, resolve@^1.3.2: +resolve@^1.1.6, resolve@^1.3.2: version "1.12.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.12.0.tgz#3fc644a35c84a48554609ff26ec52b66fa577df6" integrity sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w== dependencies: path-parse "^1.0.6" +resolve@^1.10.0: + version "1.13.1" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.13.1.tgz#be0aa4c06acd53083505abb35f4d66932ab35d16" + integrity sha512-CxqObCX8K8YtAhOBRg+lrcdn+LK+WYOS8tSjqSFbjtrI5PnS63QPhZl4+yKfrU9tdsbMu9Anr/amegT87M9Z6w== + dependencies: + path-parse "^1.0.6" + retry@^0.10.0: version "0.10.1" resolved "https://registry.yarnpkg.com/retry/-/retry-0.10.1.tgz#e76388d217992c252750241d3d3956fed98d8ff4" @@ -5076,11 +5134,6 @@ sinon@^7.2.2: nise "^1.5.2" supports-color "^5.5.0" -slash@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" - integrity sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU= - slash@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" @@ -5091,10 +5144,10 @@ slide@^1.1.6, slide@~1.1.3, slide@~1.1.6: resolved "https://registry.yarnpkg.com/slide/-/slide-1.1.6.tgz#56eb027d65b4d2dce6cb2e2d32c4d4afc9e1d707" integrity sha1-VusCfWW00tzmyy4tMsTUr8nh1wc= -smart-buffer@4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.0.2.tgz#5207858c3815cc69110703c6b94e46c15634395d" - integrity sha512-JDhEpTKzXusOqXZ0BUIdH+CjFdO/CR3tLlf5CN34IypI+xMmXW1uB16OOY8z3cICbJlDAVJzNbwBhNO0wt9OAw== +smart-buffer@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.1.0.tgz#91605c25d91652f4661ea69ccf45f1b331ca21ba" + integrity sha512-iVICrxOzCynf/SNaBQCw34eM9jROU/s5rzIhpOvzhzuYHfJR/DhZfDkXiZSgKXfgv26HT3Yni3AV/DGw0cGnnw== socks-proxy-agent@^4.0.0: version "4.0.2" @@ -5105,12 +5158,12 @@ socks-proxy-agent@^4.0.0: socks "~2.3.2" socks@~2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/socks/-/socks-2.3.2.tgz#ade388e9e6d87fdb11649c15746c578922a5883e" - integrity sha512-pCpjxQgOByDHLlNqlnh/mNSAxIUkyBBuwwhTcV+enZGbDaClPvHdvm6uvOwZfFJkam7cGhBNbb4JxiP8UZkRvQ== + version "2.3.3" + resolved "https://registry.yarnpkg.com/socks/-/socks-2.3.3.tgz#01129f0a5d534d2b897712ed8aceab7ee65d78e3" + integrity sha512-o5t52PCNtVdiOvzMry7wU4aOqYWL0PeCXRWBEiJow4/i/wr+wpsJQ9awEu1EonLIqsfGd5qSgDdxEOvCdmBEpA== dependencies: - ip "^1.1.5" - smart-buffer "4.0.2" + ip "1.1.5" + smart-buffer "^4.1.0" sorted-object@~2.0.1: version "2.0.1" @@ -5276,9 +5329,9 @@ stream-iterate@^1.1.0: stream-shift "^1.0.0" stream-shift@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.0.tgz#d5c752825e5367e786f78e18e445ea223a155952" - integrity sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI= + version "1.0.1" + resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.1.tgz#d7088281559ab2778424279b0877da3c392d5a3d" + integrity sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ== strict-uri-encode@^2.0.0: version "2.0.0" @@ -5433,7 +5486,7 @@ supports-hyperlinks@^1.0.1: has-flag "^2.0.0" supports-color "^5.0.0" -tar@^4.4.10, tar@^4.4.12: +tar@^4.4.10, tar@^4.4.12, tar@^4.4.13: version "4.4.13" resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.13.tgz#43b364bc52888d555298637b10d60790254ab525" integrity sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA== From 307bb695b98ea6094f1e2361d9019d298773c724 Mon Sep 17 00:00:00 2001 From: Eric Carboni Date: Mon, 16 Dec 2019 13:07:06 -0500 Subject: [PATCH 20/22] docs: fix typo --- docs/gitbook/guide/jobs/fifo.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/gitbook/guide/jobs/fifo.md b/docs/gitbook/guide/jobs/fifo.md index e0e08a70ef..cf7b4b933c 100644 --- a/docs/gitbook/guide/jobs/fifo.md +++ b/docs/gitbook/guide/jobs/fifo.md @@ -4,7 +4,7 @@ description: 'First-In, First-Out' # FIFO -The first type of jobs we are going to describe is the FIFO \(First-In, First-Out\) type. This is the standard type when adding jobs to a queue. The jobs are processed in the order they are inserted into the queue. This order is preserved independently onn the amount of processors you have, however if you have more than one worker or concurrency larger than 1, even though the workers will start the jobs in order, they may be completed in a slightly different order, since some jobs may take more time to complete than others. +The first type of jobs we are going to describe is the FIFO \(First-In, First-Out\) type. This is the standard type when adding jobs to a queue. The jobs are processed in the order they are inserted into the queue. This order is preserved independently on the amount of processors you have, however if you have more than one worker or concurrency larger than 1, even though the workers will start the jobs in order, they may be completed in a slightly different order, since some jobs may take more time to complete than others. From 5410d23b2cf7d19bf14c4c089874b9630237fa42 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Mon, 16 Dec 2019 22:14:25 +0000 Subject: [PATCH 21/22] chore(release): 1.6.1 [skip ci]nn## [1.6.1](https://github.com/taskforcesh/bullmq/compare/v1.6.0...v1.6.1) (2019-12-16) ### Bug Fixes * check of existing redis instance ([dd466b3](https://github.com/taskforcesh/bullmq/commit/dd466b332b03b430108126531d59ff9e66ce9521)) --- CHANGELOG.md | 7 +++++++ package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fa2e64359b..0677d553d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [1.6.1](https://github.com/taskforcesh/bullmq/compare/v1.6.0...v1.6.1) (2019-12-16) + + +### Bug Fixes + +* check of existing redis instance ([dd466b3](https://github.com/taskforcesh/bullmq/commit/dd466b332b03b430108126531d59ff9e66ce9521)) + # [1.6.0](https://github.com/taskforcesh/bullmq/compare/v1.5.0...v1.6.0) (2019-12-12) diff --git a/package.json b/package.json index 49b3e221e3..7bf8d907ab 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bullmq", - "version": "1.6.0", + "version": "1.6.1", "description": "Queue for messages and jobs based on Redis", "main": "dist/index.js", "types": "dist/index.d.ts", From 9b4042da2977178d007cb4f07686be897172792b Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Mon, 16 Dec 2019 22:32:02 +0000 Subject: [PATCH 22/22] chore(release): 1.6.2 [skip ci]nn## [1.6.2](https://github.com/taskforcesh/bullmq/compare/v1.6.1...v1.6.2) (2019-12-16) ### Bug Fixes * change default QueueEvents lastEventId to $ ([3c5b01d](https://github.com/taskforcesh/bullmq/commit/3c5b01d16ee1442f5802a0fe4e7675c14f7a7f1f)) * ensure QE ready before adding test events ([fd190f4](https://github.com/taskforcesh/bullmq/commit/fd190f4be792b03273481c8aaf73be5ca42663d1)) * explicitly test the behavior of .on and .once ([ea11087](https://github.com/taskforcesh/bullmq/commit/ea11087b292d9325105707b53f92ac61c334a147)) --- CHANGELOG.md | 9 +++++++++ package.json | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0677d553d3..7298456204 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +## [1.6.2](https://github.com/taskforcesh/bullmq/compare/v1.6.1...v1.6.2) (2019-12-16) + + +### Bug Fixes + +* change default QueueEvents lastEventId to $ ([3c5b01d](https://github.com/taskforcesh/bullmq/commit/3c5b01d16ee1442f5802a0fe4e7675c14f7a7f1f)) +* ensure QE ready before adding test events ([fd190f4](https://github.com/taskforcesh/bullmq/commit/fd190f4be792b03273481c8aaf73be5ca42663d1)) +* explicitly test the behavior of .on and .once ([ea11087](https://github.com/taskforcesh/bullmq/commit/ea11087b292d9325105707b53f92ac61c334a147)) + ## [1.6.1](https://github.com/taskforcesh/bullmq/compare/v1.6.0...v1.6.1) (2019-12-16) diff --git a/package.json b/package.json index 7bf8d907ab..1ca85d85ec 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bullmq", - "version": "1.6.1", + "version": "1.6.2", "description": "Queue for messages and jobs based on Redis", "main": "dist/index.js", "types": "dist/index.d.ts",