diff --git a/lib/sys.js b/lib/sys.js index 37d2fcaebbe4d2..57fe1bcfb55dba 100644 --- a/lib/sys.js +++ b/lib/sys.js @@ -1,5 +1,13 @@ '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();