-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
simplify for cloudflare workers #6
Conversation
ryan-mars
commented
Nov 11, 2021
- Fork from ulidx
- Remove dependencies
- Remove PRNG detection
- Web Crypto API only
@ryan-mars Why fork instead of offering an update to this library to work with cloudflare workers? |
@perry-mitchell I don't recall what lead to the decision at the time but it wasn't meant as a slight. Would you like me to submit a PR? |
I mean.. I can of course analyse what you changed and can add it to ulidx- was just curious as I created ulidx out of frustration for the lack of support on the original ulid library. If I could help anyone by supporting yet more environments well.. that was my goal.
No offence taken, was just asking :)
|
I'm happy to contribute back. I apologize for creating yet-another-package. It was done out of expedience. I'll look through the code and submit a PR. The two major differences between Cloudflare Workers and other environments are date seed behavior, and crypto.
|
Thanks @ryan-mars for the submitted work - I very much appreciate the gesture. I can't of course merge this, as it drastically changes the library, removing a lot of the functionality and capability required for other platforms (node, web, web workers etc.). It does give me insight into how you've made it work in Cloudflare workers.
This is interesting and something I need to look into. I have issues currently with this due to the Node REPL exposing the same property, and confusing the whole PRNG detection.
This sounds.. absolutely terrible. I don't understand why they'd choose to do this. All the same, I don't know how this library is meant to work when time can't be relied upon. It's a crucial part of the algorithm. |
Closing this as I've addressed it in the relevant issue - #5. |
I just wanted to say thanks to @ryan-mars for creating the fork that works with Workers. I came here to say it since issues/discussions seem to be closed on the fork repo. It's a useful tool for the large community of Workers developers. 🥇 Cheers. |
@grempe Thank you so much for the kind feedback. I just want to make something useful to others. I'll make sure issues and discussion are open. |