-
Notifications
You must be signed in to change notification settings - Fork 621
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
deprecation(crypto): rename an export to match style guide, deprecating original and two other obsolete imports #4525
Conversation
…ginal and two other obsolete imports
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
* | ||
* @deprecated (will be removed in 1.0.0) Consider using {@linkcode DIGEST_ALGORITHM_NAMES} instead. | ||
*/ | ||
export const wasmDigestAlgorithms = DIGEST_ALGORITHM_NAMES; |
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.
* A FNV (Fowler/Noll/Vo) digest algorithm name supported by std/crypto. | ||
* | ||
* @deprecated (will be removed in 1.0.0) | ||
*/ | ||
export type FNVAlgorithms = "FNV32" | "FNV32A" | "FNV64" | "FNV64A"; |
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 use of this export is minimal. A removal version of v1 instead of sooner is overkill and would be non-impactful to remove sooner. See https://github.com/search?q=%22FNVAlgorithms%22&type=code and notice they're almost entirely forks of std. WDYT, @kt3k?
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's no benefit of removing them earlier in my view.
Breaking at 1.0 is more obvious and less confusing. That is better than breaking at random 0.x version in my view
* | ||
* @deprecated (will be removed in 1.0.0) Consider using {@linkcode DigestAlgorithmName} instead. | ||
*/ | ||
export type WasmDigestAlgorithm = DigestAlgorithmName; |
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.
…220/deno_std into feat/expect-addSnapshotSerializer * 'feat/expect-addSnapshotSerializer' of github.com:eryue0220/deno_std: deprecation(crypto): rename an export to match style guide, deprecating original and two other obsolete imports (denoland#4525) chore: add `--allow-dirty` flag to publish dry run (denoland#4535) [unstable] BREAKING(semver): remove comparator.semver field (denoland#4533) chore(crypto): upgrade dependencies (denoland#4530) 0.221.0 (denoland#4531) docs(fs): polish documentation (denoland#4526) fix(fs): `SubdirectoryMoveError` extends `Error` correctly (denoland#4528) chore(fs): remove `test.ts` (denoland#4527)
(Originally part of #4515, broken into separate PR as suggested by iuioiua.)
This PR renames
crypto.ts
's exportedconst
wasmDigestAlgorithms
toDIGEST_ALGORITHM_NAMES
, to match Deno's style guide and reflect the fact that it includes all algorithm names supported by the digest function, not just a subset. The old name is maintained as a deprecated alias for now. The exportedWasmDigestAlgorithm
type is deprecated, as it's redundant with the existingDigestAlgorithmName
export (all algorithms are available in Wasm, and if that changes in the future it should probably just be an internal implementation detail, not part of the public interface). TheFNVAlgorithms
export is similarly deprecated (they were previously a special case that was not included in Wasm).