Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bullmq

Package Overview
Dependencies
Maintainers
1
Versions
554
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bullmq - npm Package Compare versions

Comparing version 3.16.1 to 3.16.2

dist/cjs/version.js

5

dist/cjs/classes/queue.js

@@ -7,2 +7,3 @@ "use strict";

const utils_1 = require("../utils");
const version_1 = require("../version");
const queue_getters_1 = require("./queue-getters");

@@ -22,2 +23,3 @@ const repeat_1 = require("./repeat");

this.token = (0, uuid_1.v4)();
this.libName = 'bullmq';
this.jobsOpts = (_a = (0, lodash_1.get)(opts, 'defaultJobOptions')) !== null && _a !== void 0 ? _a : {};

@@ -58,6 +60,5 @@ this.waitUntilReady()

var _a, _b, _c, _d;
const { name, version } = (0, utils_1.readPackageJson)();
return {
'opts.maxLenEvents': (_d = (_c = (_b = (_a = this.opts) === null || _a === void 0 ? void 0 : _a.streams) === null || _b === void 0 ? void 0 : _b.events) === null || _c === void 0 ? void 0 : _c.maxLen) !== null && _d !== void 0 ? _d : 10000,
version: `${name}:${version}`,
version: `${this.libName}:${version_1.version}`,
};

@@ -64,0 +65,0 @@ }

4

dist/cjs/classes/redis-connection.js

@@ -10,2 +10,3 @@ "use strict";

const utils_2 = require("../utils");
const version_1 = require("../version");
const scripts = require("../scripts");

