From 44450efa6b3a081eb3dbd589fea5e3a0bd585637 Mon Sep 17 00:00:00 2001 From: toshi1127 Date: Wed, 20 Mar 2019 21:52:50 +0900 Subject: [PATCH] worker: remove usage of require('util') MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/26810 Refs: https://github.com/nodejs/node/issues/26546 Reviewed-By: Anna Henningsen Reviewed-By: Yongsheng Zhang Reviewed-By: Michaƫl Zasso Reviewed-By: James M Snell Reviewed-By: Ruben Bridgewater --- lib/internal/worker/io.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/internal/worker/io.js b/lib/internal/worker/io.js index 664055b5c5b9af..ece0f2741a3811 100644 --- a/lib/internal/worker/io.js +++ b/lib/internal/worker/io.js @@ -18,7 +18,7 @@ const { const { Readable, Writable } = require('stream'); const EventEmitter = require('events'); -const util = require('util'); +const { inspect } = require('internal/util/inspect'); let debuglog; function debug(...args) { @@ -122,7 +122,7 @@ MessagePort.prototype.close = function(cb) { MessagePortPrototype.close.call(this); }; -Object.defineProperty(MessagePort.prototype, util.inspect.custom, { +Object.defineProperty(MessagePort.prototype, inspect.custom, { enumerable: false, writable: false, value: function inspect() { // eslint-disable-line func-name-matching