Skip to content

chore(repo): add changeset for command export default fix#5

Merged
zrosenbauer merged 2 commits intomainfrom
chore/fix-command-export-default
Mar 6, 2026
Merged

chore(repo): add changeset for command export default fix#5
zrosenbauer merged 2 commits intomainfrom
chore/fix-command-export-default

Conversation

@zrosenbauer
Copy link
Copy Markdown
Member

@zrosenbauer zrosenbauer commented Mar 6, 2026

Summary

  • Adds a changeset for the 42c7ed4 commit that fixed command export default typing
  • Patches @kidd-cli/core and @kidd-cli/cli

Changes

  • Added .changeset/fix-command-export-default.md covering the command() factory return type fix and removal of as unknown as Command casts

Testing

  • No code changes; changeset metadata only

Summary by CodeRabbit

  • Bug Fixes
    • Fixed command export default typing with explicit type annotations and removed unsafe type casting across command modules. Patch version bumps applied to @kidd-cli/core and @kidd-cli/cli.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 6, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5aaaba1d-76cc-4b5c-b29d-440f55c6800d

📥 Commits

Reviewing files that changed from the base of the PR and between 4f6fac5 and f9d9bf9.

📒 Files selected for processing (8)
  • .changeset/fix-command-export-default.md
  • packages/cli/src/commands/add/command.ts
  • packages/cli/src/commands/add/middleware.ts
  • packages/cli/src/commands/build.ts
  • packages/cli/src/commands/doctor.ts
  • packages/cli/src/commands/init.ts
  • packages/core/src/command.ts
  • packages/core/src/types.ts

📝 Walkthrough

Walkthrough

The PR improves type safety for command exports by modifying the command() factory to return a non-generic Command type, adding explicit type annotations to command constants across CLI modules, and removing unsafe type casts from default exports.

Changes

Cohort / File(s) Summary
Changelog
.changeset/fix-command-export-default.md
Documents fix for command export default typing, including explicit Command type annotation and removal of unsafe casts in command modules with patch version bumps.
Command Factory
packages/core/src/command.ts, packages/core/src/types.ts
Updated command() factory return type from CommandType<TArgsDef, TConfig> to CommandType, and modified CommandFn signature to return Command instead of Command<TArgsDef, TConfig>. Added type assertion in return statement.
CLI Command Modules
packages/cli/src/commands/add/command.ts, packages/cli/src/commands/add/middleware.ts, packages/cli/src/commands/build.ts, packages/cli/src/commands/doctor.ts, packages/cli/src/commands/init.ts
Added explicit Command type annotation to all command constant declarations and removed unsafe as unknown as Command casts from default exports.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 Hopping through types with confidence bright,
Casting away shadows, making exports right,
No more unknown whispers in the code,
Just Command clarity down every road!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding a changeset file to document a fix to command export default typing, which aligns with the file modifications across multiple command modules.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/fix-command-export-default

Comment @coderabbitai help to get the list of available commands and usage tips.

@zrosenbauer zrosenbauer merged commit 5c78d6a into main Mar 6, 2026
2 checks passed
@zrosenbauer zrosenbauer deleted the chore/fix-command-export-default branch March 6, 2026 08:01
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.

1 participant