Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a4c28d7

Browse filesBrowse 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 <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent 607b33c commit a4c28d7
Copy full SHA for a4c28d7

File tree

Expand file treeCollapse file tree

1 file changed

+13
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+13
-0
lines changed
Open diff view settings
Collapse file

‎doc/api/deprecations.md‎

Copy file name to clipboardExpand all lines: doc/api/deprecations.md
+13Lines changed: 13 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.