Skip to content

feat(cli): add --json to 'formats' - #759

Merged
KnifeLemon merged 1 commit into
KnifeLemon:mainfrom
yavuzmeteafsar:feat/formats-json
Oct 29, 2026
Merged

KnifeLemon merged 1 commit into
KnifeLemon:mainfrom
yavuzmeteafsar:feat/formats-json

Conversation

@yavuzmeteafsar

Copy link
Copy Markdown
Contributor

What does this change?

filee formats and filee 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"] }

targets is "converts to", withEngines is "With optional engines". category is lower case like state in convert --json. The text output is unchanged.

Type of change

  • Bug fix
  • New feature or improvement
  • New format or engine
  • Translation
  • Documentation
  • Build, CI or dependencies

How was it tested?

  • dotnet format (on the changed files)
  • dotnet test (tests/Filee.Cli.Tests, filter Formats|Archives_list_folder: 10 passed). New: Formats_json_lists_every_format, Formats_json_of_one_format_matches_the_text
  • Tried it: formats zip --json on macOS, Apple Silicon (dev build without 7-Zip, so the archive targets are under withEngines)

Checklist

  • The PR does one thing

@github-actions github-actions Bot added the feature New features label Oct 29, 2026
@yavuzmeteafsar

Copy link
Copy Markdown
Contributor Author

The linux-x64 portable job failed on StallWatchTests.A_program_that_keeps_reporting_runs_well_past_the_stall_limit (Filee.Engines.Tests), not on this change: it is timing-based (300 ms stall limit, failed after 358 ms) and passed on linux-arm64 and Windows in the same run. The CLI tests didn’t get to run on x64 because the loop stops at the first failing project; on arm64 they passed. “Package on Ubuntu 22.04 (linux-x64)” failed only because that package wasn’t built. Could you re-run the failed jobs?

@KnifeLemon KnifeLemon left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@KnifeLemon
KnifeLemon merged commit dfe6b6c into KnifeLemon:main Oct 29, 2026
15 of 17 checks passed
Marouane-elfadli pushed a commit to Marouane-elfadli/Filee that referenced this pull request Oct 29, 2026
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants