diff options
author | Antoine du Hamel <duhamelantoine1995@gmail.com> | 2018-10-02 19:12:32 +0200 |
---|---|---|
committer | guybedford <guybedford@gmail.com> | 2018-11-06 16:30:26 +0200 |
commit | 0f63d84f807edb17466f9357a630467cf608f954 (patch) | |
tree | 8bd02a2b08a579c9a253b70fedfac9c2826f2324 /lib | |
parent | 5850220229cdd8b62f6d5022779af7c232231d64 (diff) | |
download | android-node-v8-0f63d84f807edb17466f9357a630467cf608f954.tar.gz android-node-v8-0f63d84f807edb17466f9357a630467cf608f954.tar.bz2 android-node-v8-0f63d84f807edb17466f9357a630467cf608f954.zip |
crypto: set `DEFAULT_ENCODING` property to non-enumerable
Since it is a deprecated API, a deprecation warning is printed when
loading crypto module from ESM. Making it non enumerable remove the
deprecation warning and make the API non-available to named imports.
PR-URL: https://github.com/nodejs/node/pull/23222
Fixes: https://github.com/nodejs/node/issues/23203
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/crypto.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/crypto.js b/lib/crypto.js index 13987f9e03..2a41768414 100644 --- a/lib/crypto.js +++ b/lib/crypto.js @@ -230,7 +230,7 @@ Object.defineProperties(exports, { fipsForced ? setFipsForced : setFipsCrypto }, DEFAULT_ENCODING: { - enumerable: true, + enumerable: false, configurable: true, get: deprecate(getDefaultEncoding, 'crypto.DEFAULT_ENCODING is deprecated.', 'DEP0091'), |