@naturalcycles/redis-lib 4.0.4 → 4.1.1

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.
@@ -1,5 +1,5 @@
1
1
  import type { AnyObject, CommonLogger, NullableBuffer, NullableString, Promisable, UnixTimestamp } from '@naturalcycles/js-lib';
2
- import type { ReadableTyped } from '@naturalcycles/nodejs-lib';
2
+ import type { ReadableTyped } from '@naturalcycles/nodejs-lib/stream';
3
3
  import type { Redis, RedisOptions } from 'ioredis';
4
4
  import type { ScanStreamOptions } from 'ioredis/built/types.js';
5
5
  import type { ChainableCommander } from 'ioredis/built/utils/RedisCommander.js';
@@ -208,7 +208,7 @@ export class RedisClient {
208
208
  * Like scanStream, but flattens the stream of keys.
209
209
  */
210
210
  scanStreamFlat(opt) {
211
- // biome-ignore lint/correctness/noFlatMapIdentity: ok
211
+ // biome-ignore lint/complexity/noFlatMapIdentity: ok
212
212
  return this.scanStream(opt).flatMap(keys => keys);
213
213
  }
214
214
  async scanCount(opt) {
@@ -1,5 +1,5 @@
1
1
  import type { CommonDBCreateOptions, CommonKeyValueDB, CommonKeyValueDBSaveBatchOptions, IncrementTuple, KeyValueDBTuple } from '@naturalcycles/db-lib';
2
- import type { ReadableTyped } from '@naturalcycles/nodejs-lib';
2
+ import type { ReadableTyped } from '@naturalcycles/nodejs-lib/stream';
3
3
  import type { RedisKeyValueDBCfg } from './redisKeyValueDB.js';
4
4
  /**
5
5
  * RedisHashKeyValueDB is a KeyValueDB implementation that uses hash fields to simulate tables.
@@ -1,5 +1,5 @@
1
1
  import type { CommonDBCreateOptions, CommonKeyValueDB, CommonKeyValueDBSaveBatchOptions, IncrementTuple, KeyValueDBTuple } from '@naturalcycles/db-lib';
2
- import type { ReadableTyped } from '@naturalcycles/nodejs-lib';
2
+ import type { ReadableTyped } from '@naturalcycles/nodejs-lib/stream';
3
3
  import type { RedisClient } from './redisClient.js';
4
4
  export interface RedisKeyValueDBCfg {
5
5
  client: RedisClient;
package/package.json CHANGED
@@ -4,13 +4,16 @@
4
4
  "dependencies": {
5
5
  "@naturalcycles/db-lib": "^10",
6
6
  "@naturalcycles/js-lib": "^15",
7
- "@naturalcycles/nodejs-lib": "^14",
7
+ "@naturalcycles/nodejs-lib": "^15",
8
8
  "ioredis": "^5",
9
9
  "tslib": "^2"
10
10
  },
11
11
  "devDependencies": {
12
12
  "@naturalcycles/dev-lib": "*",
13
- "@types/node": "^22"
13
+ "@types/node": "^24"
14
+ },
15
+ "exports": {
16
+ ".": "./dist/index.js"
14
17
  },
15
18
  "files": [
16
19
  "dist",
@@ -32,9 +35,9 @@
32
35
  "directory": "packages/redis-lib"
33
36
  },
34
37
  "engines": {
35
- "node": ">=22.10"
38
+ "node": ">=22.12.0"
36
39
  },
37
- "version": "4.0.4",
40
+ "version": "4.1.1",
38
41
  "description": "Redis implementation of CommonKeyValueDB interface",
39
42
  "author": "Natural Cycles Team",
40
43
  "license": "MIT",
@@ -43,7 +46,8 @@
43
46
  "test": "dev-lib test",
44
47
  "lint": "dev-lib lint",
45
48
  "bt": "dev-lib bt",
46
- "lbt": "dev-lib lbt",
47
- "check": "dev-lib lbt"
49
+ "clean": "dev-lib clean",
50
+ "typecheck": "dev-lib typecheck",
51
+ "check": "dev-lib check"
48
52
  }
49
53
  }
@@ -10,7 +10,7 @@ import type {
10
10
  UnixTimestamp,
11
11
  } from '@naturalcycles/js-lib'
12
12
  import { _stringMapEntries } from '@naturalcycles/js-lib'
13
- import type { ReadableTyped } from '@naturalcycles/nodejs-lib'
13
+ import type { ReadableTyped } from '@naturalcycles/nodejs-lib/stream'
14
14
  import type { Redis, RedisOptions } from 'ioredis'
15
15
  import type { ScanStreamOptions } from 'ioredis/built/types.js'
16
16
  import type { ChainableCommander } from 'ioredis/built/utils/RedisCommander.js'
@@ -298,7 +298,7 @@ export class RedisClient implements CommonClient {
298
298
  * Like scanStream, but flattens the stream of keys.
299
299
  */
300
300
  scanStreamFlat(opt: ScanStreamOptions): ReadableTyped<string> {
301
- // biome-ignore lint/correctness/noFlatMapIdentity: ok
301
+ // biome-ignore lint/complexity/noFlatMapIdentity: ok
302
302
  return this.scanStream(opt).flatMap(keys => keys)
303
303
  }
304
304
 
@@ -6,7 +6,7 @@ import type {
6
6
  KeyValueDBTuple,
7
7
  } from '@naturalcycles/db-lib'
8
8
  import { commonKeyValueDBFullSupport } from '@naturalcycles/db-lib'
9
- import type { ReadableTyped } from '@naturalcycles/nodejs-lib'
9
+ import type { ReadableTyped } from '@naturalcycles/nodejs-lib/stream'
10
10
  import type { RedisKeyValueDBCfg } from './redisKeyValueDB.js'
11
11
 
12
12
  /**
@@ -7,7 +7,7 @@ import type {
7
7
  } from '@naturalcycles/db-lib'
8
8
  import { commonKeyValueDBFullSupport } from '@naturalcycles/db-lib'
9
9
  import { _isTruthy, _zip } from '@naturalcycles/js-lib'
10
- import type { ReadableTyped } from '@naturalcycles/nodejs-lib'
10
+ import type { ReadableTyped } from '@naturalcycles/nodejs-lib/stream'
11
11
  import type { RedisClient } from './redisClient.js'
12
12
 
13
13
  export interface RedisKeyValueDBCfg {