Fix style inconsistency in API reference (#1010)
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by ehmicky · committed by GitHub · parent 2ef9186 · Browse files · 1 file·+126 added−126 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
1 file+126 added−126 removed
- other:+126 added−126 removed
Provenance
- Commit
42bea7f- Tree
4e5aaf1- Author
ehmicky <ehmicky@users.noreply.github.com>- Committer
GitHub <noreply@github.com>- Parent
2ef9186
1 file changed+126 added−126 removed
modified:docs/api.md+126 added-126 removed
97 unmodified lines98 [More info.](escaping.md#user-defined-input)99 100 ## Return value101 102-_Type_: `ResultPromise`102+_Type:_ `ResultPromise`103 104 The return value of all [asynchronous methods](#methods) is both:105 - the [subprocess](#subprocess).106 - a `Promise` either resolving with its successful [`result`](#result), or rejecting with its [`error`](#execaerror).1 unmodified line108 [More info.](execution.md#subprocess)109 110 ## Subprocess111 112-_Type_: `Subprocess`112+_Type:_ `Subprocess`113 114 [`child_process` instance](https://nodejs.org/api/child_process.html#child_process_class_childprocess) with the following methods and properties.115 116 ### subprocess\[Symbol.asyncIterator\]()48 unmodified lines165 [More info.](pipe.md#advanced-syntax)166 167 #### pipeOptions168 169-Type: `object`169+_Type:_ `object`170 171 #### pipeOptions.from172 173-Type: `"stdout" | "stderr" | "all" | "fd3" | "fd4" | ...`\174-Default: `"stdout"`173+_Type:_ `"stdout" | "stderr" | "all" | "fd3" | "fd4" | ...`\174+_Default:_ `"stdout"`175 176 Which stream to pipe from the source subprocess. A [file descriptor](https://en.wikipedia.org/wiki/File_descriptor) like `"fd3"` can also be passed.177 178 `"all"` pipes both [`stdout`](#subprocessstdout) and [`stderr`](#subprocessstderr). This requires the [`all`](#optionsall) option to be `true`.1 unmodified line180 [More info.](pipe.md#source-file-descriptor)181 182 #### pipeOptions.to183 184-Type: `"stdin" | "fd3" | "fd4" | ...`\185-Default: `"stdin"`184+_Type:_ `"stdin" | "fd3" | "fd4" | ...`\185+_Default:_ `"stdin"`186 187 Which [stream](#subprocessstdin) to pipe to the destination subprocess. A [file descriptor](https://en.wikipedia.org/wiki/File_descriptor) like `"fd3"` can also be passed.188 189 [More info.](pipe.md#destination-file-descriptor)190 191 #### pipeOptions.unpipeSignal192 193-Type: [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal)193+_Type:_ [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal)194 195 Unpipe the subprocess when the signal aborts.196 197 [More info.](pipe.md#unpipe)14 unmodified lines212 [More info.](termination.md)213 214 ### subprocess.pid215 216-_Type_: `number | undefined`216+_Type:_ `number | undefined`217 218 Process identifier ([PID](https://en.wikipedia.org/wiki/Process_identifier)).219 220 This is `undefined` if the subprocess failed to spawn.26 unmodified lines247 [More info.](ipc.md#exchanging-messages)248 249 ### subprocess.stdin250 251-Type: [`Writable | null`](https://nodejs.org/api/stream.html#class-streamwritable)251+_Type:_ [`Writable | null`](https://nodejs.org/api/stream.html#class-streamwritable)252 253 The subprocess [`stdin`](https://en.wikipedia.org/wiki/Standard_streams#Standard_input_(stdin)) as a stream.254 255 This is `null` if the [`stdin`](#optionsstdin) option is set to [`'inherit'`](input.md#terminal-input), [`'ignore'`](input.md#ignore-input), [`Readable`](streams.md#input) or [`integer`](input.md#terminal-input).1 unmodified line257 [More info.](streams.md#manual-streaming)258 259 ### subprocess.stdout260 261-Type: [`Readable | null`](https://nodejs.org/api/stream.html#class-streamreadable)261+_Type:_ [`Readable | null`](https://nodejs.org/api/stream.html#class-streamreadable)262 263 The subprocess [`stdout`](https://en.wikipedia.org/wiki/Standard_streams#Standard_output_(stdout)) as a stream.264 265 This is `null` if the [`stdout`](#optionsstdout) option is set to [`'inherit'`](output.md#terminal-output), [`'ignore'`](output.md#ignore-output), [`Writable`](streams.md#output) or [`integer`](output.md#terminal-output), or if the [`buffer`](#optionsbuffer) option is `false`.1 unmodified line267 [More info.](streams.md#manual-streaming)268 269 ### subprocess.stderr270 271-Type: [`Readable | null`](https://nodejs.org/api/stream.html#class-streamreadable)271+_Type:_ [`Readable | null`](https://nodejs.org/api/stream.html#class-streamreadable)272 273 The subprocess [`stderr`](https://en.wikipedia.org/wiki/Standard_streams#Standard_error_(stderr)) as a stream.274 275 This is `null` if the [`stderr`](#optionsstdout) option is set to [`'inherit'`](output.md#terminal-output), [`'ignore'`](output.md#ignore-output), [`Writable`](streams.md#output) or [`integer`](output.md#terminal-output), or if the [`buffer`](#optionsbuffer) option is `false`.1 unmodified line277 [More info.](streams.md#manual-streaming)278 279 ### subprocess.all280 281-Type: [`Readable | undefined`](https://nodejs.org/api/stream.html#class-streamreadable)281+_Type:_ [`Readable | undefined`](https://nodejs.org/api/stream.html#class-streamreadable)282 283 Stream combining/interleaving [`subprocess.stdout`](#subprocessstdout) and [`subprocess.stderr`](#subprocessstderr).284 285 This requires the [`all`](#optionsall) option to be `true`.3 unmodified lines289 More info on [interleaving](output.md#interleaved-output) and [streaming](streams.md#manual-streaming).290 291 ### subprocess.stdio292 293-Type: [`[Writable | null, Readable | null, Readable | null, ...Array<Writable | Readable | null>]`](https://nodejs.org/api/stream.html#class-streamreadable)293+_Type:_ [`[Writable | null, Readable | null, Readable | null, ...Array<Writable | Readable | null>]`](https://nodejs.org/api/stream.html#class-streamreadable)294 295 The subprocess [`stdin`](#subprocessstdin), [`stdout`](#subprocessstdout), [`stderr`](#subprocessstderr) and [other files descriptors](#optionsstdio) as an array of streams.296 297 Each array item is `null` if the corresponding [`stdin`](#optionsstdin), [`stdout`](#optionsstdout), [`stderr`](#optionsstderr) or [`stdio`](#optionsstdio) option is set to [`'inherit'`](output.md#terminal-output), [`'ignore'`](output.md#ignore-output), [`Stream`](streams.md#output) or [`integer`](output.md#terminal-output), or if the [`buffer`](#optionsbuffer) option is `false`.10 unmodified lines308 [More info.](streams.md#converting-a-subprocess-to-a-stream)309 310 #### readableOptions311 312-Type: `object`312+_Type:_ `object`313 314 #### readableOptions.from315 316-Type: `"stdout" | "stderr" | "all" | "fd3" | "fd4" | ...`\317-Default: `"stdout"`316+_Type:_ `"stdout" | "stderr" | "all" | "fd3" | "fd4" | ...`\317+_Default:_ `"stdout"`318 319 Which stream to read from the subprocess. A [file descriptor](https://en.wikipedia.org/wiki/File_descriptor) like `"fd3"` can also be passed.320 321 `"all"` reads both [`stdout`](#subprocessstdout) and [`stderr`](#subprocessstderr). This requires the [`all`](#optionsall) option to be `true`.1 unmodified line323 [More info.](streams.md#different-file-descriptor)324 325 #### readableOptions.binary326 327-Type: `boolean`\328-Default: `false` with [`subprocess.iterable()`](#subprocessiterablereadableoptions), `true` with [`subprocess.readable()`](#subprocessreadablereadableoptions)/[`subprocess.duplex()`](#subprocessduplexduplexoptions)327+_Type:_ `boolean`\328+_Default:_ `false` with [`subprocess.iterable()`](#subprocessiterablereadableoptions), `true` with [`subprocess.readable()`](#subprocessreadablereadableoptions)/[`subprocess.duplex()`](#subprocessduplexduplexoptions)329 330 If `false`, iterates over lines. Each line is a string.331 332 If `true`, iterates over arbitrary chunks of data. Each line is an [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) (with [`subprocess.iterable()`](#subprocessiterablereadableoptions)) or a [`Buffer`](https://nodejs.org/api/buffer.html#class-buffer) (with [`subprocess.readable()`](#subprocessreadablereadableoptions)/[`subprocess.duplex()`](#subprocessduplexduplexoptions)).3 unmodified lines336 More info for [iterables](binary.md#iterable) and [streams](binary.md#streams).337 338 #### readableOptions.preserveNewlines339 340-Type: `boolean`\341-Default: `false` with [`subprocess.iterable()`](#subprocessiterablereadableoptions), `true` with [`subprocess.readable()`](#subprocessreadablereadableoptions)/[`subprocess.duplex()`](#subprocessduplexduplexoptions)340+_Type:_ `boolean`\341+_Default:_ `false` with [`subprocess.iterable()`](#subprocessiterablereadableoptions), `true` with [`subprocess.readable()`](#subprocessreadablereadableoptions)/[`subprocess.duplex()`](#subprocessduplexduplexoptions)342 343 If both this option and the [`binary`](#readableoptionsbinary) option is `false`, [newlines](https://en.wikipedia.org/wiki/Newline) are stripped from each line.344 345 [More info.](lines.md#iterable)8 unmodified lines354 [More info.](streams.md#converting-a-subprocess-to-a-stream)355 356 #### writableOptions357 358-Type: `object`358+_Type:_ `object`359 360 #### writableOptions.to361 362-Type: `"stdin" | "fd3" | "fd4" | ...`\363-Default: `"stdin"`362+_Type:_ `"stdin" | "fd3" | "fd4" | ...`\363+_Default:_ `"stdin"`364 365 Which [stream](#subprocessstdin) to write to the subprocess. A [file descriptor](https://en.wikipedia.org/wiki/File_descriptor) like `"fd3"` can also be passed.366 367 [More info.](streams.md#different-file-descriptor)8 unmodified lines376 [More info.](streams.md#converting-a-subprocess-to-a-stream)377 378 ## Result379 380-Type: `object`380+_Type:_ `object`381 382 [Result](execution.md#result) of a subprocess successful execution.383 384 When the subprocess [fails](errors.md#subprocess-failure), it is rejected with an [`ExecaError`](#execaerror) instead.385 386 ### result.stdout387 388-Type: `string | Uint8Array | string[] | Uint8Array[] | unknown[] | undefined`388+_Type:_ `string | Uint8Array | string[] | Uint8Array[] | unknown[] | undefined`389 390 The output of the subprocess on [`stdout`](https://en.wikipedia.org/wiki/Standard_streams#Standard_output_(stdout)).391 392 This is `undefined` if the [`stdout`](#optionsstdout) option is set to only [`'inherit'`](output.md#terminal-output), [`'ignore'`](output.md#ignore-output), [`Writable`](streams.md#output) or [`integer`](output.md#terminal-output), or if the [`buffer`](#optionsbuffer) option is `false`.3 unmodified lines396 [More info.](output.md#stdout-and-stderr)397 398 ### result.stderr399 400-Type: `string | Uint8Array | string[] | Uint8Array[] | unknown[] | undefined`400+_Type:_ `string | Uint8Array | string[] | Uint8Array[] | unknown[] | undefined`401 402 The output of the subprocess on [`stderr`](https://en.wikipedia.org/wiki/Standard_streams#Standard_error_(stderr)).403 404 This is `undefined` if the [`stderr`](#optionsstderr) option is set to only [`'inherit'`](output.md#terminal-output), [`'ignore'`](output.md#ignore-output), [`Writable`](streams.md#output) or [`integer`](output.md#terminal-output), or if the [`buffer`](#optionsbuffer) option is `false`.3 unmodified lines408 [More info.](output.md#stdout-and-stderr)409 410 ### result.all411 412-Type: `string | Uint8Array | string[] | Uint8Array[] | unknown[] | undefined`412+_Type:_ `string | Uint8Array | string[] | Uint8Array[] | unknown[] | undefined`413 414 The output of the subprocess with [`result.stdout`](#resultstdout) and [`result.stderr`](#resultstderr) interleaved.415 416 This requires the [`all`](#optionsall) option to be `true`.5 unmodified lines422 [More info.](output.md#interleaved-output)423 424 ### result.stdio425 426-Type: `Array<string | Uint8Array | string[] | Uint8Array[] | unknown[] | undefined>`426+_Type:_ `Array<string | Uint8Array | string[] | Uint8Array[] | unknown[] | undefined>`427 428 The output of the subprocess on [`stdin`](#optionsstdin), [`stdout`](#optionsstdout), [`stderr`](#optionsstderr) and [other file descriptors](#optionsstdio).429 430 Items are `undefined` when their corresponding [`stdio`](#optionsstdio) option is set to [`'inherit'`](output.md#terminal-output), [`'ignore'`](output.md#ignore-output), [`Writable`](streams.md#output) or [`integer`](output.md#terminal-output), or if the [`buffer`](#optionsbuffer) option is `false`.3 unmodified lines434 [More info.](output.md#additional-file-descriptors)435 436 ### result.pipedFrom437 438-Type: [`Array<Result | ExecaError>`](#result)438+_Type:_ [`Array<Result | ExecaError>`](#result)439 440 [Results](#result) of the other subprocesses that were piped into this subprocess.441 442 This array is initially empty and is populated each time the [`subprocess.pipe()`](#subprocesspipefile-arguments-options) method resolves.1 unmodified line444 [More info.](pipe.md#result)445 446 ### result.command447 448-Type: `string`448+_Type:_ `string`449 450 The file and [arguments](input.md#command-arguments) that were run.451 452 [More info.](debugging.md#command)453 454 ### result.escapedCommand455 456-Type: `string`456+_Type:_ `string`457 458 Same as [`command`](#resultcommand) but escaped.459 460 [More info.](debugging.md#command)461 462 ### result.cwd463 464-Type: `string`464+_Type:_ `string`465 466 The [current directory](#optionscwd) in which the command was run.467 468 [More info.](environment.md#current-directory)469 470 ### result.durationMs471 472-Type: `number`472+_Type:_ `number`473 474 Duration of the subprocess, in milliseconds.475 476 [More info.](debugging.md#duration)477 478 ### result.failed479 480-Type: `boolean`480+_Type:_ `boolean`481 482 Whether the subprocess failed to run.483 484 When this is `true`, the result is an [`ExecaError`](#execaerror) instance with additional error-related properties.2 unmodified lines487 488 ## ExecaError489 ## ExecaSyncError490 491-Type: `Error`491+_Type:_ `Error`492 493 Result of a subprocess [failed execution](errors.md#subprocess-failure).494 495 This error is thrown as an exception. If the [`reject`](#optionsreject) option is false, it is returned instead.3 unmodified lines499 [More info.](errors.md)500 501 ### error.message502 503-Type: `string`503+_Type:_ `string`504 505 Error message when the subprocess [failed](errors.md#subprocess-failure) to run.506 507 [More info.](errors.md#error-message)508 509 ### error.shortMessage510 511-Type: `string`511+_Type:_ `string`512 513 This is the same as [`error.message`](#errormessage) except it does not include the subprocess [output](output.md).514 515 [More info.](errors.md#error-message)516 517 ### error.originalMessage518 519-Type: `string | undefined`519+_Type:_ `string | undefined`520 521 Original error message. This is the same as [`error.message`](#errormessage) excluding the subprocess [output](output.md) and some additional information added by Execa.522 523 [More info.](errors.md#error-message)524 525 ### error.cause526 527-Type: `unknown | undefined`527+_Type:_ `unknown | undefined`528 529 Underlying error, if there is one. For example, this is set by [`subprocess.kill(error)`](#subprocesskillerror).530 531 This is usually an `Error` instance.1 unmodified line533 [More info.](termination.md#error-message-and-stack-trace)534 535 ### error.code536 537-Type: `string | undefined`537+_Type:_ `string | undefined`538 539 Node.js-specific [error code](https://nodejs.org/api/errors.html#errorcode), when available.540 541 ### error.timedOut542 543-Type: `boolean`543+_Type:_ `boolean`544 545 Whether the subprocess timed out due to the [`timeout`](#optionstimeout) option.546 547 [More info.](termination.md#timeout)548 549 ### error.isCanceled550 551-Type: `boolean`551+_Type:_ `boolean`552 553 Whether the subprocess was canceled using the [`cancelSignal`](#optionscancelsignal) option.554 555 [More info.](termination.md#canceling)556 557 ### error.isMaxBuffer558 559-Type: `boolean`559+_Type:_ `boolean`560 561 Whether the subprocess failed because its output was larger than the [`maxBuffer`](#optionsmaxbuffer) option.562 563 [More info.](output.md#big-output)564 565 ### error.isTerminated566 567-Type: `boolean`567+_Type:_ `boolean`568 569 Whether the subprocess was terminated by a [signal](termination.md#signal-termination) (like [`SIGTERM`](termination.md#sigterm)) sent by either:570 - The current process.571 - [Another process](termination.md#inter-process-termination). This case is [not supported on Windows](https://nodejs.org/api/process.html#signal-events).1 unmodified line573 [More info.](termination.md#signal-name-and-description)574 575 ### error.exitCode576 577-Type: `number | undefined`577+_Type:_ `number | undefined`578 579 The numeric [exit code](https://en.wikipedia.org/wiki/Exit_status) of the subprocess that was run.580 581 This is `undefined` when the subprocess could not be spawned or was terminated by a [signal](#errorsignal).1 unmodified line583 [More info.](errors.md#exit-code)584 585 ### error.signal586 587-Type: `string | undefined`587+_Type:_ `string | undefined`588 589 The name of the [signal](termination.md#signal-termination) (like [`SIGTERM`](termination.md#sigterm)) that terminated the subprocess, sent by either:590 - The current process.591 - [Another process](termination.md#inter-process-termination). This case is [not supported on Windows](https://nodejs.org/api/process.html#signal-events).3 unmodified lines595 [More info.](termination.md#signal-name-and-description)596 597 ### error.signalDescription598 599-Type: `string | undefined`599+_Type:_ `string | undefined`600 601 A human-friendly description of the [signal](termination.md#signal-termination) that was used to terminate the subprocess.602 603 If a signal terminated the subprocess, this property is defined and included in the error message. Otherwise it is `undefined`. It is also `undefined` when the signal is very uncommon which should seldomly happen.1 unmodified line605 [More info.](termination.md#signal-name-and-description)606 607 ## Options608 609-Type: `object`609+_Type:_ `object`610 611 This lists all options for [`execa()`](#execafile-arguments-options) and the [other methods](#methods).612 613 The following options [can specify different values](output.md#stdoutstderr-specific-options) for [`stdout`](#optionsstdout) and [`stderr`](#optionsstderr): [`verbose`](#optionsverbose), [`lines`](#optionslines), [`stripFinalNewline`](#optionsstripfinalnewline), [`buffer`](#optionsbuffer), [`maxBuffer`](#optionsmaxbuffer).614 615 ### options.preferLocal616 617-Type: `boolean`\618-Default: `true` with [`$`](#file-arguments-options), `false` otherwise617+_Type:_ `boolean`\618+_Default:_ `true` with [`$`](#file-arguments-options), `false` otherwise619 620 Prefer locally installed binaries when looking for a binary to execute.621 622 [More info.](environment.md#local-binaries)623 624 ### options.localDir625 626-Type: `string | URL`\627-Default: [`cwd`](#optionscwd) option626+_Type:_ `string | URL`\627+_Default:_ [`cwd`](#optionscwd) option628 629 Preferred path to find locally installed binaries, when using the [`preferLocal`](#optionspreferlocal) option.630 631 [More info.](environment.md#local-binaries)632 633 ### options.node634 635-Type: `boolean`\636-Default: `true` with [`execaNode()`](#execanodescriptpath-arguments-options), `false` otherwise635+_Type:_ `boolean`\636+_Default:_ `true` with [`execaNode()`](#execanodescriptpath-arguments-options), `false` otherwise637 638 If `true`, runs with Node.js. The first argument must be a Node.js file.639 640 [More info.](node.md)641 642 ### options.nodeOptions643 644-Type: `string[]`\645-Default: [`process.execArgv`](https://nodejs.org/api/process.html#process_process_execargv) (current Node.js CLI options)644+_Type:_ `string[]`\645+_Default:_ [`process.execArgv`](https://nodejs.org/api/process.html#process_process_execargv) (current Node.js CLI options)646 647 List of [CLI flags](https://nodejs.org/api/cli.html#cli_options) passed to the [Node.js executable](#optionsnodepath).648 649 Requires the [`node`](#optionsnode) option to be `true`.1 unmodified line651 [More info.](node.md#nodejs-cli-flags)652 653 ### options.nodePath654 655-Type: `string | URL`\656-Default: [`process.execPath`](https://nodejs.org/api/process.html#process_process_execpath) (current Node.js executable)655+_Type:_ `string | URL`\656+_Default:_ [`process.execPath`](https://nodejs.org/api/process.html#process_process_execpath) (current Node.js executable)657 658 Path to the Node.js executable.659 660 Requires the [`node`](#optionsnode) option to be `true`.1 unmodified line662 [More info.](node.md#nodejs-version)663 664 ### options.shell665 666-Type: `boolean | string | URL`\667-Default: `false`666+_Type:_ `boolean | string | URL`\667+_Default:_ `false`668 669 If `true`, runs the command inside of a [shell](https://en.wikipedia.org/wiki/Shell_(computing)).670 671 Uses [`/bin/sh`](https://en.wikipedia.org/wiki/Unix_shell) on UNIX and [`cmd.exe`](https://en.wikipedia.org/wiki/Cmd.exe) on Windows. A different shell can be specified as a string. The shell should understand the `-c` switch on UNIX or `/d /s /c` on Windows.3 unmodified lines675 [More info.](shell.md)676 677 ### options.cwd678 679-Type: `string | URL`\680-Default: `process.cwd()`679+_Type:_ `string | URL`\680+_Default:_ `process.cwd()`681 682 Current [working directory](https://en.wikipedia.org/wiki/Working_directory) of the subprocess.683 684 This is also used to resolve the [`nodePath`](#optionsnodepath) option when it is a relative path.1 unmodified line686 [More info.](environment.md#current-directory)687 688 ### options.env689 690-Type: `object`\691-Default: [`process.env`](https://nodejs.org/api/process.html#processenv)690+_Type:_ `object`\691+_Default:_ [`process.env`](https://nodejs.org/api/process.html#processenv)692 693 [Environment variables](https://en.wikipedia.org/wiki/Environment_variable).694 695 Unless the [`extendEnv`](#optionsextendenv) option is `false`, the subprocess also uses the current process' environment variables ([`process.env`](https://nodejs.org/api/process.html#processenv)).1 unmodified line697 [More info.](input.md#environment-variables)698 699 ### options.extendEnv700 701-Type: `boolean`\702-Default: `true`701+_Type:_ `boolean`\702+_Default:_ `true`703 704 If `true`, the subprocess uses both the [`env`](#optionsenv) option and the current process' environment variables ([`process.env`](https://nodejs.org/api/process.html#processenv)).705 If `false`, only the `env` option is used, not `process.env`.706 707 [More info.](input.md#environment-variables)708 709 ### options.input710 711-Type: `string | Uint8Array | stream.Readable`711+_Type:_ `string | Uint8Array | stream.Readable`712 713 Write some input to the subprocess' [`stdin`](https://en.wikipedia.org/wiki/Standard_streams#Standard_input_(stdin)).714 715 See also the [`inputFile`](#optionsinputfile) and [`stdin`](#optionsstdin) options.1 unmodified line717 [More info.](input.md#string-input)718 719 ### options.inputFile720 721-Type: `string | URL`721+_Type:_ `string | URL`722 723 Use a file as input to the subprocess' [`stdin`](https://en.wikipedia.org/wiki/Standard_streams#Standard_input_(stdin)).724 725 See also the [`input`](#optionsinput) and [`stdin`](#optionsstdin) options.1 unmodified line727 [More info.](input.md#file-input)728 729 ### options.stdin730 731-Type: `string | number | stream.Readable | ReadableStream | TransformStream | URL | {file: string} | Uint8Array | Iterable<string | Uint8Array | unknown> | AsyncIterable<string | Uint8Array | unknown> | GeneratorFunction<string | Uint8Array | unknown> | AsyncGeneratorFunction<string | Uint8Array | unknown> | {transform: GeneratorFunction | AsyncGeneratorFunction | Duplex | TransformStream}` (or a tuple of those types)\732-Default: `'inherit'` with [`$`](#file-arguments-options), `'pipe'` otherwise731+_Type:_ `string | number | stream.Readable | ReadableStream | TransformStream | URL | {file: string} | Uint8Array | Iterable<string | Uint8Array | unknown> | AsyncIterable<string | Uint8Array | unknown> | GeneratorFunction<string | Uint8Array | unknown> | AsyncGeneratorFunction<string | Uint8Array | unknown> | {transform: GeneratorFunction | AsyncGeneratorFunction | Duplex | TransformStream}` (or a tuple of those types)\732+_Default:_ `'inherit'` with [`$`](#file-arguments-options), `'pipe'` otherwise733 734 How to setup the subprocess' [standard input](https://en.wikipedia.org/wiki/Standard_streams#Standard_input_(stdin)). This can be [`'pipe'`](streams.md#manual-streaming), [`'overlapped'`](windows.md#asynchronous-io), [`'ignore`](input.md#ignore-input), [`'inherit'`](input.md#terminal-input), a [file descriptor integer](input.md#terminal-input), a [Node.js `Readable` stream](streams.md#input), a web [`ReadableStream`](streams.md#web-streams), a [`{ file: 'path' }` object](input.md#file-input), a [file URL](input.md#file-input), an [`Iterable`](streams.md#iterables-as-input) (including an [array of strings](input.md#string-input)), an [`AsyncIterable`](streams.md#iterables-as-input), an [`Uint8Array`](binary.md#binary-input), a [generator function](transform.md), a [`Duplex`](transform.md#duplextransform-streams) or a web [`TransformStream`](transform.md#duplextransform-streams).735 736 This can be an [array of values](output.md#multiple-targets) such as `['inherit', 'pipe']` or `[fileUrl, 'pipe']`.1 unmodified line738 More info on [available values](input.md), [streaming](streams.md) and [transforms](transform.md).739 740 ### options.stdout741 742-Type: `string | number | stream.Writable | WritableStream | TransformStream | URL | {file: string} | GeneratorFunction<string | Uint8Array | unknown> | AsyncGeneratorFunction<string | Uint8Array | unknown> | {transform: GeneratorFunction | AsyncGeneratorFunction | Duplex | TransformStream}` (or a tuple of those types)\743-Default: `pipe`742+_Type:_ `string | number | stream.Writable | WritableStream | TransformStream | URL | {file: string} | GeneratorFunction<string | Uint8Array | unknown> | AsyncGeneratorFunction<string | Uint8Array | unknown> | {transform: GeneratorFunction | AsyncGeneratorFunction | Duplex | TransformStream}` (or a tuple of those types)\743+_Default:_ `pipe`744 745 How to setup the subprocess' [standard output](https://en.wikipedia.org/wiki/Standard_streams#Standard_input_(stdin)). This can be [`'pipe'`](output.md#stdout-and-stderr), [`'overlapped'`](windows.md#asynchronous-io), [`'ignore`](output.md#ignore-output), [`'inherit'`](output.md#terminal-output), a [file descriptor integer](output.md#terminal-output), a [Node.js `Writable` stream](streams.md#output), a web [`WritableStream`](streams.md#web-streams), a [`{ file: 'path' }` object](output.md#file-output), a [file URL](output.md#file-output), a [generator function](transform.md), a [`Duplex`](transform.md#duplextransform-streams) or a web [`TransformStream`](transform.md#duplextransform-streams).746 747 This can be an [array of values](output.md#multiple-targets) such as `['inherit', 'pipe']` or `[fileUrl, 'pipe']`.1 unmodified line749 More info on [available values](output.md), [streaming](streams.md) and [transforms](transform.md).750 751 ### options.stderr752 753-Type: `string | number | stream.Writable | WritableStream | TransformStream | URL | {file: string} | GeneratorFunction<string | Uint8Array | unknown> | AsyncGeneratorFunction<string | Uint8Array | unknown> | {transform: GeneratorFunction | AsyncGeneratorFunction | Duplex | TransformStream}` (or a tuple of those types)\754-Default: `pipe`753+_Type:_ `string | number | stream.Writable | WritableStream | TransformStream | URL | {file: string} | GeneratorFunction<string | Uint8Array | unknown> | AsyncGeneratorFunction<string | Uint8Array | unknown> | {transform: GeneratorFunction | AsyncGeneratorFunction | Duplex | TransformStream}` (or a tuple of those types)\754+_Default:_ `pipe`755 756 How to setup the subprocess' [standard error](https://en.wikipedia.org/wiki/Standard_streams#Standard_input_(stdin)). This can be [`'pipe'`](output.md#stdout-and-stderr), [`'overlapped'`](windows.md#asynchronous-io), [`'ignore`](output.md#ignore-output), [`'inherit'`](output.md#terminal-output), a [file descriptor integer](output.md#terminal-output), a [Node.js `Writable` stream](streams.md#output), a web [`WritableStream`](streams.md#web-streams), a [`{ file: 'path' }` object](output.md#file-output), a [file URL](output.md#file-output), a [generator function](transform.md), a [`Duplex`](transform.md#duplextransform-streams) or a web [`TransformStream`](transform.md#duplextransform-streams).757 758 This can be an [array of values](output.md#multiple-targets) such as `['inherit', 'pipe']` or `[fileUrl, 'pipe']`.1 unmodified line760 More info on [available values](output.md), [streaming](streams.md) and [transforms](transform.md).761 762 ### options.stdio763 764-Type: `string | Array<string | number | stream.Readable | stream.Writable | ReadableStream | WritableStream | TransformStream | URL | {file: string} | Uint8Array | Iterable<string> | Iterable<Uint8Array> | Iterable<unknown> | AsyncIterable<string | Uint8Array | unknown> | GeneratorFunction<string | Uint8Array | unknown> | AsyncGeneratorFunction<string | Uint8Array | unknown> | {transform: GeneratorFunction | AsyncGeneratorFunction | Duplex | TransformStream}>` (or a tuple of those types)\765-Default: `pipe`764+_Type:_ `string | Array<string | number | stream.Readable | stream.Writable | ReadableStream | WritableStream | TransformStream | URL | {file: string} | Uint8Array | Iterable<string> | Iterable<Uint8Array> | Iterable<unknown> | AsyncIterable<string | Uint8Array | unknown> | GeneratorFunction<string | Uint8Array | unknown> | AsyncGeneratorFunction<string | Uint8Array | unknown> | {transform: GeneratorFunction | AsyncGeneratorFunction | Duplex | TransformStream}>` (or a tuple of those types)\765+_Default:_ `pipe`766 767 Like the [`stdin`](#optionsstdin), [`stdout`](#optionsstdout) and [`stderr`](#optionsstderr) options but for all [file descriptors](https://en.wikipedia.org/wiki/File_descriptor) at once. For example, `{stdio: ['ignore', 'pipe', 'pipe']}` is the same as `{stdin: 'ignore', stdout: 'pipe', stderr: 'pipe'}`.768 769 A single string can be used [as a shortcut](output.md#shortcut).3 unmodified lines773 More info on [available values](output.md), [streaming](streams.md) and [transforms](transform.md).774 775 ### options.all776 777-Type: `boolean`\778-Default: `false`777+_Type:_ `boolean`\778+_Default:_ `false`779 780 Add a [`subprocess.all`](#subprocessall) stream and a [`result.all`](#resultall) property.781 782 [More info.](output.md#interleaved-output)783 784 ### options.encoding785 786-Type: `'utf8' | 'utf16le' | 'buffer' | 'hex' | 'base64' | 'base64url' | 'latin1' | 'ascii'`\787-Default: `'utf8'`786+_Type:_ `'utf8' | 'utf16le' | 'buffer' | 'hex' | 'base64' | 'base64url' | 'latin1' | 'ascii'`\787+_Default:_ `'utf8'`788 789 If the subprocess outputs text, specifies its character encoding, either [`'utf8'`](https://en.wikipedia.org/wiki/UTF-8) or [`'utf16le'`](https://en.wikipedia.org/wiki/UTF-16).790 791 If it outputs binary data instead, this should be either:5 unmodified lines797 [More info.](binary.md)798 799 ### options.lines800 801-Type: `boolean`\802-Default: `false`801+_Type:_ `boolean`\802+_Default:_ `false`803 804 Set [`result.stdout`](#resultstdout), [`result.stderr`](#resultstdout), [`result.all`](#resultall) and [`result.stdio`](#resultstdio) as arrays of strings, splitting the subprocess' output into lines.805 806 This cannot be used if the [`encoding`](#optionsencoding) option is [binary](binary.md#binary-output).3 unmodified lines810 [More info.](lines.md#simple-splitting)811 812 ### options.stripFinalNewline813 814-Type: `boolean`\815-Default: `true`814+_Type:_ `boolean`\815+_Default:_ `true`816 817 Strip the final [newline character](https://en.wikipedia.org/wiki/Newline) from the output.818 819 If the [`lines`](#optionslines) option is true, this applies to each output line instead.3 unmodified lines823 [More info.](lines.md#newlines)824 825 ### options.maxBuffer826 827-Type: `number`\828-Default: `100_000_000`827+_Type:_ `number`\828+_Default:_ `100_000_000`829 830 Largest amount of data allowed on [`stdout`](#resultstdout), [`stderr`](#resultstderr) and [`stdio`](#resultstdio).831 832 By default, this applies to both `stdout` and `stderr`, but [different values can also be passed](output.md#stdoutstderr-specific-options).1 unmodified line834 [More info.](output.md#big-output)835 836 ### options.buffer837 838-Type: `boolean`\839-Default: `true`838+_Type:_ `boolean`\839+_Default:_ `true`840 841 When `buffer` is `false`, the [`result.stdout`](#resultstdout), [`result.stderr`](#resultstderr), [`result.all`](#resultall) and [`result.stdio`](#resultstdio) properties are not set.842 843 By default, this applies to both `stdout` and `stderr`, but [different values can also be passed](output.md#stdoutstderr-specific-options).1 unmodified line845 [More info.](output.md#low-memory)846 847 ### options.ipc848 849-Type: `boolean`\850-Default: `true` if the [`node`](#optionsnode) option is enabled, `false` otherwise849+_Type:_ `boolean`\850+_Default:_ `true` if the [`node`](#optionsnode) option is enabled, `false` otherwise851 852 Enables exchanging messages with the subprocess using [`subprocess.send(message)`](#subprocesssendmessage) and [`subprocess.on('message', (message) => {})`](#subprocessonmessage-message--void).853 854 [More info.](ipc.md)855 856 ### options.serialization857 858-Type: `'json' | 'advanced'`\859-Default: `'advanced'`858+_Type:_ `'json' | 'advanced'`\859+_Default:_ `'advanced'`860 861 Specify the kind of serialization used for sending messages between subprocesses when using the [`ipc`](#optionsipc) option.862 863 [More info.](ipc.md#message-type)864 865 ### options.verbose866 867-Type: `'none' | 'short' | 'full'`\868-Default: `'none'`867+_Type:_ `'none' | 'short' | 'full'`\868+_Default:_ `'none'`869 870 If `verbose` is `'short'`, prints the command on [`stderr`](https://en.wikipedia.org/wiki/Standard_streams#Standard_error_(stderr)): its file, arguments, duration and (if it failed) error message.871 872 If `verbose` is `'full'`, the command's [`stdout`](https://en.wikipedia.org/wiki/Standard_streams#Standard_output_(stdout)) and `stderr` are also printed.3 unmodified lines876 [More info.](debugging.md#verbose-mode)877 878 ### options.reject879 880-Type: `boolean`\881-Default: `true`880+_Type:_ `boolean`\881+_Default:_ `true`882 883 Setting this to `false` resolves the [result's promise](#return-value) with the [error](#execaerror) instead of rejecting it.884 885 [More info.](errors.md#preventing-exceptions)886 887 ### options.timeout888 889-Type: `number`\890-Default: `0`889+_Type:_ `number`\890+_Default:_ `0`891 892 If `timeout` is greater than `0`, the subprocess will be [terminated](#optionskillsignal) if it runs for longer than that amount of milliseconds.893 894 On timeout, [`result.timedOut`](#errortimedout) becomes `true`.1 unmodified line896 [More info.](termination.md#timeout)897 898 ### options.cancelSignal899 900-Type: [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal)900+_Type:_ [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal)901 902 You can abort the subprocess using [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).903 904 When `AbortController.abort()` is called, [`result.isCanceled`](#erroriscanceled) becomes `true`.1 unmodified line906 [More info.](termination.md#canceling)907 908 ### options.forceKillAfterDelay909 910-Type: `number | false`\911-Default: `5000`910+_Type:_ `number | false`\911+_Default:_ `5000`912 913 If the subprocess is terminated but does not exit, forcefully exit it by sending [`SIGKILL`](https://en.wikipedia.org/wiki/Signal_(IPC)#SIGKILL).914 915 [More info.](termination.md#forceful-termination)916 917 ### options.killSignal918 919-Type: `string | number`\920-Default: `'SIGTERM'`919+_Type:_ `string | number`\920+_Default:_ `'SIGTERM'`921 922 Default [signal](https://en.wikipedia.org/wiki/Signal_(IPC)) used to terminate the subprocess.923 924 This can be either a name (like [`'SIGTERM'`](termination.md#sigterm)) or a number (like `9`).1 unmodified line926 [More info.](termination.md#default-signal)927 928 ### options.detached929 930-Type: `boolean`\931-Default: `false`930+_Type:_ `boolean`\931+_Default:_ `false`932 933 Run the subprocess independently from the current process.934 935 [More info.](environment.md#background-subprocess)936 937 ### options.cleanup938 939-Type: `boolean`\940-Default: `true`939+_Type:_ `boolean`\940+_Default:_ `true`941 942 Kill the subprocess when the current process exits.943 944 [More info.](termination.md#current-process-exit)945 946 ### options.uid947 948-Type: `number`\949-Default: current user identifier948+_Type:_ `number`\949+_Default:_ current user identifier950 951 Sets the [user identifier](https://en.wikipedia.org/wiki/User_identifier) of the subprocess.952 953 [More info.](windows.md#uid-and-gid)954 955 ### options.gid956 957-Type: `number`\958-Default: current group identifier957+_Type:_ `number`\958+_Default:_ current group identifier959 960 Sets the [group identifier](https://en.wikipedia.org/wiki/Group_identifier) of the subprocess.961 962 [More info.](windows.md#uid-and-gid)963 964 ### options.argv0965 966-Type: `string`\967-Default: file being executed966+_Type:_ `string`\967+_Default:_ file being executed968 969 Value of [`argv[0]`](https://nodejs.org/api/process.html#processargv0) sent to the subprocess.970 971 ### options.windowsHide972 973-Type: `boolean`\974-Default: `true`973+_Type:_ `boolean`\974+_Default:_ `true`975 976 On Windows, do not create a new console window.977 978 [More info.](windows.md#console-window)979 980 ### options.windowsVerbatimArguments981 982-Type: `boolean`\983-Default: `true` if the [`shell`](#optionsshell) option is `true`, `false` otherwise982+_Type:_ `boolean`\983+_Default:_ `true` if the [`shell`](#optionsshell) option is `true`, `false` otherwise984 985 If `false`, escapes the command arguments on Windows.986 987 [More info.](windows.md#cmdexe-escaping)7 unmodified lines995 [More info.](transform.md)996 997 ### transformOptions.transform998 999-Type: `GeneratorFunction<string | Uint8Array | unknown>` | `AsyncGeneratorFunction<string | Uint8Array | unknown>`999+_Type:_ `GeneratorFunction<string | Uint8Array | unknown>` | `AsyncGeneratorFunction<string | Uint8Array | unknown>`1000 1001 Map or [filter](transform.md#filtering) the [input](input.md) or [output](output.md) of the subprocess.1002 1003 More info [here](transform.md#summary) and [there](transform.md#sharing-state).1004 1005 ### transformOptions.final1006 1007-Type: `GeneratorFunction<string | Uint8Array | unknown>` | `AsyncGeneratorFunction<string | Uint8Array | unknown>`1007+_Type:_ `GeneratorFunction<string | Uint8Array | unknown>` | `AsyncGeneratorFunction<string | Uint8Array | unknown>`1008 1009 Create additional lines after the last one.1010 1011 [More info.](transform.md#finalizing)1012 1013 ### transformOptions.binary1014 1015-Type: `boolean`\1016-Default: `false`1015+_Type:_ `boolean`\1016+_Default:_ `false`1017 1018 If `true`, iterate over arbitrary chunks of `Uint8Array`s instead of line `string`s.1019 1020 [More info.](binary.md#transforms)1021 1022 ### transformOptions.preserveNewlines1023 1024-Type: `boolean`\1025-Default: `false`1024+_Type:_ `boolean`\1025+_Default:_ `false`1026 1027 If `true`, keep newlines in each `line` argument. Also, this allows multiple `yield`s to produces a single line.1028 1029 [More info.](lines.md#transforms)1030 1031 ### transformOptions.objectMode1032 1033-Type: `boolean`\1034-Default: `false`1033+_Type:_ `boolean`\1034+_Default:_ `false`1035 1036 If `true`, allow [`transformOptions.transform`](#transformoptionstransform) and [`transformOptions.final`](#transformoptionsfinal) to return any type, not just `string` or `Uint8Array`.1037 1038 [More info.](transform.md#object-mode)5 unmodified lines