docs/migration-from-v7.md
v8.0.0 release brought many features, improvements, optimizations and fixes, but also has introduced a few breaking changes. Fortunately, everything can be restored and legacy v7 scripts can still run with minor configurations.
$.verbose is set to false by default, but errors are still printed to stderr. Set $.quiet = true to suppress any output.$.verbose = true // everything works like in v7
$.quiet = true // to completely turn off logging
ssh API was dropped. Install webpod package instead.// import {ssh} from 'zx' ↓
import {ssh} from 'webpod'
const remote = ssh('user@host')
await remote`echo foo`
PowerShell anymore, on Windows by default. If you still need it, use the usePowerShell helper to enable:import { usePowerShell, useBash } from 'zx'
usePowerShell() // to enable powershell
useBash() // switch to bash, the default
To look for modern PowerShell v7+, invoke usePwsh() helper instead:
import { usePwsh } from 'zx'
usePwsh()
$ invocations is now disabled by default. This functionality is provided via an async hook and can now be controlled directly.import { syncProcessCwd } from 'zx'
syncProcessCwd() // restores legacy v7 behavior
Keep in mind, v7 is in maintenance mode, so it will not receive any new enhancements. We encourage you to upgrade to the latest: it's 16x smaller, faster, safer, more reliable and useful in a wider range of practical scenarios.