mirror of https://github.com/lukechilds/node.git
Browse Source
The process.emitWarning() API should be used for printing deprecation warning messages rather than directly using the internal/util#printDeprecationMessage PR-URL: https://github.com/nodejs/node/pull/8166 Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com>v7.x
James M Snell
8 years ago
4 changed files with 17 additions and 11 deletions
@ -1,6 +1,6 @@ |
|||||
'use strict'; |
'use strict'; |
||||
|
|
||||
const msg = require('internal/util').printDeprecationMessage; |
|
||||
|
|
||||
module.exports = require('internal/linkedlist'); |
module.exports = require('internal/linkedlist'); |
||||
msg('_linklist module is deprecated. Please use a userland alternative.'); |
process.emitWarning( |
||||
|
'_linklist module is deprecated. Please use a userland alternative.', |
||||
|
'DeprecationWarning'); |
||||
|
@ -1,10 +1,9 @@ |
|||||
'use strict'; |
'use strict'; |
||||
|
|
||||
const util = require('internal/util'); |
|
||||
|
|
||||
// the sys module was renamed to 'util'.
|
// the sys module was renamed to 'util'.
|
||||
// this shim remains to keep old programs working.
|
// this shim remains to keep old programs working.
|
||||
// sys is deprecated and shouldn't be used
|
// sys is deprecated and shouldn't be used
|
||||
|
|
||||
module.exports = require('util'); |
module.exports = require('util'); |
||||
util.printDeprecationMessage('sys is deprecated. Use util instead.'); |
process.emitWarning('sys is deprecated. Use util instead.', |
||||
|
'DeprecationWarning'); |
||||
|
Loading…
Reference in new issue