Repository navigation
feat(cli): add --json to 'formats' - #759
Conversation
|
The linux-x64 portable job failed on |
KnifeLemon
left a comment
There was a problem hiding this comment.
Thanks, @yavuzmeteafsar! The JSON follows the text output exactly, category is lower case like state in convert --json, and the help text names the flag. The earlier linux-x64 failure was the StallWatchTests timing test, as you said; the rerun passed.
@SeoJCalive is picking up the rest of #753 (presets --json and failure reasons in convert --json) in the same shape.
A_program_that_keeps_reporting_runs_well_past_the_stall_limit touched every 50 ms against a 300 ms limit and failed several times today when a loaded runner delayed one wait past 300 ms (KnifeLemon#759, KnifeLemon#765, KnifeLemon#766). The limit is now 1 s and the fake program reports for 3 s, still three times the limit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
What does this change?
filee formatsandfilee formats <format>accept--json, so front ends don't depend on the wording of the text output. Follow-up to #582.filee formats --json:{ "formats": [ { "id": "png", "name": "PNG", "category": "image", "extensions": ["png"], "writable": true }, ... ] }filee formats zip --json(the same fields, plus the two lines of the text output):{ "id": "zip", "name": "ZIP", "category": "archive", "extensions": ["zip", "wbpz"], "writable": true, "targets": [...], "withEngines": ["7z", "tar", "tgz", "tbz2", "txz", "folder"] }targetsis "converts to",withEnginesis "With optional engines".categoryis lower case likestateinconvert --json. The text output is unchanged.Type of change
How was it tested?
dotnet format(on the changed files)dotnet test(tests/Filee.Cli.Tests, filterFormats|Archives_list_folder: 10 passed). New:Formats_json_lists_every_format,Formats_json_of_one_format_matches_the_textformats zip --jsonon macOS, Apple Silicon (dev build without 7-Zip, so the archive targets are underwithEngines)Checklist