bullmq 6.4.2 → 6.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/dist/cjs/classes/bun-redis-client.js +6 -6
  2. package/dist/cjs/classes/child-pool.js +1 -1
  3. package/dist/cjs/classes/child.js +8 -8
  4. package/dist/cjs/classes/flow-producer.js +2 -2
  5. package/dist/cjs/classes/job.js +2 -2
  6. package/dist/cjs/classes/main-worker.js +2 -2
  7. package/dist/cjs/classes/node-redis-client.js +6 -6
  8. package/dist/cjs/classes/queue-base.js +2 -2
  9. package/dist/cjs/classes/redis-connection.js +2 -2
  10. package/dist/cjs/classes/redis-queue-backend.js +2 -2
  11. package/dist/cjs/classes/redis-relay-backend.js +2 -2
  12. package/dist/cjs/classes/relay.js +8 -8
  13. package/dist/cjs/classes/valkey-glide-client.js +6 -6
  14. package/dist/cjs/classes/worker.js +4 -4
  15. package/dist/cjs/postgres/postgres-connection.js +2 -2
  16. package/dist/cjs/postgres/postgres-queue-backend.js +2 -2
  17. package/dist/cjs/postgres/postgres-relay-backend.js +4 -4
  18. package/dist/cjs/tsconfig-cjs.tsbuildinfo +1 -1
  19. package/dist/cjs/utils/index.js +2 -2
  20. package/dist/cjs/version.js +1 -1
  21. package/dist/esm/classes/bun-redis-client.js +3 -3
  22. package/dist/esm/classes/child-pool.js +1 -1
  23. package/dist/esm/classes/child.d.ts +3 -3
  24. package/dist/esm/classes/child.js +4 -4
  25. package/dist/esm/classes/flow-producer.d.ts +1 -1
  26. package/dist/esm/classes/flow-producer.js +1 -1
  27. package/dist/esm/classes/job.js +1 -1
  28. package/dist/esm/classes/main-worker.js +1 -1
  29. package/dist/esm/classes/node-redis-client.js +3 -3
  30. package/dist/esm/classes/queue-base.d.ts +1 -1
  31. package/dist/esm/classes/queue-base.js +1 -1
  32. package/dist/esm/classes/redis-connection.d.ts +1 -1
  33. package/dist/esm/classes/redis-connection.js +1 -1
  34. package/dist/esm/classes/redis-queue-backend.d.ts +1 -1
  35. package/dist/esm/classes/redis-queue-backend.js +1 -1
  36. package/dist/esm/classes/redis-relay-backend.d.ts +1 -1
  37. package/dist/esm/classes/redis-relay-backend.js +1 -1
  38. package/dist/esm/classes/relay.d.ts +1 -1
  39. package/dist/esm/classes/relay.js +3 -3
  40. package/dist/esm/classes/valkey-glide-client.js +3 -3
  41. package/dist/esm/classes/worker.d.ts +1 -1
  42. package/dist/esm/classes/worker.js +3 -3
  43. package/dist/esm/interfaces/connection.d.ts +1 -1
  44. package/dist/esm/interfaces/redis-client.d.ts +1 -1
  45. package/dist/esm/interfaces/sandboxed-options.d.ts +2 -2
  46. package/dist/esm/postgres/postgres-connection.d.ts +1 -1
  47. package/dist/esm/postgres/postgres-connection.js +1 -1
  48. package/dist/esm/postgres/postgres-queue-backend.d.ts +1 -1
  49. package/dist/esm/postgres/postgres-queue-backend.js +1 -1
  50. package/dist/esm/postgres/postgres-relay-backend.d.ts +1 -1
  51. package/dist/esm/postgres/postgres-relay-backend.js +2 -2
  52. package/dist/esm/tsconfig.tsbuildinfo +1 -1
  53. package/dist/esm/utils/index.d.ts +2 -2
  54. package/dist/esm/utils/index.js +1 -1
  55. package/dist/esm/version.d.ts +1 -1
  56. package/dist/esm/version.js +1 -1
  57. package/package.json +4 -4
@@ -2,6 +2,6 @@
2
2
  * Worker Thread wrapper for sandboxing
3
3
  *
4
4
  */
5
- import { parentPort } from 'worker_threads';
5
+ import { parentPort } from 'node:worker_threads';
6
6
  import mainBase from './main-base';
7
7
  mainBase(async (msg) => parentPort.postMessage(msg), parentPort);
@@ -1,7 +1,7 @@
1
1
  import { __asyncValues } from "tslib";
2
- import { createHash } from 'crypto';
3
- import { EventEmitter } from 'events';
4
- import { Readable } from 'stream';
2
+ import { createHash } from 'node:crypto';
3
+ import { EventEmitter } from 'node:events';
4
+ import { Readable } from 'node:stream';
5
5
  import { ConnectionClosedError } from './errors/connection-closed-error';
