refactor: simplify project directory name normalization#559
Draft
zimeg wants to merge 1 commit into
Draft
Conversation
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 Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 createnormalizes project directory names. Previously, all non-alphanumeric characters were replaced with dashes and the name was forced to lowercase. Now:!@#$%^&*(){}[]|;:'"<>?~etc.) are removed-,_,.) are preserved as-isPreview
Before:
slack create "My_Cool.App"→ directorymy-cool-appAfter:
slack create "My_Cool.App"→ directoryMy_Cool.AppTesting
slack create "My Cool App"and verify the directory is namedMy-Cool-Appslack create "my_app.test"and verify underscores and dots are preservedslack create "app!@#name"and verify unsafe characters are removed →appnameNotes
This is a less opinionated default — we can always tighten restrictions later if needed.
Requirements