google/zx
google/zx
Activity
Last release
Open issues
Open PRs
License
release notes
release notes
Published 9/11/2024
PatchContains breaking changes$.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.
$.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)
Duration parser #884:const p = $({timeout: '1mss'})`sleep 999` // raises an error now
release notes
Published 9/11/2024
PatchContains breaking changes$.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.
$.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)
Duration parser #884:const p = $({timeout: '1mss'})`sleep 999` // raises an error now
A tool for writing better scripts