Skip to content
Myr

Generalize `{value, input}` to any direction-ambiguous stdio value (#1249)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Sindre Sorhus · committed by GitHub · parent 4b0edb3 · Browse files · 14 files+153 added−32 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

14 files+153 added−32 removed

  • tests:+42 added−0 removed
  • other:+111 added−32 removed

14 files+153 added−32 removed

modified:docs/api.md+2 added-2 removed
914 unmodified lines
915916### options.stdio917918_TypeScript:_ [`Options['stdio']`](typescript.md) or [`SyncOptions['stdio']`](typescript.md)\919_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} | {value: 'pipe'; input?: boolean}>` (or a tuple of those types)\919_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} | {value: 'pipe' | 'inherit' | number | URL | {file: string} | GeneratorFunction<string | Uint8Array | unknown> | AsyncGeneratorFunction<string | Uint8Array | unknown> | {transform: GeneratorFunction | AsyncGeneratorFunction | Duplex | TransformStream}; input?: boolean}>` (or a tuple of those types)\920_Default:_ `pipe`921922Like 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'}`.923924A single string can be used [as a shortcut](output.md#shortcut).925926The array can have more than 3 items, to create [additional file descriptors](output.md#additional-file-descriptors) beyond [`stdin`](#optionsstdin)/[`stdout`](#optionsstdout)/[`stderr`](#optionsstderr). Passing `'pipe'` to an additional file descriptor defaults it to output. To use it for [input](input.md#additional-file-descriptors) instead, pass `{value: 'pipe', input: true}`.926The array can have more than 3 items, to create [additional file descriptors](output.md#additional-file-descriptors) beyond [`stdin`](#optionsstdin)/[`stdout`](#optionsstdout)/[`stderr`](#optionsstderr). Some values have an ambiguous direction on an additional file descriptor (like `'pipe'`, `'inherit'`, a file or a transform), so they default to output. To use one for [input](input.md#additional-file-descriptors) instead, wrap it as `{value, input: true}`.927928More info on [available values](output.md), [streaming](streams.md) and [transforms](transform.md).929930### options.all
377 unmodified lines
modified:docs/input.md+1 added-1 removed
modified:lib/stdio/direction.js+12 added-1 removed
20 unmodified lines
21};2223// `direction` is set when the user explicitly requests it, e.g. `{value: 'pipe', input: true}`.24// It takes precedence over guessing, but not over the fixed direction of `stdin`/`stdout`/`stderr`.25const getStdioItemDirection = ({type, value, direction}, fdNumber) => KNOWN_DIRECTIONS[fdNumber] ?? direction ?? guessStreamDirection[type](value);25const getStdioItemDirection = (stdioItem, fdNumber) => KNOWN_DIRECTIONS[fdNumber] ?? getRequestedDirection(stdioItem);2627// The explicitly requested `direction` must not contradict a value that is intrinsically the other direction.28// For example, `{value: writableStream, input: true}` is invalid since a writable value can only be an output.29const getRequestedDirection = ({type, value, direction, optionName}) => {30 const guessedDirection = guessStreamDirection[type](value);31 if (direction === 'input' && guessedDirection === 'output') {32 throw new TypeError(`The \`${optionName}\` option is invalid: \`input: true\` cannot be used with a writable value, which is always an output.`);33 }3435 return direction ?? guessedDirection;36};3738// `stdin`/`stdout`/`stderr` have a known direction39const KNOWN_DIRECTIONS = ['input', 'output', 'output'];4041const anyDirection = () => undefined;
48 unmodified lines
modified:lib/stdio/handle.js+6 added-6 removed
3 unmodified lines
4import {5 getStdioItemType,6 isRegularUrl,7 isUnknownStdioString,8 isPipeInputObject,8 isStdioValueObject,9 checkBooleanOption,10 FILE_TYPES,11} from './type.js';12import {getStreamDirection} from './direction.js';
71 unmodified lines
84 && stdioItems[0].type === 'native'85 && stdioItems[0].value === 'inherit';8687const initializeStdioItem = (value, optionName) => {88 if (isPipeInputObject(value)) {89 return initializePipeInputItem(value, optionName);88 if (isStdioValueObject(value)) {89 return initializeStdioValueObject(value, optionName);90 }9192 return {93 type: getStdioItemType(value, optionName),
1 unmodified line
95 optionName,96 };97};9899// The `{value: 'pipe', input: true}` object form is a native pipe, plus an explicit input direction.100const initializePipeInputItem = ({value, input}, optionName) => {99// The `{value, input}` object form wraps any stdio value with an explicit direction.100const initializeStdioValueObject = ({value, input}, optionName) => {101 checkBooleanOption(input, `${optionName}.input`);102103 return {104 type: 'native',104 type: getStdioItemType(value, optionName),105 value,106 direction: input ? 'input' : undefined,107 optionName,108 };
135 unmodified lines
modified:lib/stdio/stdio-option.js+19 added-3 removed
1import {STANDARD_STREAMS_ALIASES} from '../utils/standard-stream.js';2import {normalizeIpcStdioArray} from '../ipc/array.js';3import {isFullVerbose} from '../verbose/values.js';4import {isPipeInputObject} from './type.js';4import {isStdioValueObject} from './type.js';56// Add support for `stdin`/`stdout`/`stderr` as an alias for `stdio`.7// Also normalize the `stdio` option.8export const normalizeStdioOption = ({stdio, ipc, buffer, ...options}, verboseInfo, isSync) => {
5 unmodified lines
14};1516// The `stdio: 'ipc'` value (raw `child_process` syntax) was replaced by the `ipc: true` option17const validateIpcStdioOption = stdioArray => {18 if (stdioArray.some(stdioOption => Array.isArray(stdioOption) ? stdioOption.includes('ipc') : stdioOption === 'ipc')) {18 if (stdioArray.some(stdioOption => hasIpcStdioOption(stdioOption))) {19 throw new Error('The `ipc: true` option must be used instead of `stdio: \'ipc\'`.');20 }21};2223const hasIpcStdioOption = stdioOption => {24 if (Array.isArray(stdioOption)) {25 return stdioOption.some(item => hasIpcStdioItem(item));26 }2728 return hasIpcStdioItem(stdioOption);29};3031const hasIpcStdioItem = stdioOption => {32 if (isStdioValueObject(stdioOption)) {33 return stdioOption.value === 'ipc';34 }3536 return stdioOption === 'ipc';37};3839const getStdioArray = (stdio, options) => {40 if (stdio === undefined) {41 return STANDARD_STREAMS_ALIASES.map(alias => options[alias]);42 }
43 unmodified lines
8687const isOutputPipe = (stdioOption, fdNumber) => stdioOption === 'pipe'88 || isOutputPipeObject(stdioOption, fdNumber);8974const isOutputPipeObject = (stdioOption, fdNumber) => isPipeInputObject(stdioOption)90const isOutputPipeObject = (stdioOption, fdNumber) => isStdioValueObject(stdioOption)91 && stdioOption.value === 'pipe'92 && (stdioOption.input === undefined || stdioOption.input === false || isFixedOutputPipe(fdNumber, stdioOption.input));9394// On `stdout`/`stderr`, the direction is always output, so `input: true` is ignored and the pipe stays output.
1 unmodified line
modified:lib/stdio/type.js+6 added-7 removed
128 unmodified lines
129 && isFilePathString(value.file);130const FILE_PATH_KEYS = new Set(['file', 'append']);131export const isFilePathString = file => typeof file === 'string';132133// The `{value: 'pipe', input: true}` object form marks an additional file descriptor as input instead of output.134// This is only needed for `'pipe'`/`'overlapped'` on fd3+, whose direction is otherwise ambiguous and defaults to output.135export const isPipeInputObject = value => isPlainObj(value)133// The `{value, input}` object form marks an additional file descriptor's direction explicitly.134// This is needed for direction-ambiguous values (like `'pipe'`, `'inherit'`, a file or a transform) on fd3+, which otherwise default to output.135export const isStdioValueObject = value => isPlainObj(value)136 && Object.keys(value).length > 0137 && Object.keys(value).every(key => PIPE_INPUT_KEYS.has(key))138 && NATIVE_PIPE_VALUES.has(value.value);139const PIPE_INPUT_KEYS = new Set(['value', 'input']);140const NATIVE_PIPE_VALUES = new Set(['pipe', 'overlapped']);137 && Object.keys(value).every(key => STDIO_VALUE_KEYS.has(key))138 && 'value' in value;139const STDIO_VALUE_KEYS = new Set(['value', 'input']);140141export const isUnknownStdioString = (type, value) => type === 'native'142 && typeof value === 'string'143 && !KNOWN_STDIO_STRINGS.has(value);
38 unmodified lines
modified:test/stdio/direction.js+30 added
58 unmodified lines
5960test('stdio[*] { value: "pipe", input: true } sets the direction to input', testDirectionInputPipe, {value: 'pipe', input: true});61test('stdio[*] { value: "overlapped", input: true } sets the direction to input', testDirectionInputPipe, {value: 'overlapped', input: true});6263const uppercaseGenerator = function * (line) {64 yield line.toUpperCase();65};6667test('stdio[*] { value: generator, input: true } sets the direction to input', async t => {68 const subprocess = execa('stdin-fd.js', ['3'], getStdio(3, {value: uppercaseGenerator, input: true}));69 subprocess.stdio[3].end(foobarString);70 const {stdout} = await subprocess;71 t.is(stdout, foobarString.toUpperCase());72});7374test('stdio[*] { value: {file}, input: true } sets the direction to input', async t => {75 const filePath = tempfile();76 await writeFile(filePath, foobarString);77 const {stdout} = await execa('stdin-fd.js', ['3'], getStdio(3, {value: {file: filePath}, input: true}));78 t.is(stdout, foobarString);79 await rm(filePath);80});8182const testInputFixedDirection = (t, stdioOption, execaMethod) => {83 t.throws(() => {84 execaMethod('empty.js', getStdio(3, {value: stdioOption, input: true}));85 }, {message: /cannot be used with a writable value/});86};8788test('stdio[*] { value: WritableStream, input: true } is invalid', testInputFixedDirection, new WritableStream(), execa);89test('stdio[*] { value: WritableStream, input: true } is invalid - sync', testInputFixedDirection, new WritableStream(), execaSync);90test('stdio[*] { value: process.stdout, input: true } is invalid', testInputFixedDirection, process.stdout, execa);91test('stdio[*] { value: process.stdout, input: true } is invalid - sync', testInputFixedDirection, process.stdout, execaSync);9293test('stdio[*] { value: "pipe", input: true } cannot be used in sync mode', t => {94 t.throws(() => {95 execaSync('empty.js', getStdio(3, {value: 'pipe', input: true}));96 }, {message: /can be an input pipe with synchronous methods/});
41 unmodified lines
modified:test/stdio/handle-invalid.js+4 added
64 unmodified lines
65test('stdio cannot be "ipc"', testIpcStdioOption, 'stdio', 'ipc', execa);66test('stdio cannot be "ipc" - sync', testIpcStdioOption, 'stdio', 'ipc', execaSync);67test('stdio[*] cannot be ["ipc"]', testIpcStdioOption, 3, ['ipc'], execa);68test('stdio[*] cannot be ["ipc"] - sync', testIpcStdioOption, 3, ['ipc'], execaSync);69test('stdio[*] cannot be {value: "ipc"}', testIpcStdioOption, 3, {value: 'ipc'}, execa);70test('stdio[*] cannot be {value: "ipc"} - sync', testIpcStdioOption, 3, {value: 'ipc'}, execaSync);71test('Cannot pass "ipc" and another value to stdio[*]', testIpcStdioOption, 3, ['pipe', 'ipc'], execa);72test('Cannot pass "ipc" and another value to stdio[*] - sync', testIpcStdioOption, 3, ['pipe', 'ipc'], execaSync);73test('Cannot pass {value: "ipc"} and another value to stdio[*]', testIpcStdioOption, 3, ['pipe', {value: 'ipc'}], execa);74test('Cannot pass {value: "ipc"} and another value to stdio[*] - sync', testIpcStdioOption, 3, ['pipe', {value: 'ipc'}], execaSync);
modified:test/stdio/iterable.js+8 added
46 unmodified lines
47 const {stdout} = await execaMethod('stdin-fd.js', [`${fdNumber}`], getStdio(fdNumber, stdioOption));48 t.is(stdout, 'foobar');49};5051const testIpcDataIterable = async (t, fdNumber, execaMethod) => {52 const {stdout} = await execaMethod('stdin-fd.js', [`${fdNumber}`], getStdio(fdNumber, [['ipc']]));53 t.is(stdout, 'ipc');54};5556test.serial('stdin option can be an array of strings', testIterable, [foobarArray], 0, execa);57test.serial('stdin option can be an array of strings - sync', testIterable, [foobarArray], 0, execaSync);58test.serial('stdio[*] option can be an array of strings', testIterable, [foobarArray], 3, execa);59test.serial('stdin option can be an array with "ipc" as input data', testIpcDataIterable, 0, execa);60test.serial('stdin option can be an array with "ipc" as input data - sync', testIpcDataIterable, 0, execaSync);61test.serial('stdio[*] option can be an array with "ipc" as input data', testIpcDataIterable, 3, execa);62test.serial('stdin option can be an array of Uint8Arrays', testIterable, [binaryArray], 0, execa);63test.serial('stdin option can be an array of Uint8Arrays - sync', testIterable, [binaryArray], 0, execaSync);64test.serial('stdio[*] option can be an array of Uint8Arrays', testIterable, [binaryArray], 3, execa);65test.serial('stdin option can be an iterable of strings', testIterable, stringGenerator(), 0, execa);
145 unmodified lines
modified:test-d/return/result-stdio.test-d.ts+6 added
112 unmodified lines
113114const inputPipeFd3Result = await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', {value: 'pipe', input: true}]});115expectType<undefined>(inputPipeFd3Result.stdio[3]);116117const inputInheritFd3Result = await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', {value: 'inherit', input: true}]});118expectType<undefined>(inputInheritFd3Result.stdio[3]);119120const inputFdFd3Result = await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', {value: 3, input: true}]});121expectType<undefined>(inputFdFd3Result.stdio[3]);122123const outputPipeFd3Result = await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', {value: 'pipe'}]});124expectType<string>(outputPipeFd3Result.stdio[3]);125126const input = true as boolean;
30 unmodified lines
modified:test-d/stdio/option/input-pipe.test-d.ts+15 added
1import {Writable} from 'node:stream';2import {expectError, expectAssignable} from 'tsd';3import {4 execa,5 execaSync,
5 unmodified lines
1112const inputPipe = {value: 'pipe', input: true} as const;13const input = true as boolean;14const booleanInputPipe = {value: 'pipe', input} as const;15const transform = function * (line: string) {16 yield line;17};1819await execa('unicorns', {stdin: inputPipe});20execaSync('unicorns', {stdin: inputPipe});21await execa('unicorns', {stdout: inputPipe});
12 unmodified lines
3435expectError(await execa('unicorns', {stdin: {value: 'other', input: true}}));36expectError(await execa('unicorns', {stdin: {value: 'pipe', input: 'true'}}));3738// The `{value, input}` form works with any direction-ambiguous value, not just `'pipe'`/`'overlapped'`.39await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', {value: 'inherit', input: true}]});40await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', {value: new URL('file:///test'), input: true}]});41await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', {value: {file: './example'}, input: true}]});42await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', {value: transform, input: true}]});43expectAssignable<StdinOption>({value: 'inherit', input: true});44expectAssignable<StdinOption>({value: {file: './example'}, input: true});4546// A value with a fixed direction cannot be marked as input.47expectError(await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', {value: new Writable(), input: true}]}));4849expectAssignable<StdinOption>(inputPipe);50expectAssignable<StdinOption>(booleanInputPipe);51expectAssignable<StdinSyncOption>(inputPipe);52expectAssignable<StdinSyncOption>(booleanInputPipe);
12 unmodified lines
modified:test-d/subprocess/stdio.test-d.ts+9 added
44 unmodified lines
4546const outputPipeSubprocess = execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', {value: 'pipe'}]});47expectType<Readable>(outputPipeSubprocess.stdio[3]);4849const inputInheritSubprocess = execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', {value: 'inherit', input: true}]});50expectType<null>(inputInheritSubprocess.stdio[3]);5152const inputFdSubprocess = execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', {value: 3, input: true}]});53expectType<null>(inputFdSubprocess.stdio[3]);5455const inputFileSubprocess = execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', {value: {file: './example'}, input: true}]});56expectType<Writable>(inputFileSubprocess.stdio[3]);5758const input = true as boolean;59const booleanInputPipeSubprocess = execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', {value: 'pipe', input}]});60expectType<Readable | Writable>(booleanInputPipeSubprocess.stdio[3]);61
15 unmodified lines
modified:types/stdio/direction.d.ts+8 added-8 removed
1import type {CommonOptions} from '../arguments/options.js';2import type {Intersects} from '../utils.js';3import type {StdioSingleOptionItems, InputStdioOption, NativePipeStdioOption} from './type.js';3import type {StdioSingleOptionItems, InputStdioOption, AmbiguousStdioOption} from './type.js';4import type {FdStdioArrayOption} from './option.js';56type AnyNativePipeStdioOption = NativePipeStdioOption<boolean, false>;6type AnyAmbiguousStdioOption = AmbiguousStdioOption<boolean, false, boolean>;78type InputNativePipeStdioOption = AnyNativePipeStdioOption & {8type InputAmbiguousStdioOption = AnyAmbiguousStdioOption & {9 readonly input: true;10};1112type NativePipeInputValue<StdioOptionType> = StdioOptionType extends AnyNativePipeStdioOption13 ? NativePipeInputProperty<StdioOptionType>12type AmbiguousStdioInputValue<StdioOptionType> = StdioOptionType extends AnyAmbiguousStdioOption13 ? AmbiguousStdioInputProperty<StdioOptionType>14 : never;1516type NativePipeInputProperty<StdioOptionType> = 'input' extends keyof StdioOptionType16type AmbiguousStdioInputProperty<StdioOptionType> = 'input' extends keyof StdioOptionType17 ? StdioOptionType extends {readonly input?: infer Input} ? Input : never18 : never;1920// Whether `result.stdio[FdNumber]` is an input stream
11 unmodified lines
32 FdNumber extends string,33 StdioOptionType,34> = Intersects<35 StdioOptionType,36 FdNumber extends '1' | '2' ? InputStdioOption : InputStdioOption | InputNativePipeStdioOption36 FdNumber extends '1' | '2' ? InputStdioOption : InputStdioOption | InputAmbiguousStdioOption37> extends true38 ? true39 : FdNumber extends '1' | '2'40 ? false41 : true extends NativePipeInputValue<StdioOptionType>41 : true extends AmbiguousStdioInputValue<StdioOptionType>42 ? boolean43 : false;4445export {};
modified:types/stdio/type.d.ts+27 added-4 removed
23 unmodified lines
24 | number25 | Readable26 | Writable27 | Unless<IsStandardStream<FdNumber>, undefined>28 | readonly [NoStreamStdioOption<FdNumber>];28 | readonly [NoStreamStdioOption<FdNumber>]29 | {readonly value: 'inherit' | number; readonly input?: boolean};3031// `options.stdio` when it is not an array32type SimpleStdioOption<33 IsSync extends boolean,
5 unmodified lines
39 | Unless<And<And<Not<IsSync>, IsArray>, IsExtra>, 'inherit'>40 | Unless<IsArray, 'ignore'>41 | Unless<IsSync, 'overlapped'>;4243// The `{value, input}` object form wraps a direction-ambiguous value and sets its direction explicitly.42export type NativePipeStdioOption<44export type AmbiguousStdioOption<45 IsSync extends boolean,46 IsExtra extends boolean,47 IsArray extends boolean,48 ObjectModeChunk = unknown,49 TransformChunk = string,50> = {46 readonly value: 'pipe' | Unless<IsSync, 'overlapped'>;51 readonly value: AmbiguousStdioValue<IsSync, IsArray, ObjectModeChunk, TransformChunk>;52 readonly input?: Unless<And<IsSync, IsExtra>, boolean> | false;53};5455// Values whose direction is ambiguous on additional file descriptors, so they default to output unless `input` is set.56// This excludes values with a fixed direction (readable/writable streams, iterables, standard file descriptors).57type AmbiguousStdioValue<58 IsSync extends boolean,59 IsArray extends boolean,60 ObjectModeChunk,61 TransformChunk,62> =63 | 'pipe'64 | 'inherit'65 | Unless<IsSync, 'overlapped'>66 | URL67 | GeneratorTransform<IsSync, TransformChunk>68 | GeneratorTransformFull<IsSync, ObjectModeChunk, TransformChunk>69 | Unless<And<Not<IsSync>, IsArray>, 3 | 4 | 5 | 6 | 7 | 8 | 9>70 | Unless<IsSync, DuplexTransform | WebTransform | TransformStream>71 | {readonly file: string; readonly append?: boolean};7273// Values available in both `options.stdin|stdio` and `options.stdout|stderr|stdio`74type CommonStdioOption<75 IsSync extends boolean,76 IsExtra extends boolean,
1 unmodified line
78 ObjectModeChunk = unknown,79 TransformChunk = string,80> =81 // TypeScript cannot contextually type inline full generator transform objects through this broad stdio union because the union also includes `{transform: Duplex | TransformStream}` wrapper objects. Users should annotate `chunk` when assigning an inline object directly to `StdinOption`, `StdoutStderrOption`, `Options['stdout']`, etc. Keep `GeneratorTransformFull` mode branches narrow, but do not add a broad full-object fallback here to try to recover contextual typing.59 SimpleStdioOption<IsSync, IsExtra, IsArray> | URL | GeneratorTransform<IsSync, TransformChunk> | GeneratorTransformFull<IsSync, ObjectModeChunk, TransformChunk> | Unless<And<Not<IsSync>, IsArray>, 3 | 4 | 5 | 6 | 7 | 8 | 9> | Unless<IsSync, DuplexTransform | WebTransform | TransformStream> | NativePipeStdioOption<IsSync, IsExtra> | {readonly file: string; readonly append?: boolean};82 SimpleStdioOption<IsSync, IsExtra, IsArray> | URL | GeneratorTransform<IsSync, TransformChunk> | GeneratorTransformFull<IsSync, ObjectModeChunk, TransformChunk> | Unless<And<Not<IsSync>, IsArray>, 3 | 4 | 5 | 6 | 7 | 8 | 9> | Unless<IsSync, DuplexTransform | WebTransform | TransformStream> | AmbiguousStdioOption<IsSync, IsExtra, IsArray, ObjectModeChunk, TransformChunk> | {readonly file: string; readonly append?: boolean};8384// Synchronous iterables excluding strings, Uint8Arrays and Arrays85type IterableObject<IsArray extends boolean> = Iterable<unknown>86 & object
120 unmodified lines