ioredis 5.0.0-beta.4 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +16 -12
  2. package/package.json +12 -9
package/README.md CHANGED
@@ -18,7 +18,6 @@ used in the world's biggest online commerce company [Alibaba](http://www.alibaba
18
18
  0. Full-featured. It supports [Cluster](http://redis.io/topics/cluster-tutorial), [Sentinel](http://redis.io/topics/sentinel), [Streams](https://redis.io/topics/streams-intro), [Pipelining](http://redis.io/topics/pipelining), and of course [Lua scripting](http://redis.io/commands/eval), [Redis Functions](https://redis.io/topics/functions-intro), [Pub/Sub](http://redis.io/topics/pubsub) (with the support of binary messages).
19
19
  0. High performance 🚀.
20
20
  0. Delightful API 😄. It works with Node callbacks and Native promises.
21
- 0. Official TypeScript declarations.
22
21
  0. Transformation of command arguments and replies.
23
22
  0. Transparent key prefixing.
24
23
  0. Abstraction for Lua scripting, allowing you to [define custom commands](https://github.com/luin/ioredis#lua-scripting).
@@ -30,29 +29,28 @@ used in the world's biggest online commerce company [Alibaba](http://www.alibaba
30
29
  0. Supports Redis ACL.
31
30
  0. Sophisticated error handling strategy.
32
31
  0. Supports NAT mapping.
33
- 0. Supports autopipelining
32
+ 0. Supports autopipelining.
34
33
 
35
- # Versions
34
+ **100% written in TypeScript and official declarations are provided:**
36
35
 
37
- | NPM Version | Branch | Node.js Version | Redis Version |
38
- | ------------ | ------ | --------------- | --------------- |
39
- | 5.x.x (beta) | main | >= 12 | 2.6.12 ~ latest |
40
- | 4.x.x | v4 | >= 6 | 2.6.12 ~ 7 |
36
+ <img width="837" src="resources/ts-screenshot.png" alt="TypeScript Screenshot" />
41
37
 
42
- V5 is still in the beta stage. You can install it with:
38
+ # Versions
43
39
 
44
- ```
45
- $ npm install ioredis@next
46
- ```
40
+ | NPM Version | Branch | Node.js Version | Redis Version |
41
+ | -------------- | ------ | --------------- | --------------- |
42
+ | 5.x.x (latest) | main | >= 12 | 2.6.12 ~ latest |
43
+ | 4.x.x | v4 | >= 6 | 2.6.12 ~ 7 |
47
44
 
48
45
  Refer to [CHANGELOG.md](CHANGELOG.md) for features and bug fixes introduced in v5.
49
46
 
47
+ 🚀 [Upgrading from v4 to v5](https://github.com/luin/ioredis/wiki/Upgrading-from-v4-to-v5)
48
+
50
49
  # Links
51
50
 
52
51
  - [API Documentation](http://luin.github.io/ioredis/) ([Redis](http://luin.github.io/ioredis/classes/default.html), [Cluster](http://luin.github.io/ioredis/classes/Cluster.html))
53
52
  - [Changelog](CHANGELOG.md)
54
53
  - [Migrating from node_redis](https://github.com/luin/ioredis/wiki/Migrating-from-node_redis)
55
- - [Error Handling](#error-handling)
56
54
 
57
55
  <hr>
58
56
 
@@ -107,6 +105,12 @@ Medis starts with all the basic features you need:
107
105
  $ npm install ioredis
108
106
  ```
109
107
 
108
+ In a TypeScript project, you may want to add TypeScript declarations for Node.js:
109
+
110
+ ```shell
111
+ $ npm install --save-dev @types/node
112
+ ```
113
+
110
114
  ## Basic Usage
111
115
 
112
116
  ```javascript
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ioredis",
3
- "version": "5.0.0-beta.4",
3
+ "version": "5.0.0",
4
4
  "description": "A robust, performance-focused and full-featured Redis client for Node.js.",
5
5
  "main": "./built/index.js",
6
6
  "types": "./built/index.d.ts",
@@ -9,9 +9,9 @@
9
9
  ],
10
10
  "scripts": {
11
11
  "test:tsd": "npm run build && tsd",
12
- "test:js": "TS_NODE_TRANSPILE_ONLY=true NODE_ENV=test mocha \"test/helpers/*.ts\" \"test/**/*.ts\"",
12
+ "test:js": "TS_NODE_TRANSPILE_ONLY=true NODE_ENV=test mocha \"test/helpers/*.ts\" \"test/unit/**/*.ts\" \"test/functional/**/*.ts\"",
13
13
  "test:cov": "nyc npm run test:js",
14
- "test:js:cluster": "TS_NODE_TRANSPILE_ONLY=true NODE_ENV=test mocha \"test-cluster/**/*.ts\"",
14
+ "test:js:cluster": "TS_NODE_TRANSPILE_ONLY=true NODE_ENV=test mocha \"test/cluster/**/*.ts\"",
15
15
  "test": "npm run test:js && npm run test:tsd",
16
16
  "lint": "eslint --ext .js,.ts ./lib",
17
17
  "docs": "npx typedoc --logLevel Error --excludeExternals --excludeProtected --excludePrivate --readme none lib/index.ts",
@@ -31,6 +31,9 @@
31
31
  "sentinel",
32
32
  "pipelining"
33
33
  ],
34
+ "tsd": {
35
+ "directory": "test/typing"
36
+ },
34
37
  "author": "Zihua Li <i@zihua.li> (http://zihua.li)",
35
38
  "license": "MIT",
36
39
  "funding": {
@@ -58,25 +61,25 @@
58
61
  "@types/lodash.defaults": "^4.2.6",
59
62
  "@types/lodash.isarguments": "^3.1.6",
60
63
  "@types/mocha": "^9.1.0",
61
- "@types/node": "^17.0.18",
64
+ "@types/node": "^14.18.12",
62
65
  "@types/redis-errors": "^1.2.1",
63
66
  "@types/sinon": "^10.0.11",
64
- "@typescript-eslint/eslint-plugin": "^5.12.0",
65
- "@typescript-eslint/parser": "^5.12.0",
67
+ "@typescript-eslint/eslint-plugin": "^5.16.0",
68
+ "@typescript-eslint/parser": "^5.16.0",
66
69
  "chai": "^4.3.6",
67
70
  "chai-as-promised": "^7.1.1",
68
- "eslint": "^8.9.0",
71
+ "eslint": "^8.12.0",
69
72
  "eslint-config-prettier": "^8.4.0",
70
73
  "mocha": "^9.2.1",
71
74
  "nyc": "^15.1.0",
72
- "prettier": "^2.5.1",
75
+ "prettier": "^2.6.1",
73
76
  "semantic-release": "^19.0.2",
74
77
  "server-destroy": "^1.0.1",
75
78
  "sinon": "^13.0.1",
76
79
  "ts-node": "^10.4.0",
77
80
  "tsd": "^0.19.1",
78
81
  "typedoc": "^0.22.12",
79
- "typescript": "^4.5.5",
82
+ "typescript": "^4.6.3",
80
83
  "uuid": "^8.3.0"
81
84
  },
82
85
  "nyc": {