From d3e4f67adaae13828776dab8f5ec56cb8ad6b7cd Mon Sep 17 00:00:00 2001 From: bcoe Date: Sat, 13 Feb 2021 12:19:04 -0800 Subject: [PATCH 1/6] errors: remove experimental from --enable-source-maps --- doc/api/cli.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/doc/api/cli.md b/doc/api/cli.md index 70cb69cd54a451..c69a37a0d8cbd2 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -194,12 +194,15 @@ Enable FIPS-compliant crypto at startup. (Requires Node.js to be built with added: v12.12.0 --> -> Stability: 1 - Experimental +Enable [Source Map v3][] support for stack traces. -Enable experimental Source Map v3 support for stack traces. +When using a transpiler, such as TypeScript, strack traces thrown by an +application reference the transpiled code, not the original source position. +`--enable-source-maps` enables caching of [Source Maps][] and makes a best +effort to report stack traces relative to the original source file. -Currently, overriding `Error.prepareStackTrace` is ignored when the -`--enable-source-maps` flag is set. +Overriding `Error.prepareStackTrace` prevents `--enable-source-maps` from +modifiying the stack trace. ### `--experimental-abortcontroller` Enable [Source Map v3][] support for stack traces. From 8aca13d7036d154e8e6fd7a6d930c947b74362f9 Mon Sep 17 00:00:00 2001 From: bcoe Date: Sat, 13 Feb 2021 16:58:54 -0800 Subject: [PATCH 3/6] fix link ordering --- doc/api/cli.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/cli.md b/doc/api/cli.md index 762a1fce1653d6..6c641db2781f6e 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -1705,9 +1705,9 @@ $ node --max-old-space-size=1536 index.js [`CRYPTO_secure_malloc_init`]: https://www.openssl.org/docs/man1.1.0/man3/CRYPTO_secure_malloc_init.html [`NODE_OPTIONS`]: #cli_node_options_options [`SlowBuffer`]: buffer.md#buffer_class_slowbuffer -[`process.setUncaughtExceptionCaptureCallback()`]: process.md#process_process_setuncaughtexceptioncapturecallback_fn -[Source Maps]: https://sourcemaps.info/spec.html [Source Map v3]: https://sourcemaps.info/spec.html +[Source Maps]: https://sourcemaps.info/spec.html +[`process.setUncaughtExceptionCaptureCallback()`]: process.md#process_process_setuncaughtexceptioncapturecallback_fn [`tls.DEFAULT_MAX_VERSION`]: tls.md#tls_tls_default_max_version [`tls.DEFAULT_MIN_VERSION`]: tls.md#tls_tls_default_min_version [`unhandledRejection`]: process.md#process_event_unhandledrejection From 71c0a04f9d147fd1b94b47b8f11ad3574aa54c75 Mon Sep 17 00:00:00 2001 From: bcoe Date: Sat, 13 Feb 2021 18:17:03 -0800 Subject: [PATCH 4/6] actually fix linting --- doc/api/cli.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/doc/api/cli.md b/doc/api/cli.md index 6c641db2781f6e..9cfec352fbf651 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -202,7 +202,7 @@ Enable [Source Map v3][] support for stack traces. When using a transpiler, such as TypeScript, strack traces thrown by an application reference the transpiled code, not the original source position. -`--enable-source-maps` enables caching of [Source Maps][] and makes a best +`--enable-source-maps` enables caching of Source Maps and makes a best effort to report stack traces relative to the original source file. Overriding `Error.prepareStackTrace` prevents `--enable-source-maps` from @@ -1697,6 +1697,7 @@ $ node --max-old-space-size=1536 index.js [REPL]: repl.md [ScriptCoverage]: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#type-ScriptCoverage [Source Map]: https://sourcemaps.info/spec.html +[Source Map v3]: https://sourcemaps.info/spec.html [Subresource Integrity]: https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity [V8 JavaScript code coverage]: https://v8project.blogspot.com/2017/12/javascript-code-coverage.html [`--openssl-config`]: #cli_openssl_config_file @@ -1705,8 +1706,6 @@ $ node --max-old-space-size=1536 index.js [`CRYPTO_secure_malloc_init`]: https://www.openssl.org/docs/man1.1.0/man3/CRYPTO_secure_malloc_init.html [`NODE_OPTIONS`]: #cli_node_options_options [`SlowBuffer`]: buffer.md#buffer_class_slowbuffer -[Source Map v3]: https://sourcemaps.info/spec.html -[Source Maps]: https://sourcemaps.info/spec.html [`process.setUncaughtExceptionCaptureCallback()`]: process.md#process_process_setuncaughtexceptioncapturecallback_fn [`tls.DEFAULT_MAX_VERSION`]: tls.md#tls_tls_default_max_version [`tls.DEFAULT_MIN_VERSION`]: tls.md#tls_tls_default_min_version From 3cc1702d833fb6739da39dc33e78c6292d3a1ff8 Mon Sep 17 00:00:00 2001 From: bcoe Date: Sun, 14 Feb 2021 20:17:53 -0800 Subject: [PATCH 5/6] meta: address review --- doc/api/cli.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/api/cli.md b/doc/api/cli.md index 9cfec352fbf651..37c872cf05de2a 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -198,7 +198,7 @@ changes: description: remove note about experimental status. --> -Enable [Source Map v3][] support for stack traces. +Enable [Source Map v3][Source Map] support for stack traces. When using a transpiler, such as TypeScript, strack traces thrown by an application reference the transpiled code, not the original source position. @@ -1697,7 +1697,6 @@ $ node --max-old-space-size=1536 index.js [REPL]: repl.md [ScriptCoverage]: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#type-ScriptCoverage [Source Map]: https://sourcemaps.info/spec.html -[Source Map v3]: https://sourcemaps.info/spec.html [Subresource Integrity]: https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity [V8 JavaScript code coverage]: https://v8project.blogspot.com/2017/12/javascript-code-coverage.html [`--openssl-config`]: #cli_openssl_config_file From 8599d05662a9acf478c11384464ec9e11432995c Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Fri, 19 Feb 2021 13:16:54 -0800 Subject: [PATCH 6/6] Update doc/api/cli.md Co-authored-by: Antoine du Hamel --- doc/api/cli.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/cli.md b/doc/api/cli.md index 37c872cf05de2a..c9f51b65f94cc7 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -195,7 +195,7 @@ added: v12.12.0 changes: - version: REPLACEME pr-url: https://github.com/nodejs/node/pull/37362 - description: remove note about experimental status. + description: This API is no longer experimental. --> Enable [Source Map v3][Source Map] support for stack traces.