Skip to content

refactor: simplify project directory name normalization#559

Draft
zimeg wants to merge 1 commit into
mainfrom
eden/simplify-create-dir-name
Draft

refactor: simplify project directory name normalization#559
zimeg wants to merge 1 commit into
mainfrom
eden/simplify-create-dir-name

Conversation

@zimeg
Copy link
Copy Markdown
Member

@zimeg zimeg commented May 21, 2026

Changelog

Project directory names now preserve original casing and path-safe characters (underscores, dots) instead of forcing kebab-case.

Summary

This pull request simplifies how slack create normalizes project directory names. Previously, all non-alphanumeric characters were replaced with dashes and the name was forced to lowercase. Now:

  • Spaces are replaced with dashes
  • Shell-unsafe characters (!@#$%^&*(){}[]|;:'"<>?~ etc.) are removed
  • Path-safe characters (letters, digits, -, _, .) are preserved as-is
  • Original casing is preserved

Preview

Before: slack create "My_Cool.App" → directory my-cool-app
After: slack create "My_Cool.App" → directory My_Cool.App

Testing

  • Run slack create "My Cool App" and verify the directory is named My-Cool-App
  • Run slack create "my_app.test" and verify underscores and dots are preserved
  • Run slack create "app!@#name" and verify unsafe characters are removed → appname

Notes

This is a less opinionated default — we can always tighten restrictions later if needed.

Requirements

Preserve original casing and path-safe characters (letters, digits,
dashes, underscores, dots) in project directory names. Only spaces
are replaced with dashes and shell-unsafe characters are removed.
@codecov
Copy link
Copy Markdown

codecov Bot commented May 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.70%. Comparing base (c693443) to head (31fdead).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #559      +/-   ##
==========================================
+ Coverage   71.66%   71.70%   +0.04%     
==========================================
  Files         226      226              
  Lines       19115    19114       -1     
==========================================
+ Hits        13699    13706       +7     
+ Misses       4209     4205       -4     
+ Partials     1207     1203       -4     

☔ 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.

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