Skip to content

fix: remove the ignored namespace option #409

Closed

Description

@electrohyun

Description

ConnectOptions.namespace is public and accepted by TypeScript, but connect(url, options) always derives the namespace from the URL pathname and ignores this property. A compiling call can therefore connect to / while its author requested /game. The ignored property should be removed from the public contract; direct-connection fixtures can use an internal-only option type.

Reproduction

import { connect } from 'smocket';

connect('http://localhost:3000', { namespace: '/game' });
// The client connects to `/`, not `/game`.

smocket version

0.5.1

Environment

Node 24.11.1, Vitest 4.1.10

Activity

  1. added this to the v1.0.0 milestone on Aug 26, 2026
  2. added
    bug
    on Aug 26, 2026
  3. moved this from Backlog to In progress in smocketon Aug 26, 2026
  4. moved this from In progress to Done in smocketon Aug 26, 2026
  5. self-assigned this
    on Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

  • Status
    Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions