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

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

Closed
wants to merge 1 commit into from

Conversation

i5shuyi
Copy link

@i5shuyi i5shuyi commented May 1, 2024

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:

  • Code compiles correctly
  • Created/updated tests
  • Extended the documentation

@i5shuyi i5shuyi requested review from a team as code owners May 1, 2024 06:32
@i5shuyi i5shuyi changed the title feat: Replace crypto module with crypto object associated with the gl… feat: Replace crypto module with crypto object associated with the global object. May 1, 2024
@shubham1172
Copy link
Member

shubham1172 commented May 5, 2024

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
Copy link
Author

i5shuyi commented May 6, 2024

@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
Copy link
Collaborator

dapr-bot commented Jun 5, 2024

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 dapr-bot added the stale label Jun 5, 2024
@dapr-bot
Copy link
Collaborator

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!

@dapr-bot dapr-bot closed this Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Next.js DaprServer Module not found: Can't resolve 'crypto'
3 participants