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(parseURL): handle data: and blob protocols #159

Merged
merged 2 commits into from
Jul 29, 2023
Merged

fix(parseURL): handle data: and blob protocols #159

merged 2 commits into from
Jul 29, 2023

Conversation

pi0
Copy link
Member

@pi0 pi0 commented Jul 29, 2023

πŸ”— Linked issue

Resolves #158

❓ 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

As parseURL accept an ambegious input (path or URL), we cannot allow all proto:... without proto:https:// syntax. This PR adds special handler check for data and blob

πŸ“ Checklist

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

@codecov
Copy link

codecov bot commented Jul 29, 2023

Codecov Report

Merging #159 (c19d577) into main (2caeb30) will increase coverage by 0.09%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #159      +/-   ##
==========================================
+ Coverage   94.82%   94.91%   +0.09%     
==========================================
  Files           7        7              
  Lines         831      846      +15     
  Branches      175      177       +2     
==========================================
+ Hits          788      803      +15     
  Misses         43       43              
Files Changed Coverage Ξ”
src/parse.ts 100.00% <100.00%> (ΓΈ)

@pi0 pi0 marked this pull request as ready for review July 29, 2023 17:45
@pi0
Copy link
Member Author

pi0 commented Jul 29, 2023

Parsing can be optimized. Following up in next PRs.

@pi0 pi0 merged commit 3bfbf5a into main Jul 29, 2023
4 checks passed
@pi0 pi0 deleted the fix/parse-data branch July 29, 2023 17:46
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.

Unexpected behavior when passing a data: URL into parseURL()
1 participant