Skip to content

Conversation

@lino-levan
Copy link
Contributor

@lino-levan lino-levan commented Dec 8, 2025

Closes #6772
Closes #6174

I'm a little bit rusty since I haven't contributed in a little bit. Didn't see docs in CONTRIBUTING.md file explaining how stabilization works so I took my best shot at it. Let me know if there's anything else that needs to be done.

@lino-levan lino-levan requested a review from kt3k as a code owner December 8, 2025 15:56
@github-actions github-actions bot added the uuid label Dec 8, 2025
@codecov
Copy link

codecov bot commented Dec 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.12%. Comparing base (f70379e) to head (1e03b0b).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6897      +/-   ##
==========================================
+ Coverage   94.11%   94.12%   +0.01%     
==========================================
  Files         582      582              
  Lines       42752    42763      +11     
  Branches     6808     6808              
==========================================
+ Hits        40235    40250      +15     
+ Misses       2466     2463       -3     
+ Partials       51       50       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@lino-levan
Copy link
Contributor Author

I should note what I didn't in my issue. The only change that I could see to this code is the type of the function returning a string. In typescript crypto.createUUID() returns a specific type that this does not. Wondering if it was ever discussed why this is the behavior std chose?

@lino-levan
Copy link
Contributor Author

I suppose at this point consistency is more important anyways and it would be weird to have one api have a different generate/validate typing. Maybe a 2.0 of this package could do that.

Copy link
Member

@kt3k kt3k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

uuid/mod.ts Outdated
import { validate as validateV4 } from "./v4.ts";
import { generate as generateV5, validate as validateV5 } from "./v5.ts";
import {
extractTimestamp,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a minor point for some consideration

I wonder if it's ok to export this name from here as all other top level methods have version suffixes.. What do you think about the name extractTimestampV7?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense, I think. Other UUID types actually do store timestamps and we don't have functions to extract them right now.

Copy link
Contributor Author

@lino-levan lino-levan Dec 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait sorry, I misread, we shouldn't do this. It's already on the v7 object that is being exported, we should do V7 on the import, in case in the future we decide to add more.

@kt3k kt3k merged commit b97383d into denoland:main Dec 14, 2025
19 checks passed
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.

Stablize uuid package's v7 implementation. @std/uuid: Stabilize @std/uuid/v7

2 participants