@pluv/client 0.38.2 → 0.38.3

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/client@0.38.2 build /home/runner/work/pluv/pluv/packages/client
2
+ > @pluv/client@0.38.3 build /home/runner/work/pluv/pluv/packages/client
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 49.27 KB
12
- CJS ⚡️ Build success in 92ms
13
- ESM dist/index.mjs 47.95 KB
14
- ESM ⚡️ Build success in 93ms
11
+ CJS dist/index.js 49.48 KB
12
+ CJS ⚡️ Build success in 118ms
13
+ ESM dist/index.mjs 48.17 KB
14
+ ESM ⚡️ Build success in 119ms
15
15
  DTS Build start
16
- DTS ⚡️ Build success in 3285ms
16
+ DTS ⚡️ Build success in 3259ms
17
17
  DTS dist/index.d.mts 23.16 KB
18
18
  DTS dist/index.d.ts 23.16 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @pluv/client
2
2
 
3
+ ## 0.38.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 8346273: Disallow the `# @pluv/client character in router event names.
8
+ - @pluv/crdt@0.38.3
9
+ - @pluv/types@0.38.3
10
+
3
11
  ## 0.38.2
4
12
 
5
13
  ### Patch Changes
package/dist/index.js CHANGED
@@ -1265,6 +1265,10 @@ var PluvClient = class {
1265
1265
  return new PluvProcedure();
1266
1266
  }
1267
1267
  router(events) {
1268
+ const invalidName = Object.keys(events).find((name) => name.includes("$"));
1269
+ if (typeof invalidName === "string") {
1270
+ throw new Error(`Invalid event name. Event names must not contain $: "${invalidName}"`);
1271
+ }
1268
1272
  return new PluvRouter(events);
1269
1273
  }
1270
1274
  _logDebug(...data) {
package/dist/index.mjs CHANGED
@@ -1234,6 +1234,10 @@ var PluvClient = class {
1234
1234
  return new PluvProcedure();
1235
1235
  }
1236
1236
  router(events) {
1237
+ const invalidName = Object.keys(events).find((name) => name.includes("$"));
1238
+ if (typeof invalidName === "string") {
1239
+ throw new Error(`Invalid event name. Event names must not contain $: "${invalidName}"`);
1240
+ }
1237
1241
  return new PluvRouter(events);
1238
1242
  }
1239
1243
  _logDebug(...data) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pluv/client",
3
- "version": "0.38.2",
3
+ "version": "0.38.3",
4
4
  "description": "@pluv/io frontend client",
5
5
  "author": "leedavidcs",
6
6
  "license": "MIT",
@@ -18,15 +18,15 @@
18
18
  },
19
19
  "dependencies": {
20
20
  "wonka": "^6.3.5",
21
- "@pluv/crdt": "^0.38.2",
22
- "@pluv/types": "^0.38.2"
21
+ "@pluv/crdt": "^0.38.3",
22
+ "@pluv/types": "^0.38.3"
23
23
  },
24
24
  "devDependencies": {
25
25
  "eslint": "^8.57.1",
26
26
  "tsup": "^8.4.0",
27
27
  "typescript": "^5.8.2",
28
- "@pluv/tsconfig": "^0.38.2",
29
- "eslint-config-pluv": "^0.38.2"
28
+ "@pluv/tsconfig": "^0.38.3",
29
+ "eslint-config-pluv": "^0.38.3"
30
30
  },
31
31
  "scripts": {
32
32
  "build": "tsup src/index.ts --format esm,cjs --dts",
package/src/PluvClient.ts CHANGED
@@ -147,6 +147,12 @@ export class PluvClient<
147
147
  public router<TEvents extends PluvRouterEventConfig<TIO, TPresence, TStorage> = {}>(
148
148
  events: TEvents,
149
149
  ): PluvRouter<TIO, TPresence, TStorage, TEvents> {
150
+ const invalidName = Object.keys(events).find((name) => name.includes("$"));
151
+
152
+ if (typeof invalidName === "string") {
153
+ throw new Error(`Invalid event name. Event names must not contain $: "${invalidName}"`);
154
+ }
155
+
150
156
  return new PluvRouter<TIO, TPresence, TStorage, TEvents>(events);
151
157
  }
152
158