summaryrefslogtreecommitdiff
path: root/lib/sys.js
diff options
context:
space:
mode:
authorJames M Snell <jasnell@gmail.com>2016-08-18 11:51:10 -0700
committerJames M Snell <jasnell@gmail.com>2016-09-02 13:15:22 -0700
commit15eaba98a1dac646225ba74a2abab63de4913188 (patch)
tree13ba9380cea7d1e19e7eaa49e4aa7818bfbc3d6b /lib/sys.js
parentbf91035364784ab2faf4a81af4e116345e388444 (diff)
downloadandroid-node-v8-15eaba98a1dac646225ba74a2abab63de4913188.tar.gz
android-node-v8-15eaba98a1dac646225ba74a2abab63de4913188.tar.bz2
android-node-v8-15eaba98a1dac646225ba74a2abab63de4913188.zip
lib: use emitWarning instead of printDeprecationMessage
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: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com>
Diffstat (limited to 'lib/sys.js')
-rw-r--r--lib/sys.js5
1 files changed, 2 insertions, 3 deletions
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');