Skip to content

Commit dd917eb

Browse files
ChALkeRaddaleax
authored andcommitted
doc: add pending-deprecation to deprecations list
This adds a mention of `--pending-deprecation` flag effect in the Deprecated APIs document, and explicitly labels deprecations that support it. Refs: #18417 PR-URL: #18433 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: Rich Trott <[email protected]>
1 parent 296523a commit dd917eb

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

doc/api/deprecations.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ Node.js utilizes three kinds of Deprecations:
1414

1515
A Documentation-only deprecation is one that is expressed only within the
1616
Node.js API docs. These generate no side-effects while running Node.js.
17+
Some Documentation-only deprecations trigger a runtime warning when launched
18+
with [`--pending-deprecation`][] flag (or its alternative,
19+
`NODE_PENDING_DEPRECATION=1` environment variable), similarly to Runtime
20+
deprecations below. Documentation-only deprecations that support that flag
21+
are explicitly labeled as such in the
22+
[list of Deprecated APIs](#deprecations_list_of_deprecated_apis).
1723

1824
A Runtime deprecation will, by default, generate a process warning that will
1925
be printed to `stderr` the first time the deprecated API is used. When the
@@ -66,7 +72,7 @@ be used.
6672
<a id="DEP0005"></a>
6773
### DEP0005: Buffer() constructor
6874

69-
Type: Documentation-only
75+
Type: Documentation-only (supports [`--pending-deprecation`][])
7076

7177
The `Buffer()` function and `new Buffer()` constructor are deprecated due to
7278
API usability issues that can potentially lead to accidental security issues.
@@ -780,6 +786,7 @@ Use [`asyncResource.runInAsyncScope()`][] API instead which provides a much
780786
safer, and more convenient, alternative. See
781787
https://github.com/nodejs/node/pull/18513 for more details.
782788
789+
[`--pending-deprecation`]: cli.html#cli_pending_deprecation
783790
[`Buffer.allocUnsafeSlow(size)`]: buffer.html#buffer_class_method_buffer_allocunsafeslow_size
784791
[`Buffer.from(array)`]: buffer.html#buffer_class_method_buffer_from_array
785792
[`Buffer.from(buffer)`]: buffer.html#buffer_class_method_buffer_from_buffer

0 commit comments

Comments
 (0)