redis-smq-common 1.0.3 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 1.0.5 (2023-01-06)
4
+
5
+ * chore: update license (9b817d2)
6
+ * build: update NPM dependencies to latest releases (b03795b)
7
+ * docs(readme): replace lgtm badge with code quality badge (ea6545a)
8
+ * build: migrate from lgtm to github code scanning (de3dcd4)
9
+
10
+ ## 1.0.4 (2022-08-24)
11
+
12
+ * test(redis-client): cover srem command (caf3837)
13
+ * feat(redis-client): add support for srem command (7ddaf24)
14
+
15
+
3
16
  ## 1.0.3 (2022-08-16)
4
17
 
5
18
  * [RedisClient] Update tests (6f1fd51)
package/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2017-2022 Weyoss <weyoss@protonmail.com>
1
+ Copyright (c) 2017-2023 Weyoss <weyoss@protonmail.com>
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
package/README.md CHANGED
@@ -7,9 +7,9 @@
7
7
 
8
8
  <p>
9
9
  <a href="https://github.com/weyoss/redis-smq-common/actions/workflows/tests.yml"><img src="https://github.com/weyoss/redis-smq-common/actions/workflows/tests.yml/badge.svg" alt="Tests" style="max-width:100%;" /></a>
10
+ <a href="https://github.com/weyoss/redis-smq-common/actions/workflows/codeql.yml" rel="nofollow"><img src="https://github.com/weyoss/redis-smq-common/actions/workflows/codeql.yml/badge.svg" alt="Code quality" /></a>
10
11
  <a href="https://npmjs.org/package/redis-smq-common" rel="nofollow"><img src="https://img.shields.io/npm/v/redis-smq-common.svg" alt="NPM version" /></a>
11
12
  <a href="https://codecov.io/github/weyoss/redis-smq-common?branch=master" rel="nofollow"><img src="https://img.shields.io/codecov/c/github/weyoss/redis-smq-common" alt="Coverage Status" /></a>
12
- <a href="https://lgtm.com/projects/g/weyoss/redis-smq-common/context:javascript" rel="nofollow"><img src="https://img.shields.io/lgtm/grade/javascript/github/weyoss/redis-smq-common.svg?logo=lgtm&logoWidth=18" alt="Code quality" /></a>
13
13
  </p>
14
14
 
15
15
  [RedisSMQ](https://github.com/weyoss/redis-smq) shared components that may be used by integrated applications and extensions.
@@ -30,6 +30,7 @@ export declare class IoredisClient extends RedisClient {
30
30
  zrangebyscore(key: string, min: number | string, max: number | string, cb: ICallback<string[]>): void;
31
31
  smembers(key: string, cb: ICallback<string[]>): void;
32
32
  sadd(key: string, member: string, cb: ICallback<number>): void;
33
+ srem(key: string, member: string, cb: ICallback<number>): void;
33
34
  hgetall(key: string, cb: ICallback<Record<string, string>>): void;
34
35
  hget(key: string, field: string, cb: ICallback<string | null>): void;
35
36
  hset(key: string, field: string, value: string, cb: ICallback<number>): void;
@@ -96,6 +96,9 @@ class IoredisClient extends redis_client_1.RedisClient {
96
96
  sadd(key, member, cb) {
97
97
  this.client.sadd(key, member, cb);
98
98
  }
99
+ srem(key, member, cb) {
100
+ this.client.srem(key, member, cb);
101
+ }
99
102
  hgetall(key, cb) {
100
103
  this.client.hgetall(key, cb);
101
104
  }
@@ -30,6 +30,7 @@ export declare class NodeRedisV3Client extends RedisClient {
30
30
  zrangebyscore(key: string, min: number | string, max: number | string, cb: ICallback<string[]>): void;
31
31
  smembers(key: string, cb: ICallback<string[]>): void;
32
32
  sadd(key: string, member: string, cb: ICallback<number>): void;
33
+ srem(key: string, member: string, cb: ICallback<number>): void;
33
34
  hgetall(key: string, cb: ICallback<Record<string, string>>): void;
34
35
  hget(key: string, field: string, cb: ICallback<string | null>): void;
35
36
  hset(key: string, field: string, value: string, cb: ICallback<number>): void;
@@ -123,6 +123,9 @@ class NodeRedisV3Client extends redis_client_1.RedisClient {
123
123
  sadd(key, member, cb) {
124
124
  this.client.sadd(key, member, cb);
125
125
  }
126
+ srem(key, member, cb) {
127
+ this.client.srem(key, member, cb);
128
+ }
126
129
  hgetall(key, cb) {
127
130
  this.client.hgetall(key, (err, reply) => {
128
131
  if (err)
@@ -30,6 +30,7 @@ export declare class NodeRedisV4Client extends RedisClient {
30
30
  COUNT?: number;
31
31
  }, cb: ICallback<string[]>): void;
32
32
  sadd(key: string, member: string, cb: ICallback<number>): void;
33
+ srem(key: string, member: string, cb: ICallback<number>): void;
33
34
  hgetall(key: string, cb: ICallback<Record<string, string>>): void;
34
35
  hget(key: string, field: string, cb: ICallback<string | null>): void;
35
36
  hset(key: string, field: string, value: string, cb: ICallback<number>): void;
@@ -121,6 +121,12 @@ class NodeRedisV4Client extends redis_client_1.RedisClient {
121
121
  .then((reply) => cb(null, reply))
122
122
  .catch(cb);
123
123
  }
124
+ srem(key, member, cb) {
125
+ this.client
126
+ .sRem(key, member)
127
+ .then((reply) => cb(null, reply))
128
+ .catch(cb);
129
+ }
124
130
  hgetall(key, cb) {
125
131
  this.client
126
132
  .hGetAll(key)
@@ -39,6 +39,7 @@ export declare abstract class RedisClient extends EventEmitter {
39
39
  }, cb: ICallback<string[]>): void;
40
40
  sscanFallback(key: string, cb: ICallback<string[]>): void;
41
41
  abstract sadd(key: string, member: string, cb: ICallback<number>): void;
42
+ abstract srem(key: string, member: string, cb: ICallback<number>): void;
42
43
  abstract hgetall(key: string, cb: ICallback<Record<string, string>>): void;
43
44
  abstract hget(key: string, field: string, cb: ICallback<string | null>): void;
44
45
  abstract hset(key: string, field: string, value: string, cb: ICallback<number>): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "redis-smq-common",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "RedisSMQ shared components that may be used by integrated applications and extensions.",
5
5
  "author": "Weyoss <weyoss@protonmail.com>",
6
6
  "license": "MIT",