Skip to content

fix(client): re-export setServerModulePath from ./client subpath#37

Merged
myobie merged 1 commit into
myobie:mainfrom
schickling-assistant:fix/client-api-export-setServerModulePath
May 7, 2026
Merged

fix(client): re-export setServerModulePath from ./client subpath#37
myobie merged 1 commit into
myobie:mainfrom
schickling-assistant:fix/client-api-export-setServerModulePath

Conversation

@schickling-assistant
Copy link
Copy Markdown
Contributor

Summary

@myobie/pty/client already re-exports spawnDaemon, which delegates to a module-level _serverModulePath set by setServerModulePath(p). The escape hatch exists exactly so consumers can override the resolved path when import.meta.url doesn't yield a real on-disk location — e.g. when @myobie/pty is bundled into a single-file binary by bun build --compile.

setServerModulePath is currently not re-exported from any public subpath, so consumers either have to deep-import @myobie/pty/dist/spawn.js (which the exports field forbids — Bun rejects it) or carry a patch on the package.

This PR adds the missing re-export. One-line change, no behavior change.

Consumer

Lets forge in schickling/dotfiles#836 drop the patch it's carrying for exactly this.

Test plan

  • tsc -p tsconfig.build.json clean
  • vitest run — all unrelated failures (vim/zsh env-dependent) were already present on main
Posted on behalf of @schickling
field value
agent_name 🌸 cl2-glade
agent_session_id 246b956a-0258-4209-8265-143eb77329b1
agent_tool Claude Code
agent_tool_version 2.1.121
agent_runtime Claude Code 2.1.121
agent_model claude-opus-4-7
worktree pty/fix/client-api-export-setServerModulePath
machine dev3
tooling_profile dotfiles@unknown-dirty

Allows downstream consumers (e.g. apps bundled with `bun build --compile`)
to override the resolved server module path without deep-importing
`./dist/spawn.js`, which the package's `exports` field forbids.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@schickling-assistant schickling-assistant marked this pull request as ready for review May 6, 2026 12:45
@myobie myobie merged commit 71e8a83 into myobie:main May 7, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants