-
Notifications
You must be signed in to change notification settings - Fork 2
[PLAT-8122] remove obsolete deps on uuid & is-plain-object #770
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,3 @@ | ||
| import { v4 as uuid } from 'uuid'; | ||
|
|
||
| export type UUID = string; | ||
|
|
||
| export interface UUIDMsbLsb { | ||
|
|
@@ -8,7 +6,7 @@ export interface UUIDMsbLsb { | |
| } | ||
|
|
||
| export function create(): UUID { | ||
| return uuid(); | ||
| return globalThis.crypto.randomUUID(); // synonomys with uuid.v4() | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. https://developer.mozilla.org/en-US/docs/Web/API/Crypto/randomUUID browser and node env support is solid, so compatibility shouldn't be an issue, but jsDom is an outlier, new versions of jest could help that, or vitest + happy-dom which is what newer versions of lerna guide towards |
||
| } | ||
|
|
||
| export function fromMsbLsb(msb: bigint | string, lsb: bigint | string): UUID { | ||
|
|
||
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.
Nice to remove some dependencies!