From 6642aad823d81d1a6e3c5628c8aac520a4e8e10b Mon Sep 17 00:00:00 2001 From: haramjeong <04harams77@gmail.com> Date: Fri, 5 Sep 2025 02:14:28 +0900 Subject: [PATCH 1/2] util: use getOptionValue('--no-deprecation') in deprecated() --- lib/internal/util.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/internal/util.js b/lib/internal/util.js index 76b41f9aaf3913..c30785d683b521 100644 --- a/lib/internal/util.js +++ b/lib/internal/util.js @@ -182,8 +182,7 @@ function deprecate(fn, msg, code, useEmitSync, modifyPrototype = true) { ); function deprecated(...args) { - // TODO(joyeecheung): use getOptionValue('--no-deprecation') instead. - if (!process.noDeprecation) { + if (!getOptionValue('--no-deprecation') && !process.noDeprecation) { emitDeprecationWarning(); } if (new.target) { From f35aec5e791decf12c790f0c85319d3a1c4eae17 Mon Sep 17 00:00:00 2001 From: haramjeong <04harams77@gmail.com> Date: Fri, 5 Sep 2025 11:07:05 +0900 Subject: [PATCH 2/2] util: remove outdated TODO comment --- lib/internal/util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/internal/util.js b/lib/internal/util.js index c30785d683b521..6f9c43c26f0dc9 100644 --- a/lib/internal/util.js +++ b/lib/internal/util.js @@ -182,7 +182,7 @@ function deprecate(fn, msg, code, useEmitSync, modifyPrototype = true) { ); function deprecated(...args) { - if (!getOptionValue('--no-deprecation') && !process.noDeprecation) { + if (!process.noDeprecation) { emitDeprecationWarning(); } if (new.target) {