Skip to content
Myr

Add `serialization` option (#392)

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

authored by ehmicky · committed by Sindre Sorhus · parent f1eda9c · Browse files · 3 files+27 added−0 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+27 added−0 removed

  • other:+27 added−0 removed

3 files+27 added−0 removed

modified:index.d.ts+13 added
134 unmodified lines
135 */136 readonly stdio?: 'pipe' | 'ignore' | 'inherit' | readonly StdioOption[];137138 /**139 Specify the kind of serialization used for sending messages between processes when using the `stdio: 'ipc'` option or `execa.node()`:140 - `json`: Uses `JSON.stringify()` and `JSON.parse()`.141 - `advanced`: Uses [`v8.serialize()`](https://nodejs.org/api/v8.html#v8_v8_serialize_value)142143 Requires Node.js `13.2.0` or later.144145 [More info.](https://nodejs.org/api/child_process.html#child_process_advanced_serialization)146147 @default 'json'148 */149 readonly serialization?: 'json' | 'advanced';150151 /**152 Prepare child to run independently of its parent process. Specific behavior [depends on the platform](https://nodejs.org/api/child_process.html#child_process_options_detached).153154 @default false155 */
387 unmodified lines
modified:index.test-d.ts+1 added
modified:readme.md+13 added
449 unmodified lines
450Default: `pipe`451452Child's [stdio](https://nodejs.org/api/child_process.html#child_process_options_stdio) configuration.453454#### serialization455456Type: `string`<br>457Default: `'json'`458459Specify the kind of serialization used for sending messages between processes when using the [`stdio: 'ipc'`](#stdio) option or [`execa.node()`](#execanodescriptpath-arguments-options):460 - `json`: Uses `JSON.stringify()` and `JSON.parse()`.461 - `advanced`: Uses [`v8.serialize()`](https://nodejs.org/api/v8.html#v8_v8_serialize_value)462463Requires Node.js `13.2.0` or later.464465[More info.](https://nodejs.org/api/child_process.html#child_process_advanced_serialization)466467#### detached468469Type: `boolean`470
168 unmodified lines