chore(deps): update dependency execa to ^9.2.0
This MR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| execa | devDependencies | minor | ^9.1.0 -> ^9.2.0 |
MR created with the help of gitlab-org/frontend/renovate-gitlab-bot
Release Notes
sindresorhus/execa (execa)
v9.2.0
This release includes a new set of methods to exchange messages between the current process and a Node.js subprocess, also known as "IPC". This allows passing and returning almost any message type to/from a Node.js subprocess. Also, debugging IPC is now much easier.
Moreover, a new gracefulSignal option has also been added to terminate a subprocess gracefully.
For a deeper dive-in, please check and share the release post!
Thanks @iiroj for your contribution, @SimonSiefke and @adymorz for reporting the bugs fixed in this release, and @karlhorky for improving the documentation!
Deprecations
- Passing
'ipc'to thestdiooption has been deprecated. It will be removed in the next major release. Instead, theipc: trueoption should be used. (#1056)
- await execa('npm', ['run', 'build'], {stdio: ['pipe', 'pipe', 'pipe', 'ipc']});
+ await execa('npm', ['run', 'build'], {ipc: true});
- The
execaCommand()method has been deprecated. It will be removed in the next major release. If most cases, the template string syntax should be used instead.
- import {execaCommand} from 'execa';
+ import {execa} from 'execa';
- await execaCommand('npm run build');
+ await execa`npm run build`;
const taskName = 'build';
- await execaCommand(`npm run ${taskName}`);
+ await execa`npm run ${taskName}`;
const commandArguments = ['run', 'task with space'];
await execa`npm ${commandArguments}`;
If the file and/or multiple arguments are supplied as a single string, parseCommandString(command) can split that string into an array. More info. (#1054)
- import {execaCommand} from 'execa';
+ import {execa, parseCommandString} from 'execa';
const commandString = 'npm run task';
- await execaCommand(commandString);
+ const commandArray = parseCommandString(commandString); // ['npm', 'run', 'task']
+ await execa`${commandArray}`;
// Or alternatively:
const [file, ...commandArguments] = commandArray;
await execa(file, commandArguments);
Features
- Add
gracefulSignaloption andgetCancelSignal()method to terminate a subprocess gracefully.error.isGracefullyCanceledwas also added. (#1109) - Add
error.isForcefullyTerminated. It istruewhen the subprocess was terminated by theforceKillAfterDelayoption. (#1111) - New methods to simplify exchanging messages between the current process and the subprocess. More info. (#1059, #1061, #1076, #1077, #1079, #1082, #1083, #1086, #1087, #1088, #1089, #1090, #1091, #1092, #1094, #1095, #1098, #1104, #1107)
- The current process sends messages with
subprocess.sendMessage(message)and receives them withsubprocess.getOneMessage().subprocess.getEachMessage()listens to multiple messages. - The subprocess uses
sendMessage(message),getOneMessage()andgetEachMessage()instead. Those are the same methods, but imported directly from the'execa'module.
- The current process sends messages with
- The
ipcInputoption sends an IPC message from the current process to the subprocess as it starts. This enables passing almost any input type to a Node.js subprocess. (#1068) - The
result.ipcOutputarray contains all the IPC messages sent by the subprocess to the current process. This enables returning almost any output type from a Node.js subprocess. (#1067, #1071, #1075) - The error message now contains every IPC message sent by the subprocess. (#1067)
- The
verbose: 'full'option now logs every IPC message sent by the subprocess, for debugging. More info here and there. (#1063)
Types
- Add
ExecaMethod,ExecaNodeMethodandExecaScriptMethod,ExecaSyncMethodandExecaScriptSyncMethodtypes. (#1066) - Export the
Messagetype, for IPC. (#1059) - Fix type of
forceKillAfterDelay: trueoption. (#1116)
Bug fixes
- Fix passing a
{file}to both thestdinand thestdoutorstderroptions. (#1058) - Fix multiple minor problems with the
cancelSignaloption. (#1108) - Fix accidental publishing of Vim backup files. (#1074)
- Fix
engines.nodefield inpackage.json. Supported Node.js version is^18.19.0or>=20.5.0. (by @iiroj) (#1101)
Configuration
-
If you want to rebase/retry this MR, check this box
This MR has been generated by Renovate Bot.