-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add End-of-Life deprecation on crypto.Credentials #20793
Comments
@nodejs/crypto @nodejs/modules |
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 |
Making 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? |
Here's a doc explaining various types of deprecations. Doc -> Runtime Warning -> Removal.
Major version releases are the time for removals for sure. |
The `crypto.Credentials` legacy API has been Runtime deprecated since v0.11.13 and users had been adviced to use `tls.SecureContext` instead. Fixes: nodejs#20793
Back in v0.11.13 according to the docs,
crypto.createCredentials
andcrypto.Credentials
have 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
crypto
module:crypto.DEFAULT_ENCODING
has 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.The text was updated successfully, but these errors were encountered: