Skip to content

feat: add --mode option to and strengthen logger table#89

Merged
IT-WIBRC merged 1 commit intodevelopfrom
feat/support-new-template-display
Oct 1, 2025
Merged

feat: add --mode option to and strengthen logger table#89
IT-WIBRC merged 1 commit intodevelopfrom
feat/support-new-template-display

Conversation

@IT-WIBRC
Copy link
Owner

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

Description

This commit introduces a user-facing enhancement to the dk list command while significantly improving stability in the underlying logging utility. This change warrants a MINOR version bump.

  1. New Feature: Template Display Mode (CLI/README.md): Implemented and documented the --mode <mode> option for the dk list command. This allows users to switch the template display format between the default tree view and the compact table view. This option is exclusive to dk list.
  2. Robust Table Rendering (logger.ts): Hardened the internal _logTable function to prevent potential crashes and silent failures. The logic now strictly requires the input array to contain at least one header row and one data row and verifies the header row is not empty.
  3. Improved User Feedback (printer.ts): Updated printTemplatesTable to enhance UX by providing clear feedback. It now logs a logger.warning with a contextual message (whether a filter was used or not) when no templates are found, rather than silently returning.

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 enhancement New feature or request feature labels Oct 1, 2025
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 force-pushed the feat/support-new-template-display branch from a3aac6c to b30982e Compare October 1, 2025 02:59
@github-actions
Copy link
Contributor

github-actions bot commented Oct 1, 2025

Coverage Report for ./packages/devkit

Status Category Percentage Covered / Total
🟢 Lines 96.72% (🎯 85%) 2773 / 2867
🟢 Statements 96.72% (🎯 85%) 2773 / 2867
🟢 Functions 95.62% (🎯 90%) 131 / 137
🟢 Branches 92.27% (🎯 85%) 573 / 621
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/devkit/src/commands/list.ts 87.73% 85.18% 100% 87.73% 36-43, 47-48, 107-109
packages/devkit/src/commands/config/list.ts 86.17% 79.16% 100% 86.17% 23-30, 43-48
packages/devkit/src/core/template/printer.ts 98.21% 91.17% 100% 98.21% 54, 57
packages/devkit/src/utils/logger.ts 95.91% 94.87% 92.85% 95.91% 93-94, 101-102
packages/devkit/src/utils/schema/schema.ts 100% 100% 100% 100%
packages/devkit/src/utils/validations/config.ts 100% 100% 100% 100%
Generated in workflow #262 for commit b30982e by the Vitest Coverage Report Action

@IT-WIBRC IT-WIBRC merged commit 8f1a5a4 into develop Oct 1, 2025
2 checks passed
@github-actions github-actions bot deleted the feat/support-new-template-display branch October 1, 2025 03:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant