Skip to content

feat: normalize project directory names to kebab-case#374

Merged
mwbrooks merged 3 commits intomainfrom
mwbrooks-create-dir-kebab-case
Mar 9, 2026
Merged

feat: normalize project directory names to kebab-case#374
mwbrooks merged 3 commits intomainfrom
mwbrooks-create-dir-kebab-case

Conversation

@mwbrooks
Copy link
Member

@mwbrooks mwbrooks commented Mar 9, 2026

Changelog

The create command now makes project directory names normalized to kebab-case (lowercase, dash-delimited, no whitespace or special characters). For example, create "My App" now creates a my-app directory instead of My-App.

Summary

This pull request updates the create command to make project directory names that are normalized to kebab-case. For example, create "My App" now creates a my-app directory instead of My-App.

Updates getAppDirName in internal/pkg/create/create.go to convert app names to kebab-case:

  • Converts to lowercase
  • Replaces non-alphanumeric characters with dashes
  • Collapses consecutive dashes into one
  • Trims leading/trailing dashes
  • Returns an error if the result is empty

Tests are rewritten as table-driven using the map pattern.

Requirements

The create command now converts app names to kebab-case (lowercase,
dash-delimited, no special characters) when creating project directories.
For example, "My App" becomes "my-app" instead of "My-App".
@mwbrooks mwbrooks self-assigned this Mar 9, 2026
@mwbrooks mwbrooks added enhancement M-T: A feature request for new functionality semver:patch Use on pull requests to describe the release version increment labels Mar 9, 2026
@mwbrooks mwbrooks added this to the Next Release milestone Mar 9, 2026
@mwbrooks mwbrooks marked this pull request as ready for review March 9, 2026 17:03
@mwbrooks mwbrooks requested a review from a team as a code owner March 9, 2026 17:03
Copy link
Member

@zimeg zimeg left a comment

Choose a reason for hiding this comment

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

@mwbrooks LGTM! This is kind polish to find toward next steps:

$ slack create "Let's Get This Merged\!"

@codecov
Copy link

codecov bot commented Mar 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.07%. Comparing base (ecfacb6) to head (67f69ff).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #374      +/-   ##
==========================================
+ Coverage   65.06%   65.07%   +0.01%     
==========================================
  Files         215      215              
  Lines       18179    18184       +5     
==========================================
+ Hits        11828    11834       +6     
+ Misses       5257     5254       -3     
- Partials     1094     1096       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mwbrooks
Copy link
Member Author

mwbrooks commented Mar 9, 2026

@zimeg Thanks for the quick review! 🙇🏻 I'm pleasantly surprised to see $ slack create "Let's Get This Merged\!" works alright!

@mwbrooks mwbrooks merged commit a96b3f9 into main Mar 9, 2026
7 checks passed
@mwbrooks mwbrooks deleted the mwbrooks-create-dir-kebab-case branch March 9, 2026 20:39
@mwbrooks mwbrooks added the changelog Use on updates to be included in the release notes label Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog Use on updates to be included in the release notes enhancement M-T: A feature request for new functionality semver:patch Use on pull requests to describe the release version increment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants