Skip to content

node: add randomUUIDv7 to crypto module#74974

Open
xcfio wants to merge 2 commits into
DefinitelyTyped:masterfrom
xcfio:master
Open

node: add randomUUIDv7 to crypto module#74974
xcfio wants to merge 2 commits into
DefinitelyTyped:masterfrom
xcfio:master

Conversation

@xcfio
Copy link
Copy Markdown

@xcfio xcfio commented May 10, 2026

Changing an existing definition:

Context: crypto.randomUUIDv7() was added in Node.js v26.1.0. This PR adds the type definition reusing the existing RandomUUIDOptions and UUID types, matching the pattern of randomUUID.

Test:

import { randomUUIDv7 } from "node:crypto";

const id = randomUUIDv7();
const idNoCache = randomUUIDv7({ disableEntropyCache: true });

@typescript-bot
Copy link
Copy Markdown
Contributor

typescript-bot commented May 10, 2026

@xcfio Thank you for submitting this PR! I see this is your first time submitting to DefinitelyTyped 👋 — I'm the local bot who will help you through the process of getting things through.

This is a live comment that I will keep updated.

1 package in this PR

Code Reviews

Because this is a widely-used package, a DT maintainer will need to review it before it can be merged.

You can test the changes of this PR in the Playground.

Status

  • ✅ No merge conflicts
  • ✅ Continuous integration tests have passed
  • 🕐 Most recent commit is approved by a DT maintainer

Once every item on this list is checked, I'll ask you for permission to merge and publish the changes.


Diagnostic Information: What the bot saw about this PR
{
  "type": "info",
  "now": "-",
  "pr_number": 74974,
  "author": "xcfio",
  "headCommitOid": "de515b3d319293439157133920975c79622509c1",
  "mergeBaseOid": "dafc26dc3da728f912025f73d2629374a9b1aba9",
  "lastPushDate": "2026-05-10T13:08:49.000Z",
  "lastActivityDate": "2026-05-11T08:42:54.000Z",
  "hasMergeConflict": false,
  "isFirstContribution": true,
  "tooManyFiles": false,
  "hugeChange": false,
  "tooManyCommits": false,
  "tooManyReviews": false,
  "popularityLevel": "Critical",
  "pkgInfo": [
    {
      "name": "node",
      "kind": "edit",
      "files": [
        {
          "path": "types/node/crypto.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/node-tests/crypto.ts",
          "kind": "test"
        }
      ],
      "owners": [
        "Microsoft",
        "jkomyno",
        "r3nya",
        "btoueg",
        "touffy",
        "mohsen1",
        "galkin",
        "eps1lon",
        "WilcoBakker",
        "chyzwar",
        "trivikr",
        "yoursunny",
        "qwelias",
        "ExE-Boss",
        "peterblazejewicz",
        "addaleax",
        "victorperin",
        "NodeJS",
        "LinusU",
        "wafuwafu13",
        "mcollina",
        "Semigradsky",
        "Renegade334",
        "anonrig"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Critical"
    }
  ],
  "reviews": [
    {
      "type": "changereq",
      "reviewer": "Renegade334",
      "date": "2026-05-11T08:42:54.000Z"
    },
    {
      "type": "stale",
      "reviewer": "trivikr",
      "date": "2026-05-10T15:06:11.000Z",
      "abbrOid": "456ffbc"
    }
  ],
  "mainBotCommentID": 4415365086,
  "ciResult": "pass"
}

@typescript-bot
Copy link
Copy Markdown
Contributor

🔔 @microsoft @jkomyno @r3nya @btoueg @Touffy @mohsen1 @galkin @eps1lon @WilcoBakker @chyzwar @trivikr @yoursunny @qwelias @ExE-Boss @peterblazejewicz @addaleax @victorperin @nodejs @LinusU @wafuwafu13 @mcollina @Semigradsky @Renegade334 @anonrig — please review this PR in the next few days. Be sure to explicitly select Approve or Request Changes in the GitHub UI so I know what's going on.

@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Maintainer Review in Pull Request Status Board May 10, 2026
@typescript-bot typescript-bot added the Owner Approved A listed owner of this package signed off on the pull request. label May 10, 2026
Copy link
Copy Markdown
Contributor

@Renegade334 Renegade334 left a comment

Choose a reason for hiding this comment

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

DT doesn't have staged releasing, we have to land new versions' updates in a rolled up package otherwise it breaks the versioning (you're merging this to v25.6 as it stands)

@typescript-bot typescript-bot added Revision needed This PR needs code changes before it can be merged. and removed Owner Approved A listed owner of this package signed off on the pull request. labels May 10, 2026
@typescript-bot
Copy link
Copy Markdown
Contributor

@xcfio One or more reviewers has requested changes. Please address their comments. I'll be back once they sign off or you've pushed new commits. Thank you!

@typescript-bot typescript-bot moved this from Needs Maintainer Review to Needs Author Action in Pull Request Status Board May 10, 2026
@xcfio
Copy link
Copy Markdown
Author

xcfio commented May 10, 2026

DT doesn't have staged releasing, we have to land new versions' updates in a rolled up package otherwise it breaks the versioning (you're merging this to v25.6 as it stands)

Do I have to wait for v26.1 to roll out?

@Renegade334
Copy link
Copy Markdown
Contributor

Yep, we can include this in 26.1.

@typescript-bot typescript-bot removed Revision needed This PR needs code changes before it can be merged. Untested Change This PR does not touch tests labels May 11, 2026
@typescript-bot typescript-bot moved this from Needs Author Action to Waiting for Code Reviews in Pull Request Status Board May 11, 2026
@typescript-bot
Copy link
Copy Markdown
Contributor

@Renegade334, @trivikr Thank you for reviewing this PR! The author has pushed new commits since your last review. Could you take another look and submit a fresh review?

@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Maintainer Review in Pull Request Status Board May 11, 2026
@xcfio
Copy link
Copy Markdown
Author

xcfio commented May 11, 2026

Yep, we can include this in 26.1.

Okay

Copy link
Copy Markdown
Contributor

@Renegade334 Renegade334 left a comment

Choose a reason for hiding this comment

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

Blocking for now.

@typescript-bot typescript-bot added the Revision needed This PR needs code changes before it can be merged. label May 11, 2026
@typescript-bot typescript-bot moved this from Needs Maintainer Review to Needs Author Action in Pull Request Status Board May 11, 2026
@typescript-bot
Copy link
Copy Markdown
Contributor

@xcfio One or more reviewers has requested changes. Please address their comments. I'll be back once they sign off or you've pushed new commits. Thank you!

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

Labels

Critical package Revision needed This PR needs code changes before it can be merged.

Projects

Status: Needs Author Action

Development

Successfully merging this pull request may close these issues.

4 participants