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

Using js-sha256 as a dependency causes eval warnings when using rollup #205

Closed
NewDark90 opened this issue Apr 13, 2022 · 1 comment
Closed

Comments

@NewDark90
Copy link

This issue could almost be copied verbatim from here, and exists as an open issue here.

When performing a build with Rollup of a project containing @unstoppabledomains/resolution, you get the following message: Use of eval is strongly discouraged, as it poses security risks and may cause issues with minification.

eval is used in the library js-sha256 which is a dependency of @unstoppabledomains/resolution. There are numerous issues that have been opened about emn178/js-sha256#18, some open (like this), some closed without resolution. There have been no updates to the package since 2017.

Is there an alternative that @unstoppabledomains/resolution can use instead?

The SubtleCrypto API from the browser and Node 15+ is a possible suggestion https://caniuse.com/mdn-api_crypto_subtle

@enaqx
Copy link
Contributor

enaqx commented Jul 22, 2022

Thanks, we have updated to use crypto-js instead. 4c40938#diff-a920b5f0fd3204eb7b57821f71298c43c5b91567fbb943e0d1c47e79d4134a74L1

@enaqx enaqx closed this as completed Jul 22, 2022
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

No branches or pull requests

2 participants