node/volta
Pins the LTS version of Node.js and latest version of the currently active package manager in use with Volta.
Usage
npx @lukasbach/scripts node/volta
You can call the script directly if you have installed it globally:
npm i -g @lukasbach/scripts
ldo node/volta
Options
-v
,--verbose
: Verbose logging
You can also omit options, and will be asked for them interactively.
Add --yes
to skip all confirmations.
Script source
/** Pins the LTS version of Node.js and latest version of the currently active package manager in use with Volta. */
await utils.cd(await utils.node.getPackageRoot());
await $`volta pin node@lts`;
await $`volta pin ${await utils.node.getPackageManager()}@latest`;