feat: let piping of rejected processes - #1296
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR enables piping of rejected processes, allowing output to flow through pipes even when the source process fails. The implementation includes new error propagation mechanisms and comprehensive test coverage.
- Adds support for piping from processes that have failed with non-zero exit codes
- Introduces a new
breakmethod for controlled process termination with custom exit codes and signals - Updates pipe behavior to handle failed processes gracefully by propagating failure state
Reviewed Changes
Copilot reviewed 7 out of 9 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/core.ts | Core implementation of rejected process piping with new break method and updated pipe logic |
| build/core.cjs | Compiled JavaScript version reflecting the TypeScript changes |
| test/core.test.js | Comprehensive test cases for both fulfilled and rejected process piping scenarios |
| test/log.test.ts | Additional test for custom log handling |
| test/deps.test.js | Test for empty dependencies handling with tmpdir import |
| src/vendor-core.ts | Export of TSpawnResult type for type support |
| .size-limit.json | Updated size limits to accommodate new functionality |
Comments suppressed due to low confidence (1)
src/core.ts:384
- [nitpick] The property name '_breakData' is ambiguous. Consider a more descriptive name like '_terminationData' or '_failureState' to better indicate its purpose.
private _breakData?: Partial<
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.