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.
Reproduction
Importing the published JavaScript package's only public entry point (
command-stream@0.18.0) eagerly importsterminal-capture.mjs, even when the consumer only usesProcessRunner:That pulls
@resvg/resvg-jsandnode-ptynative dependencies into a bundle. A cross-platform VS Code extension cannot bundle the resulting.nodebinaries: 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-runnerthat initializesProcessRunnerwithout 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_processrunner until a lightweight public entry point can be safely packaged. Its packaging test reproduces the limitation.