Skip to content

Conversation

@ETHANTALJAFFE
Copy link

Following this discussion I implemented the suggested solution.

Removing the nodeCrypto check inside of md5 function because we anyway only export utils-webcrypto when we're in the correct environment.

@brianc
Copy link
Owner

brianc commented Aug 14, 2024

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

Copy link
Collaborator

@charmander charmander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@ETHANTALJAFFE
Copy link
Author

@brianc ok I think the reason is because we are checking for node 15 even though node.js only started support webCrypto starting version 22

I am gonna try and change the if statement to check node 22 instead of 15.

@charmander
Copy link
Collaborator

Node 15 is correct. Even the version history on the Node 22 docs page mentions versions back to 16.

@brianc
Copy link
Owner

brianc commented Apr 25, 2025

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)

@brianc brianc closed this Apr 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants