summaryrefslogtreecommitdiff
path: root/lib/readline.js
diff options
context:
space:
mode:
authorSakthipriyan Vairamani <thechargingvolcano@gmail.com>2015-06-13 16:44:39 +0000
committerRoman Reiss <me@silverwind.io>2015-07-03 16:32:29 +0200
commit9cd44bb2b683446531306bbcff8739fc3526d02c (patch)
tree54a52ca88eb414d8025608f7d87df9a58e99be2f /lib/readline.js
parentd55a778bae2188a24b2cb1f1006cf7cc09432649 (diff)
downloadandroid-node-v8-9cd44bb2b683446531306bbcff8739fc3526d02c.tar.gz
android-node-v8-9cd44bb2b683446531306bbcff8739fc3526d02c.tar.bz2
android-node-v8-9cd44bb2b683446531306bbcff8739fc3526d02c.zip
util: prepend '(node) ' to deprecation messages
Changes included in this commit are 1. Making the deprecation messages consistent. The messages will be in the following format x is deprecated. Use y instead. If there is no alternative for `x`, then the ` Use y instead.` part will not be there in the message. 2. All the internal deprecation messages are printed with the prefix `(node) `, except when the `--trace-deprecation` flag is set. Fixes: https://github.com/nodejs/io.js/issues/1883 PR-URL: https://github.com/nodejs/io.js/pull/1892 Reviewed-By: Roman Reiss <me@silverwind.io>
Diffstat (limited to 'lib/readline.js')
-rw-r--r--lib/readline.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/readline.js b/lib/readline.js
index b984aac834..d186eef94a 100644
--- a/lib/readline.js
+++ b/lib/readline.js
@@ -9,6 +9,7 @@
const kHistorySize = 30;
const util = require('util');
+const internalUtil = require('internal/util');
const inherits = util.inherits;
const Buffer = require('buffer').Buffer;
const EventEmitter = require('events').EventEmitter;
@@ -1417,8 +1418,9 @@ function codePointAt(str, index) {
}
return code;
}
-exports.codePointAt = util.deprecate(codePointAt,
- 'codePointAt() is deprecated. Use String.prototype.codePointAt');
+exports.codePointAt = internalUtil.deprecate(codePointAt,
+ 'readline.codePointAt is deprecated. ' +
+ 'Use String.prototype.codePointAt instead.');
/**