Socket
Socket
Sign inDemoInstall

redis

Package Overview
Dependencies
Maintainers
3
Versions
155
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redis - npm Package Compare versions

Comparing version 4.0.1 to 4.0.2

124

dist/index.d.ts
import { RedisClientOptions, RedisClientType, RedisClusterOptions, RedisClusterType } from '@node-redis/client';
import { RedisScripts } from '@node-redis/client/dist/lib/commands';
export * from '@node-redis/client';
export * from '@node-redis/bloom';
export * from '@node-redis/json';
export * from '@node-redis/search';
export * from '@node-redis/time-series';
declare const modules: {

@@ -111,4 +113,122 @@ json: {

};
ts: {
ADD: typeof import("@node-redis/time-series/dist/commands/ADD");
add: typeof import("@node-redis/time-series/dist/commands/ADD");
ALTER: typeof import("@node-redis/time-series/dist/commands/ALTER");
alter: typeof import("@node-redis/time-series/dist/commands/ALTER");
CREATE: typeof import("@node-redis/time-series/dist/commands/CREATE");
create: typeof import("@node-redis/time-series/dist/commands/CREATE");
CREATERULE: typeof import("@node-redis/time-series/dist/commands/CREATERULE");
createRule: typeof import("@node-redis/time-series/dist/commands/CREATERULE");
DECRBY: typeof import("@node-redis/time-series/dist/commands/DECRBY");
decrBy: typeof import("@node-redis/time-series/dist/commands/DECRBY");
DEL: typeof import("@node-redis/time-series/dist/commands/DEL");
del: typeof import("@node-redis/time-series/dist/commands/DEL");
DELETERULE: typeof import("@node-redis/time-series/dist/commands/DELETERULE");
deleteRule: typeof import("@node-redis/time-series/dist/commands/DELETERULE");
GET: typeof import("@node-redis/time-series/dist/commands/GET");
get: typeof import("@node-redis/time-series/dist/commands/GET");
INCRBY: typeof import("@node-redis/time-series/dist/commands/INCRBY");
incrBy: typeof import("@node-redis/time-series/dist/commands/INCRBY");
INFO_DEBUG: typeof import("@node-redis/time-series/dist/commands/INFO_DEBUG");
infoDebug: typeof import("@node-redis/time-series/dist/commands/INFO_DEBUG");
INFO: typeof import("@node-redis/time-series/dist/commands/INFO");
info: typeof import("@node-redis/time-series/dist/commands/INFO");
MADD: typeof import("@node-redis/time-series/dist/commands/MADD");
mAdd: typeof import("@node-redis/time-series/dist/commands/MADD");
MGET: typeof import("@node-redis/time-series/dist/commands/MGET");
mGet: typeof import("@node-redis/time-series/dist/commands/MGET");
MGET_WITHLABELS: typeof import("@node-redis/time-series/dist/commands/MGET_WITHLABELS");
mGetWithLabels: typeof import("@node-redis/time-series/dist/commands/MGET_WITHLABELS");
QUERYINDEX: typeof import("@node-redis/time-series/dist/commands/QUERYINDEX");
queryIndex: typeof import("@node-redis/time-series/dist/commands/QUERYINDEX");
RANGE: typeof import("@node-redis/time-series/dist/commands/RANGE");
range: typeof import("@node-redis/time-series/dist/commands/RANGE");
REVRANGE: typeof import("@node-redis/time-series/dist/commands/REVRANGE");
revRange: typeof import("@node-redis/time-series/dist/commands/REVRANGE");
MRANGE: typeof import("@node-redis/time-series/dist/commands/MRANGE");
mRange: typeof import("@node-redis/time-series/dist/commands/MRANGE");
MRANGE_WITHLABELS: typeof import("@node-redis/time-series/dist/commands/MRANGE_WITHLABELS");
mRangeWithLabels: typeof import("@node-redis/time-series/dist/commands/MRANGE_WITHLABELS");
MREVRANGE: typeof import("@node-redis/time-series/dist/commands/MREVRANGE");
mRevRange: typeof import("@node-redis/time-series/dist/commands/MREVRANGE");
MREVRANGE_WITHLABELS: typeof import("@node-redis/time-series/dist/commands/MREVRANGE_WITHLABELS");
mRevRangeWithLabels: typeof import("@node-redis/time-series/dist/commands/MREVRANGE_WITHLABELS");
};
bf: {
ADD: typeof import("@node-redis/bloom/dist/commands/bloom/ADD");
add: typeof import("@node-redis/bloom/dist/commands/bloom/ADD");
EXISTS: typeof import("@node-redis/bloom/dist/commands/bloom/EXISTS");
exists: typeof import("@node-redis/bloom/dist/commands/bloom/EXISTS");
INFO: typeof import("@node-redis/bloom/dist/commands/bloom/INFO");
info: typeof import("@node-redis/bloom/dist/commands/bloom/INFO");
INSERT: typeof import("@node-redis/bloom/dist/commands/bloom/INSERT");
insert: typeof import("@node-redis/bloom/dist/commands/bloom/INSERT");
LOADCHUNK: typeof import("@node-redis/bloom/dist/commands/bloom/LOADCHUNK");
loadChunk: typeof import("@node-redis/bloom/dist/commands/bloom/LOADCHUNK");
MADD: typeof import("@node-redis/bloom/dist/commands/bloom/MADD");
mAdd: typeof import("@node-redis/bloom/dist/commands/bloom/MADD");
MEXISTS: typeof import("@node-redis/bloom/dist/commands/bloom/MEXISTS");
mExists: typeof import("@node-redis/bloom/dist/commands/bloom/MEXISTS");
RESERVE: typeof import("@node-redis/bloom/dist/commands/bloom/RESERVE");
reserve: typeof import("@node-redis/bloom/dist/commands/bloom/RESERVE");
SCANDUMP: typeof import("@node-redis/bloom/dist/commands/bloom/SCANDUMP");
scanDump: typeof import("@node-redis/bloom/dist/commands/bloom/SCANDUMP");
};
cms: {
INCRBY: typeof import("@node-redis/bloom/dist/commands/count-min-sketch/INCRBY");
incrBy: typeof import("@node-redis/bloom/dist/commands/count-min-sketch/INCRBY");
INFO: typeof import("@node-redis/bloom/dist/commands/count-min-sketch/INFO");
info: typeof import("@node-redis/bloom/dist/commands/count-min-sketch/INFO");
INITBYDIM: typeof import("@node-redis/bloom/dist/commands/count-min-sketch/INITBYDIM");
initByDim: typeof import("@node-redis/bloom/dist/commands/count-min-sketch/INITBYDIM");
INITBYPROB: typeof import("@node-redis/bloom/dist/commands/count-min-sketch/INITBYPROB");
initByProb: typeof import("@node-redis/bloom/dist/commands/count-min-sketch/INITBYPROB");
MERGE: typeof import("@node-redis/bloom/dist/commands/count-min-sketch/MERGE");
merge: typeof import("@node-redis/bloom/dist/commands/count-min-sketch/MERGE");
QUERY: typeof import("@node-redis/bloom/dist/commands/count-min-sketch/QUERY");
query: typeof import("@node-redis/bloom/dist/commands/count-min-sketch/QUERY");
};
cf: {
ADD: typeof import("@node-redis/bloom/dist/commands/cuckoo/ADD");
add: typeof import("@node-redis/bloom/dist/commands/cuckoo/ADD");
ADDNX: typeof import("@node-redis/bloom/dist/commands/cuckoo/ADDNX");
addNX: typeof import("@node-redis/bloom/dist/commands/cuckoo/ADDNX");
COUNT: typeof import("@node-redis/bloom/dist/commands/cuckoo/COUNT");
count: typeof import("@node-redis/bloom/dist/commands/cuckoo/COUNT");
DEL: typeof import("@node-redis/bloom/dist/commands/cuckoo/DEL");
del: typeof import("@node-redis/bloom/dist/commands/cuckoo/DEL");
EXISTS: typeof import("@node-redis/bloom/dist/commands/cuckoo/EXISTS");
exists: typeof import("@node-redis/bloom/dist/commands/cuckoo/EXISTS");
INFO: typeof import("@node-redis/bloom/dist/commands/cuckoo/INFO");
info: typeof import("@node-redis/bloom/dist/commands/cuckoo/INFO");
INSERT: typeof import("@node-redis/bloom/dist/commands/cuckoo/INSERT");
insert: typeof import("@node-redis/bloom/dist/commands/cuckoo/INSERT");
INSERTNX: typeof import("@node-redis/bloom/dist/commands/cuckoo/INSERTNX");
insertNX: typeof import("@node-redis/bloom/dist/commands/cuckoo/INSERTNX");
LOADCHUNK: typeof import("@node-redis/bloom/dist/commands/cuckoo/LOADCHUNK");
loadChunk: typeof import("@node-redis/bloom/dist/commands/cuckoo/LOADCHUNK");
RESERVE: typeof import("@node-redis/bloom/dist/commands/cuckoo/RESERVE");
reserve: typeof import("@node-redis/bloom/dist/commands/cuckoo/RESERVE");
SCANDUMP: typeof import("@node-redis/bloom/dist/commands/cuckoo/SCANDUMP");
scanDump: typeof import("@node-redis/bloom/dist/commands/cuckoo/SCANDUMP");
};
topK: {
ADD: typeof import("@node-redis/bloom/dist/commands/top-k/ADD");
add: typeof import("@node-redis/bloom/dist/commands/top-k/ADD");
COUNT: typeof import("@node-redis/bloom/dist/commands/top-k/COUNT");
count: typeof import("@node-redis/bloom/dist/commands/top-k/COUNT");
INCRBY: typeof import("@node-redis/bloom/dist/commands/top-k/INCRBY");
incrBy: typeof import("@node-redis/bloom/dist/commands/top-k/INCRBY");
INFO: typeof import("@node-redis/bloom/dist/commands/top-k/INFO");
info: typeof import("@node-redis/bloom/dist/commands/top-k/INFO");
LIST: typeof import("@node-redis/bloom/dist/commands/top-k/LIST");
list: typeof import("@node-redis/bloom/dist/commands/top-k/LIST");
QUERY: typeof import("@node-redis/bloom/dist/commands/top-k/QUERY");
query: typeof import("@node-redis/bloom/dist/commands/top-k/QUERY");
RESERVE: typeof import("@node-redis/bloom/dist/commands/top-k/RESERVE");
reserve: typeof import("@node-redis/bloom/dist/commands/top-k/RESERVE");
};
};
export declare function createClient<S extends RedisScripts = Record<string, never>>(options?: Omit<RedisClientOptions<never, S>, 'modules'>): RedisClientType<typeof modules, S>;
export declare function createCluster<S extends RedisScripts = Record<string, never>>(options: Omit<RedisClusterOptions<never, S>, 'modules'>): RedisClusterType<typeof modules, S>;
export declare function createClient<S extends RedisScripts>(options?: Omit<RedisClientOptions<never, S>, 'modules'>): RedisClientType<typeof modules, S>;
export declare function createCluster<S extends RedisScripts>(options: Omit<RedisClusterOptions<never, S>, 'modules'>): RedisClusterType<typeof modules, S>;

@@ -15,10 +15,16 @@ "use strict";

const client_1 = require("@node-redis/client");
const bloom_1 = require("@node-redis/bloom");
const json_1 = require("@node-redis/json");
const search_1 = require("@node-redis/search");
const time_series_1 = require("@node-redis/time-series");
__exportStar(require("@node-redis/client"), exports);
__exportStar(require("@node-redis/bloom"), exports);
__exportStar(require("@node-redis/json"), exports);
__exportStar(require("@node-redis/search"), exports);
__exportStar(require("@node-redis/time-series"), exports);
const modules = {
...bloom_1.default,
json: json_1.default,
ft: search_1.default
ft: search_1.default,
ts: time_series_1.default
};

@@ -25,0 +31,0 @@ function createClient(options) {

25

package.json
{
"name": "redis",
"description": "A modern, high performance Redis client",
"version": "4.0.1",
"version": "4.0.2",
"license": "MIT",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": [
"dist/"
],
"workspaces": [

@@ -23,6 +26,7 @@ "./packages/*"

"dependencies": {
"@node-redis/client": "^1.0.1",
"@node-redis/json": "^1.0.1",
"@node-redis/search": "^1.0.1",
"@node-redis/time-series": "^1.0.0"
"@node-redis/bloom": "^1.0.0",
"@node-redis/client": "^1.0.2",
"@node-redis/json": "^1.0.2",
"@node-redis/search": "^1.0.2",
"@node-redis/time-series": "^1.0.1"
},

@@ -32,5 +36,4 @@ "devDependencies": {

"gh-pages": "^3.2.3",
"release-it": "^14.11.8",
"typedoc": "^0.22.10",
"typescript": "^4.5.3"
"release-it": "^14.12.1",
"typescript": "^4.5.4"
},

@@ -45,8 +48,6 @@ "repository": {

"homepage": "https://github.com/redis/node-redis",
"files": [
"dist/"
],
"engines": {
"npm": ">=7"
"npm": ">=7",
"typescript": ">=4"
}
}

@@ -78,2 +78,12 @@ # Node-Redis

`Buffer`s are supported as well:
```typescript
await client.hSet('key', 'field', Buffer.from('value')); // 'OK'
await client.hGetAll(
commandOptions({ returnBuffers: true }),
'key'
); // { field: <Buffer 76 61 6c 75 65> }
```
### Unsupported Redis Commands

@@ -116,3 +126,7 @@

const blPopPromise = client.blPop(commandOptions({ isolated: true }), 'key', 0);
const blPopPromise = client.blPop(
commandOptions({ isolated: true }),
'key',
0
);

@@ -287,11 +301,11 @@ await client.lPush('key', ['1', '2']);

| Event name | Scenes | Parameters |
|--------------|-------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------|
| connect | The client is initiating a connection to the server. | _undefined_ |
| ready | The client successfully initiated the connection to the server. | _undefined_ |
| end | The client disconnected the connection to the server via `.quit()` or `.disconnect()`. | _undefined_ |
| error | When a network error has occurred, such as unable to connect to the server or the connection closed unexpectedly. | The error object, such as `SocketClosedUnexpectedlyError: Socket closed unexpectedly` or `Error: connect ECONNREFUSED [IP]:[PORT]` |
| reconnecting | The client is trying to reconnect to the server. | _undefined_ |
| Event name | Scenes | Arguments to be passed to the listener |
|----------------|-------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------|
| `connect` | The client is initiating a connection to the server. | _No argument_ |
| `ready` | The client successfully initiated the connection to the server. | _No argument_ |
| `end` | The client disconnected the connection to the server via `.quit()` or `.disconnect()`. | _No argument_ |
| `error` | When a network error has occurred, such as unable to connect to the server or the connection closed unexpectedly. | 1 argument: The error object, such as `SocketClosedUnexpectedlyError: Socket closed unexpectedly` or `Error: connect ECONNREFUSED [IP]:[PORT]` |
| `reconnecting` | The client is trying to reconnect to the server. | _No argument_ |
The client will not emit any other events beyond those listed above.
The client will not emit [any other events](./docs/v3-to-v4.md#all-the-removed-events) beyond those listed above.

@@ -313,6 +327,7 @@ ## Supported Redis versions

| ----------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Description |
|---------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [redis](./) | [![Downloads](https://img.shields.io/npm/dm/redis.svg)](https://www.npmjs.com/package/redis) [![Version](https://img.shields.io/npm/v/redis.svg)](https://www.npmjs.com/package/redis) |
| [@node-redis/client](./packages/client) | [![Downloads](https://img.shields.io/npm/dm/@node-redis/client.svg)](https://www.npmjs.com/package/@node-redis/client) [![Version](https://img.shields.io/npm/v/@node-redis/client.svg)](https://www.npmjs.com/package/@node-redis/client) [![Docs](https://img.shields.io/badge/-documentation-dc382c)](https://redis.js.org/documentation/client/) |
| [@node-redis/bloom](./packages/bloom) | [![Downloads](https://img.shields.io/npm/dm/@node-redis/bloom.svg)](https://www.npmjs.com/package/@node-redis/bloom) [![Version](https://img.shields.io/npm/v/@node-redis/bloom.svg)](https://www.npmjs.com/package/@node-redis/bloom) [![Docs](https://img.shields.io/badge/-documentation-dc382c)](https://redis.js.org/documentation/bloom/) [Redis Bloom](https://oss.redis.com/redisbloom/) commands |
| [@node-redis/json](./packages/json) | [![Downloads](https://img.shields.io/npm/dm/@node-redis/json.svg)](https://www.npmjs.com/package/@node-redis/json) [![Version](https://img.shields.io/npm/v/@node-redis/json.svg)](https://www.npmjs.com/package/@node-redis/json) [![Docs](https://img.shields.io/badge/-documentation-dc382c)](https://redis.js.org/documentation/json/) [Redis JSON](https://oss.redis.com/redisjson/) commands |

@@ -319,0 +334,0 @@ | [@node-redis/search](./packages/search) | [![Downloads](https://img.shields.io/npm/dm/@node-redis/search.svg)](https://www.npmjs.com/package/@node-redis/search) [![Version](https://img.shields.io/npm/v/@node-redis/search.svg)](https://www.npmjs.com/package/@node-redis/search) [![Docs](https://img.shields.io/badge/-documentation-dc382c)](https://redis.js.org/documentation/search/) [Redis Search](https://oss.redis.com/redisearch/) commands |

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