refactor: use --json flag alias instead of --format json throughout CLI

This commit is contained in:
Mohamed Boudra
2026-02-01 12:33:18 +07:00
parent dac1538d1f
commit a473302a9f
22 changed files with 313 additions and 167 deletions
+5 -5
View File
@@ -98,15 +98,15 @@ try {
console.log('-q (quiet) flag is accepted with inspect\n')
}
// Test 6: --format json flag is accepted with inspect
// Test 6: --json flag is accepted with inspect
{
console.log('Test 6: --format json flag is accepted with inspect')
console.log('Test 6: --json flag is accepted with inspect')
const result =
await $`PASEO_HOST=localhost:${port} PASEO_HOME=${paseoHome} npx paseo --format json inspect abc123`.nothrow()
await $`PASEO_HOST=localhost:${port} PASEO_HOME=${paseoHome} npx paseo inspect abc123 --json`.nothrow()
const output = result.stdout + result.stderr
assert(!output.includes('unknown option'), 'should accept --format json flag')
assert(!output.includes('unknown option'), 'should accept --json flag')
assert(!output.includes('error: option'), 'should not have option parsing error')
console.log('--format json flag is accepted with inspect\n')
console.log('--json flag is accepted with inspect\n')
}
// Test 7: --format yaml flag is accepted with inspect