Skip to content

Commit 199285a

Browse files
leibalericsam
andauthored
Release 4.0.0-rc.3 (#1678)
* update workflows & README * add .deepsource.toml * fix client.quit, add error events on cluster, fix some "deepsource.io" warnings * Release 4.0.0-rc.1 * add cluster.duplicate, add some tests * fix #1650 - add support for Buffer in some commands, add GET_BUFFER command * fix GET and GET_BUFFER return type * update FAQ * Update invalid code example in README.md (#1654) * Update invalid code example in README.md * Update README.md Co-authored-by: Leibale Eidelman <leibale1998@gmail.com> * fix #1652 * ref #1653 - better types * better types * fix 5412479 * Update GEOSEARCHSTORE.spec.ts * fix #1660 - add support for client.HSET('key', 'field', 'value') * upgrade dependencies, update README * fix #1659 - add support for db-number in client options url * fix README, remove unused import, downgrade typedoc & typedoc-plugin-markdown * update client-configurations.md * fix README * add CLUSTER_SLOTS, add some tests * fix "createClient with url" test with redis 5 * remove unused imports * Release 4.0.0-rc.2 * add missing semicolon * replace empty "transformReply" functions with typescript "declare" * fix EVAL & EVALSHA, add some tests, npm update * fix #1665 - add ZRANGEBYLEX, ZRANGEBYSCORE, ZRANGEBYSCORE_WITHSCORES * new issue templates * add all COMMAND commands * run COMMAND & COMMAND INFO tests only on redis >6 * Create SECURITY.md * fix #1671 - add support for all client configurations in cluster * ref #1671 - add support for defaults * remove some commands from cluster, npm update, clean code, * lock benny version * fix #1674 - remove `isolationPoolOptions` when creating isolated connection * increase test coverage * update .npmignore * Release 4.0.0-rc.3 Co-authored-by: Richard Samuelsson <noobtoothfairy@gmail.com>
1 parent e592d94 commit 199285a

File tree

258 files changed

+2710
-2774
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

258 files changed

+2710
-2774
lines changed

.github/ISSUE_TEMPLATE.md

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

.github/ISSUE_TEMPLATE/bug-report.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: Bug
6+
assignees: ''
7+
---
8+
9+
<!-- Describe your issue here -->
10+
11+
**Environment:**
12+
- **Node.js Version**: <!-- e.g. "node --version" -->
13+
- **Redis Server Version**: <!-- e.g. "redis-server --version" -->
14+
- **Node Redis Version**: <!-- e.g. "npm ls redis" -->
15+
- **Platform**: <!-- e.g. Ubuntu 20.04.3, Windows 10, Mac OS 11.6 -->
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: Bug
6+
assignees: ''
7+
---

.npmignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
.vscode/
22
.idea/
33
node_modules/
4-
.nyc_output
4+
.nyc_output/
55
coverage/
66
dump.rdb
77
documentation/
88
CONTRIBUTING.md
99
tsconfig.json
10+
.deepsource.toml
1011
.nycrc.json
1112
benchmark/
1213
.github/

README.md

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ The above code connects to localhost on port 6379. To connect to a different hos
5353

5454
```typescript
5555
createClient({
56-
url: 'redis://alice:foobared@awesome.redis.server:6380',
56+
url: 'redis://alice:foobared@awesome.redis.server:6380'
5757
});
5858
```
5959

@@ -78,7 +78,7 @@ Modifiers to commands are specified using a JavaScript object:
7878
```typescript
7979
await client.set('key', 'value', {
8080
EX: 10,
81-
NX: true,
81+
NX: true
8282
});
8383
```
8484

@@ -181,12 +181,9 @@ for await (const key of client.scanIterator()) {
181181
This works with `HSCAN`, `SSCAN`, and `ZSCAN` too:
182182

183183
```typescript
184-
for await (const member of client.hScanIterator('hash')) {
185-
}
186-
for await (const { field, value } of client.sScanIterator('set')) {
187-
}
188-
for await (const { member, score } of client.zScanIterator('sorted-set')) {
189-
}
184+
for await (const member of client.hScanIterator('hash')) {}
185+
for await (const { field, value } of client.sScanIterator('set')) {}
186+
for await (const { member, score } of client.zScanIterator('sorted-set')) {}
190187
```
191188

192189
You can override the default options by providing a configuration object:
@@ -204,7 +201,8 @@ client.scanIterator({
204201
Define new functions using [Lua scripts](https://redis.io/commands/eval) which execute on the Redis server:
205202

206203
```typescript
207-
import { createClient, defineScript } from 'redis';
204+
import { createClient } from 'redis';
205+
import { defineScript } from 'redis/lua-script';
208206

209207
(async () => {
210208
const client = createClient({
@@ -218,9 +216,9 @@ import { createClient, defineScript } from 'redis';
218216
},
219217
transformReply(reply: number): number {
220218
return reply;
221-
},
222-
}),
223-
},
219+
}
220+
})
221+
}
224222
});
225223

226224
await client.connect();
@@ -241,14 +239,12 @@ import { createCluster } from 'redis';
241239
const cluster = createCluster({
242240
rootNodes: [
243241
{
244-
host: '10.0.0.1',
245-
port: 30001,
242+
url: 'redis://10.0.0.1:30001'
246243
},
247244
{
248-
host: '10.0.0.2',
249-
port: 30002,
250-
},
251-
],
245+
url: 'redis://10.0.0.2:30002'
246+
}
247+
]
252248
});
253249

254250
cluster.on('error', (err) => console.log('Redis Cluster Error', err));
@@ -274,7 +270,7 @@ Of course, if you don't do something with your Promises you're certain to get [u
274270
```typescript
275271
await Promise.all([
276272
client.set('Tm9kZSBSZWRpcw==', 'users:1'),
277-
client.sAdd('users:1:tokens', 'Tm9kZSBSZWRpcw=='),
273+
client.sAdd('users:1:tokens', 'Tm9kZSBSZWRpcw==')
278274
]);
279275
```
280276

SECURITY.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
Node Redis is generally backwards compatible with very few exceptions, so we recommend users to always use the latest version to experience stability, performance and security.
6+
7+
| Version | Supported |
8+
| ------- | ------------------ |
9+
| 4.0.x | :white_check_mark: |
10+
| 3.1.x | :white_check_mark: |
11+
| < 3.1 | :x: |
12+
13+
## Reporting a Vulnerability
14+
15+
If you believe you’ve discovered a serious vulnerability, please contact the Node Redis core team at redis@redis.io. We will evaluate your report and if necessary issue a fix and an advisory. If the issue was previously undisclosed,
16+
we’ll also mention your name in the credits.

0 commit comments

Comments
 (0)