-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
Remove crypto.Credentials API #21153
Conversation
lib/crypto.js
Outdated
@@ -211,7 +211,7 @@ Object.defineProperties(exports, { | |||
fipsForced ? setFipsForced : setFipsCrypto | |||
}, | |||
DEFAULT_ENCODING: { | |||
enumerable: true, | |||
enumerable: false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this change seems unrelated
@nodejs/crypto @nodejs/tsc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with the changes @targos mentioned
8163a85
to
e0acbef
Compare
doc/api/deprecations.md
Outdated
|
||
The [`crypto.createCredentials()`][] API is deprecated. Please use | ||
The [`crypto.createCredentials()`][] API has been removed. Please use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
has been removed
-> was removed
(ditto on line 155)
Similar to PR #21043
lib/crypto.js
Outdated
@@ -223,22 +223,4 @@ Object.defineProperties(exports, { | |||
enumerable: true, | |||
value: constants | |||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The rest of the file does not use trailing commas, please remove this. I don't want to start any new discussions about trailing commas, but I'd go for consistency in this case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The line right above doesn't have a trailing comma either, but @bnoordhuis suggests we use trailing commas moving forwards?
Idk, sounds reasonable to just add them wherever you go.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you referring to #20703 (comment)? ESLint still doesn't have a file-by-file rule as far as I know, so that doesn't really apply here. Personally, I am not a fan of dangling commas, and we discussed that topic numerous times (e.g. #19131 (comment)). I totally understand Ben's reasoning, but this kind of "churn" isn't that common from my perspective, correct me if I am wrong.
Edit: Striked my own comment because I promised not to start a new debate about trailing commas.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, let's not. We should probably skip the comma for consistency, you're right.
e0acbef
to
966bdf8
Compare
|
doc/api/deprecations.md
Outdated
|
||
The [`crypto.createCredentials()`][] API is deprecated. Please use | ||
The [`crypto.createCredentials()`][] API was removed. Please use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems this link will not be valid after this PR, so we need to delinkify `crypto.createCredentials()`
here and remove the bottom reference.
966bdf8
to
29be62f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but only because of the existing runtime deprecation.
If we had had our process back then, this should just have gotten stuck at a documentation deprecation and a one-line alias.
@nodejs/crypto is this ready to land? |
@aduh95 could you have a look at the test failures please? |
You need to remove the |
@tniessen Thank you for spotting that, I'll take care of that this evening (that is to say in ten hours from my time zone). |
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
29be62f
to
f758e89
Compare
@shigeki any concerns ? |
@nodejs/crypto is this landable? Are there any concerns? |
I am fine with this change, I don't know of any potential breakage or downsides. |
Let's land this tomorrow if there are no objections then. |
Landed in d2ee7d6 |
The `crypto.Credentials` legacy API has been Runtime deprecated since v0.11.13 and users had been adviced to use `tls.SecureContext` instead. PR-URL: #21153 Fixes: #20793 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Ujjwal Sharma <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Tiancheng "Timothy" Gu <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: James M Snell <[email protected]>
Fix #20793
The
crypto.Credentials
legacy API has been Runtime deprecated sincev0.11.13 and users had been adviced to use
tls.SecureContext
instead.This PR removes it from the
crypto
module.Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes