Skip to content
Myr

Add support for file URLs with the `inputFile` option (#630)

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

authored by ehmicky · committed by GitHub · parent 0b8e297 · Browse files · 3 files+3 added−2 removed
This commit

State

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

Diff stats

3 files+3 added−2 removed

  • other:+3 added−2 removed

3 files+3 added−2 removed

modified:index.d.ts+1 added-1 removed
305 unmodified lines
306 Use a file as input to the the `stdin` of your binary.307308 If the input is not a file, use the `input` option instead.309 */310 readonly inputFile?: string;310 readonly inputFile?: string | URL;311} & CommonOptions<EncodingType>;312313export type SyncOptions<EncodingType extends EncodingOption = DefaultEncodingOption> = {314 /**
703 unmodified lines
modified:index.test-d.ts+1 added
149 unmodified lines
150execa('unicorns', {input: ''});151execa('unicorns', {input: new Uint8Array()});152execa('unicorns', {input: process.stdin});153execa('unicorns', {inputFile: ''});154execa('unicorns', {inputFile: new URL('file:///test')});155execa('unicorns', {stdin: 'pipe'});156execa('unicorns', {stdin: 'overlapped'});157execa('unicorns', {stdin: 'ipc'});158execa('unicorns', {stdin: 'ignore'});
191 unmodified lines
modified:readme.md+1 added-1 removed
553 unmodified lines
554If the input is a file, use the [`inputFile` option](#inputfile) instead.555556#### inputFile557558Type: `string`558Type: `string | URL`559560Use a file as input to the the `stdin` of your binary.561562If the input is not a file, use the [`input` option](#input) instead.
259 unmodified lines