Skip to content

feat: add ArrayBuffer output support#70

Merged
ChALkeR merged 1 commit intomainfrom
chalker/arraybuffer/0
Mar 4, 2026
Merged

feat: add ArrayBuffer output support#70
ChALkeR merged 1 commit intomainfrom
chalker/arraybuffer/0

Conversation

@ChALkeR
Copy link
Collaborator

@ChALkeR ChALkeR commented Mar 4, 2026

Resolves #65

@ChALkeR ChALkeR force-pushed the chalker/arraybuffer/0 branch 3 times, most recently from f9588bd to 2abbcca Compare March 4, 2026 04:39
@ChALkeR ChALkeR force-pushed the chalker/arraybuffer/0 branch 5 times, most recently from 3e18570 to b7bb8a0 Compare March 4, 2026 05:26
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds first-class 'arraybuffer' output support across the bytes encoding/decoding APIs, aligning runtime behavior, TypeScript declarations, and test coverage to resolve #65.

Changes:

  • Extend output format handling to support returning ArrayBuffer (runtime + typings).
  • Update TypeScript overloads across utf8/hex/base32/base64/base58/base58check/bigint modules to include 'arraybuffer'.
  • Expand test suites to validate 'arraybuffer' output across affected modules.

Reviewed changes

Copilot reviewed 9 out of 17 changed files in this pull request and generated no comments.

Show a summary per file
File Description
fallback/_utils.js Adds 'arraybuffer' handling to fromUint8 / fromBuffer conversion helpers.
array.d.ts Expands OutputFormat to include 'arraybuffer'; adjusts typed array helper signatures accordingly.
utf8.d.ts Adds 'arraybuffer' overloads/return unions for UTF-8 encoding functions.
hex.d.ts Adds 'arraybuffer' overload/union return type for fromHex.
bigint.d.ts Adds 'arraybuffer' overload/union return type for fromBigInt.
base64.d.ts Adds 'arraybuffer' overloads/union return types for base64 decoders.
base32.d.ts Adds 'arraybuffer' overloads/union return types for base32 decoders.
base58.d.ts Adds 'arraybuffer' overloads/union return types for base58 decoders.
base58check.d.ts Adds 'arraybuffer' overloads/union return types for base58check decoders (async + sync).
tests/utf8.test.js Adds 'arraybuffer' to invalid-format coverage and validates 'arraybuffer' output roundtrips.
tests/utf8.lib.test.js Mirrors UTF-8 'arraybuffer' coverage for library import path.
tests/hex.test.js Adds 'arraybuffer' decoding assertions and fixtures pool tracking.
tests/bigint.test.js Adds 'arraybuffer' format assertions for fromBigInt.
tests/base64.test.js Adds 'arraybuffer' format assertions for base64/base64url decoders.
tests/base32.test.js Adds 'arraybuffer' format assertions for base32/base32hex decoders.
tests/base58.test.js Adds 'arraybuffer' format assertions and adjusts non-pooled tracking exclusions.
tests/base58check.test.js Adds 'arraybuffer' format assertions and adjusts non-pooled tracking exclusions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ChALkeR ChALkeR merged commit c907ea8 into main Mar 4, 2026
37 checks passed
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.

First-class ArrayBuffer support as a return type

2 participants