summaryrefslogtreecommitdiff
path: root/lib/crypto.js
diff options
context:
space:
mode:
authorJames M Snell <jasnell@gmail.com>2016-12-04 12:47:01 -0800
committerJames M Snell <jasnell@gmail.com>2017-01-30 11:11:57 -0800
commit5de3cf099cd01c84d1809dab90c041b76aa58d8e (patch)
tree91b2e748d3050058167c69daaf29b0a57245bec1 /lib/crypto.js
parent03e89b3ff298c63e9620f1547094f7fca76edde7 (diff)
downloadandroid-node-v8-5de3cf099cd01c84d1809dab90c041b76aa58d8e.tar.gz
android-node-v8-5de3cf099cd01c84d1809dab90c041b76aa58d8e.tar.bz2
android-node-v8-5de3cf099cd01c84d1809dab90c041b76aa58d8e.zip
lib: add static identifier codes for all deprecations
Assigns a static identifier code to all runtime and documentation only deprecations. The identifier code is included in the emitted DeprecationWarning. Also adds a deprecations.md to the API docs to provide a central location where deprecation codes can be referenced and explained. PR-URL: https://github.com/nodejs/node/pull/10116 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Michal Zasso <targos@protonmail.com> Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Diffstat (limited to 'lib/crypto.js')
-rw-r--r--lib/crypto.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/crypto.js b/lib/crypto.js
index 9180ce70dc..2d4695dc97 100644
--- a/lib/crypto.js
+++ b/lib/crypto.js
@@ -539,7 +539,7 @@ ECDH.prototype.getPublicKey = function getPublicKey(encoding, format) {
const pbkdf2DeprecationWarning =
internalUtil.deprecate(() => {}, 'crypto.pbkdf2 without specifying' +
- ' a digest is deprecated. Please specify a digest');
+ ' a digest is deprecated. Please specify a digest', 'DEP0009');
exports.pbkdf2 = function(password,
@@ -663,7 +663,7 @@ Object.defineProperty(exports, 'createCredentials', {
get: internalUtil.deprecate(function() {
return require('tls').createSecureContext;
}, 'crypto.createCredentials is deprecated. ' +
- 'Use tls.createSecureContext instead.')
+ 'Use tls.createSecureContext instead.', 'DEP0010')
});
Object.defineProperty(exports, 'Credentials', {
@@ -672,5 +672,5 @@ Object.defineProperty(exports, 'Credentials', {
get: internalUtil.deprecate(function() {
return require('tls').SecureContext;
}, 'crypto.Credentials is deprecated. ' +
- 'Use tls.SecureContext instead.')
+ 'Use tls.SecureContext instead.', 'DEP0011')
});