Skip to content

refactor(cli): implement dynamic help text generation#97

Merged
IT-WIBRC merged 1 commit intodevelopfrom
feat/generate-dynamic-text
Oct 5, 2025
Merged

refactor(cli): implement dynamic help text generation#97
IT-WIBRC merged 1 commit intodevelopfrom
feat/generate-dynamic-text

Conversation

@IT-WIBRC
Copy link
Owner

@IT-WIBRC IT-WIBRC commented Oct 5, 2025

Description

This pull request refactors the setup logic for several commands—specifically new, list, config update, and config remove—to utilize the new generateDynamicHelpText utility.

Previously, static hardcoded strings or basic t() calls were used for command descriptions and option help text. By adopting generateDynamicHelpText, we can provide more informative and contextually relevant help output in the CLI, especially for options that accept predefined values (like cache-strategy, package-manager, and mode).

Changes Applied:

  • new command: Updated the main command description, the <language> argument description, and the --cache-strategy and --package-manager options to use the dynamic help utility.
  • list command: Updated the <language> argument description and the --mode option description.
  • config update command: Updated the main command description, the --cache-strategy option, and the --package-manager option.
  • config remove command: Updated the main command description.

This change is purely a refactoring of the command setup logic and has no impact on the core command execution, configuration handling, or scaffolding.

Fixes # (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • New and existing feature support current supported languages
  • Any dependent changes have been merged and published in downstream modules

@IT-WIBRC IT-WIBRC added the refactor No change in external behavior label Oct 5, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Oct 5, 2025

Coverage Report for ./packages/devkit

Status Category Percentage Covered / Total
🟢 Lines 96.5% (🎯 85%) 3532 / 3660
🟢 Statements 96.5% (🎯 85%) 3532 / 3660
🟢 Functions 96.27% (🎯 90%) 155 / 161
🟢 Branches 92.87% (🎯 85%) 769 / 828
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/devkit/src/commands/list.ts 100% 96% 100% 100%
packages/devkit/src/commands/new.ts 94.31% 87.5% 100% 94.31% 16-19, 87
packages/devkit/src/commands/config/add.ts 100% 84.21% 100% 100%
packages/devkit/src/commands/config/remove/index.ts 100% 100% 100% 100%
packages/devkit/src/commands/config/update/index.ts 100% 100% 100% 100%
packages/devkit/src/utils/i18n/generate-dynamic-help-text.ts 100% 83.33% 100% 100%
Generated in workflow #284 for commit c1f0352 by the Vitest Coverage Report Action

Copy link
Owner Author

@IT-WIBRC IT-WIBRC left a comment

Choose a reason for hiding this comment

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

Done

@IT-WIBRC IT-WIBRC merged commit 4e86dee into develop Oct 5, 2025
2 checks passed
@github-actions github-actions bot deleted the feat/generate-dynamic-text branch October 5, 2025 02:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor No change in external behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant