From 462818df10e8d58e77cd925f83231ea4d1f9cca8 Mon Sep 17 00:00:00 2001 From: Wyatt Preul Date: Mon, 12 Jan 2015 10:55:27 -0600 Subject: [PATCH 1/4] sys: Mark as deprecated --- lib/sys.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/sys.js b/lib/sys.js index 6dc415c31f86c1..1e610631e507fc 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(); \ No newline at end of file From b1eaff8c1930a1bd86b2033340a39d8c5abe8a62 Mon Sep 17 00:00:00 2001 From: Wyatt Preul Date: Mon, 12 Jan 2015 10:58:09 -0600 Subject: [PATCH 2/4] 2 spaces --- lib/sys.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sys.js b/lib/sys.js index 1e610631e507fc..ff14be7c7b1c7f 100644 --- a/lib/sys.js +++ b/lib/sys.js @@ -28,7 +28,7 @@ var util = require('util'); // sys is deprecated and shouldn't be used var setExports = util.deprecate(function() { - module.exports = util; + module.exports = util; }, 'sys is deprecated, use util instead'); setExports(); \ No newline at end of file From dff5d4af9af2d772535ddb93ca3ec80dff585ca2 Mon Sep 17 00:00:00 2001 From: Wyatt Preul Date: Mon, 12 Jan 2015 11:04:44 -0600 Subject: [PATCH 3/4] Small nit --- lib/sys.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sys.js b/lib/sys.js index ff14be7c7b1c7f..5a2932b6622564 100644 --- a/lib/sys.js +++ b/lib/sys.js @@ -29,6 +29,6 @@ var util = require('util'); var setExports = util.deprecate(function() { module.exports = util; -}, 'sys is deprecated, use util instead'); +}, 'sys is deprecated. Use util instead.'); setExports(); \ No newline at end of file From 4d9296aa2b9c191ed0f3592943e4880dee81f9d5 Mon Sep 17 00:00:00 2001 From: Wyatt Preul Date: Mon, 12 Jan 2015 12:42:32 -0600 Subject: [PATCH 4/4] Newline --- lib/sys.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sys.js b/lib/sys.js index 5a2932b6622564..202ee73ade2c9f 100644 --- a/lib/sys.js +++ b/lib/sys.js @@ -31,4 +31,4 @@ var setExports = util.deprecate(function() { module.exports = util; }, 'sys is deprecated. Use util instead.'); -setExports(); \ No newline at end of file +setExports();