You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Related to #1282
Tracking as a separate issue because I don't think this is worth fixing, but I want to document my research.
In node's <repl>, [eval], and [stdin] there are 2x filenames used depending on the situation: the short [eval] and a longer absolute path /this/is/the/cwd/[eval] (ts-node also adds the .ts extension to the absolute path)
In vanilla node, stack traces use the shorter name. In ts-node they use the absolute path.
This is controlled by the filename option to new Script(). However, I think changing the filename will break stack traces. To preserve stack trace functionality, we must add a mapping from the short names to the full, absolute path. When source-map-support tries to look up the sourcemap for [eval] it should get the sourcemap for /this/is/the/cwd/[eval].ts
The short names in vanilla node appear to be [eval], [stdin], and REPL1
The text was updated successfully, but these errors were encountered:
Related to #1282
Tracking as a separate issue because I don't think this is worth fixing, but I want to document my research.
In node's
<repl>
,[eval]
, and[stdin]
there are 2x filenames used depending on the situation: the short[eval]
and a longer absolute path/this/is/the/cwd/[eval]
(ts-node also adds the.ts
extension to the absolute path)In vanilla node, stack traces use the shorter name. In
ts-node
they use the absolute path.This is controlled by the
filename
option tonew Script()
. However, I think changing the filename will break stack traces. To preserve stack trace functionality, we must add a mapping from the short names to the full, absolute path. When source-map-support tries to look up the sourcemap for[eval]
it should get the sourcemap for/this/is/the/cwd/[eval].ts
The short names in vanilla node appear to be
[eval]
,[stdin]
, andREPL1
The text was updated successfully, but these errors were encountered: