8.1.1
This release brings a pinch of sugar and minor fixes.
Features
- Introduced
$.preferLocal
option to prefernode_modules/.bin
located binaries over globally system installed ones.
#798
$.preferLocal = true
await $`c8 npm test`
await $({ preferLocal: true })`eslint .`
const p = $`echo 'foo\nbar'`
await p.text() // foo\n\bar\n
await p.text('hex') // 666f6f0a0861720a
await p.buffer() // Buffer.from('foo\n\bar\n')
await p.lines() // ['foo', 'bar']
await $`echo '{"foo": "bar"}'`.json() // {foo: 'bar'}
ProcessPromise
now exposes itssignal
reference.
#816
const p = $`sleep 999`
const {signal} = p
const res = fetch('https://example.com', {signal})
setTimeout(() => p.abort('reason'), 1000)