8.1.3
Nothing special today. We just keep improving the implementation.
Features
import {$} from 'zx'zx/cliexports its inners to allow more advanced usage.
Imagine, your own CLI tool that useszxas a base:
#828
#!/usr/bin/env node
import './index.mjs'
import {main} from 'zx/cli'
main()const getFixedSizeArray = (size) => {
const arr = []
return new Proxy(arr, {
get: (target, prop) =>
prop === 'push' && arr.length >= size
? () => {}
: target[prop],
})
}
const store = {
stdout: getFixedSizeArray(1),
stderr: getFixedSizeArray(1),
stdall: getFixedSizeArray(0),
}
const p = await $({ store })`echo foo`
p.stdout.trim() // 'foo'
p.toString() // ''- Introduced sync methods for
ps:
#840
import { ps } from 'zx'
const list1 = await ps()
const list2 = await tree()
// new methods
const list3 = ps.sync()
const list4 = tree.sync()Chore
$.logacceptskind: 'custom'#834- Describe
$.verboseand$.quietmodes internals #835 - Mention
quotePowerShellin docs #851 - Finally fixed the annoying flaky problem of the process end detection in Bun #839, coderef
- Suppress
async_hooks.createHookwarning on bun #848 - Remove node-abort-controller in favor of built-in node-fetch polyfill #842
- Add missing global types #853