Skip to content

feat: throw error on unused args#135

Merged
sxzz merged 3 commits intocacjs:mainfrom
sapphi-red:feat/error-with-unused-args
Feb 25, 2026
Merged

feat: throw error on unused args#135
sxzz merged 3 commits intocacjs:mainfrom
sapphi-red:feat/error-with-unused-args

Conversation

@sapphi-red
Copy link
Copy Markdown
Contributor

When the number of args passed is more than expected, it is likely to be mistaken the command syntax.
I think it would be good to have an error in this situation.

If I should implement something like allowUnknownOptions, I would do it.

Copy link
Copy Markdown
Contributor

@sxzz sxzz left a comment

Choose a reason for hiding this comment

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

LGTM, could you please resolve conflicts?

@sapphi-red
Copy link
Copy Markdown
Contributor Author

Done 👍

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Feb 25, 2026

Open in StackBlitz

npm i https://pkg.pr.new/cac@135

commit: 92051f2

@sxzz sxzz merged commit d0636d9 into cacjs:main Feb 25, 2026
10 checks passed
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.14%. Comparing base (665242c) to head (92051f2).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #135      +/-   ##
==========================================
+ Coverage   64.64%   66.14%   +1.50%     
==========================================
  Files           6        6              
  Lines         379      387       +8     
  Branches      107      109       +2     
==========================================
+ Hits          245      256      +11     
+ Misses        114      112       -2     
+ Partials       20       19       -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.

@sapphi-red sapphi-red deleted the feat/error-with-unused-args branch February 25, 2026 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants