github google/zx 8.7.2
8.7.2 — Copper Crafter

latest releases: 8.8.1, 8.8.0
one month ago

Stability and customizability improvements

  • Handle nothrow option on ProcessPromise init stage #1288
const o = await $({ nothrow: true })`\033`
o.ok      // false
o.cause   // Error
  • Handle _snapshot.killSignal value on kill() #1287
const p = $({killSignal: 'SIGKILL'})`sleep 10`
await p.kill()
p.signal  // 'SIGKILL'
  • Introduced Fail class #1285
import { Fail } from 'zx'

Fail.EXIT_CODES['2'] = 'Custom error message'
Fail.formatErrorMessage = (err: Error, from: string): string =>
  `${err.message} (${from})`
import type { $, Options } from 'zx'

const custom$: $ = (pieces: TemplateStringsArray | Partial<Options>, ...args: any[]) => {
  // ... custom implementation
}
  • Internal tweak ups #1276 #1277 #1278 #1279 #1280 #1281 #1282 #1286 #1289

  • Described the zx architecture basics. This section helps to better understand the zx concepts and internal logic, and will be useful for those who want to become a project contributor, make tools based on it, or create something similar from scratch. #1290 #1291 #1292

Don't miss a new zx release

NewReleases is sending notifications on new releases.