Skip to content
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(join)!: preserve normalized unc paths #196

Merged
merged 2 commits into from
Jan 3, 2025
Merged

fix(join)!: preserve normalized unc paths #196

merged 2 commits into from
Jan 3, 2025

Conversation

pi0
Copy link
Member

@pi0 pi0 commented Jan 3, 2025

resolves #178 (#178 (comment))

Even though normalize is UNC aware, join utility blindly strips the leading UNC indicator with a final replacement.

This PR changes join implementation to avoid global regex (normalize finally takes care of proper normalization).

Note: While all existing tests pass, this is a potential behavior change

Note: This PR does not add URL compatibility to path utils as it needs changes to more utils and it is out of scope / non goal.

@pi0 pi0 requested a review from danielroe January 3, 2025 13:24
@pi0
Copy link
Member Author

pi0 commented Jan 3, 2025

@danielroe do you mind taking a look on this? 🙏🏼

@danielroe
Copy link
Member

danielroe commented Jan 3, 2025

not at all!

will have a look when I'm back at my computer (I've been travelling today)

Copy link
Member

@danielroe danielroe left a comment

Choose a reason for hiding this comment

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

Looks like a good change to me 👌

@pi0 pi0 merged commit b91e344 into main Jan 3, 2025
1 check passed
@pi0 pi0 deleted the fix/join-unc branch January 3, 2025 23:59
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.

path.join should handle protocol with double slashes
2 participants