6
6
  function normalizeScriptArgs(args) {
7
7
  return args.length === 1 && Array.isArray(args[0]) ? args[0] : args;
@@ -1,4 +1,4 @@
1
- import { EventEmitter } from 'events';
1
+ import { EventEmitter } from 'node:events';
2
2
  import { BackendFactory, ConnectionOptions, IQueueBackend, MinimalQueue, QueueBaseOptions, Span } from '../interfaces';
3
3
  import type { DefaultQueueOptions } from '../types/default-queue-options';
4
4
  import { Job } from './job';
@@ -1,4 +1,4 @@
1
- import { EventEmitter } from 'events';
1
+ import { EventEmitter } from 'node:events';
2
2
  import { delay, DELAY_TIME_5, isNotConnectionError, trace } from '../utils';
3
3
  import { getDefaultBackendFactory } from '../utils/create-backend';
4
4
  import { Job } from './job';
@@ -1,4 +1,4 @@
1
- import { EventEmitter } from 'events';
1
+ import { EventEmitter } from 'node:events';
2
2
  import { ConnectionOptions, RedisOptions, RedisClient } from '../interfaces';
3
3
  import { IRedisClient } from '../interfaces/redis-client';
4
4
  import { DatabaseType } from '../types';
@@ -1,5 +1,5 @@
1
1
  import { __rest } from "tslib";
2
- import { EventEmitter } from 'events';
2
+ import { EventEmitter } from 'node:events';
3
3
  import { decreaseMaxListeners, increaseMaxListeners, isNotConnectionError, isRedisCluster, isRedisInstance, isRedisVersionLowerThan, } from '../utils';
4
4
  import { version as packageVersion } from '../version';
5
5
  import * as scripts from '../scripts';
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Includes all the scripts needed by the queue and jobs.
3
3
  */
4
- import { EventEmitter } from 'events';
4
+ import { EventEmitter } from 'node:events';
5
5
  import { DependenciesOpts, IQueueBackend, JobJson, MinimalJob, MoveToWaitingChildrenOpts, ParentKeyOpts, RedisClient, MoveToDelayedOpts, RepeatableOptions, RetryJobOpts, RetryOptions, ScriptQueueContext, StreamReadRaw } from '../interfaces';
6
6
  import { JobsOptions, JobState, JobType, FinishedStatus, FinishedPropValAttribute, KeepJobs, JobProgress } from '../types';
7
7
  import { IRedisTransaction } from '../interfaces';
@@ -2,7 +2,7 @@
2
2
  * Includes all the scripts needed by the queue and jobs.
3
3
  */
4
4
  'use strict';
5
- import { EventEmitter } from 'events';
5
+ import { EventEmitter } from 'node:events';
6
6
  import { Packr } from 'msgpackr';
7
7
  const packer = new Packr({
8
8
  useRecords: false,
@@ -1,4 +1,4 @@
1
- import { EventEmitter } from 'events';
1
+ import { EventEmitter } from 'node:events';
2
2
  import { ConnectionOptions, IRelayBackend, RelayBackendOptions, RelayCounts, RelayInboxBatch, RelayNodeConnection, RelayNodeInfo, RelayNodeState, RelayPatternState, RelayPublishOptions, RelayPublishResult, RelayRetainedState, RelaySubscribeResult, RelaySubscriptionFilter, RelaySubscriptionState } from '../interfaces';
3
3
  /** Minimum Redis version for the relay (queues still run on 5.0). */
4
4
  export declare const RELAY_MINIMUM_REDIS_VERSION = "6.2.0";
@@ -1,4 +1,4 @@
1
- import { EventEmitter } from 'events';
1
+ import { EventEmitter } from 'node:events';
2
2
  import { isRedisInstance, isRedisVersionLowerThan } from '../utils';
3
3
  import { RedisConnection } from './redis-connection';
4
4
  import { checkRelayResult } from './relay-errors';
@@ -1,4 +1,4 @@
1
- import { EventEmitter } from 'events';
1
+ import { EventEmitter } from 'node:events';
2
2
  import { ConnectionOptions, RelayBackendFactory, RelayCounts, RelayNodeConnection, RelayNodeState, RelayPatternState, RelayPublishResult, RelayRetainedState, RelaySubscriptionFilter, RelaySubscriptionState } from '../interfaces';
3
3
  export interface RelayOptions<C = ConnectionOptions> {
4
4
  /** Connection to the datastore (Redis by default, see `backend`). */
@@ -1,6 +1,6 @@
1
- import { EventEmitter } from 'events';
2
- import { randomUUID } from 'crypto';
3
- import { hostname } from 'os';
1
+ import { EventEmitter } from 'node:events';
2
+ import { randomUUID } from 'node:crypto';
3
+ import { hostname } from 'node:os';
4
4
  import { createRedisRelayBackend } from './redis-relay-backend';
5
5
  import { version as packageVersion } from '../version';
6
6
  const ID_RE = /^[A-Za-z0-9_-]{1,64}$/;
@@ -1,6 +1,6 @@
1
- import { createHash } from 'crypto';
2
- import { EventEmitter } from 'events';
3
- import { Readable } from 'stream';
1
+ import { createHash } from 'node:crypto';
2
+ import { EventEmitter } from 'node:events';
3
+ import { Readable } from 'node:stream';
4
4
  import { ConnectionClosedError } from './errors/connection-closed-error';
5
5
  const GLIDE_STRING_DECODER = 1;
6
6
  function createCompatibilityBatch() {
@@ -1,4 +1,4 @@
1
- import { URL } from 'url';
1
+ import { URL } from 'node:url';
2
2
  import { AbortController } from './abort-controller';
3
3
  import { BackendFactory, GetNextJobOptions, IoredisListener, IQueueBackend, JobJson, Span, WorkerOptions } from '../interfaces';
4
4
  import { ConnectionOptions } from '../interfaces/redis-options';
@@ -1,6 +1,6 @@
1
- import * as fs from 'fs';
2
- import { URL } from 'url';
3
- import * as path from 'path';
1
+ import * as fs from 'node:fs';
2
+ import { URL } from 'node:url';
3
+ import * as path from 'node:path';
4
4
  import { AbortController } from './abort-controller';
5
5
  import { delay, DELAY_TIME_1, isNotConnectionError, randomUUID, withDetachedContext, } from '../utils';
6
6
  import { QueueBase } from './queue-base';
@@ -1,4 +1,4 @@
1
- import { EventEmitter } from 'events';
1
+ import { EventEmitter } from 'node:events';
2
2
  import { IRedisClient } from './redis-client';
3
3
  export type RedisClient = IRedisClient;
4
4
  export interface IConnection extends EventEmitter {
@@ -1,4 +1,4 @@
1
- import { Readable } from 'stream';
1
+ import { Readable } from 'node:stream';
2
2
  /**
3
3
  * Redis client interface for BullMQ.
4
4
  *
@@ -1,5 +1,5 @@
1
- import { ForkOptions } from 'child_process';
2
- import { WorkerOptions as WorkerThreadsOptions } from 'worker_threads';
1
+ import { ForkOptions } from 'node:child_process';
2
+ import { WorkerOptions as WorkerThreadsOptions } from 'node:worker_threads';
3
3
  export interface SandboxedOptions {
4
4
  /**
5
5
  * Use Worker Threads instead of Child Processes.
@@ -1,4 +1,4 @@
1
- import { EventEmitter } from 'events';
1
+ import { EventEmitter } from 'node:events';
2
2
  import { PgListenClient, PgPool, PgPoolConfig } from './pg-types';
3
3
  /**
4
4
  * A node-postgres pool config / connection string, optionally carrying the
@@ -1,5 +1,5 @@
1
1
  import { __rest } from "tslib";
2
- import { EventEmitter } from 'events';
2
+ import { EventEmitter } from 'node:events';
3
3
  import { isPgPool, } from './pg-types';
4
4
  import { assertSchemaCompatibility, DEFAULT_SCHEMA, quoteSchemaName, runMigrations, } from './migrator';
5
5
  /**
@@ -1,4 +1,4 @@
1
- import { EventEmitter } from 'events';
1
+ import { EventEmitter } from 'node:events';
2
2
  import { DependenciesOpts, IQueueBackend, JobJson, MinimalJob, MoveToDelayedOpts, MoveToWaitingChildrenOpts, ParentKeyOpts, QueueBaseOptions, RepeatableOptions, RetryJobOpts, RetryOptions, StreamReadRaw } from '../interfaces';
3
3
  import { FinishedStatus, JobProgress, JobsOptions, JobState, JobType, KeepJobs } from '../types';
4
4
  import { KeysMap } from '../classes/queue-keys';
@@ -1,5 +1,5 @@
1
1
  import { __rest } from "tslib";
2
- import { EventEmitter } from 'events';
2
+ import { EventEmitter } from 'node:events';
3
3
  import { finishedErrors } from '../classes/finished-errors';
4
4
  import { loadCommandSql } from './sql-loader';
5
5
  /** Parses a nullable `bigint`-as-string column into a number, or `undefined`. */
@@ -1,4 +1,4 @@
1
- import { EventEmitter } from 'events';
1
+ import { EventEmitter } from 'node:events';
2
2
  import { IRelayBackend, RelayBackendOptions, RelayCounts, RelayInboxBatch, RelayNodeConnection, RelayNodeInfo, RelayNodeState, RelayPatternState, RelayPublishOptions, RelayPublishResult, RelayRetainedState, RelaySubscribeResult, RelaySubscriptionFilter, RelaySubscriptionState } from '../interfaces';
3
3
  import { PostgresConnectionOptions } from './postgres-connection';
4
4
  /**
@@ -1,5 +1,5 @@
1
- import { createHash } from 'crypto';
2
- import { EventEmitter } from 'events';
1
+ import { createHash } from 'node:crypto';
2
+ import { EventEmitter } from 'node:events';
3
3
  import { RelayError } from '../classes/relay-errors';
4
4
  import { isPgPool, } from './pg-types';
5
5
  import { PostgresConnection, } from './postgres-connection';