diff --git a/lib/sys.js b/lib/sys.js index 6dc415c31f86c1..202ee73ade2c9f 100644 --- a/lib/sys.js +++ b/lib/sys.js @@ -21,6 +21,14 @@ 'use strict'; +var util = require('util'); + // the sys module was renamed to 'util'. // this shim remains to keep old programs working. -module.exports = require('util'); +// sys is deprecated and shouldn't be used + +var setExports = util.deprecate(function() { + module.exports = util; +}, 'sys is deprecated. Use util instead.'); + +setExports();