@@ -124,5 +125,4 @@ const overrideMessage = [

this._client.on('ready', this.handleClientReady);
const { version } = (0, utils_2.readPackageJson)();
await RedisConnection.waitUntilReady(this._client);
this.loadCommands(version);
this.loadCommands(version_1.version);
this.version = await this.getRedisVersion();

@@ -129,0 +129,0 @@ if (this.opts && this.opts.skipVersionCheck !== true && !this.closing) {

@@ -16,2 +16,3 @@ /**

const utils_1 = require("../utils");
const version_1 = require("../version");
class Scripts {

@@ -21,3 +22,3 @@ constructor(queue) {

const queueKeys = this.queue.keys;
this.version = (0, utils_1.readPackageJson)().version;
this.version = version_1.version;
this.moveToFinishedKeys = [

@@ -24,0 +25,0 @@ queueKeys.wait,

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.readPackageJson = exports.QUEUE_EVENT_SUFFIX = exports.WORKER_SUFFIX = exports.errorToJSON = exports.parseObjectValues = exports.isRedisVersionLowerThan = exports.childSend = exports.asyncSend = exports.isNotConnectionError = exports.DELAY_TIME_1 = exports.DELAY_TIME_5 = exports.clientCommandMessageReg = exports.getParentKey = exports.removeAllQueueData = exports.isRedisCluster = exports.isRedisInstance = exports.delay = exports.array2obj = exports.isEmpty = exports.lengthInUtf8Bytes = exports.tryCatch = exports.errorObject = void 0;
exports.QUEUE_EVENT_SUFFIX = exports.WORKER_SUFFIX = exports.errorToJSON = exports.parseObjectValues = exports.isRedisVersionLowerThan = exports.childSend = exports.asyncSend = exports.isNotConnectionError = exports.DELAY_TIME_1 = exports.DELAY_TIME_5 = exports.clientCommandMessageReg = exports.getParentKey = exports.removeAllQueueData = exports.isRedisCluster = exports.isRedisInstance = exports.delay = exports.array2obj = exports.isEmpty = exports.lengthInUtf8Bytes = exports.tryCatch = exports.errorObject = void 0;
const ioredis_1 = require("ioredis");

@@ -9,4 +9,2 @@ // eslint-disable-next-line @typescript-eslint/ban-ts-comment

const semver = require("semver");
const path_1 = require("path");
const fs_1 = require("fs");
exports.errorObject = { value: null };

@@ -155,22 +153,2 @@ function tryCatch(fn, ctx, args) {

exports.QUEUE_EVENT_SUFFIX = ':qe';
const readPackageJson = () => {
const packageJsonPossiblePaths = [
(0, path_1.join)(__dirname, '../package.json'),
(0, path_1.join)(__dirname, '../../package.json'),
(0, path_1.join)(__dirname, '../../../package.json'),
];
for (const path of packageJsonPossiblePaths) {
try {
return JSON.parse((0, fs_1.readFileSync)(path, 'utf-8'));
}
catch (err) {
if (err.code === 'ENOENT') {
continue;
}
console.log(err);
}
}
return { name: 'bullmq', version: '0.0.0' };
};
exports.readPackageJson = readPackageJson;
//# sourceMappingURL=utils.js.map

@@ -75,2 +75,3 @@ import { BaseJobOptions, BulkJobOptions, IoredisListener, QueueOptions, RepeatOptions } from '../interfaces';

private _repeat?;
protected libName: string;
constructor(name: string, opts?: QueueOptions, Connection?: typeof RedisConnection);

@@ -77,0 +78,0 @@ emit<U extends keyof QueueListener<DataType, ResultType, NameType>>(event: U, ...args: Parameters<QueueListener<DataType, ResultType, NameType>[U]>): boolean;

import { get } from 'lodash';
import { v4 } from 'uuid';
import { isRedisInstance, readPackageJson } from '../utils';
import { isRedisInstance } from '../utils';
import { version } from '../version';
import { QueueGetters } from './queue-getters';

@@ -18,2 +19,3 @@ import { Repeat } from './repeat';

this.token = v4();
this.libName = 'bullmq';
this.jobsOpts = (_a = get(opts, 'defaultJobOptions')) !== null && _a !== void 0 ? _a : {};

@@ -54,6 +56,5 @@ this.waitUntilReady()

var _a, _b, _c, _d;
const { name, version } = readPackageJson();
return {
'opts.maxLenEvents': (_d = (_c = (_b = (_a = this.opts) === null || _a === void 0 ? void 0 : _a.streams) === null || _b === void 0 ? void 0 : _b.events) === null || _c === void 0 ? void 0 : _c.maxLen) !== null && _d !== void 0 ? _d : 10000,
version: `${name}:${version}`,
version: `${this.libName}:${version}`,
};

@@ -60,0 +61,0 @@ }

@@ -6,3 +6,4 @@ import { EventEmitter } from 'events';

import { CONNECTION_CLOSED_ERROR_MSG } from 'ioredis/built/utils';
import { isNotConnectionError, isRedisCluster, isRedisInstance, isRedisVersionLowerThan, readPackageJson, } from '../utils';
import { isNotConnectionError, isRedisCluster, isRedisInstance, isRedisVersionLowerThan, } from '../utils';
import { version } from '../version';
import * as scripts from '../scripts';

@@ -121,3 +122,2 @@ const overrideMessage = [

this._client.on('ready', this.handleClientReady);
const { version } = readPackageJson();
await RedisConnection.waitUntilReady(this._client);

@@ -124,0 +124,0 @@ this.loadCommands(version);

@@ -13,3 +13,4 @@ /**

import { ErrorCode } from '../enums';
import { array2obj, getParentKey, isRedisVersionLowerThan, readPackageJson, } from '../utils';
import { array2obj, getParentKey, isRedisVersionLowerThan } from '../utils';
import { version } from '../version';
export class Scripts {

@@ -19,3 +20,3 @@ constructor(queue) {

const queueKeys = this.queue.keys;
this.version = readPackageJson().version;
this.version = version;
this.moveToFinishedKeys = [

@@ -22,0 +23,0 @@ queueKeys.wait,

@@ -42,6 +42,2 @@ /// <reference types="node" />

export declare const QUEUE_EVENT_SUFFIX = ":qe";
export declare const readPackageJson: () => {
name: string;
version: string;
};
export {};

@@ -6,4 +6,2 @@ import { Cluster } from 'ioredis';

import * as semver from 'semver';
import { join } from 'path';
import { readFileSync } from 'fs';
export const errorObject = { value: null };

@@ -137,21 +135,2 @@ export function tryCatch(fn, ctx, args) {

export const QUEUE_EVENT_SUFFIX = ':qe';
export const readPackageJson = () => {
const packageJsonPossiblePaths = [
join(__dirname, '../package.json'),
join(__dirname, '../../package.json'),
join(__dirname, '../../../package.json'),
];
for (const path of packageJsonPossiblePaths) {
try {
return JSON.parse(readFileSync(path, 'utf-8'));
}
catch (err) {
if (err.code === 'ENOENT') {
continue;
}
console.log(err);
}
}
return { name: 'bullmq', version: '0.0.0' };
};
//# sourceMappingURL=utils.js.map
{
"name": "bullmq",
"version": "3.16.1",
"version": "3.16.2",
"description": "Queue for messages and jobs based on Redis",

@@ -38,3 +38,3 @@ "homepage": "https://bullmq.io/",

"eslint:fix": "./node_modules/.bin/eslint . --ignore-path ./.eslintignore --fix",
"generate:raw:scripts": "ts-node --project tsconfig-cjs.json generateRawScripts.ts",
"generate:raw:scripts": "ts-node --project tsconfig-cjs.json scripts/generateRawScripts.ts",
"lint": "./node_modules/.bin/eslint . --ignore-path ./.eslintignore",

@@ -51,3 +51,3 @@ "lint:staged": "lint-staged",

"test:watch": "ts-mocha -p tsconfig-cjs.json --paths 'tests/test_*.ts' -w --watch-extensions ts",
"transform:commands": "node ./commandTransform.js ./rawScripts ./src/scripts",
"transform:commands": "node ./scripts/commandTransform.js ./rawScripts ./src/scripts",
"tsc": "tsc",

@@ -72,2 +72,3 @@ "tsc:all": "tsc && tsc -p tsconfig-cjs.json"

"@semantic-release/commit-analyzer": "^9.0.2",
"@semantic-release/exec": "^6.0.3",
"@semantic-release/git": "^10.0.1",

@@ -208,2 +209,8 @@ "@semantic-release/github": "^8.0.5",

[
"@semantic-release/exec",
{
"prepareCmd": "node scripts/updateVersion.js ${nextRelease.version} && yarn build"
}
],
[
"@semantic-release/npm",

@@ -221,2 +228,3 @@ {

"yarn.lock",
"src/version.ts",
"docs/gitbook/changelog.md",

@@ -223,0 +231,0 @@ "docs/gitbook/api/**"

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc