-
Notifications
You must be signed in to change notification settings - Fork 657
feat(uuid/unstable): implement support for UUID V6 - refs #6414 #6415
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6415 +/- ##
==========================================
+ Coverage 95.77% 95.79% +0.02%
==========================================
Files 574 575 +1
Lines 42917 42992 +75
Branches 6435 6447 +12
==========================================
+ Hits 41105 41186 +81
+ Misses 1778 1773 -5
+ Partials 34 33 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
05e4510
to
1b30fdd
Compare
Can you prefix the file path and export path with |
1b30fdd
to
51338f4
Compare
@kt3k Sorry, my bad. Fixed in latest update |
6be87a2
to
185595a
Compare
This implementation keeps using the previous 'clock_seq' and 'node' values once they are set (like UUID v1), however RFC9562 says they should be reset each id generation:
https://www.rfc-editor.org/rfc/rfc9562.html#section-5.6 I think we should generate clock_seq and node each time unless they are set explicitly in options. Note:
|
55a99b6
to
2b7712a
Compare
Latest adjustments add some more tests to it (apart from reusing the same tests as from V1):
|
|
||
for (let i = 0; i < numGenerate; i++) { | ||
const u = generate(v6options); | ||
assert(!uuids.includes(u), "Duplicate random data detected"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for updating!
Now this looks perfect. Nice work!
Extends the UUID package to include support for UUID version 6.
To a certain degree, this is a copy-paste from UUID v1 with minor adjustments.