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

src: fix ThrowInvalidURL call in PathToFileURL #57141

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

danielmbrasil
Copy link

Fixes #57133.

Replaces nullptr with std::nullopt when calling ThrowInvalidURL in PathToFileURL. This ensures the function receives the correct argument type and aligns with the expected behavior.

PS: I'm not sure how to test this, any help would be appreciated.

Replace `nullptr` with `std::nullopt` when calling `ThrowInvalidURL` in
`PathToFileURL`. This ensures the function receives the correct argument
type and aligns with the expected behavior.
@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/url

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. whatwg-url Issues and PRs related to the WHATWG URL implementation. labels Feb 19, 2025
@anonrig anonrig added the request-ci Add this label to start a Jenkins CI on a PR. label Feb 19, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Feb 19, 2025
@nodejs-github-bot
Copy link
Collaborator

Copy link

codecov bot commented Feb 19, 2025

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 89.03%. Comparing base (f6ce486) to head (12b9054).
Report is 13 commits behind head on main.

Files with missing lines Patch % Lines
src/node_url.cc 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #57141      +/-   ##
==========================================
+ Coverage   88.54%   89.03%   +0.49%     
==========================================
  Files         665      665              
  Lines      193408   193408              
  Branches    36961    37278     +317     
==========================================
+ Hits       171250   172205     +955     
+ Misses      14795    13884     -911     
+ Partials     7363     7319      -44     
Files with missing lines Coverage Δ
src/node_url.cc 79.53% <0.00%> (+0.29%) ⬆️

... and 93 files with indirect coverage changes

@nodejs-github-bot
Copy link
Collaborator

Copy link
Member

@jazelly jazelly left a comment

Choose a reason for hiding this comment

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

should we also add a test?

@lemire
Copy link
Member

lemire commented Feb 21, 2025

Do we have a test with a malformed URL?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. whatwg-url Issues and PRs related to the WHATWG URL implementation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invalid string construction
6 participants