Skip to content

Expose ProcessRunner without eager native terminal dependencies #192

Description

@konard

Reproduction

Importing the published JavaScript package's only public entry point (command-stream@0.18.0) eagerly imports terminal-capture.mjs, even when the consumer only uses ProcessRunner:

const { ProcessRunner } = await import("command-stream");

That pulls @resvg/resvg-js and node-pty native dependencies into a bundle. A cross-platform VS Code extension cannot bundle the resulting .node binaries: esbuild fails without a native loader, and packaging the host platform's native binary would make the VSIX platform-specific.

Requested interface

Please expose a supported lightweight subpath such as command-stream/process-runner that initializes ProcessRunner without importing the optional PTY, terminal rendering, GIF, or SVG features. Alternatively, make those feature modules lazy.

Downstream workaround

link-assistant/formal-ai#990 adopts the shared command-stream adapter in Electron, but temporarily excludes the cross-platform VS Code host and retains its existing child_process runner until a lightweight public entry point can be safely packaged. Its packaging test reproduces the limitation.

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