Skip to content

5.2.0

Compare
Choose a tag to compare
@antonmedv antonmedv released this 27 Feb 14:40
· 310 commits to main since this release

72c8cf0 Added experimental startSpinner() function.
53a215e Added the signal field to ProcessOutput.
bf88f50 Added quiet() function (#313).
51fb6d5 Improved experemental echo()function.

import {echo} from 'zx/experimental'

// The echo() can be used both ways: 
echo`Current branch is ${branch}.`
// or
echo('Current branch is', branch)
import {startSpinner} from 'zx/experimental'

let stop = startSpinner()
await $`long-running command`
stop()
let p = nothrow($`while true; do :; done`)
setTimeout(() => p.kill('SIGKILL'), 1000)
let {signal} = await p
assert.equal(signal, 'SIGKILL')
await quiet($`grep something from-file`)
// Command and output will not be displayed.