sindresorhus / clean-stack

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

Fix Node.js 15 compatibility #21

Closed fengkx closed 3 years ago

fengkx commented 3 years ago

The stack format has change in Node15(I am testing on v15.2.0) RunKit example: https://runkit.com/embed/ufcx3dgrynne Two changes:

  1. node: is added before interal
  2. tailing .js is removed

Exmaple:

    at Module._compile (internal/modules/cjs/loader.js:1063:30) // node 14
    at Module._compile (node:internal/modules/cjs/loader:1099:14) // node 15
fengkx commented 3 years ago

@sindresorhus Would you take a look on this?