diff --git a/.eslintrc.js b/.eslintrc.js index 9bd8e661237fd7..3527d8dd4c7979 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -137,7 +137,7 @@ module.exports = { 'no-path-concat': 'error', 'no-proto': 'error', 'no-redeclare': 'error', - 'no-restricted-modules': ['error', 'sys'], + 'no-restricted-modules': ['error'], /* eslint-disable max-len */ 'no-restricted-properties': [ 'error', diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index 459fdbbd992628..bbc202c95b17f9 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -551,6 +551,9 @@ The `REPLServer.prototype.convertToContext()` API has been removed. ### DEP0025: require('sys') -Type: Runtime +Type: End-of-Life The `sys` module is deprecated. Please use the [`util`][] module instead. diff --git a/lib/internal/bootstrap/cache.js b/lib/internal/bootstrap/cache.js index 3840d7ee255335..6ec917191d326c 100644 --- a/lib/internal/bootstrap/cache.js +++ b/lib/internal/bootstrap/cache.js @@ -14,7 +14,6 @@ const { hasTracing, hasInspector } = internalBinding('config'); // Modules with source code compiled in js2c that // cannot be compiled with the code cache. const cannotBeRequired = [ - 'sys', // Deprecated. 'internal/v8_prof_polyfill', 'internal/v8_prof_processor', diff --git a/lib/sys.js b/lib/sys.js deleted file mode 100644 index 87f40fc6d5f1f0..00000000000000 --- a/lib/sys.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -'use strict'; - -// 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'); -process.emitWarning('sys is deprecated. Use util instead.', - 'DeprecationWarning', 'DEP0025'); diff --git a/node.gyp b/node.gyp index d0a715b91e1dbe..2715a781cccf4d 100644 --- a/node.gyp +++ b/node.gyp @@ -72,7 +72,6 @@ 'lib/_stream_passthrough.js', 'lib/_stream_wrap.js', 'lib/string_decoder.js', - 'lib/sys.js', 'lib/timers.js', 'lib/tls.js', 'lib/_tls_common.js',