Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.3k
src: simplify legacy resolve functionality#48648
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
anonrig commented Jul 3, 2023 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
3c1be57 to b3f8342CompareUh oh!
There was an error while loading. Please reload this page.
13c8363 to d3cb3e1CompareUh oh!
There was an error while loading. Please reload this page.
d3cb3e1 to fe9109bComparenodejs-github-bot commented Jul 5, 2023
RaisinTen commented Jul 6, 2023
@anonrig since this change is a list of general improvements, what do you think about briefly describing the changes in the description and the reasoning behind those? For example:
I think that would make it easier to review this PR because that way I would know what to expect and then check the diff instead of inferring things from the diff directly. |
anonrig commented Jul 6, 2023
@RaisinTen you're absolutely right. I updated the pull request description. Appreciate your feedback. |
nodejs-github-bot commented Jul 6, 2023
anonrig commented Jul 6, 2023
cc @nodejs/loaders @nodejs/modules |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
anonrig commented Jul 9, 2023
cc @nodejs/cpp-reviewers |
nodejs-github-bot commented Jul 9, 2023
RaisinTen left a comment
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.
LGTM
| THROW_ERR_INVALID_FILE_URL_HOST( | ||
| env, | ||
| "File URL host must be \"localhost\" or empty on %s", | ||
| std::string(per_process::metadata.platform)); |
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.
is the std::string() part needed here?
| std::string(per_process::metadata.platform)); | |
| per_process::metadata.platform); |
Changes and their reasonings:
nullptrenv->isolate()->ThrowExceptionwith their respective MACROsTHROW_ERR_INVALID_URL_SCHEMEetc.NOLINTand used pointers to conform the cpp contributing guidelines.legacy_main_extensionsto header file for readability purposes, made itconstexprto evaluate it in the compile time.url->get_pathname()calls which are more costly thanurl->has_empty_hostname()cc @H4ad