Node.js has built in support for source maps via the --enable-source-maps command-line option.
If any library at any point requires "coffeescript", that support gets completely broken (ie. Node.js stack traces stop processing source maps for eg. TypeScript).
I am guessing this is due to the entry point in coffee-script.js unconditionally overriding Error.prepareStackTrace.
Input Code
test.ts, compiled to test.js (with sourcemaps).
package.json has "type": "module" (probably irrelevant).
import 'coffeescript';
throw new Error("test");
Run with node --enable-source-maps test.js.
Expected Behavior
Stack trace refers to test.ts.
Current Behavior
Stack trace refers to test.js.
Context
One of the libraries I use requires "coffeescript" and now all my stack traces are broken.
Environment
- CoffeeScript version: 2.6.0
- Node.js version: 16.10