Skip to content

Commit 22d8062

Browse files
marco-ippolitonodejs-github-bot
authored andcommitted
util: runtime deprecation util._extend
PR-URL: #50488 Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io> Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
1 parent 62fc950 commit 22d8062

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

doc/api/deprecations.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -1282,6 +1282,9 @@ The [`util.log()`][] API is deprecated.
12821282

12831283
<!-- YAML
12841284
changes:
1285+
- version: REPLACEME
1286+
pr-url: https://github.com/nodejs/node/pull/50488
1287+
description: Runtime deprecation.
12851288
- version: v6.12.0
12861289
pr-url: https://github.com/nodejs/node/pull/10116
12871290
description: A deprecation code has been assigned.
@@ -1290,7 +1293,7 @@ changes:
12901293
description: Documentation-only deprecation.
12911294
-->
12921295

1293-
Type: Documentation-only
1296+
Type: Runtime
12941297

12951298
The [`util._extend()`][] API is deprecated.
12961299

lib/util.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,9 @@ function _exceptionWithHostPort(...args) {
375375
module.exports = {
376376
_errnoException,
377377
_exceptionWithHostPort,
378-
_extend,
378+
_extend: deprecate(_extend,
379+
'The `util._extend` API is deprecated. Please use Object.assign() instead.',
380+
'DEP0060'),
379381
callbackify,
380382
debug: debuglog,
381383
debuglog,

0 commit comments

Comments
 (0)