Add .quiet() method to suppress console output#137
Conversation
Adding CLAUDE.md with task information for AI processing. This file will be removed when the task is complete. Issue: #136
This commit implements the .quiet() method on ProcessRunner, similar to zx's quiet() functionality. When called, it disables console output (mirroring) while still capturing stdout/stderr for programmatic use. Implementation details: - Added quiet() method that sets options.mirror = false - Returns this for method chaining - Works with both stdout and stderr suppression - Compatible with existing pipeline and await patterns Testing: - Created comprehensive test suite in tests/quiet-method.test.mjs - Added usage example in examples/quiet-method-demo.mjs - All existing tests pass (617 pass, 5 skip, 2 pre-existing fails) This enables the use case from issue #136: await $\`gh api gists/\${gistId} --jq '...'\`.quiet(); 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This reverts commit 4b016e1.
|
🤖 AI Work Session Started Starting automated work session at 2026-06-08T21:12:35.810Z The PR has been converted to draft mode while work is in progress. This comment marks the beginning of an AI work session. Please wait for the session to finish, and provide your feedback. |
⏳ Usage Limit ReachedThe automated solution draft was interrupted because the OpenAI Codex usage limit was reached. 📊 Limit Information
🔄 How to ContinueAuto-resume is enabled. The session will automatically resume (with context preserved) when the limit resets. 🤖 Models used:
📎 Execution log uploaded as Gist (189KB)This session was interrupted due to usage limits. The session will automatically resume when the limit resets. |
|
Resolve conflict, and double check all changes. |
|
🤖 AI Work Session Started Starting automated work session at 2026-06-09T14:15:04.991Z The PR has been converted to draft mode while work is in progress. This comment marks the beginning of an AI work session. Please wait for the session to finish, and provide your feedback. |
# Conflicts: # js/examples/quiet-method-demo.mjs # js/tests/quiet-method.test.mjs # src/$.mjs
- Document the chainable .quiet() method in README alongside mirror: false - Add a minor changeset so the feature triggers a release - Apply prettier formatting to the example
|
Resolved the merge conflicts with What happened:
Verification:
PR is now mergeable and out of draft. |
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost: $1.895667📊 Context and tokens usage:
Total: (3.6K new + 46.0K cache writes + 2.3M cache reads) input tokens, 17.2K output tokens, $1.895667 cost 🤖 Models used:
📎 Log file uploaded as Gist (1498KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
🎉 Auto-mergedThis pull request has been automatically merged by hive-mind.
Auto-merged by hive-mind with --auto-merge flag |
Summary
This PR implements the
.quiet()method onProcessRunner, providing functionality similar to zx'squiet()method. This allows users to suppress console output (terminal mirroring) for a single command while still capturing the command result programmatically.Changes
Core Implementation
.quiet()method toProcessRunnerinjs/src/$.process-runner-orchestration.mjsoptions.mirror = falseto disable console outputthisfor method chainingDocumentation
.quiet()injs/README.mdnext to the existingmirror: falseexamplesTesting
js/tests/quiet-method.test.mjs(6 tests)ProcessRunnerreturn valueExamples
js/examples/quiet-method-demo.mjsRelease
minorchangeset (js/.changeset/quiet-method.md) so the feature triggers a releaseUse Case (from Issue #136)
Notes on this update
js/package (src/$.mjswas split into multiplejs/src/$.process-runner-*.mjsmodules). This branch has been merged with the latestmainand the.quiet()implementation, test, and example were ported into the new layout. Merge conflicts are resolved and the PR is mergeable.Test Results
.quiet()tests: 6/6 passingmain(38 pre-existing/environmental failures — e.g.jqnot installed, CTRL+C signal tests — present onmaintoo). No regressions introduced.Breaking Changes
None. This is a purely additive feature.
Related
Fixes #136
🤖 Generated with Claude Code