From 15eaba98a1dac646225ba74a2abab63de4913188 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Thu, 18 Aug 2016 11:51:10 -0700 Subject: lib: use emitWarning instead of printDeprecationMessage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The process.emitWarning() API should be used for printing deprecation warning messages rather than directly using the internal/util#printDeprecationMessage PR-URL: https://github.com/nodejs/node/pull/8166 Reviewed-By: Сковорода Никита Андреевич Reviewed-By: Myles Borins --- lib/sys.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib/sys.js') diff --git a/lib/sys.js b/lib/sys.js index a34ea0b899..c94b032c64 100644 --- a/lib/sys.js +++ b/lib/sys.js @@ -1,10 +1,9 @@ 'use strict'; -const util = require('internal/util'); - // the sys module was renamed to 'util'. // this shim remains to keep old programs working. // sys is deprecated and shouldn't be used module.exports = require('util'); -util.printDeprecationMessage('sys is deprecated. Use util instead.'); +process.emitWarning('sys is deprecated. Use util instead.', + 'DeprecationWarning'); -- cgit v1.2.3