8.1.6
Improvements & Fixes
$.preferLocal = true // injects node_modules/.bin to the $PATH
$.preferLocal = '/foo/bar' // attaches /foo/bar to the $PATH
$.preferLocal = ['/bar', '/baz'] // now the $PATH includes both /bar and /baz
Why not just $.env['PATH'] = 'extra:' + '$.env['PATH']
?
Well, the API internally does the same, but also handles the win paths peculiarities.
- Provided
$.killSignal
option for the symmetry with the$.timeoutSignal
. You can override the default termination flow #885:
$.killSignal = 'SIGKILL'
const p = $({nothrow: true})`sleep 10000`
setTimeout(p.kill, 100)
(await p).signal // SIGKILL
$
opt presets became chainable #883:
const $$ = $({ nothrow: true })
assert.equal((await $$`exit 1`).exitCode, 1)
const $$$ = $$({ sync: true }) // Both {nothrow: true, sync: true} are applied
assert.equal($$$`exit 2`.exitCode, 2)
- Enhanced the internal
Duration
parser #884:
const p = $({timeout: '1mss'})`sleep 999` // raises an error now