Releases: sindresorhus/execa
Releases · sindresorhus/execa
v3.2.0
Features
- Add
error.signalDescription
which is a human-friendly description of the signal that terminated the child process (if one did). That description is included in error messages as well. (#378)
v3.1.0
v3.0.0
Breaking changes
- When the
buffer
option isfalse
andstdout
andstderr
are piped, the promise returned byexeca()
will resolve only after those streams are fully read. This also applies to theall
property if theall
option istrue
. This concerns you only if you've explicitly set thebuffer
option tofalse
. (#353) - The
all
property is nowundefined
unless theall
option is set totrue
. (#353) error.exitCodeName
has been removed. (#375)- Fix
error.exitCode
. Its value was previously based onerror.errno
which is incorrect. (#375)
Features
- Do not remove
error.code
property when it is defined (#375) - Improve error messages (#375)
- Add
error.originalMessage
property (#373)
Bug fixes
- Fix errors being thrown when
detached: true
orcleanup: false
is used (#360) - Make execa compatible with Node.js
13.0.0-pre
(#370)
Dependencies
Documentation
- Document the reasons why the returned promise might fail (#364)
v2.1.0
v2.0.5
v2.0.4
Bug fixes
v2.0.3
v2.0.2
v2.0.1
v2.0.0
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!
Breaking changes
- Drop support for Node.js 6 (dce22670, #221)
- Remove
execa.shell()
andexeca.shellSync()
. Theshell
option should be used instead. (#219) - Remove
execa.stdout()
andexeca.stderr()
.childProcessResult.stdout
andchildProcessResult.stderr
should be used instead (#234) - Remove
error.code
(number
orstring
) in favor oferror.exitCode
(number
) anderror.exitCodeName
(string
) (#187, #250) - Rename
stripeEof
option tostripFinalNewline
(f8397ba9, 4d0dc88a, #238) - Rename
cmd
(inchildProcessResult
anderror
) tocommand
(#194) - Default
preferLocal
option tofalse
. If you are executing locally installed binaries, you'll need to manually specifypreferLocal: true
(#314) - Ensure
windowsHide
option is alwaystrue
, so that no window pops up on Windows. (8c886452) error.signal
is nowundefined
instead ofnull
when no signal was used (#193)- Set
error.killed
tofalse
when child process timed out (#227) - Make
error.killed
always boolean (notundefined
) (#229, #248) - Ensure errors always have the same shape. (#276, #277, #283)
error.stdout
anderror.stderr
are now an empty string (instead ofnull
) when the command failed. (#246)
Features
- Add TypeScript definition (#188, f2cb86ff, 7702b8ef, 4692dcd4, #251)
- Add
execa.command()
andexeca.commandSync()
. Those are the same asexeca()
except both file and arguments are specified in a single string. For example,execa('echo', ['unicorns'])
is the same asexeca.command('echo unicorns')
(#182, #261, #262, #278, #279, #282) - Retrieve interleaved stdout and stderr with
childProcess.all
andchildProcessResult.all
(#171, #264) - Add
execa.node()
which (likechild_process.fork()
) allows you to execute a Node.js script as a child process (#200, #297, #299, #302, #303, #305, #306). - If
childProcess.kill()
does not terminate a child process after 5 seconds, force it by sendingSIGKILL
. This can be configured using theforceKillAfterTimeout
option. (#208, #272, #273, #280, #284, #285) - Add
childProcess.cancel()
anderror.isCanceled
(#189, f24e7c72, #226, #309) error.stdout
,error.stderr
anderror.all
now contain the data that was sent before the child process exit. (#271)- Improve
error.message
on child process failure (#180, #223, #230, #245, #269) - Add
.finally()
to the child process promise (#174, 65139849) - Increase
maxBuffer
option default value from10 MB
to100 MB
(#286)
Bug fixes
- Fix
timeout
option not working as expected (#199) - Fix
error.timedOut
not working withexeca.sync()
(#249) - Fix
maxBuffer
errors not using the same shape as the other errors (#266) - Fix
extendEnd
option not working withshell
option (#184) - Fix
stripFinalNewline
option not applied on error properties (#240) - Fix
/q
parameter not added when usingcmd
instead ofcmd.exe
(#203) - Fix uncaught exception when using
input
option with a non-executable file (#212, #258) - Fix errors on child processes waiting for stdout/stderr to complete (#270)
- Fix validating that the
stdio
option cannot be used together withstdin: 0
(#301).
Documentation
Design
- Add a logo (#201)
Tests
Maintainers
- Add @ehmicky as an additional maintainer.