Repository navigation
Add End-of-Life deprecation on crypto.Credentials #20793
Description
Activity
- addedcryptoIssues and PRs related to the crypto subsystem.Issues and PRs related to the crypto subsystem.
on May 17, 2018 @nodejs/crypto @nodejs/modules
- addedesmIssues and PRs related to the ECMAScript Modules implementation.Issues and PRs related to the ECMAScript Modules implementation.
on May 17, 2018 I think regardless, we could ensure that the deprecated items aren’t in the ESM implementation?
@ljharb There's a process in place for deprecation and removal of APIs. Following that process in CJS as well as ESM allows for things to shake out naturally without maintaining multiple lists or applying extra filters for things.
One way to approach deprecated APIs to avoid runtime warnings for things like dynamic imports is to make the deprecated API non-enumerable. This is what has been done in other areas like the experimental
fs.promisesmethod to avoid user-land issues (#20632).Reacted by Jordan Harband and SnakeDrakMaking deprecated API non-enumerable make the warnings disappear indeed, I can make a PR for that.
Still, it will be a breaking change and won't land until Node v11 (I believe), which is why I think it may be a good time to talk about retiring those deprecated APIs. @jdalton Where can I find the process you are referring to? Would it allow such APIs to be removed in the near future or is it a silly thing to say?
Where can I find the process you are referring to?
Here's a doc explaining various types of deprecations. Doc -> Runtime Warning -> Removal.
Would it allow such APIs to be removed in the near future or is it a silly thing to say?
Major version releases are the time for removals for sure.
For this specific one we should cc the @nodejs/crypto team.- added 2 commits that reference this issue
on Jun 25, 2018 - addedsemver-majorPRs that contain breaking changes and should be released in the next major version.PRs that contain breaking changes and should be released in the next major version.and removedsemver-majorPRs that contain breaking changes and should be released in the next major version.PRs that contain breaking changes and should be released in the next major version.
on Jul 13, 2018 - added a commit that references this issue
on Jul 27, 2026
Back in v0.11.13 according to the docs,
crypto.createCredentialsandcrypto.Credentialshave been deprecated (DEP0010 and DEP0011) in favor oftls.createSecureContext. I am not familiar with these functions, but I am willing to bet it's been enough time since the deprecation to consider legitimately to move the deprecation to End-of-Life and talk about removing them.I am raising this issue because of the warnings I got when I dynamically import the
cryptomodule:crypto.DEFAULT_ENCODINGhas been deprecated in Node 10, so one could argue it is too soon to break it. However, we might want to find a way to get rid of the deprecation warning before ES modules land without a flag ― core module raising warnings on load looks quite messy, I'd say.