Bot releases are visible (Hide)
execPath
option which allows changing the path to the Node.js executable to use in child processes. (#377)buffer
option is false
and stdout
and stderr
are piped, the promise returned by execa()
will resolve only after those streams are fully read. This also applies to the all
property if the all
option is true
. This concerns you only if you've explicitly set the buffer
option to false
. (#353)all
property is now undefined
unless the all
option is set to true
. (#353)error.exitCodeName
has been removed. (#375)error.exitCode
. Its value was previously based on error.errno
which is incorrect. (#375)error.code
property when it is defined (#375)error.originalMessage
property (#373)detached: true
or cleanup: false
is used (#360)13.0.0-pre
(#370)npm-run-path
from 3.0.0
to 4.0.0
(#376)cross-spawn
to 7.0.0
(#367)error.originalMessage
property (#373)7.0.0
(#367)https://github.com/sindresorhus/execa/compare/v2.0.4...v2.0.5
detached: true
or cleanup: false
is used (#360) 211febehttps://github.com/sindresorhus/execa/compare/v2.0.3...v2.0.4
engines.node
field in package.json
. Supported Node versions are either ^8.12.0
or >=9.7.0
(#319, #323)execa.command()
documentation (#317)Thanks to @GMartigny, @BendingBender, @tomsotte, @ammarbinfaisal, @zokker13, @stroncium, @satyarohith, @bradfordlemley, @coreyfarrell, @brandon93s, @dtinth, @papb for the great features and bug fixes they've contributed!
Please check the Medium article about this release!
execa.shell()
and execa.shellSync()
. The shell
option should be used instead. (#219)execa.stdout()
and execa.stderr()
. childProcessResult.stdout
and childProcessResult.stderr
should be used instead (#234)error.code
(number
or string
) in favor of error.exitCode
(number
) and error.exitCodeName
(string
) (#187, #250)stripeEof
option to stripFinalNewline
(f8397ba9, 4d0dc88a, #238)cmd
(in childProcessResult
and error
) to command
(#194)preferLocal
option to false
. If you are executing locally installed binaries, you'll need to manually specify preferLocal: true
(#314)windowsHide
option is always true
, so that no window pops up on Windows. (8c886452)error.signal
is now undefined
instead of null
when no signal was used (#193)error.killed
to false
when child process timed out (#227)error.killed
always boolean (not undefined
) (#229, #248)error.stdout
and error.stderr
are now an empty string (instead of null
) when the command failed. (#246)execa.command()
and execa.commandSync()
. Those are the same as execa()
except both file and arguments are specified in a single string. For example, execa('echo', ['unicorns'])
is the same as execa.command('echo unicorns')
(#182, #261, #262, #278, #279, #282)childProcess.all
and childProcessResult.all
(#171, #264)execa.node()
which (like child_process.fork()
) allows you to execute a Node.js script as a child process (#200, #297, #299, #302, #303, #305, #306).childProcess.kill()
does not terminate a child process after 5 seconds, force it by sending SIGKILL
. This can be configured using the forceKillAfterTimeout
option. (#208, #272, #273, #280, #284, #285)childProcess.cancel()
and error.isCanceled
(#189, f24e7c72, #226, #309)error.stdout
, error.stderr
and error.all
now contain the data that was sent before the child process exit. (#271)error.message
on child process failure (#180, #223, #230, #245, #269).finally()
to the child process promise (#174, 65139849)maxBuffer
option default value from 10 MB
to 100 MB
(#286)timeout
option not working as expected (#199)error.timedOut
not working with execa.sync()
(#249)maxBuffer
errors not using the same shape as the other errors (#266)extendEnd
option not working with shell
option (#184)stripFinalNewline
option not applied on error properties (#240)/q
parameter not added when using cmd
instead of cmd.exe
(#203)input
option with a non-executable file (#212, #258)stdio
option cannot be used together with stdin: 0
(#301).This is an alpha release for the upcoming 2.0.0
.
Thanks to @GMartigny, @BendingBender, @tomsotte, @ammarbinfaisal, @zokker13, @stroncium, @satyarohith, @bradfordlemley, @coreyfarrell, @brandon93s, @dtinth, @papb for the great features and bug fixes they contributed!
execa.shell()
and execa.shellSync()
. The shell
option should be used instead. (#219)execa.stdout()
and execa.stderr()
. childProcessResult.stdout
and childProcessResult.stderr
should be used instead (#234)error.code
(number
or string
) in favor of error.exitCode
(number
) and error.exitCodeName
(string
) (#187, #250)stripeEof
option to stripFinalNewline
(f8397ba9, 4d0dc88a, #238)cmd
(in childProcessResult
and error
) to command
(#194)windowsHide
option to true
. This ensures no window pops up on Windows. (8c886452)error.signal
is now undefined
instead of null
when no signal was used (#193)error.killed
to false
when child process timed out (#227)error.killed
and error.isCanceled
always boolean (not undefined
) (#229, #248)error.stdout
and error.stderr
are now an empty string (instead of null
) when the command failed. (#246)execa.command()
and execa.commandSync()
. Those are the same as execa()
except both file and arguments are specified in a single string. For example, execa('echo', ['unicorns'])
is the same as execa.command('echo unicorns')
(#182, #261, #262, #278, #279, #282)childProcess.all
and childProcessResult.all
(#171, #264)childProcess.kill()
does not terminate a child process after 5 seconds, force it by sending SIGKILL
. This can be configured using the forceKillAftrerTimeout
option. (#208, #272, #273, #280, #284, #285)childProcess.cancel()
and error.isCanceled
(#189, f24e7c72, #226)error.stdout
, error.stderr
and error.all
now contain the data that was sent before the child process exit. (#271)error.message
on child process failure (#180, #223, #230, #245, #269).finally()
to the child process promise (#174, 65139849)maxBuffer
option default value from 10 MB
to 100 MB
(#286)timeout
option not working as expected (#199)error.timedOut
not working with execa.sync()
(#249)maxBuffer
errors not using the same shape as the other errors (#266)extendEnd
option not working with shell
option (#184)stripFinalNewline
option not applied on error properties (#240)/q
parameter not added when using cmd
instead of cmd.exe
(#203)input
option with a non-executable file (#212, #258)