-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(resolveAlias): handle aliases ending with trailing slash #155
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about alternatively stripping trailing-slashes in normalizeAliases
?
The only possible downside I can think with stripping trailing slash is then made |
Codecov ReportAll modified and coverable lines are covered by tests β
Additional details and impacted files@@ Coverage Diff @@
## main #155 +/- ##
==========================================
+ Coverage 99.42% 99.44% +0.02%
==========================================
Files 4 4
Lines 346 359 +13
Branches 106 111 +5
==========================================
+ Hits 344 357 +13
Misses 2 2 β View full report in Codecov by Sentry. |
I think we already handle that via ordering of aliases (we sort them). |
What if one wants to only alias main package or it's subpaths? By removing there is no longer a way to distinguish even if sorted. |
you're right that we no longer have a way to alias only subpaths, though I think aliasing only main package would work same way either way. |
should we leave it like that ? |
I have added a few more tests for mixed situations (aliases provided both for with trailing slash and without) and also did some refactors to With these changes, could quickly check if we remove the trailing slash of the alias while slicing in L54 (simply change |
π Linked issue
resolve #154
β Type of change
π Description
Hi π this PR fix
resolveAlias
's pathSeperator check by verifying if the alias ends with/
or\
π Checklist