We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
With #695, we just added line-wise transforms. However, this does not cover childProcess.std*.
childProcess.std*
const childProcess = execa('...') for await (const chunk of childProcess.stdout) { console.log(chunk) // Buffer, and not line-wise }
What are your thoughts on adding the following?
const childProcess = execa('...', {lines: true}) for await (const line of childProcess.stdout) { console.log(line) // String, and line-wise }
This would work also for childProcess.stdout.read(), childProcess.stdout.on('data') and when redirecting from/to Node.js/web streams.
childProcess.stdout.read()
childProcess.stdout.on('data')
const writableStream = new Writable({ write(line, encoding, done) { console.log(line) // String, and line-wise done() } }) await execa('...', {lines: true, stdout: writableStream})
This would be pretty fairly simple to implement since it can re-use most of the logic of 2 separate features:
objectMode
Under the hood, when the lines: true option is used, we would just add an internal transform that is a noop, but is both line-wise and in objectMode.
lines: true
The text was updated successfully, but these errors were encountered:
Yes, this would be nice 👍
Sorry, something went wrong.
encoding
Successfully merging a pull request may close this issue.
With #695, we just added line-wise transforms. However, this does not cover
childProcess.std*
.What are your thoughts on adding the following?
This would work also for
childProcess.stdout.read()
,childProcess.stdout.on('data')
and when redirecting from/to Node.js/web streams.This would be pretty fairly simple to implement since it can re-use most of the logic of 2 separate features:
objectMode
transform (Allow transform streams convert output to an array of any objects, instead of a single string #21)Under the hood, when the
lines: true
option is used, we would just add an internal transform that is a noop, but is both line-wise and inobjectMode
.The text was updated successfully, but these errors were encountered: