Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support pipe splitting (like tee) and delayed piping #914

Merged
merged 14 commits into from
Oct 29, 2024

Conversation

antongolub
Copy link
Collaborator

@antongolub antongolub commented Oct 2, 2024

Status:
stage 0 proposal

Demo

const result = $`echo 1; sleep 1; echo 2; sleep 1; echo 3`
const piped1 = result.pipe`cat`
let piped2

setTimeout(() => {
  piped2 = result.pipe`cat`
}, 1500)

await piped1
assert.equal((await piped1).toString(), '1\n2\n3\n')
assert.equal((await piped2).toString(), '1\n2\n3\n')

Bound Сhanges

  • stdio: ['inherit', 'pipe', 'pipe']stdio: pipe
  • p.halt()$({halt: true})

nodejs/help#2707

  • Tests pass
  • Appropriate changes to README are included in PR

@antongolub antongolub force-pushed the superpipe branch 2 times, most recently from 4159751 to 6eb4c95 Compare October 2, 2024 21:38
@antongolub antongolub force-pushed the superpipe branch 5 times, most recently from a6d86cc to 87f8146 Compare October 3, 2024 12:18
@antongolub antongolub requested a review from antonmedv October 3, 2024 14:24
@antongolub antongolub marked this pull request as draft October 3, 2024 14:24
@antongolub antongolub changed the title draft: support pipe splitting (like tee) and delayed piping feat: support pipe splitting (like tee) and delayed piping Oct 29, 2024
@antongolub antongolub marked this pull request as ready for review October 29, 2024 15:29
@antonmedv antonmedv merged commit c38363f into google:main Oct 29, 2024
21 checks passed
@antongolub antongolub deleted the superpipe branch November 1, 2024 06:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants