create-react-microservice
create-react-microservice copied to clipboard
TASK: Update dependency execa to v7
This PR contains the following updates:
Package | Change | Age | Adoption | Passing | Confidence |
---|---|---|---|---|---|
execa | 1.0.0 -> 7.1.1 |
Release Notes
sindresorhus/execa (execa)
v7.1.1
Features
- Improve error message when
$.sync(options)`command`
is used instead of$(options).sync`command`
(#β551)
Bug fixes
- Fix argument concatenation when using
$`command argument${value}`
(#β553) - Fix default value of the
stdin
option when using$`command`
: it should beinherit
(#β550)
v7.1.0
Features
- Add
$
method to write Node.js scripts like zx. For more information, please see this blog post, this section and this page. Thanks @βaaronccasanova for this great feature!
import {$} from 'execa';
const branch = await $`git branch --show-current`;
await $`dep deploy --branch=${branch}`;
- Add
.pipeStdout()
,.pipeStderr()
and.pipeAll()
methods to redirectstdout
/stderr
to a file, a stream or another process.
// Similar to `echo unicorns > stdout.txt` in Bash
await execa('echo', ['unicorns']).pipeStdout('stdout.txt');
// Similar to `echo unicorns 2> stdout.txt` in Bash
await execa('echo', ['unicorns']).pipeStderr('stderr.txt');
// Similar to `echo unicorns &> stdout.txt` in Bash
await execa('echo', ['unicorns'], {all: true}).pipeAll('all.txt');
- Add
inputFile
option to use a file asstdin
.
// Similar to `cat < stdin.txt` in Bash
const {stdout} = await execa('cat', {inputFile: 'stdin.txt'});
console.log(stdout);
//=> 'unicorns'
- Add
verbose
option to print each command onstderr
before executing it. This can also be enabled by setting theNODE_DEBUG=execa
environment variable in the current process.
> node file.js
unicorns
rainbows
> NODE_DEBUG=execa node file.js
[16:50:03.305] echo unicorns
unicorns
[16:50:03.308] echo rainbows
rainbows
v7.0.0
Breaking
Fixes
- Emit
end
event on streams when process fails (#β518)30c7a7a
- Fix incorrect
execaNode
signature inindex.d.ts
(#β506)1f7677c
v6.1.0
- Support
AbortController
(#β490)c6e791a
- Allow
cwd
andlocalDir
options to be URLs (#β492)93ab929
v6.0.0
Breaking
- Require Node.js 12.20 (#β478)
7707880
- This package is now pure ESM. Please read this.
- Moved from a default export to named exports.
-
require('execa')
βimport {execa} from 'execa'
-
require('execa').sync
βimport {execaSync} from 'execa'
-
require('execa').command
βimport {execaCommand} from 'execa'
-
require('execa').commandSync
βimport {execaCommandSync} from 'execa'
-
require('execa').node
βimport {execaNode} from 'execa'
-
v5.1.1
v5.1.0
- Add
.escapedCommand
property to the results (#β466)712bafc
v5.0.1
v5.0.0
Breaking
- Remove faulty emulated ENOENT error on Windows (#β447)
bdbd975
This is only a breaking change if you depend on the exact error message.
Improvements
- Upgrade dependencies
5d64878
v4.1.0
v4.0.3
v4.0.2
Bug fixes
- Fix with third-party promises (like
bluebird
) not working (#β427)
v4.0.1
Bug fixes
- Fix checking for
Error
instances (#β423)
v4.0.0
Breaking changes
- Require Node.js 10 (
5a9c76f
) - Add
stderr
andstdout
toerror.message
. A new propertyerror.shortMessage
is now available to retrieve the error message withoutstderr
norstdout
(#β397)
Bug fixes
- Fix
childProcess.kill()
not working with Electron (#β400)
v3.4.0
Features
- Add
serialization
option. That option was added tochild_process
methods in Node.js13.2.0
. (#β392)
v3.3.0
Features
- Allow setting the
windowsHide
option (#β388). The option still defaults totrue
. However previously it could not be set tofalse
.
Documentation
Thanks @βjustsml for helping improving the documentation!
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
Features
- Add
execPath
option which allows changing the path to the Node.js executable to use in child processes. (#β377)
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
Features
- Add
error.originalMessage
property (#β373)
Documentation
- Document the reasons why the returned promise might fail (#β364)
Dependencies
- Upgrade cross-spawn to
7.0.0
(#β367)
v2.0.5
Bug fixes
v2.0.4
Bug fixes
v2.0.3
Bug fixes
- Add missing TypeScript definition for
all
(#β345)
Documentation
v2.0.2
Bug fixes
- Fix memory leak (#β321, #β330)
- Fix
result.all
not being constant across calls (#β327, #β330)
v2.0.1
Bug fixes
- Correctly set the
engines.node
field inpackage.json
. Supported Node versions are either^8.12.0
or>=9.7.0
(#β319, #β323)
Documentation
- Improve the
execa.command()
documentation (#β317)
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
- Fix various tests (f185a0e8, #β185, #β215, #β216, #β224, #β218, #β225, #β231, #β233, #β247, #β300)
Maintainers
- Add @βehmicky as an additional maintainer.
Configuration
π Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
π¦ Automerge: Disabled by config. Please merge this manually once you are satisfied.
β» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
π Ignore: Close this PR and you won't be reminded about this update again.
- [ ] If you want to rebase/retry this PR, check this box
This PR has been generated by Mend Renovate. View repository job log here.