dapr / js-sdk

Dapr SDK for Javascript
Apache License 2.0
192 stars 80 forks source link

feat: Replace crypto module with crypto object associated with the global object. #593

Closed i5shuyi closed 1 month ago

i5shuyi commented 3 months ago

Description

Upgraded TypeScript / ESLint / Prettier. Updated @types/node to version 18. Replaced the crypto module with crypto.

Issue reference

Please reference the issue this PR will close: #584

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

shubham1172 commented 3 months ago

First of all, thanks for this very important PR and your goal to make this library Winter CG compatible @xAmast. In this PR, we are replacing "crypto" the library, with a global import. However, I see from the official docs that this is only available (as stable) from Node 20: https://nodejs.org/docs/latest-v20.x/api/webcrypto.html#web-crypto-api. Dapr JS SDK supports Node 16+ (16 is EOL since a few months now, and we should move to 18+), but the crypto import still does not seem to be stable for node 18.

We can

Thoughts?

/cc @XavierGeerinck

i5shuyi commented 3 months ago

@shubham1172 I'm very sorry, I've been using Bun and Node.JS 20 all along, thus overlooking this point. I'll resubmit the code later.

dapr-bot commented 2 months ago

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

dapr-bot commented 1 month ago

This pull request has been automatically closed because it has not had activity in the last 37 days. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!