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: add target pathname currectly #6

Merged
merged 3 commits into from
Aug 26, 2023
Merged

fix: add target pathname currectly #6

merged 3 commits into from
Aug 26, 2023

Conversation

jonasolesen
Copy link
Contributor

πŸ”— Linked issue

#5

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme, or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Sets the correct target path by using the pathname property on the URL object as described in the linked issue. While the static type of the target object from which I got the pathname is any, it was in fact an URL object during my limited runtime debugging. However, I don't know if this is always the case, so feel free to correct me or come up with a more complete solution πŸ™‚

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@codecov
Copy link

codecov bot commented Aug 26, 2023

Codecov Report

Merging #6 (0e79f05) into main (1ed43da) will decrease coverage by 0.03%.
The diff coverage is 66.66%.

@@            Coverage Diff             @@
##             main       #6      +/-   ##
==========================================
- Coverage   65.00%   64.98%   -0.03%     
==========================================
  Files           8        8              
  Lines        1046     1048       +2     
  Branches       73       73              
==========================================
+ Hits          680      681       +1     
- Misses        365      366       +1     
  Partials        1        1              
Files Changed Coverage Ξ”
src/_utils.ts 77.29% <66.66%> (-0.22%) ⬇️

Copy link
Member

@pi0 pi0 left a comment

Choose a reason for hiding this comment

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

Thank you for the quick PR ❀️

This regression comes from legacy codebase refactors to URL parser. I have added pathname || path to to be sure about not introducing unwanted breaking changes.

Also added tests to make sure behavior remains as desired.

@pi0 pi0 changed the title fix: use URL pathname instead of path when setting target path fix: add target pathname currectly Aug 26, 2023
@pi0 pi0 merged commit e045521 into unjs:main Aug 26, 2023
3 of 4 checks passed
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.

2 participants