镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Add missing BigUint64 runtime aliases - #377

Open
saitakarcesme wants to merge 1 commit into
feross:masterfrom
saitakarcesme:codex/biguint64-runtime-aliases
Open

saitakarcesme wants to merge 1 commit into
feross:masterfrom
saitakarcesme:codex/biguint64-runtime-aliases

Conversation

@saitakarcesme

Copy link
Copy Markdown

Fixes #318 and #353.

Expose readBigUint64LE, readBigUint64BE, writeBigUint64LE and writeBigUint64BE as aliases of the existing BigUInt64 methods, matching Node's capitalization aliases. Use the same function objects, including the existing BigInt not supported fallback.

Regression tests verify alias identity, zero/ordinary/maximum unsigned values, default and nonzero offsets, write return offsets, unchanged prefix bytes, and range errors. Eight existence/identity assertions fail on the original source; all 46 assertions pass after the fix.

Validation with Node 24.21.0:

  • Full npm test: 1,048,608 assertions passed.
  • npm run standard -- index.js test/bigint-aliases.js: passed.
  • Additional comparison against native Node Buffer confirms identical bytes and returned values for both endiannesses.
  • VM check with BigInt unavailable confirms all four aliases retain the same fallback function/error.
  • git diff --check: passed.

This PR supplies the missing runtime methods. The corresponding TypeScript declarations are already proposed in open PR #360, so this does not duplicate that contributor's declaration changes. Browser-specific runners were not run locally.

AI disclosure: implemented and tested by OpenAI Codex at the account owner's request. No claim of independent human code review.

@saitakarcesme

Copy link
Copy Markdown
Author

CI follow-up: Tests — status: action_required on the current head 5ca47be. These fork workflow runs have not started. Could a maintainer approve them so the change can be validated?

Status checked and follow-up prepared with Codex assistance.

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.

writeBigUint64BE isn't defined, but writeBigUInt64BE is

1 participant