Skip to content

Commit 9ba5c0f

Browse files
bcoetargos
authored andcommitted
errors: remove experimental from --enable-source-maps
PR-URL: #37362 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ian Sutherland <ian@iansutherland.ca> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Beth Griggs <bgriggs@redhat.com>
1 parent 4ad7a78 commit 9ba5c0f

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

doc/api/cli.md

+11-4
Original file line numberDiff line numberDiff line change
@@ -192,14 +192,21 @@ Enable FIPS-compliant crypto at startup. (Requires Node.js to be built with
192192
### `--enable-source-maps`
193193
<!-- YAML
194194
added: v12.12.0
195+
changes:
196+
- version: REPLACEME
197+
pr-url: https://github.com/nodejs/node/pull/37362
198+
description: This API is no longer experimental.
195199
-->
196200

197-
> Stability: 1 - Experimental
201+
Enable [Source Map v3][Source Map] support for stack traces.
198202

199-
Enable experimental Source Map v3 support for stack traces.
203+
When using a transpiler, such as TypeScript, strack traces thrown by an
204+
application reference the transpiled code, not the original source position.
205+
`--enable-source-maps` enables caching of Source Maps and makes a best
206+
effort to report stack traces relative to the original source file.
200207

201-
Currently, overriding `Error.prepareStackTrace` is ignored when the
202-
`--enable-source-maps` flag is set.
208+
Overriding `Error.prepareStackTrace` prevents `--enable-source-maps` from
209+
modifiying the stack trace.
203210

204211
### `--experimental-abortcontroller`
205212
<!-- YAML

0 commit comments

Comments
 (0)