-
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
doc: fix return type of crypto.getFips()
#32580
Conversation
Matching the doc to the implementation seems like the least effort solution. Our tests for node/test/parallel/test-crypto-fips.js Lines 14 to 15 in c52ebc0
|
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.
Optional nit: since there are many other possible values as a number (vs. a boolean) it might be worth noting the non-FIPS value now.
@cjihrig Added the non-FIPS value of |
Thanks. Still LGTM. |
I assume it would be a breaking change to actually change it to a boolean? |
That was my assumption. |
Technically, this LGTM as a documentation fix, I'm just concerned that by documenting the current behavior correctly, fixing the implementation to return a boolean becomes "more breaking". |
It would be semver-major either way so there's really no difference. |
@jasnell That’s true as far as our release process is concerned – In terms of communicating with our users, there is a difference between changing behavior that’s documented vs changing behavior that’s undocumented. What I would suggest for this PR is to document that in the future it may become a boolean, and then implement that in a follow-up at some point. |
Added more words to this effect. |
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.
💯
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.
That's exactly what I mean, and a wonderful suggestion, @addaleax, thank you. And thanks for implementing it, @richardlau!
`crypto.getFips()` returns a number, not a boolean. PR-URL: nodejs#32580 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Signed-off-by: Richard Lau <[email protected]>
Document that the return type of `crypto.getFips()` may change in a future semver-major release from a `number` to a `boolean`. PR-URL: nodejs#32580 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Signed-off-by: Richard Lau <[email protected]>
Landed in 83ebd77...b9da063. |
`crypto.getFips()` returns a number, not a boolean. PR-URL: #32580 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Signed-off-by: Richard Lau <[email protected]>
Document that the return type of `crypto.getFips()` may change in a future semver-major release from a `number` to a `boolean`. PR-URL: #32580 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Signed-off-by: Richard Lau <[email protected]>
`crypto.getFips()` returns a number, not a boolean. PR-URL: #32580 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Signed-off-by: Richard Lau <[email protected]>
Document that the return type of `crypto.getFips()` may change in a future semver-major release from a `number` to a `boolean`. PR-URL: #32580 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Signed-off-by: Richard Lau <[email protected]>
`crypto.getFips()` returns a number, not a boolean. PR-URL: #32580 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Signed-off-by: Richard Lau <[email protected]>
Document that the return type of `crypto.getFips()` may change in a future semver-major release from a `number` to a `boolean`. PR-URL: #32580 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Signed-off-by: Richard Lau <[email protected]>
crypto.getFips()
returns a number, not a boolean.cc @danbev @nodejs/crypto
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes