Skip to content

Migrate UUIDv7 generation to node:crypto#288

Open
puneetdixit200 wants to merge 2 commits into
fedimod:mainfrom
puneetdixit200:287-node-crypto-uuidv7
Open

Migrate UUIDv7 generation to node:crypto#288
puneetdixit200 wants to merge 2 commits into
fedimod:mainfrom
puneetdixit200:287-node-crypto-uuidv7

Conversation

@puneetdixit200
Copy link
Copy Markdown

Closes #287.

Summary

  • Add a server-local UUIDv7 helper backed by node:crypto, using native randomUUIDv7 when available and a randomBytes fallback for current supported runtimes.
  • Update the Lucid base model and factories to use the shared helper.
  • Remove the external uuid dependency and add focused UUIDv7 coverage.

Tests

  • pnpm install --filter @fedimod/fires-server --frozen-lockfile --store-dir $PWD/.pnpm-store
  • pnpm --filter @fedimod/fires-server -r format:check
  • pnpm --filter @fedimod/fires-server -r lint
  • pnpm --filter @fedimod/fires-server -r typecheck
  • Direct UUIDv7 smoke test via ts-node-maintained

The full DB-backed test command needs the Postgres service from CI; locally it could not connect to 127.0.0.1:54321.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 21, 2026

🦋 Changeset detected

Latest commit: b98854f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@fedimod/fires-server Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate to node:crypto for uuidv7

1 participant