Skip to content

Commit

Permalink
fix: un-shim addCommand from redis types (#311)
Browse files Browse the repository at this point in the history
* Removes addCommand from top-level redis definition, as @types/redis offers the correct function now

* Bumps version of @types/redis to have access to the new method, autogenerated tests

* Removed pointless declare module

* Update test/generated/commands/incrbyfloat.test.ts

Co-authored-by: Misha Kaletsky <15040698+mmkal@users.noreply.github.com>

* Update test/generated/commands/hincrbyfloat.test.ts

Co-authored-by: Misha Kaletsky <15040698+mmkal@users.noreply.github.com>

* Updated yarn.lock, reran all tests on v12.22.1, they passed

Co-authored-by: Misha Kaletsky <15040698+mmkal@users.noreply.github.com>
  • Loading branch information
CanTheAlmighty and mmkal authored Jul 3, 2021
1 parent e7f78d8 commit c7eacd1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"typecheck": "tsc -p ."
},
"dependencies": {
"@types/redis": "^2.8.27"
"@types/redis": "^2.8.30"
},
"devDependencies": {
"@types/cross-spawn": "6.0.2",
Expand Down
4 changes: 0 additions & 4 deletions src/node_redis/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ import { Commands } from "../generated/interface";
import { flattenDeep } from "../flatten";
import { WrappedNodeRedisMulti, WrappedNodeRedisMultiImpl } from "./multi";

declare module "redis" {
export const addCommand: (name: string) => void;
}

export interface WrappedNodeRedisClient extends Omit<Commands, "end" | "multi"> {
nodeRedis: nodeRedis.RedisClient;
/** @deprecated use `nodeRedis` */
Expand Down
21 changes: 13 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1505,16 +1505,21 @@
resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.0.tgz#69a23a3ad29caf0097f06eda59b361ee2f0639f6"
integrity sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY=

"@types/node@*", "@types/node@>= 8":
version "13.13.2"
resolved "https://registry.yarnpkg.com/@types/node/-/node-13.13.2.tgz#160d82623610db590a64e8ca81784e11117e5a54"
integrity sha512-LB2R1Oyhpg8gu4SON/mfforE525+Hi/M1ineICEDftqNVTyFg1aRIeGuTvXAoWHc4nbrFncWtJgMmoyRvuGh7A==
"@types/node@*":
version "15.14.0"
resolved "https://registry.yarnpkg.com/@types/node/-/node-15.14.0.tgz#74dbf254fb375551a9d2a71faf6b9dbc2178dc53"
integrity sha512-um/+/ip3QZmwLfIkWZSNtQIJNVAqrJ92OkLMeuZrjZMTAJniI7fh8N8OICyDhAJ2mzgk/fmYFo72jRr5HyZ1EQ==

"@types/node@14.17.4":
version "14.17.4"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.17.4.tgz#218712242446fc868d0e007af29a4408c7765bc0"
integrity sha512-8kQ3+wKGRNN0ghtEn7EGps/B8CzuBz1nXZEIGGLP2GnwbqYn4dbTs7k+VKLTq1HvZLRCIDtN3Snx1Ege8B7L5A==

"@types/node@>= 8":
version "13.13.2"
resolved "https://registry.yarnpkg.com/@types/node/-/node-13.13.2.tgz#160d82623610db590a64e8ca81784e11117e5a54"
integrity sha512-LB2R1Oyhpg8gu4SON/mfforE525+Hi/M1ineICEDftqNVTyFg1aRIeGuTvXAoWHc4nbrFncWtJgMmoyRvuGh7A==

"@types/normalize-package-data@^2.4.0":
version "2.4.0"
resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e"
Expand Down Expand Up @@ -1544,10 +1549,10 @@
dependencies:
"@types/node" "*"

"@types/redis@^2.8.27":
version "2.8.27"
resolved "https://registry.yarnpkg.com/@types/redis/-/redis-2.8.27.tgz#9bc89b472f3fc4a57a06c1823f2fc860c6c2fdf3"
integrity sha512-RRHarqPp3mgqHz+qzLVuQCJAIVaB3JBaczoj24QVVYu08wiCmB8vbOeNeK9lIH+pyT7+R/bbEPghAZZuhbZm0g==
"@types/redis@^2.8.30":
version "2.8.30"
resolved "https://registry.yarnpkg.com/@types/redis/-/redis-2.8.30.tgz#2b63ce9ff93959355d8a1f6d7a45e483b5fe0299"
integrity sha512-4D3XwfIc671FSNXNruE/wmf6jWL7QYtyAhiWXJDkY41F4atMnOol4584oP4WqnW3uHe8d+Jn+wDLuQaxbfMgXQ==
dependencies:
"@types/node" "*"

Expand Down

0 comments on commit c7eacd1

Please # to comment.