fix: preserve path separators in create command argument#526
Open
srtaalej wants to merge 1 commit intoale-fix-display-name-casingfrom
Open
fix: preserve path separators in create command argument#526srtaalej wants to merge 1 commit intoale-fix-display-name-casingfrom
srtaalej wants to merge 1 commit intoale-fix-display-name-casingfrom
Conversation
The getAppDirName function was normalizing the entire input including path separators, so `slack create path/to/my-app` produced a flat directory `path-to-my-app` instead of preserving the path structure. Adds parseAppPath which splits user input into path prefix and basename, only kebab-casing the basename. The display name for manifests is derived from the raw basename (preserving original casing). Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## ale-fix-display-name-casing #526 +/- ##
===============================================================
+ Coverage 71.27% 71.30% +0.03%
===============================================================
Files 222 222
Lines 18683 18696 +13
===============================================================
+ Hits 13316 13332 +16
+ Misses 4189 4187 -2
+ Partials 1178 1177 -1 ☔ 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.
Summary
slack create path/to/my-appregression where path separators were being replaced with dashes, creating a flatpath-to-my-appdirectory instead of preserving thepath/to/my-appstructureparseAppPathhelper that splits user input into path prefix + basename, only kebab-casing the basenameBehavior
Stacks on #521 which handles the display name vs dir name separation.
Test plan
TestParseAppPath— 12 cases covering simple names, paths, absolute paths, dot-prefixed, trailing slashes, and error casesTestGetProjectDirectoryNamestill passes (single-component names)go test ./...) passesslack create path/to/my-appwith existingpath/to/directory → verify nested structure created and manifest hasmy-appslack create "My App"→ verify dir ismy-app, manifest display isMy App