Prepare for v0.5.0: Fix public API return types (Bytes → Uint8Array)#882
Closed
Copilot wants to merge 2 commits intoprepare-for-v5from
Closed
Prepare for v0.5.0: Fix public API return types (Bytes → Uint8Array)#882Copilot wants to merge 2 commits intoprepare-for-v5from
Copilot wants to merge 2 commits intoprepare-for-v5from
Conversation
Merged
Co-authored-by: kigawas <4182346+kigawas@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Prepare codebase for upcoming v0.5.0 release
Prepare for v0.5.0: Fix public API return types (Bytes → Uint8Array)
Mar 7, 2026
Member
|
Close this pr |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
Bytesconditional type was incorrectly defined (comparing against string"undefined"and referencing the Buffer constructor rather than instance type), causing public API signatures to expose an environment-dependent type instead of a consistentUint8Array.Changes
src/types.ts: Removed the brokenBytesconditional type entirely; onlyIS_BUFFER_SUPPORTEDremainssrc/index.ts:encryptanddecryptreturn types changed fromBytes→Uint8Arraysrc/keys/PrivateKey.ts:secretgetter return type changed fromBytes→Uint8Array; removed stale// TODO: Uint8Arraycommentsrc/keys/PublicKey.ts:uncompressedandcompressedgetter return types changed fromBytes→Uint8ArrayAt runtime, Node.js environments still return
Buffer(aUint8Arraysubtype) for backwards compatibility, but the TypeScript contract is now consistentlyUint8Arrayacross all environments.🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.