From 4a07a62d04b219ca72271f7cda0880a2a4300d05 Mon Sep 17 00:00:00 2001 From: dnlup Date: Wed, 20 Mar 2019 14:49:04 +0100 Subject: [PATCH] process: remove usage of require('util') in `per_thread.js` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use `require('internal/util/inspect').format` instead of `require('util').format`. PR-URL: https://github.com/nodejs/node/pull/26817 Refs: https://github.com/nodejs/node/issues/26546 Reviewed-By: Michaƫl Zasso Reviewed-By: James M Snell Reviewed-By: Ruben Bridgewater --- lib/internal/process/per_thread.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/internal/process/per_thread.js b/lib/internal/process/per_thread.js index 7a3bee3098e8e9..5706d560baeb9c 100644 --- a/lib/internal/process/per_thread.js +++ b/lib/internal/process/per_thread.js @@ -15,7 +15,7 @@ const { ERR_UNKNOWN_SIGNAL } } = require('internal/errors'); -const util = require('util'); +const format = require('internal/util/inspect').format; const constants = internalBinding('constants').os.signals; function assert(x, msg) { @@ -32,7 +32,7 @@ function wrapProcessMethods(binding) { } = binding; function _rawDebug(...args) { - binding._rawDebug(util.format.apply(null, args)); + binding._rawDebug(format.apply(null, args)); } // Create the argument array that will be passed to the native function.