From ff5754077d266c86d3129f85ea99c1d43cc19b32 Mon Sep 17 00:00:00 2001 From: Rafael Gonzaga Date: Tue, 4 Nov 2025 23:52:26 -0300 Subject: [PATCH] lib: add options to util.deprecate Signed-off-by: RafaelGSS PR-URL: https://github.com/nodejs/node/pull/59982 Reviewed-By: Chengzhong Wu Reviewed-By: James M Snell --- doc/api/util.md | 10 +++++++++- lib/util.js | 19 ++++++++++++------- test/parallel/test-util-deprecate.js | 22 ++++++++++++++++++++++ 3 files changed, 43 insertions(+), 8 deletions(-) diff --git a/doc/api/util.md b/doc/api/util.md index f459692608a..c4442d31e0a 100644 --- a/doc/api/util.md +++ b/doc/api/util.md @@ -225,11 +225,15 @@ added: v14.9.0 Alias for `util.debuglog`. Usage allows for readability of that doesn't imply logging when only using `util.debuglog().enabled`. -## `util.deprecate(fn, msg[, code])` +## `util.deprecate(fn, msg[, code[, options]])`