@pluv/persistence-redis 0.44.2 → 1.0.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
 
2
- > @pluv/persistence-redis@0.44.2 build /home/runner/work/pluv/pluv/packages/persistence-redis
2
+ > @pluv/persistence-redis@1.0.1 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
- ESM dist/index.mjs 4.81 KB
12
- ESM ⚡️ Build success in 91ms
13
11
  CJS dist/index.js 5.83 KB
14
- CJS ⚡️ Build success in 86ms
12
+ CJS ⚡️ Build success in 105ms
13
+ ESM dist/index.mjs 4.81 KB
14
+ ESM ⚡️ Build success in 105ms
15
15
  DTS Build start
16
- DTS ⚡️ Build success in 5162ms
16
+ DTS ⚡️ Build success in 4402ms
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,29 @@
1
1
  # @pluv/persistence-redis
2
2
 
3
+ ## 1.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [c583be9]
8
+ - @pluv/io@1.0.1
9
+ - @pluv/types@1.0.1
10
+
11
+ ## 1.0.0
12
+
13
+ ### Major Changes
14
+
15
+ - af94706: pluv.io is now stable and production ready!
16
+
17
+ With this v1 release, pluv.io will now follow [semantic versioning](https://semver.org/) with more comprehensive release notes for future changes to the library.
18
+
19
+ Checkout the [full documentation here](https://pluv.io/docs/introduction) to get started today!
20
+
21
+ ### Patch Changes
22
+
23
+ - Updated dependencies [af94706]
24
+ - @pluv/io@1.0.0
25
+ - @pluv/types@1.0.0
26
+
3
27
  ## 0.44.2
4
28
 
5
29
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pluv/persistence-redis",
3
- "version": "0.44.2",
3
+ "version": "1.0.1",
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": "^0.44.2",
22
- "@pluv/types": "^0.44.2"
21
+ "@pluv/io": "^1.0.1",
22
+ "@pluv/types": "^1.0.1"
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": "^0.44.2",
33
- "eslint-config-pluv": "^0.44.2"
32
+ "@pluv/tsconfig": "^1.0.1",
33
+ "eslint-config-pluv": "^1.0.1"
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);