sindresorhus / clean-stack

Clean up error stack traces
MIT License
337 stars 29 forks source link

`pretty` produces meaningless URLs #34

Open fregante opened 1 month ago

fregante commented 1 month ago
- file:///Users/user/file.js
+ file://~/file.js

The first one is clickable in my IDE, the second one isn't.

I think pretty should also drop file:// to be useful and not counter-productive.

Related:

sindresorhus commented 1 month ago

It made more sense before when it used normal paths. Maybe it could convert the file URL to a path and then prettify it when {pretty: true}?

fregante commented 1 month ago

I think so. file:// doesn't really add anything here, so without it it would be prettier