Skip to content

partysub client not implemented (stub with console.error) #364

Description

@joeblew999

Package: partysub@2.0.2

The server side (partysub/server) works great — createPubSubServer() creates a working pub/sub DO with topic filtering. We have passing tests.

The client side (partysub/client) is a stub:

// node_modules/partysub/dist/client/index.js
console.error("To be implemented");
export {  };

Expected: A client-side API for subscribing to topics and receiving messages, matching the server's createPubSubServer. Something like:

import { PubSubClient } from 'partysub/client';

const client = new PubSubClient({ host: 'localhost:1999', room: 'my-room' });
client.subscribe('updates', (data) => console.log(data));
client.publish('updates', { text: 'hello' });

Workaround: We use raw WebSocket with ?topics= URL params and JSON message parsing. Works but not DX-friendly.

Context: Testing all PartyKit packages. Server tests pass, but can't test the official client API because it doesn't exist. See our pubsub tests.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions