node.md
This file
The walk stopped after 200 commits: lines older than f092dec point at it.
Validate `verbose` option (#990)ehmickybefore adoptionf092dec
lines 1–13why, one step back1<picture>2 <source media="(prefers-color-scheme: dark)" srcset="../media/logo_dark.svg">3 <img alt="execa logo" src="../media/logo.svg" width="400">4</picture>5<br>67# 🐢 Node.js files89## Run Node.js files1011```js12import {execaNode, execa} from 'execa';13Improve `readme.md` (#999)ehmickybefore adoptionaca3db3
line 14why, one step back14await execaNode`file.js argument`;Validate `verbose` option (#990)ehmickybefore adoptionf092dec
line 15why, one step back15// Is the same as:Improve `readme.md` (#999)ehmickybefore adoptionaca3db3
line 16why, one step back16await execa({node: true})`file.js argument`;Validate `verbose` option (#990)ehmickybefore adoptionf092dec
line 17why, one step back17// Or:Improve `readme.md` (#999)ehmickybefore adoptionaca3db3
line 18why, one step back18await execa`node file.js argument`;Validate `verbose` option (#990)ehmickybefore adoptionf092dec
lines 19–20why, one step back19```20Improve the documentation of the `node`/`nodePath`/`nodeOptions` options (#1011)ehmickybefore adoption4878db5
line 21why, one step back21## Node.js CLI flagsValidate `verbose` option (#990)ehmickybefore adoptionf092dec
line 22why, one step back22Improve the documentation of the `node`/`nodePath`/`nodeOptions` options (#1011)ehmickybefore adoption4878db5
lines 23–26why, one step back23When using the [`node`](api.md#optionsnode) option or [`execaNode()`](api.md#execanodescriptpath-arguments-options), the current Node.js [CLI flags](https://nodejs.org/api/cli.html#options) are inherited. For example, the subprocess will use [`--allow-fs-read`](https://nodejs.org/api/cli.html#--allow-fs-read) if the current process does.2425The [`nodeOptions`](api.md#optionsnodeoptions) option can be used to set different CLI flags.26Validate `verbose` option (#990)ehmickybefore adoptionf092dec
line 27why, one step back27```jsImprove the documentation of the `node`/`nodePath`/`nodeOptions` options (#1011)ehmickybefore adoption4878db5
line 28why, one step back28await execaNode({nodeOptions: ['--allow-fs-write']})`file.js argument`;Validate `verbose` option (#990)ehmickybefore adoptionf092dec
lines 29–31why, one step back29```3031## Node.js versionImprove the documentation of the `node`/`nodePath`/`nodeOptions` options (#1011)ehmickybefore adoption4878db5
lines 32–33why, one step back3233The same applies to the Node.js version, which is inherited too.Validate `verbose` option (#990)ehmickybefore adoptionf092dec
line 34why, one step back34Move API reference to its own page (#996)ehmickybefore adoption7cde496
line 35why, one step back35[`get-node`](https://github.com/ehmicky/get-node) and the [`nodePath`](api.md#optionsnodepath) option can be used to run a specific Node.js version. Alternatively, [`nvexeca`](https://github.com/ehmicky/nvexeca) or [`nve`](https://github.com/ehmicky/nve) can be used.Validate `verbose` option (#990)ehmickybefore adoptionf092dec
lines 36–41why, one step back3637```js38import {execaNode} from 'execa';39import getNode from 'get-node';4041const {path: nodePath} = await getNode('16.2.0');Improve `readme.md` (#999)ehmickybefore adoptionaca3db3
line 42why, one step back42await execaNode({nodePath})`file.js argument`;Validate `verbose` option (#990)ehmickybefore adoptionf092dec
lines 43–49why, one step back43```4445<hr>4647[**Next**: 🌐 Environment](environment.md)\48[**Previous**: 📜 Scripts](scripts.md)\49[**Top**: Table of contents](../readme.md#documentation)