Skip to content

Commit 8121589

Browse files
committed
feat: upgrade deps
BREAKING CHANGE: uses updated ioredis-lock that requires higher node versions and ioredis@4
1 parent 8153f25 commit 8121589

9 files changed

Lines changed: 2954 additions & 3230 deletions

File tree

.babelrc

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
{
22
"plugins": [
33
"@babel/plugin-transform-strict-mode"
4-
],
5-
"env": {
6-
"test": {
7-
"plugins": [
8-
"istanbul"
9-
]
10-
}
11-
}
4+
]
125
}

.eslintrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2-
"extends": "makeomatic"
2+
"extends": "makeomatic",
3+
"parser": "babel-eslint"
34
}

.mdeprc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"node": "10.15.1",
23
"nycCoverage": false,
34
"test_framework": "jest --coverage --coverageDirectory <coverageDirectory> --forceExit",
45
"tests": "__tests__/*.js",

.nycrc

Lines changed: 0 additions & 20 deletions
This file was deleted.

__tests__/docker-compose.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ services:
99
- 6379
1010

1111
tester:
12-
image: makeomatic/node:10.8.0-tester
13-
container_name: tester
12+
image: makeomatic/node:10.15.0-tester
1413
hostname: tester
1514
links:
1615
- redis

__tests__/integration.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,8 +289,8 @@ describe('integration tests', () => {
289289
await this.queueManagers[0].redis.flushdb();
290290
return Promise.map(this.queueManagers, (queueManager) => {
291291
return Promise.join(
292-
queueManager.redis.disconnect(),
293-
queueManager.pubsub.disconnect()
292+
queueManager.redis.quit(),
293+
queueManager.pubsub.quit()
294294
);
295295
});
296296
});

package.json

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dlock",
3-
"version": "0.0.0-development",
3+
"version": "0.0.0",
44
"description": "Creates distributed callback queue based on redis pubsub. Pass 2 redis clients (supports redis sentinel as well for HA), manages locks across multiple processes",
55
"main": "./lib/distributed-callback-queue.js",
66
"scripts": {
@@ -9,9 +9,7 @@
99
"prepare": "yarn compile",
1010
"lint": "eslint ./src",
1111
"compile": "babel -d ./lib src",
12-
"semantic-release": "semantic-release",
13-
"commitmsg": "commitlint -e $GIT_PARAMS",
14-
"preparecommitmsg": "./node_modules/@makeomatic/deploy/git-hooks/prepare-commit-msg $GIT_PARAMS"
12+
"semantic-release": "semantic-release"
1513
},
1614
"repository": {
1715
"type": "git",
@@ -26,7 +24,7 @@
2624
"pubsub",
2725
"redis"
2826
],
29-
"author": "Vitaly Aminev <v@makeomatic.ru>",
27+
"author": "Vitaly Aminev <v@makeomatic.ca>",
3028
"license": "MIT",
3129
"bugs": {
3230
"url": "https://github.com/AVVS/distributed-callback-queue/issues"
@@ -40,33 +38,27 @@
4038
"bunyan": "^1.8.12",
4139
"callback-queue": "^2.0.0",
4240
"denque": "^1.3.0",
43-
"ioredis-lock": "^3.4.0",
41+
"ioredis-lock": "^4.0.0",
4442
"lodash": "^4.17.10",
45-
"serialize-error": "^2.1.0"
43+
"serialize-error": "^3.0.0"
4644
},
4745
"devDependencies": {
48-
"@babel/cli": "^7.0.0-rc.1",
49-
"@babel/core": "^7.0.0-rc.1",
46+
"@babel/cli": "^7.2.3",
5047
"@babel/plugin-transform-strict-mode": "^7.0.0-rc.1",
51-
"@babel/register": "^7.0.0-rc.1",
5248
"@makeomatic/condition-semaphore": "^2.0.0",
53-
"@makeomatic/deploy": "^7.0.1",
49+
"@makeomatic/deploy": "^8.3.1",
5450
"@makeomatic/last-release-npm": "^1.0.1",
55-
"babel-core": "^7.0.0-0",
56-
"babel-eslint": "^8.2.6",
57-
"babel-jest": "^23.4.2",
51+
"babel-eslint": "^10.0.1",
5852
"babel-plugin-istanbul": "^5.0.0",
5953
"codecov": "^3.0.4",
6054
"cross-env": "^5.2.0",
6155
"eslint": "^5.3.0",
6256
"eslint-config-makeomatic": "^3.0.0",
6357
"eslint-plugin-import": "^2.13.0",
64-
"eslint-plugin-promise": "^3.8.0",
65-
"ioredis": "^3.2.2",
66-
"jest-cli": "^23.5.0",
67-
"mocha": "^5.2.0",
68-
"nyc": "^12.0.2",
69-
"sinon": "^6.1.5"
58+
"eslint-plugin-promise": "^4.0.1",
59+
"ioredis": "^4.6.2",
60+
"jest": "^24.1.0",
61+
"sinon": "^7.2.3"
7062
},
7163
"engine": {
7264
"node": ">= 8.9.0"
@@ -77,5 +69,11 @@
7769
"files": [
7870
"src/",
7971
"lib/"
80-
]
72+
],
73+
"husky": {
74+
"hooks": {
75+
"commit-msg": "commitlint -e $HUSKY_GIT_PARAMS",
76+
"prepare-commit-msg": "./node_modules/@makeomatic/deploy/git-hooks/prepare-commit-msg $HUSKY_GIT_PARAMS"
77+
}
78+
}
8179
}

src/distributed-callback-queue.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ const Redis = require('ioredis');
44
const bunyan = require('bunyan');
55
const assert = require('assert');
66

7+
// may only use redis with bluebird promise
8+
Redis.Promise = Promise;
9+
710
// lodash helpers
811
const assign = require('lodash/assign');
912
const defaults = require('lodash/defaults');

0 commit comments

Comments
 (0)