diff --git a/lib/_http_outgoing.js b/lib/_http_outgoing.js index 952b2ed082644a..6a9e571e1d4739 100644 --- a/lib/_http_outgoing.js +++ b/lib/_http_outgoing.js @@ -645,4 +645,4 @@ OutgoingMessage.prototype.flushHeaders = function() { OutgoingMessage.prototype.flush = util.deprecate(function() { this.flushHeaders(); -}, 'flush is deprecated. Use flushHeaders instead.'); +}, '[node] OutgoingMessage.flush is deprecated. Use flushHeaders instead.'); diff --git a/lib/_stream_writable.js b/lib/_stream_writable.js index 06bde5561683a3..b74b35ac0e07d7 100644 --- a/lib/_stream_writable.js +++ b/lib/_stream_writable.js @@ -121,7 +121,7 @@ WritableState.prototype.getBuffer = function writableStateGetBuffer() { Object.defineProperty(WritableState.prototype, 'buffer', { get: util.deprecate(function() { return this.getBuffer(); - }, '_writableState.buffer is deprecated. Use ' + + }, '[node] _writableState.buffer is deprecated. Use ' + '_writableState.getBuffer() instead.') }); diff --git a/lib/buffer.js b/lib/buffer.js index 1b9c68465d6b03..5787de764c88e8 100644 --- a/lib/buffer.js +++ b/lib/buffer.js @@ -460,7 +460,7 @@ Buffer.prototype.get = util.deprecate(function get(offset) { if (offset < 0 || offset >= this.length) throw new RangeError('index out of range'); return this[offset]; -}, '.get() is deprecated. Access using array indexes instead.'); +}, '[node] Buffer.get() is deprecated. Access using array indexes instead.'); // XXX remove in v0.13 @@ -469,7 +469,7 @@ Buffer.prototype.set = util.deprecate(function set(offset, v) { if (offset < 0 || offset >= this.length) throw new RangeError('index out of range'); return this[offset] = v; -}, '.set() is deprecated. Set using array indexes instead.'); +}, '[node] Buffer.set() is deprecated. Set using array indexes instead.'); // TODO(trevnorris): fix these checks to follow new standard diff --git a/lib/child_process.js b/lib/child_process.js index d8d2ec6aacff56..846a1afddf69fc 100644 --- a/lib/child_process.js +++ b/lib/child_process.js @@ -272,7 +272,7 @@ var _deprecatedCustomFds = util.deprecate(function(options) { options.stdio = options.customFds.map(function(fd) { return fd === -1 ? 'pipe' : fd; }); -}, 'child_process: customFds option is deprecated, use stdio instead.'); +}, '[node] child_process.customFds option is deprecated, use stdio instead.'); function _convertCustomFds(options) { if (options && options.customFds && !options.stdio) { diff --git a/lib/crypto.js b/lib/crypto.js index 7ce89482d54b14..d4b1b34e982254 100644 --- a/lib/crypto.js +++ b/lib/crypto.js @@ -681,8 +681,10 @@ function filterDuplicates(names) { // Legacy API exports.__defineGetter__('createCredentials', util.deprecate(function() { return require('tls').createSecureContext; -}, 'createCredentials() is deprecated, use tls.createSecureContext instead')); +}, '[node] crypto.createCredentials() is deprecated, ' + +'use tls.createSecureContext instead')); exports.__defineGetter__('Credentials', util.deprecate(function() { return require('tls').SecureContext; -}, 'Credentials is deprecated, use tls.createSecureContext instead')); +}, '[node] crypto.Credentials is deprecated, ' + +'use tls.createSecureContext instead')); diff --git a/lib/http.js b/lib/http.js index a9cfeddeea5cfa..c0a87d4d895379 100644 --- a/lib/http.js +++ b/lib/http.js @@ -92,8 +92,8 @@ Client.prototype.request = function(method, path, headers) { }; exports.Client = util.deprecate(Client, - 'http.Client will be removed soon. Do not use it.'); + '[node] http.Client will be removed soon. Do not use it.'); exports.createClient = util.deprecate(function(port, host) { return new Client(port, host); -}, 'http.createClient is deprecated. Use `http.request` instead.'); +}, '[node] http.createClient is deprecated. Use `http.request` instead.'); diff --git a/lib/module.js b/lib/module.js index 844b683940c2a4..95e0644ef9f5ec 100644 --- a/lib/module.js +++ b/lib/module.js @@ -122,7 +122,7 @@ function tryExtensions(p, exts) { const noopDeprecateRequireDot = util.deprecate(function() {}, - 'warning: require(\'.\') resolved outside the package directory. ' + + '[node] warning: require(\'.\') resolved outside the package directory. ' + 'This functionality is deprecated and will be removed soon.'); diff --git a/lib/net.js b/lib/net.js index 53095210fdd808..9eb103cab73fe0 100644 --- a/lib/net.js +++ b/lib/net.js @@ -1081,10 +1081,11 @@ function Server(options, connectionListener) { return null; } return self._connections; - }, 'connections property is deprecated. Use getConnections() method'), + }, '[node] Server.connections property is deprecated. ' + + 'Use Server.getConnections() method'), set: util.deprecate(function(val) { return (self._connections = val); - }, 'connections property is deprecated. Use getConnections() method'), + }, '[node] Server.connections property is deprecated.'), configurable: true, enumerable: false }); @@ -1498,7 +1499,7 @@ function emitCloseNT(self) { Server.prototype.listenFD = util.deprecate(function(fd, type) { return this.listen({ fd: fd }); -}, 'listenFD is deprecated. Use listen({fd: }).'); +}, '[node] Server.listenFD is deprecated. Use Server.listen({fd: }).'); Server.prototype._setupSlave = function(socketList) { this._usingSlaves = true; diff --git a/lib/os.js b/lib/os.js index 4426612285e299..4af7b35bb04c1c 100644 --- a/lib/os.js +++ b/lib/os.js @@ -46,7 +46,8 @@ exports.tmpDir = exports.tmpdir; exports.getNetworkInterfaces = util.deprecate(function() { return exports.networkInterfaces(); -}, 'getNetworkInterfaces is now called `os.networkInterfaces`.'); +}, '[node] os.getNetworkInterfaces is deprecated. ' + +'Use `os.networkInterfaces` instead.'); exports.EOL = isWindows ? '\r\n' : '\n'; diff --git a/lib/readline.js b/lib/readline.js index 5782eb86e3eb12..48748574f00a6c 100644 --- a/lib/readline.js +++ b/lib/readline.js @@ -1418,7 +1418,8 @@ function codePointAt(str, index) { return code; } exports.codePointAt = util.deprecate(codePointAt, - 'codePointAt() is deprecated. Use String.prototype.codePointAt'); + '[node] readline.codePointAt is deprecated. ' + + 'Use String.prototype.codePointAt instead'); /** diff --git a/lib/smalloc.js b/lib/smalloc.js index 8601a8b3630661..d6418c9e0e781d 100644 --- a/lib/smalloc.js +++ b/lib/smalloc.js @@ -4,19 +4,20 @@ const smalloc = require('internal/smalloc'); const deprecate = require('util').deprecate; exports.alloc = - deprecate(smalloc.alloc, 'smalloc.alloc: Deprecated, use typed arrays'); + deprecate(smalloc.alloc, + '[node] smalloc.alloc is deprecated, use typed arrays'); exports.copyOnto = deprecate(smalloc.copyOnto, - 'smalloc.copyOnto: Deprecated, use typed arrays'); + '[node] smalloc.copyOnto is deprecated, use typed arrays'); exports.dispose = deprecate(smalloc.dispose, - 'smalloc.dispose: Deprecated, use typed arrays'); + '[node] smalloc.dispose is deprecated, use typed arrays'); exports.hasExternalData = deprecate(smalloc.hasExternalData, - 'smalloc.hasExternalData: Deprecated, use typed arrays'); + '[node] smalloc.hasExternalData is deprecated, use typed arrays'); Object.defineProperty(exports, 'kMaxLength', { enumerable: true, value: smalloc.kMaxLength, writable: false diff --git a/lib/sys.js b/lib/sys.js index 74143b5c198a07..94180c199b7a37 100644 --- a/lib/sys.js +++ b/lib/sys.js @@ -8,6 +8,6 @@ const util = require('util'); const setExports = util.deprecate(function() { module.exports = util; -}, 'sys is deprecated. Use util instead.'); +}, '[node] sys module is deprecated. Use util module instead.'); setExports(); diff --git a/lib/tty.js b/lib/tty.js index 1241d52535cfeb..3b53124980c2f4 100644 --- a/lib/tty.js +++ b/lib/tty.js @@ -19,7 +19,8 @@ exports.setRawMode = util.deprecate(function(flag) { throw new Error('can\'t set raw mode on non-tty'); } process.stdin.setRawMode(flag); -}, 'tty.setRawMode: Use `process.stdin.setRawMode()` instead.'); +}, '[node] tty.setRawMode is depreacted. ' + +'Use `process.stdin.setRawMode()` instead.'); function ReadStream(fd, options) {