Skip to content

Commit 906245e

Browse files
TrottBridgeAR
authored andcommitted
doc: clarify --pending-deprecation effects on Buffer() usage
Refs: #29725 (comment) PR-URL: #29769 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: Michael Dawson <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
1 parent 401f3e7 commit 906245e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

doc/api/deprecations.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,10 @@ objects:
154154
* [`Buffer.from(string[, encoding])`][from_string_encoding] - Create a `Buffer`
155155
that copies `string`.
156156

157-
As of v10.0.0, a deprecation warning is printed at runtime when
158-
`--pending-deprecation` is used or when the calling code is
159-
outside `node_modules` in order to better target developers, rather than users.
157+
Without `--pending-deprecation`, runtime warnings occur only for code not in
158+
`node_modules`. This means there will not be deprecation warnings for
159+
`Buffer()` usage in dependencies. With `--pending-deprecation`, a runtime
160+
warning results no matter where the `Buffer()` usage occurs.
160161

161162
<a id="DEP0006"></a>
162163
### DEP0006: child\_process options.customFds

0 commit comments

Comments
 (0)