Crypto warnings coming up for import crypto from 'crypto' · Issue #23203 · nodejs/node (original) (raw)

When running Node with --experimental-modules I'm getting warnings on crypto:

test.mjs

import crypto from 'crypto';
node --experimental-modules test.mjs
(node:12120) ExperimentalWarning: The ESM module loader is experimental.
(node:12120) [DEP0091] DeprecationWarning: crypto.DEFAULT_ENCODING is deprecated.
(node:12120) [DEP0010] DeprecationWarning: crypto.createCredentials is deprecated. Use tls.createSecureContext instead.
(node:12120) [DEP0011] DeprecationWarning: crypto.Credentials is deprecated. Use tls.SecureContext instead.

Ideally we should hide deprecation warnings that are output during named exports population for core modules.

//cc @node/modules @devsnek