summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJames M Snell <jasnell@gmail.com>2018-01-23 15:58:14 -0800
committerJames M Snell <jasnell@gmail.com>2018-01-31 17:33:41 -0800
commit6035beea93e16f6d923201a33a541f6d724f00d6 (patch)
treedd3fcb835f67e31abbee1c26f18716cc4c058991 /lib
parentfd3a0cfb7c467c8016ad739a473be864425e645d (diff)
downloadandroid-node-v8-6035beea93e16f6d923201a33a541f6d724f00d6.tar.gz
android-node-v8-6035beea93e16f6d923201a33a541f6d724f00d6.tar.bz2
android-node-v8-6035beea93e16f6d923201a33a541f6d724f00d6.zip
crypto: runtime deprecate DEFAULT_ENCODING
Runtime deprecate the crypto.DEFAULT_ENCODING property. This is specifically in preparation for eventual ESM support Refs: https://github.com/nodejs/node/pull/18131 PR-URL: https://github.com/nodejs/node/pull/18333 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/crypto.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/crypto.js b/lib/crypto.js
index d7c59f553e..5983f1db4f 100644
--- a/lib/crypto.js
+++ b/lib/crypto.js
@@ -205,8 +205,10 @@ Object.defineProperties(exports, {
DEFAULT_ENCODING: {
enumerable: true,
configurable: true,
- get: getDefaultEncoding,
- set: setDefaultEncoding
+ get: deprecate(getDefaultEncoding,
+ 'crypto.DEFAULT_ENCODING is deprecated.', 'DEP00XX'),
+ set: deprecate(setDefaultEncoding,
+ 'crypto.DEFAULT_ENCODING is deprecated.', 'DEP00XX')
},
constants: {
configurable: false,