Skip to content

Commit

Permalink
feat: drop support of Node.js 10
Browse files Browse the repository at this point in the history
  • Loading branch information
luin committed Mar 14, 2022
1 parent d18f3fe commit f9a5071
Show file tree
Hide file tree
Showing 12 changed files with 413 additions and 740 deletions.
1 change: 0 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"prettier"
],
"ignorePatterns": ["bin/generateRedisCommander/template.ts"],
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ jobs:
matrix:
include:
# Need a new enough git version to install the npm husky module.
- NODE_VERSION: 10-buster
- NODE_VERSION: 12-bullseye
- NODE_VERSION: 14-bullseye
- NODE_VERSION: 16-bullseye
Expand Down
1 change: 0 additions & 1 deletion .tool-versions

This file was deleted.

4 changes: 2 additions & 2 deletions lib/autoPipelining.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { flatten, isArguments, noop } from "./utils/lodash";
import { isArguments, noop } from "./utils/lodash";
import * as calculateSlot from "cluster-key-slot";
import asCallback from "standard-as-callback";
import { ArgumentType } from "./command";
Expand Down Expand Up @@ -105,7 +105,7 @@ export function getFirstValueInFlattenedArray(
}
return arg[0];
}
const flattened = flatten([arg]);
const flattened = [arg].flat();
if (flattened.length > 0) {
return flattened[0];
}
Expand Down
3 changes: 1 addition & 2 deletions lib/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
convertMapToArray,
convertObjectToArray,
} from "./utils";
import { flatten } from "./utils/lodash";
import { CallbackFunction, ICommand, CommandParameter } from "./types";

export type ArgumentType =
Expand Down Expand Up @@ -192,7 +191,7 @@ export default class Command implements ICommand {
this.replyEncoding = options.replyEncoding;
this.errorStack = options.errorStack;

this.args = flatten(args);
this.args = args.flat();
this.callback = callback;

this.initPromise();
Expand Down
3 changes: 1 addition & 2 deletions lib/utils/lodash.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import defaults = require("lodash.defaults");
import flatten = require("lodash.flatten");
import isArguments = require("lodash.isarguments");

export function noop() {}

export { defaults, flatten, isArguments };
export { defaults, isArguments };
Loading

0 comments on commit f9a5071

Please sign in to comment.