-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
Normalize file URLs to paths? #27
Comments
Do you know why they changed it? Normal paths would look better and also be Command-clickable in many terminals. Maybe worth opening an issue on Node.js on this first? |
@sindresorhus those URLs show up in ESM based modules since ESM doesn't necessarily come from a file; CJS only uses file paths to define their location when telling V8 where the source text lives, but full URLs are used for ESM so V8 shows the full URL in Error stacks. |
I guess it's fine to leave the file URLs, it's closer to browser APIs and I see a general movement towards URLs for filesystem operations in the ecosystem too, reinforced by the ESM loader dealing only with URLs itself. |
Node 16 uses
file://
URLs in stack traces, I wonder whether this module should attempt to normalize these to file system paths using fileURLToPath to shorten the output and keep it consistent with previous node versions.Not directly related but
runMicrotasks
seems also something this module could hide.The text was updated successfully, but these errors were encountered: