Skip to content
Myr

Rename `nodeArguments` to `nodeOptions` (#299)

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 825f8a7 · Browse files · 4 files+10 added−10 removed
This commit

State

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

Diff stats

4 files+10 added−10 removed

  • tests:+3 added−3 removed
  • other:+7 added−7 removed

4 files+10 added−10 removed

modified:test/node.js+3 added-3 removed
modified:index.d.ts+2 added-2 removed
201 unmodified lines
202 */203 readonly nodePath?: string;204205 /**206 List of string arguments passed to the Node.js executable.206 List of [CLI options](https://nodejs.org/api/cli.html#cli_options) passed to the Node.js executable.207208 @default process.execArgv209 */210 readonly nodeArguments?: string[];210 readonly nodeOptions?: string[];211 }212213 interface ExecaReturnBase<StdoutStderrType> {214 /**
248 unmodified lines
modified:index.js+2 added-2 removed
529 unmodified lines
530 }531532 const stdioOption = stdio.node(options);533534 const {nodePath = process.execPath, nodeArguments = process.execArgv} = options;534 const {nodePath = process.execPath, nodeOptions = process.execArgv} = options;535536 return execa(537 nodePath,538 [539 ...nodeArguments,539 ...nodeOptions,540 scriptPath,541 ...(Array.isArray(args) ? args : [])542 ],543 {
9 unmodified lines
modified:readme.md+3 added-3 removed
187 unmodified lines
188189Execute a Node.js script as a child process.190191Same as `execa('node', [scriptPath, ...arguments], options)` except (like [`child_process#fork()`](https://nodejs.org/api/child_process.html#child_process_child_process_fork_modulepath_args_options)):192 - the current Node version and options are used. This can be overridden using the [`nodePath`](#nodepath-for-node-only) and [`nodeArguments`](#nodearguments-for-node-only) options.192 - the current Node version and options are used. This can be overridden using the [`nodePath`](#nodepath-for-node-only) and [`nodeOptions`](#nodeoptions-for-node-only) options.193 - the [`shell`](#shell) option cannot be used194 - an extra channel [`ipc`](https://nodejs.org/api/child_process.html#child_process_options_stdio) is passed to [`stdio`](#stdio)195196### childProcessResult
256 unmodified lines
453Default: [`process.execPath`](https://nodejs.org/api/process.html#process_process_execpath)454455Node.js executable used to create the child process.456457#### nodeArguments *(for `.node()` only)*457#### nodeOptions *(for `.node()` only)*458459Type: `string[]`<br>460Default: [`process.execArgv`](https://nodejs.org/api/process.html#process_process_execargv)461462List of string arguments passed to the Node.js executable.462List of [CLI options](https://nodejs.org/api/cli.html#cli_options) passed to the Node.js executable.463464## Tips465466### Save and pipe output from a child process
56 unmodified lines