-
Notifications
You must be signed in to change notification settings - Fork 30k
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
esm: fix hint on invalid module specifier #51223
Conversation
Review requested:
|
'/', | ||
); | ||
} else { | ||
found = `${pathToFileURL(found)}`; |
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.
Nit: This might be a little bit more readable.
found = `${pathToFileURL(found)}`; | |
found = pathToFileURL(found).href; |
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.
I think we try to always "coerce to string" in core rather than calling the .href
getter, that way if the prototype gets tampered with, all of core is affected consistently.
afafad2
to
67439d1
Compare
fix for Windows (`?` is illegal in file names apparently)
Landed in a717fa2 |
URLs are hard to work with.
Fixes: #51216