-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Add UUID helpers to the SDK #14939
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
Add UUID helpers to the SDK #14939
Conversation
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found.
Additional details and impacted files@@ Coverage Diff @@
## main #14939 +/- ##
=======================================
Coverage 36.48% 36.48%
=======================================
Files 3208 3208
Lines 93256 93260 +4
Branches 16835 16836 +1
=======================================
+ Hits 34020 34024 +4
Misses 56763 56763
Partials 2473 2473 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Great job, no security vulnerabilities found in this Pull Request |
|
|
||
| // Converts a UUID to the string representation. | ||
| export function uuid_to_string<T extends Uuid>(uuid: T): string { | ||
| return uuid as unknown as string; |
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.
question: should we do a sanity check here just to double check that the value is a string/defined?
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.
We could but they need to use something that is tagged as uuid, feels pretty hard to accidentally insert something unexpected here.
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.
Maybe if it comes across a network or from a deserialization process?
|
* Add UUID helpers to the SDK * Address review feedback




🎟️ Tracking
📔 Objective
Follow up PR to bitwarden/sdk-internal#225 which adds converters between strings and SDK UUIDs.
⏰ Reminders before review
🦮 Reviewer guidelines
:+1:) or similar for great changes:memo:) or ℹ️ (:information_source:) for notes or general info:question:) for questions:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion:art:) for suggestions / improvements:x:) or:warning:) for more significant problems or concerns needing attention:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt:pick:) for minor or nitpick changes