You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
y-partykit provider, via y-websocket, has its own logic for resilience etc. We could consolidate it with PartySocket which does much of the same (and better).
Maybe we won't do this because the original need was for y-partykit's onCommand, which might go away with #36
diff --git a/packages/y-partykit/src/provider.ts b/packages/y-partykit/src/provider.ts
index 334929c..de0cb6f 100644
--- a/packages/y-partykit/src/provider.ts+++ b/packages/y-partykit/src/provider.ts@@ -1,5 +1,8 @@
import { WebsocketProvider } from "y-websocket";
-import type * as Y from "yjs";+import PartySocket from "partysocket";+import * as Y from "yjs";++console.log(Y);
export default class YPartyKitProvider extends WebsocketProvider {
constructor(
@@ -20,6 +23,11 @@ export default class YPartyKitProvider extends WebsocketProvider {
} else {
options.params._pk = crypto.randomUUID();
}
- super(serverUrl, room, doc, options);+ super(serverUrl, room, doc, {+ // TODO: fix this+ // @ts-expect-error We know that this is a valid polyfill+ WebSocketPolyfill: PartySocket,+ ...options,+ });
}
}
The text was updated successfully, but these errors were encountered:
y-partykit provider, via y-websocket, has its own logic for resilience etc. We could consolidate it with PartySocket which does much of the same (and better).
Maybe we won't do this because the original need was for y-partykit's
onCommand
, which might go away with #36The text was updated successfully, but these errors were encountered: