Skip to content

Define default options in a single place, autogenerate CLI help#29

Merged
lkmgr merged 6 commits into
mainfrom
27-refactor-option-handling
Aug 29, 2025
Merged

Define default options in a single place, autogenerate CLI help#29
lkmgr merged 6 commits into
mainfrom
27-refactor-option-handling

Conversation

@lkmgr

@lkmgr lkmgr commented Aug 26, 2025

Copy link
Copy Markdown
Collaborator
  • migrate from meow to yargs because it can autogenerate CLI help text and has builtin functionality for implies and conflicts which is currently handled manually
  • create handleLink and outputResults functions to split up main method in cli.ts
  • create SharedOptions type containing options shared by CLI/config/API and then extend it with types specific to each case
  • create DEFAULT_OPTIONS object to prevent defining default fallback values in multiple places

@lkmgr lkmgr self-assigned this Aug 26, 2025
@lkmgr lkmgr linked an issue Aug 26, 2025 that may be closed by this pull request
@lkmgr lkmgr force-pushed the 27-refactor-option-handling branch 4 times, most recently from a65e3af to 1435136 Compare August 27, 2025 11:25
@codecov

codecov Bot commented Aug 27, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.55%. Comparing base (25b6ccb) to head (9976e6e).
⚠️ Report is 9 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main      #29       +/-   ##
===========================================
+ Coverage   74.09%   93.55%   +19.46%     
===========================================
  Files          11       10        -1     
  Lines        1293     1024      -269     
  Branches      296      282       -14     
===========================================
  Hits          958      958               
+ Misses        334       65      -269     
  Partials        1        1               

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@lkmgr lkmgr force-pushed the 27-refactor-option-handling branch from 749bac0 to 9ee700e Compare August 27, 2025 12:02
@lkmgr lkmgr marked this pull request as ready for review August 27, 2025 12:56
@lkmgr lkmgr force-pushed the 27-refactor-option-handling branch from 9ee700e to 9976e6e Compare August 27, 2025 13:07
@lkmgr lkmgr requested a review from frederik-b August 27, 2025 13:16

@frederik-b frederik-b left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@lkmgr lkmgr merged commit 65e3545 into main Aug 29, 2025
9 checks passed
@lkmgr lkmgr deleted the 27-refactor-option-handling branch August 29, 2025 07:26
@github-actions

github-actions Bot commented Sep 9, 2025

Copy link
Copy Markdown

🎉 This PR is included in version 1.4.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor option handling

2 participants