Skip to content

feat(node): add Uint8Array base64/hex helpers#73911

Closed
michaelgiraldo wants to merge 1 commit intoDefinitelyTyped:masterfrom
michaelgiraldo:feat/node25-uint8array-helpers
Closed

feat(node): add Uint8Array base64/hex helpers#73911
michaelgiraldo wants to merge 1 commit intoDefinitelyTyped:masterfrom
michaelgiraldo:feat/node25-uint8array-helpers

Conversation

@michaelgiraldo
Copy link
Copy Markdown

Summary

  • add Node 25 helpers Uint8Array.prototype.toBase64, Uint8Array.prototype.toHex, Uint8Array.fromBase64, and Uint8Array.fromHex
  • extend the globals test suite to assert the string return values and constructor types
  • align the Node typings with the runtime that already exposes these helpers in Node.js 25

Test Plan

  • unable to run pnpm test types/node in this environment (pnpm via npx stops because the workspace lacks a generated lockfile); change is limited to ambient declarations and dtslint coverage

@typescript-bot
Copy link
Copy Markdown
Contributor

typescript-bot commented Oct 16, 2025

@michaelgiraldo 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 failed
  • 🕐 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": 73911,
  "author": "michaelgiraldo",
  "headCommitOid": "33e51f377e39e5f104a74d05047c299947655fac",
  "mergeBaseOid": "e588e0e39ea08be956f5c54aa7a4271918d6704a",
  "lastPushDate": "2025-10-16T18:13:20.000Z",
  "lastActivityDate": "2025-10-16T18:37:20.000Z",
  "hasMergeConflict": false,
  "isFirstContribution": true,
  "tooManyFiles": false,
  "hugeChange": false,
  "popularityLevel": "Critical",
  "pkgInfo": [
    {
      "name": "node",
      "kind": "edit",
      "files": [
        {
          "path": "types/node/globals.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/test/globals.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": "2025-10-16T18:37:20.000Z"
    }
  ],
  "mainBotCommentID": 3412205166,
  "ciResult": "fail",
  "ciUrl": "https://github.com/DefinitelyTyped/DefinitelyTyped/commit/33e51f377e39e5f104a74d05047c299947655fac/checks?check_suite_id=47780851664"
}

@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 to Waiting for Code Reviews in Pull Request Status Board Oct 16, 2025
@typescript-bot typescript-bot added the The CI failed When GH Actions fails label Oct 16, 2025
@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Author Action in Pull Request Status Board Oct 16, 2025
@typescript-bot
Copy link
Copy Markdown
Contributor

@michaelgiraldo The CI build failed! Please review the logs for more information.

Once you've pushed the fixes, the build will automatically re-run. Thanks!

Note: builds that are failing do not end up on the list of PRs for the DT maintainers to review.

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.

We do not provide definitions for ECMAScript natives. This will be implemented as lib.esnext.typedarrays in TS 6.0: see microsoft/TypeScript#61696.

@typescript-bot typescript-bot added the Revision needed This PR needs code changes before it can be merged. label Oct 16, 2025
@typescript-bot
Copy link
Copy Markdown
Contributor

@michaelgiraldo 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!

@michaelgiraldo
Copy link
Copy Markdown
Author

@Renegade334 Thanks! Looking forward TS 6.0

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. The CI failed When GH Actions fails

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants