@pluv/persistence-redis 1.0.0 → 1.0.2

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
 
2
- > @pluv/persistence-redis@1.0.0 build /home/runner/work/pluv/pluv/packages/persistence-redis
2
+ > @pluv/persistence-redis@1.0.2 build /home/runner/work/pluv/pluv/packages/persistence-redis
3
3
  > tsup src/index.ts --format esm,cjs --dts
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -8,11 +8,11 @@
8
8
  CLI Target: es6
9
9
  ESM Build start
10
10
  CJS Build start
11
- CJS dist/index.js 5.83 KB
12
- CJS ⚡️ Build success in 70ms
13
11
  ESM dist/index.mjs 4.81 KB
14
- ESM ⚡️ Build success in 70ms
12
+ ESM ⚡️ Build success in 73ms
13
+ CJS dist/index.js 5.83 KB
14
+ CJS ⚡️ Build success in 73ms
15
15
  DTS Build start
16
- DTS ⚡️ Build success in 4900ms
16
+ DTS ⚡️ Build success in 4808ms
17
17
  DTS dist/index.d.mts 1.17 KB
18
18
  DTS dist/index.d.ts 1.17 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @pluv/persistence-redis
2
2
 
3
+ ## 1.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - @pluv/io@1.0.2
8
+ - @pluv/types@1.0.2
9
+
10
+ ## 1.0.1
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies [c583be9]
15
+ - @pluv/io@1.0.1
16
+ - @pluv/types@1.0.1
17
+
3
18
  ## 1.0.0
4
19
 
5
20
  ### Major Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pluv/persistence-redis",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "@pluv/io crdt storage persistence for node.js",
5
5
  "author": "leedavidcs",
6
6
  "license": "MIT",
@@ -18,8 +18,8 @@
18
18
  },
19
19
  "dependencies": {
20
20
  "@types/node": "^22.15.3",
21
- "@pluv/io": "^1.0.0",
22
- "@pluv/types": "^1.0.0"
21
+ "@pluv/io": "^1.0.2",
22
+ "@pluv/types": "^1.0.2"
23
23
  },
24
24
  "peerDependencies": {
25
25
  "ioredis": "^5.0.0"
@@ -29,8 +29,8 @@
29
29
  "ioredis": "^5.6.1",
30
30
  "tsup": "^8.4.0",
31
31
  "typescript": "^5.8.3",
32
- "@pluv/tsconfig": "^1.0.0",
33
- "eslint-config-pluv": "^1.0.0"
32
+ "@pluv/tsconfig": "^1.0.2",
33
+ "eslint-config-pluv": "^1.0.2"
34
34
  },
35
35
  "scripts": {
36
36
  "build": "tsup src/index.ts --format esm,cjs --dts",
@@ -26,7 +26,11 @@ export class PersistenceRedis extends AbstractPersistence {
26
26
  this._client = client;
27
27
  }
28
28
 
29
- public async addUser(room: string, connectionId: string, user: JsonObject | null): Promise<void> {
29
+ public async addUser(
30
+ room: string,
31
+ connectionId: string,
32
+ user: JsonObject | null,
33
+ ): Promise<void> {
30
34
  if (!this._initialized) return;
31
35
 
32
36
  await this._initialized;
@@ -108,7 +112,9 @@ export class PersistenceRedis extends AbstractPersistence {
108
112
  return !data ? null : JSON.parse(data);
109
113
  }
110
114
 
111
- public async getUsers(room: string): Promise<Map<[connectionId: string][0], JsonObject | null>> {
115
+ public async getUsers(
116
+ room: string,
117
+ ): Promise<Map<[connectionId: string][0], JsonObject | null>> {
112
118
  if (!this._initialized) return new Map();
113
119
 
114
120
  await this._initialized;
@@ -1,4 +1,7 @@
1
- export const partitionByLength = <T>(arr: readonly T[] | T[], length: number): readonly (readonly T[])[] => {
1
+ export const partitionByLength = <T>(
2
+ arr: readonly T[] | T[],
3
+ length: number,
4
+ ): readonly (readonly T[])[] => {
2
5
  if (!arr.length) return [];
3
6
 
4
7
  const head = arr.slice(0, length);