Skip to content
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

Add compatibility with older node versions #46

Closed
wants to merge 2 commits into from
Closed

Add compatibility with older node versions #46

wants to merge 2 commits into from

Conversation

FadhiliNjagi
Copy link

I added the buffer-from ponyfill for Buffer.from and safe-compare for crypto.timingSafeEqual. I tested it on Node 0.10.48 and 18.x locally on my Windows machine, and the tests passed. The last test was not passing though on Node 0.10.48. It could be something to do with the Uint8Array implementation on that node version. It gave TypeError: Not a buffer so I might have altered the test 😁.

I know it's 2 more dependencies, I hope that's not inconvenient.

@FadhiliNjagi
Copy link
Author

#45

@natevw
Copy link
Collaborator

natevw commented Apr 4, 2023

I know it's 2 more dependencies, I hope that's not inconvenient.

Sorry, that's not a good tradeoff for me. This adds risk and complication to the current version of the library for very very old versions of node.js!

Let's continue discussion on #45 but I think simply this Pull Request I am going to close.

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.

2 participants