Skip to content

Commit 0f63d84

Browse files
aduh95guybedford
authored andcommitted
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: #23222 Fixes: #23203 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Guy Bedford <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
1 parent 5850220 commit 0f63d84

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/crypto.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ Object.defineProperties(exports, {
230230
fipsForced ? setFipsForced : setFipsCrypto
231231
},
232232
DEFAULT_ENCODING: {
233-
enumerable: true,
233+
enumerable: false,
234234
configurable: true,
235235
get: deprecate(getDefaultEncoding,
236236
'crypto.DEFAULT_ENCODING is deprecated.', 'DEP0091'),

0 commit comments

Comments
 (0)