Skip to content

Commit a4c28d7

Browse files
targosMylesBorins
authored andcommitted
doc: fix deprecation removed by mistake
In bae5de1, a deprecation (DEP0089) was added to the docs and another one (DEP0098) was removed by mistake. This commit restores it. PR-URL: #19482 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent 607b33c commit a4c28d7

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

doc/api/deprecations.md

+13
Original file line numberDiff line numberDiff line change
@@ -783,6 +783,18 @@ Importing assert directly is not recommended as the exposed functions will use
783783
loose equality checks. Use `require('assert').strict` instead. The API is the
784784
same as the legacy assert but it will always use strict equality checks.
785785
786+
<a id="DEP0098"></a>
787+
### DEP0098: AsyncHooks Embedder AsyncResource.emit{Before,After} APIs
788+
789+
Type: Runtime
790+
791+
The embedded API provided by AsyncHooks exposes emit{Before,After} methods
792+
which are very easy to use incorrectly which can lead to unrecoverable errors.
793+
794+
Use [`asyncResource.runInAsyncScope()`][] API instead which provides a much
795+
safer, and more convenient, alternative. See
796+
https://github.com/nodejs/node/pull/18513 for more details.
797+
786798
[`Buffer.allocUnsafeSlow(size)`]: buffer.html#buffer_class_method_buffer_allocunsafeslow_size
787799
[`Buffer.from(array)`]: buffer.html#buffer_class_method_buffer_from_array
788800
[`Buffer.from(buffer)`]: buffer.html#buffer_class_method_buffer_from_buffer
@@ -792,6 +804,7 @@ same as the legacy assert but it will always use strict equality checks.
792804
[`Server.getConnections()`]: net.html#net_server_getconnections_callback
793805
[`Server.listen({fd: <number>})`]: net.html#net_server_listen_handle_backlog_callback
794806
[`SlowBuffer`]: buffer.html#buffer_class_slowbuffer
807+
[`asyncResource.runInAsyncScope()`]: async_hooks.html#async_hooks_asyncresource_runinasyncscope_fn_thisarg_args
795808
[`child_process`]: child_process.html
796809
[`console.error()`]: console.html#console_console_error_data_args
797810
[`console.log()`]: console.html#console_console_log_data_args

0 commit comments

Comments
 (0)