ts-node icon indicating copy to clipboard operation
ts-node copied to clipboard

REPL error context logged for all REPL errors; vanilla node logs only for SyntaxErrors

Open cspotcode opened this issue 4 years ago • 0 comments

Vanilla node REPL logs line context only for SyntaxErrors. For example:

$ node
Welcome to Node.js v17.0.0.
Type ".help" for more information.
> foo bar
foo bar           <-- this is the "context" I'm talking about
    ^^^

Uncaught SyntaxError: Unexpected identifier
> 

We log for all errors.

Should we re-align with node in this regard? Would likely require a change to cspotcode/node-source-map-support.

This PR highlights the relevant code in node core: nodejs/node#29676

cspotcode avatar Dec 27 '21 04:12 cspotcode