fix: You can pass --example with no value after#1051
Merged
Conversation
🦋 Changeset detectedLatest commit: 777a83f The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
arkenv
@arkenv/bun-plugin
@arkenv/cli
@arkenv/fumadocs-ui
@arkenv/vite-plugin
commit: |
Contributor
📦 Bundle Size Report✅ All size limits passed! |
Contributor
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — this PR tightens @arkenv/cli parsing so value-taking flags fail fast when no value is provided.
- Validate missing
--examplevalues —CLInow reportsMissing value for option: <flag>when--exampleor-eis passed at the end of the argument list or immediately before another flag-like token. - Cover short-flag bundled edge cases —
cli.test.tsupdates expectations for bundled-eusage and adds direct coverage for missing valued-flag inputs. - Add patch changeset —
.changeset/validate-valued-flags.mdrecords the CLI behavior fix for release.
GPT | 𝕏
Merged
yamcodes
pushed a commit
that referenced
this pull request
May 21, 2026
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @arkenv/cli@0.2.1 ### Patch Changes - #### Fix --help table alignment _[`#1052`](#1052) [`cf7bd02`](cf7bd02) [@yamcodes](https://github.com/yamcodes)_ - #### Support POSIX-style short-flag bundling in CLI parser _[`#1047`](#1047) [`b2e4865`](b2e4865) [@yamcodes](https://github.com/yamcodes)_ Enables combining multiple short flags (e.g. `-yq` instead of `-y -q` or `-yfq` instead of `-y -f -q`) in CLI commands. Flag values starting with `-` (e.g. `init -e -abc`) are preserved without expansion. - #### Validate valued CLI flags and reject missing values _[`#1051`](#1051) [`dec2581`](dec2581) [@yamcodes](https://github.com/yamcodes)_ Add parser-level validation to reject flags that require a value (e.g. `--example` or `-e`) when they are passed without one. A validation error message is set, and the CLI exits with status code 1. Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Fixes #1050
Reject valued flags (like
--exampleor-e) when they are passed without any value (either at the end of the argument list or followed immediately by another flag).