Closed silverwind closed 3 years ago
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.