Skip to content

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

Merged
antonmedv merged 14 commits intogoogle:mainfrom
antongolub:superpipe
Oct 29, 2024
Merged

feat: support pipe splitting (like tee) and delayed piping#914
antonmedv merged 14 commits intogoogle:mainfrom
antongolub:superpipe

Conversation

@antongolub
Copy link
Copy Markdown
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
@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