fix - Removed import and usage of nodeCrypto when not running on nodejs#3296
Closed
ETHANTALJAFFE wants to merge 2 commits intobrianc:masterfrom
Closed
Conversation
Owner
|
Looks like the tests are dying with an 'unrecognized algorithm name' in node: https://github.com/brianc/node-postgres/actions/runs/10389540544/job/28768489773?pr=3296#step:8:580 |
charmander
requested changes
Aug 15, 2024
Collaborator
charmander
left a comment
There was a problem hiding this comment.
As the comment in the existing code said,
Note that the MD5 algorithm on WebCrypto is not available in Node.js. This is why we cannot just use WebCrypto in all environments.
Author
Collaborator
|
Node 15 is correct. Even the version history on the Node 22 docs page mentions versions back to 16. |
Owner
|
Is this still required? It's been a while and this might have gone stale. Please feel free to re-open if so (there are merge conflicts now) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Following this discussion I implemented the suggested solution.
Removing the
nodeCryptocheck inside ofmd5function because we anyway only exportutils-webcryptowhen we're in the correct environment.