Skip to content

fix: You can pass --example with no value after#1051

Merged
yamcodes merged 1 commit into
mainfrom
1050-you-can-pass---example-with-no-value-after
May 21, 2026
Merged

fix: You can pass --example with no value after#1051
yamcodes merged 1 commit into
mainfrom
1050-you-can-pass---example-with-no-value-after

Conversation

@yamcodes
Copy link
Copy Markdown
Owner

Fixes #1050

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

@yamcodes yamcodes linked an issue May 21, 2026 that may be closed by this pull request
@yamcodes yamcodes added bug Something isn't working tests This issue or PR is about adding, removing or changing tests @arkenv/cli Issues or Pull Requests involving the ArkEnv CLI labels May 21, 2026
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 21, 2026

🦋 Changeset detected

Latest commit: 777a83f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@arkenv/cli Patch

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

@github-actions github-actions Bot added the docs Improvements or additions to documentation label May 21, 2026
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 21, 2026

Open in StackBlitz

arkenv

npm i https://pkg.pr.new/arkenv@1051

@arkenv/bun-plugin

npm i https://pkg.pr.new/@arkenv/bun-plugin@1051

@arkenv/cli

npm i https://pkg.pr.new/@arkenv/cli@1051

@arkenv/fumadocs-ui

npm i https://pkg.pr.new/@arkenv/fumadocs-ui@1051

@arkenv/vite-plugin

npm i https://pkg.pr.new/@arkenv/vite-plugin@1051

commit: 777a83f

@arkenv-bot
Copy link
Copy Markdown
Contributor

arkenv-bot Bot commented May 21, 2026

📦 Bundle Size Report

No results found

All size limits passed!

Copy link
Copy Markdown
Contributor

@pullfrog pullfrog Bot left a comment

Choose a reason for hiding this comment

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

✅ 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 --example valuesCLI now reports Missing value for option: <flag> when --example or -e is passed at the end of the argument list or immediately before another flag-like token.
  • Cover short-flag bundled edge casescli.test.ts updates expectations for bundled -e usage and adds direct coverage for missing valued-flag inputs.
  • Add patch changeset.changeset/validate-valued-flags.md records the CLI behavior fix for release.

Pullfrog  | View workflow run | Using GPT𝕏

@yamcodes yamcodes merged commit dec2581 into main May 21, 2026
16 checks passed
@yamcodes yamcodes deleted the 1050-you-can-pass---example-with-no-value-after branch May 21, 2026 11:54
@arkenv-bot arkenv-bot Bot mentioned this pull request May 21, 2026
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

@arkenv/cli Issues or Pull Requests involving the ArkEnv CLI bug Something isn't working docs Improvements or additions to documentation tests This issue or PR is about adding, removing or changing tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

You can pass --example with no value after

1 participant