diff --git a/.changeset/narrow-message-arraybufferview.md b/.changeset/narrow-message-arraybufferview.md deleted file mode 100644 index 9a0aa010..00000000 --- a/.changeset/narrow-message-arraybufferview.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"partysocket": patch ---- - -Narrow the exported `Message` type from `ArrayBufferView` to `ArrayBufferView` so it matches the DOM `WebSocket.send()` overloads under newer `@cloudflare/workers-types` / lib.dom.d.ts, where the default `ArrayBufferView` includes `SharedArrayBuffer`-backed views that `send()` does not accept. Runtime behaviour is unchanged — `WebSocket.send()` already rejected shared-buffer views at runtime. diff --git a/.changeset/partysync-rename-agent-connect.md b/.changeset/partysync-rename-agent-connect.md deleted file mode 100644 index 3a33af5c..00000000 --- a/.changeset/partysync-rename-agent-connect.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"partysync": patch ---- - -Rename `Agent#connect(namespace, room)` to `Agent#connectTo(namespace, room)`. The base `DurableObject` class in `@cloudflare/workers-types` now declares `connect?(socket: Socket): void | Promise` for TCP socket bindings, which collided with our override and produced a `TS2416` "not assignable to the same property in base type" error. The rename also better reflects the method's intent — connecting to another PartyServer by namespace + room, not accepting a TCP socket. diff --git a/.changeset/partytracks-workers-types-compat.md b/.changeset/partytracks-workers-types-compat.md deleted file mode 100644 index c0d3fdf6..00000000 --- a/.changeset/partytracks-workers-types-compat.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -"partytracks": patch ---- - -Fix type errors under newer `@cloudflare/workers-types` and TypeScript lib typings: - -- Avoid `typeof fetch` in internal signatures — CF workers-types merges `fetch` with the `Fetcher` interface (which has `fetch()` and `connect()` methods), which doesn't match a plain fetch function. Internal helpers now use an explicit `(input, init?) => Promise` signature. -- Rename the internal `fetcher` option on `fromFetch` to `fetchImpl` to avoid colliding with CF's built-in `RequestInit.fetcher?: Fetcher | null`, which was intersected in and made the property uncallable. -- Cast `Response#json()` results (which are now typed `unknown`) before destructuring `{ sessionId }` / `{ iceServers }`. - -All changes are internal; no public API changes. diff --git a/fixtures/chat/package.json b/fixtures/chat/package.json index e2a19b2e..1b610240 100644 --- a/fixtures/chat/package.json +++ b/fixtures/chat/package.json @@ -10,7 +10,7 @@ "dependencies": { "nanoid": "^5.1.9", "partyserver": "^0.4.1", - "partysocket": "^1.1.17", + "partysocket": "^1.1.18", "react": "^19.2.5", "react-dom": "^19.2.5" }, diff --git a/fixtures/globe/package.json b/fixtures/globe/package.json index cd1f2b76..10acbfe1 100644 --- a/fixtures/globe/package.json +++ b/fixtures/globe/package.json @@ -10,7 +10,7 @@ "dependencies": { "cobe": "^2.0.1", "partyserver": "^0.4.1", - "partysocket": "^1.1.17", + "partysocket": "^1.1.18", "react": "^19.2.5", "react-dom": "^19.2.5" }, diff --git a/fixtures/hono/package.json b/fixtures/hono/package.json index 23c2eca8..dc89c4a8 100644 --- a/fixtures/hono/package.json +++ b/fixtures/hono/package.json @@ -11,7 +11,7 @@ "hono": "^4.12.14", "hono-party": "^2.0.3", "partyserver": "^0.4.1", - "partysocket": "^1.1.17", + "partysocket": "^1.1.18", "react": "^19.2.5", "react-dom": "^19.2.5" }, diff --git a/fixtures/monaco-yjs/package.json b/fixtures/monaco-yjs/package.json index 5ce7a90a..816f49a8 100644 --- a/fixtures/monaco-yjs/package.json +++ b/fixtures/monaco-yjs/package.json @@ -10,7 +10,7 @@ }, "dependencies": { "monaco-editor": "^0.55.1", - "partysocket": "^1.1.17", + "partysocket": "^1.1.18", "y-monaco": "^0.1.6" } } diff --git a/fixtures/node/package.json b/fixtures/node/package.json index ac65139d..61ea4e76 100644 --- a/fixtures/node/package.json +++ b/fixtures/node/package.json @@ -7,6 +7,6 @@ "types": "wrangler types env.d.ts --include-runtime false" }, "dependencies": { - "partysocket": "^1.1.17" + "partysocket": "^1.1.18" } } diff --git a/fixtures/partytracks/package.json b/fixtures/partytracks/package.json index 3a01fb0b..4e8f31c2 100644 --- a/fixtures/partytracks/package.json +++ b/fixtures/partytracks/package.json @@ -9,7 +9,7 @@ }, "dependencies": { "hono": "^4.12.14", - "partytracks": "^0.0.55", + "partytracks": "^0.0.56", "rxjs": "^7.8.2" }, "devDependencies": { diff --git a/fixtures/pubsub/package.json b/fixtures/pubsub/package.json index c72fc909..799dd558 100644 --- a/fixtures/pubsub/package.json +++ b/fixtures/pubsub/package.json @@ -9,6 +9,6 @@ }, "dependencies": { "nanoid": "^5.1.9", - "partysocket": "^1.1.17" + "partysocket": "^1.1.18" } } diff --git a/fixtures/tldraw/package.json b/fixtures/tldraw/package.json index 272ff7a9..19b84cfd 100644 --- a/fixtures/tldraw/package.json +++ b/fixtures/tldraw/package.json @@ -8,7 +8,7 @@ }, "dependencies": { "partyserver": "^0.4.1", - "partysocket": "^1.1.17", + "partysocket": "^1.1.18", "react": "^19.2.5", "react-dom": "^19.2.5", "tldraw": "^4.5.9" diff --git a/fixtures/todo-sync/package.json b/fixtures/todo-sync/package.json index 470b333f..7ff55a74 100644 --- a/fixtures/todo-sync/package.json +++ b/fixtures/todo-sync/package.json @@ -11,8 +11,8 @@ "nanoid": "^5.1.9", "partyfn": "^0.1.0", "partyserver": "^0.4.1", - "partysocket": "^1.1.17", - "partysync": "^2.0.2", + "partysocket": "^1.1.18", + "partysync": "^2.0.3", "react": "^19.2.5", "react-dom": "^19.2.5", "valibot": "^1.3.1" diff --git a/fixtures/video-echo/package.json b/fixtures/video-echo/package.json index 06ae919f..d2cb58b0 100644 --- a/fixtures/video-echo/package.json +++ b/fixtures/video-echo/package.json @@ -8,7 +8,7 @@ "start": "vite dev " }, "dependencies": { - "partytracks": "^0.0.55", + "partytracks": "^0.0.56", "react": "^19.2.5", "react-dom": "^19.2.5" }, diff --git a/package-lock.json b/package-lock.json index 7c141e5f..8516b829 100644 --- a/package-lock.json +++ b/package-lock.json @@ -42,7 +42,7 @@ "dependencies": { "nanoid": "^5.1.9", "partyserver": "^0.4.1", - "partysocket": "^1.1.17", + "partysocket": "^1.1.18", "react": "^19.2.5", "react-dom": "^19.2.5" }, @@ -77,7 +77,7 @@ "dependencies": { "cobe": "^2.0.1", "partyserver": "^0.4.1", - "partysocket": "^1.1.17", + "partysocket": "^1.1.18", "react": "^19.2.5", "react-dom": "^19.2.5" }, @@ -94,7 +94,7 @@ "hono": "^4.12.14", "hono-party": "^2.0.3", "partyserver": "^0.4.1", - "partysocket": "^1.1.17", + "partysocket": "^1.1.18", "react": "^19.2.5", "react-dom": "^19.2.5" }, @@ -122,7 +122,7 @@ "version": "0.0.0", "dependencies": { "monaco-editor": "^0.55.1", - "partysocket": "^1.1.17", + "partysocket": "^1.1.18", "y-monaco": "^0.1.6" } }, @@ -130,7 +130,7 @@ "name": "@partyserver/fixture-node", "version": "0.0.0", "dependencies": { - "partysocket": "^1.1.17" + "partysocket": "^1.1.18" } }, "fixtures/partytracks": { @@ -138,7 +138,7 @@ "version": "0.0.28", "dependencies": { "hono": "^4.12.14", - "partytracks": "^0.0.55", + "partytracks": "^0.0.56", "rxjs": "^7.8.2" }, "devDependencies": { @@ -150,7 +150,7 @@ "version": "0.0.0", "dependencies": { "nanoid": "^5.1.9", - "partysocket": "^1.1.17" + "partysocket": "^1.1.18" } }, "fixtures/pubsub/node_modules/nanoid": { @@ -206,7 +206,7 @@ "version": "0.0.11", "dependencies": { "partyserver": "^0.4.1", - "partysocket": "^1.1.17", + "partysocket": "^1.1.18", "react": "^19.2.5", "react-dom": "^19.2.5", "tldraw": "^4.5.9" @@ -223,8 +223,8 @@ "nanoid": "^5.1.9", "partyfn": "^0.1.0", "partyserver": "^0.4.1", - "partysocket": "^1.1.17", - "partysync": "^2.0.2", + "partysocket": "^1.1.18", + "partysync": "^2.0.3", "react": "^19.2.5", "react-dom": "^19.2.5", "valibot": "^1.3.1" @@ -256,7 +256,7 @@ "fixtures/video-echo": { "name": "@partyserver/fixture-video-echo", "dependencies": { - "partytracks": "^0.0.55", + "partytracks": "^0.0.56", "react": "^19.2.5", "react-dom": "^19.2.5" }, @@ -11458,7 +11458,7 @@ "license": "ISC" }, "packages/partysocket": { - "version": "1.1.17", + "version": "1.1.18", "license": "MIT", "dependencies": { "event-target-polyfill": "^0.0.4" @@ -11491,7 +11491,7 @@ } }, "packages/partysync": { - "version": "2.0.2", + "version": "2.0.3", "license": "ISC", "dependencies": { "idb": "^8.0.3", @@ -11501,7 +11501,7 @@ "@cloudflare/workers-types": "^4.20260420.1", "partyfn": "^0.1.0", "partyserver": "^0.4.1", - "partysocket": "^1.1.17" + "partysocket": "^1.1.18" }, "peerDependencies": { "@cloudflare/workers-types": "^4.20240729.0", @@ -11529,7 +11529,7 @@ } }, "packages/partytracks": { - "version": "0.0.55", + "version": "0.0.56", "license": "ISC", "dependencies": { "cookie": "^1.1.1", diff --git a/packages/partysocket/CHANGELOG.md b/packages/partysocket/CHANGELOG.md index 9eb17c2d..65d34c3c 100644 --- a/packages/partysocket/CHANGELOG.md +++ b/packages/partysocket/CHANGELOG.md @@ -1,5 +1,11 @@ # partysocket +## 1.1.18 + +### Patch Changes + +- [#374](https://github.com/cloudflare/partykit/pull/374) [`c05d86a`](https://github.com/cloudflare/partykit/commit/c05d86af9b70af41bd47fbb127acdecc3cacd2cf) Thanks [@threepointone](https://github.com/threepointone)! - Narrow the exported `Message` type from `ArrayBufferView` to `ArrayBufferView` so it matches the DOM `WebSocket.send()` overloads under newer `@cloudflare/workers-types` / lib.dom.d.ts, where the default `ArrayBufferView` includes `SharedArrayBuffer`-backed views that `send()` does not accept. Runtime behaviour is unchanged — `WebSocket.send()` already rejected shared-buffer views at runtime. + ## 1.1.17 ### Patch Changes @@ -325,6 +331,7 @@ ### Patch Changes - [#251](https://github.com/partykit/partykit/pull/251) [`049bcac`](https://github.com/partykit/partykit/commit/049bcac42aa49e4bddec975c63b7d7984112e450) Thanks [@threepointone](https://github.com/threepointone)! - small tweaks to `init` + - replace `process.env.PARTYKIT_HOST` with just `PARTYKIT_HOST` - add a `tsconfig.json` - add partykit to devDependencies in `init` @@ -345,6 +352,7 @@ - [#211](https://github.com/partykit/partykit/pull/211) [`fffe721`](https://github.com/partykit/partykit/commit/fffe72148e5cc425e80c90b6bf180192df410080) Thanks [@threepointone](https://github.com/threepointone)! - update dependencies - [#191](https://github.com/partykit/partykit/pull/191) [`39cf5ce`](https://github.com/partykit/partykit/commit/39cf5cebf5e699bc50ace8b6d25cd82c807e863a) Thanks [@jevakallio](https://github.com/jevakallio)! - Improve PartySocket types and React hooks API: + - Add websocket lifecycle event handlers to usePartyKit options to reduce need for effects in userland - Allow usePartySocket to provide startClosed option to initialize without opening connection - Fix types for PartySocket#removeEventListener diff --git a/packages/partysocket/package.json b/packages/partysocket/package.json index 3b6f5352..d2e40a3d 100644 --- a/packages/partysocket/package.json +++ b/packages/partysocket/package.json @@ -1,6 +1,6 @@ { "name": "partysocket", - "version": "1.1.17", + "version": "1.1.18", "description": "A better WebSocket that Just Works™", "homepage": "https://docs.partykit.io/reference/partysocket-api", "bugs": "https://github.com/cloudflare/partykit/issues", diff --git a/packages/partysync/CHANGELOG.md b/packages/partysync/CHANGELOG.md index b9c98f89..a0eb4fd0 100644 --- a/packages/partysync/CHANGELOG.md +++ b/packages/partysync/CHANGELOG.md @@ -1,5 +1,11 @@ # partysync +## 2.0.3 + +### Patch Changes + +- [#374](https://github.com/cloudflare/partykit/pull/374) [`c05d86a`](https://github.com/cloudflare/partykit/commit/c05d86af9b70af41bd47fbb127acdecc3cacd2cf) Thanks [@threepointone](https://github.com/threepointone)! - Rename `Agent#connect(namespace, room)` to `Agent#connectTo(namespace, room)`. The base `DurableObject` class in `@cloudflare/workers-types` now declares `connect?(socket: Socket): void | Promise` for TCP socket bindings, which collided with our override and produced a `TS2416` "not assignable to the same property in base type" error. The rename also better reflects the method's intent — connecting to another PartyServer by namespace + room, not accepting a TCP socket. + ## 2.0.2 ### Patch Changes diff --git a/packages/partysync/package.json b/packages/partysync/package.json index 376dfb58..04e183b3 100644 --- a/packages/partysync/package.json +++ b/packages/partysync/package.json @@ -1,6 +1,6 @@ { "name": "partysync", - "version": "2.0.2", + "version": "2.0.3", "description": "", "keywords": [ "durable-objects", @@ -52,7 +52,7 @@ "@cloudflare/workers-types": "^4.20260420.1", "partyfn": "^0.1.0", "partyserver": "^0.4.1", - "partysocket": "^1.1.17" + "partysocket": "^1.1.18" }, "peerDependencies": { "@cloudflare/workers-types": "^4.20240729.0", diff --git a/packages/partytracks/CHANGELOG.md b/packages/partytracks/CHANGELOG.md index 8240aac1..2ae4963d 100644 --- a/packages/partytracks/CHANGELOG.md +++ b/packages/partytracks/CHANGELOG.md @@ -1,5 +1,17 @@ # partytracks +## 0.0.56 + +### Patch Changes + +- [#374](https://github.com/cloudflare/partykit/pull/374) [`c05d86a`](https://github.com/cloudflare/partykit/commit/c05d86af9b70af41bd47fbb127acdecc3cacd2cf) Thanks [@threepointone](https://github.com/threepointone)! - Fix type errors under newer `@cloudflare/workers-types` and TypeScript lib typings: + + - Avoid `typeof fetch` in internal signatures — CF workers-types merges `fetch` with the `Fetcher` interface (which has `fetch()` and `connect()` methods), which doesn't match a plain fetch function. Internal helpers now use an explicit `(input, init?) => Promise` signature. + - Rename the internal `fetcher` option on `fromFetch` to `fetchImpl` to avoid colliding with CF's built-in `RequestInit.fetcher?: Fetcher | null`, which was intersected in and made the property uncallable. + - Cast `Response#json()` results (which are now typed `unknown`) before destructuring `{ sessionId }` / `{ iceServers }`. + + All changes are internal; no public API changes. + ## 0.0.55 ### Patch Changes @@ -20,6 +32,7 @@ - [#285](https://github.com/cloudflare/partykit/pull/285) [`9a62501`](https://github.com/cloudflare/partykit/commit/9a625016f51ba3f016e002f546a2a31e139a20db) Thanks [@third774](https://github.com/third774)! - Fix Safari compatibility by adding setSinkId feature detection to createAudioSink The createAudioSink utility now gracefully handles browsers that don't support the setSinkId API (primarily Safari on mobile and desktop). + - Added checkSinkIdSupport helper to detect setSinkId availability - Added isSinkIdSupported property to SinkApi interface - Wrapped setSinkId calls with feature detection to prevent crashes @@ -124,6 +137,7 @@ - [#216](https://github.com/cloudflare/partykit/pull/216) [`964a1c4`](https://github.com/cloudflare/partykit/commit/964a1c491b3206bf82dcd63f12a328477baa9896) Thanks [@third774](https://github.com/third774)! - Change useOnEmit to useObservable, and allow for error and complete callbacks - [#216](https://github.com/cloudflare/partykit/pull/216) [`fb6adc2`](https://github.com/cloudflare/partykit/commit/fb6adc2af78b3d1027e3c145f41c9ab916b92013) Thanks [@third774](https://github.com/third774)! - - Add getMic, getCamera, and createAudioSink utils. + - Lock sessions to their initiator via a cookie w/ JWT. - Fixed a bug where toggling a device off and on rapidly could leave it in a "stuck on" state. @@ -195,6 +209,7 @@ ### Patch Changes - [#186](https://github.com/threepointone/partyserver/pull/186) [`bdfcdce`](https://github.com/threepointone/partyserver/commit/bdfcdce562f84a94ceb4bc03be133a82d8969839) Thanks [@third774](https://github.com/third774)! - - Enable sending simulcast via sendEncodings + - Change encodings$ when pushing a track to not be an observable (changing requires renegotiation anyways) - [#186](https://github.com/threepointone/partyserver/pull/186) [`e5045fd`](https://github.com/threepointone/partyserver/commit/e5045fd052bdb8369b6cfaf54d4c619d3ac32a81) Thanks [@third774](https://github.com/third774)! - Enable pulling simulcast tracks with preferredRid diff --git a/packages/partytracks/package.json b/packages/partytracks/package.json index 46696498..5d53b91f 100644 --- a/packages/partytracks/package.json +++ b/packages/partytracks/package.json @@ -1,6 +1,6 @@ { "name": "partytracks", - "version": "0.0.55", + "version": "0.0.56", "scripts": { "check:test": "(cd tests; vitest --no-watch)", "prebuild": "rm -rf dist",