Current code in bin.ts that throws an error:
yargs(hideBin(process.argv))
.env('POSTHOG_WIZARD')
// more chained methods
.help()
.alias('help', 'h')
.version()
.alias('version', 'v')
.wrap(process.stdout.isTTY ? yargs.terminalWidth() : 80).argv;
Expected something like:
import yargs from 'yargs';
import { hideBin } from 'yargs/helpers';
// Create a yargs instance
const yargInstance = yargs(hideBin(process.argv));
// Use terminalWidth() on the instance
const terminalWidth = yargInstance.terminalWidth();
// Example of using the width with .wrap()
yargInstance.wrap(terminalWidth)
.argv