Skip to content

Commit a8ffa80

Browse files
committed
feat: Refactor code with modern settings
BREAKING CHANGE: We now require Node.js v10.12.0 or newer. * We now only work with Redis v3.0.0 or newer. * `Redis` can't be called as a function anymore as it's now a class. Please change `Redis()` to `new Redis()`. Note that `Redis()` was already deprecated in the previous version.
1 parent e4c9d01 commit a8ffa80

Some content is hidden

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

74 files changed

+2403
-2685
lines changed

.eslintrc.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"extends": [
3+
"eslint:recommended",
4+
"plugin:@typescript-eslint/recommended",
5+
"plugin:@typescript-eslint/eslint-recommended",
6+
"prettier"
7+
],
8+
"parser": "@typescript-eslint/parser",
9+
"plugins": ["@typescript-eslint"],
10+
"env": { "node": true },
11+
"rules": {
12+
"prefer-rest-params": 0,
13+
"no-var": 0,
14+
"no-prototype-builtins": 0,
15+
"prefer-spread": 0,
16+
"@typescript-eslint/no-var-requires": 0,
17+
"@typescript-eslint/no-explicit-any": 0,
18+
"@typescript-eslint/no-this-alias": 0,
19+
"@typescript-eslint/ban-ts-ignore": 0,
20+
"@typescript-eslint/ban-ts-comment": 0,
21+
"@typescript-eslint/ban-types": 0,
22+
"@typescript-eslint/no-empty-interface": 0,
23+
"@typescript-eslint/no-empty-function": 0,
24+
"@typescript-eslint/no-unused-vars": [
25+
"warn",
26+
{
27+
"args": "none"
28+
}
29+
]
30+
},
31+
"overrides": [
32+
{
33+
"files": ["test/**/*"],
34+
"env": {
35+
"mocha": true
36+
},
37+
"rules": { "prefer-const": 0 }
38+
}
39+
]
40+
}

.eslintrc.yml

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

.github/workflows/main.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ jobs:
2929
matrix:
3030
include:
3131
# Need a new enough git version to install the npm husky module.
32-
- NODE_VERSION: 6-stretch
33-
- NODE_VERSION: 8-buster
3432
- NODE_VERSION: 10-buster
3533
- NODE_VERSION: 12-bullseye
3634
- NODE_VERSION: 14-bullseye

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ built
77
.vscode
88
benchmarks/fixtures/*.txt
99

10+
*.rdb

.tool-versions

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodejs 10.12.0

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
language: node_js
22

33
node_js:
4-
- "6"
5-
- "8"
64
- "10"
75
- "12"
86
- "14"
97
- "16"
8+
- "17"
109

1110
services:
1211
- redis-server

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
A robust, performance-focused and full-featured [Redis](http://redis.io) client for [Node.js](https://nodejs.org).
1414

15-
Supports Redis >= 2.6.12 and (Node.js >= 6). Completely compatible with Redis 6.x.
15+
Supports Redis >= 2.6.12 and (Node.js >= 10.12.0). Completely compatible with Redis 6.x.
1616

1717
# Features
1818

benchmarks/autopipelining-single.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { cronometro } from "cronometro";
22
import { readFileSync } from "fs";
33
import { join } from "path";
4-
import Redis from "../lib/redis";
4+
import Redis from "../lib/Redis";
55

66
const iterations = parseInt(process.env.ITERATIONS || "10000", 10);
77
const batchSize = parseInt(process.env.BATCH_SIZE || "1000", 10);

benchmarks/dropBuffer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { cronometro } from "cronometro";
2-
import Redis from "../lib/redis";
2+
import Redis from "../lib/Redis";
33

44
let redis;
55

benchmarks/errorStack.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { cronometro } from "cronometro";
2-
import Redis from "../lib/redis";
2+
import Redis from "../lib/Redis";
33

44
let redis;
55

0 commit comments

Comments
 (0)