Skip to content

docs: clarify JSON output stream behavior - #1522

Closed
rksharma-owg wants to merge 1 commit into
google:mainfrom
rksharma-owg:codex/docs-1505-json-streams
Closed

rksharma-owg wants to merge 1 commit into
google:mainfrom
rksharma-owg:codex/docs-1505-json-streams

Conversation

@rksharma-owg

Copy link
Copy Markdown

Related to #1505; documents the current behavior discussed in #1511 without changing the API.

The output formatters consume combined stdout and stderr (stdall). This means .json() can throw when a command writes valid JSON to stdout and progress messages to stderr. The two documentation pages now explain this and show JSON.parse(output.stdout) as the workaround.

The example was checked using a real child process that emits JSON on stdout and progress on stderr: parsing stdout succeeds and .json() throws. Current main uses the same implementation. No runtime code or dependencies change.

Validation compares the contribution with unchanged main (65fc542d88baac578967e22bea28cb610976578c) using the same Node 24/Linux checks. Build, formatting, size, license, types, and circular-dependency checks passed in the initial comparison. Unit/coverage, dependency audit, and docs build failed on both trees; the docs build reports the same esbuild target/destructuring error. These failures have not been hidden or repaired in this documentation change.

The completed comparison is 37560134507, which tested e39da1cf31566246dc52463fa44b2bdcdb690521. The signed contribution e5ba4fbd7b21748aa499d057decee5a661544ff2 has exactly the same file tree. A fresh signed-head comparison has been triggered but is queued without assigned runners; it is not counted as passing.

This PR is a draft: the Tests and Review declarations below remain unchecked.

  • Setup Set the latest Node.js LTS version.
  • Build: I’ve run npm build before committing and verified the bundle updates correctly.
  • Tests: I’ve run test and confirmed all tests succeed. Added tests to cover my changes if needed.
  • Docs: I’ve added or updated relevant documentation as needed.
  • Sign Commits have verified signatures and follow conventional commits spec.
  • CoC: My changes follow the project’s coding guidelines and Code of Conduct.
  • Review: This PR represents original work and is not solely generated by AI tools.

@antongolub antongolub closed this Oct 7, 2026
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