Skip to content

Commit f9a5071

Browse files
committed
feat: drop support of Node.js 10
1 parent d18f3fe commit f9a5071

File tree

12 files changed

+413
-740
lines changed

12 files changed

+413
-740
lines changed

Diff for: .eslintrc.json

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
"extends": [
33
"eslint:recommended",
44
"plugin:@typescript-eslint/recommended",
5-
"plugin:@typescript-eslint/eslint-recommended",
65
"prettier"
76
],
87
"ignorePatterns": ["bin/generateRedisCommander/template.ts"],

Diff for: .github/workflows/main.yml

-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ jobs:
2929
matrix:
3030
include:
3131
# Need a new enough git version to install the npm husky module.
32-
- NODE_VERSION: 10-buster
3332
- NODE_VERSION: 12-bullseye
3433
- NODE_VERSION: 14-bullseye
3534
- NODE_VERSION: 16-bullseye

Diff for: .tool-versions

-1
This file was deleted.

Diff for: lib/autoPipelining.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { flatten, isArguments, noop } from "./utils/lodash";
1+
import { isArguments, noop } from "./utils/lodash";
22
import * as calculateSlot from "cluster-key-slot";
33
import asCallback from "standard-as-callback";
44
import { ArgumentType } from "./command";
@@ -105,7 +105,7 @@ export function getFirstValueInFlattenedArray(
105105
}
106106
return arg[0];
107107
}
108-
const flattened = flatten([arg]);
108+
const flattened = [arg].flat();
109109
if (flattened.length > 0) {
110110
return flattened[0];
111111
}

Diff for: lib/command.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import {
88
convertMapToArray,
99
convertObjectToArray,
1010
} from "./utils";
11-
import { flatten } from "./utils/lodash";
1211
import { CallbackFunction, ICommand, CommandParameter } from "./types";
1312

1413
export type ArgumentType =
@@ -192,7 +191,7 @@ export default class Command implements ICommand {
192191
this.replyEncoding = options.replyEncoding;
193192
this.errorStack = options.errorStack;
194193

195-
this.args = flatten(args);
194+
this.args = args.flat();
196195
this.callback = callback;
197196

198197
this.initPromise();

Diff for: lib/utils/lodash.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import defaults = require("lodash.defaults");
2-
import flatten = require("lodash.flatten");
32
import isArguments = require("lodash.isarguments");
43

54
export function noop() {}
65

7-
export { defaults, flatten, isArguments };
6+
export { defaults, isArguments };

0 commit comments

Comments
 (0)