Skip to content

fix: add empty args definition to versions command (fixes #2021)#2160

Open
gavin913427-hash wants to merge 3 commits intoasyncapi:masterfrom
gavin913427-hash:fix/unparsed-command-warnings
Open

fix: add empty args definition to versions command (fixes #2021)#2160
gavin913427-hash wants to merge 3 commits intoasyncapi:masterfrom
gavin913427-hash:fix/unparsed-command-warnings

Conversation

@gavin913427-hash
Copy link
Copy Markdown

What

Add empty args definition to the versions command to prevent UnparsedCommand warnings during test runs.

Why

The versions command was missing the static args definition, which caused oclif to emit UnparsedCommand warnings during test runs. This is a common pattern in oclif commands - all commands should have explicit args definitions even if they don't accept arguments.

How

  • Added static args = {}; to the Versions command class
  • This follows the pattern used by other commands in the codebase

Changes

File Change
src/apps/cli/commands/config/versions.ts Add static args = {} definition

Testing

# Before: shows UnparsedCommand warning
npm run cli:test 2>&1 | grep -i "unparsed"

# After: no warning
npm run cli:test 2>&1 | grep -i "unparsed"

Fixes #2021

The versions command was missing the static args definition, which
caused oclif to emit UnparsedCommand warnings during test runs.

Fixes asyncapi#2021
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 3, 2026

🦋 Changeset detected

Latest commit: 943b1ec

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

This PR includes changesets to release 1 package
Name Type
@asyncapi/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

@gavin913427-hash gavin913427-hash force-pushed the fix/unparsed-command-warnings branch from 2be77d5 to b3ddae7 Compare May 3, 2026 16:02
Fixes typescript:S1444 - Make this public static property readonly.
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 3, 2026

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

Labels

None yet

Projects

Status: To Triage

Development

Successfully merging this pull request may close these issues.

[BUG] UnparsedCommand warnings in test logs for versions and convert commands

1 participant