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.
Reproduction
With the published JavaScript package (
command-stream@0.18.0) from a CommonJS Node host: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 synchronousProcessRunner.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
spawnSynconly for synchronous availability/version probes.