Skip to content

8.1.7

Compare
Choose a tag to compare
@antonmedv antonmedv released this 17 Sep 12:36
· 31 commits to main since this release
5038ec5

Step by step on the road to improvements

Fixes

Finally, we've fixed the issue with piped process rejection #640 #899:

const p1 = $`exit 1`.pipe($`echo hello`)
try {
  await p1
} catch (e) {
  assert.equal(e.exitCode, 1)
}

const p2 = await $({ nothrow: true })`echo hello && exit 1`.pipe($`cat`)
assert.equal(p2.exitCode, 0)
assert.equal(p2.stdout.trim(), 'hello')

Enhancements

Added cmd display to ProcessPromise #891:

const foo = 'bar'
const p = $`echo ${foo}`

p.cmd // 'echo bar'

and duration field to ProcessOutput #892:

const p = $`sleep 1`.nothrow()
const o = await p

o.duration // ~1000 (in ms)

Enabled zurk-like pipe string literals #900:

const p = await $`echo foo`.pipe`cat`
p.stdout.trim() // 'foo'