Skip to content

feat(cli): add support for language aliases (js, ts, n) in all relevant commands#94

Merged
IT-WIBRC merged 1 commit intodevelopfrom
feat/config-ts-node-aliases
Oct 4, 2025
Merged

feat(cli): add support for language aliases (js, ts, n) in all relevant commands#94
IT-WIBRC merged 1 commit intodevelopfrom
feat/config-ts-node-aliases

Conversation

@IT-WIBRC
Copy link
Owner

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

Description

This PR implements support for using short language aliases in place of the canonical language names across all relevant CLI commands (new, list, config add, config remove, config update).

This greatly improves the command-line developer experience for users targeting the Node.js ecosystem, allowing for much faster, more concise commands.

🚀 Key Changes & Features

  • Language Alias Implementation: The CLI can now successfully resolve and map the following aliases to their canonical language names:
    • js resolves to javascript
    • ts resolves to typescript
    • n resolves to node
  • Wider Command Support: Aliases are supported everywhere a language argument is required, including:
    • dk new <alias> <project-name>
    • dk list <alias>
    • dk config add <alias> ...
    • dk config remove <alias> ...
    • dk config update <alias> ...
  • Updated Documentation: The README.md has been updated to prominently feature the new aliases and provide examples demonstrating their usage.

💡 Example Usage

Before (Verbose):

dk new javascript my-app -t vue
dk config update typescript * --package-manager bun

After (Concise):

dk new js my-app -t vue
dk config update ts * --package-manager bun

🧪 Testing

New integration tests were added (or existing ones modified) to specifically verify that commands using aliases (js) correctly modify the templates registered under the canonical name (javascript).

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

@github-actions
Copy link
Contributor

github-actions bot commented Oct 4, 2025

Coverage Report for ./packages/devkit

Status Category Percentage Covered / Total
🟢 Lines 97.48% (🎯 85%) 3251 / 3335
🟢 Statements 97.48% (🎯 85%) 3251 / 3335
🟢 Functions 96.12% (🎯 90%) 149 / 155
🟢 Branches 93.55% (🎯 85%) 711 / 760
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/devkit/src/commands/index.ts 100% 100% 100% 100%
packages/devkit/src/commands/list.ts 99.13% 91.66% 100% 99.13% 125
packages/devkit/src/commands/new.ts 88.88% 81.25% 100% 88.88% 15-18, 53-56, 80
packages/devkit/src/commands/config/add.ts 100% 84.21% 100% 100%
packages/devkit/src/commands/config/index.ts 100% 100% 100% 100%
packages/devkit/src/commands/config/validate-and-save.ts 95.31% 92.3% 100% 95.31% 38-40
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/core/config/language.ts 100% 100% 100% 100%
packages/devkit/src/core/prompts/prompts.ts 100% 100% 100% 100%
packages/devkit/src/core/template/template-utils.ts 100% 100% 100% 100%
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 #277 for commit 57579b6 by the Vitest Coverage Report Action

@IT-WIBRC IT-WIBRC merged commit ef9dea7 into develop Oct 4, 2025
2 checks passed
@github-actions github-actions bot deleted the feat/config-ts-node-aliases branch October 4, 2025 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant