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

use native UUID method if available #1585

Merged
merged 4 commits into from Oct 18, 2022
Merged

Conversation

xavdid-stripe
Copy link
Contributor

Fixes #1101 by using the native UUID implementation, if available. Added a (very) basic test as a starter.

@richardm-stripe
Copy link
Contributor

LGTM, I pushed a commit and wrote one of the tests you described

test/utils.spec.js Outdated Show resolved Hide resolved
@xavdid-stripe
Copy link
Contributor Author

@richardm-stripe Ok, I pushed a tweak to your test so we only mock when the function was otherwise available.

Mind giving it a quick review when you have a chance?

@xavdid-stripe xavdid-stripe enabled auto-merge (squash) October 18, 2022 17:15
@xavdid-stripe xavdid-stripe merged commit c9d9522 into master Oct 18, 2022
@xavdid-stripe
Copy link
Contributor Author

Ope! Turns out auto-merge doesn't wait for reviewers 🤔 Probably still take a peek and lmk if you see anything we should tweak. Thank you!

@xavdid-stripe xavdid-stripe deleted the xavdid/use-native-uuid branch October 18, 2022 17:16
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.

Math.random() is not a cryptographically secure way to generate UUIDv4s
2 participants