src: simplify legacy resolve functionality#48648
Closed
anonrig wants to merge 3 commits intonodejs:mainfrom
Closed
src: simplify legacy resolve functionality#48648anonrig wants to merge 3 commits intonodejs:mainfrom
anonrig wants to merge 3 commits intonodejs:mainfrom
Conversation
3c1be57 to
b3f8342
Compare
H4ad
reviewed
Jul 3, 2023
13c8363 to
d3cb3e1
Compare
RaisinTen
reviewed
Jul 4, 2023
d3cb3e1 to
fe9109b
Compare
Collaborator
17 tasks
Member
|
@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. |
Member
Author
|
@RaisinTen you're absolutely right. I updated the pull request description. Appreciate your feedback. |
Collaborator
Member
Author
|
cc @nodejs/loaders @nodejs/modules |
20 tasks
RaisinTen
reviewed
Jul 7, 2023
This was referenced Jul 8, 2023
Member
Author
|
cc @nodejs/cpp-reviewers |
Collaborator
17 tasks
RaisinTen
approved these changes
Jul 10, 2023
| THROW_ERR_INVALID_FILE_URL_HOST( | ||
| env, | ||
| "File URL host must be \"localhost\" or empty on %s", | ||
| std::string(per_process::metadata.platform)); |
Member
There was a problem hiding this comment.
is the std::string() part needed here?
Suggested change
| std::string(per_process::metadata.platform)); | |
| per_process::metadata.platform); |
Collaborator
Collaborator
Collaborator
This was referenced Jul 16, 2023
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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