Skip to content

Commit

Permalink
feat: Refactor code with modern settings
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
luin committed Mar 14, 2022
1 parent e4c9d01 commit a8ffa80
Show file tree
Hide file tree
Showing 74 changed files with 2,403 additions and 2,685 deletions.
40 changes: 40 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"prettier"
],
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"env": { "node": true },
"rules": {
"prefer-rest-params": 0,
"no-var": 0,
"no-prototype-builtins": 0,
"prefer-spread": 0,
"@typescript-eslint/no-var-requires": 0,
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/no-this-alias": 0,
"@typescript-eslint/ban-ts-ignore": 0,
"@typescript-eslint/ban-ts-comment": 0,
"@typescript-eslint/ban-types": 0,
"@typescript-eslint/no-empty-interface": 0,
"@typescript-eslint/no-empty-function": 0,
"@typescript-eslint/no-unused-vars": [
"warn",
{
"args": "none"
}
]
},
"overrides": [
{
"files": ["test/**/*"],
"env": {
"mocha": true
},
"rules": { "prefer-const": 0 }
}
]
}
42 changes: 0 additions & 42 deletions .eslintrc.yml

This file was deleted.

2 changes: 0 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ jobs:
matrix:
include:
# Need a new enough git version to install the npm husky module.
- NODE_VERSION: 6-stretch
- NODE_VERSION: 8-buster
- NODE_VERSION: 10-buster
- NODE_VERSION: 12-bullseye
- NODE_VERSION: 14-bullseye
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ built
.vscode
benchmarks/fixtures/*.txt

*.rdb
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodejs 10.12.0
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
language: node_js

node_js:
- "6"
- "8"
- "10"
- "12"
- "14"
- "16"
- "17"

services:
- redis-server
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

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

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

# Features

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/autopipelining-single.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { cronometro } from "cronometro";
import { readFileSync } from "fs";
import { join } from "path";
import Redis from "../lib/redis";
import Redis from "../lib/Redis";

const iterations = parseInt(process.env.ITERATIONS || "10000", 10);
const batchSize = parseInt(process.env.BATCH_SIZE || "1000", 10);
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/dropBuffer.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { cronometro } from "cronometro";
import Redis from "../lib/redis";
import Redis from "../lib/Redis";

let redis;

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/errorStack.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { cronometro } from "cronometro";
import Redis from "../lib/redis";
import Redis from "../lib/Redis";

let redis;

Expand Down
Loading

0 comments on commit a8ffa80

Please sign in to comment.