Skip to content

Releases: sindresorhus/execa

v7.1.0

11 Mar 23:57
Compare
Choose a tag to compare

Features

import {$} from 'execa';

const branch = await $`git branch --show-current`;
await $`dep deploy --branch=${branch}`;
// 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');
// 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 on stderr before executing it. This can also be enabled by setting the NODE_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

11 Feb 17:18
Compare
Choose a tag to compare

Breaking

Fixes

  • Emit end event on streams when process fails (#518) 30c7a7a
  • Fix incorrect execaNode signature in index.d.ts (#506) 1f7677c

v6.1.0...v7.0.0

v6.1.0

13 Feb 10:41
Compare
Choose a tag to compare

v6.0.0...v6.1.0

v6.0.0

17 Nov 11:10
Compare
Choose a tag to compare

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').syncimport {execaSync} from 'execa'
    • require('execa').commandimport {execaCommand} from 'execa'
    • require('execa').commandSyncimport {execaCommandSync} from 'execa'
    • require('execa').nodeimport {execaNode} from 'execa'

v5.1.1...v6.0.0

v5.1.1

04 Jun 16:38
Compare
Choose a tag to compare
  • Fix error message when user passes a single array argument (#468) 2b9c0e1

v5.1.0...v5.1.1

v5.1.0

02 Jun 17:37
Compare
Choose a tag to compare

v5.0.1...v5.1.0

v5.0.1

30 May 17:44
Compare
Choose a tag to compare

v5.0.0...v5.0.1

v5.0.0

03 Dec 05:21
Compare
Choose a tag to compare

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

v4.1.0...v5.0.0

v4.1.0

28 Oct 11:31
Compare
Choose a tag to compare
  • Remove --inspect & --inspect-brk from execArgv (#435) 8fd3f64

v4.0.3...v4.1.0

v4.0.3

07 Jul 18:32
Compare
Choose a tag to compare
  • Fix use of floating number for the timeout and forceKillAfterTimeout options (#431) 9a157b3

v4.0.2...v4.0.3