redis-connection-pool
Advanced tools
Comparing version 1.7.4 to 2.0.0
{ | ||
"name": "redis-connection-pool", | ||
"version": "1.7.4", | ||
"version": "2.0.0", | ||
"description": "a redis client connection pool", | ||
@@ -15,2 +15,8 @@ "license": "MIT", | ||
], | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"files": [ | ||
"dist/", | ||
"src/" | ||
], | ||
"author": { | ||
@@ -20,15 +26,27 @@ "name": "Nick Jennings", | ||
}, | ||
"main": "./src/redis-connection-pool.js", | ||
"scripts": { | ||
"test": "node_modules/.bin/jaribu", | ||
"doc": "node_modules/.bin/jsdoc2md src/redis-connection-pool.js > API.md" | ||
"build": "tsc", | ||
"test": "jaribu", | ||
"doc": "jsdoc2md --files ./src/index.ts --configure ./jsdoc2md.json > ./API.md" | ||
}, | ||
"dependencies": { | ||
"debug": "^4.3.1", | ||
"generic-pool": "^3.7.8", | ||
"redis": "^3.1.2" | ||
"debug": "^4.3.4", | ||
"generic-pool": "^3.8.2", | ||
"redis": "^4.0.4" | ||
}, | ||
"devDependencies": { | ||
"@babel/cli": "^7.17.6", | ||
"@babel/core": "^7.17.8", | ||
"@babel/preset-env": "^7.16.11", | ||
"@babel/preset-typescript": "^7.16.7", | ||
"@types/eslint": "^8.4.1", | ||
"@types/generic-pool": "^3.1.10", | ||
"@types/node": "^17.0.23", | ||
"@types/redis": "^4.0.11", | ||
"@typescript-eslint/parser": "^5.16.0", | ||
"eslint": "^8.11.0", | ||
"jaribu": "2.2.3", | ||
"jsdoc-to-markdown": "^7.0.1" | ||
"jsdoc-babel": "^0.5.0", | ||
"jsdoc-to-markdown": "^7.1.1", | ||
"typescript": "^4.6.2" | ||
}, | ||
@@ -35,0 +53,0 @@ "repository": { |
@@ -16,2 +16,4 @@ node-redis-connection-pool | ||
**NOTE** Version 2.x is a rewrite and not backward compatible, please re-read the documentation to update your code. | ||
## Installation | ||
@@ -27,19 +29,11 @@ | ||
var redisPool = require('redis-connection-pool')('myRedisPool', { | ||
host: '127.0.0.1', // default | ||
port: 6379, //default | ||
// optionally specify full redis url, overrides host + port properties | ||
// url: "redis://username:password@host:port" | ||
max_clients: 30, // defalut | ||
perform_checks: false, // checks for needed push/pop functionality | ||
database: 0, // database number to use | ||
options: { | ||
auth_pass: 'password' | ||
} //options for createClient of node-redis, optional | ||
max_clients: 10 // defalut | ||
}, { | ||
host: '127.0.0.1', | ||
port: 6379 | ||
}); | ||
redisPool.set('test-key', 'foobar', function (err) { | ||
redisPool.get('test-key', function (err, reply) { | ||
console.log(reply); // 'foobar' | ||
}); | ||
}); | ||
redisPool.init(); | ||
await redisPool.set('test-key', 'foobar'); | ||
``` | ||
@@ -51,3 +45,3 @@ | ||
```javascript | ||
get(key, cb) | ||
get(key) | ||
``` | ||
@@ -57,3 +51,3 @@ | ||
```javascript | ||
set(key, value, callback) | ||
set(key, value) | ||
``` | ||
@@ -63,3 +57,3 @@ | ||
```javascript | ||
expire(key, value, callback) | ||
expire(key, value) | ||
``` | ||
@@ -69,3 +63,3 @@ | ||
```javascript | ||
del(key, callback) | ||
del(key) | ||
``` | ||
@@ -75,3 +69,3 @@ | ||
```javascript | ||
hget(key, field, callback) | ||
hget(key, field) | ||
``` | ||
@@ -81,3 +75,3 @@ | ||
```javascript | ||
hgetall(key, callback) | ||
hgetall(key) | ||
``` | ||
@@ -87,3 +81,3 @@ | ||
```javascript | ||
hset(key, field, value, callback) | ||
hset(key, field, value) | ||
``` | ||
@@ -93,3 +87,3 @@ | ||
```javascript | ||
hdel(key, [fields], callback) | ||
hdel(key, [fields]) | ||
``` | ||
@@ -99,3 +93,3 @@ | ||
```javascript | ||
brpop(key, cb) | ||
brpop(key) | ||
``` | ||
@@ -105,3 +99,3 @@ | ||
```javascript | ||
brpoplpush(key1, key2, callback) | ||
brpoplpush(key1, key2) | ||
``` | ||
@@ -111,3 +105,3 @@ | ||
```javascript | ||
blpop(key, cb) | ||
blpop(key) | ||
``` | ||
@@ -117,3 +111,3 @@ | ||
```javascript | ||
rpush(key, value, callback) | ||
rpush(key, value) | ||
``` | ||
@@ -123,3 +117,3 @@ | ||
```javascript | ||
lpush(key, value, callback) | ||
lpush(key, value) | ||
``` | ||
@@ -134,4 +128,1 @@ | ||
[MIT](https://github.com/silverbucket/node-redis-connection-pool/blob/master/LICENSE) | ||
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
1
100
1112
40580
14
6
113
1
+ Added@redis/bloom@1.2.0(transitive)
+ Added@redis/client@1.6.0(transitive)
+ Added@redis/graph@1.1.1(transitive)
+ Added@redis/json@1.0.7(transitive)
+ Added@redis/search@1.2.0(transitive)
+ Added@redis/time-series@1.1.0(transitive)
+ Addedcluster-key-slot@1.1.2(transitive)
+ Addedredis@4.7.0(transitive)
+ Addedyallist@4.0.0(transitive)
- Removeddenque@1.5.1(transitive)
- Removedredis@3.1.2(transitive)
- Removedredis-commands@1.7.0(transitive)
- Removedredis-errors@1.2.0(transitive)
- Removedredis-parser@3.0.0(transitive)
Updateddebug@^4.3.4
Updatedgeneric-pool@^3.8.2
Updatedredis@^4.0.4