From dc42e1faaf358e1ee8729439e0a3ade26f3cbce1 Mon Sep 17 00:00:00 2001 From: Wyatt Preul Date: Mon, 12 Jan 2015 18:41:07 -0600 Subject: [PATCH] sys: Mark as deprecated PR-URL: https://github.com/iojs/io.js/pull/317 Reviewed-By: Rod Vagg Reviewed-By: Colin Ihrig discussed at TC meeting, deprecate, don't remove --- lib/sys.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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();