Skip to content

Provide a synchronous CommonJS entry point for ProcessRunner.sync #189

Description

@konard

Reproduction

With the published JavaScript package (command-stream@0.18.0) from a CommonJS Node host:

$ node -e 'require("command-stream")'
Error [ERR_REQUIRE_ESM]: require() of ES Module .../command-stream/src/$.mjs not supported

The package exports only the ESM entry point. import("command-stream") works, but is necessarily asynchronous, so a CommonJS host cannot use the otherwise supported synchronous ProcessRunner.sync() API at an existing synchronous launch-time probe boundary.

Requested interface

Please expose a CommonJS-compatible entry point (or document another supported synchronous loader) so CommonJS consumers can use ProcessRunner.sync() without redesigning a synchronous public API.

Downstream workaround

link-assistant/formal-ai#990 uses dynamic import for every asynchronous production command and retains spawnSync only for synchronous availability/version probes.

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