Skip to content

fix(shared): use uuid v4 as default #2591

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

Merged
merged 1 commit into from
May 22, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/@liexp/shared/src/io/http/Common/UUID.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { Schema } from "effect";

import { v6, type Version6Options, validate } from "uuid";
import { type Version4Options, validate, v4 } from "uuid";

const UUID = Schema.UUID.pipe(Schema.brand("UUID"));
type UUID = typeof UUID.Type;

function uuid(opts?: Version6Options): UUID {
return v6(opts) as unknown as UUID;
function uuid(opts?: Version4Options): UUID {
return v4(opts) as unknown as UUID;
}

export { UUID, uuid, validate };
Loading